From 6496423b5c07ba9b5edc347ff3616eb021333612 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 21 Dec 2023 13:38:23 +0100 Subject: [PATCH 001/161] Missing trailing '...' in variadic template arguments. --- source/to_cpp1.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/to_cpp1.h b/source/to_cpp1.h index d4cfd47c18..773c64d10c 100644 --- a/source/to_cpp1.h +++ b/source/to_cpp1.h @@ -4888,6 +4888,9 @@ class cppfront for (auto& tparam : parent->template_parameters->parameters) { assert (tparam->has_name()); list += separator + tparam->name()->to_string(); + if(tparam->declaration->is_variadic) { + list += "..."; + } separator = ","; } list += ">"; From 30098c63a9f80d55ebc8521e800f7bb10afefcd5 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 21 Dec 2023 13:40:27 +0100 Subject: [PATCH 002/161] Regular expressions initial setup. --- source/reflect.h | 368 ++++++++++++++++++++++++++++------------------ source/reflect.h2 | 78 +++++++++- source/regex.h | 234 +++++++++++++++++++++++++++++ source/regex.h2 | 121 +++++++++++++++ 4 files changed, 656 insertions(+), 145 deletions(-) create mode 100644 source/regex.h create mode 100644 source/regex.h2 diff --git a/source/reflect.h b/source/reflect.h index 1cb66f794f..d6c8210efc 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -10,36 +10,36 @@ #line 1 "reflect.h2" -#line 20 "reflect.h2" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 32 "reflect.h2" +#line 33 "reflect.h2" class compiler_services; -#line 223 "reflect.h2" +#line 224 "reflect.h2" class declaration_base; -#line 249 "reflect.h2" +#line 250 "reflect.h2" class declaration; -#line 331 "reflect.h2" +#line 332 "reflect.h2" class function_declaration; -#line 418 "reflect.h2" +#line 419 "reflect.h2" class object_declaration; -#line 454 "reflect.h2" +#line 455 "reflect.h2" class type_declaration; -#line 589 "reflect.h2" +#line 590 "reflect.h2" class alias_declaration; -#line 928 "reflect.h2" +#line 929 "reflect.h2" class value_member_info; -#line 1445 "reflect.h2" +#line 1521 "reflect.h2" } } @@ -66,13 +66,14 @@ class value_member_info; //=========================================================================== #include "parse.h" +#include "regex.h" -#line 20 "reflect.h2" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 25 "reflect.h2" +#line 26 "reflect.h2" //----------------------------------------------------------------------- // // Compiler services @@ -100,34 +101,34 @@ class compiler_services std::deque* generated_tokens_ ); -#line 58 "reflect.h2" +#line 59 "reflect.h2" // Common API // public: auto set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void; -#line 66 "reflect.h2" +#line 67 "reflect.h2" public: [[nodiscard]] auto get_metafunction_name() const& -> std::string_view; public: [[nodiscard]] auto get_argument(cpp2::in index) & -> std::string; -#line 76 "reflect.h2" +#line 77 "reflect.h2" public: [[nodiscard]] auto get_arguments() & -> std::vector; -#line 81 "reflect.h2" +#line 82 "reflect.h2" public: [[nodiscard]] auto arguments_were_used() const& -> bool; using parse_statement_ret = std::unique_ptr; -#line 83 "reflect.h2" +#line 84 "reflect.h2" protected: [[nodiscard]] auto parse_statement( std::string_view source ) & -> parse_statement_ret; -#line 136 "reflect.h2" +#line 137 "reflect.h2" public: [[nodiscard]] virtual auto position() const -> source_position; -#line 142 "reflect.h2" +#line 143 "reflect.h2" // Error diagnosis and handling, integrated with compiler output // Unlike a contract violation, .requires continues further processing // @@ -137,24 +138,24 @@ using parse_statement_ret = std::unique_ptr; cpp2::in msg ) const& -> void; -#line 156 "reflect.h2" +#line 157 "reflect.h2" public: auto error(cpp2::in msg) const& -> void; -#line 165 "reflect.h2" +#line 166 "reflect.h2" // Enable custom contracts on this object, integrated with compiler output // Unlike .requires, a contract violation stops further processing // public: auto report_violation(auto const& msg) const& -> void; -#line 173 "reflect.h2" +#line 174 "reflect.h2" public: [[nodiscard]] auto has_handler() const& -> auto; public: virtual ~compiler_services() noexcept; public: compiler_services(compiler_services const& that); -#line 174 "reflect.h2" +#line 175 "reflect.h2" }; -#line 177 "reflect.h2" +#line 178 "reflect.h2" /* //----------------------------------------------------------------------- // @@ -191,7 +192,7 @@ type_id: @polymorphic_base @copyable type = } */ -#line 214 "reflect.h2" +#line 215 "reflect.h2" //----------------------------------------------------------------------- // // Declarations @@ -204,7 +205,7 @@ type_id: @polymorphic_base @copyable type = class declaration_base : public compiler_services { -#line 227 "reflect.h2" +#line 228 "reflect.h2" protected: declaration_node* n; protected: explicit declaration_base( @@ -213,31 +214,31 @@ class declaration_base cpp2::in s ); -#line 240 "reflect.h2" +#line 241 "reflect.h2" public: [[nodiscard]] auto position() const -> source_position override; public: [[nodiscard]] auto print() const& -> std::string; public: virtual ~declaration_base() noexcept; public: declaration_base(declaration_base const& that); -#line 243 "reflect.h2" +#line 244 "reflect.h2" }; -#line 246 "reflect.h2" +#line 247 "reflect.h2" //----------------------------------------------------------------------- // All declarations // class declaration : public declaration_base { -#line 253 "reflect.h2" +#line 254 "reflect.h2" public: explicit declaration( declaration_node* n_, cpp2::in s ); -#line 262 "reflect.h2" +#line 263 "reflect.h2" public: [[nodiscard]] auto is_public() const& -> bool; public: [[nodiscard]] auto is_protected() const& -> bool; public: [[nodiscard]] auto is_private() const& -> bool; @@ -256,7 +257,7 @@ class declaration public: [[nodiscard]] auto name() const& -> std::string_view; -#line 283 "reflect.h2" +#line 284 "reflect.h2" public: [[nodiscard]] auto has_initializer() const& -> bool; public: [[nodiscard]] auto is_global() const& -> bool; @@ -299,24 +300,24 @@ public: declaration(declaration const& that); // this precondition should be sufficient ... -#line 325 "reflect.h2" +#line 326 "reflect.h2" }; -#line 328 "reflect.h2" +#line 329 "reflect.h2" //----------------------------------------------------------------------- // Function declarations // class function_declaration : public declaration { -#line 335 "reflect.h2" +#line 336 "reflect.h2" public: explicit function_declaration( declaration_node* n_, cpp2::in s ); -#line 345 "reflect.h2" +#line 346 "reflect.h2" public: [[nodiscard]] auto index_of_parameter_named(cpp2::in s) const& -> int; public: [[nodiscard]] auto has_parameter_named(cpp2::in s) const& -> bool; public: [[nodiscard]] auto has_in_parameter_named(cpp2::in s) const& -> bool; @@ -353,7 +354,7 @@ class function_declaration public: [[nodiscard]] auto get_parameters() const& -> std::vector; -#line 389 "reflect.h2" +#line 390 "reflect.h2" public: [[nodiscard]] auto is_binary_comparison_function() const& -> bool; public: auto default_to_virtual() & -> void; @@ -364,103 +365,103 @@ class function_declaration public: function_declaration(function_declaration const& that); -#line 412 "reflect.h2" +#line 413 "reflect.h2" }; -#line 415 "reflect.h2" +#line 416 "reflect.h2" //----------------------------------------------------------------------- // Object declarations // class object_declaration : public declaration { -#line 422 "reflect.h2" +#line 423 "reflect.h2" public: explicit object_declaration( declaration_node* n_, cpp2::in s ); -#line 432 "reflect.h2" +#line 433 "reflect.h2" public: [[nodiscard]] auto is_const() const& -> bool; public: [[nodiscard]] auto has_wildcard_type() const& -> bool; public: [[nodiscard]] auto type() const& -> std::string; -#line 442 "reflect.h2" +#line 443 "reflect.h2" public: [[nodiscard]] auto initializer() const& -> std::string; public: object_declaration(object_declaration const& that); -#line 448 "reflect.h2" +#line 449 "reflect.h2" }; -#line 451 "reflect.h2" +#line 452 "reflect.h2" //----------------------------------------------------------------------- // Type declarations // class type_declaration : public declaration { -#line 458 "reflect.h2" +#line 459 "reflect.h2" public: explicit type_declaration( declaration_node* n_, cpp2::in s ); -#line 468 "reflect.h2" +#line 469 "reflect.h2" public: auto reserve_names(cpp2::in name, auto&& ...etc) const& -> void; -#line 480 "reflect.h2" +#line 481 "reflect.h2" public: [[nodiscard]] auto is_polymorphic() const& -> bool; public: [[nodiscard]] auto is_final() const& -> bool; public: [[nodiscard]] auto make_final() & -> bool; public: [[nodiscard]] auto get_member_functions() const& -> std::vector; -#line 495 "reflect.h2" +#line 496 "reflect.h2" public: [[nodiscard]] auto get_member_functions_needing_initializer() const& -> std::vector; -#line 510 "reflect.h2" +#line 511 "reflect.h2" public: [[nodiscard]] auto get_member_objects() const& -> std::vector; -#line 520 "reflect.h2" +#line 521 "reflect.h2" public: [[nodiscard]] auto get_member_types() const& -> std::vector; -#line 530 "reflect.h2" +#line 531 "reflect.h2" public: [[nodiscard]] auto get_member_aliases() const& -> std::vector; -#line 540 "reflect.h2" +#line 541 "reflect.h2" public: [[nodiscard]] auto get_members() const& -> std::vector; struct query_declared_value_set_functions_ret { bool out_this_in_that; bool out_this_move_that; bool inout_this_in_that; bool inout_this_move_that; }; -#line 550 "reflect.h2" +#line 551 "reflect.h2" public: [[nodiscard]] auto query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret; -#line 565 "reflect.h2" +#line 566 "reflect.h2" public: auto add_member(cpp2::in source) & -> void; -#line 579 "reflect.h2" +#line 580 "reflect.h2" public: auto remove_marked_members() & -> void; public: auto remove_all_members() & -> void; public: auto disable_member_function_generation() & -> void; public: type_declaration(type_declaration const& that); -#line 583 "reflect.h2" +#line 584 "reflect.h2" }; -#line 586 "reflect.h2" +#line 587 "reflect.h2" //----------------------------------------------------------------------- // Alias declarations // class alias_declaration : public declaration { -#line 593 "reflect.h2" +#line 594 "reflect.h2" public: explicit alias_declaration( declaration_node* n_, @@ -469,10 +470,10 @@ class alias_declaration public: alias_declaration(alias_declaration const& that); -#line 602 "reflect.h2" +#line 603 "reflect.h2" }; -#line 605 "reflect.h2" +#line 606 "reflect.h2" //----------------------------------------------------------------------- // // Metafunctions - these are hardwired for now until we get to the @@ -487,7 +488,7 @@ class alias_declaration // auto add_virtual_destructor(meta::type_declaration& t) -> void; -#line 623 "reflect.h2" +#line 624 "reflect.h2" //----------------------------------------------------------------------- // // "... an abstract base class defines an interface ..." @@ -502,7 +503,7 @@ auto add_virtual_destructor(meta::type_declaration& t) -> void; // auto interface(meta::type_declaration& t) -> void; -#line 662 "reflect.h2" +#line 663 "reflect.h2" //----------------------------------------------------------------------- // // "C.35: A base class destructor should be either public and @@ -524,7 +525,7 @@ auto interface(meta::type_declaration& t) -> void; // auto polymorphic_base(meta::type_declaration& t) -> void; -#line 706 "reflect.h2" +#line 707 "reflect.h2" //----------------------------------------------------------------------- // // "... A totally ordered type ... requires operator<=> that @@ -550,7 +551,7 @@ auto ordered_impl( cpp2::in ordering// must be "strong_ordering" etc. ) -> void; -#line 750 "reflect.h2" +#line 751 "reflect.h2" //----------------------------------------------------------------------- // ordered - a totally ordered type // @@ -558,19 +559,19 @@ auto ordered_impl( // auto ordered(meta::type_declaration& t) -> void; -#line 760 "reflect.h2" +#line 761 "reflect.h2" //----------------------------------------------------------------------- // weakly_ordered - a weakly ordered type // auto weakly_ordered(meta::type_declaration& t) -> void; -#line 768 "reflect.h2" +#line 769 "reflect.h2" //----------------------------------------------------------------------- // partially_ordered - a partially ordered type // auto partially_ordered(meta::type_declaration& t) -> void; -#line 777 "reflect.h2" +#line 778 "reflect.h2" //----------------------------------------------------------------------- // // "A value is ... a regular type. It must have all public @@ -589,7 +590,7 @@ auto partially_ordered(meta::type_declaration& t) -> void; // auto copyable(meta::type_declaration& t) -> void; -#line 814 "reflect.h2" +#line 815 "reflect.h2" //----------------------------------------------------------------------- // // basic_value @@ -599,7 +600,7 @@ auto copyable(meta::type_declaration& t) -> void; // auto basic_value(meta::type_declaration& t) -> void; -#line 839 "reflect.h2" +#line 840 "reflect.h2" //----------------------------------------------------------------------- // // "A 'value' is a totally ordered basic_value..." @@ -612,13 +613,13 @@ auto basic_value(meta::type_declaration& t) -> void; // auto value(meta::type_declaration& t) -> void; -#line 855 "reflect.h2" +#line 856 "reflect.h2" auto weakly_ordered_value(meta::type_declaration& t) -> void; -#line 861 "reflect.h2" +#line 862 "reflect.h2" auto partially_ordered_value(meta::type_declaration& t) -> void; -#line 868 "reflect.h2" +#line 869 "reflect.h2" //----------------------------------------------------------------------- // // "By definition, a `struct` is a `class` in which members @@ -646,7 +647,7 @@ auto partially_ordered_value(meta::type_declaration& t) -> void; // auto cpp2_struct(meta::type_declaration& t) -> void; -#line 911 "reflect.h2" +#line 912 "reflect.h2" //----------------------------------------------------------------------- // // "C enumerations constitute a curiously half-baked concept. ... @@ -676,7 +677,7 @@ auto basic_enum( cpp2::in bitwise ) -> void; -#line 1117 "reflect.h2" +#line 1118 "reflect.h2" //----------------------------------------------------------------------- // // "An enum[...] is a totally ordered value type that stores a @@ -688,7 +689,7 @@ auto basic_enum( // auto cpp2_enum(meta::type_declaration& t) -> void; -#line 1143 "reflect.h2" +#line 1144 "reflect.h2" //----------------------------------------------------------------------- // // "flag_enum expresses an enumeration that stores values @@ -701,7 +702,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void; // auto flag_enum(meta::type_declaration& t) -> void; -#line 1175 "reflect.h2" +#line 1176 "reflect.h2" //----------------------------------------------------------------------- // // "As with void*, programmers should know that unions [...] are @@ -728,7 +729,7 @@ auto flag_enum(meta::type_declaration& t) -> void; auto cpp2_union(meta::type_declaration& t) -> void; -#line 1331 "reflect.h2" +#line 1332 "reflect.h2" //----------------------------------------------------------------------- // // print - output a pretty-printed visualization of t @@ -738,6 +739,15 @@ auto print(cpp2::in t) -> void; #line 1341 "reflect.h2" //----------------------------------------------------------------------- // +// regex - creates regular expressions from members +// +// TODO +// +auto regex_gen(meta::type_declaration& t) -> void; + +#line 1414 "reflect.h2" +//----------------------------------------------------------------------- +// // apply_metafunctions // [[nodiscard]] auto apply_metafunctions( @@ -746,7 +756,7 @@ auto print(cpp2::in t) -> void; auto const& error ) -> bool; -#line 1445 "reflect.h2" +#line 1521 "reflect.h2" } } @@ -756,12 +766,12 @@ auto print(cpp2::in t) -> void; #line 1 "reflect.h2" -#line 20 "reflect.h2" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 46 "reflect.h2" +#line 47 "reflect.h2" compiler_services::compiler_services( std::vector* errors_, @@ -771,13 +781,13 @@ namespace meta { , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*cpp2::assert_not_null(errors))) } , generated_tokens{ generated_tokens_ } , parser{ *cpp2::assert_not_null(errors) } -#line 51 "reflect.h2" +#line 52 "reflect.h2" { -#line 56 "reflect.h2" +#line 57 "reflect.h2" } -#line 60 "reflect.h2" +#line 61 "reflect.h2" auto compiler_services::set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void{ metafunction_name = name; metafunction_args = args; @@ -808,7 +818,7 @@ namespace meta { { cpp2::deferred_init> ret; -#line 89 "reflect.h2" +#line 90 "reflect.h2" auto original_source {source}; CPP2_UFCS(push_back)(generated_lines, std::vector()); @@ -823,7 +833,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); // First split this string into source_lines // -#line 101 "reflect.h2" +#line 102 "reflect.h2" if ( cpp2::cmp_greater(CPP2_UFCS(ssize)(source),1) && newline_pos != source.npos) { @@ -836,7 +846,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); } } -#line 112 "reflect.h2" +#line 113 "reflect.h2" if (!(CPP2_UFCS(empty)(source))) { std::move(add_line)(std::move(source)); } @@ -867,7 +877,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); return { }; } -#line 145 "reflect.h2" +#line 146 "reflect.h2" auto compiler_services::require( cpp2::in b, @@ -888,7 +898,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(errors)), position(), std::move(message))); } -#line 168 "reflect.h2" +#line 169 "reflect.h2" auto compiler_services::report_violation(auto const& msg) const& -> void{ error(msg); throw(std::runtime_error(" ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " - contract violation - see previous errors")); @@ -906,7 +916,7 @@ compiler_services::compiler_services(compiler_services const& that) , metafunction_args{ that.metafunction_args } , metafunctions_used{ that.metafunctions_used }{} -#line 229 "reflect.h2" +#line 230 "reflect.h2" declaration_base::declaration_base( declaration_node* n_, @@ -914,10 +924,10 @@ compiler_services::compiler_services(compiler_services const& that) ) : compiler_services{ s } , n{ n_ } -#line 234 "reflect.h2" +#line 235 "reflect.h2" { -#line 237 "reflect.h2" +#line 238 "reflect.h2" if (cpp2::Default.has_handler() && !(n) ) { cpp2::Default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); } } @@ -930,14 +940,14 @@ declaration_base::declaration_base(declaration_base const& that) : compiler_services{ static_cast(that) } , n{ that.n }{} -#line 253 "reflect.h2" +#line 254 "reflect.h2" declaration::declaration( declaration_node* n_, cpp2::in s ) : declaration_base{ n_, s } -#line 258 "reflect.h2" +#line 259 "reflect.h2" { } @@ -1003,7 +1013,7 @@ declaration_base::declaration_base(declaration_base const& that) { if (cpp2::Type.has_handler() && !(parent_is_type()) ) { cpp2::Type.report_violation(""); } -#line 322 "reflect.h2" +#line 323 "reflect.h2" auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::assert_not_null(n)))}; if (cpp2::Default.has_handler() && !(std::move(test)) ) { cpp2::Default.report_violation(""); }// ... to ensure this assert is true } @@ -1012,14 +1022,14 @@ declaration_base::declaration_base(declaration_base const& that) declaration::declaration(declaration const& that) : declaration_base{ static_cast(that) }{} -#line 335 "reflect.h2" +#line 336 "reflect.h2" function_declaration::function_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 340 "reflect.h2" +#line 341 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } @@ -1077,7 +1087,7 @@ declaration::declaration(declaration const& that) auto function_declaration::add_initializer(cpp2::in source) & -> void -#line 398 "reflect.h2" +#line 399 "reflect.h2" { if ((*this).has_handler() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); } if ((*this).has_handler() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); } @@ -1086,7 +1096,7 @@ declaration::declaration(declaration const& that) //require( parent_is_type(), // "cannot add an initializer to a function that isn't in a type scope"); -#line 404 "reflect.h2" +#line 405 "reflect.h2" auto stmt {parse_statement(source)}; if (!((cpp2::as_(stmt)))) { error("cannot add an initializer that is not a valid statement"); @@ -1099,14 +1109,14 @@ declaration::declaration(declaration const& that) function_declaration::function_declaration(function_declaration const& that) : declaration{ static_cast(that) }{} -#line 422 "reflect.h2" +#line 423 "reflect.h2" object_declaration::object_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 427 "reflect.h2" +#line 428 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } @@ -1132,14 +1142,14 @@ declaration::declaration(declaration const& that) object_declaration::object_declaration(object_declaration const& that) : declaration{ static_cast(that) }{} -#line 458 "reflect.h2" +#line 459 "reflect.h2" type_declaration::type_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 463 "reflect.h2" +#line 464 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } @@ -1229,13 +1239,13 @@ declaration::declaration(declaration const& that) [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret -#line 557 "reflect.h2" +#line 558 "reflect.h2" { cpp2::deferred_init out_this_in_that; cpp2::deferred_init out_this_move_that; cpp2::deferred_init inout_this_in_that; cpp2::deferred_init inout_this_move_that; -#line 558 "reflect.h2" +#line 559 "reflect.h2" auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::assert_not_null(n)))}; out_this_in_that.construct(declared.out_this_in_that != nullptr); out_this_move_that.construct(declared.out_this_move_that != nullptr); @@ -1265,14 +1275,14 @@ declaration::declaration(declaration const& that) type_declaration::type_declaration(type_declaration const& that) : declaration{ static_cast(that) }{} -#line 593 "reflect.h2" +#line 594 "reflect.h2" alias_declaration::alias_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 598 "reflect.h2" +#line 599 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } @@ -1281,13 +1291,13 @@ declaration::declaration(declaration const& that) alias_declaration::alias_declaration(alias_declaration const& that) : declaration{ static_cast(that) }{} -#line 617 "reflect.h2" +#line 618 "reflect.h2" auto add_virtual_destructor(meta::type_declaration& t) -> void { CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }"); } -#line 635 "reflect.h2" +#line 636 "reflect.h2" auto interface(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1314,7 +1324,7 @@ auto interface(meta::type_declaration& t) -> void } } -#line 681 "reflect.h2" +#line 682 "reflect.h2" auto polymorphic_base(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1339,7 +1349,7 @@ auto polymorphic_base(meta::type_declaration& t) -> void } } -#line 726 "reflect.h2" +#line 727 "reflect.h2" auto ordered_impl( meta::type_declaration& t, cpp2::in ordering @@ -1364,25 +1374,25 @@ auto ordered_impl( } } -#line 755 "reflect.h2" +#line 756 "reflect.h2" auto ordered(meta::type_declaration& t) -> void { ordered_impl(t, "strong_ordering"); } -#line 763 "reflect.h2" +#line 764 "reflect.h2" auto weakly_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "weak_ordering"); } -#line 771 "reflect.h2" +#line 772 "reflect.h2" auto partially_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "partial_ordering"); } -#line 793 "reflect.h2" +#line 794 "reflect.h2" auto copyable(meta::type_declaration& t) -> void { // If the user explicitly wrote any of the copy/move functions, @@ -1404,7 +1414,7 @@ auto copyable(meta::type_declaration& t) -> void }} } -#line 821 "reflect.h2" +#line 822 "reflect.h2" auto basic_value(meta::type_declaration& t) -> void { CPP2_UFCS(copyable)(t); @@ -1423,7 +1433,7 @@ auto basic_value(meta::type_declaration& t) -> void } } -#line 849 "reflect.h2" +#line 850 "reflect.h2" auto value(meta::type_declaration& t) -> void { CPP2_UFCS(ordered)(t); @@ -1442,7 +1452,7 @@ auto partially_ordered_value(meta::type_declaration& t) -> void CPP2_UFCS(basic_value)(t); } -#line 893 "reflect.h2" +#line 894 "reflect.h2" auto cpp2_struct(meta::type_declaration& t) -> void { for ( auto& m : CPP2_UFCS(get_members)(t) ) @@ -1460,7 +1470,7 @@ auto cpp2_struct(meta::type_declaration& t) -> void CPP2_UFCS(disable_member_function_generation)(t); } -#line 934 "reflect.h2" +#line 935 "reflect.h2" auto basic_enum( meta::type_declaration& t, auto const& nextval, @@ -1485,7 +1495,7 @@ auto basic_enum( { std::string value = "-1"; -#line 957 "reflect.h2" +#line 958 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) if ( CPP2_UFCS(is_member_object)(m)) @@ -1523,7 +1533,7 @@ std::string value = "-1"; } } -#line 993 "reflect.h2" +#line 994 "reflect.h2" if ((CPP2_UFCS(empty)(enumerators))) { CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value"); return ; @@ -1569,7 +1579,7 @@ std::string value = "-1"; } } -#line 1039 "reflect.h2" +#line 1040 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents // // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' @@ -1617,7 +1627,7 @@ std::string to_string = " to_string: (this) -> std::string = { \n"; // Provide a 'to_string' function to print enumerator name(s) -#line 1084 "reflect.h2" +#line 1085 "reflect.h2" { if (bitwise) { to_string += " _ret : std::string = \"(\";\n"; @@ -1649,10 +1659,10 @@ std::string to_string = " to_string: (this) -> std::string = { \n"; CPP2_UFCS(add_member)(t, std::move(to_string)); } } -#line 1114 "reflect.h2" +#line 1115 "reflect.h2" } -#line 1126 "reflect.h2" +#line 1127 "reflect.h2" auto cpp2_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with an incrementing value generator @@ -1669,7 +1679,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void ); } -#line 1153 "reflect.h2" +#line 1154 "reflect.h2" auto flag_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with a power-of-two value generator @@ -1691,7 +1701,7 @@ auto flag_enum(meta::type_declaration& t) -> void ); } -#line 1199 "reflect.h2" +#line 1200 "reflect.h2" auto cpp2_union(meta::type_declaration& t) -> void { std::vector alternatives {}; @@ -1700,7 +1710,7 @@ auto value = 0; // 1. Gather: All the user-written members, and find/compute the max size -#line 1206 "reflect.h2" +#line 1207 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) { do @@ -1725,7 +1735,7 @@ auto value = 0; } while (false); ++value; } } -#line 1229 "reflect.h2" +#line 1230 "reflect.h2" std::string discriminator_type {}; if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { discriminator_type = "i8"; @@ -1740,7 +1750,7 @@ auto value = 0; discriminator_type = "i64"; }}} -#line 1244 "reflect.h2" +#line 1245 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents CPP2_UFCS(remove_marked_members)(t); @@ -1749,12 +1759,12 @@ std::string storage = " _storage: cpp2::aligned_storage t) -> void { std::cout << CPP2_UFCS(print)(t) << "\n"; } -#line 1345 "reflect.h2" +#line 1347 "reflect.h2" +auto regex_gen(meta::type_declaration& t) -> void +{ + bool has_default {false}; + std::map expressions {}; + + for ( auto& m : CPP2_UFCS(get_member_objects)(t) ) + { + std::string name {CPP2_UFCS(name)(m)}; + std::string prefix {"regex"}; + + if (CPP2_UFCS(starts_with)(name, prefix)) { + + if (!(CPP2_UFCS(has_initializer)(m))) { + CPP2_UFCS(error)(t, "Regular expression must have an initializer."); + } + CPP2_UFCS(mark_for_removal_from_enclosing_type)(m); + + name = CPP2_UFCS(substr)(name, CPP2_UFCS(size)(prefix)); + + if (CPP2_UFCS(starts_with)(name, "_")) { + name = CPP2_UFCS(substr)(name, 1); + } + + if (CPP2_UFCS(empty)(name)) { + if (has_default) { + CPP2_UFCS(error)(t, "Type can only contain one default named regular expression."); + } + has_default = true; + } + + std::string expr {CPP2_UFCS(initializer)(m)}; + if (!((CPP2_UFCS(starts_with)(expr, "\"") && CPP2_UFCS(ends_with)(expr, "")))) { + CPP2_UFCS(error)(t, "Unknown string format '" + cpp2::to_string(expr) + "'"); + } + expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2); + + CPP2_ASSERT_IN_BOUNDS(expressions, name) = expr; + } + +#line 1387 "reflect.h2" + CPP2_UFCS(require)(m, CPP2_UFCS(make_public)(m), + "all struct members must be public"); + if (CPP2_UFCS(is_function)(m)) { + auto mf {CPP2_UFCS(as_function)(m)}; + CPP2_UFCS(require)(t, !(CPP2_UFCS(is_virtual)(mf)), + "a struct may not have a virtual function"); + CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(mf, "operator=")), + "a struct may not have a user-defined operator="); + } + } + + CPP2_UFCS(remove_marked_members)(t); + + for ( auto const& expr : expressions ) { + std::string regular_expression {::cpp2::regex::generate_template(expr.second)}; + + std::string name {expr.first}; + if (!(CPP2_UFCS(empty)(name))) { + name = "_" + name; + } + + CPP2_UFCS(add_member)(t, "regex" + cpp2::to_string(name) + ": type == " + cpp2::to_string(regular_expression) + ";"); + CPP2_UFCS(add_member)(t, "match" + cpp2::to_string(name) + ": (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); return regex" + cpp2::to_string(name) + "::match(str, ctx).matched; }"); + } +} + +#line 1418 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -1938,11 +2015,14 @@ auto print(cpp2::in t) -> void else {if (name == "print") { print(rtype); } + else {if (name == "regex") { + regex_gen(rtype); + } else { error("unrecognized metafunction name: " + name); - error("(temporary alpha limitation) currently the supported names are: interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, struct, enum, flag_enum, union, print"); + error("(temporary alpha limitation) currently the supported names are: interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, struct, enum, flag_enum, union, print, regex"); return false; - }}}}}}}}}}}}}}} + }}}}}}}}}}}}}}}} if (( !(CPP2_UFCS(empty)(args)) @@ -1957,7 +2037,7 @@ auto print(cpp2::in t) -> void return true; } -#line 1445 "reflect.h2" +#line 1521 "reflect.h2" } } diff --git a/source/reflect.h2 b/source/reflect.h2 index 072087e9a1..3b077374a7 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -16,6 +16,7 @@ //=========================================================================== #include "parse.h" +#include "regex.h" cpp2: namespace = { @@ -1337,6 +1338,78 @@ print: (t: meta::type_declaration) = std::cout << t.print() << "\n"; } +//----------------------------------------------------------------------- +// +// regex - creates regular expressions from members +// +// TODO +// +regex_gen: (inout t: meta::type_declaration) = +{ + has_default: bool = false; + expressions: std::map = (); + + for t.get_member_objects() do (inout m) + { + name: std::string = m.name(); + prefix: std::string = "regex"; + + if name.starts_with(prefix) { + + if !m.has_initializer() { + t.error("Regular expression must have an initializer."); + } + m.mark_for_removal_from_enclosing_type(); + + name = name.substr(prefix.size()); + + if name.starts_with("_") { + name = name.substr(1); + } + + if name.empty() { + if has_default { + t.error("Type can only contain one default named regular expression."); + } + has_default = true; + } + + expr: std::string = m.initializer(); + if !(expr.starts_with("\"") && expr.ends_with("")) { + t.error("Unknown string format '(expr)$'"); + } + expr = expr.substr(1, expr.size() - 2); + + expressions[name] = expr; + } + + + m.require( m.make_public(), + "all struct members must be public"); + if m.is_function() { + mf := m.as_function(); + t.require( !mf.is_virtual(), + "a struct may not have a virtual function"); + t.require( !mf.has_name("operator="), + "a struct may not have a user-defined operator="); + } + } + + t.remove_marked_members(); + + for expressions do (expr) { + regular_expression: std::string = ::cpp2::regex::generate_template(expr.second); + + name: std::string = expr.first; + if !name.empty() { + name = "_" + name; + } + + t.add_member("regex(name)$: type == (regular_expression)$;"); + t.add_member("match(name)$: (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); return regex(name)$::match(str, ctx).matched; }"); + } +} + //----------------------------------------------------------------------- // @@ -1422,9 +1495,12 @@ apply_metafunctions: ( else if name == "print" { print( rtype ); } + else if name == "regex" { + regex_gen( rtype ); + } else { error( "unrecognized metafunction name: " + name ); - error( "(temporary alpha limitation) currently the supported names are: interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, struct, enum, flag_enum, union, print" ); + error( "(temporary alpha limitation) currently the supported names are: interface, polymorphic_base, ordered, weakly_ordered, partially_ordered, copyable, basic_value, value, weakly_ordered_value, partially_ordered_value, struct, enum, flag_enum, union, print, regex" ); return false; } diff --git a/source/regex.h b/source/regex.h new file mode 100644 index 0000000000..2fc5eef2c9 --- /dev/null +++ b/source/regex.h @@ -0,0 +1,234 @@ + +#ifndef REGEX_H_CPP2 +#define REGEX_H_CPP2 + + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "regex.h2" + +#line 13 "regex.h2" +namespace cpp2 { + +namespace regex { + +#line 20 "regex.h2" +class list_end; + +class match_return; + +#line 37 "regex.h2" +template class match_context; + +#line 49 "regex.h2" +template class any_matcher_logic; + +#line 55 "regex.h2" +template class char_matcher_logic; + +#line 61 "regex.h2" +template class list_matcher_logic; + +#line 120 "regex.h2" +} +} + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "regex.h2" + +// Copyright (c) Herb Sutter +// SPDX-License-Identifier: CC-BY-NC-ND-4.0 + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +#line 13 "regex.h2" +namespace cpp2 { + +namespace regex { + +template using view = std::basic_string_view; +template using bstring = std::basic_string; + +class list_end { + public: list_end() = default; + public: list_end(list_end const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(list_end const&) -> void = delete; +}; +#line 21 "regex.h2" + +class match_return + { + public: bool matched {false}; + public: size_t length {0}; + + public: [[nodiscard]] static auto create(auto const& m, auto const& l) -> match_return; + +#line 35 "regex.h2" +}; + +template class match_context + { + + private: std::array,max_groups> groups; + public: match_context() = default; + public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(match_context const&) -> void = delete; + + +#line 42 "regex.h2" +}; + +/*regular_expression: @interface type = { + + match: (str: view, inout ctx: Ctx) -> bool; +}*/ + +template class any_matcher_logic + { + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + public: [[nodiscard]] static auto to_string() -> bstring; + public: any_matcher_logic() = default; + public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(any_matcher_logic const&) -> void = delete; + +#line 53 "regex.h2" +}; + +template class char_matcher_logic + { + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + public: [[nodiscard]] static auto to_string() -> bstring; + public: char_matcher_logic() = default; + public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(char_matcher_logic const&) -> void = delete; + +#line 59 "regex.h2" +}; + +template class list_matcher_logic + { + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + +#line 67 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + +#line 71 "regex.h2" + private: template [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; + +#line 90 "regex.h2" + private: [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; + public: list_matcher_logic() = default; + public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(list_matcher_logic const&) -> void = delete; + + +#line 94 "regex.h2" +}; + +[[nodiscard]] auto generate_template(cpp2::in regex) -> std::string; + +#line 120 "regex.h2" +} +} + + +//=== Cpp2 function definitions ================================================= + +#line 1 "regex.h2" + +#line 13 "regex.h2" +namespace cpp2 { + +namespace regex { + +#line 27 "regex.h2" + [[nodiscard]] auto match_return::create(auto const& m, auto const& l) -> match_return{ + if (m) { + return { true, l }; + } + else { + return { false, 0 }; + } + } + +#line 51 "regex.h2" + template [[nodiscard]] auto any_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)), 1); } + template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } + +#line 57 "regex.h2" + template [[nodiscard]] auto char_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)) && CPP2_UFCS(front)(str) == C, 1); } + template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } + +#line 63 "regex.h2" + template [[nodiscard]] auto list_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ + return match_all(str, ctx); + } + + template [[nodiscard]] auto list_matcher_logic::to_string() -> bstring{ + return { (bstring() + ... + List::to_string()) }; + } + + template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in> str, auto& ctx) -> match_return{ + match_return r {First::match(str, ctx)}; + + if (r.matched) { + if constexpr (0 != sizeof...(Other)) { + match_return o {match_all(CPP2_UFCS(substr)(str, 1), ctx)}; + + if (o.matched) { + r.length += std::move(o).length; + } + else { + r = { false, 0 }; + } + } + } + + return r; + } + + template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in> str, auto& ctx) -> match_return{ + // TODO: Assert End == list_end + return { true, 0 }; + } + +#line 96 "regex.h2" +[[nodiscard]] auto generate_template(cpp2::in regex) -> std::string{ + std::string template_expression {""}; + std::string seperator {""}; + + template_expression += "::cpp2::regex::list_matcher_logic"; + } + + seperator = ", "; + } + template_expression += ">"; + + return template_expression; + +#line 118 "regex.h2" +} + +} +} + +#endif diff --git a/source/regex.h2 b/source/regex.h2 new file mode 100644 index 0000000000..25ffb905e4 --- /dev/null +++ b/source/regex.h2 @@ -0,0 +1,121 @@ + +// Copyright (c) Herb Sutter +// SPDX-License-Identifier: CC-BY-NC-ND-4.0 + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +cpp2: namespace = { + +regex: namespace = { + +view: type == std::basic_string_view; +bstring: type == std::basic_string; + +list_end: type = {} + +match_return: @struct type = +{ + matched: bool = false; + length: size_t = 0; + + create: (m, l) -> match_return = { + if m { + return (true, l); + } + else { + return (false, 0); + } + } +} + +match_context: type = +{ + + groups: std::array, max_groups>; + +} + +/*regular_expression: @interface type = { + + match: (str: view, inout ctx: Ctx) -> bool; +}*/ + +any_matcher_logic: type = +{ + match: (str: view, inout ctx: _) -> match_return = match_return::create(!str.empty(), 1); + to_string: () -> bstring = bstring(1, '.'); +} + +char_matcher_logic: type = +{ + match: (str: view, inout ctx: _) -> match_return = match_return::create(!str.empty() && str.front() == C, 1); + to_string: () -> bstring = bstring(1, C); +} + +list_matcher_logic: type = +{ + match: (str: view, inout ctx: _) -> match_return = { + return match_all(str, ctx); + } + + to_string: () -> bstring = { + return (bstring() + ... + List::to_string()); + } + + private match_all: (str: view, inout ctx: _) -> match_return = { + r: match_return = First::match(str, ctx); + + if r.matched { + if constexpr 0 != sizeof...(Other) { + o: match_return = match_all(str.substr(1), ctx); + + if o.matched { + r.length += o.length; + } + else { + r = (false, 0); + } + } + } + + return r; + } + + private match_all: (str: view, inout ctx: _) -> match_return = { + // TODO: Assert End == list_end + return (true, 0); + } +} + +generate_template: (regex: std::string_view) -> std::string = { + template_expression: std::string = ""; + seperator: std::string = ""; + + template_expression += "::cpp2::regex::list_matcher_logic Date: Thu, 21 Dec 2023 20:24:23 +0100 Subject: [PATCH 003/161] Current working status. --- source/reflect.h | 2 +- source/reflect.h2 | 2 +- source/regex.h | 402 ++++++++++++++++++++++++++++++++++++++++------ source/regex.h2 | 265 +++++++++++++++++++++++++++--- 4 files changed, 599 insertions(+), 72 deletions(-) diff --git a/source/reflect.h b/source/reflect.h index d6c8210efc..6186ef7e7e 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -1922,7 +1922,7 @@ auto regex_gen(meta::type_declaration& t) -> void CPP2_UFCS(remove_marked_members)(t); for ( auto const& expr : expressions ) { - std::string regular_expression {::cpp2::regex::generate_template(expr.second)}; + std::string regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; // TODO: Lambda capture. std::string name {expr.first}; if (!(CPP2_UFCS(empty)(name))) { diff --git a/source/reflect.h2 b/source/reflect.h2 index 3b077374a7..e8769b4549 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -1398,7 +1398,7 @@ regex_gen: (inout t: meta::type_declaration) = t.remove_marked_members(); for expressions do (expr) { - regular_expression: std::string = ::cpp2::regex::generate_template(expr.second); + regular_expression: std::string = ::cpp2::regex::generate_template(expr.second, :(message: _) = t$.error(message);); name: std::string = expr.first; if !name.empty() { diff --git a/source/regex.h b/source/regex.h index 2fc5eef2c9..9dd0e792f5 100644 --- a/source/regex.h +++ b/source/regex.h @@ -10,29 +10,43 @@ #line 1 "regex.h2" -#line 13 "regex.h2" +#line 56 "regex.h2" namespace cpp2 { namespace regex { -#line 20 "regex.h2" +#line 63 "regex.h2" class list_end; class match_return; -#line 37 "regex.h2" +#line 80 "regex.h2" template class match_context; -#line 49 "regex.h2" +#line 92 "regex.h2" template class any_matcher_logic; -#line 55 "regex.h2" +#line 98 "regex.h2" template class char_matcher_logic; -#line 61 "regex.h2" +#line 104 "regex.h2" template class list_matcher_logic; -#line 120 "regex.h2" +#line 134 "regex.h2" +template class group_matcher_logic; + + +#line 146 "regex.h2" +template class range_matcher_logic; + +#line 183 "regex.h2" +template class star_matcher_logic; + + +#line 190 "regex.h2" +template class regex_parser; + +#line 347 "regex.h2" } } @@ -52,7 +66,50 @@ template class list_matcher_logic; // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#line 13 "regex.h2" +// From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring + +// trim from start (in place) +static inline void ltrim(std::string &s) { + s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { + return !std::isspace(ch); + })); +} + +// trim from end (in place) +static inline void rtrim(std::string &s) { + s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { + return !std::isspace(ch); + }).base(), s.end()); +} + +// trim from both ends (in place) +static inline void trim(std::string &s) { + rtrim(s); + ltrim(s); +} + +// trim from start (copying) +static inline std::string ltrim_copy(std::string_view s) { + std::string t(s); + ltrim(t); + return t; +} + +// trim from end (copying) +static inline std::string rtrim_copy(std::string_view s) { + std::string t(s); + rtrim(t); + return t; +} + +// trim from both ends (copying) +static inline std::string trim_copy(std::string_view s) { + std::string t(s); + trim(t); + return t; +} + +#line 56 "regex.h2" namespace cpp2 { namespace regex { @@ -65,7 +122,7 @@ class list_end { public: list_end(list_end const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_end const&) -> void = delete; }; -#line 21 "regex.h2" +#line 64 "regex.h2" class match_return { @@ -74,19 +131,14 @@ class match_return public: [[nodiscard]] static auto create(auto const& m, auto const& l) -> match_return; -#line 35 "regex.h2" +#line 78 "regex.h2" }; template class match_context { - private: std::array,max_groups> groups; - public: match_context() = default; - public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(match_context const&) -> void = delete; + public: std::array,max_groups> groups; - -#line 42 "regex.h2" }; /*regular_expression: @interface type = { @@ -102,7 +154,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 53 "regex.h2" +#line 96 "regex.h2" }; template class char_matcher_logic @@ -113,32 +165,114 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 59 "regex.h2" +#line 102 "regex.h2" }; template class list_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; -#line 67 "regex.h2" +#line 110 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; -#line 71 "regex.h2" +#line 114 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; - -#line 90 "regex.h2" - private: [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 94 "regex.h2" +#line 132 "regex.h2" }; -[[nodiscard]] auto generate_template(cpp2::in regex) -> std::string; +template class group_matcher_logic { + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + +#line 143 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + public: group_matcher_logic() = default; + public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_matcher_logic const&) -> void = delete; + +#line 144 "regex.h2" +}; + +template class range_matcher_logic { + + // TODO: Add static assert on min_count and max_count. + + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; -#line 120 "regex.h2" +#line 163 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + public: range_matcher_logic() = default; + public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_matcher_logic const&) -> void = delete; + + +#line 181 "regex.h2" +}; + +template class star_matcher_logic: public range_matcher_logic::max()> { + +#line 186 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + public: star_matcher_logic() = default; + public: star_matcher_logic(star_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(star_matcher_logic const&) -> void = delete; + +#line 187 "regex.h2" +}; + +#line 190 "regex.h2" +template class regex_parser { + + private: std::string_view regex; + private: std::vector list {}; + private: size_t pos {0}; + + private: size_t named_groups {1}; // Global capture group. + + private: Error_out error_out; + + public: explicit regex_parser(cpp2::in r, Error_out const& e); + +#line 205 "regex.h2" + public: [[nodiscard]] static auto create_list_matcher(cpp2::in> elements) -> std::string; + +#line 218 "regex.h2" + public: auto error(cpp2::in message) & -> void; + +#line 222 "regex.h2" + public: [[nodiscard]] auto get_back() & -> std::string; + +#line 228 "regex.h2" + public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; + +#line 236 "regex.h2" + public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; + +#line 259 "regex.h2" + public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; + +#line 302 "regex.h2" + public: [[nodiscard]] auto is_star(cpp2::in c) & -> bool; + +#line 315 "regex.h2" + public: auto parse_until(cpp2::in term) & -> void; + +#line 331 "regex.h2" + public: [[nodiscard]] auto parse() & -> std::string; + public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regex_parser const&) -> void = delete; + + +#line 338 "regex.h2" +}; + +template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; + +#line 347 "regex.h2" } } @@ -147,12 +281,12 @@ template class list_matcher_logic #line 1 "regex.h2" -#line 13 "regex.h2" +#line 56 "regex.h2" namespace cpp2 { namespace regex { -#line 27 "regex.h2" +#line 70 "regex.h2" [[nodiscard]] auto match_return::create(auto const& m, auto const& l) -> match_return{ if (m) { return { true, l }; @@ -162,15 +296,15 @@ namespace regex { } } -#line 51 "regex.h2" +#line 94 "regex.h2" template [[nodiscard]] auto any_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 57 "regex.h2" +#line 100 "regex.h2" template [[nodiscard]] auto char_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)) && CPP2_UFCS(front)(str) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 63 "regex.h2" +#line 106 "regex.h2" template [[nodiscard]] auto list_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ return match_all(str, ctx); } @@ -184,7 +318,7 @@ namespace regex { if (r.matched) { if constexpr (0 != sizeof...(Other)) { - match_return o {match_all(CPP2_UFCS(substr)(str, 1), ctx)}; + match_return o {match_all(CPP2_UFCS(substr)(str, r.length), ctx)}; if (o.matched) { r.length += std::move(o).length; @@ -198,34 +332,200 @@ namespace regex { return r; } - template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in> str, auto& ctx) -> match_return{ - // TODO: Assert End == list_end - return { true, 0 }; +#line 135 "regex.h2" + template [[nodiscard]] auto group_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ + match_return r {M::match(str, ctx)}; + + if (r.matched) { + CPP2_ASSERT_IN_BOUNDS(ctx.groups, group) = CPP2_UFCS(substr)(str, 0, r.length); + } + return r; } + template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } -#line 96 "regex.h2" -[[nodiscard]] auto generate_template(cpp2::in regex) -> std::string{ - std::string template_expression {""}; - std::string seperator {""}; +#line 150 "regex.h2" + template [[nodiscard]] auto range_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ + match_return r {true, 0}; + match_return o {true, 0}; + + int count {-1}; // First while is always true + + for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(CPP2_UFCS(substr)(str, r.length), ctx) ) { + r.length += o.length; + count += 1; + } + + return match_return::create(cpp2::cmp_greater_eq(std::move(count),min_count), std::move(r).length); + } + template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ + std::string r {M::to_string()}; + + if (min_count == max_count) { + r += "{" + cpp2::to_string(min_count) + "}"; + } + else {if (min_count == 0) { + r += "{," + cpp2::to_string(max_count) + "}"; + } + else {if (max_count == std::numeric_limits::max()) { + r += "(" + cpp2::to_string(min_count) + ",}"; + } + else { + r += "{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"; + }}} + + return r; + } + +#line 186 "regex.h2" + template [[nodiscard]] auto star_matcher_logic::to_string() -> bstring { return M::to_string() + "*"; } + +#line 200 "regex.h2" + template regex_parser::regex_parser(cpp2::in r, Error_out const& e) + : regex{ r } + , error_out{ e }{ + +#line 203 "regex.h2" + } + + template [[nodiscard]] auto regex_parser::create_list_matcher(cpp2::in> elements) -> std::string{ + std::string template_expression {"::cpp2::regex::list_matcher_logic auto regex_parser::error(cpp2::in message) & -> void{ + error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)); + } + + template [[nodiscard]] auto regex_parser::get_back() & -> std::string{ + auto b {CPP2_UFCS(back)(list)}; + CPP2_UFCS(pop_back)(list); + return b; + } + + template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ + if (c == '.') { + CPP2_UFCS(push_back)(list, "::cpp2::regex::any_matcher_logic"); + return true; + } + return false; + } + + template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ + if (c != '(') {return false; } + + auto group_number {named_groups}; + named_groups += 1; + + // Create a new global list. + std::vector cur_list {}; + std::swap(cur_list, list); + + pos += 1; // Skip the '(' + parse_until(')'); + + // Restore the old global list. + std::swap(cur_list, list); + + auto inner {create_list_matcher(std::move(cur_list))}; + + CPP2_UFCS(push_back)(list, "::cpp2::regex::group_matcher_logic"); + + return true; + } + + template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ + + if (c != '{') {return false; } + if (CPP2_UFCS(empty)(list)) {error("'{' without previous element."); } + + size_t end {CPP2_UFCS(find)(regex, "}", pos)}; + if (end == std::string::npos) {error("Missing closing bracket."); } + + std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; + if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } - template_expression += "::cpp2::regex::list_matcher_logic::max()"}; - for ( auto const& c : regex ) { - template_expression += seperator; - if (c == '.') { - template_expression += "::cpp2::regex::any_matcher_logic"; + size_t sep {CPP2_UFCS(find)(inner, ",")}; + if (sep == std::string::npos) { + min_count = inner; + max_count = std::move(inner); + } + else { + std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; + std::string inner_last {trim_copy(CPP2_UFCS(substr)(std::move(inner), std::move(sep) + 1))}; + + if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) { + error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); + } + + if (!(CPP2_UFCS(empty)(inner_first))) { + min_count = std::move(inner_first); + } + if (!(CPP2_UFCS(empty)(inner_last))) { + max_count = std::move(inner_last); + } + } + + // TODO: Check 0 <=n <= m + auto inner_matcher {get_back()}; + CPP2_UFCS(push_back)(list, "::cpp2::regex::range_matcher_logic"); + pos = std::move(end); + + return true; } - else { - template_expression += "::cpp2::regex::char_matcher_logic"; + + template [[nodiscard]] auto regex_parser::is_star(cpp2::in c) & -> bool{ + if (c == '*') { + if (CPP2_UFCS(empty)(list)) { + error("'*' without previous element."); + } + auto inner {get_back()}; + CPP2_UFCS(push_back)(list, "::cpp2::regex::star_matcher_logic"); + + return true; + } + return false; } - seperator = ", "; - } - template_expression += ">"; + template auto regex_parser::parse_until(cpp2::in term) & -> void{ + for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) { + char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; + + if (c == term) {return ; } - return template_expression; + if (is_any(c)) {continue; } + if (is_range(c)) {continue; } + if (is_star(c)) {continue; } + if (is_group(c)) {continue; } + + // No special char push a character match + CPP2_UFCS(push_back)(list, "::cpp2::regex::char_matcher_logic"); + } + } + + template [[nodiscard]] auto regex_parser::parse() & -> std::string{ + + parse_until('\0'); + + return create_list_matcher(list); + } -#line 118 "regex.h2" +#line 340 "regex.h2" +template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ + regex_parser parser {regex, err}; + auto r {CPP2_UFCS(parse)(parser)}; + static_cast(std::move(parser)); + return r; } } diff --git a/source/regex.h2 b/source/regex.h2 index 25ffb905e4..98987ef70b 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -10,6 +10,49 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +// From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring + +// trim from start (in place) +static inline void ltrim(std::string &s) { + s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { + return !std::isspace(ch); + })); +} + +// trim from end (in place) +static inline void rtrim(std::string &s) { + s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { + return !std::isspace(ch); + }).base(), s.end()); +} + +// trim from both ends (in place) +static inline void trim(std::string &s) { + rtrim(s); + ltrim(s); +} + +// trim from start (copying) +static inline std::string ltrim_copy(std::string_view s) { + std::string t(s); + ltrim(t); + return t; +} + +// trim from end (copying) +static inline std::string rtrim_copy(std::string_view s) { + std::string t(s); + rtrim(t); + return t; +} + +// trim from both ends (copying) +static inline std::string trim_copy(std::string_view s) { + std::string t(s); + trim(t); + return t; +} + cpp2: namespace = { regex: namespace = { @@ -34,7 +77,7 @@ match_return: @struct type = } } -match_context: type = +match_context: @struct type = { groups: std::array, max_groups>; @@ -73,7 +116,7 @@ list_matcher_logic: type = if r.matched { if constexpr 0 != sizeof...(Other) { - o: match_return = match_all(str.substr(1), ctx); + o: match_return = match_all(str.substr(r.length), ctx); if o.matched { r.length += o.length; @@ -86,35 +129,219 @@ list_matcher_logic: type = return r; } +} + +group_matcher_logic: type = { + match: (str: view, inout ctx: _) -> match_return = { + r: match_return = M::match(str, ctx); - private match_all: (str: view, inout ctx: _) -> match_return = { - // TODO: Assert End == list_end - return (true, 0); + if r.matched { + ctx.groups[group] = str.substr(0, r.length); + } + return r; } + to_string: () -> bstring = "((M::to_string())$)"; } -generate_template: (regex: std::string_view) -> std::string = { - template_expression: std::string = ""; - seperator: std::string = ""; +range_matcher_logic: type = { - template_expression += "::cpp2::regex::list_matcher_logic, inout ctx: _) -> match_return = { + r: match_return = (true, 0); + o: match_return = (true, 0); + + count: int = -1; // First while is always true + + while (o.matched && count < max_count) next o = M::match(str.substr(r.length), ctx) { + r.length += o.length; + count += 1; + } + + return match_return::create(count >= min_count, r.length); } - else { - template_expression += "::cpp2::regex::char_matcher_logic"; + to_string: () -> bstring = { + r: std::string = M::to_string(); + + if min_count == max_count { + r += "{(min_count)$}"; + } + else if min_count == 0 { + r += "{,(max_count)$}"; + } + else if max_count == std::numeric_limits::max() { + r += "((min_count)$,}"; + } + else { + r += "{(min_count)$,(max_count)$}"; + } + + return r; + } +} + +star_matcher_logic: type = { + this: range_matcher_logic::max()> = (); + + to_string: () -> bstring = M::to_string() + "*"; +} + + +regex_parser: type = { + + regex: std::string_view; + list: std::vector = (); + pos: size_t = 0; + + named_groups: size_t = 1; // Global capture group. + + error_out: Error_out; + + operator=: (out this, r: std::string_view, e: Error_out) = { + this.regex = r; + this.error_out = e; } - seperator = ", "; - } - template_expression += ">"; + create_list_matcher: (elements: std::vector) -> std::string = { + template_expression: std::string = "::cpp2::regex::list_matcher_logic std::string = { + b:= list.back(); + list.pop_back(); + return b; + } + + is_any: (inout this, c: char) -> bool = { + if c == '.' { + list.push_back("::cpp2::regex::any_matcher_logic"); + return true; + } + return false; + } + + is_group: (inout this, c: char) -> bool = { + if c != '(' { return false; } + + group_number := named_groups; + named_groups += 1; + + // Create a new global list. + cur_list: std::vector = (); + std::swap(cur_list, list); + + pos += 1; // Skip the '(' + parse_until(')'); + + // Restore the old global list. + std::swap(cur_list, list); + + inner:= create_list_matcher(cur_list); + + list.push_back("::cpp2::regex::group_matcher_logic"); + + return true; + } + + is_range: (inout this, c: char) -> bool = { + + if c != '{' { return false; } + if list.empty() { error("'{' without previous element."); } + + end: size_t = regex.find("}", pos); + if end == std::string::npos { error("Missing closing bracket."); } + + inner: std::string = trim_copy(regex.substr(pos + 1, end - pos - 1)); + if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } + + min_count: std::string = "0"; + max_count: std::string = "std::numeric_limits::max()"; + + sep: size_t = inner.find(","); + if sep == std::string::npos { + min_count = inner; + max_count = inner; + } + else { + inner_first: std::string = trim_copy(inner.substr(0, sep)); + inner_last: std::string = trim_copy(inner.substr(sep + 1)); + + if (inner_first.empty() && inner_last.empty()) { + error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); + } + + if !inner_first.empty() { + min_count = inner_first; + } + if !inner_last.empty() { + max_count = inner_last; + } + } + + // TODO: Check 0 <=n <= m + inner_matcher: = get_back(); + list.push_back("::cpp2::regex::range_matcher_logic"); + pos = end; + + return true; + } + + is_star: (inout this, c: char) -> bool = { + if c == '*' { + if list.empty() { + error("'*' without previous element."); + } + inner:= get_back(); + list.push_back("::cpp2::regex::star_matcher_logic"); + + return true; + } + return false; + } + + parse_until:(inout this, term: char) = { + while pos != regex.size() next pos += 1 { + c: char = regex[pos]; + + if c == term { return; } + + if is_any(c) { continue; } + if is_range(c) { continue; } + if is_star(c) { continue; } + if is_group(c) { continue; } + + // No special char push a character match + list.push_back("::cpp2::regex::char_matcher_logic"); + } + } + + parse:(inout this) -> std::string = { + + parse_until('\0'); + + return create_list_matcher(list); + } + +} +generate_template: (regex: std::string_view, err: Err) -> std::string = { + parser: regex_parser = (regex, err); + r := parser.parse(); + _ = parser; + return r; } } From d7abbf73220912585886569cb440b624a8b2501a Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 27 Dec 2023 14:02:36 +0100 Subject: [PATCH 004/161] Handling of groups. --- source/reflect.h | 2 +- source/regex.h | 141 +++++++++++++++++++++++++++++++++-------------- source/regex.h2 | 68 ++++++++++++++++++----- 3 files changed, 156 insertions(+), 55 deletions(-) diff --git a/source/reflect.h b/source/reflect.h index 6186ef7e7e..9c7b84dde7 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -1922,7 +1922,7 @@ auto regex_gen(meta::type_declaration& t) -> void CPP2_UFCS(remove_marked_members)(t); for ( auto const& expr : expressions ) { - std::string regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; // TODO: Lambda capture. + std::string regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; std::string name {expr.first}; if (!(CPP2_UFCS(empty)(name))) { diff --git a/source/regex.h b/source/regex.h index 9dd0e792f5..f1215c1315 100644 --- a/source/regex.h +++ b/source/regex.h @@ -37,16 +37,20 @@ template class group_matcher_logic; #line 146 "regex.h2" +template class group_ref_matcher_logic; + + +#line 152 "regex.h2" template class range_matcher_logic; -#line 183 "regex.h2" -template class star_matcher_logic; +#line 189 "regex.h2" +template class special_range_matcher_logic; -#line 190 "regex.h2" +#line 196 "regex.h2" template class regex_parser; -#line 347 "regex.h2" +#line 389 "regex.h2" } } @@ -197,82 +201,96 @@ template class group_matcher_logic { #line 144 "regex.h2" }; +template class group_ref_matcher_logic { + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + + public: [[nodiscard]] static auto to_string() -> bstring; + public: group_ref_matcher_logic() = default; + public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_ref_matcher_logic const&) -> void = delete; + +#line 150 "regex.h2" +}; + template class range_matcher_logic { // TODO: Add static assert on min_count and max_count. public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; -#line 163 "regex.h2" +#line 169 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 181 "regex.h2" +#line 187 "regex.h2" }; -template class star_matcher_logic: public range_matcher_logic::max()> { +template class special_range_matcher_logic: public range_matcher_logic { -#line 186 "regex.h2" +#line 192 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; - public: star_matcher_logic() = default; - public: star_matcher_logic(star_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(star_matcher_logic const&) -> void = delete; + public: special_range_matcher_logic() = default; + public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 187 "regex.h2" +#line 193 "regex.h2" }; -#line 190 "regex.h2" +#line 196 "regex.h2" template class regex_parser { private: std::string_view regex; private: std::vector list {}; private: size_t pos {0}; - private: size_t named_groups {1}; // Global capture group. + private: int named_groups {1}; // Global capture group. private: Error_out error_out; public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 205 "regex.h2" +#line 211 "regex.h2" public: [[nodiscard]] static auto create_list_matcher(cpp2::in> elements) -> std::string; -#line 218 "regex.h2" +#line 224 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 222 "regex.h2" +#line 228 "regex.h2" public: [[nodiscard]] auto get_back() & -> std::string; -#line 228 "regex.h2" +#line 234 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 236 "regex.h2" +#line 242 "regex.h2" + public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; + +#line 264 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 259 "regex.h2" +#line 287 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 302 "regex.h2" - public: [[nodiscard]] auto is_star(cpp2::in c) & -> bool; +#line 330 "regex.h2" + public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 315 "regex.h2" +#line 356 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 331 "regex.h2" +#line 373 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 338 "regex.h2" +#line 380 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 347 "regex.h2" +#line 389 "regex.h2" } } @@ -343,7 +361,12 @@ namespace regex { } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } -#line 150 "regex.h2" +#line 147 "regex.h2" + template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { + return match_return::create(CPP2_UFCS(starts_with)(str, CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } + template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } + +#line 156 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; @@ -376,15 +399,15 @@ namespace regex { return r; } -#line 186 "regex.h2" - template [[nodiscard]] auto star_matcher_logic::to_string() -> bstring { return M::to_string() + "*"; } +#line 192 "regex.h2" + template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 200 "regex.h2" +#line 206 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 203 "regex.h2" +#line 209 "regex.h2" } template [[nodiscard]] auto regex_parser::create_list_matcher(cpp2::in> elements) -> std::string{ @@ -418,6 +441,28 @@ namespace regex { return false; } + template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ + if (c != '\\') {return false; } + + pos += 1; + + if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a follwoing character."); } + + char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; + + if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) { + int group_id {std::move(c_next) - '0'}; + + if (cpp2::cmp_greater_eq(group_id,named_groups)) {error("Group reference is used before the group is declared."); } + + CPP2_UFCS(push_back)(list, "::cpp2::regex::group_ref_matcher_logic"); + }else { + error("Unkonwn escape."); + } + + return true; + } + template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ if (c != '(') {return false; } @@ -484,17 +529,30 @@ namespace regex { return true; } - template [[nodiscard]] auto regex_parser::is_star(cpp2::in c) & -> bool{ + template [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{ + std::string min_range {"0"}; + std::string max_range {"std::numeric_limits::max()"}; if (c == '*') { - if (CPP2_UFCS(empty)(list)) { - error("'*' without previous element."); - } - auto inner {get_back()}; - CPP2_UFCS(push_back)(list, "::cpp2::regex::star_matcher_logic"); + min_range = "0"; + } + else {if (c == '+') { + min_range = "1"; + } + else {if (c == '?') { + min_range = "0"; + max_range = "1"; + } + else { + return false; + }}} - return true; + if (CPP2_UFCS(empty)(list)) { + error("'" + cpp2::to_string(c) + "' without previous element."); } - return false; + + auto inner {get_back()}; + CPP2_UFCS(push_back)(list, "::cpp2::regex::special_range_matcher_logic"); + return true; } template auto regex_parser::parse_until(cpp2::in term) & -> void{ @@ -505,8 +563,9 @@ namespace regex { if (is_any(c)) {continue; } if (is_range(c)) {continue; } - if (is_star(c)) {continue; } + if (is_special_range(c)) {continue; } if (is_group(c)) {continue; } + if (is_escape(c)) {continue; } // No special char push a character match CPP2_UFCS(push_back)(list, "::cpp2::regex::char_matcher_logic"); @@ -520,7 +579,7 @@ namespace regex { return create_list_matcher(list); } -#line 340 "regex.h2" +#line 382 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 98987ef70b..a2cb9663cd 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -143,6 +143,12 @@ group_matcher_logic: type = { to_string: () -> bstring = "((M::to_string())$)"; } +group_ref_matcher_logic: type = { + match: (str: view, inout ctx: _) -> match_return = + match_return::create(str.starts_with(ctx.groups[group]), ctx.groups[group].size()); + to_string: () -> bstring = "\\((group)$)"; +} + range_matcher_logic: type = { // TODO: Add static assert on min_count and max_count. @@ -180,10 +186,10 @@ range_matcher_logic: type = { } } -star_matcher_logic: type = { - this: range_matcher_logic::max()> = (); +special_range_matcher_logic: type = { + this: range_matcher_logic = (); - to_string: () -> bstring = M::to_string() + "*"; + to_string: () -> bstring = M::to_string() + symbol; } @@ -193,7 +199,7 @@ regex_parser: type = { list: std::vector = (); pos: size_t = 0; - named_groups: size_t = 1; // Global capture group. + named_groups: int = 1; // Global capture group. error_out: Error_out; @@ -233,6 +239,28 @@ regex_parser: type = { return false; } + is_escape: (inout this, c: char) -> bool = { + if c != '\\' { return false; } + + pos += 1; + + if pos >= regex.size() { error("Escape without a follwoing character."); } + + c_next: char = regex[pos]; + + if '1' <= c_next <= '9' { + group_id: int = c_next - '0'; + + if group_id >= named_groups { error("Group reference is used before the group is declared."); } + + list.push_back("::cpp2::regex::group_ref_matcher_logic"); + } else { + error("Unkonwn escape."); + } + + return true; + } + is_group: (inout this, c: char) -> bool = { if c != '(' { return false; } @@ -299,17 +327,30 @@ regex_parser: type = { return true; } - is_star: (inout this, c: char) -> bool = { + is_special_range: (inout this, c: char) -> bool = { + min_range: std::string = "0"; + max_range: std::string = "std::numeric_limits::max()"; if c == '*' { - if list.empty() { - error("'*' without previous element."); - } - inner:= get_back(); - list.push_back("::cpp2::regex::star_matcher_logic"); + min_range = "0"; + } + else if c == '+' { + min_range = "1"; + } + else if c == '?' { + min_range = "0"; + max_range = "1"; + } + else { + return false; + } - return true; + if list.empty() { + error("'(c)$' without previous element."); } - return false; + + inner:= get_back(); + list.push_back("::cpp2::regex::special_range_matcher_logic"); + return true; } parse_until:(inout this, term: char) = { @@ -320,8 +361,9 @@ regex_parser: type = { if is_any(c) { continue; } if is_range(c) { continue; } - if is_star(c) { continue; } + if is_special_range(c) { continue; } if is_group(c) { continue; } + if is_escape(c) { continue; } // No special char push a character match list.push_back("::cpp2::regex::char_matcher_logic"); From 34be3d3b16b8f435301590e6f6af7f11e6048a21 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 27 Dec 2023 14:04:33 +0100 Subject: [PATCH 005/161] Handling of alternatives. --- source/regex.h | 332 +++++++++++++++++++++++++++++++++++------------- source/regex.h2 | 159 ++++++++++++++++++----- 2 files changed, 376 insertions(+), 115 deletions(-) diff --git a/source/regex.h b/source/regex.h index f1215c1315..aec3e2f756 100644 --- a/source/regex.h +++ b/source/regex.h @@ -24,33 +24,44 @@ class match_return; template class match_context; #line 92 "regex.h2" +template class alternative_matcher_logic; + + +#line 113 "regex.h2" template class any_matcher_logic; -#line 98 "regex.h2" +#line 119 "regex.h2" template class char_matcher_logic; -#line 104 "regex.h2" +#line 125 "regex.h2" +template class empty_matcher_logic; + +#line 131 "regex.h2" template class list_matcher_logic; -#line 134 "regex.h2" +#line 161 "regex.h2" template class group_matcher_logic; -#line 146 "regex.h2" +#line 173 "regex.h2" template class group_ref_matcher_logic; + - -#line 152 "regex.h2" +#line 179 "regex.h2" template class range_matcher_logic; -#line 189 "regex.h2" +#line 216 "regex.h2" template class special_range_matcher_logic; -#line 196 "regex.h2" +#line 222 "regex.h2" +class regex_parser_state; + + +#line 252 "regex.h2" template class regex_parser; -#line 389 "regex.h2" +#line 490 "regex.h2" } } @@ -150,6 +161,19 @@ template class match_context match: (str: view, inout ctx: Ctx) -> bool; }*/ +template class alternative_matcher_logic { + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + + private: template [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; + public: alternative_matcher_logic() = default; + public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_matcher_logic const&) -> void = delete; + + +#line 111 "regex.h2" +}; + template class any_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; @@ -158,7 +182,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 96 "regex.h2" +#line 117 "regex.h2" }; template class char_matcher_logic @@ -169,36 +193,47 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 102 "regex.h2" +#line 123 "regex.h2" +}; + +template class empty_matcher_logic + { + public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: empty_matcher_logic() = default; + public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(empty_matcher_logic const&) -> void = delete; + +#line 129 "regex.h2" }; template class list_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; -#line 110 "regex.h2" +#line 137 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; -#line 114 "regex.h2" +#line 141 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 132 "regex.h2" +#line 159 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; -#line 143 "regex.h2" +#line 170 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 144 "regex.h2" +#line 171 "regex.h2" }; template class group_ref_matcher_logic { @@ -209,7 +244,7 @@ template class group_ref_matcher_logic { public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 150 "regex.h2" +#line 177 "regex.h2" }; template class range_matcher_logic { @@ -218,32 +253,51 @@ template class range_m public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; -#line 169 "regex.h2" +#line 196 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 187 "regex.h2" +#line 214 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 192 "regex.h2" +#line 219 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 193 "regex.h2" +#line 220 "regex.h2" }; -#line 196 "regex.h2" +class regex_parser_state { + public: std::vector cur_match_list {}; + public: std::vector> alternate_match_lists {}; + + public: auto start_new_list() & -> void; + +#line 232 "regex.h2" + public: auto swap(regex_parser_state& t) & -> void; + +#line 237 "regex.h2" + public: auto add(auto const& matcher) & -> void; + +#line 241 "regex.h2" + public: auto wrap_last(auto const& matcher) & -> void; + +#line 248 "regex.h2" + public: [[nodiscard]] auto empty() const& -> bool; +}; + +#line 252 "regex.h2" template class regex_parser { private: std::string_view regex; - private: std::vector list {}; + private: regex_parser_state cur_state {}; private: size_t pos {0}; private: int named_groups {1}; // Global capture group. @@ -252,45 +306,57 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 211 "regex.h2" - public: [[nodiscard]] static auto create_list_matcher(cpp2::in> elements) -> std::string; +#line 267 "regex.h2" + public: [[nodiscard]] auto new_state() & -> regex_parser_state; + +#line 273 "regex.h2" + public: auto restore_state(cpp2::in old_state) & -> void; + +#line 277 "regex.h2" + private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; + +#line 292 "regex.h2" + public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; -#line 224 "regex.h2" +#line 312 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 228 "regex.h2" - public: [[nodiscard]] auto get_back() & -> std::string; +#line 316 "regex.h2" + public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 234 "regex.h2" +#line 323 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 242 "regex.h2" +#line 331 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 264 "regex.h2" +#line 359 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 287 "regex.h2" +#line 378 "regex.h2" + public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; + +#line 387 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 330 "regex.h2" +#line 429 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 356 "regex.h2" +#line 454 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 373 "regex.h2" +#line 473 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 380 "regex.h2" +#line 481 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 389 "regex.h2" +#line 490 "regex.h2" } } @@ -314,15 +380,39 @@ namespace regex { } } -#line 94 "regex.h2" +#line 93 "regex.h2" + template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in> str, auto& ctx) -> auto { return match_all(str, ctx); } + template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. + + template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in> str, auto& ctx) -> match_return{ + match_return r {First::match(str, ctx)}; + + if (r.matched) { + return r; + } + else { + if constexpr (0 != sizeof...(Other)) { + return match_all(CPP2_UFCS(substr)(str, std::move(r).length), ctx); + } + else { + return { false, 0 }; + } + } + } + +#line 115 "regex.h2" template [[nodiscard]] auto any_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 100 "regex.h2" +#line 121 "regex.h2" template [[nodiscard]] auto char_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)) && CPP2_UFCS(front)(str) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 106 "regex.h2" +#line 127 "regex.h2" + template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in> str, auto& ctx) -> auto { return match_return(true, 0); } + template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } + +#line 133 "regex.h2" template [[nodiscard]] auto list_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ return match_all(str, ctx); } @@ -350,7 +440,7 @@ namespace regex { return r; } -#line 135 "regex.h2" +#line 162 "regex.h2" template [[nodiscard]] auto group_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ match_return r {M::match(str, ctx)}; @@ -361,12 +451,12 @@ namespace regex { } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } -#line 147 "regex.h2" - template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { +#line 174 "regex.h2" + template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(CPP2_UFCS(starts_with)(str, CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 156 "regex.h2" +#line 183 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; @@ -399,43 +489,101 @@ namespace regex { return r; } -#line 192 "regex.h2" +#line 219 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 206 "regex.h2" +#line 226 "regex.h2" + auto regex_parser_state::start_new_list() & -> void{ + std::vector new_list {}; + std::swap(new_list, cur_match_list); + CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(begin)(alternate_match_lists), std::move(new_list)); + } + + auto regex_parser_state::swap(regex_parser_state& t) & -> void{ + std::swap(cur_match_list, t.cur_match_list); + std::swap(alternate_match_lists, t.alternate_match_lists); + } + + auto regex_parser_state::add(auto const& matcher) & -> void{ + CPP2_UFCS(push_back)(cur_match_list, matcher); + } + + auto regex_parser_state::wrap_last(auto const& matcher) & -> void{ + std::string last {CPP2_UFCS(back)(cur_match_list)}; + CPP2_UFCS(back)(cur_match_list) = matcher(last); + static_cast(matcher); + static_cast(std::move(last)); + } + + [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } + +#line 262 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 209 "regex.h2" +#line 265 "regex.h2" + } + + template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ + regex_parser_state old_state {}; + CPP2_UFCS(swap)(old_state, cur_state); + return old_state; + } + + template auto regex_parser::restore_state(cpp2::in old_state) & -> void{ + cur_state = old_state; } - template [[nodiscard]] auto regex_parser::create_list_matcher(cpp2::in> elements) -> std::string{ - std::string template_expression {"::cpp2::regex::list_matcher_logic [[nodiscard]] auto regex_parser::create_matcher_from_list(cpp2::in> list) -> std::string{ + if (CPP2_UFCS(empty)(list)) {return "::cpp2::regex::empty_matcher_logic"; } + + std::string matcher {"::cpp2::regex::list_matcher_logic [[nodiscard]] auto regex_parser::create_matcher_from_state() const& -> std::string{ + // Early out for no alternatives + if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } + + std::string matcher {"::cpp2::regex::alternative_matcher_logic void{ + *cpp2::assert_not_null(_1) += *cpp2::assert_not_null(_2) + create_matcher_from_list(list); + *cpp2::assert_not_null(_2) = ", "; + }}; + if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {add(cur_state.cur_match_list); } + for ( auto const& cur : cur_state.alternate_match_lists ) { + add(cur); + } + matcher += ">"; + + return matcher; } template auto regex_parser::error(cpp2::in message) & -> void{ error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)); } - template [[nodiscard]] auto regex_parser::get_back() & -> std::string{ - auto b {CPP2_UFCS(back)(list)}; - CPP2_UFCS(pop_back)(list); - return b; + template [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{ + if (c != '|') {return false; } + + CPP2_UFCS(start_new_list)(cur_state); + return true; } template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ if (c == '.') { - CPP2_UFCS(push_back)(list, "::cpp2::regex::any_matcher_logic"); + CPP2_UFCS(add)(cur_state, "::cpp2::regex::any_matcher_logic"); return true; } return false; @@ -448,19 +596,25 @@ namespace regex { if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a follwoing character."); } - char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; + char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) { - int group_id {std::move(c_next) - '0'}; + int group_id {c_next - '0'}; if (cpp2::cmp_greater_eq(group_id,named_groups)) {error("Group reference is used before the group is declared."); } - CPP2_UFCS(push_back)(list, "::cpp2::regex::group_ref_matcher_logic"); + CPP2_UFCS(add)(cur_state, "::cpp2::regex::group_ref_matcher_logic"); + } + else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); + } + else {if ('\\' == std::move(c_next)) { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); }else { error("Unkonwn escape."); - } + }}} - return true; + return true; } template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ @@ -469,27 +623,32 @@ namespace regex { auto group_number {named_groups}; named_groups += 1; - // Create a new global list. - std::vector cur_list {}; - std::swap(cur_list, list); + auto old_state {new_state()}; pos += 1; // Skip the '(' parse_until(')'); - // Restore the old global list. - std::swap(cur_list, list); - - auto inner {create_list_matcher(std::move(cur_list))}; + auto inner {create_matcher_from_state()}; + restore_state(std::move(old_state)); - CPP2_UFCS(push_back)(list, "::cpp2::regex::group_matcher_logic"); + CPP2_UFCS(add)(cur_state, "::cpp2::regex::group_matcher_logic"); return true; } + template [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{ + if (c == '\'') { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); + return true; + } + + return false; + } + template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ if (c != '{') {return false; } - if (CPP2_UFCS(empty)(list)) {error("'{' without previous element."); } + if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element."); } size_t end {CPP2_UFCS(find)(regex, "}", pos)}; if (end == std::string::npos) {error("Missing closing bracket."); } @@ -503,11 +662,11 @@ namespace regex { size_t sep {CPP2_UFCS(find)(inner, ",")}; if (sep == std::string::npos) { min_count = inner; - max_count = std::move(inner); + max_count = inner; } else { std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; - std::string inner_last {trim_copy(CPP2_UFCS(substr)(std::move(inner), std::move(sep) + 1))}; + std::string inner_last {trim_copy(CPP2_UFCS(substr)(inner, std::move(sep) + 1))}; if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); @@ -522,16 +681,15 @@ namespace regex { } // TODO: Check 0 <=n <= m - auto inner_matcher {get_back()}; - CPP2_UFCS(push_back)(list, "::cpp2::regex::range_matcher_logic"); + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); pos = std::move(end); return true; } template [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{ - std::string min_range {"0"}; - std::string max_range {"std::numeric_limits::max()"}; + std::string min_range {"0"}; + std::string max_range {"std::numeric_limits::max()"}; if (c == '*') { min_range = "0"; } @@ -543,16 +701,15 @@ namespace regex { max_range = "1"; } else { - return false; + return false; }}} - if (CPP2_UFCS(empty)(list)) { + if (CPP2_UFCS(empty)(cur_state)) { error("'" + cpp2::to_string(c) + "' without previous element."); } - auto inner {get_back()}; - CPP2_UFCS(push_back)(list, "::cpp2::regex::special_range_matcher_logic"); - return true; + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); + return true; } template auto regex_parser::parse_until(cpp2::in term) & -> void{ @@ -566,9 +723,11 @@ namespace regex { if (is_special_range(c)) {continue; } if (is_group(c)) {continue; } if (is_escape(c)) {continue; } + if (is_alternative(c)) {continue; } + if (is_handle_special(c)) {continue; } // No special char push a character match - CPP2_UFCS(push_back)(list, "::cpp2::regex::char_matcher_logic"); + CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); } } @@ -576,10 +735,11 @@ namespace regex { parse_until('\0'); - return create_list_matcher(list); + auto inner {create_matcher_from_state()}; + return "::cpp2::regex::group_matcher_logic"; } -#line 382 "regex.h2" +#line 483 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index a2cb9663cd..ee8ea90548 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -89,6 +89,27 @@ match_context: @struct type = match: (str: view, inout ctx: Ctx) -> bool; }*/ +alternative_matcher_logic: type = { + match: (str: view, inout ctx: _) -> _ = match_all(str, ctx); + to_string: () -> _ = ((bstring() + ... + ("|" + List::to_string()))).substr(1); // substr: Remove first '|'. + + private match_all: (str: view, inout ctx: _) -> match_return = { + r: match_return = First::match(str, ctx); + + if r.matched { + return r; + } + else { + if constexpr 0 != sizeof...(Other) { + return match_all(str.substr(r.length), ctx); + } + else { + return (false, 0); + } + } + } +} + any_matcher_logic: type = { match: (str: view, inout ctx: _) -> match_return = match_return::create(!str.empty(), 1); @@ -101,6 +122,12 @@ char_matcher_logic: type = to_string: () -> bstring = bstring(1, C); } +empty_matcher_logic: type = +{ + match: (str: view, inout ctx: _) match_return(true, 0); + to_string: () bstring(); +} + list_matcher_logic: type = { match: (str: view, inout ctx: _) -> match_return = { @@ -192,11 +219,40 @@ special_range_matcher_logic: bstring = M::to_string() + symbol; } +regex_parser_state: @struct type = { + cur_match_list: std::vector = (); + alternate_match_lists: std::vector> = (); + + start_new_list: (inout this) = { + new_list: std::vector = (); + std::swap(new_list, cur_match_list); + alternate_match_lists.insert(alternate_match_lists.begin(), new_list); + } + + swap: (inout this, inout t: regex_parser_state) = { + std::swap(cur_match_list, t.cur_match_list); + std::swap(alternate_match_lists, t.alternate_match_lists); + } + + add: (inout this, matcher: _) = { + cur_match_list.push_back(matcher); + } + + wrap_last: (inout this, matcher) = { + last: std::string = cur_match_list.back(); + cur_match_list.back() = matcher(last); + _ = matcher; + _ = last; + } + + empty: (this) -> bool = cur_match_list.empty(); +} + regex_parser: type = { regex: std::string_view; - list: std::vector = (); + cur_state: regex_parser_state = (); pos: size_t = 0; named_groups: int = 1; // Global capture group. @@ -208,32 +264,65 @@ regex_parser: type = { this.error_out = e; } - create_list_matcher: (elements: std::vector) -> std::string = { - template_expression: std::string = "::cpp2::regex::list_matcher_logic regex_parser_state = { + old_state: regex_parser_state = (); + old_state.swap(cur_state); + return old_state; + } + + restore_state: (inout this, old_state: regex_parser_state) = { + cur_state = old_state; + } + + private create_matcher_from_list: (list: std::vector) -> std::string = { + if list.empty() { return "::cpp2::regex::empty_matcher_logic"; } + + matcher: std::string = "::cpp2::regex::list_matcher_logic std::string = { + // Early out for no alternatives + if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } + + matcher: std::string = "::cpp2::regex::alternative_matcher_logic std::string = { - b:= list.back(); - list.pop_back(); - return b; + is_alternative: (inout this, c: char) -> bool = { + if c != '|' { return false; } + + cur_state.start_new_list(); + return true; } is_any: (inout this, c: char) -> bool = { if c == '.' { - list.push_back("::cpp2::regex::any_matcher_logic"); + cur_state.add("::cpp2::regex::any_matcher_logic"); return true; } return false; @@ -253,7 +342,13 @@ regex_parser: type = { if group_id >= named_groups { error("Group reference is used before the group is declared."); } - list.push_back("::cpp2::regex::group_ref_matcher_logic"); + cur_state.add("::cpp2::regex::group_ref_matcher_logic"); + } + else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) { + cur_state.add("::cpp2::regex::char_matcher_logic"); + } + else if '\\' == c_next { + cur_state.add("::cpp2::regex::char_matcher_logic"); } else { error("Unkonwn escape."); } @@ -267,27 +362,32 @@ regex_parser: type = { group_number := named_groups; named_groups += 1; - // Create a new global list. - cur_list: std::vector = (); - std::swap(cur_list, list); + old_state: _ = new_state(); pos += 1; // Skip the '(' parse_until(')'); - // Restore the old global list. - std::swap(cur_list, list); - - inner:= create_list_matcher(cur_list); + inner:= create_matcher_from_state(); + restore_state(old_state); - list.push_back("::cpp2::regex::group_matcher_logic"); + cur_state.add("::cpp2::regex::group_matcher_logic"); return true; } + is_handle_special: (inout this, c: char) -> bool = { + if c == '\'' { + cur_state.add("::cpp2::regex::char_matcher_logic"); + return true; + } + + return false; + } + is_range: (inout this, c: char) -> bool = { if c != '{' { return false; } - if list.empty() { error("'{' without previous element."); } + if cur_state.empty() { error("'{' without previous element."); } end: size_t = regex.find("}", pos); if end == std::string::npos { error("Missing closing bracket."); } @@ -320,8 +420,7 @@ regex_parser: type = { } // TODO: Check 0 <=n <= m - inner_matcher: = get_back(); - list.push_back("::cpp2::regex::range_matcher_logic"); + cur_state.wrap_last( :(inner) -> _ == "::cpp2::regex::range_matcher_logic"); pos = end; return true; @@ -344,12 +443,11 @@ regex_parser: type = { return false; } - if list.empty() { + if cur_state.empty() { error("'(c)$' without previous element."); } - inner:= get_back(); - list.push_back("::cpp2::regex::special_range_matcher_logic"); + cur_state.wrap_last(:(inner) -> _ == "::cpp2::regex::special_range_matcher_logic"); return true; } @@ -364,9 +462,11 @@ regex_parser: type = { if is_special_range(c) { continue; } if is_group(c) { continue; } if is_escape(c) { continue; } + if is_alternative(c) { continue; } + if is_handle_special(c) { continue; } // No special char push a character match - list.push_back("::cpp2::regex::char_matcher_logic"); + cur_state.add("::cpp2::regex::char_matcher_logic"); } } @@ -374,7 +474,8 @@ regex_parser: type = { parse_until('\0'); - return create_list_matcher(list); + inner := create_matcher_from_state(); + return "::cpp2::regex::group_matcher_logic"; } } From 54cb500b10dca85d20e047f1036ede29697d38d7 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 27 Dec 2023 14:50:48 +0100 Subject: [PATCH 006/161] Refactor to position based matching. --- source/reflect.h | 2 +- source/reflect.h2 | 2 +- source/regex.h | 207 +++++++++++++++++++++++----------------------- source/regex.h2 | 57 ++++++------- 4 files changed, 136 insertions(+), 132 deletions(-) diff --git a/source/reflect.h b/source/reflect.h index 9c7b84dde7..6fe0576f43 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -1930,7 +1930,7 @@ auto regex_gen(meta::type_declaration& t) -> void } CPP2_UFCS(add_member)(t, "regex" + cpp2::to_string(name) + ": type == " + cpp2::to_string(regular_expression) + ";"); - CPP2_UFCS(add_member)(t, "match" + cpp2::to_string(name) + ": (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); return regex" + cpp2::to_string(name) + "::match(str, ctx).matched; }"); + CPP2_UFCS(add_member)(t, "match" + cpp2::to_string(name) + ": (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); ctx.str = str; return regex" + cpp2::to_string(name) + "::match(0, ctx).matched; }"); } } diff --git a/source/reflect.h2 b/source/reflect.h2 index e8769b4549..74db8896dc 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -1406,7 +1406,7 @@ regex_gen: (inout t: meta::type_declaration) = } t.add_member("regex(name)$: type == (regular_expression)$;"); - t.add_member("match(name)$: (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); return regex(name)$::match(str, ctx).matched; }"); + t.add_member("match(name)$: (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); ctx.str = str; return regex(name)$::match(0, ctx).matched; }"); } } diff --git a/source/regex.h b/source/regex.h index aec3e2f756..cf739ad57d 100644 --- a/source/regex.h +++ b/source/regex.h @@ -23,45 +23,45 @@ class match_return; #line 80 "regex.h2" template class match_context; -#line 92 "regex.h2" +#line 98 "regex.h2" template class alternative_matcher_logic; -#line 113 "regex.h2" +#line 119 "regex.h2" template class any_matcher_logic; -#line 119 "regex.h2" +#line 125 "regex.h2" template class char_matcher_logic; -#line 125 "regex.h2" +#line 131 "regex.h2" template class empty_matcher_logic; -#line 131 "regex.h2" +#line 137 "regex.h2" template class list_matcher_logic; -#line 161 "regex.h2" +#line 162 "regex.h2" template class group_matcher_logic; -#line 173 "regex.h2" +#line 174 "regex.h2" template class group_ref_matcher_logic; -#line 179 "regex.h2" +#line 180 "regex.h2" template class range_matcher_logic; -#line 216 "regex.h2" +#line 217 "regex.h2" template class special_range_matcher_logic; -#line 222 "regex.h2" +#line 223 "regex.h2" class regex_parser_state; -#line 252 "regex.h2" +#line 253 "regex.h2" template class regex_parser; -#line 490 "regex.h2" +#line 491 "regex.h2" } } @@ -144,7 +144,7 @@ class match_return public: bool matched {false}; public: size_t length {0}; - public: [[nodiscard]] static auto create(auto const& m, auto const& l) -> match_return; + public: [[nodiscard]] static auto create(cpp2::in m, cpp2::in l) -> match_return; #line 78 "regex.h2" }; @@ -152,148 +152,150 @@ class match_return template class match_context { + public: view str; + public: std::array,max_groups> ranges; public: std::array,max_groups> groups; + public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; + +#line 91 "regex.h2" }; /*regular_expression: @interface type = { - match: (str: view, inout ctx: Ctx) -> bool; + match: (pos: size_t, inout ctx: Ctx) -> bool; }*/ template class alternative_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> auto; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; - private: template [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; + private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 111 "regex.h2" +#line 117 "regex.h2" }; template class any_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; public: [[nodiscard]] static auto to_string() -> bstring; public: any_matcher_logic() = default; public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 117 "regex.h2" +#line 123 "regex.h2" }; template class char_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; public: [[nodiscard]] static auto to_string() -> bstring; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 123 "regex.h2" +#line 129 "regex.h2" }; template class empty_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> auto; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; public: empty_matcher_logic() = default; public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 129 "regex.h2" +#line 135 "regex.h2" }; template class list_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; - -#line 137 "regex.h2" - public: [[nodiscard]] static auto to_string() -> bstring; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; -#line 141 "regex.h2" - private: template [[nodiscard]] static auto match_all(cpp2::in> str, auto& ctx) -> match_return; + private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 159 "regex.h2" +#line 160 "regex.h2" }; template class group_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 170 "regex.h2" +#line 171 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 171 "regex.h2" +#line 172 "regex.h2" }; template class group_ref_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 177 "regex.h2" +#line 178 "regex.h2" }; template class range_matcher_logic { // TODO: Add static assert on min_count and max_count. - public: [[nodiscard]] static auto match(cpp2::in> str, auto& ctx) -> match_return; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 196 "regex.h2" +#line 197 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 214 "regex.h2" +#line 215 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 219 "regex.h2" +#line 220 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 220 "regex.h2" +#line 221 "regex.h2" }; class regex_parser_state { public: std::vector cur_match_list {}; public: std::vector> alternate_match_lists {}; - public: auto start_new_list() & -> void; +public: auto start_new_list() & -> void; -#line 232 "regex.h2" +#line 233 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 237 "regex.h2" +#line 238 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 241 "regex.h2" +#line 242 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 248 "regex.h2" +#line 249 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 252 "regex.h2" +#line 253 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -306,57 +308,57 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 267 "regex.h2" +#line 268 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 273 "regex.h2" +#line 274 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 277 "regex.h2" +#line 278 "regex.h2" private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; -#line 292 "regex.h2" +#line 293 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; -#line 312 "regex.h2" +#line 313 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 316 "regex.h2" +#line 317 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 323 "regex.h2" +#line 324 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 331 "regex.h2" +#line 332 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 359 "regex.h2" +#line 360 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 378 "regex.h2" +#line 379 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 387 "regex.h2" +#line 388 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 429 "regex.h2" +#line 430 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 454 "regex.h2" +#line 455 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 473 "regex.h2" +#line 474 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 481 "regex.h2" +#line 482 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 490 "regex.h2" +#line 491 "regex.h2" } } @@ -371,7 +373,7 @@ namespace cpp2 { namespace regex { #line 70 "regex.h2" - [[nodiscard]] auto match_return::create(auto const& m, auto const& l) -> match_return{ + [[nodiscard]] auto match_return::create(cpp2::in m, cpp2::in l) -> match_return{ if (m) { return { true, l }; } @@ -380,19 +382,25 @@ namespace regex { } } -#line 93 "regex.h2" - template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in> str, auto& ctx) -> auto { return match_all(str, ctx); } +#line 87 "regex.h2" + template auto match_context::set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void{ + CPP2_ASSERT_IN_BOUNDS(ranges, group) = { pos, pos + length }; + CPP2_ASSERT_IN_BOUNDS(groups, group) = CPP2_UFCS(substr)(str, pos, pos + length); + } + +#line 99 "regex.h2" + template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. - template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in> str, auto& ctx) -> match_return{ - match_return r {First::match(str, ctx)}; + template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ + match_return r {First::match(pos, ctx)}; if (r.matched) { return r; } else { if constexpr (0 != sizeof...(Other)) { - return match_all(CPP2_UFCS(substr)(str, std::move(r).length), ctx); + return match_all(pos + std::move(r).length, ctx); } else { return { false, 0 }; @@ -400,33 +408,28 @@ namespace regex { } } -#line 115 "regex.h2" - template [[nodiscard]] auto any_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)), 1); } - template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } - #line 121 "regex.h2" - template [[nodiscard]] auto char_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { return match_return::create(!(CPP2_UFCS(empty)(str)) && CPP2_UFCS(front)(str) == C, 1); } - template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } + template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } + template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } #line 127 "regex.h2" - template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in> str, auto& ctx) -> auto { return match_return(true, 0); } - template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } + template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } + template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } #line 133 "regex.h2" - template [[nodiscard]] auto list_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ - return match_all(str, ctx); - } + template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } + template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } - template [[nodiscard]] auto list_matcher_logic::to_string() -> bstring{ - return { (bstring() + ... + List::to_string()) }; - } +#line 139 "regex.h2" + template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } + template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } - template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in> str, auto& ctx) -> match_return{ - match_return r {First::match(str, ctx)}; + template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ + match_return r {First::match(pos, ctx)}; if (r.matched) { if constexpr (0 != sizeof...(Other)) { - match_return o {match_all(CPP2_UFCS(substr)(str, r.length), ctx)}; + match_return o {match_all(pos + r.length, ctx)}; if (o.matched) { r.length += std::move(o).length; @@ -440,30 +443,30 @@ namespace regex { return r; } -#line 162 "regex.h2" - template [[nodiscard]] auto group_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ - match_return r {M::match(str, ctx)}; +#line 163 "regex.h2" + template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ + match_return r {M::match(pos, ctx)}; if (r.matched) { - CPP2_ASSERT_IN_BOUNDS(ctx.groups, group) = CPP2_UFCS(substr)(str, 0, r.length); + CPP2_UFCS(set_group)(ctx, group, pos, r.length); } return r; } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } -#line 174 "regex.h2" - template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return { - return match_return::create(CPP2_UFCS(starts_with)(str, CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } +#line 175 "regex.h2" + template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { + return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 183 "regex.h2" - template [[nodiscard]] auto range_matcher_logic::match(cpp2::in> str, auto& ctx) -> match_return{ +#line 184 "regex.h2" + template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; int count {-1}; // First while is always true - for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(CPP2_UFCS(substr)(str, r.length), ctx) ) { + for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx) ) { r.length += o.length; count += 1; } @@ -489,14 +492,14 @@ namespace regex { return r; } -#line 219 "regex.h2" +#line 220 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 226 "regex.h2" - auto regex_parser_state::start_new_list() & -> void{ +#line 227 "regex.h2" +auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); - CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(begin)(alternate_match_lists), std::move(new_list)); + static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(begin)(alternate_match_lists), std::move(new_list))); } auto regex_parser_state::swap(regex_parser_state& t) & -> void{ @@ -517,12 +520,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 262 "regex.h2" +#line 263 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 265 "regex.h2" +#line 266 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -739,7 +742,7 @@ namespace regex { return "::cpp2::regex::group_matcher_logic"; } -#line 483 "regex.h2" +#line 484 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index ee8ea90548..9e98c8ae81 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -67,7 +67,7 @@ match_return: @struct type = matched: bool = false; length: size_t = 0; - create: (m, l) -> match_return = { + create: (m: bool, l: size_t) -> match_return = { if m { return (true, l); } @@ -80,28 +80,34 @@ match_return: @struct type = match_context: @struct type = { + str: view; + ranges: std::array, max_groups>; groups: std::array, max_groups>; + set_group: (inout this, group: size_t, pos: size_t, length: size_t) = { + ranges[group] = (pos, pos + length); + groups[group] = str.substr(pos, pos + length); + } } /*regular_expression: @interface type = { - match: (str: view, inout ctx: Ctx) -> bool; + match: (pos: size_t, inout ctx: Ctx) -> bool; }*/ alternative_matcher_logic: type = { - match: (str: view, inout ctx: _) -> _ = match_all(str, ctx); + match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); to_string: () -> _ = ((bstring() + ... + ("|" + List::to_string()))).substr(1); // substr: Remove first '|'. - private match_all: (str: view, inout ctx: _) -> match_return = { - r: match_return = First::match(str, ctx); + private match_all: (pos: size_t, inout ctx: _) -> match_return = { + r: match_return = First::match(pos, ctx); if r.matched { return r; } else { if constexpr 0 != sizeof...(Other) { - return match_all(str.substr(r.length), ctx); + return match_all(pos + r.length, ctx); } else { return (false, 0); @@ -112,38 +118,33 @@ alternative_matcher_logic: type = { any_matcher_logic: type = { - match: (str: view, inout ctx: _) -> match_return = match_return::create(!str.empty(), 1); + match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size(), 1); to_string: () -> bstring = bstring(1, '.'); } char_matcher_logic: type = { - match: (str: view, inout ctx: _) -> match_return = match_return::create(!str.empty() && str.front() == C, 1); + match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size() && ctx.str[pos] == C, 1); to_string: () -> bstring = bstring(1, C); } empty_matcher_logic: type = { - match: (str: view, inout ctx: _) match_return(true, 0); + match: (pos: size_t, inout ctx: _) match_return(true, 0); to_string: () bstring(); } list_matcher_logic: type = { - match: (str: view, inout ctx: _) -> match_return = { - return match_all(str, ctx); - } - - to_string: () -> bstring = { - return (bstring() + ... + List::to_string()); - } + match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); + to_string: () -> _ = (bstring() + ... + List::to_string()); - private match_all: (str: view, inout ctx: _) -> match_return = { - r: match_return = First::match(str, ctx); + private match_all: (pos: size_t, inout ctx: _) -> match_return = { + r: match_return = First::match(pos, ctx); if r.matched { if constexpr 0 != sizeof...(Other) { - o: match_return = match_all(str.substr(r.length), ctx); + o: match_return = match_all(pos + r.length, ctx); if o.matched { r.length += o.length; @@ -159,11 +160,11 @@ list_matcher_logic: type = } group_matcher_logic: type = { - match: (str: view, inout ctx: _) -> match_return = { - r: match_return = M::match(str, ctx); + match: (pos: size_t, inout ctx: _) -> match_return = { + r: match_return = M::match(pos, ctx); if r.matched { - ctx.groups[group] = str.substr(0, r.length); + ctx.set_group(group, pos, r.length); } return r; } @@ -171,8 +172,8 @@ group_matcher_logic: type = { } group_ref_matcher_logic: type = { - match: (str: view, inout ctx: _) -> match_return = - match_return::create(str.starts_with(ctx.groups[group]), ctx.groups[group].size()); + match: (pos: size_t, inout ctx: _) -> _ = + match_return::create(ctx.str.substr(pos).starts_with(ctx.groups[group]), ctx.groups[group].size()); to_string: () -> bstring = "\\((group)$)"; } @@ -180,13 +181,13 @@ range_matcher_logic: type = { // TODO: Add static assert on min_count and max_count. - match: (str: view, inout ctx: _) -> match_return = { + match: (pos: size_t, inout ctx: _) -> match_return = { r: match_return = (true, 0); o: match_return = (true, 0); count: int = -1; // First while is always true - while (o.matched && count < max_count) next o = M::match(str.substr(r.length), ctx) { + while (o.matched && count < max_count) next o = M::match(pos + r.length, ctx) { r.length += o.length; count += 1; } @@ -223,10 +224,10 @@ regex_parser_state: @struct type = { cur_match_list: std::vector = (); alternate_match_lists: std::vector> = (); - start_new_list: (inout this) = { +start_new_list: (inout this) = { new_list: std::vector = (); std::swap(new_list, cur_match_list); - alternate_match_lists.insert(alternate_match_lists.begin(), new_list); + _ = alternate_match_lists.insert(alternate_match_lists.begin(), new_list); } swap: (inout this, inout t: regex_parser_state) = { From d0488844b92d636ed2c60b1cebf6673cb6cafb90 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 27 Dec 2023 16:02:39 +0100 Subject: [PATCH 007/161] Added regular expression class. --- source/reflect.h | 27 ++--- source/reflect.h2 | 15 +-- source/regex.h | 246 +++++++++++++++++++++++++++++++++------------- source/regex.h2 | 67 ++++++++++++- 4 files changed, 250 insertions(+), 105 deletions(-) diff --git a/source/reflect.h b/source/reflect.h index 6fe0576f43..f6fdac913a 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -39,7 +39,7 @@ class alias_declaration; #line 929 "reflect.h2" class value_member_info; -#line 1521 "reflect.h2" +#line 1512 "reflect.h2" } } @@ -745,7 +745,7 @@ auto print(cpp2::in t) -> void; // auto regex_gen(meta::type_declaration& t) -> void; -#line 1414 "reflect.h2" +#line 1405 "reflect.h2" //----------------------------------------------------------------------- // // apply_metafunctions @@ -756,7 +756,7 @@ auto regex_gen(meta::type_declaration& t) -> void; auto const& error ) -> bool; -#line 1521 "reflect.h2" +#line 1512 "reflect.h2" } } @@ -1906,23 +1906,12 @@ auto regex_gen(meta::type_declaration& t) -> void CPP2_ASSERT_IN_BOUNDS(expressions, name) = expr; } - -#line 1387 "reflect.h2" - CPP2_UFCS(require)(m, CPP2_UFCS(make_public)(m), - "all struct members must be public"); - if (CPP2_UFCS(is_function)(m)) { - auto mf {CPP2_UFCS(as_function)(m)}; - CPP2_UFCS(require)(t, !(CPP2_UFCS(is_virtual)(mf)), - "a struct may not have a virtual function"); - CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(mf, "operator=")), - "a struct may not have a user-defined operator="); - } } CPP2_UFCS(remove_marked_members)(t); for ( auto const& expr : expressions ) { - std::string regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; + std::string regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; std::string name {expr.first}; if (!(CPP2_UFCS(empty)(name))) { @@ -1930,11 +1919,13 @@ auto regex_gen(meta::type_declaration& t) -> void } CPP2_UFCS(add_member)(t, "regex" + cpp2::to_string(name) + ": type == " + cpp2::to_string(regular_expression) + ";"); - CPP2_UFCS(add_member)(t, "match" + cpp2::to_string(name) + ": (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); ctx.str = str; return regex" + cpp2::to_string(name) + "::match(0, ctx).matched; }"); + CPP2_UFCS(add_member)(t, "match" + cpp2::to_string(name) + ": (in this, str: std::string) -> _ = regex" + cpp2::to_string(name) + "().match(str);"); + //t.add_member("match(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().match(str, ctx);"); + //t.add_member("find(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().find(str, ctx);"); } } -#line 1418 "reflect.h2" +#line 1409 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -2037,7 +2028,7 @@ auto regex_gen(meta::type_declaration& t) -> void return true; } -#line 1521 "reflect.h2" +#line 1512 "reflect.h2" } } diff --git a/source/reflect.h2 b/source/reflect.h2 index 74db8896dc..b466c6bf40 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -1382,17 +1382,6 @@ regex_gen: (inout t: meta::type_declaration) = expressions[name] = expr; } - - - m.require( m.make_public(), - "all struct members must be public"); - if m.is_function() { - mf := m.as_function(); - t.require( !mf.is_virtual(), - "a struct may not have a virtual function"); - t.require( !mf.has_name("operator="), - "a struct may not have a user-defined operator="); - } } t.remove_marked_members(); @@ -1406,7 +1395,9 @@ regex_gen: (inout t: meta::type_declaration) = } t.add_member("regex(name)$: type == (regular_expression)$;"); - t.add_member("match(name)$: (in this, str: std::string) -> bool = { ctx: ::cpp2::regex::match_context = (); ctx.str = str; return regex(name)$::match(0, ctx).matched; }"); + t.add_member("match(name)$: (in this, str: std::string) -> _ = regex(name)$().match(str);"); + //t.add_member("match(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().match(str, ctx);"); + //t.add_member("find(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().find(str, ctx);"); } } diff --git a/source/regex.h b/source/regex.h index cf739ad57d..b453c2fc51 100644 --- a/source/regex.h +++ b/source/regex.h @@ -23,45 +23,48 @@ class match_return; #line 80 "regex.h2" template class match_context; -#line 98 "regex.h2" +#line 115 "regex.h2" +template class regular_expression; + +#line 155 "regex.h2" template class alternative_matcher_logic; -#line 119 "regex.h2" +#line 176 "regex.h2" template class any_matcher_logic; -#line 125 "regex.h2" +#line 182 "regex.h2" template class char_matcher_logic; -#line 131 "regex.h2" +#line 188 "regex.h2" template class empty_matcher_logic; -#line 137 "regex.h2" +#line 194 "regex.h2" template class list_matcher_logic; -#line 162 "regex.h2" +#line 219 "regex.h2" template class group_matcher_logic; -#line 174 "regex.h2" +#line 231 "regex.h2" template class group_ref_matcher_logic; -#line 180 "regex.h2" +#line 237 "regex.h2" template class range_matcher_logic; -#line 217 "regex.h2" +#line 274 "regex.h2" template class special_range_matcher_logic; -#line 223 "regex.h2" +#line 280 "regex.h2" class regex_parser_state; -#line 253 "regex.h2" +#line 310 "regex.h2" template class regex_parser; -#line 491 "regex.h2" +#line 548 "regex.h2" } } @@ -151,14 +154,48 @@ class match_return template class match_context { + public: view str; + public: std::array,max_groups> ranges {}; + public: std::array,max_groups> groups {}; - public: view str; - public: std::array,max_groups> ranges; - public: std::array,max_groups> groups; + public: explicit match_context(); +#line 90 "regex.h2" + public: explicit match_context(view const& s); +#line 90 "regex.h2" + public: auto operator=(view const& s) -> match_context& ; + +#line 95 "regex.h2" public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; -#line 91 "regex.h2" +#line 100 "regex.h2" + public: [[nodiscard]] auto print_ranges() const& -> bstring; + public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(match_context const&) -> void = delete; + + +#line 113 "regex.h2" +}; + +template class regular_expression { + + public: using context = match_context; + + public: [[nodiscard]] auto match(cpp2::in> str) const& -> bool; + +#line 126 "regex.h2" + public: [[nodiscard]] auto match(cpp2::in> str, context& ctx) const& -> bool; + +#line 133 "regex.h2" + public: [[nodiscard]] auto search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool; + +#line 147 "regex.h2" + public: [[nodiscard]] auto to_string() const& -> auto; + public: regular_expression() = default; + public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regular_expression const&) -> void = delete; + +#line 148 "regex.h2" }; /*regular_expression: @interface type = { @@ -176,7 +213,7 @@ template class alternative_matcher_logic { public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 117 "regex.h2" +#line 174 "regex.h2" }; template class any_matcher_logic @@ -187,7 +224,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 123 "regex.h2" +#line 180 "regex.h2" }; template class char_matcher_logic @@ -198,7 +235,7 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 129 "regex.h2" +#line 186 "regex.h2" }; template class empty_matcher_logic @@ -209,7 +246,7 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 135 "regex.h2" +#line 192 "regex.h2" }; template class list_matcher_logic @@ -223,19 +260,19 @@ template class list_matcher_logic public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 160 "regex.h2" +#line 217 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 171 "regex.h2" +#line 228 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 172 "regex.h2" +#line 229 "regex.h2" }; template class group_ref_matcher_logic { @@ -246,7 +283,7 @@ template class group_ref_matcher_logic { public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 178 "regex.h2" +#line 235 "regex.h2" }; template class range_matcher_logic { @@ -255,25 +292,25 @@ template class range_m public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 197 "regex.h2" +#line 254 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 215 "regex.h2" +#line 272 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 220 "regex.h2" +#line 277 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 221 "regex.h2" +#line 278 "regex.h2" }; class regex_parser_state { @@ -282,20 +319,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 233 "regex.h2" +#line 290 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 238 "regex.h2" +#line 295 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 242 "regex.h2" +#line 299 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 249 "regex.h2" +#line 306 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 253 "regex.h2" +#line 310 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -308,57 +345,57 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 268 "regex.h2" +#line 325 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 274 "regex.h2" +#line 331 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 278 "regex.h2" +#line 335 "regex.h2" private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; -#line 293 "regex.h2" +#line 350 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; -#line 313 "regex.h2" +#line 370 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 317 "regex.h2" +#line 374 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 324 "regex.h2" +#line 381 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 332 "regex.h2" +#line 389 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 360 "regex.h2" +#line 417 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 379 "regex.h2" +#line 436 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 388 "regex.h2" +#line 445 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 430 "regex.h2" +#line 487 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 455 "regex.h2" +#line 512 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 474 "regex.h2" +#line 531 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 482 "regex.h2" +#line 539 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 491 "regex.h2" +#line 548 "regex.h2" } } @@ -382,25 +419,94 @@ namespace regex { } } -#line 87 "regex.h2" +#line 86 "regex.h2" + template match_context::match_context() + : str{ "" }{// TODO: How to delegate??? + +#line 88 "regex.h2" + CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); + } + template match_context::match_context(view const& s) + : str{ s }{ + +#line 92 "regex.h2" + CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); + } +#line 90 "regex.h2" + template auto match_context::operator=(view const& s) -> match_context& { + str = s; + ranges = {}; + groups = {}; + +#line 92 "regex.h2" + CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); + return *this; +#line 93 "regex.h2" + } + template auto match_context::set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void{ CPP2_ASSERT_IN_BOUNDS(ranges, group) = { pos, pos + length }; CPP2_ASSERT_IN_BOUNDS(groups, group) = CPP2_UFCS(substr)(str, pos, pos + length); } -#line 99 "regex.h2" + template [[nodiscard]] auto match_context::print_ranges() const& -> bstring{ + bstring r {""}; + for ( auto const& cur : ranges ) { + if (cur.first != bstring::npos) { + r += "(" + cpp2::to_string(cur.first) + "," + cpp2::to_string(cur.second) + ")"; + } + else { + r += "(-1,-1)"; + } + } + + return r; + } + +#line 119 "regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> bool{ + context ctx {str}; // TODO: Wrong error about not initialized. + auto r {match(str, ctx)}; + static_cast(std::move(ctx)); + return r; + } + + template [[nodiscard]] auto regular_expression::match(cpp2::in> str, context& ctx) const& -> bool{// TODO: Could call method with out parameter. + ctx = { str }; + auto r {Matcher::match(0, ctx)}; + + return std::move(r).matched && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).first == 0 && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).second == CPP2_UFCS(size)(str); + } + + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool{ + ctx = { str }; + + // TODO: Improve find logic. (E.g. skip more elements on failure.) + auto cur {start}; + for( ; cpp2::cmp_less(cur,CPP2_UFCS(size)(str)); (cur += 1) ) { + if (Matcher::match(cur, ctx).first) { + return true; + } + } + + return false; + } + + template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } + +#line 156 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {First::match(pos, ctx)}; + match_return r {First::match(pos, ctx)}; if (r.matched) { return r; } else { if constexpr (0 != sizeof...(Other)) { - return match_all(pos + std::move(r).length, ctx); + return match_all(pos + std::move(r).length, ctx); } else { return { false, 0 }; @@ -408,28 +514,28 @@ namespace regex { } } -#line 121 "regex.h2" +#line 178 "regex.h2" template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 127 "regex.h2" +#line 184 "regex.h2" template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 133 "regex.h2" +#line 190 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 139 "regex.h2" +#line 196 "regex.h2" template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {First::match(pos, ctx)}; + match_return r {First::match(pos, ctx)}; if (r.matched) { if constexpr (0 != sizeof...(Other)) { - match_return o {match_all(pos + r.length, ctx)}; + match_return o {match_all(pos + r.length, ctx)}; if (o.matched) { r.length += std::move(o).length; @@ -443,9 +549,9 @@ namespace regex { return r; } -#line 163 "regex.h2" +#line 220 "regex.h2" template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {M::match(pos, ctx)}; + match_return r {M::match(pos, ctx)}; if (r.matched) { CPP2_UFCS(set_group)(ctx, group, pos, r.length); @@ -454,12 +560,12 @@ namespace regex { } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } -#line 175 "regex.h2" - template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { +#line 232 "regex.h2" + template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 184 "regex.h2" +#line 241 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; @@ -492,10 +598,10 @@ namespace regex { return r; } -#line 220 "regex.h2" +#line 277 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 227 "regex.h2" +#line 284 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -520,12 +626,12 @@ auto regex_parser_state::start_new_list() & -> void{ [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 263 "regex.h2" +#line 320 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 266 "regex.h2" +#line 323 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -739,10 +845,10 @@ auto regex_parser_state::start_new_list() & -> void{ parse_until('\0'); auto inner {create_matcher_from_state()}; - return "::cpp2::regex::group_matcher_logic"; + return "::cpp2::regex::regular_expression, " + cpp2::to_string(named_groups) + ">"; } -#line 484 "regex.h2" +#line 541 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 9e98c8ae81..d9d345cd86 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -77,17 +77,74 @@ match_return: @struct type = } } -match_context: @struct type = +match_context: type = { + public str: view; + public ranges: std::array, max_groups> = (); + public groups: std::array, max_groups> = (); - str: view; - ranges: std::array, max_groups>; - groups: std::array, max_groups>; + operator=: (out this) = { // TODO: How to delegate??? + str = ""; + ranges.fill(std::make_pair(bstring::npos, bstring::npos)); + } + operator=: (out this, s: view) = { + str = s; + ranges.fill(std::make_pair(bstring::npos, bstring::npos)); + } set_group: (inout this, group: size_t, pos: size_t, length: size_t) = { ranges[group] = (pos, pos + length); groups[group] = str.substr(pos, pos + length); } + + print_ranges: (in this) -> bstring = { + r: bstring = ""; + for ranges do (cur) { + if cur.first != bstring::npos { + r += "((cur.first)$,(cur.second)$)"; + } + else { + r += "(-1,-1)"; + } + } + + return r; + } +} + +regular_expression: type = { + + context: type == match_context; + + match: (in this, str: view) -> bool = { + ctx: context = (str); // TODO: Wrong error about not initialized. + r := match(str, ctx); + _ = ctx; + return r; + } + + match: (in this, str: view, inout ctx: context) -> bool = { // TODO: Could call method with out parameter. + ctx = (str); + r := Matcher::match(0, ctx); + + return r.matched && ctx.ranges[0].first == 0 && ctx.ranges[0].second == str.size(); + } + + search: (in this, str: view, start: size_t, inout ctx: context) -> bool = { + ctx = (str); + + // TODO: Improve find logic. (E.g. skip more elements on failure.) + cur := start; + while cur < str.size() next (cur += 1) { + if Matcher::match(cur, ctx).first { + return true; + } + } + + return false; + } + + to_string: (in this) -> _ = Matcher::to_string(); } /*regular_expression: @interface type = { @@ -476,7 +533,7 @@ regex_parser: type = { parse_until('\0'); inner := create_matcher_from_state(); - return "::cpp2::regex::group_matcher_logic"; + return "::cpp2::regex::regular_expression, (named_groups)$>"; } } From 93c051140b4d027445fffe998b328b0c4fc6a44a Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 28 Dec 2023 10:28:08 +0100 Subject: [PATCH 008/161] Added class matching. --- source/regex.h | 278 +++++++++++++++++++++++++++++++++++++++--------- source/regex.h2 | 136 ++++++++++++++++++++++- 2 files changed, 357 insertions(+), 57 deletions(-) diff --git a/source/regex.h b/source/regex.h index b453c2fc51..de2cd37b91 100644 --- a/source/regex.h +++ b/source/regex.h @@ -37,34 +37,43 @@ template class any_matcher_logic; template class char_matcher_logic; #line 188 "regex.h2" -template class empty_matcher_logic; +template class single_class_entry; #line 194 "regex.h2" +template class range_class_entry; + +#line 200 "regex.h2" +template class class_matcher_logic; + +#line 238 "regex.h2" +template class empty_matcher_logic; + +#line 244 "regex.h2" template class list_matcher_logic; -#line 219 "regex.h2" +#line 269 "regex.h2" template class group_matcher_logic; -#line 231 "regex.h2" +#line 281 "regex.h2" template class group_ref_matcher_logic; -#line 237 "regex.h2" +#line 287 "regex.h2" template class range_matcher_logic; -#line 274 "regex.h2" +#line 324 "regex.h2" template class special_range_matcher_logic; -#line 280 "regex.h2" +#line 330 "regex.h2" class regex_parser_state; -#line 310 "regex.h2" +#line 360 "regex.h2" template class regex_parser; -#line 548 "regex.h2" +#line 674 "regex.h2" } } @@ -238,6 +247,46 @@ template class char_matcher_logic #line 186 "regex.h2" }; +template class single_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: single_class_entry() = default; + public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(single_class_entry const&) -> void = delete; + +#line 192 "regex.h2" +}; + +template class range_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: range_class_entry() = default; + public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_class_entry const&) -> void = delete; + +#line 198 "regex.h2" +}; + +template class class_matcher_logic + { + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; + +#line 213 "regex.h2" + private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; + +#line 225 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + public: class_matcher_logic() = default; + public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(class_matcher_logic const&) -> void = delete; + + +#line 235 "regex.h2" +}; + +#line 238 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -246,7 +295,7 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 192 "regex.h2" +#line 242 "regex.h2" }; template class list_matcher_logic @@ -260,19 +309,19 @@ template class list_matcher_logic public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 217 "regex.h2" +#line 267 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 228 "regex.h2" +#line 278 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 229 "regex.h2" +#line 279 "regex.h2" }; template class group_ref_matcher_logic { @@ -283,7 +332,7 @@ template class group_ref_matcher_logic { public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 235 "regex.h2" +#line 285 "regex.h2" }; template class range_matcher_logic { @@ -292,25 +341,25 @@ template class range_m public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 254 "regex.h2" +#line 304 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 272 "regex.h2" +#line 322 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 277 "regex.h2" +#line 327 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 278 "regex.h2" +#line 328 "regex.h2" }; class regex_parser_state { @@ -319,20 +368,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 290 "regex.h2" +#line 340 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 295 "regex.h2" +#line 345 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 299 "regex.h2" +#line 349 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 306 "regex.h2" +#line 356 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 310 "regex.h2" +#line 360 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -345,57 +394,63 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 325 "regex.h2" +#line 375 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 331 "regex.h2" +#line 381 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 335 "regex.h2" +#line 385 "regex.h2" + private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; + +#line 397 "regex.h2" private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; -#line 350 "regex.h2" +#line 407 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; -#line 370 "regex.h2" +#line 427 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 374 "regex.h2" +#line 431 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 381 "regex.h2" +#line 438 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 389 "regex.h2" +#line 446 "regex.h2" + public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; + +#line 514 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 417 "regex.h2" +#line 542 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 436 "regex.h2" +#line 561 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 445 "regex.h2" +#line 570 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 487 "regex.h2" +#line 612 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 512 "regex.h2" +#line 637 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 531 "regex.h2" +#line 657 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 539 "regex.h2" +#line 665 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 548 "regex.h2" +#line 674 "regex.h2" } } @@ -523,10 +578,53 @@ namespace regex { template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } #line 190 "regex.h2" + template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } + template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } + +#line 196 "regex.h2" + template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } + template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } + +#line 202 "regex.h2" + template [[nodiscard]] auto class_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ + CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; + bool r {match_any(std::move(c))}; + + if (negate) { + r = !(r); + } + + return match_return::create(std::move(r), 1); + } + + template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ + bool r {First::includes(c)}; + + if (!(r)) { + if constexpr (0 != sizeof...(Other)) { + r = match_any(c); + } + } + + return r; + } + + template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ + bstring r {"["}; + if (negate) { + r += "^"; + } + r += (bstring() + ... + List::to_string()); + r += "]';"; + + return r; + } + +#line 240 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 196 "regex.h2" +#line 246 "regex.h2" template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } @@ -549,7 +647,7 @@ namespace regex { return r; } -#line 220 "regex.h2" +#line 270 "regex.h2" template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::match(pos, ctx)}; @@ -560,12 +658,12 @@ namespace regex { } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } -#line 232 "regex.h2" +#line 282 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 241 "regex.h2" +#line 291 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; @@ -598,10 +696,10 @@ namespace regex { return r; } -#line 277 "regex.h2" +#line 327 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 284 "regex.h2" +#line 334 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -626,12 +724,12 @@ auto regex_parser_state::start_new_list() & -> void{ [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 320 "regex.h2" +#line 370 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 323 "regex.h2" +#line 373 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -644,16 +742,23 @@ auto regex_parser_state::start_new_list() & -> void{ cur_state = old_state; } - template [[nodiscard]] auto regex_parser::create_matcher_from_list(cpp2::in> list) -> std::string{ - if (CPP2_UFCS(empty)(list)) {return "::cpp2::regex::empty_matcher_logic"; } - - std::string matcher {"::cpp2::regex::list_matcher_logic [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ + std::string r {""}; std::string seperator {""}; for ( auto const& cur : list ) { - matcher += seperator + cur; + r += seperator + cur; seperator = ", "; } + + return r; + } + + template [[nodiscard]] auto regex_parser::create_matcher_from_list(cpp2::in> list) -> std::string{ + if (CPP2_UFCS(empty)(list)) {return "::cpp2::regex::empty_matcher_logic"; } + + std::string matcher {"::cpp2::regex::list_matcher_logic void{ return false; } + template [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{ + if (c != '[') {return false; } + + std::vector classes {}; + + char c_cur {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; + auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{ + *cpp2::assert_not_null(_1) += 1; + if (cpp2::cmp_greater_eq(*cpp2::assert_not_null(_1),CPP2_UFCS(size)(_3))) {return false; } + + *cpp2::assert_not_null(_4) = CPP2_ASSERT_IN_BOUNDS(_3, *cpp2::assert_not_null(_1)); + return true; + + }}; + + auto negate {false}; + + auto first {true}; + auto range {false}; + while( next_item() & (c_cur != ']' || first) ) { + if (c_cur == '^') { + negate = true; + continue; // Skip rest of the loop. Also the first update. + } + if (c_cur == '-') { + if (first) {// Litral if first entry. + CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); + }else { + range = true; + } + } + else { + if (range) {// Modify last element to be a range. + CPP2_UFCS(back)(classes) += "-" + cpp2::to_string(c_cur); + range = false; + } + else { + CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); + } + } + + first = false; + } + + static_cast(std::move(next_item));// TODO: Use in while is not recognized. + + if (std::move(c_cur) != ']') { + error_out("Error end of character class definition before terminating ']'."); + } + + if (std::move(range)) {// If '-' is last entry treat it as a literal char. + CPP2_UFCS(push_back)(classes, "-"); + } + + for ( auto& cur : classes ) { + if (std::string::npos != CPP2_UFCS(find)(cur, "-")) { + cur = "::cpp2::regex::range_class_entry"; + } + else { + cur = "::cpp2::regex::single_class_entry"; + } + } + + auto inner {join(std::move(classes))}; + CPP2_UFCS(add)(cur_state, "::cpp2::regex::class_matcher_logic"); + return true; + } + template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ if (c != '\\') {return false; } @@ -828,6 +1001,7 @@ auto regex_parser_state::start_new_list() & -> void{ if (c == term) {return ; } if (is_any(c)) {continue; } + if (is_class(c)) {continue; } if (is_range(c)) {continue; } if (is_special_range(c)) {continue; } if (is_group(c)) {continue; } @@ -848,7 +1022,7 @@ auto regex_parser_state::start_new_list() & -> void{ return "::cpp2::regex::regular_expression, " + cpp2::to_string(named_groups) + ">"; } -#line 541 "regex.h2" +#line 667 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index d9d345cd86..95caf19d5c 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -185,6 +185,56 @@ char_matcher_logic: type = to_string: () -> bstring = bstring(1, C); } +single_class_entry: type = +{ + includes: (c: CharT) -> _ = c == C; + to_string: () -> _ = bstring(1, C); +} + +range_class_entry: type = +{ + includes: (c: CharT) -> _ = Start <= c <= End; + to_string: () -> _ = "(Start)$-(End)$"; +} + +class_matcher_logic: type = +{ + match: (pos: size_t, inout ctx: _) -> match_return = { + c: CharT = ctx.str[pos]; + r: bool = match_any(c); + + if negate { + r = !r; + } + + return match_return::create(r, 1); + } + + private match_any: (c: CharT) -> bool = { + r: bool = First::includes(c); + + if !r { + if constexpr 0 != sizeof...(Other) { + r = match_any(c); + } + } + + return r; + } + + to_string: () -> bstring = { + r: bstring = "["; + if negate { + r += "^"; + } + r += (bstring() + ... + List::to_string()); + r += "]';"; + + return r; + } +} + + empty_matcher_logic: type = { match: (pos: size_t, inout ctx: _) match_return(true, 0); @@ -332,16 +382,23 @@ regex_parser: type = { cur_state = old_state; } - private create_matcher_from_list: (list: std::vector) -> std::string = { - if list.empty() { return "::cpp2::regex::empty_matcher_logic"; } - - matcher: std::string = "::cpp2::regex::list_matcher_logic) -> std::string = { + r: std::string = ""; seperator: std::string = ""; for list do (cur) { - matcher += seperator + cur; + r += seperator + cur; seperator = ", "; } + + return r; + } + + private create_matcher_from_list: (list: std::vector) -> std::string = { + if list.empty() { return "::cpp2::regex::empty_matcher_logic"; } + + matcher: std::string = "::cpp2::regex::list_matcher_logic type = { return false; } + is_class: (inout this, c: char) -> bool = { + if c != '[' { return false; } + + classes: std::vector = (); + + c_cur: char = regex[pos]; + next_item:= :() -> bool = { + pos&$* += 1; + if pos&$* >= regex$.size() { return false; } + + c_cur&$* = regex$[pos&$*]; + return true; + + }; + + negate:= false; + + first:= true; + range:= false; + while next_item() & (c_cur != ']' || first) { + if c_cur == '^' { + negate = true; + continue; // Skip rest of the loop. Also the first update. + } + if c_cur == '-' { + if first { // Litral if first entry. + classes.push_back("(c_cur)$"); + } else { + range = true; + } + } + else { + if range { // Modify last element to be a range. + classes.back() += "-(c_cur)$"; + range = false; + } + else { + classes.push_back("(c_cur)$"); + } + } + + first = false; + } + + _ = next_item; // TODO: Use in while is not recognized. + + if c_cur != ']' { + error_out("Error end of character class definition before terminating ']'."); + } + + if range { // If '-' is last entry treat it as a literal char. + classes.push_back("-"); + } + + for classes do (inout cur) { + if std::string::npos != cur.find("-") { + cur = "::cpp2::regex::range_class_entry"; + } + else { + cur = "::cpp2::regex::single_class_entry"; + } + } + + inner := join(classes); + cur_state.add("::cpp2::regex::class_matcher_logic"); + return true; + } + is_escape: (inout this, c: char) -> bool = { if c != '\\' { return false; } @@ -516,6 +641,7 @@ regex_parser: type = { if c == term { return; } if is_any(c) { continue; } + if is_class(c) { continue; } if is_range(c) { continue; } if is_special_range(c) { continue; } if is_group(c) { continue; } From fc8031bb48ebff1f4c03c32c9a309845fdfdbece Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 28 Dec 2023 10:55:45 +0100 Subject: [PATCH 009/161] Add line start and end match. --- source/regex.h | 154 ++++++++++++++++++++++++++++++++---------------- source/regex.h2 | 35 +++++++++-- 2 files changed, 135 insertions(+), 54 deletions(-) diff --git a/source/regex.h b/source/regex.h index de2cd37b91..97c08413fb 100644 --- a/source/regex.h +++ b/source/regex.h @@ -49,31 +49,37 @@ template class class_matcher_logi template class empty_matcher_logic; #line 244 "regex.h2" +template class line_end_matcher_logic; + +#line 250 "regex.h2" +template class line_start_matcher_logic; + +#line 256 "regex.h2" template class list_matcher_logic; -#line 269 "regex.h2" +#line 281 "regex.h2" template class group_matcher_logic; -#line 281 "regex.h2" +#line 293 "regex.h2" template class group_ref_matcher_logic; -#line 287 "regex.h2" +#line 299 "regex.h2" template class range_matcher_logic; -#line 324 "regex.h2" +#line 336 "regex.h2" template class special_range_matcher_logic; -#line 330 "regex.h2" +#line 342 "regex.h2" class regex_parser_state; -#line 360 "regex.h2" +#line 372 "regex.h2" template class regex_parser; -#line 674 "regex.h2" +#line 701 "regex.h2" } } @@ -298,6 +304,28 @@ template class empty_matcher_logic #line 242 "regex.h2" }; +template class line_end_matcher_logic + { + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: line_end_matcher_logic() = default; + public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(line_end_matcher_logic const&) -> void = delete; + +#line 248 "regex.h2" +}; + +template class line_start_matcher_logic + { + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: line_start_matcher_logic() = default; + public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(line_start_matcher_logic const&) -> void = delete; + +#line 254 "regex.h2" +}; + template class list_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -309,19 +337,19 @@ template class list_matcher_logic public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 267 "regex.h2" +#line 279 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 278 "regex.h2" +#line 290 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 279 "regex.h2" +#line 291 "regex.h2" }; template class group_ref_matcher_logic { @@ -332,7 +360,7 @@ template class group_ref_matcher_logic { public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 285 "regex.h2" +#line 297 "regex.h2" }; template class range_matcher_logic { @@ -341,25 +369,25 @@ template class range_m public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 304 "regex.h2" +#line 316 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 322 "regex.h2" +#line 334 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 327 "regex.h2" +#line 339 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 328 "regex.h2" +#line 340 "regex.h2" }; class regex_parser_state { @@ -368,20 +396,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 340 "regex.h2" +#line 352 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 345 "regex.h2" +#line 357 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 349 "regex.h2" +#line 361 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 356 "regex.h2" +#line 368 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 360 "regex.h2" +#line 372 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -394,63 +422,66 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 375 "regex.h2" +#line 387 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 381 "regex.h2" +#line 393 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 385 "regex.h2" +#line 397 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 397 "regex.h2" +#line 409 "regex.h2" private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; -#line 407 "regex.h2" +#line 419 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; -#line 427 "regex.h2" +#line 439 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 431 "regex.h2" +#line 443 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 438 "regex.h2" +#line 450 "regex.h2" + public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; + +#line 464 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 446 "regex.h2" +#line 472 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 514 "regex.h2" +#line 540 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 542 "regex.h2" +#line 568 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 561 "regex.h2" +#line 587 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 570 "regex.h2" +#line 596 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 612 "regex.h2" +#line 638 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 637 "regex.h2" +#line 663 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 657 "regex.h2" +#line 684 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 665 "regex.h2" +#line 692 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 674 "regex.h2" +#line 701 "regex.h2" } } @@ -625,6 +656,14 @@ namespace regex { template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } #line 246 "regex.h2" + template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. + template [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring(1, '$'); } + +#line 252 "regex.h2" + template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. + template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } + +#line 258 "regex.h2" template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } @@ -647,7 +686,7 @@ namespace regex { return r; } -#line 270 "regex.h2" +#line 282 "regex.h2" template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::match(pos, ctx)}; @@ -658,12 +697,12 @@ namespace regex { } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } -#line 282 "regex.h2" +#line 294 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 291 "regex.h2" +#line 303 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; @@ -696,10 +735,10 @@ namespace regex { return r; } -#line 327 "regex.h2" +#line 339 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 334 "regex.h2" +#line 346 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -724,12 +763,12 @@ auto regex_parser_state::start_new_list() & -> void{ [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 370 "regex.h2" +#line 382 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 373 "regex.h2" +#line 385 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -795,6 +834,20 @@ auto regex_parser_state::start_new_list() & -> void{ return true; } + template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ + auto r {false}; + if (c == '^') { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_start_matcher_logic"); + r = true; + } + else {if (c == '$') { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); + r = true; + }} + + return r; + } + template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ if (c == '.') { CPP2_UFCS(add)(cur_state, "::cpp2::regex::any_matcher_logic"); @@ -1000,14 +1053,15 @@ auto regex_parser_state::start_new_list() & -> void{ if (c == term) {return ; } + if (is_alternative(c)) {continue; } if (is_any(c)) {continue; } if (is_class(c)) {continue; } - if (is_range(c)) {continue; } - if (is_special_range(c)) {continue; } - if (is_group(c)) {continue; } if (is_escape(c)) {continue; } - if (is_alternative(c)) {continue; } + if (is_anchor(c)) {continue; } + if (is_group(c)) {continue; } if (is_handle_special(c)) {continue; } + if (is_range(c)) {continue; } + if (is_special_range(c)) {continue; } // No special char push a character match CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); @@ -1022,7 +1076,7 @@ auto regex_parser_state::start_new_list() & -> void{ return "::cpp2::regex::regular_expression, " + cpp2::to_string(named_groups) + ">"; } -#line 667 "regex.h2" +#line 694 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 95caf19d5c..6cf4f30f89 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -241,6 +241,18 @@ empty_matcher_logic: type = to_string: () bstring(); } +line_end_matcher_logic: type = +{ + match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == ctx.str.size() || ctx.str[pos] == '\n', 0); // TODO: Extend to other line feeds. + to_string: () -> _ = bstring(1, '$'); +} + +line_start_matcher_logic: type = +{ + match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == 0 || ctx.str[pos - 1] == '\n', 0); // TODO: Extend to other line feeds. + to_string: () -> _ = bstring(1, '^'); +} + list_matcher_logic: type = { match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); @@ -435,6 +447,20 @@ regex_parser: type = { return true; } + is_anchor: (inout this, c: char) -> bool = { + r := false; + if c == '^' { + cur_state.add("::cpp2::regex::line_start_matcher_logic"); + r = true; + } + else if c == '$' { + cur_state.add("::cpp2::regex::line_end_matcher_logic"); + r = true; + } + + return r; + } + is_any: (inout this, c: char) -> bool = { if c == '.' { cur_state.add("::cpp2::regex::any_matcher_logic"); @@ -640,14 +666,15 @@ regex_parser: type = { if c == term { return; } + if is_alternative(c) { continue; } if is_any(c) { continue; } if is_class(c) { continue; } - if is_range(c) { continue; } - if is_special_range(c) { continue; } - if is_group(c) { continue; } if is_escape(c) { continue; } - if is_alternative(c) { continue; } + if is_anchor(c) { continue; } + if is_group(c) { continue; } if is_handle_special(c) { continue; } + if is_range(c) { continue; } + if is_special_range(c) { continue; } // No special char push a character match cur_state.add("::cpp2::regex::char_matcher_logic"); From 5d26075b25a26ab2f481ff10cc86cf92c59be3d7 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 28 Dec 2023 13:01:14 +0100 Subject: [PATCH 010/161] Compatibility fixes. --- source/regex.h | 228 ++++++++++++++++++++++++++++-------------------- source/regex.h2 | 51 ++++++++--- 2 files changed, 173 insertions(+), 106 deletions(-) diff --git a/source/regex.h b/source/regex.h index 97c08413fb..623fb32380 100644 --- a/source/regex.h +++ b/source/regex.h @@ -26,60 +26,63 @@ template class match_context; #line 115 "regex.h2" template class regular_expression; -#line 155 "regex.h2" +#line 156 "regex.h2" template class alternative_matcher_logic; -#line 176 "regex.h2" +#line 177 "regex.h2" template class any_matcher_logic; -#line 182 "regex.h2" +#line 183 "regex.h2" template class char_matcher_logic; -#line 188 "regex.h2" +#line 189 "regex.h2" template class single_class_entry; -#line 194 "regex.h2" +#line 195 "regex.h2" template class range_class_entry; -#line 200 "regex.h2" +#line 201 "regex.h2" template class class_matcher_logic; -#line 238 "regex.h2" +#line 239 "regex.h2" template class empty_matcher_logic; -#line 244 "regex.h2" +#line 245 "regex.h2" +template class escaped_char_matcher_logic; + +#line 251 "regex.h2" template class line_end_matcher_logic; -#line 250 "regex.h2" +#line 257 "regex.h2" template class line_start_matcher_logic; -#line 256 "regex.h2" +#line 263 "regex.h2" template class list_matcher_logic; -#line 281 "regex.h2" +#line 288 "regex.h2" template class group_matcher_logic; -#line 293 "regex.h2" +#line 307 "regex.h2" template class group_ref_matcher_logic; -#line 299 "regex.h2" +#line 313 "regex.h2" template class range_matcher_logic; -#line 336 "regex.h2" +#line 355 "regex.h2" template class special_range_matcher_logic; -#line 342 "regex.h2" +#line 361 "regex.h2" class regex_parser_state; -#line 372 "regex.h2" +#line 391 "regex.h2" template class regex_parser; -#line 701 "regex.h2" +#line 728 "regex.h2" } } @@ -202,15 +205,16 @@ template class regular_expressi public: [[nodiscard]] auto match(cpp2::in> str, context& ctx) const& -> bool; #line 133 "regex.h2" + public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; public: [[nodiscard]] auto search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool; -#line 147 "regex.h2" +#line 148 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 148 "regex.h2" +#line 149 "regex.h2" }; /*regular_expression: @interface type = { @@ -228,7 +232,7 @@ template class alternative_matcher_logic { public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 174 "regex.h2" +#line 175 "regex.h2" }; template class any_matcher_logic @@ -239,7 +243,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 180 "regex.h2" +#line 181 "regex.h2" }; template class char_matcher_logic @@ -250,7 +254,7 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 186 "regex.h2" +#line 187 "regex.h2" }; template class single_class_entry @@ -261,7 +265,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 192 "regex.h2" +#line 193 "regex.h2" }; template class range_class_entry @@ -272,27 +276,27 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 198 "regex.h2" +#line 199 "regex.h2" }; template class class_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 213 "regex.h2" +#line 214 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 225 "regex.h2" +#line 226 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 235 "regex.h2" +#line 236 "regex.h2" }; -#line 238 "regex.h2" +#line 239 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -301,18 +305,29 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 242 "regex.h2" +#line 243 "regex.h2" +}; + +template class escaped_char_matcher_logic +: public char_matcher_logic { + + public: [[nodiscard]] static auto to_string() -> bstring; + public: escaped_char_matcher_logic() = default; + public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; + +#line 249 "regex.h2" }; template class line_end_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; + public: [[nodiscard]] static auto to_string() -> bstring; public: line_end_matcher_logic() = default; public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 248 "regex.h2" +#line 255 "regex.h2" }; template class line_start_matcher_logic @@ -323,7 +338,7 @@ template class line_start_matcher_logic public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 254 "regex.h2" +#line 261 "regex.h2" }; template class list_matcher_logic @@ -337,19 +352,20 @@ template class list_matcher_logic public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 279 "regex.h2" +#line 286 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 290 "regex.h2" +#line 297 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 291 "regex.h2" + +#line 305 "regex.h2" }; template class group_ref_matcher_logic { @@ -360,7 +376,7 @@ template class group_ref_matcher_logic { public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 297 "regex.h2" +#line 311 "regex.h2" }; template class range_matcher_logic { @@ -369,25 +385,25 @@ template class range_m public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 316 "regex.h2" +#line 335 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 334 "regex.h2" +#line 353 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 339 "regex.h2" +#line 358 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 340 "regex.h2" +#line 359 "regex.h2" }; class regex_parser_state { @@ -396,20 +412,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 352 "regex.h2" +#line 371 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 357 "regex.h2" +#line 376 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 361 "regex.h2" +#line 380 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 368 "regex.h2" +#line 387 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 372 "regex.h2" +#line 391 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -422,66 +438,66 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 387 "regex.h2" +#line 406 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 393 "regex.h2" +#line 412 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 397 "regex.h2" +#line 416 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 409 "regex.h2" +#line 428 "regex.h2" private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; -#line 419 "regex.h2" +#line 438 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; -#line 439 "regex.h2" +#line 460 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 443 "regex.h2" +#line 464 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 450 "regex.h2" +#line 471 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 464 "regex.h2" +#line 485 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 472 "regex.h2" +#line 493 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 540 "regex.h2" +#line 561 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 568 "regex.h2" +#line 595 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 587 "regex.h2" +#line 614 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 596 "regex.h2" +#line 623 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 638 "regex.h2" +#line 665 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 663 "regex.h2" +#line 690 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 684 "regex.h2" +#line 711 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 692 "regex.h2" +#line 719 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 701 "regex.h2" +#line 728 "regex.h2" } } @@ -542,7 +558,7 @@ namespace regex { r += "(" + cpp2::to_string(cur.first) + "," + cpp2::to_string(cur.second) + ")"; } else { - r += "(-1,-1)"; + r += "(?,?)"; } } @@ -564,13 +580,14 @@ namespace regex { return std::move(r).matched && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).first == 0 && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).second == CPP2_UFCS(size)(str); } + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool { return search(str, 0, ctx); } template [[nodiscard]] auto regular_expression::search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool{ ctx = { str }; // TODO: Improve find logic. (E.g. skip more elements on failure.) auto cur {start}; - for( ; cpp2::cmp_less(cur,CPP2_UFCS(size)(str)); (cur += 1) ) { - if (Matcher::match(cur, ctx).first) { + for( ; cpp2::cmp_less_eq(cur,CPP2_UFCS(size)(str)); (cur += 1) ) { + if (Matcher::match(cur, ctx).matched) { return true; } } @@ -580,7 +597,7 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 156 "regex.h2" +#line 157 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. @@ -600,23 +617,23 @@ namespace regex { } } -#line 178 "regex.h2" +#line 179 "regex.h2" template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 184 "regex.h2" +#line 185 "regex.h2" template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 190 "regex.h2" +#line 191 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 196 "regex.h2" +#line 197 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 202 "regex.h2" +#line 203 "regex.h2" template [[nodiscard]] auto class_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; bool r {match_any(std::move(c))}; @@ -651,19 +668,22 @@ namespace regex { return r; } -#line 240 "regex.h2" +#line 241 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 246 "regex.h2" +#line 248 "regex.h2" + template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } + +#line 253 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. - template [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring(1, '$'); } + template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 252 "regex.h2" +#line 259 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 258 "regex.h2" +#line 265 "regex.h2" template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } @@ -686,7 +706,7 @@ namespace regex { return r; } -#line 282 "regex.h2" +#line 289 "regex.h2" template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::match(pos, ctx)}; @@ -695,23 +715,35 @@ namespace regex { } return r; } - template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring { return "(" + cpp2::to_string(M::to_string()) + ")"; } + template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring{ + if (group == 0) { + return M::to_string(); + } + else { + return "(" + cpp2::to_string(M::to_string()) + ")"; + } + } -#line 294 "regex.h2" +#line 308 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 303 "regex.h2" +#line 317 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; - int count {-1}; // First while is always true + int count {0}; + o = M::match(pos, ctx); for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx) ) { r.length += o.length; count += 1; + + if (o.length == 0) { + break; + } } return match_return::create(cpp2::cmp_greater_eq(std::move(count),min_count), std::move(r).length); @@ -735,10 +767,10 @@ namespace regex { return r; } -#line 339 "regex.h2" +#line 358 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 346 "regex.h2" +#line 365 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -763,12 +795,12 @@ auto regex_parser_state::start_new_list() & -> void{ [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 382 "regex.h2" +#line 401 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 385 "regex.h2" +#line 404 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -814,10 +846,12 @@ auto regex_parser_state::start_new_list() & -> void{ *cpp2::assert_not_null(_1) += *cpp2::assert_not_null(_2) + create_matcher_from_list(list); *cpp2::assert_not_null(_2) = ", "; }}; - if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {add(cur_state.cur_match_list); } - for ( auto const& cur : cur_state.alternate_match_lists ) { - add(cur); + + auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; + for( ; cur != CPP2_UFCS(rend)(cur_state.alternate_match_lists); (++cur) ) { + add(*cpp2::assert_not_null(cur)); } + if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {std::move(add)(cur_state.cur_match_list); } matcher += ">"; return matcher; @@ -911,7 +945,7 @@ auto regex_parser_state::start_new_list() & -> void{ } for ( auto& cur : classes ) { - if (std::string::npos != CPP2_UFCS(find)(cur, "-")) { + if (1 != CPP2_UFCS(size)(cur)) { cur = "::cpp2::regex::range_class_entry"; } else { @@ -929,7 +963,7 @@ auto regex_parser_state::start_new_list() & -> void{ pos += 1; - if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a follwoing character."); } + if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); } char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; @@ -941,7 +975,13 @@ auto regex_parser_state::start_new_list() & -> void{ CPP2_UFCS(add)(cur_state, "::cpp2::regex::group_ref_matcher_logic"); } else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); + if (c_next == '$') { + // TODO: Provide proper escape for cppfront capture . + CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); + } + else { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::escaped_char_matcher_logic"); + } } else {if ('\\' == std::move(c_next)) { CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); @@ -1076,7 +1116,7 @@ auto regex_parser_state::start_new_list() & -> void{ return "::cpp2::regex::regular_expression, " + cpp2::to_string(named_groups) + ">"; } -#line 694 "regex.h2" +#line 721 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 6cf4f30f89..dc08fae0b4 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -104,7 +104,7 @@ match_context: type = r += "((cur.first)$,(cur.second)$)"; } else { - r += "(-1,-1)"; + r += "(?,?)"; } } @@ -130,13 +130,14 @@ regular_expression: type = { return r.matched && ctx.ranges[0].first == 0 && ctx.ranges[0].second == str.size(); } + search: (in this, str: view, inout ctx: context) -> bool = search(str, 0, ctx); search: (in this, str: view, start: size_t, inout ctx: context) -> bool = { ctx = (str); // TODO: Improve find logic. (E.g. skip more elements on failure.) cur := start; - while cur < str.size() next (cur += 1) { - if Matcher::match(cur, ctx).first { + while cur <= str.size() next (cur += 1) { + if Matcher::match(cur, ctx).matched { return true; } } @@ -241,10 +242,16 @@ empty_matcher_logic: type = to_string: () bstring(); } +escaped_char_matcher_logic: type = +{ + this : char_matcher_logic = (); + to_string: () -> bstring = "\\(C)$"; +} + line_end_matcher_logic: type = { match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == ctx.str.size() || ctx.str[pos] == '\n', 0); // TODO: Extend to other line feeds. - to_string: () -> _ = bstring(1, '$'); + to_string: () -> bstring = "\\$"; } line_start_matcher_logic: type = @@ -287,7 +294,14 @@ group_matcher_logic: type = { } return r; } - to_string: () -> bstring = "((M::to_string())$)"; + to_string: () -> bstring = { + if group == 0 { + return M::to_string(); + } + else { + return "((M::to_string())$)"; + } + } } group_ref_matcher_logic: type = { @@ -304,11 +318,16 @@ range_matcher_logic: type = { r: match_return = (true, 0); o: match_return = (true, 0); - count: int = -1; // First while is always true + count: int = 0; + o = M::match(pos, ctx); while (o.matched && count < max_count) next o = M::match(pos + r.length, ctx) { r.length += o.length; count += 1; + + if o.length == 0 { + break; + } } return match_return::create(count >= min_count, r.length); @@ -427,10 +446,12 @@ regex_parser: type = { matcher&$* += seperator&$* + create_matcher_from_list(list); seperator&$* = ", "; }; - if 0 != cur_state.cur_match_list.size() { add(cur_state.cur_match_list); } - for cur_state.alternate_match_lists do (cur) { - add(cur); + + cur := cur_state.alternate_match_lists.rbegin(); + while cur != cur_state.alternate_match_lists.rend() next( cur++ ) { + add(cur*); } + if 0 != cur_state.cur_match_list.size() { add(cur_state.cur_match_list); } matcher += ">"; return matcher; @@ -524,7 +545,7 @@ regex_parser: type = { } for classes do (inout cur) { - if std::string::npos != cur.find("-") { + if 1 != cur.size() { cur = "::cpp2::regex::range_class_entry"; } else { @@ -542,7 +563,7 @@ regex_parser: type = { pos += 1; - if pos >= regex.size() { error("Escape without a follwoing character."); } + if pos >= regex.size() { error("Escape without a following character."); } c_next: char = regex[pos]; @@ -554,7 +575,13 @@ regex_parser: type = { cur_state.add("::cpp2::regex::group_ref_matcher_logic"); } else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) { - cur_state.add("::cpp2::regex::char_matcher_logic"); + if c_next == '$' { + // TODO: Provide proper escape for cppfront capture . + cur_state.add("::cpp2::regex::line_end_matcher_logic"); + } + else { + cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); + } } else if '\\' == c_next { cur_state.add("::cpp2::regex::char_matcher_logic"); From f36bbbe8756638cd60adc9b6dbcaa9f245087cf0 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 28 Dec 2023 13:27:42 +0100 Subject: [PATCH 011/161] Added test file for regular expressions. --- regression-tests/pure2-regex.cpp2 | 946 ++++++++++++++++++++++++++++++ 1 file changed, 946 insertions(+) create mode 100644 regression-tests/pure2-regex.cpp2 diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2 new file mode 100644 index 0000000000..d484a5f4a2 --- /dev/null +++ b/regression-tests/pure2-regex.cpp2 @@ -0,0 +1,946 @@ +#include + +test: (regex: M, id: std::string, regex_str: std::string, str: std::string, result: std::string) = { + context : type == M::context; + ctx: context = (); + + str_mod := str; + if str_mod == "NULL" { + str_mod = ""; + } + + status: std::string = "OK"; + if regex.to_string() != regex_str { + status = "Failure: Parsed regex does not match."; + } else { + m : bool = regex.search(str_mod, ctx); + is_pass := !id.starts_with("M"); + + if is_pass != m { + if is_pass { + status = "Failure: Regex should apply."; + } + else { + status = "Failure: Regex should not apply."; + } + } else if result != ctx.print_ranges() { + status = "Failure: Ranges are wrong."; + } + } + + std::cout << "(id)$: (status)$ regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result: (ctx.print_ranges())$ expected_results (result)$ " << std::endl; +} + + +test_basic3: @regex type = { + regex_1 := "\)"; + regex_2 := "\}"; + regex_3 := "]"; + regex_4 := "\$^"; + regex_5 := "a(\$)"; + regex_6 := "a*(^a)"; + regex_7 := "(..)*(...)*"; + regex_8 := "(..)*(...)*"; + regex_9 := "(ab|a)(bc|c)"; + regex_10 := "(ab)c|abc"; + regex_11 := "a{0}b"; + regex_12 := "(a*)(b?)(b+)b{3}"; + regex_13 := "(a*)(b{0,1})(b{1,})b{3}"; + regex_15 := "((a|a)|a)"; + regex_16 := "(a*)(a|aa)"; + regex_17 := "a*(a.|aa)"; + regex_18 := "a(b)|c(d)|a(e)f"; + regex_19 := "(a|b)?.*"; + regex_20 := "(a|b)c|a(b|c)"; + regex_21 := "(a|b)c|a(b|c)"; + regex_22 := "(a|b)*c|(a|ab)*c"; + regex_23 := "(a|b)*c|(a|ab)*c"; + regex_24 := "(.a|.b).*|.*(.a|.b)"; + regex_25 := "a?(ab|ba)ab"; + regex_26 := "a?(ac{0}b|ba)ab"; + regex_27 := "ab|abab"; + regex_28 := "aba|bab|bba"; + regex_29 := "aba|bab"; + regex_30 := "(aa|aaa)*|(a|aaaaa)"; + regex_31 := "(a.|.a.)*|(a|.a...)"; + regex_32 := "ab|a"; + regex_33 := "ab|a"; + regex_34 := "(Ab|cD)*"; + regex_35 := ":::1:::0:|:::1:1:0:"; + regex_36 := ":::1:::0:|:::1:1:1:"; + regex_37 := "[[:lower:]]+"; + regex_38 := "[[:upper:]]+"; + regex_39 := "(a)(b)(c)"; + regex_43 := "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))"; + regex_44 := "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*"; + regex_45 := "a?(ab|ba)*"; + regex_46 := "abaa|abbaa|abbbaa|abbbbaa"; + regex_47 := "abaa|abbaa|abbbaa|abbbbaa"; + regex_48 := "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc"; + regex_49 := "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll"; + regex_50 := "a*a*a*a*a*b"; + regex_51 := "ab+bc"; + regex_52 := "ab+bc"; + regex_53 := "ab?bc"; + regex_54 := "ab?bc"; + regex_55 := "ab?c"; + regex_56 := "ab|cd"; + regex_57 := "ab|cd"; + regex_58 := "a\(b"; + regex_59 := "a\(*b"; + regex_60 := "a\(*b"; + regex_61 := "((a))"; + regex_62 := "(a)b(c)"; + regex_63 := "a+b+c"; + regex_64 := "a*"; + regex_65 := "(a*)*"; + regex_66 := "(a*)+"; + regex_67 := "(a*|b)*"; + regex_68 := "(a+|b)*"; + regex_69 := "(a+|b)+"; + regex_70 := "(a+|b)?"; + regex_71 := "(^)*"; + regex_72 := "([abc])*d"; + regex_73 := "([abc])*bcd"; + regex_74 := "a|b|c|d|e"; + regex_75 := "(a|b|c|d|e)f"; + regex_76 := "((a*|b))*"; + regex_77 := "(ab|cd)e"; + regex_78 := "(a|b)c*d"; + regex_79 := "(ab|ab*)bc"; + regex_80 := "a([bc]*)c*"; + regex_81 := "a([bc]*)(c*d)"; + regex_82 := "a([bc]+)(c*d)"; + regex_83 := "a([bc]*)(c+d)"; + regex_84 := "a[bcd]*dcdcde"; + regex_85 := "(ab|a)b*c"; + regex_86 := "((a)(b)c)(d)"; + regex_87 := "^a(bc+|b[eh])g|.h\$"; + regex_88 := "(bc+d\$|ef*g.|h?i(j|k))"; + regex_89 := "(bc+d\$|ef*g.|h?i(j|k))"; + regex_90 := "(bc+d\$|ef*g.|h?i(j|k))"; + regex_91 := "(((((((((a)))))))))"; + regex_92 := "(.*)c(.*)"; + regex_93 := "a(bc)d"; + regex_94 := "a[-]?c"; + regex_95 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_96 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_97 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_98 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_99 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_100 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_101 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_102 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_103 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_104 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_105 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_106 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_107 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_108 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_109 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_110 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_111 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]"; + regex_112 := "a+(b|c)*d+"; + regex_113 := "^.+\$"; + regex_114 := "^(.+)\$"; + regex_115 := "^([^!.]+).att.com!(.+)\$"; + regex_116 := "^([^!]+!)?([^!]+)\$"; + regex_117 := "^([^!]+!)?([^!]+)\$"; + regex_118 := "^([^!]+!)?([^!]+)\$"; + regex_119 := "^.+!([^!]+!)([^!]+)\$"; + regex_120 := "((foo)|(bar))!bas"; + regex_121 := "((foo)|(bar))!bas"; + regex_122 := "((foo)|(bar))!bas"; + regex_123 := "((foo)|bar)!bas"; + regex_124 := "((foo)|bar)!bas"; + regex_125 := "((foo)|bar)!bas"; + regex_126 := "(foo|(bar))!bas"; + regex_127 := "(foo|(bar))!bas"; + regex_128 := "(foo|(bar))!bas"; + regex_129 := "(foo|bar)!bas"; + regex_130 := "(foo|bar)!bas"; + regex_131 := "(foo|bar)!bas"; + regex_132 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$"; + regex_133 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$"; + regex_134 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$"; + regex_135 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$"; + regex_136 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$"; + regex_137 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$"; + regex_138 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$"; + regex_139 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$"; + regex_140 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$"; + regex_141 := ".*(/XXX).*"; + regex_142 := ".*(\\XXX).*"; + regex_143 := "\\XXX"; + regex_144 := ".*(/000).*"; + regex_145 := ".*(\\000).*"; + regex_146 := "\\000"; + run: (this) = { + std::cout << "Running basic3:\n "<< std::endl; + test(regex_1(), "1", "\\)", "()", "(1,2)"); + test(regex_2(), "2", "\\}", "}", "(0,1)"); + test(regex_3(), "3", "]", "]", "(0,1)"); + test(regex_4(), "4", "\\$^", "NULL", "(0,0)"); + test(regex_5(), "5", "a(\\$)", "aa", "(1,2)(2,2)"); + test(regex_6(), "6", "a*(^a)", "aa", "(0,1)(0,1)"); + test(regex_7(), "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)"); + test(regex_8(), "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)"); + test(regex_9(), "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)"); + test(regex_10(), "10", "(ab)c|abc", "abc", "(0,3)(0,2)"); + test(regex_11(), "11", "a{0}b", "ab", "(1,2)"); + test(regex_12(), "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_13(), "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_15(), "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)"); + test(regex_16(), "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)"); + test(regex_17(), "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)"); + test(regex_18(), "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)"); + test(regex_19(), "19", "(a|b)?.*", "b", "(0,1)(0,1)"); + test(regex_20(), "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)"); + test(regex_21(), "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)"); + test(regex_22(), "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)"); + test(regex_23(), "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)"); + test(regex_24(), "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)"); + test(regex_25(), "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_26(), "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_27(), "27", "ab|abab", "abbabab", "(0,2)"); + test(regex_28(), "28", "aba|bab|bba", "baaabbbaba", "(5,8)"); + test(regex_29(), "29", "aba|bab", "baaabbbaba", "(6,9)"); + test(regex_30(), "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_31(), "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_32(), "32", "ab|a", "xabc", "(1,3)"); + test(regex_33(), "33", "ab|a", "xxabc", "(2,4)"); + test(regex_34(), "34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); + test(regex_35(), "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_36(), "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_37(), "37", "[[:lower:]]+", "`az{", "(1,3)"); + test(regex_38(), "38", "[[:upper:]]+", "@AZ[", "(1,3)"); + test(regex_39(), "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_43 (), "43 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_44 (), "44 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)"); + test(regex_45(), "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)"); + test(regex_46(), "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)"); + test(regex_47(), "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)"); + test(regex_48(), "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)"); + test(regex_49(), "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)"); + test(regex_50(), "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)"); + test(regex_51(), "51", "ab+bc", "abbc", "(0,4)"); + test(regex_52(), "52", "ab+bc", "abbbbc", "(0,6)"); + test(regex_53(), "53", "ab?bc", "abbc", "(0,4)"); + test(regex_54(), "54", "ab?bc", "abc", "(0,3)"); + test(regex_55(), "55", "ab?c", "abc", "(0,3)"); + test(regex_56(), "56", "ab|cd", "abc", "(0,2)"); + test(regex_57(), "57", "ab|cd", "abcd", "(0,2)"); + test(regex_58(), "58", "a\\(b", "a(b", "(0,3)"); + test(regex_59(), "59", "a\\(*b", "ab", "(0,2)"); + test(regex_60(), "60", "a\\(*b", "a((b", "(0,4)"); + test(regex_61(), "61", "((a))", "abc", "(0,1)(0,1)(0,1)"); + test(regex_62(), "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)"); + test(regex_63(), "63", "a+b+c", "aabbabc", "(4,7)"); + test(regex_64(), "64", "a*", "aaa", "(0,3)"); + test(regex_65(), "65", "(a*)*", "-", "(0,0)(0,0)"); + test(regex_66(), "66", "(a*)+", "-", "(0,0)(0,0)"); + test(regex_67(), "67", "(a*|b)*", "-", "(0,0)(0,0)"); + test(regex_68(), "68", "(a+|b)*", "ab", "(0,2)(1,2)"); + test(regex_69(), "69", "(a+|b)+", "ab", "(0,2)(1,2)"); + test(regex_70(), "70", "(a+|b)?", "ab", "(0,1)(0,1)"); + test(regex_71(), "71", "(^)*", "-", "(0,0)(0,0)"); + test(regex_72(), "72", "([abc])*d", "abbbcd", "(0,6)(4,5)"); + test(regex_73(), "73", "([abc])*bcd", "abcd", "(0,4)(0,1)"); + test(regex_74(), "74", "a|b|c|d|e", "e", "(0,1)"); + test(regex_75(), "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)"); + test(regex_76(), "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)"); + test(regex_77(), "77", "(ab|cd)e", "abcde", "(2,5)(2,4)"); + test(regex_78(), "78", "(a|b)c*d", "abcd", "(1,4)(1,2)"); + test(regex_79(), "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)"); + test(regex_80(), "80", "a([bc]*)c*", "abc", "(0,3)(1,3)"); + test(regex_81(), "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_82(), "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_83(), "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)"); + test(regex_84(), "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)"); + test(regex_85(), "85", "(ab|a)b*c", "abc", "(0,3)(0,2)"); + test(regex_86(), "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)"); + test(regex_87(), "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)"); + test(regex_88(), "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)"); + test(regex_89(), "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)"); + test(regex_90(), "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)"); + test(regex_91(), "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_92(), "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)"); + test(regex_93(), "93", "a(bc)d", "abcd", "(0,4)(1,3)"); + test(regex_94(), "94", "a[-]?c", "ac", "(0,3)"); + test(regex_95(), "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)"); + test(regex_96(), "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)"); + test(regex_97(), "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)"); + test(regex_98(), "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)"); + test(regex_99(), "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)"); + test(regex_100(), "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)"); + test(regex_101(), "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)"); + test(regex_102(), "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)"); + test(regex_103(), "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)"); + test(regex_104(), "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)"); + test(regex_105(), "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)"); + test(regex_106(), "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)"); + test(regex_107(), "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)"); + test(regex_108(), "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)"); + test(regex_109(), "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)"); + test(regex_110(), "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)"); + test(regex_111(), "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)"); + test(regex_112(), "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)"); + test(regex_113(), "113", "^.+\\$", "vivi", "(0,4)"); + test(regex_114(), "114", "^(.+)\\$", "vivi", "(0,4)(0,4)"); + test(regex_115(), "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)"); + test(regex_116(), "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)"); + test(regex_117(), "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)"); + test(regex_118(), "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)"); + test(regex_119(), "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)"); + test(regex_120(), "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)"); + test(regex_121(), "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)"); + test(regex_122(), "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)"); + test(regex_123(), "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)"); + test(regex_124(), "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)"); + test(regex_125(), "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)"); + test(regex_126(), "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)"); + test(regex_127(), "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)"); + test(regex_128(), "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)"); + test(regex_129(), "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)"); + test(regex_130(), "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)"); + test(regex_131(), "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)"); + test(regex_132(), "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_133(), "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_134(), "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_135(), "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_136(), "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_137(), "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_138(), "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_139(), "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_140(), "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_141(), "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)"); + test(regex_142(), "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)"); + test(regex_143(), "143", "\\\\XXX", "\\XXX", "(0,4)"); + test(regex_144(), "144", ".*(/000).*", "/000", "(0,4)(0,4)"); + test(regex_145(), "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)"); + test(regex_146(), "146", "\\\\000", "\\000", "(0,4)"); + } +} +test_class: @regex type = { + regex_1 := "aa*"; + regex_2 := "(a*)(ab)*(b*)"; + regex_M2 := "(a*)(ab)*(b*)"; + regex_3 := "((a*)(ab)*)((b*)(a*))"; + regex_4 := "(...?.?)*"; + regex_5 := "(a|ab)(bc|c)"; + regex_6 := "(aba|a*b)(aba|a*b)"; + regex_7 := "(a*){2}"; + regex_8 := "(a*)*"; + regex_9 := "(aba|a*b)*"; + regex_10 := "(a(b)?)+"; + regex_11 := ".*(.*)"; + regex_12 := "(a?)((ab)?)(b?)a?(ab)?b?"; + regex_M12 := "(a?)((ab)?)(b?)a?(ab)?b?"; + run: (this) = { + std::cout << "Running class:\n "<< std::endl; + test(regex_1(), "1", "aa*", "xaxaax", "(1,2)"); + test(regex_2(), "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2(), "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)"); + test(regex_3(), "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)"); + test(regex_4(), "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)"); + test(regex_5(), "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)"); + test(regex_6(), "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_7(), "7", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_8(), "8", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_9(), "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_10(), "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_11(), "11", ".*(.*)", "ab", "(0,2)(2,2)"); + test(regex_12(), "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)"); + test(regex_M12(), "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)"); + } +} +test_left_assoc: @regex type = { + regex_M1 := "(a|ab)(c|bcd)(d*)"; + regex_M2 := "(a|ab)(bcd|c)(d*)"; + regex_M3 := "(ab|a)(c|bcd)(d*)"; + regex_M4 := "(ab|a)(bcd|c)(d*)"; + regex_M5 := "(a*)(b|abc)(c*)"; + regex_M6 := "(a*)(abc|b)(c*)"; + regex_M7 := "(a*)(b|abc)(c*)"; + regex_M8 := "(a*)(abc|b)(c*)"; + regex_M9 := "(a|ab)(c|bcd)(d|.*)"; + regex_M10 := "(a|ab)(bcd|c)(d|.*)"; + regex_M11 := "(ab|a)(c|bcd)(d|.*)"; + regex_M12 := "(ab|a)(bcd|c)(d|.*)"; + run: (this) = { + std::cout << "Running left_assoc:\n "<< std::endl; + test(regex_M1(), "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M2(), "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M3(), "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M4(), "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M5(), "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M6(), "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M7(), "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M8(), "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M9(), "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M10(), "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M11(), "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M12(), "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + } +} +test_right_assoc: @regex type = { + regex_1 := "(a|ab)(c|bcd)(d*)"; + regex_2 := "(a|ab)(bcd|c)(d*)"; + regex_3 := "(ab|a)(c|bcd)(d*)"; + regex_4 := "(ab|a)(bcd|c)(d*)"; + regex_5 := "(a*)(b|abc)(c*)"; + regex_6 := "(a*)(abc|b)(c*)"; + regex_7 := "(a*)(b|abc)(c*)"; + regex_8 := "(a*)(abc|b)(c*)"; + regex_9 := "(a|ab)(c|bcd)(d|.*)"; + regex_10 := "(a|ab)(bcd|c)(d|.*)"; + regex_11 := "(ab|a)(c|bcd)(d|.*)"; + regex_12 := "(ab|a)(bcd|c)(d|.*)"; + run: (this) = { + std::cout << "Running right_assoc:\n "<< std::endl; + test(regex_1(), "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_2(), "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_3(), "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_4(), "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_5(), "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_6(), "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_7(), "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_8(), "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_9(), "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_10(), "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_11(), "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_12(), "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + } +} +test_forced_assoc: @regex type = { + regex_1 := "(a|ab)(c|bcd)"; + regex_2 := "(a|ab)(bcd|c)"; + regex_3 := "(ab|a)(c|bcd)"; + regex_4 := "(ab|a)(bcd|c)"; + regex_5 := "((a|ab)(c|bcd))(d*)"; + regex_6 := "((a|ab)(bcd|c))(d*)"; + regex_7 := "((ab|a)(c|bcd))(d*)"; + regex_8 := "((ab|a)(bcd|c))(d*)"; + regex_9 := "(a|ab)((c|bcd)(d*))"; + regex_10 := "(a|ab)((bcd|c)(d*))"; + regex_11 := "(ab|a)((c|bcd)(d*))"; + regex_12 := "(ab|a)((bcd|c)(d*))"; + regex_13 := "(a*)(b|abc)"; + regex_14 := "(a*)(abc|b)"; + regex_15 := "((a*)(b|abc))(c*)"; + regex_16 := "((a*)(abc|b))(c*)"; + regex_17 := "(a*)((b|abc)(c*))"; + regex_18 := "(a*)((abc|b)(c*))"; + regex_19 := "(a*)(b|abc)"; + regex_20 := "(a*)(abc|b)"; + regex_21 := "((a*)(b|abc))(c*)"; + regex_22 := "((a*)(abc|b))(c*)"; + regex_23 := "(a*)((b|abc)(c*))"; + regex_24 := "(a*)((abc|b)(c*))"; + regex_25 := "(a|ab)"; + regex_26 := "(ab|a)"; + regex_27 := "(a|ab)(b*)"; + regex_28 := "(ab|a)(b*)"; + run: (this) = { + std::cout << "Running forced_assoc:\n "<< std::endl; + test(regex_1(), "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_2(), "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_3(), "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_4(), "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_5(), "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_6(), "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_7(), "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_8(), "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_9(), "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_10(), "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_11(), "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_12(), "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_13(), "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_14(), "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_15(), "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_16(), "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_17(), "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_18(), "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_19(), "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_20(), "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_21(), "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_22(), "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_23(), "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_24(), "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_25(), "25", "(a|ab)", "ab", "(0,2)(0,2)"); + test(regex_26(), "26", "(ab|a)", "ab", "(0,2)(0,2)"); + test(regex_27(), "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_28(), "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)"); + } +} +test_nullsub3: @regex type = { + regex_1 := "(a*)*"; + regex_2 := "SAME"; + regex_3 := "SAME"; + regex_4 := "SAME"; + regex_5 := "(a*)+"; + regex_6 := "SAME"; + regex_7 := "SAME"; + regex_8 := "SAME"; + regex_9 := "(a+)*"; + regex_10 := "SAME"; + regex_11 := "SAME"; + regex_12 := "SAME"; + regex_13 := "(a+)+"; + regex_14 := "SAME"; + regex_15 := "SAME"; + regex_16 := "SAME"; + regex_17 := "([a]*)*"; + regex_18 := "SAME"; + regex_19 := "SAME"; + regex_20 := "SAME"; + regex_21 := "([a]*)+"; + regex_22 := "SAME"; + regex_23 := "SAME"; + regex_24 := "SAME"; + regex_25 := "([^b]*)*"; + regex_26 := "SAME"; + regex_27 := "SAME"; + regex_28 := "SAME"; + regex_29 := "([ab]*)*"; + regex_30 := "SAME"; + regex_31 := "SAME"; + regex_32 := "SAME"; + regex_33 := "SAME"; + regex_34 := "SAME"; + regex_35 := "SAME"; + regex_36 := "([^a]*)*"; + regex_37 := "SAME"; + regex_38 := "SAME"; + regex_39 := "([^ab]*)*"; + regex_40 := "SAME"; + regex_41 := "((z)+|a)*"; + regex_42 := "(a)"; + regex_46 := "(a*)*(x)"; + regex_47 := "(a*)*(x)"; + regex_48 := "(a*)*(x)"; + regex_49 := "(a*)+(x)"; + regex_50 := "(a*)+(x)"; + regex_51 := "(a*)+(x)"; + regex_52 := "(a*){2}(x)"; + regex_53 := "(a*){2}(x)"; + regex_54 := "(a*){2}(x)"; + run: (this) = { + std::cout << "Running nullsub3:\n "<< std::endl; + test(regex_1(), "1", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_2(), "2", "SAME", "x", "(0,0)(0,0)"); + test(regex_3(), "3", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_4(), "4", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_5(), "5", "(a*)+", "a", "(0,1)(0,1)"); + test(regex_6(), "6", "SAME", "x", "(0,0)(0,0)"); + test(regex_7(), "7", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_8(), "8", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_9(), "9", "(a+)*", "a", "(0,1)(0,1)"); + test(regex_10(), "10", "SAME", "x", "(0,0)(?,?)"); + test(regex_11(), "11", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_12(), "12", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_13(), "13", "(a+)+", "a", "(0,1)(0,1)"); + test(regex_14(), "14", "SAME", "x", "NOMATCH"); + test(regex_15(), "15", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_16(), "16", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_17(), "17", "([a]*)*", "a", "(0,1)(0,1)"); + test(regex_18(), "18", "SAME", "x", "(0,0)(0,0)"); + test(regex_19(), "19", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_20(), "20", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_21(), "21", "([a]*)+", "a", "(0,1)(0,1)"); + test(regex_22(), "22", "SAME", "x", "(0,0)(0,0)"); + test(regex_23(), "23", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_24(), "24", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_25(), "25", "([^b]*)*", "a", "(0,1)(0,1)"); + test(regex_26(), "26", "SAME", "b", "(0,0)(0,0)"); + test(regex_27(), "27", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_28(), "28", "SAME", "aaaaaab", "(0,6)(0,6)"); + test(regex_29(), "29", "([ab]*)*", "a", "(0,1)(0,1)"); + test(regex_30(), "30", "SAME", "aaaaaa", "(0,6)(0,6)"); + test(regex_31(), "31", "SAME", "ababab", "(0,6)(0,6)"); + test(regex_32(), "32", "SAME", "bababa", "(0,6)(0,6)"); + test(regex_33(), "33", "SAME", "b", "(0,1)(0,1)"); + test(regex_34(), "34", "SAME", "bbbbbb", "(0,6)(0,6)"); + test(regex_35(), "35", "SAME", "aaaabcde", "(0,5)(0,5)"); + test(regex_36(), "36", "([^a]*)*", "b", "(0,1)(0,1)"); + test(regex_37(), "37", "SAME", "bbbbbb", "(0,6)(0,6)"); + test(regex_38(), "38", "SAME", "aaaaaa", "(0,0)(0,0)"); + test(regex_39(), "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)"); + test(regex_40(), "40", "SAME", "ababab", "(0,0)(0,0)"); + test(regex_41(), "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)"); + test(regex_42(), "42", "(a)", "aaa", "(0,1)(0,1)"); + test(regex_46(), "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_47(), "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_48(), "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_49(), "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_50(), "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_51(), "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_52(), "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_53(), "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)"); + test(regex_54(), "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)"); + } +} +test_repetition2: @regex type = { + regex_1 := "((..)|(.))"; + regex_2 := "((..)|(.))((..)|(.))"; + regex_3 := "((..)|(.))((..)|(.))((..)|(.))"; + regex_4 := "((..)|(.)){1}"; + regex_5 := "((..)|(.)){2}"; + regex_6 := "((..)|(.)){3}"; + regex_7 := "((..)|(.))*"; + regex_8 := "((..)|(.))"; + regex_9 := "((..)|(.))((..)|(.))"; + regex_10 := "((..)|(.))((..)|(.))((..)|(.))"; + regex_11 := "((..)|(.)){1}"; + regex_12 := "((..)|(.)){2}"; + regex_13 := "((..)|(.)){3}"; + regex_14 := "((..)|(.))*"; + regex_15 := "((..)|(.))"; + regex_16 := "((..)|(.))((..)|(.))"; + regex_17 := "((..)|(.))((..)|(.))((..)|(.))"; + regex_18 := "((..)|(.)){1}"; + regex_19 := "((..)|(.)){2}"; + regex_20 := "((..)|(.)){3}"; + regex_21 := "((..)|(.))*"; + regex_22 := "((..)|(.))"; + regex_23 := "((..)|(.))((..)|(.))"; + regex_24 := "((..)|(.))((..)|(.))((..)|(.))"; + regex_25 := "((..)|(.)){1}"; + regex_26 := "((..)|(.)){2}"; + regex_27 := "((..)|(.)){3}"; + regex_28 := "((..)|(.))*"; + regex_29 := "((..)|(.))"; + regex_30 := "((..)|(.))((..)|(.))"; + regex_31 := "((..)|(.))((..)|(.))((..)|(.))"; + regex_32 := "((..)|(.)){1}"; + regex_33 := "((..)|(.)){2}"; + regex_34 := "((..)|(.)){3}"; + regex_35 := "((..)|(.))*"; + regex_36 := "((..)|(.))"; + regex_37 := "((..)|(.))((..)|(.))"; + regex_38 := "((..)|(.))((..)|(.))((..)|(.))"; + regex_39 := "((..)|(.)){1}"; + regex_40 := "((..)|(.)){2}"; + regex_41 := "((..)|(.)){3}"; + regex_42 := "((..)|(.))*"; + regex_43 := "((..)|(.))"; + regex_44 := "((..)|(.))((..)|(.))"; + regex_45 := "((..)|(.))((..)|(.))((..)|(.))"; + regex_46 := "((..)|(.)){1}"; + regex_47 := "((..)|(.)){2}"; + regex_48 := "((..)|(.)){3}"; + regex_49 := "((..)|(.))*"; + regex_100 := "X(.?){0,}Y"; + regex_101 := "X(.?){1,}Y"; + regex_102 := "X(.?){2,}Y"; + regex_103 := "X(.?){3,}Y"; + regex_104 := "X(.?){4,}Y"; + regex_105 := "X(.?){5,}Y"; + regex_106 := "X(.?){6,}Y"; + regex_107 := "X(.?){7,}Y"; + regex_108 := "X(.?){8,}Y"; + regex_110 := "X(.?){0,8}Y"; + regex_111 := "X(.?){1,8}Y"; + regex_112 := "X(.?){2,8}Y"; + regex_113 := "X(.?){3,8}Y"; + regex_114 := "X(.?){4,8}Y"; + regex_115 := "X(.?){5,8}Y"; + regex_116 := "X(.?){6,8}Y"; + regex_117 := "X(.?){7,8}Y"; + regex_118 := "X(.?){8,8}Y"; + regex_260 := "(a|ab|c|bcd){0,}(d*)"; + regex_261 := "(a|ab|c|bcd){1,}(d*)"; + regex_262 := "(a|ab|c|bcd){2,}(d*)"; + regex_263 := "(a|ab|c|bcd){3,}(d*)"; + regex_264 := "(a|ab|c|bcd){4,}(d*)"; + regex_265 := "(a|ab|c|bcd){0,10}(d*)"; + regex_266 := "(a|ab|c|bcd){1,10}(d*)"; + regex_267 := "(a|ab|c|bcd){2,10}(d*)"; + regex_268 := "(a|ab|c|bcd){3,10}(d*)"; + regex_269 := "(a|ab|c|bcd){4,10}(d*)"; + regex_270 := "(a|ab|c|bcd)*(d*)"; + regex_271 := "(a|ab|c|bcd)+(d*)"; + run: (this) = { + std::cout << "Running repetition2:\n "<< std::endl; + test(regex_1(), "1", "((..)|(.))", "NULL", "NOMATCH"); + test(regex_2(), "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_3(), "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_4(), "4", "((..)|(.)){1}", "NULL", "NOMATCH"); + test(regex_5(), "5", "((..)|(.)){2}", "NULL", "NOMATCH"); + test(regex_6(), "6", "((..)|(.)){3}", "NULL", "NOMATCH"); + test(regex_7(), "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)"); + test(regex_8(), "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_9(), "9", "((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_10(), "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_11(), "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_12(), "12", "((..)|(.)){2}", "a", "NOMATCH"); + test(regex_13(), "13", "((..)|(.)){3}", "a", "NOMATCH"); + test(regex_14(), "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_15(), "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_16(), "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)"); + test(regex_17(), "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH"); + test(regex_18(), "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_19(), "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_20(), "20", "((..)|(.)){3}", "aa", "NOMATCH"); + test(regex_21(), "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_22(), "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_23(), "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)"); + test(regex_24(), "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)"); + test(regex_25(), "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_26(), "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_27(), "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_28(), "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_29(), "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_30(), "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_31(), "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)"); + test(regex_32(), "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_33(), "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_34(), "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)"); + test(regex_35(), "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_36(), "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_37(), "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_38(), "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)"); + test(regex_39(), "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_40(), "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_41(), "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_42(), "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_43(), "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_44(), "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_45(), "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)"); + test(regex_46(), "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_47(), "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_48(), "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_49(), "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_100(), "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_101(), "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_102(), "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_103(), "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_104(), "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_105(), "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_106(), "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_107(), "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_108(), "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_110(), "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_111(), "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_112(), "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_113(), "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_114(), "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_115(), "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_116(), "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_117(), "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_118(), "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_260(), "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_261(), "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_262(), "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_263(), "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_264(), "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH"); + test(regex_265(), "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_266(), "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_267(), "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_268(), "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_269(), "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH"); + test(regex_270(), "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_271(), "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + } +} +test_totest: @regex type = { + regex_01 := "a+"; + regex_03 := "(a?)((ab)?)"; + regex_04 := "(a?)((ab)?)(b?)"; + regex_05 := "((a?)((ab)?))(b?)"; + regex_06 := "(a?)(((ab)?)(b?))"; + regex_07 := "(.?)"; + regex_08 := "(.?){1}"; + regex_09 := "(.?)(.?)"; + regex_10 := "(.?){2}"; + regex_11 := "(.?)*"; + regex_12 := "(.?.?)"; + regex_13 := "(.?.?){1}"; + regex_14 := "(.?.?)(.?.?)"; + regex_15 := "(.?.?){2}"; + regex_16 := "(.?.?)(.?.?)(.?.?)"; + regex_17 := "(.?.?){3}"; + regex_18 := "(.?.?)*"; + regex_19 := "a?((ab)?)(b?)"; + regex_20 := "(a?)((ab)?)b?"; + regex_21 := "a?((ab)?)b?"; + regex_22 := "(a*){2}"; + regex_23 := "(ab?)(b?a)"; + regex_24 := "(a|ab)(ba|a)"; + regex_25 := "(a|ab|ba)"; + regex_26 := "(a|ab|ba)(a|ab|ba)"; + regex_27 := "(a|ab|ba)*"; + regex_28 := "(aba|a*b)"; + regex_29 := "(aba|a*b)(aba|a*b)"; + regex_1029 := "(aba|a*b)(aba|a*b)(aba|a*b)"; + regex_30 := "(aba|a*b)*"; + regex_31 := "(aba|ab|a)"; + regex_32 := "(aba|ab|a)(aba|ab|a)"; + regex_1032 := "(aba|ab|a)(aba|ab|a)(aba|ab|a)"; + regex_33 := "(aba|ab|a)*"; + regex_34 := "(a(b)?)"; + regex_35 := "(a(b)?)(a(b)?)"; + regex_36 := "(a(b)?)+"; + regex_37 := "(.*)(.*)"; + regex_38 := ".*(.*)"; + regex_39 := "(a.*z|b.*y)"; + regex_40 := "(a.*z|b.*y)(a.*z|b.*y)"; + regex_41 := "(a.*z|b.*y)*"; + regex_42 := "(.|..)(.*)"; + regex_43 := "((..)*(...)*)"; + regex_44 := "((..)*(...)*)((..)*(...)*)"; + regex_45 := "((..)*(...)*)*"; + regex_83 := "(aa(b(b))?)+"; + regex_84 := "(a(b)?)+"; + regex_85 := "([ab]+)([bc]+)([cd]*)"; + regex_90 := "^(A([^B]*))?(B(.*))?"; + regex_91 := "^(A([^B]*))?(B(.*))?"; + regex_110 := "(^){0,3}"; + regex_111 := "(\$){0,3}"; + regex_112 := "(^){1,3}"; + regex_113 := "(\$){1,3}"; + regex_200 := "((s^)|(s)|(^)|(\$)|(^.))*"; + regex_201 := "s(()|^)e"; + regex_202 := "s(^|())e"; + regex_203 := "s(^|())e"; + regex_204 := "s()?e"; + regex_205 := "s(^)?e"; + regex_206 := "((s)|(e)|(a))*"; + regex_207 := "((s)|(e)|())*"; + regex_208 := "((b*)|c(c*))*"; + regex_209 := "(yyy|(x?)){2,4}"; + regex_210 := "(\$)|()"; + regex_211 := "\$()|^()"; + regex_212 := "^()|\$()"; + regex_213 := "(\$)?(.)"; + regex_214 := "(.|()|())*"; + regex_215 := "((a)|(b)){2,}"; + regex_216 := ".()|((.)?)"; + regex_217 := "(.|\$){2,}"; + regex_218 := "(.|\$){2,2}"; + regex_219 := "(.){2,}"; + regex_220 := "(a|())(b|())(c|())"; + regex_220 := "ab()c|ab()c()"; + regex_250 := "(b(c)|d(e))*"; + regex_251 := "(a(b)*)*"; + run: (this) = { + std::cout << "Running totest:\n "<< std::endl; + test(regex_01(), "01", "a+", "xaax", "(1,3)"); + test(regex_03(), "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)"); + test(regex_04(), "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)"); + test(regex_05(), "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)"); + test(regex_06(), "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)"); + test(regex_07(), "07", "(.?)", "x", "(0,1)(0,1)"); + test(regex_08(), "08", "(.?){1}", "x", "(0,1)(0,1)"); + test(regex_09(), "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)"); + test(regex_10(), "10", "(.?){2}", "x", "(0,1)(1,1)"); + test(regex_11(), "11", "(.?)*", "x", "(0,1)(0,1)"); + test(regex_12(), "12", "(.?.?)", "xxx", "(0,2)(0,2)"); + test(regex_13(), "13", "(.?.?){1}", "xxx", "(0,2)(0,2)"); + test(regex_14(), "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)"); + test(regex_15(), "15", "(.?.?){2}", "xxx", "(0,3)(2,3)"); + test(regex_16(), "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)"); + test(regex_17(), "17", "(.?.?){3}", "xxx", "(0,3)(3,3)"); + test(regex_18(), "18", "(.?.?)*", "xxx", "(0,3)(2,3)"); + test(regex_19(), "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)"); + test(regex_20(), "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)"); + test(regex_21(), "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)"); + test(regex_22(), "22", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_23(), "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_24(), "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_25(), "25", "(a|ab|ba)", "aba", "(0,2)(0,2)"); + test(regex_26(), "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_27(), "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)"); + test(regex_28(), "28", "(aba|a*b)", "ababa", "(0,3)(0,3)"); + test(regex_29(), "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1029(), "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH"); + test(regex_30(), "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_31(), "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)"); + test(regex_32(), "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1032(), "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)"); + test(regex_33(), "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)"); + test(regex_34(), "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)"); + test(regex_35(), "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)"); + test(regex_36(), "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_37(), "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)"); + test(regex_38(), "38", ".*(.*)", "xx", "(0,2)(2,2)"); + test(regex_39(), "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)"); + test(regex_40(), "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)"); + test(regex_41(), "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)"); + test(regex_42(), "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_43(), "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_44(), "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)"); + test(regex_45(), "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_83(), "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)"); + test(regex_84(), "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_85(), "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_90(), "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)"); + test(regex_91(), "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)"); + test(regex_110(), "110", "(^){0,3}", "a", "(0,0)(0,0)"); + test(regex_111(), "111", "(\\$){0,3}", "a", "(0,0)(?,?)"); + test(regex_112(), "112", "(^){1,3}", "a", "(0,0)(0,0)"); + test(regex_113(), "113", "(\\$){1,3}", "a", "(1,1)(1,1)"); + test(regex_200(), "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)"); + test(regex_201(), "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_202(), "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_203(), "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_204(), "204", "s()?e", "searchme", "(0,2)(1,1)"); + test(regex_205(), "205", "s(^)?e", "searchme", "(0,2)(?,?)"); + test(regex_206(), "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)"); + test(regex_207(), "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)"); + test(regex_208(), "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)"); + test(regex_209(), "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)"); + test(regex_210(), "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)"); + test(regex_211(), "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)"); + test(regex_212(), "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)"); + test(regex_213(), "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)"); + test(regex_214(), "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)"); + test(regex_215(), "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_216(), "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)"); + test(regex_217(), "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)"); + test(regex_218(), "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)"); + test(regex_219(), "219", "(.){2,}", "xx", "(0,2)(1,2)"); + test(regex_220(), "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)"); + test(regex_220(), "220", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)"); + test(regex_250(), "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)"); + test(regex_251(), "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)"); + } +} +test_osx_bsd_critical: @regex type = { + regex_1 := "(()|.)(b)"; + regex_M1 := "(()|.)(b)"; + regex_2 := "(()|[ab])(b)"; + regex_M2 := "(()|[ab])(b)"; + regex_3 := "(()|[ab])+b"; + regex_M3 := "(()|[ab])+b"; + regex_11 := "(.|())(b)"; + regex_12 := "([ab]|())(b)"; + regex_14 := "([ab]|())+b"; + regex_M14 := "([ab]|())+b"; + regex_20 := "(.?)(b)"; + run: (this) = { + std::cout << "Running osx_bsd_critical:\n "<< std::endl; + test(regex_1(), "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M1(), "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_2(), "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2(), "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_3(), "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M3(), "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)"); + test(regex_11(), "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_12(), "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_14(), "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M14(), "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)"); + test(regex_20(), "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)"); + } +} +main: (args) = { + test_basic3().run(); + test_class().run(); + test_left_assoc().run(); + test_right_assoc().run(); + test_forced_assoc().run(); + test_nullsub3().run(); + test_repetition2().run(); + test_totest().run(); + test_osx_bsd_critical().run(); +} From d10facaa943bc7a7b10bc13b6504e104ef52d348 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Tue, 2 Jan 2024 13:34:22 +0100 Subject: [PATCH 012/161] Basic state machine for range matchers. --- source/regex.h | 341 +++++++++++++++++++++++++++++------------------- source/regex.h2 | 84 +++++++++--- 2 files changed, 276 insertions(+), 149 deletions(-) diff --git a/source/regex.h b/source/regex.h index 623fb32380..af6a34aecc 100644 --- a/source/regex.h +++ b/source/regex.h @@ -21,68 +21,68 @@ class list_end; class match_return; #line 80 "regex.h2" -template class match_context; +template class match_context; -#line 115 "regex.h2" -template class regular_expression; +#line 119 "regex.h2" +template class regular_expression; -#line 156 "regex.h2" +#line 160 "regex.h2" template class alternative_matcher_logic; -#line 177 "regex.h2" +#line 182 "regex.h2" template class any_matcher_logic; -#line 183 "regex.h2" +#line 189 "regex.h2" template class char_matcher_logic; -#line 189 "regex.h2" +#line 196 "regex.h2" template class single_class_entry; -#line 195 "regex.h2" +#line 202 "regex.h2" template class range_class_entry; -#line 201 "regex.h2" +#line 208 "regex.h2" template class class_matcher_logic; -#line 239 "regex.h2" +#line 248 "regex.h2" template class empty_matcher_logic; -#line 245 "regex.h2" +#line 255 "regex.h2" template class escaped_char_matcher_logic; -#line 251 "regex.h2" +#line 261 "regex.h2" template class line_end_matcher_logic; -#line 257 "regex.h2" +#line 268 "regex.h2" template class line_start_matcher_logic; -#line 263 "regex.h2" +#line 275 "regex.h2" template class list_matcher_logic; -#line 288 "regex.h2" +#line 304 "regex.h2" template class group_matcher_logic; -#line 307 "regex.h2" +#line 324 "regex.h2" template class group_ref_matcher_logic; -#line 313 "regex.h2" -template class range_matcher_logic; +#line 331 "regex.h2" +template class range_matcher_logic; -#line 355 "regex.h2" -template class special_range_matcher_logic; +#line 391 "regex.h2" +template class special_range_matcher_logic; -#line 361 "regex.h2" +#line 397 "regex.h2" class regex_parser_state; -#line 391 "regex.h2" +#line 427 "regex.h2" template class regex_parser; -#line 728 "regex.h2" +#line 780 "regex.h2" } } @@ -170,51 +170,55 @@ class match_return #line 78 "regex.h2" }; -template class match_context +template class match_context { public: view str; public: std::array,max_groups> ranges {}; public: std::array,max_groups> groups {}; + public: State state {}; + public: explicit match_context(); -#line 90 "regex.h2" +#line 92 "regex.h2" public: explicit match_context(view const& s); -#line 90 "regex.h2" +#line 92 "regex.h2" public: auto operator=(view const& s) -> match_context& ; -#line 95 "regex.h2" +#line 97 "regex.h2" public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; -#line 100 "regex.h2" +#line 102 "regex.h2" public: [[nodiscard]] auto print_ranges() const& -> bstring; + +#line 116 "regex.h2" + public: template [[nodiscard]] auto get_state() & -> auto; public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(match_context const&) -> void = delete; - -#line 113 "regex.h2" +#line 117 "regex.h2" }; -template class regular_expression { +template class regular_expression { - public: using context = match_context; + public: using context = match_context; public: [[nodiscard]] auto match(cpp2::in> str) const& -> bool; -#line 126 "regex.h2" +#line 130 "regex.h2" public: [[nodiscard]] auto match(cpp2::in> str, context& ctx) const& -> bool; -#line 133 "regex.h2" +#line 137 "regex.h2" public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; public: [[nodiscard]] auto search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool; -#line 148 "regex.h2" +#line 152 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 149 "regex.h2" +#line 153 "regex.h2" }; /*regular_expression: @interface type = { @@ -224,6 +228,7 @@ template class regular_expressi template class alternative_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; @@ -232,29 +237,31 @@ template class alternative_matcher_logic { public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 175 "regex.h2" +#line 180 "regex.h2" }; template class any_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> bstring; public: any_matcher_logic() = default; public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 181 "regex.h2" +#line 187 "regex.h2" }; template class char_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> bstring; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 187 "regex.h2" +#line 194 "regex.h2" }; template class single_class_entry @@ -265,7 +272,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 193 "regex.h2" +#line 200 "regex.h2" }; template class range_class_entry @@ -276,36 +283,39 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 199 "regex.h2" +#line 206 "regex.h2" }; template class class_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 214 "regex.h2" +#line 221 "regex.h2" + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 226 "regex.h2" +#line 235 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 236 "regex.h2" +#line 245 "regex.h2" }; -#line 239 "regex.h2" +#line 248 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; public: empty_matcher_logic() = default; public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 243 "regex.h2" +#line 253 "regex.h2" }; template class escaped_char_matcher_logic @@ -316,34 +326,37 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 249 "regex.h2" +#line 259 "regex.h2" }; template class line_end_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> bstring; public: line_end_matcher_logic() = default; public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 255 "regex.h2" +#line 266 "regex.h2" }; template class line_start_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; public: line_start_matcher_logic() = default; public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 261 "regex.h2" +#line 273 "regex.h2" }; template class list_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; @@ -352,80 +365,85 @@ template class list_matcher_logic public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 286 "regex.h2" +#line 302 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 297 "regex.h2" +#line 313 "regex.h2" + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 305 "regex.h2" +#line 322 "regex.h2" }; template class group_ref_matcher_logic { public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 311 "regex.h2" +#line 329 "regex.h2" }; -template class range_matcher_logic { +template class range_matcher_logic { // TODO: Add static assert on min_count and max_count. public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 335 "regex.h2" +#line 359 "regex.h2" + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; + +#line 371 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 353 "regex.h2" +#line 389 "regex.h2" }; -template class special_range_matcher_logic: public range_matcher_logic { +template class special_range_matcher_logic: public range_matcher_logic { -#line 358 "regex.h2" +#line 394 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 359 "regex.h2" +#line 395 "regex.h2" }; class regex_parser_state { public: std::vector cur_match_list {}; public: std::vector> alternate_match_lists {}; -public: auto start_new_list() & -> void; + public: auto start_new_list() & -> void; -#line 371 "regex.h2" +#line 407 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 376 "regex.h2" +#line 412 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 380 "regex.h2" +#line 416 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 387 "regex.h2" +#line 423 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 391 "regex.h2" +#line 427 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -434,70 +452,78 @@ template class regex_parser { private: int named_groups {1}; // Global capture group. + private: std::vector matcher_states {}; + private: Error_out error_out; public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 406 "regex.h2" +#line 444 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 412 "regex.h2" +#line 450 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 416 "regex.h2" +#line 454 "regex.h2" + private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; + +#line 460 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 428 "regex.h2" +#line 472 "regex.h2" private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; -#line 438 "regex.h2" +#line 482 "regex.h2" + public: [[nodiscard]] auto create_matcher_state() const& -> std::string; + +#line 487 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; -#line 460 "regex.h2" +#line 509 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 464 "regex.h2" +#line 513 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 471 "regex.h2" +#line 520 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 485 "regex.h2" +#line 534 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 493 "regex.h2" +#line 542 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 561 "regex.h2" +#line 610 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 595 "regex.h2" +#line 644 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 614 "regex.h2" +#line 663 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 623 "regex.h2" +#line 672 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 665 "regex.h2" +#line 715 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 690 "regex.h2" +#line 741 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 711 "regex.h2" +#line 762 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 719 "regex.h2" +#line 771 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 728 "regex.h2" +#line 780 "regex.h2" } } @@ -521,37 +547,38 @@ namespace regex { } } -#line 86 "regex.h2" - template match_context::match_context() +#line 88 "regex.h2" + template match_context::match_context() : str{ "" }{// TODO: How to delegate??? -#line 88 "regex.h2" +#line 90 "regex.h2" CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); } - template match_context::match_context(view const& s) + template match_context::match_context(view const& s) : str{ s }{ -#line 92 "regex.h2" +#line 94 "regex.h2" CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); } -#line 90 "regex.h2" - template auto match_context::operator=(view const& s) -> match_context& { +#line 92 "regex.h2" + template auto match_context::operator=(view const& s) -> match_context& { str = s; ranges = {}; groups = {}; + state = {}; -#line 92 "regex.h2" +#line 94 "regex.h2" CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); return *this; -#line 93 "regex.h2" +#line 95 "regex.h2" } - template auto match_context::set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void{ + template auto match_context::set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void{ CPP2_ASSERT_IN_BOUNDS(ranges, group) = { pos, pos + length }; CPP2_ASSERT_IN_BOUNDS(groups, group) = CPP2_UFCS(substr)(str, pos, pos + length); } - template [[nodiscard]] auto match_context::print_ranges() const& -> bstring{ + template [[nodiscard]] auto match_context::print_ranges() const& -> bstring{ bstring r {""}; for ( auto const& cur : ranges ) { if (cur.first != bstring::npos) { @@ -565,23 +592,25 @@ namespace regex { return r; } -#line 119 "regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> bool{ + template template [[nodiscard]] auto match_context::get_state() & -> auto { return &std::get(state); } + +#line 123 "regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> bool{ context ctx {str}; // TODO: Wrong error about not initialized. auto r {match(str, ctx)}; static_cast(std::move(ctx)); return r; } - template [[nodiscard]] auto regular_expression::match(cpp2::in> str, context& ctx) const& -> bool{// TODO: Could call method with out parameter. + template [[nodiscard]] auto regular_expression::match(cpp2::in> str, context& ctx) const& -> bool{// TODO: Could call method with out parameter. ctx = { str }; auto r {Matcher::match(0, ctx)}; return std::move(r).matched && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).first == 0 && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).second == CPP2_UFCS(size)(str); } - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool { return search(str, 0, ctx); } - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool{ + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool { return search(str, 0, ctx); } + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool{ ctx = { str }; // TODO: Improve find logic. (E.g. skip more elements on failure.) @@ -595,10 +624,11 @@ namespace regex { return false; } - template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } + template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 157 "regex.h2" +#line 161 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } + template [[nodiscard]] auto alternative_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ @@ -617,23 +647,25 @@ namespace regex { } } -#line 179 "regex.h2" +#line 184 "regex.h2" template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } + template [[nodiscard]] auto any_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 185 "regex.h2" +#line 191 "regex.h2" template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } + template [[nodiscard]] auto char_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 191 "regex.h2" +#line 198 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 197 "regex.h2" +#line 204 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 203 "regex.h2" +#line 210 "regex.h2" template [[nodiscard]] auto class_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; bool r {match_any(std::move(c))}; @@ -645,6 +677,8 @@ namespace regex { return match_return::create(std::move(r), 1); } + template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ bool r {First::includes(c)}; @@ -668,23 +702,27 @@ namespace regex { return r; } -#line 241 "regex.h2" +#line 250 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } + template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 248 "regex.h2" +#line 258 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } -#line 253 "regex.h2" +#line 263 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. + template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 259 "regex.h2" +#line 270 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. + template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 265 "regex.h2" +#line 277 "regex.h2" template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } + template [[nodiscard]] auto list_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ @@ -692,13 +730,16 @@ namespace regex { if (r.matched) { if constexpr (0 != sizeof...(Other)) { - match_return o {match_all(pos + r.length, ctx)}; + while( r.matched ) { + match_return o {match_all(pos + r.length, ctx)}; - if (o.matched) { - r.length += std::move(o).length; - } - else { - r = { false, 0 }; + if (o.matched) { + r.length += o.length; + break; + } + else { + r = First::alternate_match(pos, ctx); + } } } } @@ -706,7 +747,7 @@ namespace regex { return r; } -#line 289 "regex.h2" +#line 305 "regex.h2" template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::match(pos, ctx)}; @@ -715,6 +756,7 @@ namespace regex { } return r; } + template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring{ if (group == 0) { return M::to_string(); @@ -724,20 +766,25 @@ namespace regex { } } -#line 308 "regex.h2" +#line 325 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } + template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 317 "regex.h2" - template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ +#line 335 "regex.h2" + template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + CPP2_UFCS(clear)((*cpp2::assert_not_null(state))); + int count {0}; o = M::match(pos, ctx); for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx) ) { + CPP2_UFCS(push_back)((*cpp2::assert_not_null(state)), r.length); r.length += o.length; count += 1; @@ -746,9 +793,23 @@ namespace regex { } } + static_cast(std::move(state)); return match_return::create(cpp2::cmp_greater_eq(std::move(count),min_count), std::move(r).length); } - template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ + + template [[nodiscard]] auto range_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + + if (!(CPP2_UFCS(empty)((*cpp2::assert_not_null(state))))) { + auto length {CPP2_UFCS(back)((*cpp2::assert_not_null(state)))}; + CPP2_UFCS(pop_back)((*cpp2::assert_not_null(state))); + return match_return::create(cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(std::move(state)))),min_count), std::move(length)); + }else { + return match_return(false, 0); + } + } + + template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ std::string r {M::to_string()}; if (min_count == max_count) { @@ -767,11 +828,11 @@ namespace regex { return r; } -#line 358 "regex.h2" - template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } +#line 394 "regex.h2" + template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 365 "regex.h2" -auto regex_parser_state::start_new_list() & -> void{ +#line 401 "regex.h2" + auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(begin)(alternate_match_lists), std::move(new_list))); @@ -795,12 +856,12 @@ auto regex_parser_state::start_new_list() & -> void{ [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 401 "regex.h2" +#line 439 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 404 "regex.h2" +#line 442 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -813,6 +874,12 @@ auto regex_parser_state::start_new_list() & -> void{ cur_state = old_state; } + template [[nodiscard]] auto regex_parser::push_matcher_state(cpp2::in t) & -> int{ + auto id {CPP2_UFCS(ssize)(matcher_states)}; + CPP2_UFCS(push_back)(matcher_states, t); + return id; + } + template [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ std::string r {""}; @@ -835,6 +902,11 @@ auto regex_parser_state::start_new_list() & -> void{ return matcher; } + template [[nodiscard]] auto regex_parser::create_matcher_state() const& -> std::string{ + auto inner {join(matcher_states)}; + return "std::tuple<" + cpp2::to_string(std::move(inner)) + ">"; + } + template [[nodiscard]] auto regex_parser::create_matcher_from_state() const& -> std::string{ // Early out for no alternatives if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } @@ -1056,7 +1128,8 @@ auto regex_parser_state::start_new_list() & -> void{ } // TODO: Check 0 <=n <= m - CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); + auto matcher_state {push_matcher_state("std::vector")}; + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); pos = std::move(end); return true; @@ -1083,7 +1156,8 @@ auto regex_parser_state::start_new_list() & -> void{ error("'" + cpp2::to_string(c) + "' without previous element."); } - CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); + auto matcher_state {push_matcher_state("std::vector")}; + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); return true; } @@ -1113,10 +1187,11 @@ auto regex_parser_state::start_new_list() & -> void{ parse_until('\0'); auto inner {create_matcher_from_state()}; - return "::cpp2::regex::regular_expression, " + cpp2::to_string(named_groups) + ">"; + auto matcher_state {create_matcher_state()}; + return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 721 "regex.h2" +#line 773 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index dc08fae0b4..c2482f9ead 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -77,12 +77,14 @@ match_return: @struct type = } } -match_context: type = +match_context: type = { public str: view; public ranges: std::array, max_groups> = (); public groups: std::array, max_groups> = (); + public state: State = (); + operator=: (out this) = { // TODO: How to delegate??? str = ""; ranges.fill(std::make_pair(bstring::npos, bstring::npos)); @@ -110,11 +112,13 @@ match_context: type = return r; } + + get_state: (inout this) -> _ = std::get(state)&; } -regular_expression: type = { +regular_expression: type = { - context: type == match_context; + context: type == match_context; match: (in this, str: view) -> bool = { ctx: context = (str); // TODO: Wrong error about not initialized. @@ -155,6 +159,7 @@ regular_expression: type = { alternative_matcher_logic: type = { match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> _ = ((bstring() + ... + ("|" + List::to_string()))).substr(1); // substr: Remove first '|'. private match_all: (pos: size_t, inout ctx: _) -> match_return = { @@ -177,12 +182,14 @@ alternative_matcher_logic: type = { any_matcher_logic: type = { match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size(), 1); + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> bstring = bstring(1, '.'); } char_matcher_logic: type = { match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size() && ctx.str[pos] == C, 1); + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> bstring = bstring(1, C); } @@ -211,6 +218,8 @@ class_matcher_logic: type = return match_return::create(r, 1); } + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + private match_any: (c: CharT) -> bool = { r: bool = First::includes(c); @@ -239,6 +248,7 @@ class_matcher_logic: type = empty_matcher_logic: type = { match: (pos: size_t, inout ctx: _) match_return(true, 0); + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () bstring(); } @@ -251,18 +261,21 @@ escaped_char_matcher_logic: type = line_end_matcher_logic: type = { match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == ctx.str.size() || ctx.str[pos] == '\n', 0); // TODO: Extend to other line feeds. + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> bstring = "\\$"; } line_start_matcher_logic: type = { match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == 0 || ctx.str[pos - 1] == '\n', 0); // TODO: Extend to other line feeds. + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> _ = bstring(1, '^'); } list_matcher_logic: type = { match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> _ = (bstring() + ... + List::to_string()); private match_all: (pos: size_t, inout ctx: _) -> match_return = { @@ -270,13 +283,16 @@ list_matcher_logic: type = if r.matched { if constexpr 0 != sizeof...(Other) { - o: match_return = match_all(pos + r.length, ctx); + while r.matched { + o: match_return = match_all(pos + r.length, ctx); - if o.matched { - r.length += o.length; - } - else { - r = (false, 0); + if o.matched { + r.length += o.length; + break; + } + else { + r = First::alternate_match(pos, ctx); + } } } } @@ -294,6 +310,7 @@ group_matcher_logic: type = { } return r; } + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> bstring = { if group == 0 { return M::to_string(); @@ -307,10 +324,11 @@ group_matcher_logic: type = { group_ref_matcher_logic: type = { match: (pos: size_t, inout ctx: _) -> _ = match_return::create(ctx.str.substr(pos).starts_with(ctx.groups[group]), ctx.groups[group].size()); + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); to_string: () -> bstring = "\\((group)$)"; } -range_matcher_logic: type = { +range_matcher_logic: type = { // TODO: Add static assert on min_count and max_count. @@ -318,10 +336,14 @@ range_matcher_logic: type = { r: match_return = (true, 0); o: match_return = (true, 0); + state := ctx.get_state(); + state*.clear(); + count: int = 0; o = M::match(pos, ctx); while (o.matched && count < max_count) next o = M::match(pos + r.length, ctx) { + state*.push_back(r.length); r.length += o.length; count += 1; @@ -330,8 +352,22 @@ range_matcher_logic: type = { } } + _ = state; return match_return::create(count >= min_count, r.length); } + + alternate_match: (pos: size_t, inout ctx) -> match_return = { + state := ctx.get_state(); + + if !state*.empty() { + length := state*.back(); + state*.pop_back(); + return match_return::create(state*.ssize() >= min_count, length); + } else { + return match_return(false, 0); + } + } + to_string: () -> bstring = { r: std::string = M::to_string(); @@ -352,8 +388,8 @@ range_matcher_logic: type = { } } -special_range_matcher_logic: type = { - this: range_matcher_logic = (); +special_range_matcher_logic: type = { + this: range_matcher_logic = (); to_string: () -> bstring = M::to_string() + symbol; } @@ -362,7 +398,7 @@ regex_parser_state: @struct type = { cur_match_list: std::vector = (); alternate_match_lists: std::vector> = (); -start_new_list: (inout this) = { + start_new_list: (inout this) = { new_list: std::vector = (); std::swap(new_list, cur_match_list); _ = alternate_match_lists.insert(alternate_match_lists.begin(), new_list); @@ -396,6 +432,8 @@ regex_parser: type = { named_groups: int = 1; // Global capture group. + matcher_states: std::vector = (); + error_out: Error_out; operator=: (out this, r: std::string_view, e: Error_out) = { @@ -413,6 +451,12 @@ regex_parser: type = { cur_state = old_state; } + private push_matcher_state: (inout this, t: std::string) -> int = { + id := matcher_states.ssize(); + matcher_states.push_back(t); + return id; + } + private join: (list: std::vector) -> std::string = { r: std::string = ""; @@ -435,6 +479,11 @@ regex_parser: type = { return matcher; } + create_matcher_state: (this) -> std::string = { + inner := join(matcher_states); + return "std::tuple<(inner)$>"; + } + create_matcher_from_state: (this) -> std::string = { // Early out for no alternatives if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } @@ -656,7 +705,8 @@ regex_parser: type = { } // TODO: Check 0 <=n <= m - cur_state.wrap_last( :(inner) -> _ == "::cpp2::regex::range_matcher_logic"); + matcher_state := push_matcher_state("std::vector"); + cur_state.wrap_last( :(inner) -> _ == "::cpp2::regex::range_matcher_logic"); pos = end; return true; @@ -683,7 +733,8 @@ regex_parser: type = { error("'(c)$' without previous element."); } - cur_state.wrap_last(:(inner) -> _ == "::cpp2::regex::special_range_matcher_logic"); + matcher_state := push_matcher_state("std::vector"); + cur_state.wrap_last(:(inner) -> _ == "::cpp2::regex::special_range_matcher_logic"); return true; } @@ -713,7 +764,8 @@ regex_parser: type = { parse_until('\0'); inner := create_matcher_from_state(); - return "::cpp2::regex::regular_expression, (named_groups)$>"; + matcher_state := create_matcher_state(); + return "::cpp2::regex::regular_expression, (matcher_state)$, (named_groups)$>"; } } From 4d58428e8a836d9a790f322e50e34af12b93af27 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Tue, 2 Jan 2024 15:36:51 +0100 Subject: [PATCH 013/161] Proper range printing and group invalidation on alternatives. --- source/regex.h | 440 ++++++++++++++++++++++++++++++++---------------- source/regex.h2 | 173 +++++++++++++++---- 2 files changed, 432 insertions(+), 181 deletions(-) diff --git a/source/regex.h b/source/regex.h index af6a34aecc..2294165061 100644 --- a/source/regex.h +++ b/source/regex.h @@ -23,66 +23,70 @@ class match_return; #line 80 "regex.h2" template class match_context; -#line 119 "regex.h2" +#line 124 "regex.h2" template class regular_expression; -#line 160 "regex.h2" +#line 165 "regex.h2" template class alternative_matcher_logic; -#line 182 "regex.h2" +#line 198 "regex.h2" template class any_matcher_logic; -#line 189 "regex.h2" +#line 206 "regex.h2" template class char_matcher_logic; -#line 196 "regex.h2" +#line 214 "regex.h2" template class single_class_entry; -#line 202 "regex.h2" +#line 220 "regex.h2" template class range_class_entry; -#line 208 "regex.h2" +#line 226 "regex.h2" template class class_matcher_logic; -#line 248 "regex.h2" +#line 267 "regex.h2" template class empty_matcher_logic; -#line 255 "regex.h2" +#line 275 "regex.h2" template class escaped_char_matcher_logic; -#line 261 "regex.h2" +#line 281 "regex.h2" template class line_end_matcher_logic; -#line 268 "regex.h2" +#line 289 "regex.h2" template class line_start_matcher_logic; -#line 275 "regex.h2" -template class list_matcher_logic; +#line 297 "regex.h2" +class list_matcher_state; -#line 304 "regex.h2" + +#line 301 "regex.h2" +template class list_matcher_logic; + +#line 385 "regex.h2" template class group_matcher_logic; -#line 324 "regex.h2" +#line 418 "regex.h2" template class group_ref_matcher_logic; -#line 331 "regex.h2" +#line 427 "regex.h2" template class range_matcher_logic; -#line 391 "regex.h2" +#line 497 "regex.h2" template class special_range_matcher_logic; -#line 397 "regex.h2" +#line 503 "regex.h2" class regex_parser_state; -#line 427 "regex.h2" +#line 533 "regex.h2" template class regex_parser; -#line 780 "regex.h2" +#line 887 "regex.h2" } } @@ -186,17 +190,20 @@ template class match_context public: auto operator=(view const& s) -> match_context& ; #line 97 "regex.h2" - public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; + public: auto invalidate_group(cpp2::in group) & -> void; #line 102 "regex.h2" + public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; + +#line 107 "regex.h2" public: [[nodiscard]] auto print_ranges() const& -> bstring; -#line 116 "regex.h2" +#line 121 "regex.h2" public: template [[nodiscard]] auto get_state() & -> auto; public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(match_context const&) -> void = delete; -#line 117 "regex.h2" +#line 122 "regex.h2" }; template class regular_expression { @@ -205,20 +212,20 @@ template class public: [[nodiscard]] auto match(cpp2::in> str) const& -> bool; -#line 130 "regex.h2" +#line 135 "regex.h2" public: [[nodiscard]] auto match(cpp2::in> str, context& ctx) const& -> bool; -#line 137 "regex.h2" +#line 142 "regex.h2" public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; public: [[nodiscard]] auto search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool; -#line 152 "regex.h2" +#line 157 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 153 "regex.h2" +#line 158 "regex.h2" }; /*regular_expression: @interface type = { @@ -227,41 +234,47 @@ template class }*/ template class alternative_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: [[nodiscard]] static auto invalidate_groups(auto& ctx) -> auto; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; + private: template static auto invalidate_all(auto& ctx) -> void; + +#line 179 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 180 "regex.h2" +#line 196 "regex.h2" }; template class any_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; public: [[nodiscard]] static auto to_string() -> bstring; public: any_matcher_logic() = default; public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 187 "regex.h2" +#line 204 "regex.h2" }; template class char_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; public: [[nodiscard]] static auto to_string() -> bstring; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 194 "regex.h2" +#line 212 "regex.h2" }; template class single_class_entry @@ -272,7 +285,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 200 "regex.h2" +#line 218 "regex.h2" }; template class range_class_entry @@ -283,39 +296,41 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 206 "regex.h2" +#line 224 "regex.h2" }; template class class_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; - -#line 221 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; + + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; +#line 242 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 235 "regex.h2" +#line 254 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 245 "regex.h2" +#line 264 "regex.h2" }; -#line 248 "regex.h2" +#line 267 "regex.h2" template class empty_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; public: empty_matcher_logic() = default; public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 253 "regex.h2" +#line 273 "regex.h2" }; template class escaped_char_matcher_logic @@ -326,102 +341,131 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 259 "regex.h2" +#line 279 "regex.h2" }; template class line_end_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> bstring; public: line_end_matcher_logic() = default; public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 266 "regex.h2" +#line 287 "regex.h2" }; template class line_start_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; public: line_start_matcher_logic() = default; public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 273 "regex.h2" +#line 295 "regex.h2" }; -template class list_matcher_logic +class list_matcher_state: public std::vector { + +}; + +template class list_matcher_logic { - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; + + private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; + +#line 315 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; - private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; + private: template static auto invalidate_all(auto& ctx) -> void; + +#line 328 "regex.h2" + private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; + +#line 353 "regex.h2" + private: template [[nodiscard]] static auto rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 302 "regex.h2" +#line 383 "regex.h2" }; template class group_matcher_logic { + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; + +#line 395 "regex.h2" + public: static auto invalidate_groups(auto& ctx) -> void; + +#line 399 "regex.h2" public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 313 "regex.h2" - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; +#line 408 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 322 "regex.h2" +#line 416 "regex.h2" }; template class group_ref_matcher_logic { + public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; + public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; +#line 424 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 329 "regex.h2" +#line 425 "regex.h2" }; template class range_matcher_logic { // TODO: Add static assert on min_count and max_count. - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; + private: [[nodiscard]] static auto get_min_count() -> auto; -#line 359 "regex.h2" +#line 439 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 371 "regex.h2" +#line 451 "regex.h2" + public: static auto invalidate_groups(auto& ctx) -> void; + + public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; + +#line 477 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 389 "regex.h2" +#line 495 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 394 "regex.h2" +#line 500 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 395 "regex.h2" +#line 501 "regex.h2" }; class regex_parser_state { @@ -430,20 +474,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 407 "regex.h2" +#line 513 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 412 "regex.h2" +#line 518 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 416 "regex.h2" +#line 522 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 423 "regex.h2" +#line 529 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 427 "regex.h2" +#line 533 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -458,72 +502,72 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 444 "regex.h2" +#line 550 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 450 "regex.h2" +#line 556 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 454 "regex.h2" +#line 560 "regex.h2" private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; -#line 460 "regex.h2" +#line 566 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 472 "regex.h2" - private: [[nodiscard]] static auto create_matcher_from_list(cpp2::in> list) -> std::string; +#line 578 "regex.h2" + private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; -#line 482 "regex.h2" +#line 589 "regex.h2" public: [[nodiscard]] auto create_matcher_state() const& -> std::string; -#line 487 "regex.h2" - public: [[nodiscard]] auto create_matcher_from_state() const& -> std::string; +#line 594 "regex.h2" + public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 509 "regex.h2" +#line 616 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 513 "regex.h2" +#line 620 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 520 "regex.h2" +#line 627 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 534 "regex.h2" +#line 641 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 542 "regex.h2" +#line 649 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 610 "regex.h2" +#line 717 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 644 "regex.h2" +#line 751 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 663 "regex.h2" +#line 770 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 672 "regex.h2" +#line 779 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 715 "regex.h2" +#line 822 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 741 "regex.h2" +#line 848 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 762 "regex.h2" +#line 869 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 771 "regex.h2" +#line 878 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 780 "regex.h2" +#line 887 "regex.h2" } } @@ -573,6 +617,11 @@ namespace regex { #line 95 "regex.h2" } + template auto match_context::invalidate_group(cpp2::in group) & -> void{ + CPP2_ASSERT_IN_BOUNDS(ranges, group) = { bstring::npos, bstring::npos }; + CPP2_ASSERT_IN_BOUNDS(groups, group) = { }; + } + template auto match_context::set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void{ CPP2_ASSERT_IN_BOUNDS(ranges, group) = { pos, pos + length }; CPP2_ASSERT_IN_BOUNDS(groups, group) = CPP2_UFCS(substr)(str, pos, pos + length); @@ -594,7 +643,7 @@ namespace regex { template template [[nodiscard]] auto match_context::get_state() & -> auto { return &std::get(state); } -#line 123 "regex.h2" +#line 128 "regex.h2" template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> bool{ context ctx {str}; // TODO: Wrong error about not initialized. auto r {match(str, ctx)}; @@ -626,11 +675,20 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 161 "regex.h2" - template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } +#line 166 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template [[nodiscard]] auto alternative_matcher_logic::invalidate_groups(auto& ctx) -> auto { return invalidate_all(ctx); } + template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. + template template auto alternative_matcher_logic::invalidate_all(auto& ctx) -> void{ + First::invalidate_groups(ctx); + + if constexpr (0 != sizeof...(Other)) { + invalidate_all(ctx); + } + } + template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ match_return r {First::match(pos, ctx)}; @@ -638,6 +696,8 @@ namespace regex { return r; } else { + First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. + if constexpr (0 != sizeof...(Other)) { return match_all(pos + std::move(r).length, ctx); } @@ -647,25 +707,30 @@ namespace regex { } } -#line 184 "regex.h2" - template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } +#line 200 "regex.h2" template [[nodiscard]] auto any_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template auto any_matcher_logic::invalidate_groups(auto& ctx) -> void{} + template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 191 "regex.h2" - template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } +#line 208 "regex.h2" template [[nodiscard]] auto char_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template auto char_matcher_logic::invalidate_groups(auto& ctx) -> void{} + template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 198 "regex.h2" +#line 216 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 204 "regex.h2" +#line 222 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 210 "regex.h2" +#line 228 "regex.h2" + template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template auto class_matcher_logic::invalidate_groups(auto& ctx) -> void{} + template [[nodiscard]] auto class_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; bool r {match_any(std::move(c))}; @@ -677,8 +742,6 @@ namespace regex { return match_return::create(std::move(r), 1); } - template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ bool r {First::includes(c)}; @@ -702,36 +765,62 @@ namespace regex { return r; } -#line 250 "regex.h2" - template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } +#line 269 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template auto empty_matcher_logic::invalidate_groups(auto& ctx) -> void{} + template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 258 "regex.h2" +#line 278 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } -#line 263 "regex.h2" - template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. +#line 283 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template auto line_end_matcher_logic::invalidate_groups(auto& ctx) -> void{} + template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 270 "regex.h2" - template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. +#line 291 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template auto line_start_matcher_logic::invalidate_groups(auto& ctx) -> void{} + template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 277 "regex.h2" - template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } - template [[nodiscard]] auto list_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } +#line 304 "regex.h2" + template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + + if (init) { + CPP2_UFCS(clear)((*cpp2::assert_not_null(state))); + CPP2_UFCS(resize)((*cpp2::assert_not_null(state)), sizeof...(List)); + } + + return state; + } + + template [[nodiscard]] auto list_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return rematch_all(pos, ctx, prepare_state(ctx, false)); } + template auto list_matcher_logic::invalidate_groups(auto& ctx) -> void { invalidate_all(ctx); } + template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx, prepare_state(ctx, true)); } + template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } - template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ + template template auto list_matcher_logic::invalidate_all(auto& ctx) -> void{ + First::invalidate_groups(ctx); + + if constexpr (0 != sizeof...(Other)) { + invalidate_all(ctx); + } + } + + template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ + auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; match_return r {First::match(pos, ctx)}; if (r.matched) { + CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos) = pos; + if constexpr (0 != sizeof...(Other)) { while( r.matched ) { - match_return o {match_all(pos + r.length, ctx)}; + match_return o {match_all(pos + r.length, ctx, state)}; if (o.matched) { r.length += o.length; @@ -747,16 +836,60 @@ namespace regex { return r; } -#line 305 "regex.h2" - template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {M::match(pos, ctx)}; + template template [[nodiscard]] auto list_matcher_logic::rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ + auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; + + match_return r {false, 0}; + if constexpr (0 != sizeof...(Other)) { + r = rematch_all(CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos + 1), ctx, state); + }else { + r = { false, 0 };// Default fails. This triggers the alternate on the last element. + } + + if (!(r.matched)) { + r = First::alternate_match(pos, ctx); + + if constexpr (0 != sizeof...(Other)) { + while( r.matched ) { + match_return o {match_all(pos + r.length, ctx, state)}; + + if (o.matched) { + r.length += o.length; + break; + } + else { + r = First::alternate_match(pos, ctx); + } + } + } + } + + return r; + } + +#line 386 "regex.h2" + template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ + match_return r {M::alternate_match(pos, ctx)}; if (r.matched) { CPP2_UFCS(set_group)(ctx, group, pos, r.length); } return r; } - template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + + template auto group_matcher_logic::invalidate_groups(auto& ctx) -> void{ + CPP2_UFCS(invalidate_group)(ctx, group); + } + + template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ + match_return r {M::match(pos, ctx)}; + + if (r.matched) { + CPP2_UFCS(set_group)(ctx, group, pos, r.length); + } + return r; + } + template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring{ if (group == 0) { return M::to_string(); @@ -766,13 +899,37 @@ namespace regex { } } -#line 325 "regex.h2" +#line 419 "regex.h2" + template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template auto group_ref_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } - template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } + template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 335 "regex.h2" +#line 431 "regex.h2" + template [[nodiscard]] auto range_matcher_logic::get_min_count() -> auto{ + if constexpr (min_count == -1) { + return 0; + }else { + return min_count; + } + } + + template [[nodiscard]] auto range_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + + if (!(CPP2_UFCS(empty)((*cpp2::assert_not_null(state))))) { + auto length {CPP2_UFCS(back)((*cpp2::assert_not_null(state)))}; + CPP2_UFCS(pop_back)((*cpp2::assert_not_null(state))); + return match_return::create(cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(std::move(state)))),get_min_count()), std::move(length)); + }else { + return match_return(false, 0); + } + } + + template auto range_matcher_logic::invalidate_groups(auto& ctx) -> void { M::invalidate_groups(ctx); } + template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {true, 0}; match_return o {true, 0}; @@ -794,19 +951,7 @@ namespace regex { } static_cast(std::move(state)); - return match_return::create(cpp2::cmp_greater_eq(std::move(count),min_count), std::move(r).length); - } - - template [[nodiscard]] auto range_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; - - if (!(CPP2_UFCS(empty)((*cpp2::assert_not_null(state))))) { - auto length {CPP2_UFCS(back)((*cpp2::assert_not_null(state)))}; - CPP2_UFCS(pop_back)((*cpp2::assert_not_null(state))); - return match_return::create(cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(std::move(state)))),min_count), std::move(length)); - }else { - return match_return(false, 0); - } + return match_return::create(cpp2::cmp_greater_eq(std::move(count),get_min_count()), std::move(r).length); } template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ @@ -815,11 +960,11 @@ namespace regex { if (min_count == max_count) { r += "{" + cpp2::to_string(min_count) + "}"; } - else {if (min_count == 0) { + else {if (min_count == -1) { r += "{," + cpp2::to_string(max_count) + "}"; } else {if (max_count == std::numeric_limits::max()) { - r += "(" + cpp2::to_string(min_count) + ",}"; + r += "{" + cpp2::to_string(min_count) + ",}"; } else { r += "{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"; @@ -828,10 +973,10 @@ namespace regex { return r; } -#line 394 "regex.h2" +#line 500 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 401 "regex.h2" +#line 507 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -856,12 +1001,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 439 "regex.h2" +#line 545 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 442 "regex.h2" +#line 548 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -892,10 +1037,11 @@ namespace regex { return r; } - template [[nodiscard]] auto regex_parser::create_matcher_from_list(cpp2::in> list) -> std::string{ + template [[nodiscard]] auto regex_parser::create_matcher_from_list(cpp2::in> list) & -> std::string{ if (CPP2_UFCS(empty)(list)) {return "::cpp2::regex::empty_matcher_logic"; } - std::string matcher {"::cpp2::regex::list_matcher_logic"; } - template [[nodiscard]] auto regex_parser::create_matcher_from_state() const& -> std::string{ + template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ // Early out for no alternatives if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } @@ -1103,7 +1249,7 @@ namespace regex { std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } - std::string min_count {"0"}; + std::string min_count {"-1"}; std::string max_count {"std::numeric_limits::max()"}; size_t sep {CPP2_UFCS(find)(inner, ",")}; @@ -1191,7 +1337,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 773 "regex.h2" +#line 880 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index c2482f9ead..7d0cf9c8d3 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -94,6 +94,11 @@ match_context: type = ranges.fill(std::make_pair(bstring::npos, bstring::npos)); } + invalidate_group: (inout this, group: size_t) = { + ranges[group] = (bstring::npos, bstring::npos); + groups[group] = (); + } + set_group: (inout this, group: size_t, pos: size_t, length: size_t) = { ranges[group] = (pos, pos + length); groups[group] = str.substr(pos, pos + length); @@ -158,10 +163,19 @@ regular_expression: type = { }*/ alternative_matcher_logic: type = { - match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) invalidate_all(ctx); + match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); to_string: () -> _ = ((bstring() + ... + ("|" + List::to_string()))).substr(1); // substr: Remove first '|'. + private invalidate_all: (inout ctx) = { + First::invalidate_groups(ctx); + + if constexpr 0 != sizeof...(Other) { + invalidate_all(ctx); + } + } + private match_all: (pos: size_t, inout ctx: _) -> match_return = { r: match_return = First::match(pos, ctx); @@ -169,6 +183,8 @@ alternative_matcher_logic: type = { return r; } else { + First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. + if constexpr 0 != sizeof...(Other) { return match_all(pos + r.length, ctx); } @@ -181,15 +197,17 @@ alternative_matcher_logic: type = { any_matcher_logic: type = { - match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size(), 1); alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) = {} + match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size(), 1); to_string: () -> bstring = bstring(1, '.'); } char_matcher_logic: type = { - match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size() && ctx.str[pos] == C, 1); alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) = {} + match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size() && ctx.str[pos] == C, 1); to_string: () -> bstring = bstring(1, C); } @@ -207,6 +225,9 @@ range_class_entry: type = class_matcher_logic: type = { + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) = {} + match: (pos: size_t, inout ctx: _) -> match_return = { c: CharT = ctx.str[pos]; r: bool = match_any(c); @@ -218,8 +239,6 @@ class_matcher_logic: type = return match_return::create(r, 1); } - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - private match_any: (c: CharT) -> bool = { r: bool = First::includes(c); @@ -247,8 +266,9 @@ class_matcher_logic: type = empty_matcher_logic: type = { - match: (pos: size_t, inout ctx: _) match_return(true, 0); alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) = {} + match: (pos: size_t, inout ctx: _) match_return(true, 0); to_string: () bstring(); } @@ -260,31 +280,61 @@ escaped_char_matcher_logic: type = line_end_matcher_logic: type = { - match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == ctx.str.size() || ctx.str[pos] == '\n', 0); // TODO: Extend to other line feeds. alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) = {} + match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == ctx.str.size() || ctx.str[pos] == '\n', 0); // TODO: Extend to other line feeds. to_string: () -> bstring = "\\$"; } line_start_matcher_logic: type = { - match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == 0 || ctx.str[pos - 1] == '\n', 0); // TODO: Extend to other line feeds. alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) = {} + match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == 0 || ctx.str[pos - 1] == '\n', 0); // TODO: Extend to other line feeds. to_string: () -> _ = bstring(1, '^'); } -list_matcher_logic: type = +list_matcher_state: @struct type = { + this: std::vector = 0; +} + +list_matcher_logic: type = { - match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + + private prepare_state: (inout ctx, init: bool) -> _ = { + state := ctx.get_state(); + + if init { + state*.clear(); + state*.resize(sizeof...(List)); + } + + return state; + } + + alternate_match: (pos: size_t, inout ctx) rematch_all(pos, ctx, prepare_state(ctx, false)); + invalidate_groups: (inout ctx) = invalidate_all(ctx); + match: (pos: size_t, inout ctx: _) match_all(pos, ctx, prepare_state(ctx, true)); to_string: () -> _ = (bstring() + ... + List::to_string()); - private match_all: (pos: size_t, inout ctx: _) -> match_return = { + private invalidate_all: (inout ctx) = { + First::invalidate_groups(ctx); + + if constexpr 0 != sizeof...(Other) { + invalidate_all(ctx); + } + } + + private match_all: (pos: size_t, inout ctx, state) -> match_return = { + entry_pos :== sizeof...(List) - sizeof...(Other) - 1; r: match_return = First::match(pos, ctx); if r.matched { + state*[entry_pos] = pos; + if constexpr 0 != sizeof...(Other) { while r.matched { - o: match_return = match_all(pos + r.length, ctx); + o: match_return = match_all(pos + r.length, ctx, state); if o.matched { r.length += o.length; @@ -299,9 +349,51 @@ list_matcher_logic: type = return r; } + + private rematch_all: (pos: size_t, inout ctx, state) -> match_return = { + entry_pos :== sizeof...(List) - sizeof...(Other) - 1; + + r: match_return = (false, 0); + if constexpr 0 != sizeof...(Other) { + r = rematch_all(state*[entry_pos + 1], ctx, state); + } else { + r = (false, 0); // Default fails. This triggers the alternate on the last element. + } + + if !r.matched { + r = First::alternate_match(pos, ctx); + + if constexpr 0 != sizeof...(Other) { + while r.matched { + o: match_return = match_all(pos + r.length, ctx, state); + + if o.matched { + r.length += o.length; + break; + } + else { + r = First::alternate_match(pos, ctx); + } + } + } + } + + return r; + } } group_matcher_logic: type = { + alternate_match: (pos: size_t, inout ctx) -> match_return = { + r: match_return = M::alternate_match(pos, ctx); + + if r.matched { + ctx.set_group(group, pos, r.length); + } + return r; + } + + invalidate_groups: (inout ctx) = ctx.invalidate_group(group); + match: (pos: size_t, inout ctx: _) -> match_return = { r: match_return = M::match(pos, ctx); @@ -310,7 +402,7 @@ group_matcher_logic: type = { } return r; } - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + to_string: () -> bstring = { if group == 0 { return M::to_string(); @@ -322,9 +414,11 @@ group_matcher_logic: type = { } group_ref_matcher_logic: type = { + alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + invalidate_groups: (inout ctx) = {} match: (pos: size_t, inout ctx: _) -> _ = match_return::create(ctx.str.substr(pos).starts_with(ctx.groups[group]), ctx.groups[group].size()); - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); + to_string: () -> bstring = "\\((group)$)"; } @@ -332,6 +426,28 @@ range_matcher_logic: _ = { + if constexpr min_count == -1 { + return 0; + } else { + return min_count; + } + } + + alternate_match: (pos: size_t, inout ctx) -> match_return = { + state := ctx.get_state(); + + if !state*.empty() { + length := state*.back(); + state*.pop_back(); + return match_return::create(state*.ssize() >= get_min_count(), length); + } else { + return match_return(false, 0); + } + } + + invalidate_groups: (inout ctx) = M::invalidate_groups(ctx); + match: (pos: size_t, inout ctx: _) -> match_return = { r: match_return = (true, 0); o: match_return = (true, 0); @@ -353,19 +469,7 @@ range_matcher_logic: = min_count, r.length); - } - - alternate_match: (pos: size_t, inout ctx) -> match_return = { - state := ctx.get_state(); - - if !state*.empty() { - length := state*.back(); - state*.pop_back(); - return match_return::create(state*.ssize() >= min_count, length); - } else { - return match_return(false, 0); - } + return match_return::create(count >= get_min_count(), r.length); } to_string: () -> bstring = { @@ -374,11 +478,11 @@ range_matcher_logic: ::max() { - r += "((min_count)$,}"; + r += "{(min_count)$,}"; } else { r += "{(min_count)$,(max_count)$}"; @@ -469,10 +573,11 @@ regex_parser: type = { return r; } - private create_matcher_from_list: (list: std::vector) -> std::string = { + private create_matcher_from_list: (inout this, list: std::vector) -> std::string = { if list.empty() { return "::cpp2::regex::empty_matcher_logic"; } - matcher: std::string = "::cpp2::regex::list_matcher_logic type = { return "std::tuple<(inner)$>"; } - create_matcher_from_state: (this) -> std::string = { + create_matcher_from_state: (inout this) -> std::string = { // Early out for no alternatives if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } @@ -680,7 +785,7 @@ regex_parser: type = { inner: std::string = trim_copy(regex.substr(pos + 1, end - pos - 1)); if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } - min_count: std::string = "0"; + min_count: std::string = "-1"; max_count: std::string = "std::numeric_limits::max()"; sep: size_t = inner.find(","); From d149512319f004692087676d4bc8f3246ff6e8cb Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Tue, 2 Jan 2024 16:14:36 +0100 Subject: [PATCH 014/161] State management for ranges. No longer invalid groups if last match fails. --- source/regex.h | 243 ++++++++++++++++++++++++++++-------------------- source/regex.h2 | 17 +++- 2 files changed, 156 insertions(+), 104 deletions(-) diff --git a/source/regex.h b/source/regex.h index 2294165061..4f5b49ec86 100644 --- a/source/regex.h +++ b/source/regex.h @@ -23,48 +23,48 @@ class match_return; #line 80 "regex.h2" template class match_context; -#line 124 "regex.h2" +#line 126 "regex.h2" template class regular_expression; -#line 165 "regex.h2" +#line 167 "regex.h2" template class alternative_matcher_logic; -#line 198 "regex.h2" +#line 200 "regex.h2" template class any_matcher_logic; -#line 206 "regex.h2" +#line 208 "regex.h2" template class char_matcher_logic; -#line 214 "regex.h2" +#line 216 "regex.h2" template class single_class_entry; -#line 220 "regex.h2" +#line 222 "regex.h2" template class range_class_entry; -#line 226 "regex.h2" +#line 228 "regex.h2" template class class_matcher_logic; -#line 267 "regex.h2" +#line 269 "regex.h2" template class empty_matcher_logic; -#line 275 "regex.h2" +#line 277 "regex.h2" template class escaped_char_matcher_logic; -#line 281 "regex.h2" +#line 283 "regex.h2" template class line_end_matcher_logic; -#line 289 "regex.h2" +#line 291 "regex.h2" template class line_start_matcher_logic; -#line 297 "regex.h2" +#line 299 "regex.h2" class list_matcher_state; -#line 301 "regex.h2" +#line 303 "regex.h2" template class list_matcher_logic; -#line 385 "regex.h2" +#line 387 "regex.h2" template class group_matcher_logic; @@ -75,18 +75,18 @@ template class group_ref_matcher_logic; #line 427 "regex.h2" template class range_matcher_logic; -#line 497 "regex.h2" +#line 508 "regex.h2" template class special_range_matcher_logic; -#line 503 "regex.h2" +#line 514 "regex.h2" class regex_parser_state; -#line 533 "regex.h2" +#line 544 "regex.h2" template class regex_parser; -#line 887 "regex.h2" +#line 898 "regex.h2" } } @@ -190,20 +190,24 @@ template class match_context public: auto operator=(view const& s) -> match_context& ; #line 97 "regex.h2" + public: match_context(match_context const& that); +#line 97 "regex.h2" + public: auto operator=(match_context const& that) -> match_context& ; +#line 97 "regex.h2" + public: match_context(match_context&& that) noexcept; +#line 97 "regex.h2" + public: auto operator=(match_context&& that) noexcept -> match_context& ; + public: auto invalidate_group(cpp2::in group) & -> void; -#line 102 "regex.h2" +#line 104 "regex.h2" public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; -#line 107 "regex.h2" +#line 109 "regex.h2" public: [[nodiscard]] auto print_ranges() const& -> bstring; -#line 121 "regex.h2" +#line 123 "regex.h2" public: template [[nodiscard]] auto get_state() & -> auto; - public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(match_context const&) -> void = delete; - -#line 122 "regex.h2" }; template class regular_expression { @@ -212,20 +216,20 @@ template class public: [[nodiscard]] auto match(cpp2::in> str) const& -> bool; -#line 135 "regex.h2" +#line 137 "regex.h2" public: [[nodiscard]] auto match(cpp2::in> str, context& ctx) const& -> bool; -#line 142 "regex.h2" +#line 144 "regex.h2" public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; public: [[nodiscard]] auto search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool; -#line 157 "regex.h2" +#line 159 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 158 "regex.h2" +#line 160 "regex.h2" }; /*regular_expression: @interface type = { @@ -241,14 +245,14 @@ template class alternative_matcher_logic { private: template static auto invalidate_all(auto& ctx) -> void; -#line 179 "regex.h2" +#line 181 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 196 "regex.h2" +#line 198 "regex.h2" }; template class any_matcher_logic @@ -261,7 +265,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 204 "regex.h2" +#line 206 "regex.h2" }; template class char_matcher_logic @@ -274,7 +278,7 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 212 "regex.h2" +#line 214 "regex.h2" }; template class single_class_entry @@ -285,7 +289,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 218 "regex.h2" +#line 220 "regex.h2" }; template class range_class_entry @@ -296,7 +300,7 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 224 "regex.h2" +#line 226 "regex.h2" }; template class class_matcher_logic @@ -306,20 +310,20 @@ template class class_matcher_logi public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 242 "regex.h2" +#line 244 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 254 "regex.h2" +#line 256 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 264 "regex.h2" +#line 266 "regex.h2" }; -#line 267 "regex.h2" +#line 269 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; @@ -330,7 +334,7 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 273 "regex.h2" +#line 275 "regex.h2" }; template class escaped_char_matcher_logic @@ -341,7 +345,7 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 279 "regex.h2" +#line 281 "regex.h2" }; template class line_end_matcher_logic @@ -354,7 +358,7 @@ template class line_end_matcher_logic public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 287 "regex.h2" +#line 289 "regex.h2" }; template class line_start_matcher_logic @@ -367,7 +371,7 @@ template class line_start_matcher_logic public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 295 "regex.h2" +#line 297 "regex.h2" }; class list_matcher_state: public std::vector { @@ -379,7 +383,7 @@ template class list_matcher_l private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; -#line 315 "regex.h2" +#line 317 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -387,26 +391,25 @@ template class list_matcher_l private: template static auto invalidate_all(auto& ctx) -> void; -#line 328 "regex.h2" +#line 330 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; -#line 353 "regex.h2" +#line 355 "regex.h2" private: template [[nodiscard]] static auto rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 383 "regex.h2" +#line 385 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 395 "regex.h2" +#line 397 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; -#line 399 "regex.h2" public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; #line 408 "regex.h2" @@ -447,25 +450,25 @@ template pos, auto& ctx) -> match_return; -#line 477 "regex.h2" +#line 488 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 495 "regex.h2" +#line 506 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 500 "regex.h2" +#line 511 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 501 "regex.h2" +#line 512 "regex.h2" }; class regex_parser_state { @@ -474,20 +477,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 513 "regex.h2" +#line 524 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 518 "regex.h2" +#line 529 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 522 "regex.h2" +#line 533 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 529 "regex.h2" +#line 540 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 533 "regex.h2" +#line 544 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -502,72 +505,72 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 550 "regex.h2" +#line 561 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 556 "regex.h2" +#line 567 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 560 "regex.h2" +#line 571 "regex.h2" private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; -#line 566 "regex.h2" +#line 577 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 578 "regex.h2" +#line 589 "regex.h2" private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; -#line 589 "regex.h2" +#line 600 "regex.h2" public: [[nodiscard]] auto create_matcher_state() const& -> std::string; -#line 594 "regex.h2" +#line 605 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 616 "regex.h2" +#line 627 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 620 "regex.h2" +#line 631 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 627 "regex.h2" +#line 638 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 641 "regex.h2" +#line 652 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 649 "regex.h2" +#line 660 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 717 "regex.h2" +#line 728 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 751 "regex.h2" +#line 762 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 770 "regex.h2" +#line 781 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 779 "regex.h2" +#line 790 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 822 "regex.h2" +#line 833 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 848 "regex.h2" +#line 859 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 869 "regex.h2" +#line 880 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 878 "regex.h2" +#line 889 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 887 "regex.h2" +#line 898 "regex.h2" } } @@ -617,6 +620,33 @@ namespace regex { #line 95 "regex.h2" } + template match_context::match_context(match_context const& that) + : str{ that.str } + , ranges{ that.ranges } + , groups{ that.groups } + , state{ that.state }{} +#line 97 "regex.h2" + template auto match_context::operator=(match_context const& that) -> match_context& { + str = that.str; + ranges = that.ranges; + groups = that.groups; + state = that.state; + return *this; } +#line 97 "regex.h2" + template match_context::match_context(match_context&& that) noexcept + : str{ std::move(that).str } + , ranges{ std::move(that).ranges } + , groups{ std::move(that).groups } + , state{ std::move(that).state }{} +#line 97 "regex.h2" + template auto match_context::operator=(match_context&& that) noexcept -> match_context& { + str = std::move(that).str; + ranges = std::move(that).ranges; + groups = std::move(that).groups; + state = std::move(that).state; + return *this; } + +#line 99 "regex.h2" template auto match_context::invalidate_group(cpp2::in group) & -> void{ CPP2_ASSERT_IN_BOUNDS(ranges, group) = { bstring::npos, bstring::npos }; CPP2_ASSERT_IN_BOUNDS(groups, group) = { }; @@ -643,7 +673,7 @@ namespace regex { template template [[nodiscard]] auto match_context::get_state() & -> auto { return &std::get(state); } -#line 128 "regex.h2" +#line 130 "regex.h2" template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> bool{ context ctx {str}; // TODO: Wrong error about not initialized. auto r {match(str, ctx)}; @@ -675,7 +705,7 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 166 "regex.h2" +#line 168 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template [[nodiscard]] auto alternative_matcher_logic::invalidate_groups(auto& ctx) -> auto { return invalidate_all(ctx); } template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } @@ -707,27 +737,27 @@ namespace regex { } } -#line 200 "regex.h2" +#line 202 "regex.h2" template [[nodiscard]] auto any_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto any_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 208 "regex.h2" +#line 210 "regex.h2" template [[nodiscard]] auto char_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto char_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 216 "regex.h2" +#line 218 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 222 "regex.h2" +#line 224 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 228 "regex.h2" +#line 230 "regex.h2" template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto class_matcher_logic::invalidate_groups(auto& ctx) -> void{} @@ -765,28 +795,28 @@ namespace regex { return r; } -#line 269 "regex.h2" +#line 271 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto empty_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 278 "regex.h2" +#line 280 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } -#line 283 "regex.h2" +#line 285 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_end_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 291 "regex.h2" +#line 293 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_start_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 304 "regex.h2" +#line 306 "regex.h2" template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; @@ -867,7 +897,7 @@ namespace regex { return r; } -#line 386 "regex.h2" +#line 388 "regex.h2" template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::alternate_match(pos, ctx)}; @@ -877,9 +907,7 @@ namespace regex { return r; } - template auto group_matcher_logic::invalidate_groups(auto& ctx) -> void{ - CPP2_UFCS(invalidate_group)(ctx, group); - } + template auto group_matcher_logic::invalidate_groups(auto& ctx) -> void { CPP2_UFCS(invalidate_group)(ctx, group); } template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::match(pos, ctx)}; @@ -940,7 +968,10 @@ namespace regex { int count {0}; o = M::match(pos, ctx); - for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx) ) { + auto ctx_copy {ctx}; + for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx_copy) ) { + ctx = ctx_copy; + CPP2_UFCS(push_back)((*cpp2::assert_not_null(state)), r.length); r.length += o.length; count += 1; @@ -948,10 +979,18 @@ namespace regex { if (o.length == 0) { break; } + + ctx_copy = ctx; // For context. TODO: Separate context and state. } static_cast(std::move(state)); - return match_return::create(cpp2::cmp_greater_eq(std::move(count),get_min_count()), std::move(r).length); + auto valid {cpp2::cmp_greater_eq(std::move(count),get_min_count())}; + + // If we do not reach the minimal count invalidate all groups. + if (!(valid)) { + M::invalidate_groups(ctx); + } + return match_return::create(std::move(valid), std::move(r).length); } template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ @@ -973,10 +1012,10 @@ namespace regex { return r; } -#line 500 "regex.h2" +#line 511 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 507 "regex.h2" +#line 518 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -1001,12 +1040,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 545 "regex.h2" +#line 556 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 548 "regex.h2" +#line 559 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -1337,7 +1376,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 880 "regex.h2" +#line 891 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 7d0cf9c8d3..24b5023bc5 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -94,6 +94,8 @@ match_context: type = ranges.fill(std::make_pair(bstring::npos, bstring::npos)); } + operator=: (out this, that) = {} + invalidate_group: (inout this, group: size_t) = { ranges[group] = (bstring::npos, bstring::npos); groups[group] = (); @@ -458,7 +460,10 @@ range_matcher_logic: = get_min_count(), r.length); + valid := count >= get_min_count(); + + // If we do not reach the minimal count invalidate all groups. + if !valid { + M::invalidate_groups(ctx); + } + return match_return::create(valid, r.length); } to_string: () -> bstring = { From 1b3456c99151294f7ec69d3cc571a726a10134b4 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Tue, 2 Jan 2024 16:43:56 +0100 Subject: [PATCH 015/161] Range check in class_matcher and restore of groups in ranges_matcher. --- source/regex.h | 166 ++++++++++++++++++++++++++---------------------- source/regex.h2 | 16 ++++- 2 files changed, 103 insertions(+), 79 deletions(-) diff --git a/source/regex.h b/source/regex.h index 4f5b49ec86..3a2c5e3fa8 100644 --- a/source/regex.h +++ b/source/regex.h @@ -45,48 +45,48 @@ template class range_class_entry; #line 228 "regex.h2" template class class_matcher_logic; -#line 269 "regex.h2" +#line 273 "regex.h2" template class empty_matcher_logic; -#line 277 "regex.h2" +#line 281 "regex.h2" template class escaped_char_matcher_logic; -#line 283 "regex.h2" +#line 287 "regex.h2" template class line_end_matcher_logic; -#line 291 "regex.h2" +#line 295 "regex.h2" template class line_start_matcher_logic; -#line 299 "regex.h2" +#line 303 "regex.h2" class list_matcher_state; -#line 303 "regex.h2" +#line 307 "regex.h2" template class list_matcher_logic; -#line 387 "regex.h2" +#line 391 "regex.h2" template class group_matcher_logic; -#line 418 "regex.h2" +#line 422 "regex.h2" template class group_ref_matcher_logic; -#line 427 "regex.h2" +#line 431 "regex.h2" template class range_matcher_logic; -#line 508 "regex.h2" +#line 520 "regex.h2" template class special_range_matcher_logic; -#line 514 "regex.h2" +#line 526 "regex.h2" class regex_parser_state; -#line 544 "regex.h2" +#line 556 "regex.h2" template class regex_parser; -#line 898 "regex.h2" +#line 910 "regex.h2" } } @@ -310,20 +310,20 @@ template class class_matcher_logi public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 244 "regex.h2" +#line 248 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 256 "regex.h2" +#line 260 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 266 "regex.h2" +#line 270 "regex.h2" }; -#line 269 "regex.h2" +#line 273 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; @@ -334,7 +334,7 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 275 "regex.h2" +#line 279 "regex.h2" }; template class escaped_char_matcher_logic @@ -345,7 +345,7 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 281 "regex.h2" +#line 285 "regex.h2" }; template class line_end_matcher_logic @@ -358,7 +358,7 @@ template class line_end_matcher_logic public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 289 "regex.h2" +#line 293 "regex.h2" }; template class line_start_matcher_logic @@ -371,7 +371,7 @@ template class line_start_matcher_logic public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 297 "regex.h2" +#line 301 "regex.h2" }; class list_matcher_state: public std::vector { @@ -383,7 +383,7 @@ template class list_matcher_l private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; -#line 317 "regex.h2" +#line 321 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -391,35 +391,35 @@ template class list_matcher_l private: template static auto invalidate_all(auto& ctx) -> void; -#line 330 "regex.h2" +#line 334 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; -#line 355 "regex.h2" +#line 359 "regex.h2" private: template [[nodiscard]] static auto rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 385 "regex.h2" +#line 389 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 397 "regex.h2" +#line 401 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 408 "regex.h2" +#line 412 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 416 "regex.h2" +#line 420 "regex.h2" }; template class group_ref_matcher_logic { @@ -427,13 +427,13 @@ template class group_ref_matcher_logic { public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; -#line 424 "regex.h2" +#line 428 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 425 "regex.h2" +#line 429 "regex.h2" }; template class range_matcher_logic { @@ -442,33 +442,33 @@ template auto; -#line 439 "regex.h2" +#line 443 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 451 "regex.h2" +#line 463 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 488 "regex.h2" +#line 500 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 506 "regex.h2" +#line 518 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 511 "regex.h2" +#line 523 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 512 "regex.h2" +#line 524 "regex.h2" }; class regex_parser_state { @@ -477,20 +477,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 524 "regex.h2" +#line 536 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 529 "regex.h2" +#line 541 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 533 "regex.h2" +#line 545 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 540 "regex.h2" +#line 552 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 544 "regex.h2" +#line 556 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -505,72 +505,72 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 561 "regex.h2" +#line 573 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 567 "regex.h2" +#line 579 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 571 "regex.h2" +#line 583 "regex.h2" private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; -#line 577 "regex.h2" +#line 589 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 589 "regex.h2" +#line 601 "regex.h2" private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; -#line 600 "regex.h2" +#line 612 "regex.h2" public: [[nodiscard]] auto create_matcher_state() const& -> std::string; -#line 605 "regex.h2" +#line 617 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 627 "regex.h2" +#line 639 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 631 "regex.h2" +#line 643 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 638 "regex.h2" +#line 650 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 652 "regex.h2" +#line 664 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 660 "regex.h2" +#line 672 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 728 "regex.h2" +#line 740 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 762 "regex.h2" +#line 774 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 781 "regex.h2" +#line 793 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 790 "regex.h2" +#line 802 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 833 "regex.h2" +#line 845 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 859 "regex.h2" +#line 871 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 880 "regex.h2" +#line 892 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 889 "regex.h2" +#line 901 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 898 "regex.h2" +#line 910 "regex.h2" } } @@ -762,6 +762,10 @@ namespace regex { template auto class_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto class_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ + if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(ctx.str))) { + return match_return(false, 0); + } + CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; bool r {match_any(std::move(c))}; @@ -790,33 +794,33 @@ namespace regex { r += "^"; } r += (bstring() + ... + List::to_string()); - r += "]';"; + r += "]"; return r; } -#line 271 "regex.h2" +#line 275 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto empty_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 280 "regex.h2" +#line 284 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } -#line 285 "regex.h2" +#line 289 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_end_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 293 "regex.h2" +#line 297 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_start_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 306 "regex.h2" +#line 310 "regex.h2" template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; @@ -897,7 +901,7 @@ namespace regex { return r; } -#line 388 "regex.h2" +#line 392 "regex.h2" template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::alternate_match(pos, ctx)}; @@ -927,7 +931,7 @@ namespace regex { } } -#line 419 "regex.h2" +#line 423 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto group_ref_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { @@ -935,7 +939,7 @@ namespace regex { template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 431 "regex.h2" +#line 435 "regex.h2" template [[nodiscard]] auto range_matcher_logic::get_min_count() -> auto{ if constexpr (min_count == -1) { return 0; @@ -950,7 +954,15 @@ namespace regex { if (!(CPP2_UFCS(empty)((*cpp2::assert_not_null(state))))) { auto length {CPP2_UFCS(back)((*cpp2::assert_not_null(state)))}; CPP2_UFCS(pop_back)((*cpp2::assert_not_null(state))); - return match_return::create(cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(std::move(state)))),get_min_count()), std::move(length)); + + auto valid {cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(state))),get_min_count())}; + if (!(valid) || CPP2_UFCS(empty)((*cpp2::assert_not_null(state)))) { + M::invalidate_groups(ctx); + }else { + M::match(pos + CPP2_UFCS(back)((*cpp2::assert_not_null(std::move(state)))), ctx);// Repopulate the ranges. + } + + return match_return::create(std::move(valid), std::move(length)); }else { return match_return(false, 0); } @@ -1012,10 +1024,10 @@ namespace regex { return r; } -#line 511 "regex.h2" +#line 523 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 518 "regex.h2" +#line 530 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -1040,12 +1052,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 556 "regex.h2" +#line 568 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 559 "regex.h2" +#line 571 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -1376,7 +1388,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 891 "regex.h2" +#line 903 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 24b5023bc5..0188e247a5 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -231,6 +231,10 @@ class_matcher_logic: type = invalidate_groups: (inout ctx) = {} match: (pos: size_t, inout ctx: _) -> match_return = { + if pos >= ctx.str.size() { + return match_return(false, 0); + } + c: CharT = ctx.str[pos]; r: bool = match_any(c); @@ -259,7 +263,7 @@ class_matcher_logic: type = r += "^"; } r += (bstring() + ... + List::to_string()); - r += "]';"; + r += "]"; return r; } @@ -442,7 +446,15 @@ range_matcher_logic: = get_min_count(), length); + + valid := state*.ssize() >= get_min_count(); + if !valid || state*.empty() { + M::invalidate_groups(ctx); + } else { + _ = M::match(pos + state*.back(), ctx); // Repopulate the ranges. + } + + return match_return::create(valid, length); } else { return match_return(false, 0); } From e30bce2a44db35433e9d28c60084d607956837b8 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Tue, 2 Jan 2024 18:20:41 +0100 Subject: [PATCH 016/161] Fix for list matcher and state for alternatives. --- source/regex.h | 260 +++++++++++++++++++++++++++++------------------- source/regex.h2 | 57 +++++++++-- 2 files changed, 206 insertions(+), 111 deletions(-) diff --git a/source/regex.h b/source/regex.h index 3a2c5e3fa8..ae14f85f56 100644 --- a/source/regex.h +++ b/source/regex.h @@ -27,66 +27,65 @@ template class match_context; template class regular_expression; #line 167 "regex.h2" -template class alternative_matcher_logic; - +template class alternative_matcher_logic; -#line 200 "regex.h2" +#line 238 "regex.h2" template class any_matcher_logic; -#line 208 "regex.h2" +#line 246 "regex.h2" template class char_matcher_logic; -#line 216 "regex.h2" +#line 254 "regex.h2" template class single_class_entry; -#line 222 "regex.h2" +#line 260 "regex.h2" template class range_class_entry; -#line 228 "regex.h2" +#line 266 "regex.h2" template class class_matcher_logic; -#line 273 "regex.h2" +#line 311 "regex.h2" template class empty_matcher_logic; -#line 281 "regex.h2" +#line 319 "regex.h2" template class escaped_char_matcher_logic; -#line 287 "regex.h2" +#line 325 "regex.h2" template class line_end_matcher_logic; -#line 295 "regex.h2" +#line 333 "regex.h2" template class line_start_matcher_logic; -#line 303 "regex.h2" +#line 341 "regex.h2" class list_matcher_state; -#line 307 "regex.h2" +#line 345 "regex.h2" template class list_matcher_logic; -#line 391 "regex.h2" +#line 435 "regex.h2" template class group_matcher_logic; -#line 422 "regex.h2" +#line 466 "regex.h2" template class group_ref_matcher_logic; -#line 431 "regex.h2" +#line 475 "regex.h2" template class range_matcher_logic; -#line 520 "regex.h2" +#line 564 "regex.h2" template class special_range_matcher_logic; -#line 526 "regex.h2" +#line 570 "regex.h2" class regex_parser_state; -#line 556 "regex.h2" +#line 600 "regex.h2" template class regex_parser; -#line 910 "regex.h2" +#line 955 "regex.h2" } } @@ -237,22 +236,29 @@ template class match: (pos: size_t, inout ctx: Ctx) -> bool; }*/ -template class alternative_matcher_logic { +template class alternative_matcher_logic { + + private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; + +#line 179 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto invalidate_groups(auto& ctx) -> auto; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto to_string() -> auto; + private: template [[nodiscard]] static auto alternate_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; + +#line 207 "regex.h2" private: template static auto invalidate_all(auto& ctx) -> void; -#line 181 "regex.h2" - private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx) -> match_return; +#line 215 "regex.h2" + private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 198 "regex.h2" +#line 236 "regex.h2" }; template class any_matcher_logic @@ -265,7 +271,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 206 "regex.h2" +#line 244 "regex.h2" }; template class char_matcher_logic @@ -278,7 +284,7 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 214 "regex.h2" +#line 252 "regex.h2" }; template class single_class_entry @@ -289,7 +295,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 220 "regex.h2" +#line 258 "regex.h2" }; template class range_class_entry @@ -300,7 +306,7 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 226 "regex.h2" +#line 264 "regex.h2" }; template class class_matcher_logic @@ -310,20 +316,20 @@ template class class_matcher_logi public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 248 "regex.h2" +#line 286 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 260 "regex.h2" +#line 298 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 270 "regex.h2" +#line 308 "regex.h2" }; -#line 273 "regex.h2" +#line 311 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; @@ -334,7 +340,7 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 279 "regex.h2" +#line 317 "regex.h2" }; template class escaped_char_matcher_logic @@ -345,7 +351,7 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 285 "regex.h2" +#line 323 "regex.h2" }; template class line_end_matcher_logic @@ -358,7 +364,7 @@ template class line_end_matcher_logic public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 293 "regex.h2" +#line 331 "regex.h2" }; template class line_start_matcher_logic @@ -371,7 +377,7 @@ template class line_start_matcher_logic public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 301 "regex.h2" +#line 339 "regex.h2" }; class list_matcher_state: public std::vector { @@ -383,7 +389,7 @@ template class list_matcher_l private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; -#line 321 "regex.h2" +#line 359 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -391,35 +397,35 @@ template class list_matcher_l private: template static auto invalidate_all(auto& ctx) -> void; -#line 334 "regex.h2" +#line 372 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; -#line 359 "regex.h2" +#line 397 "regex.h2" private: template [[nodiscard]] static auto rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 389 "regex.h2" +#line 433 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 401 "regex.h2" +#line 445 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 412 "regex.h2" +#line 456 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 420 "regex.h2" +#line 464 "regex.h2" }; template class group_ref_matcher_logic { @@ -427,13 +433,13 @@ template class group_ref_matcher_logic { public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; -#line 428 "regex.h2" +#line 472 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 429 "regex.h2" +#line 473 "regex.h2" }; template class range_matcher_logic { @@ -442,33 +448,33 @@ template auto; -#line 443 "regex.h2" +#line 487 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 463 "regex.h2" +#line 507 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 500 "regex.h2" +#line 544 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 518 "regex.h2" +#line 562 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 523 "regex.h2" +#line 567 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 524 "regex.h2" +#line 568 "regex.h2" }; class regex_parser_state { @@ -477,20 +483,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 536 "regex.h2" +#line 580 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 541 "regex.h2" +#line 585 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 545 "regex.h2" +#line 589 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 552 "regex.h2" +#line 596 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 556 "regex.h2" +#line 600 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -505,72 +511,72 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 573 "regex.h2" +#line 617 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 579 "regex.h2" +#line 623 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 583 "regex.h2" +#line 627 "regex.h2" private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; -#line 589 "regex.h2" +#line 633 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 601 "regex.h2" +#line 645 "regex.h2" private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; -#line 612 "regex.h2" +#line 656 "regex.h2" public: [[nodiscard]] auto create_matcher_state() const& -> std::string; -#line 617 "regex.h2" +#line 661 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 639 "regex.h2" +#line 684 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 643 "regex.h2" +#line 688 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 650 "regex.h2" +#line 695 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 664 "regex.h2" +#line 709 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 672 "regex.h2" +#line 717 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 740 "regex.h2" +#line 785 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 774 "regex.h2" +#line 819 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 793 "regex.h2" +#line 838 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 802 "regex.h2" +#line 847 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 845 "regex.h2" +#line 890 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 871 "regex.h2" +#line 916 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 892 "regex.h2" +#line 937 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 901 "regex.h2" +#line 946 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 910 "regex.h2" +#line 955 "regex.h2" } } @@ -705,13 +711,46 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 168 "regex.h2" - template [[nodiscard]] auto alternative_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template [[nodiscard]] auto alternative_matcher_logic::invalidate_groups(auto& ctx) -> auto { return invalidate_all(ctx); } - template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx); } - template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. +#line 169 "regex.h2" + template [[nodiscard]] auto alternative_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + + if (init) { + *cpp2::assert_not_null(state) = 0; + } + + return state; + } - template template auto alternative_matcher_logic::invalidate_all(auto& ctx) -> void{ + template [[nodiscard]] auto alternative_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return alternate_all(pos, ctx, prepare_state(ctx, false)); } + template [[nodiscard]] auto alternative_matcher_logic::invalidate_groups(auto& ctx) -> auto { return invalidate_all(ctx); } + template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx, prepare_state(ctx, true)); } + template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. + + template template [[nodiscard]] auto alternative_matcher_logic::alternate_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ + auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; + + match_return r {false, 0}; + if (*cpp2::assert_not_null(state) == entry_pos) { + // Current state is the same element. Try an alternative match. + r = First::alternate_match(pos, ctx); + } + else {if (cpp2::cmp_less((cpp2::as_(*cpp2::assert_not_null(state))),entry_pos)) { + // Previous alternative has not match. Try the next one. + *cpp2::assert_not_null(state) = entry_pos; + r = First::match(pos, ctx); + }} + + if (!(r.matched)) { + if constexpr (0 != sizeof...(Other)) { + r = alternate_all(pos, ctx, state); + } + } + + return r; + } + + template template auto alternative_matcher_logic::invalidate_all(auto& ctx) -> void{ First::invalidate_groups(ctx); if constexpr (0 != sizeof...(Other)) { @@ -719,45 +758,49 @@ namespace regex { } } - template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in pos, auto& ctx) -> match_return{ + template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ + auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; + match_return r {First::match(pos, ctx)}; if (r.matched) { + *cpp2::assert_not_null(state) = entry_pos; return r; } else { First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. if constexpr (0 != sizeof...(Other)) { - return match_all(pos + std::move(r).length, ctx); + return match_all(pos + std::move(r).length, ctx, state); } else { + *cpp2::assert_not_null(state) = sizeof...(List); return { false, 0 }; } } } -#line 202 "regex.h2" +#line 240 "regex.h2" template [[nodiscard]] auto any_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto any_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 210 "regex.h2" +#line 248 "regex.h2" template [[nodiscard]] auto char_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto char_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 218 "regex.h2" +#line 256 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 224 "regex.h2" +#line 262 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 230 "regex.h2" +#line 268 "regex.h2" template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto class_matcher_logic::invalidate_groups(auto& ctx) -> void{} @@ -799,28 +842,28 @@ namespace regex { return r; } -#line 275 "regex.h2" +#line 313 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto empty_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 284 "regex.h2" +#line 322 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } -#line 289 "regex.h2" +#line 327 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_end_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 297 "regex.h2" +#line 335 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_start_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 310 "regex.h2" +#line 348 "regex.h2" template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; @@ -874,8 +917,10 @@ namespace regex { auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; match_return r {false, 0}; + auto length {0}; if constexpr (0 != sizeof...(Other)) { r = rematch_all(CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos + 1), ctx, state); + length = CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos + 1) - CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos); }else { r = { false, 0 };// Default fails. This triggers the alternate on the last element. } @@ -897,11 +942,15 @@ namespace regex { } } } + else { + // Adjust total match length of the list. + r.length += std::move(length); + } return r; } -#line 392 "regex.h2" +#line 436 "regex.h2" template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::alternate_match(pos, ctx)}; @@ -931,7 +980,7 @@ namespace regex { } } -#line 423 "regex.h2" +#line 467 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto group_ref_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { @@ -939,7 +988,7 @@ namespace regex { template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 435 "regex.h2" +#line 479 "regex.h2" template [[nodiscard]] auto range_matcher_logic::get_min_count() -> auto{ if constexpr (min_count == -1) { return 0; @@ -959,7 +1008,7 @@ namespace regex { if (!(valid) || CPP2_UFCS(empty)((*cpp2::assert_not_null(state)))) { M::invalidate_groups(ctx); }else { - M::match(pos + CPP2_UFCS(back)((*cpp2::assert_not_null(std::move(state)))), ctx);// Repopulate the ranges. + static_cast(M::match(pos + CPP2_UFCS(back)((*cpp2::assert_not_null(std::move(state)))), ctx));// Repopulate the ranges. } return match_return::create(std::move(valid), std::move(length)); @@ -1024,10 +1073,10 @@ namespace regex { return r; } -#line 523 "regex.h2" +#line 567 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 530 "regex.h2" +#line 574 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -1052,12 +1101,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 568 "regex.h2" +#line 612 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 571 "regex.h2" +#line 615 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -1108,7 +1157,8 @@ namespace regex { // Early out for no alternatives if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } - std::string matcher {"::cpp2::regex::alternative_matcher_logic void{ @@ -1388,7 +1438,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 903 "regex.h2" +#line 948 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 0188e247a5..8a2e99da6e 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -164,12 +164,46 @@ regular_expression: type = { match: (pos: size_t, inout ctx: Ctx) -> bool; }*/ -alternative_matcher_logic: type = { - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); +alternative_matcher_logic: type = { + + private prepare_state: (inout ctx, init: bool) -> _ = { + state := ctx.get_state(); + + if init { + state* = 0; + } + + return state; + } + + alternate_match: (pos: size_t, inout ctx) alternate_all(pos, ctx, prepare_state(ctx, false)); invalidate_groups: (inout ctx) invalidate_all(ctx); - match: (pos: size_t, inout ctx: _) -> _ = match_all(pos, ctx); + match: (pos: size_t, inout ctx) -> _ = match_all(pos, ctx, prepare_state(ctx, true)); to_string: () -> _ = ((bstring() + ... + ("|" + List::to_string()))).substr(1); // substr: Remove first '|'. + private alternate_all: (pos: size_t, inout ctx, state) -> match_return = { + entry_pos :== sizeof...(List) - sizeof...(Other) - 1; + + r: match_return = (false, 0); + if state* == entry_pos { + // Current state is the same element. Try an alternative match. + r = First::alternate_match(pos, ctx); + } + else if (state* as size_t) < entry_pos { + // Previous alternative has not match. Try the next one. + state* = entry_pos; + r = First::match(pos, ctx); + } + + if !r.matched { + if constexpr 0 != sizeof...(Other) { + r = alternate_all(pos, ctx, state); + } + } + + return r; + } + private invalidate_all: (inout ctx) = { First::invalidate_groups(ctx); @@ -178,19 +212,23 @@ alternative_matcher_logic: type = { } } - private match_all: (pos: size_t, inout ctx: _) -> match_return = { + private match_all: (pos: size_t, inout ctx, state) -> match_return = { + entry_pos :== sizeof...(List) - sizeof...(Other) - 1; + r: match_return = First::match(pos, ctx); if r.matched { + state* = entry_pos; return r; } else { First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. if constexpr 0 != sizeof...(Other) { - return match_all(pos + r.length, ctx); + return match_all(pos + r.length, ctx, state); } else { + state* = sizeof...(List); return (false, 0); } } @@ -360,8 +398,10 @@ list_matcher_logic: type = entry_pos :== sizeof...(List) - sizeof...(Other) - 1; r: match_return = (false, 0); + length: = 0; if constexpr 0 != sizeof...(Other) { r = rematch_all(state*[entry_pos + 1], ctx, state); + length = state*[entry_pos + 1] - state*[entry_pos]; } else { r = (false, 0); // Default fails. This triggers the alternate on the last element. } @@ -383,6 +423,10 @@ list_matcher_logic: type = } } } + else { + // Adjust total match length of the list. + r.length += length; + } return r; } @@ -618,7 +662,8 @@ regex_parser: type = { // Early out for no alternatives if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } - matcher: std::string = "::cpp2::regex::alternative_matcher_logic Date: Tue, 2 Jan 2024 18:31:51 +0100 Subject: [PATCH 017/161] Improved handling of empty matches and ranges. --- source/regex.h | 88 +++++++++++++++++++++++++------------------------ source/regex.h2 | 10 +++--- 2 files changed, 51 insertions(+), 47 deletions(-) diff --git a/source/regex.h b/source/regex.h index ae14f85f56..37998cf003 100644 --- a/source/regex.h +++ b/source/regex.h @@ -74,18 +74,18 @@ template class group_ref_matcher_logic; #line 475 "regex.h2" template class range_matcher_logic; -#line 564 "regex.h2" +#line 566 "regex.h2" template class special_range_matcher_logic; -#line 570 "regex.h2" +#line 572 "regex.h2" class regex_parser_state; -#line 600 "regex.h2" +#line 602 "regex.h2" template class regex_parser; -#line 955 "regex.h2" +#line 957 "regex.h2" } } @@ -456,25 +456,25 @@ template pos, auto& ctx) -> match_return; -#line 544 "regex.h2" +#line 546 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 562 "regex.h2" +#line 564 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 567 "regex.h2" +#line 569 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 568 "regex.h2" +#line 570 "regex.h2" }; class regex_parser_state { @@ -483,20 +483,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 580 "regex.h2" +#line 582 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 585 "regex.h2" +#line 587 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 589 "regex.h2" +#line 591 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 596 "regex.h2" +#line 598 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 600 "regex.h2" +#line 602 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -511,72 +511,72 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 617 "regex.h2" +#line 619 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 623 "regex.h2" +#line 625 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 627 "regex.h2" +#line 629 "regex.h2" private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; -#line 633 "regex.h2" +#line 635 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 645 "regex.h2" +#line 647 "regex.h2" private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; -#line 656 "regex.h2" +#line 658 "regex.h2" public: [[nodiscard]] auto create_matcher_state() const& -> std::string; -#line 661 "regex.h2" +#line 663 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 684 "regex.h2" +#line 686 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 688 "regex.h2" +#line 690 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 695 "regex.h2" +#line 697 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 709 "regex.h2" +#line 711 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 717 "regex.h2" +#line 719 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 785 "regex.h2" +#line 787 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 819 "regex.h2" +#line 821 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 838 "regex.h2" +#line 840 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 847 "regex.h2" +#line 849 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 890 "regex.h2" +#line 892 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 916 "regex.h2" +#line 918 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 937 "regex.h2" +#line 939 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 946 "regex.h2" +#line 948 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 955 "regex.h2" +#line 957 "regex.h2" } } @@ -1031,16 +1031,18 @@ namespace regex { o = M::match(pos, ctx); auto ctx_copy {ctx}; for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx_copy) ) { + + // Stop for empty matches. + if (o.length == 0 && cpp2::cmp_greater_eq(count,get_min_count())) { + break; + } + ctx = ctx_copy; CPP2_UFCS(push_back)((*cpp2::assert_not_null(state)), r.length); r.length += o.length; count += 1; - if (o.length == 0) { - break; - } - ctx_copy = ctx; // For context. TODO: Separate context and state. } @@ -1073,10 +1075,10 @@ namespace regex { return r; } -#line 567 "regex.h2" +#line 569 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 574 "regex.h2" +#line 576 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -1101,12 +1103,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 612 "regex.h2" +#line 614 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 615 "regex.h2" +#line 617 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -1438,7 +1440,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 948 "regex.h2" +#line 950 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 8a2e99da6e..59facd13fd 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -518,16 +518,18 @@ range_matcher_logic: = get_min_count() { + break; + } + ctx = ctx_copy; state*.push_back(r.length); r.length += o.length; count += 1; - if o.length == 0 { - break; - } - ctx_copy = ctx; // For context. TODO: Separate context and state. } From 03831199ec50618d43c5247f17db049cced3aa73 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 3 Jan 2024 11:09:35 +0100 Subject: [PATCH 018/161] Bugfix for missing semaphore in typed template parameters. --- source/to_cpp1.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/to_cpp1.h b/source/to_cpp1.h index 773c64d10c..df2a5ca729 100644 --- a/source/to_cpp1.h +++ b/source/to_cpp1.h @@ -4250,7 +4250,10 @@ class cppfront if (is_template_parameter) { emit( type_id ); printer.print_cpp2(" ", type_id.position()); - printer.print_cpp2( identifier, identifier_pos ); + if (n.declaration->is_variadic) { + printer.print_cpp2("...",identifier_pos); + } + printer.print_cpp2( identifier, identifier_pos ); return; } From 2ddeffa24658f88b3d3e1df883cdb8882654751c Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 3 Jan 2024 11:20:59 +0100 Subject: [PATCH 019/161] Support for posix character classes. --- include/cpp2util.h | 1 + include/string_util.h | 67 +++++++ source/regex.h | 411 ++++++++++++++++++++++++------------------ source/regex.h2 | 112 +++++++----- 4 files changed, 369 insertions(+), 222 deletions(-) create mode 100644 include/string_util.h diff --git a/include/cpp2util.h b/include/cpp2util.h index 463dd994ed..05b54cca28 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -282,6 +282,7 @@ #define CPP2_CONSTEXPR constexpr #endif +#include "string_util.h" namespace cpp2 { diff --git a/include/string_util.h b/include/string_util.h new file mode 100644 index 0000000000..2b8fd26764 --- /dev/null +++ b/include/string_util.h @@ -0,0 +1,67 @@ +#pragma once + +#include +#include + +// From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring + +// trim from start (in place) +static inline void ltrim(std::string &s) { + s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { + return !std::isspace(ch); + })); +} + +// trim from end (in place) +static inline void rtrim(std::string &s) { + s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { + return !std::isspace(ch); + }).base(), s.end()); +} + +// trim from both ends (in place) +static inline void trim(std::string &s) { + rtrim(s); + ltrim(s); +} + +// trim from start (copying) +static inline std::string ltrim_copy(std::string_view s) { + std::string t(s); + ltrim(t); + return t; +} + +// trim from end (copying) +static inline std::string rtrim_copy(std::string_view s) { + std::string t(s); + rtrim(t); + return t; +} + +// trim from both ends (copying) +static inline std::string trim_copy(std::string_view s) { + std::string t(s); + trim(t); + return t; +} + +// From https://oleksandrkvl.github.io/2021/04/02/cpp-20-overview.html#nttp + +template +struct fixed_string { + constexpr fixed_string(const CharT (&s)[N+1]) { + std::copy_n(s, N + 1, str); + } + constexpr const CharT* data() const { + return str; + } + constexpr std::size_t size() const { + return N; + } + + CharT str[N+1]; +}; + +template +fixed_string(const CharT (&)[N])->fixed_string; diff --git a/source/regex.h b/source/regex.h index 37998cf003..ac7497a170 100644 --- a/source/regex.h +++ b/source/regex.h @@ -10,82 +10,94 @@ #line 1 "regex.h2" -#line 56 "regex.h2" +#line 13 "regex.h2" namespace cpp2 { namespace regex { -#line 63 "regex.h2" +#line 20 "regex.h2" class list_end; class match_return; -#line 80 "regex.h2" +#line 37 "regex.h2" template class match_context; -#line 126 "regex.h2" +#line 83 "regex.h2" template class regular_expression; -#line 167 "regex.h2" +#line 124 "regex.h2" template class alternative_matcher_logic; -#line 238 "regex.h2" +#line 195 "regex.h2" template class any_matcher_logic; -#line 246 "regex.h2" +#line 203 "regex.h2" template class char_matcher_logic; -#line 254 "regex.h2" +#line 211 "regex.h2" template class single_class_entry; -#line 260 "regex.h2" +#line 217 "regex.h2" template class range_class_entry; -#line 266 "regex.h2" +#line 223 "regex.h2" +template class and_class_entry; + + +#line 228 "regex.h2" +template class list_class_entry; + + +#line 233 "regex.h2" +template class named_class_entry; + + +#line 257 "regex.h2" template class class_matcher_logic; -#line 311 "regex.h2" +#line 302 "regex.h2" template class empty_matcher_logic; -#line 319 "regex.h2" +#line 310 "regex.h2" template class escaped_char_matcher_logic; -#line 325 "regex.h2" +#line 316 "regex.h2" template class line_end_matcher_logic; -#line 333 "regex.h2" +#line 324 "regex.h2" template class line_start_matcher_logic; -#line 341 "regex.h2" +#line 332 "regex.h2" class list_matcher_state; -#line 345 "regex.h2" +#line 336 "regex.h2" template class list_matcher_logic; -#line 435 "regex.h2" +#line 426 "regex.h2" template class group_matcher_logic; -#line 466 "regex.h2" +#line 457 "regex.h2" template class group_ref_matcher_logic; -#line 475 "regex.h2" +#line 466 "regex.h2" template class range_matcher_logic; -#line 566 "regex.h2" +#line 557 "regex.h2" template class special_range_matcher_logic; -#line 572 "regex.h2" +#line 563 "regex.h2" class regex_parser_state; -#line 602 "regex.h2" +#line 593 "regex.h2" template class regex_parser; -#line 957 "regex.h2" +#line 977 "regex.h2" } } @@ -105,50 +117,7 @@ template class regex_parser; // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -// From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring - -// trim from start (in place) -static inline void ltrim(std::string &s) { - s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { - return !std::isspace(ch); - })); -} - -// trim from end (in place) -static inline void rtrim(std::string &s) { - s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { - return !std::isspace(ch); - }).base(), s.end()); -} - -// trim from both ends (in place) -static inline void trim(std::string &s) { - rtrim(s); - ltrim(s); -} - -// trim from start (copying) -static inline std::string ltrim_copy(std::string_view s) { - std::string t(s); - ltrim(t); - return t; -} - -// trim from end (copying) -static inline std::string rtrim_copy(std::string_view s) { - std::string t(s); - rtrim(t); - return t; -} - -// trim from both ends (copying) -static inline std::string trim_copy(std::string_view s) { - std::string t(s); - trim(t); - return t; -} - -#line 56 "regex.h2" +#line 13 "regex.h2" namespace cpp2 { namespace regex { @@ -161,7 +130,7 @@ class list_end { public: list_end(list_end const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_end const&) -> void = delete; }; -#line 64 "regex.h2" +#line 21 "regex.h2" class match_return { @@ -170,7 +139,7 @@ class match_return public: [[nodiscard]] static auto create(cpp2::in m, cpp2::in l) -> match_return; -#line 78 "regex.h2" +#line 35 "regex.h2" }; template class match_context @@ -183,29 +152,29 @@ template class match_context public: explicit match_context(); -#line 92 "regex.h2" +#line 49 "regex.h2" public: explicit match_context(view const& s); -#line 92 "regex.h2" +#line 49 "regex.h2" public: auto operator=(view const& s) -> match_context& ; -#line 97 "regex.h2" +#line 54 "regex.h2" public: match_context(match_context const& that); -#line 97 "regex.h2" +#line 54 "regex.h2" public: auto operator=(match_context const& that) -> match_context& ; -#line 97 "regex.h2" +#line 54 "regex.h2" public: match_context(match_context&& that) noexcept; -#line 97 "regex.h2" +#line 54 "regex.h2" public: auto operator=(match_context&& that) noexcept -> match_context& ; public: auto invalidate_group(cpp2::in group) & -> void; -#line 104 "regex.h2" +#line 61 "regex.h2" public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; -#line 109 "regex.h2" +#line 66 "regex.h2" public: [[nodiscard]] auto print_ranges() const& -> bstring; -#line 123 "regex.h2" +#line 80 "regex.h2" public: template [[nodiscard]] auto get_state() & -> auto; }; @@ -215,20 +184,20 @@ template class public: [[nodiscard]] auto match(cpp2::in> str) const& -> bool; -#line 137 "regex.h2" +#line 94 "regex.h2" public: [[nodiscard]] auto match(cpp2::in> str, context& ctx) const& -> bool; -#line 144 "regex.h2" +#line 101 "regex.h2" public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; public: [[nodiscard]] auto search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool; -#line 159 "regex.h2" +#line 116 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 160 "regex.h2" +#line 117 "regex.h2" }; /*regular_expression: @interface type = { @@ -240,7 +209,7 @@ template class alternative_ma private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; -#line 179 "regex.h2" +#line 136 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: [[nodiscard]] static auto invalidate_groups(auto& ctx) -> auto; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -248,17 +217,17 @@ template class alternative_ma private: template [[nodiscard]] static auto alternate_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; -#line 207 "regex.h2" +#line 164 "regex.h2" private: template static auto invalidate_all(auto& ctx) -> void; -#line 215 "regex.h2" +#line 172 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 236 "regex.h2" +#line 193 "regex.h2" }; template class any_matcher_logic @@ -271,7 +240,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 244 "regex.h2" +#line 201 "regex.h2" }; template class char_matcher_logic @@ -284,7 +253,7 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 252 "regex.h2" +#line 209 "regex.h2" }; template class single_class_entry @@ -295,7 +264,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 258 "regex.h2" +#line 215 "regex.h2" }; template class range_class_entry @@ -306,9 +275,58 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 264 "regex.h2" +#line 221 "regex.h2" +}; + +template class and_class_entry { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: and_class_entry() = default; + public: and_class_entry(and_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(and_class_entry const&) -> void = delete; + +#line 226 "regex.h2" +}; + +template class list_class_entry { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: list_class_entry() = default; + public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(list_class_entry const&) -> void = delete; + +#line 231 "regex.h2" +}; + +template class named_class_entry { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: named_class_entry() = default; + public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(named_class_entry const&) -> void = delete; + +#line 236 "regex.h2" }; +#line 239 "regex.h2" +// Named character classes. +template using digits_class = named_class_entry>; +template using lower_class = named_class_entry>; +template using upper_class = named_class_entry>; + +// Named classes. +template using alnum_class = named_class_entry,upper_class,digits_class>>; +template using alpha_class = named_class_entry,upper_class>>; +template using ascii_class = named_class_entry>; +template using blank_class = named_class_entry>; +template using cntrl_class = named_class_entry,single_class_entry>>; +template using graph_class = named_class_entry>; +template using print_class = named_class_entry>; +template using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; +template using space_class = named_class_entry>; +template using word_class = named_class_entry,single_class_entry>>; +template using xdigit_class = named_class_entry,range_class_entry,digits_class>>; + template class class_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; @@ -316,20 +334,20 @@ template class class_matcher_logi public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 286 "regex.h2" +#line 277 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 298 "regex.h2" +#line 289 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 308 "regex.h2" +#line 299 "regex.h2" }; -#line 311 "regex.h2" +#line 302 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; @@ -340,7 +358,7 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 317 "regex.h2" +#line 308 "regex.h2" }; template class escaped_char_matcher_logic @@ -351,7 +369,7 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 323 "regex.h2" +#line 314 "regex.h2" }; template class line_end_matcher_logic @@ -364,7 +382,7 @@ template class line_end_matcher_logic public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 331 "regex.h2" +#line 322 "regex.h2" }; template class line_start_matcher_logic @@ -377,7 +395,7 @@ template class line_start_matcher_logic public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 339 "regex.h2" +#line 330 "regex.h2" }; class list_matcher_state: public std::vector { @@ -389,7 +407,7 @@ template class list_matcher_l private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; -#line 359 "regex.h2" +#line 350 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -397,35 +415,35 @@ template class list_matcher_l private: template static auto invalidate_all(auto& ctx) -> void; -#line 372 "regex.h2" +#line 363 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; -#line 397 "regex.h2" +#line 388 "regex.h2" private: template [[nodiscard]] static auto rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 433 "regex.h2" +#line 424 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 445 "regex.h2" +#line 436 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 456 "regex.h2" +#line 447 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 464 "regex.h2" +#line 455 "regex.h2" }; template class group_ref_matcher_logic { @@ -433,13 +451,13 @@ template class group_ref_matcher_logic { public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; -#line 472 "regex.h2" +#line 463 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 473 "regex.h2" +#line 464 "regex.h2" }; template class range_matcher_logic { @@ -448,33 +466,33 @@ template auto; -#line 487 "regex.h2" +#line 478 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 507 "regex.h2" +#line 498 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 546 "regex.h2" +#line 537 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 564 "regex.h2" +#line 555 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 569 "regex.h2" +#line 560 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 570 "regex.h2" +#line 561 "regex.h2" }; class regex_parser_state { @@ -483,20 +501,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 582 "regex.h2" +#line 573 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 587 "regex.h2" +#line 578 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 591 "regex.h2" +#line 582 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 598 "regex.h2" +#line 589 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 602 "regex.h2" +#line 593 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -509,74 +527,76 @@ template class regex_parser { private: Error_out error_out; + private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; + public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 619 "regex.h2" +#line 612 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 625 "regex.h2" +#line 618 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 629 "regex.h2" +#line 622 "regex.h2" private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; -#line 635 "regex.h2" +#line 628 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 647 "regex.h2" +#line 640 "regex.h2" private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; -#line 658 "regex.h2" +#line 651 "regex.h2" public: [[nodiscard]] auto create_matcher_state() const& -> std::string; -#line 663 "regex.h2" +#line 656 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 686 "regex.h2" +#line 679 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 690 "regex.h2" +#line 683 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 697 "regex.h2" +#line 690 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 711 "regex.h2" +#line 704 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 719 "regex.h2" +#line 712 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 787 "regex.h2" +#line 807 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 821 "regex.h2" +#line 841 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 840 "regex.h2" +#line 860 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 849 "regex.h2" +#line 869 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 892 "regex.h2" +#line 912 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 918 "regex.h2" +#line 938 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 939 "regex.h2" +#line 959 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 948 "regex.h2" +#line 968 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 957 "regex.h2" +#line 977 "regex.h2" } } @@ -585,12 +605,12 @@ template [[nodiscard]] auto generate_template(cpp2::in m, cpp2::in l) -> match_return{ if (m) { return { true, l }; @@ -600,30 +620,30 @@ namespace regex { } } -#line 88 "regex.h2" +#line 45 "regex.h2" template match_context::match_context() : str{ "" }{// TODO: How to delegate??? -#line 90 "regex.h2" +#line 47 "regex.h2" CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); } template match_context::match_context(view const& s) : str{ s }{ -#line 94 "regex.h2" +#line 51 "regex.h2" CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); } -#line 92 "regex.h2" +#line 49 "regex.h2" template auto match_context::operator=(view const& s) -> match_context& { str = s; ranges = {}; groups = {}; state = {}; -#line 94 "regex.h2" +#line 51 "regex.h2" CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); return *this; -#line 95 "regex.h2" +#line 52 "regex.h2" } template match_context::match_context(match_context const& that) @@ -631,20 +651,20 @@ namespace regex { , ranges{ that.ranges } , groups{ that.groups } , state{ that.state }{} -#line 97 "regex.h2" +#line 54 "regex.h2" template auto match_context::operator=(match_context const& that) -> match_context& { str = that.str; ranges = that.ranges; groups = that.groups; state = that.state; return *this; } -#line 97 "regex.h2" +#line 54 "regex.h2" template match_context::match_context(match_context&& that) noexcept : str{ std::move(that).str } , ranges{ std::move(that).ranges } , groups{ std::move(that).groups } , state{ std::move(that).state }{} -#line 97 "regex.h2" +#line 54 "regex.h2" template auto match_context::operator=(match_context&& that) noexcept -> match_context& { str = std::move(that).str; ranges = std::move(that).ranges; @@ -652,7 +672,7 @@ namespace regex { state = std::move(that).state; return *this; } -#line 99 "regex.h2" +#line 56 "regex.h2" template auto match_context::invalidate_group(cpp2::in group) & -> void{ CPP2_ASSERT_IN_BOUNDS(ranges, group) = { bstring::npos, bstring::npos }; CPP2_ASSERT_IN_BOUNDS(groups, group) = { }; @@ -679,7 +699,7 @@ namespace regex { template template [[nodiscard]] auto match_context::get_state() & -> auto { return &std::get(state); } -#line 130 "regex.h2" +#line 87 "regex.h2" template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> bool{ context ctx {str}; // TODO: Wrong error about not initialized. auto r {match(str, ctx)}; @@ -711,7 +731,7 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 169 "regex.h2" +#line 126 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; @@ -780,27 +800,39 @@ namespace regex { } } -#line 240 "regex.h2" +#line 197 "regex.h2" template [[nodiscard]] auto any_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto any_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 248 "regex.h2" +#line 205 "regex.h2" template [[nodiscard]] auto char_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto char_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 256 "regex.h2" +#line 213 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 262 "regex.h2" +#line 219 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 268 "regex.h2" +#line 224 "regex.h2" + template [[nodiscard]] auto and_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } + template [[nodiscard]] auto and_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } + +#line 229 "regex.h2" + template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c)); } + template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } + +#line 234 "regex.h2" + template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } + template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } + +#line 259 "regex.h2" template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto class_matcher_logic::invalidate_groups(auto& ctx) -> void{} @@ -842,28 +874,28 @@ namespace regex { return r; } -#line 313 "regex.h2" +#line 304 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto empty_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 322 "regex.h2" +#line 313 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } -#line 327 "regex.h2" +#line 318 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_end_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 335 "regex.h2" +#line 326 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_start_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 348 "regex.h2" +#line 339 "regex.h2" template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; @@ -950,7 +982,7 @@ namespace regex { return r; } -#line 436 "regex.h2" +#line 427 "regex.h2" template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::alternate_match(pos, ctx)}; @@ -980,7 +1012,7 @@ namespace regex { } } -#line 467 "regex.h2" +#line 458 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto group_ref_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { @@ -988,7 +1020,7 @@ namespace regex { template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 479 "regex.h2" +#line 470 "regex.h2" template [[nodiscard]] auto range_matcher_logic::get_min_count() -> auto{ if constexpr (min_count == -1) { return 0; @@ -1075,10 +1107,10 @@ namespace regex { return r; } -#line 569 "regex.h2" +#line 560 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 576 "regex.h2" +#line 567 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -1103,12 +1135,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 614 "regex.h2" +#line 607 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 617 "regex.h2" +#line 610 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -1226,6 +1258,11 @@ namespace regex { }}; + auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{ + if (cpp2::cmp_greater_eq((_1 + 1),CPP2_UFCS(size)(_2))) {return '\0'; } + else {return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); } + }}; + auto negate {false}; auto first {true}; @@ -1235,8 +1272,26 @@ namespace regex { negate = true; continue; // Skip rest of the loop. Also the first update. } - if (c_cur == '-') { - if (first) {// Litral if first entry. + if (c_cur == '[' && peek_item() == ':') { + // We have a character class. + pos += 2; // Skip ':]' + + auto end {CPP2_UFCS(find)(regex, ":]", pos)}; + if (end == std::string::npos) {error_out("Could not find end of character class."); } + + auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; + if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) { + error_out("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))); + } + + CPP2_UFCS(push_back)(classes, "[:" + cpp2::to_string(name) + ":]"); + + end += 1; // Skip ':' pointing to the ending ']'. + pos = end; + + } + else {if (c_cur == '-') { + if (first) {// Literal if first entry. CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); }else { range = true; @@ -1250,7 +1305,7 @@ namespace regex { else { CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); } - } + }} first = false; } @@ -1266,12 +1321,16 @@ namespace regex { } for ( auto& cur : classes ) { - if (1 != CPP2_UFCS(size)(cur)) { + if (CPP2_UFCS(starts_with)(cur, "[:")) { + auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; + cur = "::cpp2::regex::" + cpp2::to_string(name) + "_class"; + } + else {if (1 != CPP2_UFCS(size)(cur)) { cur = "::cpp2::regex::range_class_entry"; } else { cur = "::cpp2::regex::single_class_entry"; - } + }} } auto inner {join(std::move(classes))}; @@ -1440,7 +1499,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 950 "regex.h2" +#line 970 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 59facd13fd..81e09dfe28 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -10,49 +10,6 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -// From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring - -// trim from start (in place) -static inline void ltrim(std::string &s) { - s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { - return !std::isspace(ch); - })); -} - -// trim from end (in place) -static inline void rtrim(std::string &s) { - s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { - return !std::isspace(ch); - }).base(), s.end()); -} - -// trim from both ends (in place) -static inline void trim(std::string &s) { - rtrim(s); - ltrim(s); -} - -// trim from start (copying) -static inline std::string ltrim_copy(std::string_view s) { - std::string t(s); - ltrim(t); - return t; -} - -// trim from end (copying) -static inline std::string rtrim_copy(std::string_view s) { - std::string t(s); - rtrim(t); - return t; -} - -// trim from both ends (copying) -static inline std::string trim_copy(std::string_view s) { - std::string t(s); - trim(t); - return t; -} - cpp2: namespace = { regex: namespace = { @@ -263,6 +220,40 @@ range_class_entry: type = to_string: () -> _ = "(Start)$-(End)$"; } +and_class_entry: type = { + includes: (c: CharT) (false || ... || List::includes(c)); + to_string: () ("" + ... + List::to_string()); +} + +list_class_entry: type = { + includes: (c: CharT) (false || ... || (List == c)); + to_string: () ("" + ... + List); +} + +named_class_entry: type = { + includes: (c: CharT) Inner::includes(c); + to_string: () "[:(Name.data())$:]"; +} + + +// Named character classes. +digits_class : type == named_class_entry>; +lower_class : type == named_class_entry>; +upper_class : type == named_class_entry>; + +// Named classes. +alnum_class : type == named_class_entry, upper_class, digits_class>>; +alpha_class : type == named_class_entry, upper_class>>; +ascii_class : type == named_class_entry>; +blank_class : type == named_class_entry>; +cntrl_class : type == named_class_entry, single_class_entry>>; +graph_class : type == named_class_entry>; +print_class : type == named_class_entry>; +punct_class : type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; +space_class : type == named_class_entry>; +word_class : type == named_class_entry, single_class_entry>>; +xdigit_class : type == named_class_entry, range_class_entry, digits_class>>; + class_matcher_logic: type = { alternate_match: (pos: size_t, inout ctx) match_return(false, 0); @@ -611,6 +602,8 @@ regex_parser: type = { error_out: Error_out; + supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"); + operator=: (out this, r: std::string_view, e: Error_out) = { this.regex = r; this.error_out = e; @@ -731,6 +724,11 @@ regex_parser: type = { }; + peek_item:= :() -> char = { + if (pos$ + 1) >= regex$.size() { return '\0'; } + else { return regex[pos + 1]; } + }; + negate:= false; first:= true; @@ -740,8 +738,26 @@ regex_parser: type = { negate = true; continue; // Skip rest of the loop. Also the first update. } - if c_cur == '-' { - if first { // Litral if first entry. + if c_cur == '[' && peek_item() == ':' { + // We have a character class. + pos += 2; // Skip ':]' + + end := regex.find(":]", pos); + if end == std::string::npos { error_out("Could not find end of character class."); } + + name := regex.substr(pos, end - pos); + if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) { + error_out("Unsupported character class. Supported ones are: (join(supported_classes))$"); + } + + classes.push_back("[:(name)$:]"); + + end += 1; // Skip ':' pointing to the ending ']'. + pos = end; + + } + else if c_cur == '-' { + if first { // Literal if first entry. classes.push_back("(c_cur)$"); } else { range = true; @@ -771,7 +787,11 @@ regex_parser: type = { } for classes do (inout cur) { - if 1 != cur.size() { + if cur.starts_with("[:") { + name := cur.substr(2, cur.size() - 4); + cur = "::cpp2::regex::(name)$_class"; + } + else if 1 != cur.size() { cur = "::cpp2::regex::range_class_entry"; } else { From 654b2e308de4a46b95310267402dbce19d9f4b52 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 3 Jan 2024 11:39:30 +0100 Subject: [PATCH 020/161] Fix for missing escape of '\'. --- source/regex.h | 27 ++++++++++++++------------- source/regex.h2 | 7 ++++--- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/source/regex.h b/source/regex.h index ac7497a170..75dc674759 100644 --- a/source/regex.h +++ b/source/regex.h @@ -97,7 +97,7 @@ class regex_parser_state; #line 593 "regex.h2" template class regex_parser; -#line 977 "regex.h2" +#line 978 "regex.h2" } } @@ -570,33 +570,33 @@ template class regex_parser { #line 807 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 841 "regex.h2" +#line 842 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 860 "regex.h2" +#line 861 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 869 "regex.h2" +#line 870 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 912 "regex.h2" +#line 913 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 938 "regex.h2" +#line 939 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 959 "regex.h2" +#line 960 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 968 "regex.h2" +#line 969 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 977 "regex.h2" +#line 978 "regex.h2" } } @@ -1364,9 +1364,10 @@ namespace regex { } } else {if ('\\' == std::move(c_next)) { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); - }else { - error("Unkonwn escape."); + CPP2_UFCS(add)(cur_state, "::cpp2::regex::escaped_char_matcher_logic"); + } + else { + error("Unknown escape."); }}} return true; @@ -1499,7 +1500,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 970 "regex.h2" +#line 971 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 81e09dfe28..c8b6c169e9 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -830,9 +830,10 @@ regex_parser: type = { } } else if '\\' == c_next { - cur_state.add("::cpp2::regex::char_matcher_logic"); - } else { - error("Unkonwn escape."); + cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); + } + else { + error("Unknown escape."); } return true; From b87b08f4f7268c3578b00ed61e375fb79f856729 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 3 Jan 2024 13:48:47 +0100 Subject: [PATCH 021/161] Missing group clear in alternate matcher. --- source/regex.h | 208 ++++++++++++++++++++++++------------------------ source/regex.h2 | 4 + 2 files changed, 110 insertions(+), 102 deletions(-) diff --git a/source/regex.h b/source/regex.h index 75dc674759..2e7933023a 100644 --- a/source/regex.h +++ b/source/regex.h @@ -29,75 +29,75 @@ template class #line 124 "regex.h2" template class alternative_matcher_logic; -#line 195 "regex.h2" +#line 199 "regex.h2" template class any_matcher_logic; -#line 203 "regex.h2" +#line 207 "regex.h2" template class char_matcher_logic; -#line 211 "regex.h2" +#line 215 "regex.h2" template class single_class_entry; -#line 217 "regex.h2" +#line 221 "regex.h2" template class range_class_entry; -#line 223 "regex.h2" +#line 227 "regex.h2" template class and_class_entry; -#line 228 "regex.h2" +#line 232 "regex.h2" template class list_class_entry; -#line 233 "regex.h2" +#line 237 "regex.h2" template class named_class_entry; -#line 257 "regex.h2" +#line 261 "regex.h2" template class class_matcher_logic; -#line 302 "regex.h2" +#line 306 "regex.h2" template class empty_matcher_logic; -#line 310 "regex.h2" +#line 314 "regex.h2" template class escaped_char_matcher_logic; -#line 316 "regex.h2" +#line 320 "regex.h2" template class line_end_matcher_logic; -#line 324 "regex.h2" +#line 328 "regex.h2" template class line_start_matcher_logic; -#line 332 "regex.h2" +#line 336 "regex.h2" class list_matcher_state; -#line 336 "regex.h2" +#line 340 "regex.h2" template class list_matcher_logic; -#line 426 "regex.h2" +#line 430 "regex.h2" template class group_matcher_logic; -#line 457 "regex.h2" +#line 461 "regex.h2" template class group_ref_matcher_logic; -#line 466 "regex.h2" +#line 470 "regex.h2" template class range_matcher_logic; -#line 557 "regex.h2" +#line 561 "regex.h2" template class special_range_matcher_logic; -#line 563 "regex.h2" +#line 567 "regex.h2" class regex_parser_state; -#line 593 "regex.h2" +#line 597 "regex.h2" template class regex_parser; -#line 978 "regex.h2" +#line 982 "regex.h2" } } @@ -217,17 +217,17 @@ template class alternative_ma private: template [[nodiscard]] static auto alternate_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; -#line 164 "regex.h2" +#line 168 "regex.h2" private: template static auto invalidate_all(auto& ctx) -> void; -#line 172 "regex.h2" +#line 176 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 193 "regex.h2" +#line 197 "regex.h2" }; template class any_matcher_logic @@ -240,7 +240,7 @@ template class any_matcher_logic public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 201 "regex.h2" +#line 205 "regex.h2" }; template class char_matcher_logic @@ -253,7 +253,7 @@ template class char_matcher_logic public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 209 "regex.h2" +#line 213 "regex.h2" }; template class single_class_entry @@ -264,7 +264,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 215 "regex.h2" +#line 219 "regex.h2" }; template class range_class_entry @@ -275,7 +275,7 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 221 "regex.h2" +#line 225 "regex.h2" }; template class and_class_entry { @@ -285,7 +285,7 @@ template class and_class_entry { public: and_class_entry(and_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(and_class_entry const&) -> void = delete; -#line 226 "regex.h2" +#line 230 "regex.h2" }; template class list_class_entry { @@ -295,7 +295,7 @@ template class list_class_entry { public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_class_entry const&) -> void = delete; -#line 231 "regex.h2" +#line 235 "regex.h2" }; template class named_class_entry { @@ -305,10 +305,10 @@ template class named_class_en public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(named_class_entry const&) -> void = delete; -#line 236 "regex.h2" +#line 240 "regex.h2" }; -#line 239 "regex.h2" +#line 243 "regex.h2" // Named character classes. template using digits_class = named_class_entry>; template using lower_class = named_class_entry>; @@ -334,20 +334,20 @@ template class class_matcher_logi public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 277 "regex.h2" +#line 281 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 289 "regex.h2" +#line 293 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 299 "regex.h2" +#line 303 "regex.h2" }; -#line 302 "regex.h2" +#line 306 "regex.h2" template class empty_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; @@ -358,7 +358,7 @@ template class empty_matcher_logic public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(empty_matcher_logic const&) -> void = delete; -#line 308 "regex.h2" +#line 312 "regex.h2" }; template class escaped_char_matcher_logic @@ -369,7 +369,7 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 314 "regex.h2" +#line 318 "regex.h2" }; template class line_end_matcher_logic @@ -382,7 +382,7 @@ template class line_end_matcher_logic public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 322 "regex.h2" +#line 326 "regex.h2" }; template class line_start_matcher_logic @@ -395,7 +395,7 @@ template class line_start_matcher_logic public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 330 "regex.h2" +#line 334 "regex.h2" }; class list_matcher_state: public std::vector { @@ -407,7 +407,7 @@ template class list_matcher_l private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; -#line 350 "regex.h2" +#line 354 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; @@ -415,35 +415,35 @@ template class list_matcher_l private: template static auto invalidate_all(auto& ctx) -> void; -#line 363 "regex.h2" +#line 367 "regex.h2" private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; -#line 388 "regex.h2" +#line 392 "regex.h2" private: template [[nodiscard]] static auto rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 424 "regex.h2" +#line 428 "regex.h2" }; template class group_matcher_logic { public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 436 "regex.h2" +#line 440 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 447 "regex.h2" +#line 451 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_matcher_logic() = default; public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_logic const&) -> void = delete; -#line 455 "regex.h2" +#line 459 "regex.h2" }; template class group_ref_matcher_logic { @@ -451,13 +451,13 @@ template class group_ref_matcher_logic { public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; -#line 463 "regex.h2" +#line 467 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 464 "regex.h2" +#line 468 "regex.h2" }; template class range_matcher_logic { @@ -466,33 +466,33 @@ template auto; -#line 478 "regex.h2" +#line 482 "regex.h2" public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; -#line 498 "regex.h2" +#line 502 "regex.h2" public: static auto invalidate_groups(auto& ctx) -> void; public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; -#line 537 "regex.h2" +#line 541 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 555 "regex.h2" +#line 559 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { -#line 560 "regex.h2" +#line 564 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: special_range_matcher_logic() = default; public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 561 "regex.h2" +#line 565 "regex.h2" }; class regex_parser_state { @@ -501,20 +501,20 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 573 "regex.h2" +#line 577 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 578 "regex.h2" +#line 582 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 582 "regex.h2" +#line 586 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 589 "regex.h2" +#line 593 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 593 "regex.h2" +#line 597 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -531,72 +531,72 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 612 "regex.h2" +#line 616 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 618 "regex.h2" +#line 622 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 622 "regex.h2" +#line 626 "regex.h2" private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; -#line 628 "regex.h2" +#line 632 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 640 "regex.h2" +#line 644 "regex.h2" private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; -#line 651 "regex.h2" +#line 655 "regex.h2" public: [[nodiscard]] auto create_matcher_state() const& -> std::string; -#line 656 "regex.h2" +#line 660 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 679 "regex.h2" +#line 683 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 683 "regex.h2" +#line 687 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 690 "regex.h2" +#line 694 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 704 "regex.h2" +#line 708 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 712 "regex.h2" +#line 716 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 807 "regex.h2" +#line 811 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 842 "regex.h2" +#line 846 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 861 "regex.h2" +#line 865 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 870 "regex.h2" +#line 874 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 913 "regex.h2" +#line 917 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 939 "regex.h2" +#line 943 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 960 "regex.h2" +#line 964 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 969 "regex.h2" +#line 973 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 978 "regex.h2" +#line 982 "regex.h2" } } @@ -754,6 +754,10 @@ namespace regex { if (*cpp2::assert_not_null(state) == entry_pos) { // Current state is the same element. Try an alternative match. r = First::alternate_match(pos, ctx); + + if (!(r.matched)) { + First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. + } } else {if (cpp2::cmp_less((cpp2::as_(*cpp2::assert_not_null(state))),entry_pos)) { // Previous alternative has not match. Try the next one. @@ -800,39 +804,39 @@ namespace regex { } } -#line 197 "regex.h2" +#line 201 "regex.h2" template [[nodiscard]] auto any_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto any_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } -#line 205 "regex.h2" +#line 209 "regex.h2" template [[nodiscard]] auto char_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto char_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } -#line 213 "regex.h2" +#line 217 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 219 "regex.h2" +#line 223 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 224 "regex.h2" +#line 228 "regex.h2" template [[nodiscard]] auto and_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } template [[nodiscard]] auto and_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } -#line 229 "regex.h2" +#line 233 "regex.h2" template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c)); } template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } -#line 234 "regex.h2" +#line 238 "regex.h2" template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } -#line 259 "regex.h2" +#line 263 "regex.h2" template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto class_matcher_logic::invalidate_groups(auto& ctx) -> void{} @@ -874,28 +878,28 @@ namespace regex { return r; } -#line 304 "regex.h2" +#line 308 "regex.h2" template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto empty_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } -#line 313 "regex.h2" +#line 317 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } -#line 318 "regex.h2" +#line 322 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_end_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 326 "regex.h2" +#line 330 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto line_start_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 339 "regex.h2" +#line 343 "regex.h2" template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; @@ -982,7 +986,7 @@ namespace regex { return r; } -#line 427 "regex.h2" +#line 431 "regex.h2" template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ match_return r {M::alternate_match(pos, ctx)}; @@ -1012,7 +1016,7 @@ namespace regex { } } -#line 458 "regex.h2" +#line 462 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } template auto group_ref_matcher_logic::invalidate_groups(auto& ctx) -> void{} template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { @@ -1020,7 +1024,7 @@ namespace regex { template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 470 "regex.h2" +#line 474 "regex.h2" template [[nodiscard]] auto range_matcher_logic::get_min_count() -> auto{ if constexpr (min_count == -1) { return 0; @@ -1107,10 +1111,10 @@ namespace regex { return r; } -#line 560 "regex.h2" +#line 564 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } -#line 567 "regex.h2" +#line 571 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -1135,12 +1139,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 607 "regex.h2" +#line 611 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 610 "regex.h2" +#line 614 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -1500,7 +1504,7 @@ namespace regex { return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } -#line 971 "regex.h2" +#line 975 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index c8b6c169e9..98b20f04a1 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -145,6 +145,10 @@ alternative_matcher_logic: type = { if state* == entry_pos { // Current state is the same element. Try an alternative match. r = First::alternate_match(pos, ctx); + + if !r.matched { + First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. + } } else if (state* as size_t) < entry_pos { // Previous alternative has not match. Try the next one. From ed4fba9d5c1fadc7bd0cdebfda95b83010785c2d Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 3 Jan 2024 13:50:15 +0100 Subject: [PATCH 022/161] Whitespace errors from cppfront. --- source/regex.h | 152 ++++++++++++++++++++++++------------------------- 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/source/regex.h b/source/regex.h index 2e7933023a..4e19cbc558 100644 --- a/source/regex.h +++ b/source/regex.h @@ -43,15 +43,15 @@ template class range_class_entry; #line 227 "regex.h2" template class and_class_entry; - + #line 232 "regex.h2" template class list_class_entry; - + #line 237 "regex.h2" template class named_class_entry; - + #line 261 "regex.h2" template class class_matcher_logic; @@ -70,7 +70,7 @@ template class line_start_matcher_logic; #line 336 "regex.h2" class list_matcher_state; - + #line 340 "regex.h2" template class list_matcher_logic; @@ -148,7 +148,7 @@ template class match_context public: std::array,max_groups> ranges {}; public: std::array,max_groups> groups {}; - public: State state {}; + public: State state {}; public: explicit match_context(); @@ -523,11 +523,11 @@ template class regex_parser { private: int named_groups {1}; // Global capture group. - private: std::vector matcher_states {}; + private: std::vector matcher_states {}; private: Error_out error_out; - private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; + private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; public: explicit regex_parser(cpp2::in r, Error_out const& e); @@ -733,13 +733,13 @@ namespace regex { #line 126 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; if (init) { *cpp2::assert_not_null(state) = 0; } - return state; + return state; } template [[nodiscard]] auto alternative_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return alternate_all(pos, ctx, prepare_state(ctx, false)); } @@ -750,13 +750,13 @@ namespace regex { template template [[nodiscard]] auto alternative_matcher_logic::alternate_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; - match_return r {false, 0}; + match_return r {false, 0}; if (*cpp2::assert_not_null(state) == entry_pos) { // Current state is the same element. Try an alternative match. r = First::alternate_match(pos, ctx); if (!(r.matched)) { - First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. + First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. } } else {if (cpp2::cmp_less((cpp2::as_(*cpp2::assert_not_null(state))),entry_pos)) { @@ -771,7 +771,7 @@ namespace regex { } } - return r; + return r; } template template auto alternative_matcher_logic::invalidate_all(auto& ctx) -> void{ @@ -795,7 +795,7 @@ namespace regex { First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. if constexpr (0 != sizeof...(Other)) { - return match_all(pos + std::move(r).length, ctx, state); + return match_all(pos + std::move(r).length, ctx, state); } else { *cpp2::assert_not_null(state) = sizeof...(List); @@ -842,21 +842,21 @@ namespace regex { template [[nodiscard]] auto class_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(ctx.str))) { - return match_return(false, 0); + return match_return(false, 0); } - CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; - bool r {match_any(std::move(c))}; + CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; + bool r {match_any(std::move(c))}; if (negate) { r = !(r); } - return match_return::create(std::move(r), 1); + return match_return::create(std::move(r), 1); } template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ - bool r {First::includes(c)}; + bool r {First::includes(c)}; if (!(r)) { if constexpr (0 != sizeof...(Other)) { @@ -864,18 +864,18 @@ namespace regex { } } - return r; + return r; } template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ - bstring r {"["}; + bstring r {"["}; if (negate) { r += "^"; } r += (bstring() + ... + List::to_string()); r += "]"; - return r; + return r; } #line 308 "regex.h2" @@ -901,14 +901,14 @@ namespace regex { #line 343 "regex.h2" template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; if (init) { CPP2_UFCS(clear)((*cpp2::assert_not_null(state))); CPP2_UFCS(resize)((*cpp2::assert_not_null(state)), sizeof...(List)); } - return state; + return state; } template [[nodiscard]] auto list_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return rematch_all(pos, ctx, prepare_state(ctx, false)); } @@ -933,7 +933,7 @@ namespace regex { if constexpr (0 != sizeof...(Other)) { while( r.matched ) { - match_return o {match_all(pos + r.length, ctx, state)}; + match_return o {match_all(pos + r.length, ctx, state)}; if (o.matched) { r.length += o.length; @@ -952,8 +952,8 @@ namespace regex { template template [[nodiscard]] auto list_matcher_logic::rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; - match_return r {false, 0}; - auto length {0}; + match_return r {false, 0}; + auto length {0}; if constexpr (0 != sizeof...(Other)) { r = rematch_all(CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos + 1), ctx, state); length = CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos + 1) - CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos); @@ -966,7 +966,7 @@ namespace regex { if constexpr (0 != sizeof...(Other)) { while( r.matched ) { - match_return o {match_all(pos + r.length, ctx, state)}; + match_return o {match_all(pos + r.length, ctx, state)}; if (o.matched) { r.length += o.length; @@ -983,12 +983,12 @@ namespace regex { r.length += std::move(length); } - return r; + return r; } #line 431 "regex.h2" template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {M::alternate_match(pos, ctx)}; + match_return r {M::alternate_match(pos, ctx)}; if (r.matched) { CPP2_UFCS(set_group)(ctx, group, pos, r.length); @@ -999,20 +999,20 @@ namespace regex { template auto group_matcher_logic::invalidate_groups(auto& ctx) -> void { CPP2_UFCS(invalidate_group)(ctx, group); } template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {M::match(pos, ctx)}; + match_return r {M::match(pos, ctx)}; if (r.matched) { CPP2_UFCS(set_group)(ctx, group, pos, r.length); } - return r; + return r; } template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring{ if (group == 0) { - return M::to_string(); + return M::to_string(); } else { - return "(" + cpp2::to_string(M::to_string()) + ")"; + return "(" + cpp2::to_string(M::to_string()) + ")"; } } @@ -1027,29 +1027,29 @@ namespace regex { #line 474 "regex.h2" template [[nodiscard]] auto range_matcher_logic::get_min_count() -> auto{ if constexpr (min_count == -1) { - return 0; + return 0; }else { - return min_count; + return min_count; } } template [[nodiscard]] auto range_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; if (!(CPP2_UFCS(empty)((*cpp2::assert_not_null(state))))) { - auto length {CPP2_UFCS(back)((*cpp2::assert_not_null(state)))}; + auto length {CPP2_UFCS(back)((*cpp2::assert_not_null(state)))}; CPP2_UFCS(pop_back)((*cpp2::assert_not_null(state))); - auto valid {cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(state))),get_min_count())}; + auto valid {cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(state))),get_min_count())}; if (!(valid) || CPP2_UFCS(empty)((*cpp2::assert_not_null(state)))) { M::invalidate_groups(ctx); }else { static_cast(M::match(pos + CPP2_UFCS(back)((*cpp2::assert_not_null(std::move(state)))), ctx));// Repopulate the ranges. } - return match_return::create(std::move(valid), std::move(length)); + return match_return::create(std::move(valid), std::move(length)); }else { - return match_return(false, 0); + return match_return(false, 0); } } @@ -1059,13 +1059,13 @@ namespace regex { match_return r {true, 0}; match_return o {true, 0}; - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; + auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; CPP2_UFCS(clear)((*cpp2::assert_not_null(state))); - int count {0}; + int count {0}; o = M::match(pos, ctx); - auto ctx_copy {ctx}; + auto ctx_copy {ctx}; for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx_copy) ) { // Stop for empty matches. @@ -1083,13 +1083,13 @@ namespace regex { } static_cast(std::move(state)); - auto valid {cpp2::cmp_greater_eq(std::move(count),get_min_count())}; + auto valid {cpp2::cmp_greater_eq(std::move(count),get_min_count())}; // If we do not reach the minimal count invalidate all groups. if (!(valid)) { M::invalidate_groups(ctx); } - return match_return::create(std::move(valid), std::move(r).length); + return match_return::create(std::move(valid), std::move(r).length); } template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ @@ -1158,13 +1158,13 @@ namespace regex { } template [[nodiscard]] auto regex_parser::push_matcher_state(cpp2::in t) & -> int{ - auto id {CPP2_UFCS(ssize)(matcher_states)}; + auto id {CPP2_UFCS(ssize)(matcher_states)}; CPP2_UFCS(push_back)(matcher_states, t); - return id; + return id; } template [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ - std::string r {""}; + std::string r {""}; std::string seperator {""}; for ( auto const& cur : list ) { @@ -1172,14 +1172,14 @@ namespace regex { seperator = ", "; } - return r; + return r; } template [[nodiscard]] auto regex_parser::create_matcher_from_list(cpp2::in> list) & -> std::string{ if (CPP2_UFCS(empty)(list)) {return "::cpp2::regex::empty_matcher_logic"; } - auto state_index {push_matcher_state("::cpp2::regex::list_matcher_state")}; - std::string matcher {"::cpp2::regex::list_matcher_logic [[nodiscard]] auto regex_parser::create_matcher_state() const& -> std::string{ - auto inner {join(matcher_states)}; - return "std::tuple<" + cpp2::to_string(std::move(inner)) + ">"; + auto inner {join(matcher_states)}; + return "std::tuple<" + cpp2::to_string(std::move(inner)) + ">"; } template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ // Early out for no alternatives if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } - auto state_index {push_matcher_state("int")}; - std::string matcher {"::cpp2::regex::alternative_matcher_logic void{ @@ -1204,7 +1204,7 @@ namespace regex { *cpp2::assert_not_null(_2) = ", "; }}; - auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; + auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; for( ; cur != CPP2_UFCS(rend)(cur_state.alternate_match_lists); (++cur) ) { add(*cpp2::assert_not_null(cur)); } @@ -1226,7 +1226,7 @@ namespace regex { } template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ - auto r {false}; + auto r {false}; if (c == '^') { CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_start_matcher_logic"); r = true; @@ -1236,7 +1236,7 @@ namespace regex { r = true; }} - return r; + return r; } template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ @@ -1250,27 +1250,27 @@ namespace regex { template [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{ if (c != '[') {return false; } - std::vector classes {}; + std::vector classes {}; - char c_cur {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; + char c_cur {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{ *cpp2::assert_not_null(_1) += 1; if (cpp2::cmp_greater_eq(*cpp2::assert_not_null(_1),CPP2_UFCS(size)(_3))) {return false; } *cpp2::assert_not_null(_4) = CPP2_ASSERT_IN_BOUNDS(_3, *cpp2::assert_not_null(_1)); - return true; + return true; - }}; + }}; auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{ if (cpp2::cmp_greater_eq((_1 + 1),CPP2_UFCS(size)(_2))) {return '\0'; } else {return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); } - }}; + }}; - auto negate {false}; + auto negate {false}; - auto first {true}; - auto range {false}; + auto first {true}; + auto range {false}; while( next_item() & (c_cur != ']' || first) ) { if (c_cur == '^') { negate = true; @@ -1280,10 +1280,10 @@ namespace regex { // We have a character class. pos += 2; // Skip ':]' - auto end {CPP2_UFCS(find)(regex, ":]", pos)}; + auto end {CPP2_UFCS(find)(regex, ":]", pos)}; if (end == std::string::npos) {error_out("Could not find end of character class."); } - auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; + auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) { error_out("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))); } @@ -1326,7 +1326,7 @@ namespace regex { for ( auto& cur : classes ) { if (CPP2_UFCS(starts_with)(cur, "[:")) { - auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; + auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; cur = "::cpp2::regex::" + cpp2::to_string(name) + "_class"; } else {if (1 != CPP2_UFCS(size)(cur)) { @@ -1337,9 +1337,9 @@ namespace regex { }} } - auto inner {join(std::move(classes))}; + auto inner {join(std::move(classes))}; CPP2_UFCS(add)(cur_state, "::cpp2::regex::class_matcher_logic"); - return true; + return true; } template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ @@ -1416,7 +1416,7 @@ namespace regex { std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } - std::string min_count {"-1"}; + std::string min_count {"-1"}; std::string max_count {"std::numeric_limits::max()"}; size_t sep {CPP2_UFCS(find)(inner, ",")}; @@ -1441,7 +1441,7 @@ namespace regex { } // TODO: Check 0 <=n <= m - auto matcher_state {push_matcher_state("std::vector")}; + auto matcher_state {push_matcher_state("std::vector")}; CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); pos = std::move(end); @@ -1469,7 +1469,7 @@ namespace regex { error("'" + cpp2::to_string(c) + "' without previous element."); } - auto matcher_state {push_matcher_state("std::vector")}; + auto matcher_state {push_matcher_state("std::vector")}; CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); return true; } @@ -1500,8 +1500,8 @@ namespace regex { parse_until('\0'); auto inner {create_matcher_from_state()}; - auto matcher_state {create_matcher_state()}; - return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; + auto matcher_state {create_matcher_state()}; + return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; } #line 975 "regex.h2" From 4717892bfa72d84f54911c7ebb6cc54b069afcba Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 3 Jan 2024 14:39:00 +0100 Subject: [PATCH 023/161] Include regular expressions in cpp2utils.hpp. --- include/cpp2util.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/cpp2util.h b/include/cpp2util.h index 05b54cca28..3631b91a36 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -1978,6 +1978,7 @@ inline constexpr auto as_() -> decltype(auto) } +#include "../source/regex.h" using cpp2::cpp2_new; From 6d98bb30b22a10d3cc20407fa734979201596b99 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 3 Jan 2024 13:56:07 +0100 Subject: [PATCH 024/161] Update for tests. --- regression-tests/pure2-regex.cpp2 | 174 +- .../gcc-13/pure2-regex.cpp.execution | 446 +++ .../gcc-13/pure2-regex.cpp.output | 0 regression-tests/test-results/pure2-regex.cpp | 2428 +++++++++++++++++ 4 files changed, 2972 insertions(+), 76 deletions(-) create mode 100644 regression-tests/test-results/gcc-13/pure2-regex.cpp.execution create mode 100644 regression-tests/test-results/gcc-13/pure2-regex.cpp.output create mode 100644 regression-tests/test-results/pure2-regex.cpp diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2 index d484a5f4a2..802755faa1 100644 --- a/regression-tests/pure2-regex.cpp2 +++ b/regression-tests/pure2-regex.cpp2 @@ -1,4 +1,3 @@ -#include test: (regex: M, id: std::string, regex_str: std::string, str: std::string, result: std::string) = { context : type == M::context; @@ -14,8 +13,9 @@ test: (regex: M, id: std::string, regex_str: std::string, str: std::string, status = "Failure: Parsed regex does not match."; } else { m : bool = regex.search(str_mod, ctx); - is_pass := !id.starts_with("M"); + is_pass := !result.starts_with("NOMATCH"); + // Check if we expect a match. if is_pass != m { if is_pass { status = "Failure: Regex should apply."; @@ -23,12 +23,25 @@ test: (regex: M, id: std::string, regex_str: std::string, str: std::string, else { status = "Failure: Regex should not apply."; } - } else if result != ctx.print_ranges() { - status = "Failure: Ranges are wrong."; + } + + // If we have a match. Check the ranges. + if m { + ranges_match := result == ctx.print_ranges(); + should_ranges_match := !id.starts_with("M"); + + if ranges_match != should_ranges_match { + if ranges_match { + status = "Failure: Ranges should be wrong."; + } + else { + status = "Failure: Ranges are wrong."; + } + } } } - std::cout << "(id)$: (status)$ regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result: (ctx.print_ranges())$ expected_results (result)$ " << std::endl; + std::cout << "(id)$: (status)$ regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result: (ctx.print_ranges())$ expected_results (result)$" << std::endl; } @@ -65,7 +78,7 @@ test_basic3: @regex type = { regex_31 := "(a.|.a.)*|(a|.a...)"; regex_32 := "ab|a"; regex_33 := "ab|a"; - regex_34 := "(Ab|cD)*"; + regex_M34 := "(Ab|cD)*"; regex_35 := ":::1:::0:|:::1:1:0:"; regex_36 := ":::1:::0:|:::1:1:1:"; regex_37 := "[[:lower:]]+"; @@ -176,7 +189,7 @@ test_basic3: @regex type = { regex_145 := ".*(\\000).*"; regex_146 := "\\000"; run: (this) = { - std::cout << "Running basic3:\n "<< std::endl; + std::cout << "Running basic3:"<< std::endl; test(regex_1(), "1", "\\)", "()", "(1,2)"); test(regex_2(), "2", "\\}", "}", "(0,1)"); test(regex_3(), "3", "]", "]", "(0,1)"); @@ -209,7 +222,7 @@ test_basic3: @regex type = { test(regex_31(), "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)"); test(regex_32(), "32", "ab|a", "xabc", "(1,3)"); test(regex_33(), "33", "ab|a", "xxabc", "(2,4)"); - test(regex_34(), "34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); + test(regex_M34(), "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); test(regex_35(), "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)"); test(regex_36(), "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)"); test(regex_37(), "37", "[[:lower:]]+", "`az{", "(1,3)"); @@ -319,6 +332,7 @@ test_basic3: @regex type = { test(regex_144(), "144", ".*(/000).*", "/000", "(0,4)(0,4)"); test(regex_145(), "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)"); test(regex_146(), "146", "\\\\000", "\\000", "(0,4)"); + std::cout << std::endl; } } test_class: @regex type = { @@ -337,7 +351,7 @@ test_class: @regex type = { regex_12 := "(a?)((ab)?)(b?)a?(ab)?b?"; regex_M12 := "(a?)((ab)?)(b?)a?(ab)?b?"; run: (this) = { - std::cout << "Running class:\n "<< std::endl; + std::cout << "Running class:"<< std::endl; test(regex_1(), "1", "aa*", "xaxaax", "(1,2)"); test(regex_2(), "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)"); test(regex_M2(), "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)"); @@ -352,6 +366,7 @@ test_class: @regex type = { test(regex_11(), "11", ".*(.*)", "ab", "(0,2)(2,2)"); test(regex_12(), "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)"); test(regex_M12(), "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)"); + std::cout << std::endl; } } test_left_assoc: @regex type = { @@ -368,7 +383,7 @@ test_left_assoc: @regex type = { regex_M11 := "(ab|a)(c|bcd)(d|.*)"; regex_M12 := "(ab|a)(bcd|c)(d|.*)"; run: (this) = { - std::cout << "Running left_assoc:\n "<< std::endl; + std::cout << "Running left_assoc:"<< std::endl; test(regex_M1(), "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); test(regex_M2(), "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); test(regex_M3(), "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); @@ -381,6 +396,7 @@ test_left_assoc: @regex type = { test(regex_M10(), "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); test(regex_M11(), "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); test(regex_M12(), "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + std::cout << std::endl; } } test_right_assoc: @regex type = { @@ -397,7 +413,7 @@ test_right_assoc: @regex type = { regex_11 := "(ab|a)(c|bcd)(d|.*)"; regex_12 := "(ab|a)(bcd|c)(d|.*)"; run: (this) = { - std::cout << "Running right_assoc:\n "<< std::endl; + std::cout << "Running right_assoc:"<< std::endl; test(regex_1(), "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); test(regex_2(), "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); test(regex_3(), "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); @@ -410,6 +426,7 @@ test_right_assoc: @regex type = { test(regex_10(), "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); test(regex_11(), "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); test(regex_12(), "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + std::cout << std::endl; } } test_forced_assoc: @regex type = { @@ -442,7 +459,7 @@ test_forced_assoc: @regex type = { regex_27 := "(a|ab)(b*)"; regex_28 := "(ab|a)(b*)"; run: (this) = { - std::cout << "Running forced_assoc:\n "<< std::endl; + std::cout << "Running forced_assoc:"<< std::endl; test(regex_1(), "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); test(regex_2(), "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); test(regex_3(), "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); @@ -471,49 +488,50 @@ test_forced_assoc: @regex type = { test(regex_26(), "26", "(ab|a)", "ab", "(0,2)(0,2)"); test(regex_27(), "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)"); test(regex_28(), "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)"); + std::cout << std::endl; } } test_nullsub3: @regex type = { regex_1 := "(a*)*"; - regex_2 := "SAME"; - regex_3 := "SAME"; - regex_4 := "SAME"; + regex_2 := "(a*)*"; + regex_3 := "(a*)*"; + regex_4 := "(a*)*"; regex_5 := "(a*)+"; - regex_6 := "SAME"; - regex_7 := "SAME"; - regex_8 := "SAME"; + regex_6 := "(a*)+"; + regex_7 := "(a*)+"; + regex_8 := "(a*)+"; regex_9 := "(a+)*"; - regex_10 := "SAME"; - regex_11 := "SAME"; - regex_12 := "SAME"; + regex_10 := "(a+)*"; + regex_11 := "(a+)*"; + regex_12 := "(a+)*"; regex_13 := "(a+)+"; - regex_14 := "SAME"; - regex_15 := "SAME"; - regex_16 := "SAME"; + regex_14 := "(a+)+"; + regex_15 := "(a+)+"; + regex_16 := "(a+)+"; regex_17 := "([a]*)*"; - regex_18 := "SAME"; - regex_19 := "SAME"; - regex_20 := "SAME"; + regex_18 := "([a]*)*"; + regex_19 := "([a]*)*"; + regex_20 := "([a]*)*"; regex_21 := "([a]*)+"; - regex_22 := "SAME"; - regex_23 := "SAME"; - regex_24 := "SAME"; + regex_22 := "([a]*)+"; + regex_23 := "([a]*)+"; + regex_24 := "([a]*)+"; regex_25 := "([^b]*)*"; - regex_26 := "SAME"; - regex_27 := "SAME"; - regex_28 := "SAME"; + regex_26 := "([^b]*)*"; + regex_27 := "([^b]*)*"; + regex_28 := "([^b]*)*"; regex_29 := "([ab]*)*"; - regex_30 := "SAME"; - regex_31 := "SAME"; - regex_32 := "SAME"; - regex_33 := "SAME"; - regex_34 := "SAME"; - regex_35 := "SAME"; + regex_30 := "([ab]*)*"; + regex_31 := "([ab]*)*"; + regex_32 := "([ab]*)*"; + regex_33 := "([ab]*)*"; + regex_34 := "([ab]*)*"; + regex_35 := "([ab]*)*"; regex_36 := "([^a]*)*"; - regex_37 := "SAME"; - regex_38 := "SAME"; + regex_37 := "([^a]*)*"; + regex_38 := "([^a]*)*"; regex_39 := "([^ab]*)*"; - regex_40 := "SAME"; + regex_40 := "([^ab]*)*"; regex_41 := "((z)+|a)*"; regex_42 := "(a)"; regex_46 := "(a*)*(x)"; @@ -526,47 +544,47 @@ test_nullsub3: @regex type = { regex_53 := "(a*){2}(x)"; regex_54 := "(a*){2}(x)"; run: (this) = { - std::cout << "Running nullsub3:\n "<< std::endl; + std::cout << "Running nullsub3:"<< std::endl; test(regex_1(), "1", "(a*)*", "a", "(0,1)(0,1)"); - test(regex_2(), "2", "SAME", "x", "(0,0)(0,0)"); - test(regex_3(), "3", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_4(), "4", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_2(), "2", "(a*)*", "x", "(0,0)(0,0)"); + test(regex_3(), "3", "(a*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_4(), "4", "(a*)*", "aaaaaax", "(0,6)(0,6)"); test(regex_5(), "5", "(a*)+", "a", "(0,1)(0,1)"); - test(regex_6(), "6", "SAME", "x", "(0,0)(0,0)"); - test(regex_7(), "7", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_8(), "8", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_6(), "6", "(a*)+", "x", "(0,0)(0,0)"); + test(regex_7(), "7", "(a*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_8(), "8", "(a*)+", "aaaaaax", "(0,6)(0,6)"); test(regex_9(), "9", "(a+)*", "a", "(0,1)(0,1)"); - test(regex_10(), "10", "SAME", "x", "(0,0)(?,?)"); - test(regex_11(), "11", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_12(), "12", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_10(), "10", "(a+)*", "x", "(0,0)(?,?)"); + test(regex_11(), "11", "(a+)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_12(), "12", "(a+)*", "aaaaaax", "(0,6)(0,6)"); test(regex_13(), "13", "(a+)+", "a", "(0,1)(0,1)"); - test(regex_14(), "14", "SAME", "x", "NOMATCH"); - test(regex_15(), "15", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_16(), "16", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_14(), "14", "(a+)+", "x", "NOMATCH"); + test(regex_15(), "15", "(a+)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_16(), "16", "(a+)+", "aaaaaax", "(0,6)(0,6)"); test(regex_17(), "17", "([a]*)*", "a", "(0,1)(0,1)"); - test(regex_18(), "18", "SAME", "x", "(0,0)(0,0)"); - test(regex_19(), "19", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_20(), "20", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_18(), "18", "([a]*)*", "x", "(0,0)(0,0)"); + test(regex_19(), "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_20(), "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)"); test(regex_21(), "21", "([a]*)+", "a", "(0,1)(0,1)"); - test(regex_22(), "22", "SAME", "x", "(0,0)(0,0)"); - test(regex_23(), "23", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_24(), "24", "SAME", "aaaaaax", "(0,6)(0,6)"); + test(regex_22(), "22", "([a]*)+", "x", "(0,0)(0,0)"); + test(regex_23(), "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_24(), "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)"); test(regex_25(), "25", "([^b]*)*", "a", "(0,1)(0,1)"); - test(regex_26(), "26", "SAME", "b", "(0,0)(0,0)"); - test(regex_27(), "27", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_28(), "28", "SAME", "aaaaaab", "(0,6)(0,6)"); + test(regex_26(), "26", "([^b]*)*", "b", "(0,0)(0,0)"); + test(regex_27(), "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_28(), "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)"); test(regex_29(), "29", "([ab]*)*", "a", "(0,1)(0,1)"); - test(regex_30(), "30", "SAME", "aaaaaa", "(0,6)(0,6)"); - test(regex_31(), "31", "SAME", "ababab", "(0,6)(0,6)"); - test(regex_32(), "32", "SAME", "bababa", "(0,6)(0,6)"); - test(regex_33(), "33", "SAME", "b", "(0,1)(0,1)"); - test(regex_34(), "34", "SAME", "bbbbbb", "(0,6)(0,6)"); - test(regex_35(), "35", "SAME", "aaaabcde", "(0,5)(0,5)"); + test(regex_30(), "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_31(), "31", "([ab]*)*", "ababab", "(0,6)(0,6)"); + test(regex_32(), "32", "([ab]*)*", "bababa", "(0,6)(0,6)"); + test(regex_33(), "33", "([ab]*)*", "b", "(0,1)(0,1)"); + test(regex_34(), "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_35(), "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)"); test(regex_36(), "36", "([^a]*)*", "b", "(0,1)(0,1)"); - test(regex_37(), "37", "SAME", "bbbbbb", "(0,6)(0,6)"); - test(regex_38(), "38", "SAME", "aaaaaa", "(0,0)(0,0)"); + test(regex_37(), "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_38(), "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)"); test(regex_39(), "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)"); - test(regex_40(), "40", "SAME", "ababab", "(0,0)(0,0)"); + test(regex_40(), "40", "([^ab]*)*", "ababab", "(0,0)(0,0)"); test(regex_41(), "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)"); test(regex_42(), "42", "(a)", "aaa", "(0,1)(0,1)"); test(regex_46(), "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)"); @@ -578,6 +596,7 @@ test_nullsub3: @regex type = { test(regex_52(), "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)"); test(regex_53(), "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)"); test(regex_54(), "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)"); + std::cout << std::endl; } } test_repetition2: @regex type = { @@ -661,7 +680,7 @@ test_repetition2: @regex type = { regex_270 := "(a|ab|c|bcd)*(d*)"; regex_271 := "(a|ab|c|bcd)+(d*)"; run: (this) = { - std::cout << "Running repetition2:\n "<< std::endl; + std::cout << "Running repetition2:"<< std::endl; test(regex_1(), "1", "((..)|(.))", "NULL", "NOMATCH"); test(regex_2(), "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH"); test(regex_3(), "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH"); @@ -741,6 +760,7 @@ test_repetition2: @regex type = { test(regex_269(), "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH"); test(regex_270(), "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)"); test(regex_271(), "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + std::cout << std::endl; } } test_totest: @regex type = { @@ -824,7 +844,7 @@ test_totest: @regex type = { regex_250 := "(b(c)|d(e))*"; regex_251 := "(a(b)*)*"; run: (this) = { - std::cout << "Running totest:\n "<< std::endl; + std::cout << "Running totest:"<< std::endl; test(regex_01(), "01", "a+", "xaax", "(1,3)"); test(regex_03(), "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)"); test(regex_04(), "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)"); @@ -904,6 +924,7 @@ test_totest: @regex type = { test(regex_220(), "220", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)"); test(regex_250(), "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)"); test(regex_251(), "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)"); + std::cout << std::endl; } } test_osx_bsd_critical: @regex type = { @@ -919,7 +940,7 @@ test_osx_bsd_critical: @regex type = { regex_M14 := "([ab]|())+b"; regex_20 := "(.?)(b)"; run: (this) = { - std::cout << "Running osx_bsd_critical:\n "<< std::endl; + std::cout << "Running osx_bsd_critical:"<< std::endl; test(regex_1(), "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); test(regex_M1(), "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); test(regex_2(), "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); @@ -931,6 +952,7 @@ test_osx_bsd_critical: @regex type = { test(regex_14(), "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)"); test(regex_M14(), "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)"); test(regex_20(), "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)"); + std::cout << std::endl; } } main: (args) = { diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution new file mode 100644 index 0000000000..0585b2f5f4 --- /dev/null +++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution @@ -0,0 +1,446 @@ +Running basic3: +1: OK regex: \) parsed_regex: \) str: () result: (1,2) expected_results (1,2) +2: OK regex: \} parsed_regex: \} str: } result: (0,1) expected_results (0,1) +3: OK regex: ] parsed_regex: ] str: ] result: (0,1) expected_results (0,1) +4: OK regex: \$^ parsed_regex: \$^ str: NULL result: (0,0) expected_results (0,0) +5: OK regex: a(\$) parsed_regex: a(\$) str: aa result: (1,2)(2,2) expected_results (1,2)(2,2) +6: OK regex: a*(^a) parsed_regex: a*(^a) str: aa result: (0,1)(0,1) expected_results (0,1)(0,1) +7: OK regex: (..)*(...)* parsed_regex: (..)*(...)* str: a result: (0,0)(?,?)(?,?) expected_results (0,0)(?,?)(?,?) +8: OK regex: (..)*(...)* parsed_regex: (..)*(...)* str: abcd result: (0,4)(2,4)(?,?) expected_results (0,4)(2,4)(?,?) +9: OK regex: (ab|a)(bc|c) parsed_regex: (ab|a)(bc|c) str: abc result: (0,3)(0,2)(2,3) expected_results (0,3)(0,2)(2,3) +10: OK regex: (ab)c|abc parsed_regex: (ab)c|abc str: abc result: (0,3)(0,2) expected_results (0,3)(0,2) +11: OK regex: a{0}b parsed_regex: a{0}b str: ab result: (1,2) expected_results (1,2) +12: OK regex: (a*)(b?)(b+)b{3} parsed_regex: (a*)(b?)(b+)b{3} str: aaabbbbbbb result: (0,10)(0,3)(3,4)(4,7) expected_results (0,10)(0,3)(3,4)(4,7) +13: OK regex: (a*)(b{0,1})(b{1,})b{3} parsed_regex: (a*)(b{0,1})(b{1,})b{3} str: aaabbbbbbb result: (0,10)(0,3)(3,4)(4,7) expected_results (0,10)(0,3)(3,4)(4,7) +15: OK regex: ((a|a)|a) parsed_regex: ((a|a)|a) str: a result: (0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1) +16: OK regex: (a*)(a|aa) parsed_regex: (a*)(a|aa) str: aaaa result: (0,4)(0,3)(3,4) expected_results (0,4)(0,3)(3,4) +17: OK regex: a*(a.|aa) parsed_regex: a*(a.|aa) str: aaaa result: (0,4)(2,4) expected_results (0,4)(2,4) +18: OK regex: a(b)|c(d)|a(e)f parsed_regex: a(b)|c(d)|a(e)f str: aef result: (0,3)(?,?)(?,?)(1,2) expected_results (0,3)(?,?)(?,?)(1,2) +19: OK regex: (a|b)?.* parsed_regex: (a|b)?.* str: b result: (0,1)(0,1) expected_results (0,1)(0,1) +20: OK regex: (a|b)c|a(b|c) parsed_regex: (a|b)c|a(b|c) str: ac result: (0,2)(0,1)(?,?) expected_results (0,2)(0,1)(?,?) +21: OK regex: (a|b)c|a(b|c) parsed_regex: (a|b)c|a(b|c) str: ab result: (0,2)(?,?)(1,2) expected_results (0,2)(?,?)(1,2) +22: OK regex: (a|b)*c|(a|ab)*c parsed_regex: (a|b)*c|(a|ab)*c str: abc result: (0,3)(1,2)(?,?) expected_results (0,3)(1,2)(?,?) +23: OK regex: (a|b)*c|(a|ab)*c parsed_regex: (a|b)*c|(a|ab)*c str: xc result: (1,2)(?,?)(?,?) expected_results (1,2)(?,?)(?,?) +24: OK regex: (.a|.b).*|.*(.a|.b) parsed_regex: (.a|.b).*|.*(.a|.b) str: xa result: (0,2)(0,2)(?,?) expected_results (0,2)(0,2)(?,?) +25: OK regex: a?(ab|ba)ab parsed_regex: a?(ab|ba)ab str: abab result: (0,4)(0,2) expected_results (0,4)(0,2) +26: OK regex: a?(ac{0}b|ba)ab parsed_regex: a?(ac{0}b|ba)ab str: abab result: (0,4)(0,2) expected_results (0,4)(0,2) +27: OK regex: ab|abab parsed_regex: ab|abab str: abbabab result: (0,2) expected_results (0,2) +28: OK regex: aba|bab|bba parsed_regex: aba|bab|bba str: baaabbbaba result: (5,8) expected_results (5,8) +29: OK regex: aba|bab parsed_regex: aba|bab str: baaabbbaba result: (6,9) expected_results (6,9) +30: OK regex: (aa|aaa)*|(a|aaaaa) parsed_regex: (aa|aaa)*|(a|aaaaa) str: aa result: (0,2)(0,2)(?,?) expected_results (0,2)(0,2)(?,?) +31: OK regex: (a.|.a.)*|(a|.a...) parsed_regex: (a.|.a.)*|(a|.a...) str: aa result: (0,2)(0,2)(?,?) expected_results (0,2)(0,2)(?,?) +32: OK regex: ab|a parsed_regex: ab|a str: xabc result: (1,3) expected_results (1,3) +33: OK regex: ab|a parsed_regex: ab|a str: xxabc result: (2,4) expected_results (2,4) +M34: OK regex: (Ab|cD)* parsed_regex: (Ab|cD)* str: aBcD result: (0,0)(?,?) expected_results (0,4)(2,4) +35: OK regex: :::1:::0:|:::1:1:0: parsed_regex: :::1:::0:|:::1:1:0: str: :::0:::1:::1:::0: result: (8,17) expected_results (8,17) +36: OK regex: :::1:::0:|:::1:1:1: parsed_regex: :::1:::0:|:::1:1:1: str: :::0:::1:::1:::0: result: (8,17) expected_results (8,17) +37: OK regex: [[:lower:]]+ parsed_regex: [[:lower:]]+ str: `az{ result: (1,3) expected_results (1,3) +38: OK regex: [[:upper:]]+ parsed_regex: [[:upper:]]+ str: @AZ[ result: (1,3) expected_results (1,3) +39: OK regex: (a)(b)(c) parsed_regex: (a)(b)(c) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3) +43 : OK regex: ((((((((((((((((((((((((((((((x)))))))))))))))))))))))))))))) parsed_regex: ((((((((((((((((((((((((((((((x)))))))))))))))))))))))))))))) str: x result: (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1) +44 : OK regex: ((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))* parsed_regex: ((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))* str: xx result: (0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2) expected_results (0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2) +45: OK regex: a?(ab|ba)* parsed_regex: a?(ab|ba)* str: ababababababababababababababababababababababababababababababababababababababababa result: (0,81)(79,81) expected_results (0,81)(79,81) +46: OK regex: abaa|abbaa|abbbaa|abbbbaa parsed_regex: abaa|abbaa|abbbaa|abbbbaa str: ababbabbbabbbabbbbabbbbaa result: (18,25) expected_results (18,25) +47: OK regex: abaa|abbaa|abbbaa|abbbbaa parsed_regex: abaa|abbaa|abbbaa|abbbbaa str: ababbabbbabbbabbbbabaa result: (18,22) expected_results (18,22) +48: OK regex: aaac|aabc|abac|abbc|baac|babc|bbac|bbbc parsed_regex: aaac|aabc|abac|abbc|baac|babc|bbac|bbbc str: baaabbbabac result: (7,11) expected_results (7,11) +49: OK regex: aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll parsed_regex: aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll str: XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa result: (53,57) expected_results (53,57) +50: OK regex: a*a*a*a*a*b parsed_regex: a*a*a*a*a*b str: aaaaaaaaab result: (0,10) expected_results (0,10) +51: OK regex: ab+bc parsed_regex: ab+bc str: abbc result: (0,4) expected_results (0,4) +52: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result: (0,6) expected_results (0,6) +53: OK regex: ab?bc parsed_regex: ab?bc str: abbc result: (0,4) expected_results (0,4) +54: OK regex: ab?bc parsed_regex: ab?bc str: abc result: (0,3) expected_results (0,3) +55: OK regex: ab?c parsed_regex: ab?c str: abc result: (0,3) expected_results (0,3) +56: OK regex: ab|cd parsed_regex: ab|cd str: abc result: (0,2) expected_results (0,2) +57: OK regex: ab|cd parsed_regex: ab|cd str: abcd result: (0,2) expected_results (0,2) +58: OK regex: a\(b parsed_regex: a\(b str: a(b result: (0,3) expected_results (0,3) +59: OK regex: a\(*b parsed_regex: a\(*b str: ab result: (0,2) expected_results (0,2) +60: OK regex: a\(*b parsed_regex: a\(*b str: a((b result: (0,4) expected_results (0,4) +61: OK regex: ((a)) parsed_regex: ((a)) str: abc result: (0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1) +62: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result: (0,3)(0,1)(2,3) expected_results (0,3)(0,1)(2,3) +63: OK regex: a+b+c parsed_regex: a+b+c str: aabbabc result: (4,7) expected_results (4,7) +64: OK regex: a* parsed_regex: a* str: aaa result: (0,3) expected_results (0,3) +65: OK regex: (a*)* parsed_regex: (a*)* str: - result: (0,0)(0,0) expected_results (0,0)(0,0) +66: OK regex: (a*)+ parsed_regex: (a*)+ str: - result: (0,0)(0,0) expected_results (0,0)(0,0) +67: OK regex: (a*|b)* parsed_regex: (a*|b)* str: - result: (0,0)(0,0) expected_results (0,0)(0,0) +68: OK regex: (a+|b)* parsed_regex: (a+|b)* str: ab result: (0,2)(1,2) expected_results (0,2)(1,2) +69: OK regex: (a+|b)+ parsed_regex: (a+|b)+ str: ab result: (0,2)(1,2) expected_results (0,2)(1,2) +70: OK regex: (a+|b)? parsed_regex: (a+|b)? str: ab result: (0,1)(0,1) expected_results (0,1)(0,1) +71: OK regex: (^)* parsed_regex: (^)* str: - result: (0,0)(0,0) expected_results (0,0)(0,0) +72: OK regex: ([abc])*d parsed_regex: ([abc])*d str: abbbcd result: (0,6)(4,5) expected_results (0,6)(4,5) +73: OK regex: ([abc])*bcd parsed_regex: ([abc])*bcd str: abcd result: (0,4)(0,1) expected_results (0,4)(0,1) +74: OK regex: a|b|c|d|e parsed_regex: a|b|c|d|e str: e result: (0,1) expected_results (0,1) +75: OK regex: (a|b|c|d|e)f parsed_regex: (a|b|c|d|e)f str: ef result: (0,2)(0,1) expected_results (0,2)(0,1) +76: OK regex: ((a*|b))* parsed_regex: ((a*|b))* str: - result: (0,0)(0,0)(0,0) expected_results (0,0)(0,0)(0,0) +77: OK regex: (ab|cd)e parsed_regex: (ab|cd)e str: abcde result: (2,5)(2,4) expected_results (2,5)(2,4) +78: OK regex: (a|b)c*d parsed_regex: (a|b)c*d str: abcd result: (1,4)(1,2) expected_results (1,4)(1,2) +79: OK regex: (ab|ab*)bc parsed_regex: (ab|ab*)bc str: abc result: (0,3)(0,1) expected_results (0,3)(0,1) +80: OK regex: a([bc]*)c* parsed_regex: a([bc]*)c* str: abc result: (0,3)(1,3) expected_results (0,3)(1,3) +81: OK regex: a([bc]*)(c*d) parsed_regex: a([bc]*)(c*d) str: abcd result: (0,4)(1,3)(3,4) expected_results (0,4)(1,3)(3,4) +82: OK regex: a([bc]+)(c*d) parsed_regex: a([bc]+)(c*d) str: abcd result: (0,4)(1,3)(3,4) expected_results (0,4)(1,3)(3,4) +83: OK regex: a([bc]*)(c+d) parsed_regex: a([bc]*)(c+d) str: abcd result: (0,4)(1,2)(2,4) expected_results (0,4)(1,2)(2,4) +84: OK regex: a[bcd]*dcdcde parsed_regex: a[bcd]*dcdcde str: adcdcde result: (0,7) expected_results (0,7) +85: OK regex: (ab|a)b*c parsed_regex: (ab|a)b*c str: abc result: (0,3)(0,2) expected_results (0,3)(0,2) +86: OK regex: ((a)(b)c)(d) parsed_regex: ((a)(b)c)(d) str: abcd result: (0,4)(0,3)(0,1)(1,2)(3,4) expected_results (0,4)(0,3)(0,1)(1,2)(3,4) +87: OK regex: ^a(bc+|b[eh])g|.h\$ parsed_regex: ^a(bc+|b[eh])g|.h\$ str: abh result: (1,3)(?,?) expected_results (1,3)(?,?) +88: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: effgz result: (0,5)(0,5)(?,?) expected_results (0,5)(0,5)(?,?) +89: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: ij result: (0,2)(0,2)(1,2) expected_results (0,2)(0,2)(1,2) +90: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: reffgz result: (1,6)(1,6)(?,?) expected_results (1,6)(1,6)(?,?) +91: OK regex: (((((((((a))))))))) parsed_regex: (((((((((a))))))))) str: a result: (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1) +92: OK regex: (.*)c(.*) parsed_regex: (.*)c(.*) str: abcde result: (0,5)(0,2)(3,5) expected_results (0,5)(0,2)(3,5) +93: OK regex: a(bc)d parsed_regex: a(bc)d str: abcd result: (0,4)(1,3) expected_results (0,4)(1,3) +94: OK regex: a[-]?c parsed_regex: a[-]?c str: ac result: (0,3) expected_results (0,3) +95: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Qaddafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12) +96: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Mo'ammar_Gadhafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13) +97: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Kaddafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12) +98: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Qadhafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12) +99: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Gadafi result: (0,14)(?,?)(10,11) expected_results (0,14)(?,?)(10,11) +100: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Mu'ammar_Qadafi result: (0,15)(?,?)(11,12) expected_results (0,15)(?,?)(11,12) +101: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Moamar_Gaddafi result: (0,14)(?,?)(9,11) expected_results (0,14)(?,?)(9,11) +102: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Mu'ammar_Qadhdhafi result: (0,18)(?,?)(13,15) expected_results (0,18)(?,?)(13,15) +103: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Khaddafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13) +104: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Ghaddafy result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13) +105: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Ghadafi result: (0,15)(?,?)(11,12) expected_results (0,15)(?,?)(11,12) +106: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Ghaddafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13) +107: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muamar_Kaddafi result: (0,14)(?,?)(9,11) expected_results (0,14)(?,?)(9,11) +108: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Quathafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13) +109: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Gheddafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13) +110: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Moammar_Khadafy result: (0,15)(?,?)(11,12) expected_results (0,15)(?,?)(11,12) +111: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Moammar_Qudhafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12) +112: OK regex: a+(b|c)*d+ parsed_regex: a+(b|c)*d+ str: aabcdd result: (0,6)(3,4) expected_results (0,6)(3,4) +113: OK regex: ^.+\$ parsed_regex: ^.+\$ str: vivi result: (0,4) expected_results (0,4) +114: OK regex: ^(.+)\$ parsed_regex: ^(.+)\$ str: vivi result: (0,4)(0,4) expected_results (0,4)(0,4) +115: OK regex: ^([^!.]+).att.com!(.+)\$ parsed_regex: ^([^!.]+).att.com!(.+)\$ str: gryphon.att.com!eby result: (0,19)(0,7)(16,19) expected_results (0,19)(0,7)(16,19) +116: OK regex: ^([^!]+!)?([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$ str: bas result: (0,3)(?,?)(0,3) expected_results (0,3)(?,?)(0,3) +117: OK regex: ^([^!]+!)?([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$ str: bar!bas result: (0,7)(0,4)(4,7) expected_results (0,7)(0,4)(4,7) +118: OK regex: ^([^!]+!)?([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$ str: foo!bas result: (0,7)(0,4)(4,7) expected_results (0,7)(0,4)(4,7) +119: OK regex: ^.+!([^!]+!)([^!]+)\$ parsed_regex: ^.+!([^!]+!)([^!]+)\$ str: foo!bar!bas result: (0,11)(4,8)(8,11) expected_results (0,11)(4,8)(8,11) +120: OK regex: ((foo)|(bar))!bas parsed_regex: ((foo)|(bar))!bas str: bar!bas result: (0,7)(0,3)(?,?)(0,3) expected_results (0,7)(0,3)(?,?)(0,3) +121: OK regex: ((foo)|(bar))!bas parsed_regex: ((foo)|(bar))!bas str: foo!bar!bas result: (4,11)(4,7)(?,?)(4,7) expected_results (4,11)(4,7)(?,?)(4,7) +122: OK regex: ((foo)|(bar))!bas parsed_regex: ((foo)|(bar))!bas str: foo!bas result: (0,7)(0,3)(0,3)(?,?) expected_results (0,7)(0,3)(0,3)(?,?) +123: OK regex: ((foo)|bar)!bas parsed_regex: ((foo)|bar)!bas str: bar!bas result: (0,7)(0,3)(?,?) expected_results (0,7)(0,3)(?,?) +124: OK regex: ((foo)|bar)!bas parsed_regex: ((foo)|bar)!bas str: foo!bar!bas result: (4,11)(4,7)(?,?) expected_results (4,11)(4,7)(?,?) +125: OK regex: ((foo)|bar)!bas parsed_regex: ((foo)|bar)!bas str: foo!bas result: (0,7)(0,3)(0,3) expected_results (0,7)(0,3)(0,3) +126: OK regex: (foo|(bar))!bas parsed_regex: (foo|(bar))!bas str: bar!bas result: (0,7)(0,3)(0,3) expected_results (0,7)(0,3)(0,3) +127: OK regex: (foo|(bar))!bas parsed_regex: (foo|(bar))!bas str: foo!bar!bas result: (4,11)(4,7)(4,7) expected_results (4,11)(4,7)(4,7) +128: OK regex: (foo|(bar))!bas parsed_regex: (foo|(bar))!bas str: foo!bas result: (0,7)(0,3)(?,?) expected_results (0,7)(0,3)(?,?) +129: OK regex: (foo|bar)!bas parsed_regex: (foo|bar)!bas str: bar!bas result: (0,7)(0,3) expected_results (0,7)(0,3) +130: OK regex: (foo|bar)!bas parsed_regex: (foo|bar)!bas str: foo!bar!bas result: (4,11)(4,7) expected_results (4,11)(4,7) +131: OK regex: (foo|bar)!bas parsed_regex: (foo|bar)!bas str: foo!bas result: (0,7)(0,3) expected_results (0,7)(0,3) +132: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: foo!bar!bas result: (0,11)(0,11)(?,?)(?,?)(4,8)(8,11) expected_results (0,11)(0,11)(?,?)(?,?)(4,8)(8,11) +133: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: bas result: (0,3)(?,?)(0,3)(?,?)(?,?) expected_results (0,3)(?,?)(0,3)(?,?)(?,?) +134: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: bar!bas result: (0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,4)(4,7)(?,?)(?,?) +135: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: foo!bar!bas result: (0,11)(?,?)(?,?)(4,8)(8,11) expected_results (0,11)(?,?)(?,?)(4,8)(8,11) +136: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: foo!bas result: (0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,4)(4,7)(?,?)(?,?) +137: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: bas result: (0,3)(0,3)(?,?)(0,3)(?,?)(?,?) expected_results (0,3)(0,3)(?,?)(0,3)(?,?)(?,?) +138: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: bar!bas result: (0,7)(0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,7)(0,4)(4,7)(?,?)(?,?) +139: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: foo!bar!bas result: (0,11)(0,11)(?,?)(?,?)(4,8)(8,11) expected_results (0,11)(0,11)(?,?)(?,?)(4,8)(8,11) +140: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: foo!bas result: (0,7)(0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,7)(0,4)(4,7)(?,?)(?,?) +141: OK regex: .*(/XXX).* parsed_regex: .*(/XXX).* str: /XXX result: (0,4)(0,4) expected_results (0,4)(0,4) +142: OK regex: .*(\\XXX).* parsed_regex: .*(\\XXX).* str: \XXX result: (0,4)(0,4) expected_results (0,4)(0,4) +143: OK regex: \\XXX parsed_regex: \\XXX str: \XXX result: (0,4) expected_results (0,4) +144: OK regex: .*(/000).* parsed_regex: .*(/000).* str: /000 result: (0,4)(0,4) expected_results (0,4)(0,4) +145: OK regex: .*(\\000).* parsed_regex: .*(\\000).* str: \000 result: (0,4)(0,4) expected_results (0,4)(0,4) +146: OK regex: \\000 parsed_regex: \\000 str: \000 result: (0,4) expected_results (0,4) + +Running class: +1: OK regex: aa* parsed_regex: aa* str: xaxaax result: (1,2) expected_results (1,2) +2: OK regex: (a*)(ab)*(b*) parsed_regex: (a*)(ab)*(b*) str: abc result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2) +M2: OK regex: (a*)(ab)*(b*) parsed_regex: (a*)(ab)*(b*) str: abc result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,0)(0,2)(2,2) +3: Failure: Ranges are wrong. regex: ((a*)(ab)*)((b*)(a*)) parsed_regex: ((a*)(ab)*)((b*)(a*)) str: aba result: (0,3)(0,1)(0,1)(?,?)(1,3)(1,2)(2,3) expected_results (0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3) +4: OK regex: (...?.?)* parsed_regex: (...?.?)* str: xxxxxx result: (0,6)(4,6) expected_results (0,6)(4,6) +5: Failure: Ranges are wrong. regex: (a|ab)(bc|c) parsed_regex: (a|ab)(bc|c) str: abcabc result: (0,3)(0,1)(1,3) expected_results (0,3)(0,2)(2,3) +6: Failure: Ranges are wrong. regex: (aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b) str: ababa result: (0,4)(0,3)(3,4) expected_results (0,5)(0,2)(2,5) +7: OK regex: (a*){2} parsed_regex: (a*){2} str: xxxxx result: (0,0)(0,0) expected_results (0,0)(0,0) +8: OK regex: (a*)* parsed_regex: (a*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +9: Failure: Ranges are wrong. regex: (aba|a*b)* parsed_regex: (aba|a*b)* str: ababa result: (0,4)(3,4) expected_results (0,5)(2,5) +10: Failure: Ranges are wrong. regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(?,?) +11: OK regex: .*(.*) parsed_regex: .*(.*) str: ab result: (0,2)(2,2) expected_results (0,2)(2,2) +12: OK regex: (a?)((ab)?)(b?)a?(ab)?b? parsed_regex: (a?)((ab)?)(b?)a?(ab)?b? str: abab result: (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) expected_results (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) +M12: OK regex: (a?)((ab)?)(b?)a?(ab)?b? parsed_regex: (a?)((ab)?)(b?)a?(ab)?b? str: abab result: (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) expected_results (0,4)(0,1)(1,1)(?,?)(1,2)(2,4) + +Running left_assoc: +M1: Failure: Ranges should be wrong. regex: (a|ab)(c|bcd)(d*) parsed_regex: (a|ab)(c|bcd)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4) +M2: Failure: Ranges should be wrong. regex: (a|ab)(bcd|c)(d*) parsed_regex: (a|ab)(bcd|c)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4) +M3: OK regex: (ab|a)(c|bcd)(d*) parsed_regex: (ab|a)(c|bcd)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4) +M4: OK regex: (ab|a)(bcd|c)(d*) parsed_regex: (ab|a)(bcd|c)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4) +M5: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3) +M6: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3) +M7: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3) +M8: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3) +M9: Failure: Ranges should be wrong. regex: (a|ab)(c|bcd)(d|.*) parsed_regex: (a|ab)(c|bcd)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4) +M10: Failure: Ranges should be wrong. regex: (a|ab)(bcd|c)(d|.*) parsed_regex: (a|ab)(bcd|c)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4) +M11: OK regex: (ab|a)(c|bcd)(d|.*) parsed_regex: (ab|a)(c|bcd)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4) +M12: OK regex: (ab|a)(bcd|c)(d|.*) parsed_regex: (ab|a)(bcd|c)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4) + +Running right_assoc: +1: Failure: Ranges are wrong. regex: (a|ab)(c|bcd)(d*) parsed_regex: (a|ab)(c|bcd)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4) +2: Failure: Ranges are wrong. regex: (a|ab)(bcd|c)(d*) parsed_regex: (a|ab)(bcd|c)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4) +3: OK regex: (ab|a)(c|bcd)(d*) parsed_regex: (ab|a)(c|bcd)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4) +4: OK regex: (ab|a)(bcd|c)(d*) parsed_regex: (ab|a)(bcd|c)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4) +5: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3) +6: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3) +7: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3) +8: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3) +9: Failure: Ranges are wrong. regex: (a|ab)(c|bcd)(d|.*) parsed_regex: (a|ab)(c|bcd)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4) +10: Failure: Ranges are wrong. regex: (a|ab)(bcd|c)(d|.*) parsed_regex: (a|ab)(bcd|c)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4) +11: OK regex: (ab|a)(c|bcd)(d|.*) parsed_regex: (ab|a)(c|bcd)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4) +12: OK regex: (ab|a)(bcd|c)(d|.*) parsed_regex: (ab|a)(bcd|c)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4) + +Running forced_assoc: +1: OK regex: (a|ab)(c|bcd) parsed_regex: (a|ab)(c|bcd) str: abcd result: (0,4)(0,1)(1,4) expected_results (0,4)(0,1)(1,4) +2: OK regex: (a|ab)(bcd|c) parsed_regex: (a|ab)(bcd|c) str: abcd result: (0,4)(0,1)(1,4) expected_results (0,4)(0,1)(1,4) +3: Failure: Ranges are wrong. regex: (ab|a)(c|bcd) parsed_regex: (ab|a)(c|bcd) str: abcd result: (0,3)(0,2)(2,3) expected_results (0,4)(0,1)(1,4) +4: Failure: Ranges are wrong. regex: (ab|a)(bcd|c) parsed_regex: (ab|a)(bcd|c) str: abcd result: (0,3)(0,2)(2,3) expected_results (0,4)(0,1)(1,4) +5: OK regex: ((a|ab)(c|bcd))(d*) parsed_regex: ((a|ab)(c|bcd))(d*) str: abcd result: (0,4)(0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4) +6: OK regex: ((a|ab)(bcd|c))(d*) parsed_regex: ((a|ab)(bcd|c))(d*) str: abcd result: (0,4)(0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4) +7: Failure: Ranges are wrong. regex: ((ab|a)(c|bcd))(d*) parsed_regex: ((ab|a)(c|bcd))(d*) str: abcd result: (0,4)(0,3)(0,2)(2,3)(3,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4) +8: Failure: Ranges are wrong. regex: ((ab|a)(bcd|c))(d*) parsed_regex: ((ab|a)(bcd|c))(d*) str: abcd result: (0,4)(0,3)(0,2)(2,3)(3,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4) +9: Failure: Ranges are wrong. regex: (a|ab)((c|bcd)(d*)) parsed_regex: (a|ab)((c|bcd)(d*)) str: abcd result: (0,4)(0,1)(1,4)(1,4)(4,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4) +10: Failure: Ranges are wrong. regex: (a|ab)((bcd|c)(d*)) parsed_regex: (a|ab)((bcd|c)(d*)) str: abcd result: (0,4)(0,1)(1,4)(1,4)(4,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4) +11: OK regex: (ab|a)((c|bcd)(d*)) parsed_regex: (ab|a)((c|bcd)(d*)) str: abcd result: (0,4)(0,2)(2,4)(2,3)(3,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4) +12: OK regex: (ab|a)((bcd|c)(d*)) parsed_regex: (ab|a)((bcd|c)(d*)) str: abcd result: (0,4)(0,2)(2,4)(2,3)(3,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4) +13: Failure: Ranges are wrong. regex: (a*)(b|abc) parsed_regex: (a*)(b|abc) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3) +14: Failure: Ranges are wrong. regex: (a*)(abc|b) parsed_regex: (a*)(abc|b) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3) +15: Failure: Ranges are wrong. regex: ((a*)(b|abc))(c*) parsed_regex: ((a*)(b|abc))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3) +16: Failure: Ranges are wrong. regex: ((a*)(abc|b))(c*) parsed_regex: ((a*)(abc|b))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3) +17: OK regex: (a*)((b|abc)(c*)) parsed_regex: (a*)((b|abc)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3) +18: OK regex: (a*)((abc|b)(c*)) parsed_regex: (a*)((abc|b)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3) +19: Failure: Ranges are wrong. regex: (a*)(b|abc) parsed_regex: (a*)(b|abc) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3) +20: Failure: Ranges are wrong. regex: (a*)(abc|b) parsed_regex: (a*)(abc|b) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3) +21: Failure: Ranges are wrong. regex: ((a*)(b|abc))(c*) parsed_regex: ((a*)(b|abc))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3) +22: Failure: Ranges are wrong. regex: ((a*)(abc|b))(c*) parsed_regex: ((a*)(abc|b))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3) +23: OK regex: (a*)((b|abc)(c*)) parsed_regex: (a*)((b|abc)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3) +24: OK regex: (a*)((abc|b)(c*)) parsed_regex: (a*)((abc|b)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3) +25: Failure: Ranges are wrong. regex: (a|ab) parsed_regex: (a|ab) str: ab result: (0,1)(0,1) expected_results (0,2)(0,2) +26: OK regex: (ab|a) parsed_regex: (ab|a) str: ab result: (0,2)(0,2) expected_results (0,2)(0,2) +27: Failure: Ranges are wrong. regex: (a|ab)(b*) parsed_regex: (a|ab)(b*) str: ab result: (0,2)(0,1)(1,2) expected_results (0,2)(0,2)(2,2) +28: OK regex: (ab|a)(b*) parsed_regex: (ab|a)(b*) str: ab result: (0,2)(0,2)(2,2) expected_results (0,2)(0,2)(2,2) + +Running nullsub3: +1: OK regex: (a*)* parsed_regex: (a*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +2: OK regex: (a*)* parsed_regex: (a*)* str: x result: (0,0)(0,0) expected_results (0,0)(0,0) +3: OK regex: (a*)* parsed_regex: (a*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +4: OK regex: (a*)* parsed_regex: (a*)* str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) +5: OK regex: (a*)+ parsed_regex: (a*)+ str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +6: OK regex: (a*)+ parsed_regex: (a*)+ str: x result: (0,0)(0,0) expected_results (0,0)(0,0) +7: OK regex: (a*)+ parsed_regex: (a*)+ str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +8: OK regex: (a*)+ parsed_regex: (a*)+ str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) +9: OK regex: (a+)* parsed_regex: (a+)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +10: OK regex: (a+)* parsed_regex: (a+)* str: x result: (0,0)(?,?) expected_results (0,0)(?,?) +11: OK regex: (a+)* parsed_regex: (a+)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +12: OK regex: (a+)* parsed_regex: (a+)* str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) +13: OK regex: (a+)+ parsed_regex: (a+)+ str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +14: OK regex: (a+)+ parsed_regex: (a+)+ str: x result: (?,?)(?,?) expected_results NOMATCH +15: OK regex: (a+)+ parsed_regex: (a+)+ str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +16: OK regex: (a+)+ parsed_regex: (a+)+ str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) +17: OK regex: ([a]*)* parsed_regex: ([a]*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +18: OK regex: ([a]*)* parsed_regex: ([a]*)* str: x result: (0,0)(0,0) expected_results (0,0)(0,0) +19: OK regex: ([a]*)* parsed_regex: ([a]*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +20: OK regex: ([a]*)* parsed_regex: ([a]*)* str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) +21: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +22: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: x result: (0,0)(0,0) expected_results (0,0)(0,0) +23: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +24: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) +25: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +26: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: b result: (0,0)(0,0) expected_results (0,0)(0,0) +27: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +28: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: aaaaaab result: (0,6)(0,6) expected_results (0,6)(0,6) +29: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) +30: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) +31: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: ababab result: (0,6)(0,6) expected_results (0,6)(0,6) +32: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: bababa result: (0,6)(0,6) expected_results (0,6)(0,6) +33: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: b result: (0,1)(0,1) expected_results (0,1)(0,1) +34: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: bbbbbb result: (0,6)(0,6) expected_results (0,6)(0,6) +35: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: aaaabcde result: (0,5)(0,5) expected_results (0,5)(0,5) +36: OK regex: ([^a]*)* parsed_regex: ([^a]*)* str: b result: (0,1)(0,1) expected_results (0,1)(0,1) +37: OK regex: ([^a]*)* parsed_regex: ([^a]*)* str: bbbbbb result: (0,6)(0,6) expected_results (0,6)(0,6) +38: OK regex: ([^a]*)* parsed_regex: ([^a]*)* str: aaaaaa result: (0,0)(0,0) expected_results (0,0)(0,0) +39: OK regex: ([^ab]*)* parsed_regex: ([^ab]*)* str: ccccxx result: (0,6)(0,6) expected_results (0,6)(0,6) +40: OK regex: ([^ab]*)* parsed_regex: ([^ab]*)* str: ababab result: (0,0)(0,0) expected_results (0,0)(0,0) +41: OK regex: ((z)+|a)* parsed_regex: ((z)+|a)* str: zabcde result: (0,2)(1,2)(?,?) expected_results (0,2)(1,2)(?,?) +42: OK regex: (a) parsed_regex: (a) str: aaa result: (0,1)(0,1) expected_results (0,1)(0,1) +46: OK regex: (a*)*(x) parsed_regex: (a*)*(x) str: x result: (0,1)(0,0)(0,1) expected_results (0,1)(0,0)(0,1) +47: OK regex: (a*)*(x) parsed_regex: (a*)*(x) str: ax result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2) +48: OK regex: (a*)*(x) parsed_regex: (a*)*(x) str: axa result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2) +49: OK regex: (a*)+(x) parsed_regex: (a*)+(x) str: x result: (0,1)(0,0)(0,1) expected_results (0,1)(0,0)(0,1) +50: OK regex: (a*)+(x) parsed_regex: (a*)+(x) str: ax result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2) +51: OK regex: (a*)+(x) parsed_regex: (a*)+(x) str: axa result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2) +52: OK regex: (a*){2}(x) parsed_regex: (a*){2}(x) str: x result: (0,1)(0,0)(0,1) expected_results (0,1)(0,0)(0,1) +53: OK regex: (a*){2}(x) parsed_regex: (a*){2}(x) str: ax result: (0,2)(1,1)(1,2) expected_results (0,2)(1,1)(1,2) +54: OK regex: (a*){2}(x) parsed_regex: (a*){2}(x) str: axa result: (0,2)(1,1)(1,2) expected_results (0,2)(1,1)(1,2) + +Running repetition2: +1: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +2: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: NULL result: (?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +3: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: NULL result: (?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +4: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +5: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +6: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +7: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: NULL result: (0,0)(?,?)(?,?)(?,?) expected_results (0,0)(?,?)(?,?)(?,?) +8: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1) +9: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: a result: (?,?)(0,1)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +10: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: a result: (?,?)(0,1)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +11: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1) +12: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: a result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +13: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: a result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +14: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1) +15: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +16: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aa result: (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2) +17: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aa result: (?,?)(1,2)(?,?)(?,?)(1,2)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +18: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +19: Failure: Regex should apply. regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aa result: (?,?)(?,?)(?,?)(?,?) expected_results (0,2)(1,2)(?,?)(1,2) +20: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aa result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +21: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +22: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +23: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaa result: (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3) expected_results (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3) +24: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaa result: (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3) expected_results (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3) +25: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +26: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaa result: (0,3)(2,3)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(2,3) +27: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaa result: (?,?)(?,?)(?,?)(?,?) expected_results (0,3)(2,3)(?,?)(2,3) +28: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaa result: (0,3)(2,3)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(2,3) +29: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +30: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) +31: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaaa result: (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4) expected_results (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4) +32: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +33: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?) +34: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaa result: (?,?)(?,?)(?,?)(?,?) expected_results (0,4)(3,4)(?,?)(3,4) +35: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?) +36: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +37: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) +38: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaaaa result: (0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5) expected_results (0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5) +39: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +40: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?) +41: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaaa result: (0,5)(4,5)(?,?)(4,5) expected_results (0,5)(4,5)(?,?)(4,5) +42: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaaaa result: (0,5)(4,5)(?,?)(4,5) expected_results (0,5)(4,5)(?,?)(4,5) +43: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +44: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) +45: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaaaaa result: (0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?) expected_results (0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?) +46: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) +47: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaaaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?) +48: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaaaa result: (0,6)(4,6)(4,6)(?,?) expected_results (0,6)(4,6)(4,6)(?,?) +49: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaaaaa result: (0,6)(4,6)(4,6)(?,?) expected_results (0,6)(4,6)(4,6)(?,?) +100: OK regex: X(.?){0,}Y parsed_regex: X(.?){0,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +101: OK regex: X(.?){1,}Y parsed_regex: X(.?){1,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +102: OK regex: X(.?){2,}Y parsed_regex: X(.?){2,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +103: OK regex: X(.?){3,}Y parsed_regex: X(.?){3,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +104: OK regex: X(.?){4,}Y parsed_regex: X(.?){4,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +105: OK regex: X(.?){5,}Y parsed_regex: X(.?){5,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +106: OK regex: X(.?){6,}Y parsed_regex: X(.?){6,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +107: OK regex: X(.?){7,}Y parsed_regex: X(.?){7,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +108: Failure: Regex should apply. regex: X(.?){8,}Y parsed_regex: X(.?){8,}Y str: X1234567Y result: (?,?)(?,?) expected_results (0,9)(8,8) +110: OK regex: X(.?){0,8}Y parsed_regex: X(.?){0,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +111: OK regex: X(.?){1,8}Y parsed_regex: X(.?){1,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +112: OK regex: X(.?){2,8}Y parsed_regex: X(.?){2,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +113: OK regex: X(.?){3,8}Y parsed_regex: X(.?){3,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +114: OK regex: X(.?){4,8}Y parsed_regex: X(.?){4,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +115: OK regex: X(.?){5,8}Y parsed_regex: X(.?){5,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +116: OK regex: X(.?){6,8}Y parsed_regex: X(.?){6,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +117: OK regex: X(.?){7,8}Y parsed_regex: X(.?){7,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) +118: Failure: Parsed regex does not match. regex: X(.?){8,8}Y parsed_regex: X(.?){8}Y str: X1234567Y result: (?,?)(?,?) expected_results (0,9)(8,8) +260: Failure: Ranges are wrong. regex: (a|ab|c|bcd){0,}(d*) parsed_regex: (a|ab|c|bcd){0,}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) +261: Failure: Ranges are wrong. regex: (a|ab|c|bcd){1,}(d*) parsed_regex: (a|ab|c|bcd){1,}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) +262: Failure: Ranges are wrong. regex: (a|ab|c|bcd){2,}(d*) parsed_regex: (a|ab|c|bcd){2,}(d*) str: ababcd result: (2,6)(3,6)(6,6) expected_results (0,6)(3,6)(6,6) +263: Failure: Regex should apply. regex: (a|ab|c|bcd){3,}(d*) parsed_regex: (a|ab|c|bcd){3,}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results (0,6)(3,6)(6,6) +264: OK regex: (a|ab|c|bcd){4,}(d*) parsed_regex: (a|ab|c|bcd){4,}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results NOMATCH +265: Failure: Ranges are wrong. regex: (a|ab|c|bcd){0,10}(d*) parsed_regex: (a|ab|c|bcd){0,10}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) +266: Failure: Ranges are wrong. regex: (a|ab|c|bcd){1,10}(d*) parsed_regex: (a|ab|c|bcd){1,10}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) +267: Failure: Ranges are wrong. regex: (a|ab|c|bcd){2,10}(d*) parsed_regex: (a|ab|c|bcd){2,10}(d*) str: ababcd result: (2,6)(3,6)(6,6) expected_results (0,6)(3,6)(6,6) +268: Failure: Regex should apply. regex: (a|ab|c|bcd){3,10}(d*) parsed_regex: (a|ab|c|bcd){3,10}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results (0,6)(3,6)(6,6) +269: OK regex: (a|ab|c|bcd){4,10}(d*) parsed_regex: (a|ab|c|bcd){4,10}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results NOMATCH +270: Failure: Ranges are wrong. regex: (a|ab|c|bcd)*(d*) parsed_regex: (a|ab|c|bcd)*(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) +271: Failure: Ranges are wrong. regex: (a|ab|c|bcd)+(d*) parsed_regex: (a|ab|c|bcd)+(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) + +Running totest: +01: OK regex: a+ parsed_regex: a+ str: xaax result: (1,3) expected_results (1,3) +03: Failure: Ranges are wrong. regex: (a?)((ab)?) parsed_regex: (a?)((ab)?) str: ab result: (0,1)(0,1)(1,1)(?,?) expected_results (0,2)(0,0)(0,2)(0,2) +04: OK regex: (a?)((ab)?)(b?) parsed_regex: (a?)((ab)?)(b?) str: ab result: (0,2)(0,1)(1,1)(?,?)(1,2) expected_results (0,2)(0,1)(1,1)(?,?)(1,2) +05: Failure: Ranges are wrong. regex: ((a?)((ab)?))(b?) parsed_regex: ((a?)((ab)?))(b?) str: ab result: (0,2)(0,1)(0,1)(1,1)(?,?)(1,2) expected_results (0,2)(0,2)(0,0)(0,2)(0,2)(2,2) +06: OK regex: (a?)(((ab)?)(b?)) parsed_regex: (a?)(((ab)?)(b?)) str: ab result: (0,2)(0,1)(1,2)(1,1)(?,?)(1,2) expected_results (0,2)(0,1)(1,2)(1,1)(?,?)(1,2) +07: OK regex: (.?) parsed_regex: (.?) str: x result: (0,1)(0,1) expected_results (0,1)(0,1) +08: OK regex: (.?){1} parsed_regex: (.?){1} str: x result: (0,1)(0,1) expected_results (0,1)(0,1) +09: OK regex: (.?)(.?) parsed_regex: (.?)(.?) str: x result: (0,1)(0,1)(1,1) expected_results (0,1)(0,1)(1,1) +10: OK regex: (.?){2} parsed_regex: (.?){2} str: x result: (0,1)(1,1) expected_results (0,1)(1,1) +11: OK regex: (.?)* parsed_regex: (.?)* str: x result: (0,1)(0,1) expected_results (0,1)(0,1) +12: OK regex: (.?.?) parsed_regex: (.?.?) str: xxx result: (0,2)(0,2) expected_results (0,2)(0,2) +13: OK regex: (.?.?){1} parsed_regex: (.?.?){1} str: xxx result: (0,2)(0,2) expected_results (0,2)(0,2) +14: OK regex: (.?.?)(.?.?) parsed_regex: (.?.?)(.?.?) str: xxx result: (0,3)(0,2)(2,3) expected_results (0,3)(0,2)(2,3) +15: OK regex: (.?.?){2} parsed_regex: (.?.?){2} str: xxx result: (0,3)(2,3) expected_results (0,3)(2,3) +16: OK regex: (.?.?)(.?.?)(.?.?) parsed_regex: (.?.?)(.?.?)(.?.?) str: xxx result: (0,3)(0,2)(2,3)(3,3) expected_results (0,3)(0,2)(2,3)(3,3) +17: OK regex: (.?.?){3} parsed_regex: (.?.?){3} str: xxx result: (0,3)(3,3) expected_results (0,3)(3,3) +18: OK regex: (.?.?)* parsed_regex: (.?.?)* str: xxx result: (0,3)(2,3) expected_results (0,3)(2,3) +19: OK regex: a?((ab)?)(b?) parsed_regex: a?((ab)?)(b?) str: ab result: (0,2)(1,1)(?,?)(1,2) expected_results (0,2)(1,1)(?,?)(1,2) +20: OK regex: (a?)((ab)?)b? parsed_regex: (a?)((ab)?)b? str: ab result: (0,2)(0,1)(1,1)(?,?) expected_results (0,2)(0,1)(1,1)(?,?) +21: OK regex: a?((ab)?)b? parsed_regex: a?((ab)?)b? str: ab result: (0,2)(1,1)(?,?) expected_results (0,2)(1,1)(?,?) +22: OK regex: (a*){2} parsed_regex: (a*){2} str: xxxxx result: (0,0)(0,0) expected_results (0,0)(0,0) +23: OK regex: (ab?)(b?a) parsed_regex: (ab?)(b?a) str: aba result: (0,3)(0,2)(2,3) expected_results (0,3)(0,2)(2,3) +24: Failure: Ranges are wrong. regex: (a|ab)(ba|a) parsed_regex: (a|ab)(ba|a) str: aba result: (0,3)(0,1)(1,3) expected_results (0,3)(0,2)(2,3) +25: Failure: Ranges are wrong. regex: (a|ab|ba) parsed_regex: (a|ab|ba) str: aba result: (0,1)(0,1) expected_results (0,2)(0,2) +26: Failure: Ranges are wrong. regex: (a|ab|ba)(a|ab|ba) parsed_regex: (a|ab|ba)(a|ab|ba) str: aba result: (0,3)(0,1)(1,3) expected_results (0,3)(0,2)(2,3) +27: Failure: Ranges are wrong. regex: (a|ab|ba)* parsed_regex: (a|ab|ba)* str: aba result: (0,3)(1,3) expected_results (0,3)(2,3) +28: OK regex: (aba|a*b) parsed_regex: (aba|a*b) str: ababa result: (0,3)(0,3) expected_results (0,3)(0,3) +29: Failure: Ranges are wrong. regex: (aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b) str: ababa result: (0,4)(0,3)(3,4) expected_results (0,5)(0,2)(2,5) +1029: OK regex: (aba|a*b)(aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b)(aba|a*b) str: ababa result: (?,?)(3,4)(2,4)(?,?) expected_results NOMATCH +30: Failure: Ranges are wrong. regex: (aba|a*b)* parsed_regex: (aba|a*b)* str: ababa result: (0,4)(3,4) expected_results (0,5)(2,5) +31: OK regex: (aba|ab|a) parsed_regex: (aba|ab|a) str: ababa result: (0,3)(0,3) expected_results (0,3)(0,3) +32: OK regex: (aba|ab|a)(aba|ab|a) parsed_regex: (aba|ab|a)(aba|ab|a) str: ababa result: (0,5)(0,2)(2,5) expected_results (0,5)(0,2)(2,5) +1032: OK regex: (aba|ab|a)(aba|ab|a)(aba|ab|a) parsed_regex: (aba|ab|a)(aba|ab|a)(aba|ab|a) str: ababa result: (0,5)(0,2)(2,4)(4,5) expected_results (0,5)(0,2)(2,4)(4,5) +33: Failure: Ranges are wrong. regex: (aba|ab|a)* parsed_regex: (aba|ab|a)* str: ababa result: (0,3)(0,3) expected_results (0,5)(2,5) +34: OK regex: (a(b)?) parsed_regex: (a(b)?) str: aba result: (0,2)(0,2)(1,2) expected_results (0,2)(0,2)(1,2) +35: OK regex: (a(b)?)(a(b)?) parsed_regex: (a(b)?)(a(b)?) str: aba result: (0,3)(0,2)(1,2)(2,3)(?,?) expected_results (0,3)(0,2)(1,2)(2,3)(?,?) +36: Failure: Ranges are wrong. regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(?,?) +37: OK regex: (.*)(.*) parsed_regex: (.*)(.*) str: xx result: (0,2)(0,2)(2,2) expected_results (0,2)(0,2)(2,2) +38: OK regex: .*(.*) parsed_regex: .*(.*) str: xx result: (0,2)(2,2) expected_results (0,2)(2,2) +39: OK regex: (a.*z|b.*y) parsed_regex: (a.*z|b.*y) str: azbazby result: (0,5)(0,5) expected_results (0,5)(0,5) +40: OK regex: (a.*z|b.*y)(a.*z|b.*y) parsed_regex: (a.*z|b.*y)(a.*z|b.*y) str: azbazby result: (0,7)(0,5)(5,7) expected_results (0,7)(0,5)(5,7) +41: OK regex: (a.*z|b.*y)* parsed_regex: (a.*z|b.*y)* str: azbazby result: (0,7)(5,7) expected_results (0,7)(5,7) +42: Failure: Ranges are wrong. regex: (.|..)(.*) parsed_regex: (.|..)(.*) str: ab result: (0,2)(0,1)(1,2) expected_results (0,2)(0,2)(2,2) +43: Failure: Ranges are wrong. regex: ((..)*(...)*) parsed_regex: ((..)*(...)*) str: xxx result: (0,2)(0,2)(0,2)(?,?) expected_results (0,3)(0,3)(?,?)(0,3) +44: Failure: Ranges are wrong. regex: ((..)*(...)*)((..)*(...)*) parsed_regex: ((..)*(...)*)((..)*(...)*) str: xxx result: (0,2)(0,2)(0,2)(?,?)(2,2)(?,?)(?,?) expected_results (0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?) +45: Failure: Ranges are wrong. regex: ((..)*(...)*)* parsed_regex: ((..)*(...)*)* str: xxx result: (0,2)(0,2)(0,2)(?,?) expected_results (0,3)(0,3)(?,?)(0,3) +83: Failure: Ranges are wrong. regex: (aa(b(b))?)+ parsed_regex: (aa(b(b))?)+ str: aabbaa result: (0,6)(4,6)(2,4)(3,4) expected_results (0,6)(4,6)(?,?)(?,?) +84: Failure: Ranges are wrong. regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(?,?) +85: OK regex: ([ab]+)([bc]+)([cd]*) parsed_regex: ([ab]+)([bc]+)([cd]*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4) +90: OK regex: ^(A([^B]*))?(B(.*))? parsed_regex: ^(A([^B]*))?(B(.*))? str: Aa result: (0,2)(0,2)(1,2)(?,?)(?,?) expected_results (0,2)(0,2)(1,2)(?,?)(?,?) +91: OK regex: ^(A([^B]*))?(B(.*))? parsed_regex: ^(A([^B]*))?(B(.*))? str: Bb result: (0,2)(?,?)(?,?)(0,2)(1,2) expected_results (0,2)(?,?)(?,?)(0,2)(1,2) +110: OK regex: (^){0,3} parsed_regex: (^){0,3} str: a result: (0,0)(0,0) expected_results (0,0)(0,0) +111: OK regex: (\$){0,3} parsed_regex: (\$){0,3} str: a result: (0,0)(?,?) expected_results (0,0)(?,?) +112: OK regex: (^){1,3} parsed_regex: (^){1,3} str: a result: (0,0)(0,0) expected_results (0,0)(0,0) +113: OK regex: (\$){1,3} parsed_regex: (\$){1,3} str: a result: (1,1)(1,1) expected_results (1,1)(1,1) +200: OK regex: ((s^)|(s)|(^)|(\$)|(^.))* parsed_regex: ((s^)|(s)|(^)|(\$)|(^.))* str: searchme result: (0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?) expected_results (0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?) +201: OK regex: s(()|^)e parsed_regex: s(()|^)e str: searchme result: (0,2)(1,1)(1,1) expected_results (0,2)(1,1)(1,1) +202: OK regex: s(^|())e parsed_regex: s(^|())e str: searchme result: (0,2)(1,1)(1,1) expected_results (0,2)(1,1)(1,1) +203: OK regex: s(^|())e parsed_regex: s(^|())e str: searchme result: (0,2)(1,1)(1,1) expected_results (0,2)(1,1)(1,1) +204: OK regex: s()?e parsed_regex: s()?e str: searchme result: (0,2)(1,1) expected_results (0,2)(1,1) +205: OK regex: s(^)?e parsed_regex: s(^)?e str: searchme result: (0,2)(?,?) expected_results (0,2)(?,?) +206: OK regex: ((s)|(e)|(a))* parsed_regex: ((s)|(e)|(a))* str: searchme result: (0,3)(2,3)(?,?)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(?,?)(2,3) +207: OK regex: ((s)|(e)|())* parsed_regex: ((s)|(e)|())* str: searchme result: (0,2)(1,2)(?,?)(1,2)(?,?) expected_results (0,2)(1,2)(?,?)(1,2)(?,?) +208: Failure: Ranges are wrong. regex: ((b*)|c(c*))* parsed_regex: ((b*)|c(c*))* str: cbb result: (0,0)(0,0)(0,0)(?,?) expected_results (0,3)(1,3)(1,3)(?,?) +209: OK regex: (yyy|(x?)){2,4} parsed_regex: (yyy|(x?)){2,4} str: yyyyyy result: (0,6)(3,6)(?,?) expected_results (0,6)(3,6)(?,?) +210: OK regex: (\$)|() parsed_regex: (\$)|() str: xxx result: (0,0)(?,?)(0,0) expected_results (0,0)(?,?)(0,0) +211: OK regex: \$()|^() parsed_regex: \$()|^() str: ac\n result: (0,0)(?,?)(0,0) expected_results (0,0)(?,?)(0,0) +212: OK regex: ^()|\$() parsed_regex: ^()|\$() str: ac\n result: (0,0)(0,0)(?,?) expected_results (0,0)(0,0)(?,?) +213: OK regex: (\$)?(.) parsed_regex: (\$)?(.) str: __ result: (0,1)(?,?)(0,1) expected_results (0,1)(?,?)(0,1) +214: OK regex: (.|()|())* parsed_regex: (.|()|())* str: c result: (0,1)(0,1)(?,?)(?,?) expected_results (0,1)(0,1)(?,?)(?,?) +215: OK regex: ((a)|(b)){2,} parsed_regex: ((a)|(b)){2,} str: ab result: (0,2)(1,2)(?,?)(1,2) expected_results (0,2)(1,2)(?,?)(1,2) +216: OK regex: .()|((.)?) parsed_regex: .()|((.)?) str: NULL result: (0,0)(?,?)(0,0)(?,?) expected_results (0,0)(?,?)(0,0)(?,?) +217: OK regex: (.|\$){2,} parsed_regex: (.|\$){2,} str: xx result: (0,2)(1,2) expected_results (0,2)(1,2) +218: Failure: Parsed regex does not match. regex: (.|\$){2,2} parsed_regex: (.|\$){2} str: xx result: (?,?)(?,?) expected_results (0,2)(1,2) +219: OK regex: (.){2,} parsed_regex: (.){2,} str: xx result: (0,2)(1,2) expected_results (0,2)(1,2) +220: Failure: Parsed regex does not match. regex: (a|())(b|())(c|()) parsed_regex: ab()c|ab()c() str: abc result: (?,?)(?,?)(?,?)(?,?) expected_results (0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?) +220: Failure: Ranges are wrong. regex: ab()c|ab()c() parsed_regex: ab()c|ab()c() str: abc result: (0,3)(2,2)(?,?)(?,?) expected_results (0,3)(2,2)(-1,-1)(-1,-1) +250: Failure: Ranges are wrong. regex: (b(c)|d(e))* parsed_regex: (b(c)|d(e))* str: bcde result: (0,4)(2,4)(?,?)(3,4) expected_results (0,4)(2,4)(-1,-1)(3,4) +251: Failure: Ranges are wrong. regex: (a(b)*)* parsed_regex: (a(b)*)* str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(-1,-1) + +Running osx_bsd_critical: +1: OK regex: (()|.)(b) parsed_regex: (()|.)(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2) +M1: OK regex: (()|.)(b) parsed_regex: (()|.)(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (1,2)(1,1)(1,1)(1,2) +2: OK regex: (()|[ab])(b) parsed_regex: (()|[ab])(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2) +M2: OK regex: (()|[ab])(b) parsed_regex: (()|[ab])(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (1,2)(1,1)(1,1)(1,2) +3: Failure: Ranges are wrong. regex: (()|[ab])+b parsed_regex: (()|[ab])+b str: aaab result: (3,4)(3,3)(3,3) expected_results (0,4)(2,3)(?,?) +M3: Failure: Ranges should be wrong. regex: (()|[ab])+b parsed_regex: (()|[ab])+b str: aaab result: (3,4)(3,3)(3,3) expected_results (3,4)(3,3)(3,3) +11: OK regex: (.|())(b) parsed_regex: (.|())(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2) +12: OK regex: ([ab]|())(b) parsed_regex: ([ab]|())(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2) +14: OK regex: ([ab]|())+b parsed_regex: ([ab]|())+b str: aaab result: (0,4)(2,3)(?,?) expected_results (0,4)(2,3)(?,?) +M14: OK regex: ([ab]|())+b parsed_regex: ([ab]|())+b str: aaab result: (0,4)(2,3)(?,?) expected_results (0,4)(3,3)(3,3) +20: OK regex: (.?)(b) parsed_regex: (.?)(b) str: ab result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2) + diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output new file mode 100644 index 0000000000..e69de29bb2 diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp new file mode 100644 index 0000000000..0308388025 --- /dev/null +++ b/regression-tests/test-results/pure2-regex.cpp @@ -0,0 +1,2428 @@ + +#define CPP2_IMPORT_STD Yes + +//=== Cpp2 type declarations ==================================================== + + +#include "cpp2util.h" + +#line 1 "pure2-regex.cpp2" + +#line 48 "pure2-regex.cpp2" +class test_basic3; + + +#line 338 "pure2-regex.cpp2" +class test_class; + + +#line 372 "pure2-regex.cpp2" +class test_left_assoc; + + +#line 402 "pure2-regex.cpp2" +class test_right_assoc; + + +#line 432 "pure2-regex.cpp2" +class test_forced_assoc; + + +#line 494 "pure2-regex.cpp2" +class test_nullsub3; + + +#line 602 "pure2-regex.cpp2" +class test_repetition2; + + +#line 766 "pure2-regex.cpp2" +class test_totest; + + +#line 930 "pure2-regex.cpp2" +class test_osx_bsd_critical; + + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "pure2-regex.cpp2" + +#line 2 "pure2-regex.cpp2" +template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in result) -> void; + +#line 48 "pure2-regex.cpp2" +class test_basic3 { + +#line 191 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_1 = ::cpp2::regex::regular_expression>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; +public: using regex_10 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; +public: using regex_100 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_100(cpp2::in str) const& -> auto; +public: using regex_101 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_101(cpp2::in str) const& -> auto; +public: using regex_102 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_102(cpp2::in str) const& -> auto; +public: using regex_103 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_103(cpp2::in str) const& -> auto; +public: using regex_104 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_104(cpp2::in str) const& -> auto; +public: using regex_105 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_105(cpp2::in str) const& -> auto; +public: using regex_106 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_106(cpp2::in str) const& -> auto; +public: using regex_107 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_107(cpp2::in str) const& -> auto; +public: using regex_108 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_108(cpp2::in str) const& -> auto; +public: using regex_109 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_109(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression,0,0,0>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_110 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_110(cpp2::in str) const& -> auto; +public: using regex_111 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_111(cpp2::in str) const& -> auto; +public: using regex_112 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::special_range_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_112(cpp2::in str) const& -> auto; +public: using regex_113 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_113(cpp2::in str) const& -> auto; +public: using regex_114 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_114(cpp2::in str) const& -> auto; +public: using regex_115 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),2,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_115(cpp2::in str) const& -> auto; +public: using regex_116 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_116(cpp2::in str) const& -> auto; +public: using regex_117 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_117(cpp2::in str) const& -> auto; +public: using regex_118 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_118(cpp2::in str) const& -> auto; +public: using regex_119 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_119(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2,'?'>>,2>,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),4,'+'>>,3>,::cpp2::regex::range_matcher_logic,3,3,6>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_120 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,3>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_120(cpp2::in str) const& -> auto; +public: using regex_121 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,3>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_121(cpp2::in str) const& -> auto; +public: using regex_122 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,3>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_122(cpp2::in str) const& -> auto; +public: using regex_123 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_123(cpp2::in str) const& -> auto; +public: using regex_124 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_124(cpp2::in str) const& -> auto; +public: using regex_125 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_125(cpp2::in str) const& -> auto; +public: using regex_126 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_126(cpp2::in str) const& -> auto; +public: using regex_127 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_127(cpp2::in str) const& -> auto; +public: using regex_128 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_128(cpp2::in str) const& -> auto; +public: using regex_129 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_129(cpp2::in str) const& -> auto; +public: using regex_13 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2>>,2>,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),4>>,3>,::cpp2::regex::range_matcher_logic,3,3,6>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; +public: using regex_130 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_130(cpp2::in str) const& -> auto; +public: using regex_131 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_131(cpp2::in str) const& -> auto; +public: using regex_132 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_132(cpp2::in str) const& -> auto; +public: using regex_133 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_133(cpp2::in str) const& -> auto; +public: using regex_134 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_134(cpp2::in str) const& -> auto; +public: using regex_135 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_135(cpp2::in str) const& -> auto; +public: using regex_136 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_136(cpp2::in str) const& -> auto; +public: using regex_137 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_137(cpp2::in str) const& -> auto; +public: using regex_138 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_138(cpp2::in str) const& -> auto; +public: using regex_139 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_139(cpp2::in str) const& -> auto; +public: using regex_140 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_140(cpp2::in str) const& -> auto; +public: using regex_141 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_141(cpp2::in str) const& -> auto; +public: using regex_142 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_142(cpp2::in str) const& -> auto; +public: using regex_143 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_143(cpp2::in str) const& -> auto; +public: using regex_144 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_144(cpp2::in str) const& -> auto; +public: using regex_145 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_145(cpp2::in str) const& -> auto; +public: using regex_146 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_146(cpp2::in str) const& -> auto; +public: using regex_15 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,2>>,::cpp2::regex::list_matcher_logic>>,1>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; +public: using regex_16 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; +public: using regex_17 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; +public: using regex_18 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,3>,::cpp2::regex::char_matcher_logic>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; +public: using regex_19 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; +public: using regex_2 = ::cpp2::regex::regular_expression>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; +public: using regex_20 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; +public: using regex_21 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; +public: using regex_22 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,0,std::numeric_limits::max(),7,'*'>,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; +public: using regex_23 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,0,std::numeric_limits::max(),7,'*'>,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; +public: using regex_24 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; +public: using regex_25 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; +public: using regex_26 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::range_matcher_logic,0,0,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; +public: using regex_27 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; +public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; +public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; +public: using regex_3 = ::cpp2::regex::regular_expression>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; +public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; +public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>>,2>>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; +public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; +public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; +public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; +public: using regex_36 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; +public: using regex_37 = ::cpp2::regex::regular_expression>,1,std::numeric_limits::max(),0,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; +public: using regex_38 = ::cpp2::regex::regular_expression>,1,std::numeric_limits::max(),0,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; +public: using regex_39 = ::cpp2::regex::regular_expression>,1>,::cpp2::regex::group_matcher_logic>,2>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; +public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::line_start_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; +public: using regex_43 = ::cpp2::regex::regular_expression>,30>>,29>>,28>>,27>>,26>>,25>>,24>>,23>>,22>>,21>>,20>>,19>>,18>>,17>>,16>>,15>>,14>>,13>>,12>>,11>>,10>>,9>>,8>>,7>>,6>>,5>>,4>>,3>>,2>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,31>; +public: [[nodiscard]] auto match_43(cpp2::in str) const& -> auto; +public: using regex_44 = ::cpp2::regex::regular_expression>,30>>,29>>,28>>,27>>,26>>,25>>,24>>,23>>,22>>,21>>,20>>,19>>,18>>,17>>,16>>,15>>,14>>,13>>,12>>,11>>,10>>,9>>,8>>,7>>,6>>,5>>,4>>,3>>,2>>,1>,0,std::numeric_limits::max(),30,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,31>; +public: [[nodiscard]] auto match_44(cpp2::in str) const& -> auto; +public: using regex_45 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_45(cpp2::in str) const& -> auto; +public: using regex_46 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_46(cpp2::in str) const& -> auto; +public: using regex_47 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_47(cpp2::in str) const& -> auto; +public: using regex_48 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_48(cpp2::in str) const& -> auto; +public: using regex_49 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_49(cpp2::in str) const& -> auto; +public: using regex_5 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; +public: using regex_50 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_50(cpp2::in str) const& -> auto; +public: using regex_51 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_51(cpp2::in str) const& -> auto; +public: using regex_52 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_52(cpp2::in str) const& -> auto; +public: using regex_53 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_53(cpp2::in str) const& -> auto; +public: using regex_54 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_54(cpp2::in str) const& -> auto; +public: using regex_55 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_55(cpp2::in str) const& -> auto; +public: using regex_56 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_56(cpp2::in str) const& -> auto; +public: using regex_57 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_57(cpp2::in str) const& -> auto; +public: using regex_58 = ::cpp2::regex::regular_expression,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_58(cpp2::in str) const& -> auto; +public: using regex_59 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_59(cpp2::in str) const& -> auto; +public: using regex_6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,1>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; +public: using regex_60 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_60(cpp2::in str) const& -> auto; +public: using regex_61 = ::cpp2::regex::regular_expression>,2>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_61(cpp2::in str) const& -> auto; +public: using regex_62 = ::cpp2::regex::regular_expression>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_62(cpp2::in str) const& -> auto; +public: using regex_63 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_63(cpp2::in str) const& -> auto; +public: using regex_64 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_64(cpp2::in str) const& -> auto; +public: using regex_65 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_65(cpp2::in str) const& -> auto; +public: using regex_66 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_66(cpp2::in str) const& -> auto; +public: using regex_67 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_67(cpp2::in str) const& -> auto; +public: using regex_68 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_68(cpp2::in str) const& -> auto; +public: using regex_69 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,1,std::numeric_limits::max(),4,'+'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_69(cpp2::in str) const& -> auto; +public: using regex_7 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; +public: using regex_70 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,0,1,4,'?'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_70(cpp2::in str) const& -> auto; +public: using regex_71 = ::cpp2::regex::regular_expression>,1>,0,std::numeric_limits::max(),1,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_71(cpp2::in str) const& -> auto; +public: using regex_72 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_72(cpp2::in str) const& -> auto; +public: using regex_73 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_73(cpp2::in str) const& -> auto; +public: using regex_74 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>>,0>,std::tuple,1>; +public: [[nodiscard]] auto match_74(cpp2::in str) const& -> auto; +public: using regex_75 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_75(cpp2::in str) const& -> auto; +public: using regex_76 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,::cpp2::regex::list_matcher_logic>>,2>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_76(cpp2::in str) const& -> auto; +public: using regex_77 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_77(cpp2::in str) const& -> auto; +public: using regex_78 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_78(cpp2::in str) const& -> auto; +public: using regex_79 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_79(cpp2::in str) const& -> auto; +public: using regex_8 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; +public: using regex_80 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_80(cpp2::in str) const& -> auto; +public: using regex_81 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_81(cpp2::in str) const& -> auto; +public: using regex_82 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_82(cpp2::in str) const& -> auto; +public: using regex_83 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_83(cpp2::in str) const& -> auto; +public: using regex_84 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_84(cpp2::in str) const& -> auto; +public: using regex_85 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_85(cpp2::in str) const& -> auto; +public: using regex_86 = ::cpp2::regex::regular_expression>,2>,::cpp2::regex::group_matcher_logic>,3>,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::group_matcher_logic>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_86(cpp2::in str) const& -> auto; +public: using regex_87 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_87(cpp2::in str) const& -> auto; +public: using regex_88 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,1>>,0>,std::tuple,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_88(cpp2::in str) const& -> auto; +public: using regex_89 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,1>>,0>,std::tuple,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_89(cpp2::in str) const& -> auto; +public: using regex_9 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; +public: using regex_90 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,1>>,0>,std::tuple,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_90(cpp2::in str) const& -> auto; +public: using regex_91 = ::cpp2::regex::regular_expression>,9>>,8>>,7>>,6>>,5>>,4>>,3>>,2>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_91(cpp2::in str) const& -> auto; +public: using regex_92 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_92(cpp2::in str) const& -> auto; +public: using regex_93 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_93(cpp2::in str) const& -> auto; +public: using regex_94 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,0,1,0,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_94(cpp2::in str) const& -> auto; +public: using regex_95 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_95(cpp2::in str) const& -> auto; +public: using regex_96 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_96(cpp2::in str) const& -> auto; +public: using regex_97 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_97(cpp2::in str) const& -> auto; +public: using regex_98 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_98(cpp2::in str) const& -> auto; +public: using regex_99 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_99(cpp2::in str) const& -> auto; +public: using regex_M34 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_M34(cpp2::in str) const& -> auto; + + public: test_basic3() = default; + public: test_basic3(test_basic3 const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_basic3 const&) -> void = delete; + + +#line 337 "pure2-regex.cpp2" +}; +class test_class { + +#line 353 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_1 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; +public: using regex_10 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,1,std::numeric_limits::max(),3,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),1,'*'>>,1>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,4>,::cpp2::regex::special_range_matcher_logic,0,1,7,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,5>,0,1,9,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,10,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_2 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; +public: using regex_3 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,6>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; +public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; +public: using regex_5 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; +public: using regex_6 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; +public: using regex_7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; +public: using regex_8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; +public: using regex_9 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; +public: using regex_M12 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,4>,::cpp2::regex::special_range_matcher_logic,0,1,7,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,5>,0,1,9,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,10,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_M12(cpp2::in str) const& -> auto; +public: using regex_M2 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M2(cpp2::in str) const& -> auto; + + public: test_class() = default; + public: test_class(test_class const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_class const&) -> void = delete; + + +#line 371 "pure2-regex.cpp2" +}; +class test_left_assoc { + +#line 385 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_M1 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M1(cpp2::in str) const& -> auto; +public: using regex_M10 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M10(cpp2::in str) const& -> auto; +public: using regex_M11 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M11(cpp2::in str) const& -> auto; +public: using regex_M12 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M12(cpp2::in str) const& -> auto; +public: using regex_M2 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M2(cpp2::in str) const& -> auto; +public: using regex_M3 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M3(cpp2::in str) const& -> auto; +public: using regex_M4 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M4(cpp2::in str) const& -> auto; +public: using regex_M5 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M5(cpp2::in str) const& -> auto; +public: using regex_M6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M6(cpp2::in str) const& -> auto; +public: using regex_M7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M7(cpp2::in str) const& -> auto; +public: using regex_M8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M8(cpp2::in str) const& -> auto; +public: using regex_M9 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_M9(cpp2::in str) const& -> auto; + + public: test_left_assoc() = default; + public: test_left_assoc(test_left_assoc const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_left_assoc const&) -> void = delete; + + +#line 401 "pure2-regex.cpp2" +}; +class test_right_assoc { + +#line 415 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_1 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; +public: using regex_10 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_2 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; +public: using regex_3 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; +public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; +public: using regex_5 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; +public: using regex_6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; +public: using regex_7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; +public: using regex_8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; +public: using regex_9 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; + + public: test_right_assoc() = default; + public: test_right_assoc(test_right_assoc const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_right_assoc const&) -> void = delete; + + +#line 431 "pure2-regex.cpp2" +}; +class test_forced_assoc { + +#line 461 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_1 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; +public: using regex_10 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_13 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; +public: using regex_14 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; +public: using regex_15 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; +public: using regex_16 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; +public: using regex_17 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; +public: using regex_18 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; +public: using regex_19 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; +public: using regex_2 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; +public: using regex_20 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; +public: using regex_21 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; +public: using regex_22 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; +public: using regex_23 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; +public: using regex_24 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; +public: using regex_25 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; +public: using regex_26 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; +public: using regex_27 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; +public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; +public: using regex_3 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; +public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; +public: using regex_5 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; +public: using regex_6 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; +public: using regex_7 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; +public: using regex_8 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; +public: using regex_9 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; + + public: test_forced_assoc() = default; + public: test_forced_assoc(test_forced_assoc const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_forced_assoc const&) -> void = delete; + + +#line 493 "pure2-regex.cpp2" +}; +class test_nullsub3 { + +#line 546 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_1 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; +public: using regex_10 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_13 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; +public: using regex_14 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; +public: using regex_15 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; +public: using regex_16 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; +public: using regex_17 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; +public: using regex_18 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; +public: using regex_19 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; +public: using regex_2 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; +public: using regex_20 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; +public: using regex_21 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; +public: using regex_22 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; +public: using regex_23 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; +public: using regex_24 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; +public: using regex_25 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; +public: using regex_26 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; +public: using regex_27 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; +public: using regex_28 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; +public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; +public: using regex_3 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; +public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; +public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; +public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; +public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; +public: using regex_34 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_34(cpp2::in str) const& -> auto; +public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; +public: using regex_36 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; +public: using regex_37 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; +public: using regex_38 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; +public: using regex_39 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; +public: using regex_4 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; +public: using regex_40 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_40(cpp2::in str) const& -> auto; +public: using regex_41 = ::cpp2::regex::regular_expression>,2>,1,std::numeric_limits::max(),1,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_41(cpp2::in str) const& -> auto; +public: using regex_42 = ::cpp2::regex::regular_expression>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_42(cpp2::in str) const& -> auto; +public: using regex_46 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_46(cpp2::in str) const& -> auto; +public: using regex_47 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_47(cpp2::in str) const& -> auto; +public: using regex_48 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_48(cpp2::in str) const& -> auto; +public: using regex_49 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_49(cpp2::in str) const& -> auto; +public: using regex_5 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; +public: using regex_50 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_50(cpp2::in str) const& -> auto; +public: using regex_51 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_51(cpp2::in str) const& -> auto; +public: using regex_52 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_52(cpp2::in str) const& -> auto; +public: using regex_53 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_53(cpp2::in str) const& -> auto; +public: using regex_54 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_54(cpp2::in str) const& -> auto; +public: using regex_6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; +public: using regex_7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; +public: using regex_8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; +public: using regex_9 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; + + public: test_nullsub3() = default; + public: test_nullsub3(test_nullsub3 const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_nullsub3 const&) -> void = delete; + + +#line 601 "pure2-regex.cpp2" +}; +class test_repetition2 { + +#line 682 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_1 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; +public: using regex_10 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; +public: using regex_100 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,0,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_100(cpp2::in str) const& -> auto; +public: using regex_101 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,1,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_101(cpp2::in str) const& -> auto; +public: using regex_102 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,2,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_102(cpp2::in str) const& -> auto; +public: using regex_103 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,3,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_103(cpp2::in str) const& -> auto; +public: using regex_104 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,4,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_104(cpp2::in str) const& -> auto; +public: using regex_105 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,5,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_105(cpp2::in str) const& -> auto; +public: using regex_106 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,6,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_106(cpp2::in str) const& -> auto; +public: using regex_107 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,7,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_107(cpp2::in str) const& -> auto; +public: using regex_108 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,8,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_108(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_110 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,0,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_110(cpp2::in str) const& -> auto; +public: using regex_111 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,1,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_111(cpp2::in str) const& -> auto; +public: using regex_112 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,2,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_112(cpp2::in str) const& -> auto; +public: using regex_113 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,3,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_113(cpp2::in str) const& -> auto; +public: using regex_114 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,4,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_114(cpp2::in str) const& -> auto; +public: using regex_115 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,5,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_115(cpp2::in str) const& -> auto; +public: using regex_116 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,6,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_116(cpp2::in str) const& -> auto; +public: using regex_117 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,7,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_117(cpp2::in str) const& -> auto; +public: using regex_118 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,8,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_118(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_13 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; +public: using regex_14 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; +public: using regex_15 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; +public: using regex_16 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; +public: using regex_17 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; +public: using regex_18 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; +public: using regex_19 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; +public: using regex_2 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; +public: using regex_20 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; +public: using regex_21 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; +public: using regex_22 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; +public: using regex_23 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; +public: using regex_24 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; +public: using regex_25 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; +public: using regex_26 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; +public: using regex_260 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_260(cpp2::in str) const& -> auto; +public: using regex_261 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,1,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_261(cpp2::in str) const& -> auto; +public: using regex_262 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,2,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_262(cpp2::in str) const& -> auto; +public: using regex_263 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,3,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_263(cpp2::in str) const& -> auto; +public: using regex_264 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,4,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_264(cpp2::in str) const& -> auto; +public: using regex_265 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_265(cpp2::in str) const& -> auto; +public: using regex_266 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,1,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_266(cpp2::in str) const& -> auto; +public: using regex_267 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,2,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_267(cpp2::in str) const& -> auto; +public: using regex_268 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,3,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_268(cpp2::in str) const& -> auto; +public: using regex_269 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,4,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_269(cpp2::in str) const& -> auto; +public: using regex_27 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; +public: using regex_270 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),5,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_270(cpp2::in str) const& -> auto; +public: using regex_271 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_271(cpp2::in str) const& -> auto; +public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; +public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; +public: using regex_3 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; +public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; +public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; +public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; +public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; +public: using regex_34 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_34(cpp2::in str) const& -> auto; +public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; +public: using regex_36 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; +public: using regex_37 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; +public: using regex_38 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; +public: using regex_39 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; +public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; +public: using regex_40 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_40(cpp2::in str) const& -> auto; +public: using regex_41 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_41(cpp2::in str) const& -> auto; +public: using regex_42 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_42(cpp2::in str) const& -> auto; +public: using regex_43 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_43(cpp2::in str) const& -> auto; +public: using regex_44 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_44(cpp2::in str) const& -> auto; +public: using regex_45 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; +public: [[nodiscard]] auto match_45(cpp2::in str) const& -> auto; +public: using regex_46 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_46(cpp2::in str) const& -> auto; +public: using regex_47 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_47(cpp2::in str) const& -> auto; +public: using regex_48 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_48(cpp2::in str) const& -> auto; +public: using regex_49 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_49(cpp2::in str) const& -> auto; +public: using regex_5 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; +public: using regex_6 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; +public: using regex_7 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; +public: using regex_8 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; +public: using regex_9 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; + + public: test_repetition2() = default; + public: test_repetition2(test_repetition2 const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_repetition2 const&) -> void = delete; + + +#line 765 "pure2-regex.cpp2" +}; +class test_totest { + +#line 846 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_01 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; +public: [[nodiscard]] auto match_01(cpp2::in str) const& -> auto; +public: using regex_03 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_03(cpp2::in str) const& -> auto; +public: using regex_04 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_04(cpp2::in str) const& -> auto; +public: using regex_05 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,4>,0,1,3,'?'>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,1,6,'?'>>,5>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_05(cpp2::in str) const& -> auto; +public: using regex_06 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,4>,0,1,3,'?'>>,3>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,5>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; +public: [[nodiscard]] auto match_06(cpp2::in str) const& -> auto; +public: using regex_07 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_07(cpp2::in str) const& -> auto; +public: using regex_08 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,1,1,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_08(cpp2::in str) const& -> auto; +public: using regex_09 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2,'?'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_09(cpp2::in str) const& -> auto; +public: using regex_10 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,2,2,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; +public: using regex_1029 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),8,'*'>,::cpp2::regex::char_matcher_logic>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_1029(cpp2::in str) const& -> auto; +public: using regex_1032 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_1032(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_110 = ::cpp2::regex::regular_expression>,1>,0,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_110(cpp2::in str) const& -> auto; +public: using regex_111 = ::cpp2::regex::regular_expression>,1>,0,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_111(cpp2::in str) const& -> auto; +public: using regex_112 = ::cpp2::regex::regular_expression>,1>,1,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_112(cpp2::in str) const& -> auto; +public: using regex_113 = ::cpp2::regex::regular_expression>,1>,1,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_113(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_13 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,1,1,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; +public: using regex_14 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,4,'?'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; +public: using regex_15 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,2,2,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; +public: using regex_16 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,4,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,6,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,7,'?'>>,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; +public: using regex_17 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,3,3,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; +public: using regex_18 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; +public: using regex_19 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,4,'?'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; +public: using regex_20 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; +public: using regex_200 = ::cpp2::regex::regular_expression,::cpp2::regex::line_start_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>,::cpp2::regex::list_matcher_logic>,4>>,::cpp2::regex::list_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::any_matcher_logic>,6>>>,1>,0,std::numeric_limits::max(),11,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_200(cpp2::in str) const& -> auto; +public: using regex_201 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,2>>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_201(cpp2::in str) const& -> auto; +public: using regex_202 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_202(cpp2::in str) const& -> auto; +public: using regex_203 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_203(cpp2::in str) const& -> auto; +public: using regex_204 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1>,0,1,0,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_204(cpp2::in str) const& -> auto; +public: using regex_205 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1>,0,1,1,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_205(cpp2::in str) const& -> auto; +public: using regex_206 = ::cpp2::regex::regular_expression>,2>>,::cpp2::regex::list_matcher_logic>,3>>,::cpp2::regex::list_matcher_logic>,4>>>,1>,0,std::numeric_limits::max(),7,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_206(cpp2::in str) const& -> auto; +public: using regex_207 = ::cpp2::regex::regular_expression>,2>>,::cpp2::regex::list_matcher_logic>,3>>,::cpp2::regex::list_matcher_logic,4>>>,1>,0,std::numeric_limits::max(),6,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_207(cpp2::in str) const& -> auto; +public: using regex_208 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,3>>>,1>,0,std::numeric_limits::max(),7,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_208(cpp2::in str) const& -> auto; +public: using regex_209 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,0,'?'>>,2>>>,1>,2,4,5>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_209(cpp2::in str) const& -> auto; +public: using regex_21 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>>,1>,::cpp2::regex::special_range_matcher_logic,0,1,4,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; +public: using regex_210 = ::cpp2::regex::regular_expression>,1>>,::cpp2::regex::list_matcher_logic,2>>>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_210(cpp2::in str) const& -> auto; +public: using regex_211 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic,2>>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_211(cpp2::in str) const& -> auto; +public: using regex_212 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic,2>>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_212(cpp2::in str) const& -> auto; +public: using regex_213 = ::cpp2::regex::regular_expression>,1>,0,1,1,'?'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_213(cpp2::in str) const& -> auto; +public: using regex_214 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,2>>,::cpp2::regex::list_matcher_logic,3>>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_214(cpp2::in str) const& -> auto; +public: using regex_215 = ::cpp2::regex::regular_expression>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,std::numeric_limits::max(),5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_215(cpp2::in str) const& -> auto; +public: using regex_216 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1>>,::cpp2::regex::list_matcher_logic>,3>,0,1,1,'?'>>,2>>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_216(cpp2::in str) const& -> auto; +public: using regex_217 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,2,std::numeric_limits::max(),3>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_217(cpp2::in str) const& -> auto; +public: using regex_218 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,2,2,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_218(cpp2::in str) const& -> auto; +public: using regex_219 = ::cpp2::regex::regular_expression>,1>,2,std::numeric_limits::max(),1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_219(cpp2::in str) const& -> auto; +public: using regex_22 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; +public: using regex_220 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,3>>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_220(cpp2::in str) const& -> auto; +public: using regex_23 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; +public: using regex_24 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; +public: using regex_25 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; +public: using regex_250 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_250(cpp2::in str) const& -> auto; +public: using regex_251 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_251(cpp2::in str) const& -> auto; +public: using regex_26 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; +public: using regex_27 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; +public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; +public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; +public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; +public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>>,0>,std::tuple,2>; +public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; +public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; +public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; +public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; +public: using regex_34 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_34(cpp2::in str) const& -> auto; +public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::special_range_matcher_logic>,4>,0,1,4,'?'>>,3>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; +public: using regex_36 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,1,std::numeric_limits::max(),3,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; +public: using regex_37 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; +public: using regex_38 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),1,'*'>>,1>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; +public: using regex_39 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; +public: using regex_40 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),5,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),6,'*'>,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_40(cpp2::in str) const& -> auto; +public: using regex_41 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; +public: [[nodiscard]] auto match_41(cpp2::in str) const& -> auto; +public: using regex_42 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::any_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_42(cpp2::in str) const& -> auto; +public: using regex_43 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_43(cpp2::in str) const& -> auto; +public: using regex_44 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>,0,std::numeric_limits::max(),6,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,6>,0,std::numeric_limits::max(),8,'*'>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; +public: [[nodiscard]] auto match_44(cpp2::in str) const& -> auto; +public: using regex_45 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_45(cpp2::in str) const& -> auto; +public: using regex_83 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic>,3>>,2>,0,1,2,'?'>>,1>,1,std::numeric_limits::max(),4,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_83(cpp2::in str) const& -> auto; +public: using regex_84 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,1,std::numeric_limits::max(),3,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_84(cpp2::in str) const& -> auto; +public: using regex_85 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),2,'+'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),4,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; +public: [[nodiscard]] auto match_85(cpp2::in str) const& -> auto; +public: using regex_90 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic>,0,std::numeric_limits::max(),0,'*'>>,2>>,1>,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,4>>,3>,0,1,7,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_90(cpp2::in str) const& -> auto; +public: using regex_91 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic>,0,std::numeric_limits::max(),0,'*'>>,2>>,1>,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,4>>,3>,0,1,7,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; +public: [[nodiscard]] auto match_91(cpp2::in str) const& -> auto; + + public: test_totest() = default; + public: test_totest(test_totest const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_totest const&) -> void = delete; + + +#line 929 "pure2-regex.cpp2" +}; +class test_osx_bsd_critical { + +#line 942 "pure2-regex.cpp2" + public: auto run() const& -> void; + public: using regex_1 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; +public: using regex_11 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; +public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; +public: using regex_14 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>>,::cpp2::regex::list_matcher_logic,2>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; +public: using regex_2 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; +public: using regex_20 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; +public: using regex_3 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; +public: using regex_M1 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_M1(cpp2::in str) const& -> auto; +public: using regex_M14 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>>,::cpp2::regex::list_matcher_logic,2>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_M14(cpp2::in str) const& -> auto; +public: using regex_M2 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; +public: [[nodiscard]] auto match_M2(cpp2::in str) const& -> auto; +public: using regex_M3 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; +public: [[nodiscard]] auto match_M3(cpp2::in str) const& -> auto; + + public: test_osx_bsd_critical() = default; + public: test_osx_bsd_critical(test_osx_bsd_critical const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(test_osx_bsd_critical const&) -> void = delete; + + +#line 957 "pure2-regex.cpp2" +}; +auto main(int const argc_, char** argv_) -> int; + +//=== Cpp2 function definitions ================================================= + +#line 1 "pure2-regex.cpp2" + +#line 2 "pure2-regex.cpp2" +template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in result) -> void{ + using context = M::context; + context ctx {}; + + auto str_mod {str}; + if (str_mod == "NULL") { + str_mod = ""; + } + + std::string status {"OK"}; + if (CPP2_UFCS(to_string)(regex) != regex_str) { + status = "Failure: Parsed regex does not match."; + }else { + bool m {CPP2_UFCS(search)(regex, std::move(str_mod), ctx)}; + auto is_pass {!(CPP2_UFCS(starts_with)(result, "NOMATCH"))}; + + // Check if we expect a match. + if (is_pass != m) { + if (std::move(is_pass)) { + status = "Failure: Regex should apply."; + } + else { + status = "Failure: Regex should not apply."; + } + } + + // If we have a match. Check the ranges. + if (std::move(m)) { + auto ranges_match {result == CPP2_UFCS(print_ranges)(ctx)}; + auto should_ranges_match {!(CPP2_UFCS(starts_with)(id, "M"))}; + + if (ranges_match != std::move(should_ranges_match)) { + if (std::move(ranges_match)) { + status = "Failure: Ranges should be wrong."; + } + else { + status = "Failure: Ranges are wrong."; + } + } + } + } + + std::cout << cpp2::to_string(id) + ": " + cpp2::to_string(std::move(status)) + " regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result: " + cpp2::to_string(CPP2_UFCS(print_ranges)(std::move(ctx))) + " expected_results " + cpp2::to_string(result) << std::endl; +} + +#line 191 "pure2-regex.cpp2" + auto test_basic3::run() const& -> void{ + std::cout << "Running basic3:" << std::endl; + test(regex_1(), "1", "\\)", "()", "(1,2)"); + test(regex_2(), "2", "\\}", "}", "(0,1)"); + test(regex_3(), "3", "]", "]", "(0,1)"); + test(regex_4(), "4", "\\$^", "NULL", "(0,0)"); + test(regex_5(), "5", "a(\\$)", "aa", "(1,2)(2,2)"); + test(regex_6(), "6", "a*(^a)", "aa", "(0,1)(0,1)"); + test(regex_7(), "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)"); + test(regex_8(), "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)"); + test(regex_9(), "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)"); + test(regex_10(), "10", "(ab)c|abc", "abc", "(0,3)(0,2)"); + test(regex_11(), "11", "a{0}b", "ab", "(1,2)"); + test(regex_12(), "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_13(), "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_15(), "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)"); + test(regex_16(), "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)"); + test(regex_17(), "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)"); + test(regex_18(), "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)"); + test(regex_19(), "19", "(a|b)?.*", "b", "(0,1)(0,1)"); + test(regex_20(), "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)"); + test(regex_21(), "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)"); + test(regex_22(), "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)"); + test(regex_23(), "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)"); + test(regex_24(), "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)"); + test(regex_25(), "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_26(), "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_27(), "27", "ab|abab", "abbabab", "(0,2)"); + test(regex_28(), "28", "aba|bab|bba", "baaabbbaba", "(5,8)"); + test(regex_29(), "29", "aba|bab", "baaabbbaba", "(6,9)"); + test(regex_30(), "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_31(), "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_32(), "32", "ab|a", "xabc", "(1,3)"); + test(regex_33(), "33", "ab|a", "xxabc", "(2,4)"); + test(regex_M34(), "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); + test(regex_35(), "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_36(), "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_37(), "37", "[[:lower:]]+", "`az{", "(1,3)"); + test(regex_38(), "38", "[[:upper:]]+", "@AZ[", "(1,3)"); + test(regex_39(), "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_43 (), "43 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_44 (), "44 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)"); + test(regex_45(), "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)"); + test(regex_46(), "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)"); + test(regex_47(), "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)"); + test(regex_48(), "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)"); + test(regex_49(), "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)"); + test(regex_50(), "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)"); + test(regex_51(), "51", "ab+bc", "abbc", "(0,4)"); + test(regex_52(), "52", "ab+bc", "abbbbc", "(0,6)"); + test(regex_53(), "53", "ab?bc", "abbc", "(0,4)"); + test(regex_54(), "54", "ab?bc", "abc", "(0,3)"); + test(regex_55(), "55", "ab?c", "abc", "(0,3)"); + test(regex_56(), "56", "ab|cd", "abc", "(0,2)"); + test(regex_57(), "57", "ab|cd", "abcd", "(0,2)"); + test(regex_58(), "58", "a\\(b", "a(b", "(0,3)"); + test(regex_59(), "59", "a\\(*b", "ab", "(0,2)"); + test(regex_60(), "60", "a\\(*b", "a((b", "(0,4)"); + test(regex_61(), "61", "((a))", "abc", "(0,1)(0,1)(0,1)"); + test(regex_62(), "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)"); + test(regex_63(), "63", "a+b+c", "aabbabc", "(4,7)"); + test(regex_64(), "64", "a*", "aaa", "(0,3)"); + test(regex_65(), "65", "(a*)*", "-", "(0,0)(0,0)"); + test(regex_66(), "66", "(a*)+", "-", "(0,0)(0,0)"); + test(regex_67(), "67", "(a*|b)*", "-", "(0,0)(0,0)"); + test(regex_68(), "68", "(a+|b)*", "ab", "(0,2)(1,2)"); + test(regex_69(), "69", "(a+|b)+", "ab", "(0,2)(1,2)"); + test(regex_70(), "70", "(a+|b)?", "ab", "(0,1)(0,1)"); + test(regex_71(), "71", "(^)*", "-", "(0,0)(0,0)"); + test(regex_72(), "72", "([abc])*d", "abbbcd", "(0,6)(4,5)"); + test(regex_73(), "73", "([abc])*bcd", "abcd", "(0,4)(0,1)"); + test(regex_74(), "74", "a|b|c|d|e", "e", "(0,1)"); + test(regex_75(), "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)"); + test(regex_76(), "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)"); + test(regex_77(), "77", "(ab|cd)e", "abcde", "(2,5)(2,4)"); + test(regex_78(), "78", "(a|b)c*d", "abcd", "(1,4)(1,2)"); + test(regex_79(), "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)"); + test(regex_80(), "80", "a([bc]*)c*", "abc", "(0,3)(1,3)"); + test(regex_81(), "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_82(), "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_83(), "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)"); + test(regex_84(), "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)"); + test(regex_85(), "85", "(ab|a)b*c", "abc", "(0,3)(0,2)"); + test(regex_86(), "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)"); + test(regex_87(), "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)"); + test(regex_88(), "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)"); + test(regex_89(), "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)"); + test(regex_90(), "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)"); + test(regex_91(), "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_92(), "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)"); + test(regex_93(), "93", "a(bc)d", "abcd", "(0,4)(1,3)"); + test(regex_94(), "94", "a[-]?c", "ac", "(0,3)"); + test(regex_95(), "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)"); + test(regex_96(), "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)"); + test(regex_97(), "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)"); + test(regex_98(), "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)"); + test(regex_99(), "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)"); + test(regex_100(), "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)"); + test(regex_101(), "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)"); + test(regex_102(), "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)"); + test(regex_103(), "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)"); + test(regex_104(), "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)"); + test(regex_105(), "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)"); + test(regex_106(), "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)"); + test(regex_107(), "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)"); + test(regex_108(), "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)"); + test(regex_109(), "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)"); + test(regex_110(), "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)"); + test(regex_111(), "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)"); + test(regex_112(), "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)"); + test(regex_113(), "113", "^.+\\$", "vivi", "(0,4)"); + test(regex_114(), "114", "^(.+)\\$", "vivi", "(0,4)(0,4)"); + test(regex_115(), "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)"); + test(regex_116(), "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)"); + test(regex_117(), "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)"); + test(regex_118(), "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)"); + test(regex_119(), "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)"); + test(regex_120(), "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)"); + test(regex_121(), "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)"); + test(regex_122(), "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)"); + test(regex_123(), "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)"); + test(regex_124(), "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)"); + test(regex_125(), "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)"); + test(regex_126(), "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)"); + test(regex_127(), "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)"); + test(regex_128(), "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)"); + test(regex_129(), "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)"); + test(regex_130(), "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)"); + test(regex_131(), "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)"); + test(regex_132(), "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_133(), "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_134(), "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_135(), "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_136(), "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_137(), "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_138(), "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_139(), "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_140(), "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_141(), "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)"); + test(regex_142(), "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)"); + test(regex_143(), "143", "\\\\XXX", "\\XXX", "(0,4)"); + test(regex_144(), "144", ".*(/000).*", "/000", "(0,4)(0,4)"); + test(regex_145(), "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)"); + test(regex_146(), "146", "\\\\000", "\\000", "(0,4)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_basic3::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } + +[[nodiscard]] auto test_basic3::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } + +[[nodiscard]] auto test_basic3::match_100(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_100(), str); } + +[[nodiscard]] auto test_basic3::match_101(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_101(), str); } + +[[nodiscard]] auto test_basic3::match_102(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_102(), str); } + +[[nodiscard]] auto test_basic3::match_103(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_103(), str); } + +[[nodiscard]] auto test_basic3::match_104(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_104(), str); } + +[[nodiscard]] auto test_basic3::match_105(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_105(), str); } + +[[nodiscard]] auto test_basic3::match_106(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_106(), str); } + +[[nodiscard]] auto test_basic3::match_107(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_107(), str); } + +[[nodiscard]] auto test_basic3::match_108(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_108(), str); } + +[[nodiscard]] auto test_basic3::match_109(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_109(), str); } + +[[nodiscard]] auto test_basic3::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_basic3::match_110(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_110(), str); } + +[[nodiscard]] auto test_basic3::match_111(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_111(), str); } + +[[nodiscard]] auto test_basic3::match_112(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_112(), str); } + +[[nodiscard]] auto test_basic3::match_113(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_113(), str); } + +[[nodiscard]] auto test_basic3::match_114(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_114(), str); } + +[[nodiscard]] auto test_basic3::match_115(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_115(), str); } + +[[nodiscard]] auto test_basic3::match_116(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_116(), str); } + +[[nodiscard]] auto test_basic3::match_117(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_117(), str); } + +[[nodiscard]] auto test_basic3::match_118(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_118(), str); } + +[[nodiscard]] auto test_basic3::match_119(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_119(), str); } + +[[nodiscard]] auto test_basic3::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_basic3::match_120(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_120(), str); } + +[[nodiscard]] auto test_basic3::match_121(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_121(), str); } + +[[nodiscard]] auto test_basic3::match_122(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_122(), str); } + +[[nodiscard]] auto test_basic3::match_123(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_123(), str); } + +[[nodiscard]] auto test_basic3::match_124(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_124(), str); } + +[[nodiscard]] auto test_basic3::match_125(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_125(), str); } + +[[nodiscard]] auto test_basic3::match_126(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_126(), str); } + +[[nodiscard]] auto test_basic3::match_127(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_127(), str); } + +[[nodiscard]] auto test_basic3::match_128(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_128(), str); } + +[[nodiscard]] auto test_basic3::match_129(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_129(), str); } + +[[nodiscard]] auto test_basic3::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } + +[[nodiscard]] auto test_basic3::match_130(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_130(), str); } + +[[nodiscard]] auto test_basic3::match_131(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_131(), str); } + +[[nodiscard]] auto test_basic3::match_132(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_132(), str); } + +[[nodiscard]] auto test_basic3::match_133(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_133(), str); } + +[[nodiscard]] auto test_basic3::match_134(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_134(), str); } + +[[nodiscard]] auto test_basic3::match_135(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_135(), str); } + +[[nodiscard]] auto test_basic3::match_136(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_136(), str); } + +[[nodiscard]] auto test_basic3::match_137(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_137(), str); } + +[[nodiscard]] auto test_basic3::match_138(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_138(), str); } + +[[nodiscard]] auto test_basic3::match_139(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_139(), str); } + +[[nodiscard]] auto test_basic3::match_140(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_140(), str); } + +[[nodiscard]] auto test_basic3::match_141(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_141(), str); } + +[[nodiscard]] auto test_basic3::match_142(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_142(), str); } + +[[nodiscard]] auto test_basic3::match_143(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_143(), str); } + +[[nodiscard]] auto test_basic3::match_144(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_144(), str); } + +[[nodiscard]] auto test_basic3::match_145(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_145(), str); } + +[[nodiscard]] auto test_basic3::match_146(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_146(), str); } + +[[nodiscard]] auto test_basic3::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } + +[[nodiscard]] auto test_basic3::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } + +[[nodiscard]] auto test_basic3::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } + +[[nodiscard]] auto test_basic3::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } + +[[nodiscard]] auto test_basic3::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } + +[[nodiscard]] auto test_basic3::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } + +[[nodiscard]] auto test_basic3::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } + +[[nodiscard]] auto test_basic3::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } + +[[nodiscard]] auto test_basic3::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } + +[[nodiscard]] auto test_basic3::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } + +[[nodiscard]] auto test_basic3::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } + +[[nodiscard]] auto test_basic3::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } + +[[nodiscard]] auto test_basic3::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } + +[[nodiscard]] auto test_basic3::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } + +[[nodiscard]] auto test_basic3::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } + +[[nodiscard]] auto test_basic3::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } + +[[nodiscard]] auto test_basic3::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } + +[[nodiscard]] auto test_basic3::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } + +[[nodiscard]] auto test_basic3::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } + +[[nodiscard]] auto test_basic3::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } + +[[nodiscard]] auto test_basic3::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } + +[[nodiscard]] auto test_basic3::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } + +[[nodiscard]] auto test_basic3::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } + +[[nodiscard]] auto test_basic3::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } + +[[nodiscard]] auto test_basic3::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } + +[[nodiscard]] auto test_basic3::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } + +[[nodiscard]] auto test_basic3::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } + +[[nodiscard]] auto test_basic3::match_43(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_43(), str); } + +[[nodiscard]] auto test_basic3::match_44(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_44(), str); } + +[[nodiscard]] auto test_basic3::match_45(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_45(), str); } + +[[nodiscard]] auto test_basic3::match_46(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_46(), str); } + +[[nodiscard]] auto test_basic3::match_47(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_47(), str); } + +[[nodiscard]] auto test_basic3::match_48(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_48(), str); } + +[[nodiscard]] auto test_basic3::match_49(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_49(), str); } + +[[nodiscard]] auto test_basic3::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } + +[[nodiscard]] auto test_basic3::match_50(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_50(), str); } + +[[nodiscard]] auto test_basic3::match_51(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_51(), str); } + +[[nodiscard]] auto test_basic3::match_52(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_52(), str); } + +[[nodiscard]] auto test_basic3::match_53(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_53(), str); } + +[[nodiscard]] auto test_basic3::match_54(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_54(), str); } + +[[nodiscard]] auto test_basic3::match_55(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_55(), str); } + +[[nodiscard]] auto test_basic3::match_56(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_56(), str); } + +[[nodiscard]] auto test_basic3::match_57(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_57(), str); } + +[[nodiscard]] auto test_basic3::match_58(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_58(), str); } + +[[nodiscard]] auto test_basic3::match_59(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_59(), str); } + +[[nodiscard]] auto test_basic3::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } + +[[nodiscard]] auto test_basic3::match_60(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_60(), str); } + +[[nodiscard]] auto test_basic3::match_61(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_61(), str); } + +[[nodiscard]] auto test_basic3::match_62(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_62(), str); } + +[[nodiscard]] auto test_basic3::match_63(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_63(), str); } + +[[nodiscard]] auto test_basic3::match_64(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_64(), str); } + +[[nodiscard]] auto test_basic3::match_65(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_65(), str); } + +[[nodiscard]] auto test_basic3::match_66(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_66(), str); } + +[[nodiscard]] auto test_basic3::match_67(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_67(), str); } + +[[nodiscard]] auto test_basic3::match_68(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_68(), str); } + +[[nodiscard]] auto test_basic3::match_69(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_69(), str); } + +[[nodiscard]] auto test_basic3::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } + +[[nodiscard]] auto test_basic3::match_70(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_70(), str); } + +[[nodiscard]] auto test_basic3::match_71(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_71(), str); } + +[[nodiscard]] auto test_basic3::match_72(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_72(), str); } + +[[nodiscard]] auto test_basic3::match_73(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_73(), str); } + +[[nodiscard]] auto test_basic3::match_74(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_74(), str); } + +[[nodiscard]] auto test_basic3::match_75(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_75(), str); } + +[[nodiscard]] auto test_basic3::match_76(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_76(), str); } + +[[nodiscard]] auto test_basic3::match_77(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_77(), str); } + +[[nodiscard]] auto test_basic3::match_78(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_78(), str); } + +[[nodiscard]] auto test_basic3::match_79(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_79(), str); } + +[[nodiscard]] auto test_basic3::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } + +[[nodiscard]] auto test_basic3::match_80(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_80(), str); } + +[[nodiscard]] auto test_basic3::match_81(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_81(), str); } + +[[nodiscard]] auto test_basic3::match_82(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_82(), str); } + +[[nodiscard]] auto test_basic3::match_83(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_83(), str); } + +[[nodiscard]] auto test_basic3::match_84(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_84(), str); } + +[[nodiscard]] auto test_basic3::match_85(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_85(), str); } + +[[nodiscard]] auto test_basic3::match_86(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_86(), str); } + +[[nodiscard]] auto test_basic3::match_87(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_87(), str); } + +[[nodiscard]] auto test_basic3::match_88(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_88(), str); } + +[[nodiscard]] auto test_basic3::match_89(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_89(), str); } + +[[nodiscard]] auto test_basic3::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } + +[[nodiscard]] auto test_basic3::match_90(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_90(), str); } + +[[nodiscard]] auto test_basic3::match_91(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_91(), str); } + +[[nodiscard]] auto test_basic3::match_92(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_92(), str); } + +[[nodiscard]] auto test_basic3::match_93(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_93(), str); } + +[[nodiscard]] auto test_basic3::match_94(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_94(), str); } + +[[nodiscard]] auto test_basic3::match_95(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_95(), str); } + +[[nodiscard]] auto test_basic3::match_96(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_96(), str); } + +[[nodiscard]] auto test_basic3::match_97(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_97(), str); } + +[[nodiscard]] auto test_basic3::match_98(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_98(), str); } + +[[nodiscard]] auto test_basic3::match_99(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_99(), str); } + +[[nodiscard]] auto test_basic3::match_M34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M34(), str); } + +#line 353 "pure2-regex.cpp2" + auto test_class::run() const& -> void{ + std::cout << "Running class:" << std::endl; + test(regex_1(), "1", "aa*", "xaxaax", "(1,2)"); + test(regex_2(), "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2(), "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)"); + test(regex_3(), "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)"); + test(regex_4(), "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)"); + test(regex_5(), "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)"); + test(regex_6(), "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_7(), "7", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_8(), "8", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_9(), "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_10(), "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_11(), "11", ".*(.*)", "ab", "(0,2)(2,2)"); + test(regex_12(), "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)"); + test(regex_M12(), "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_class::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } + +[[nodiscard]] auto test_class::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } + +[[nodiscard]] auto test_class::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_class::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_class::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } + +[[nodiscard]] auto test_class::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } + +[[nodiscard]] auto test_class::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } + +[[nodiscard]] auto test_class::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } + +[[nodiscard]] auto test_class::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } + +[[nodiscard]] auto test_class::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } + +[[nodiscard]] auto test_class::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } + +[[nodiscard]] auto test_class::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } + +[[nodiscard]] auto test_class::match_M12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M12(), str); } + +[[nodiscard]] auto test_class::match_M2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M2(), str); } + +#line 385 "pure2-regex.cpp2" + auto test_left_assoc::run() const& -> void{ + std::cout << "Running left_assoc:" << std::endl; + test(regex_M1(), "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M2(), "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M3(), "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M4(), "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M5(), "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M6(), "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M7(), "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M8(), "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M9(), "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M10(), "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M11(), "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M12(), "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_left_assoc::match_M1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M1(), str); } + +[[nodiscard]] auto test_left_assoc::match_M10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M10(), str); } + +[[nodiscard]] auto test_left_assoc::match_M11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M11(), str); } + +[[nodiscard]] auto test_left_assoc::match_M12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M12(), str); } + +[[nodiscard]] auto test_left_assoc::match_M2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M2(), str); } + +[[nodiscard]] auto test_left_assoc::match_M3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M3(), str); } + +[[nodiscard]] auto test_left_assoc::match_M4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M4(), str); } + +[[nodiscard]] auto test_left_assoc::match_M5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M5(), str); } + +[[nodiscard]] auto test_left_assoc::match_M6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M6(), str); } + +[[nodiscard]] auto test_left_assoc::match_M7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M7(), str); } + +[[nodiscard]] auto test_left_assoc::match_M8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M8(), str); } + +[[nodiscard]] auto test_left_assoc::match_M9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M9(), str); } + +#line 415 "pure2-regex.cpp2" + auto test_right_assoc::run() const& -> void{ + std::cout << "Running right_assoc:" << std::endl; + test(regex_1(), "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_2(), "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_3(), "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_4(), "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_5(), "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_6(), "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_7(), "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_8(), "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_9(), "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_10(), "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_11(), "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_12(), "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_right_assoc::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } + +[[nodiscard]] auto test_right_assoc::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } + +[[nodiscard]] auto test_right_assoc::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_right_assoc::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_right_assoc::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } + +[[nodiscard]] auto test_right_assoc::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } + +[[nodiscard]] auto test_right_assoc::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } + +[[nodiscard]] auto test_right_assoc::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } + +[[nodiscard]] auto test_right_assoc::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } + +[[nodiscard]] auto test_right_assoc::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } + +[[nodiscard]] auto test_right_assoc::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } + +[[nodiscard]] auto test_right_assoc::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } + +#line 461 "pure2-regex.cpp2" + auto test_forced_assoc::run() const& -> void{ + std::cout << "Running forced_assoc:" << std::endl; + test(regex_1(), "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_2(), "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_3(), "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_4(), "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_5(), "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_6(), "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_7(), "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_8(), "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_9(), "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_10(), "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_11(), "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_12(), "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_13(), "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_14(), "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_15(), "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_16(), "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_17(), "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_18(), "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_19(), "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_20(), "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_21(), "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_22(), "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_23(), "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_24(), "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_25(), "25", "(a|ab)", "ab", "(0,2)(0,2)"); + test(regex_26(), "26", "(ab|a)", "ab", "(0,2)(0,2)"); + test(regex_27(), "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_28(), "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_forced_assoc::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } + +[[nodiscard]] auto test_forced_assoc::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } + +[[nodiscard]] auto test_forced_assoc::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_forced_assoc::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_forced_assoc::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } + +[[nodiscard]] auto test_forced_assoc::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } + +[[nodiscard]] auto test_forced_assoc::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } + +[[nodiscard]] auto test_forced_assoc::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } + +[[nodiscard]] auto test_forced_assoc::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } + +[[nodiscard]] auto test_forced_assoc::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } + +[[nodiscard]] auto test_forced_assoc::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } + +[[nodiscard]] auto test_forced_assoc::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } + +[[nodiscard]] auto test_forced_assoc::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } + +[[nodiscard]] auto test_forced_assoc::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } + +[[nodiscard]] auto test_forced_assoc::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } + +[[nodiscard]] auto test_forced_assoc::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } + +[[nodiscard]] auto test_forced_assoc::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } + +[[nodiscard]] auto test_forced_assoc::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } + +[[nodiscard]] auto test_forced_assoc::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } + +[[nodiscard]] auto test_forced_assoc::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } + +[[nodiscard]] auto test_forced_assoc::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } + +[[nodiscard]] auto test_forced_assoc::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } + +[[nodiscard]] auto test_forced_assoc::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } + +[[nodiscard]] auto test_forced_assoc::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } + +[[nodiscard]] auto test_forced_assoc::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } + +[[nodiscard]] auto test_forced_assoc::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } + +[[nodiscard]] auto test_forced_assoc::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } + +[[nodiscard]] auto test_forced_assoc::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } + +#line 546 "pure2-regex.cpp2" + auto test_nullsub3::run() const& -> void{ + std::cout << "Running nullsub3:" << std::endl; + test(regex_1(), "1", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_2(), "2", "(a*)*", "x", "(0,0)(0,0)"); + test(regex_3(), "3", "(a*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_4(), "4", "(a*)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_5(), "5", "(a*)+", "a", "(0,1)(0,1)"); + test(regex_6(), "6", "(a*)+", "x", "(0,0)(0,0)"); + test(regex_7(), "7", "(a*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_8(), "8", "(a*)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_9(), "9", "(a+)*", "a", "(0,1)(0,1)"); + test(regex_10(), "10", "(a+)*", "x", "(0,0)(?,?)"); + test(regex_11(), "11", "(a+)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_12(), "12", "(a+)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_13(), "13", "(a+)+", "a", "(0,1)(0,1)"); + test(regex_14(), "14", "(a+)+", "x", "NOMATCH"); + test(regex_15(), "15", "(a+)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_16(), "16", "(a+)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_17(), "17", "([a]*)*", "a", "(0,1)(0,1)"); + test(regex_18(), "18", "([a]*)*", "x", "(0,0)(0,0)"); + test(regex_19(), "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_20(), "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_21(), "21", "([a]*)+", "a", "(0,1)(0,1)"); + test(regex_22(), "22", "([a]*)+", "x", "(0,0)(0,0)"); + test(regex_23(), "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_24(), "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_25(), "25", "([^b]*)*", "a", "(0,1)(0,1)"); + test(regex_26(), "26", "([^b]*)*", "b", "(0,0)(0,0)"); + test(regex_27(), "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_28(), "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)"); + test(regex_29(), "29", "([ab]*)*", "a", "(0,1)(0,1)"); + test(regex_30(), "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_31(), "31", "([ab]*)*", "ababab", "(0,6)(0,6)"); + test(regex_32(), "32", "([ab]*)*", "bababa", "(0,6)(0,6)"); + test(regex_33(), "33", "([ab]*)*", "b", "(0,1)(0,1)"); + test(regex_34(), "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_35(), "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)"); + test(regex_36(), "36", "([^a]*)*", "b", "(0,1)(0,1)"); + test(regex_37(), "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_38(), "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)"); + test(regex_39(), "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)"); + test(regex_40(), "40", "([^ab]*)*", "ababab", "(0,0)(0,0)"); + test(regex_41(), "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)"); + test(regex_42(), "42", "(a)", "aaa", "(0,1)(0,1)"); + test(regex_46(), "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_47(), "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_48(), "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_49(), "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_50(), "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_51(), "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_52(), "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_53(), "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)"); + test(regex_54(), "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_nullsub3::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } + +[[nodiscard]] auto test_nullsub3::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } + +[[nodiscard]] auto test_nullsub3::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_nullsub3::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_nullsub3::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } + +[[nodiscard]] auto test_nullsub3::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } + +[[nodiscard]] auto test_nullsub3::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } + +[[nodiscard]] auto test_nullsub3::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } + +[[nodiscard]] auto test_nullsub3::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } + +[[nodiscard]] auto test_nullsub3::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } + +[[nodiscard]] auto test_nullsub3::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } + +[[nodiscard]] auto test_nullsub3::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } + +[[nodiscard]] auto test_nullsub3::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } + +[[nodiscard]] auto test_nullsub3::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } + +[[nodiscard]] auto test_nullsub3::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } + +[[nodiscard]] auto test_nullsub3::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } + +[[nodiscard]] auto test_nullsub3::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } + +[[nodiscard]] auto test_nullsub3::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } + +[[nodiscard]] auto test_nullsub3::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } + +[[nodiscard]] auto test_nullsub3::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } + +[[nodiscard]] auto test_nullsub3::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } + +[[nodiscard]] auto test_nullsub3::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } + +[[nodiscard]] auto test_nullsub3::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } + +[[nodiscard]] auto test_nullsub3::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } + +[[nodiscard]] auto test_nullsub3::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } + +[[nodiscard]] auto test_nullsub3::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } + +[[nodiscard]] auto test_nullsub3::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } + +[[nodiscard]] auto test_nullsub3::match_34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_34(), str); } + +[[nodiscard]] auto test_nullsub3::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } + +[[nodiscard]] auto test_nullsub3::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } + +[[nodiscard]] auto test_nullsub3::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } + +[[nodiscard]] auto test_nullsub3::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } + +[[nodiscard]] auto test_nullsub3::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } + +[[nodiscard]] auto test_nullsub3::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } + +[[nodiscard]] auto test_nullsub3::match_40(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_40(), str); } + +[[nodiscard]] auto test_nullsub3::match_41(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_41(), str); } + +[[nodiscard]] auto test_nullsub3::match_42(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_42(), str); } + +[[nodiscard]] auto test_nullsub3::match_46(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_46(), str); } + +[[nodiscard]] auto test_nullsub3::match_47(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_47(), str); } + +[[nodiscard]] auto test_nullsub3::match_48(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_48(), str); } + +[[nodiscard]] auto test_nullsub3::match_49(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_49(), str); } + +[[nodiscard]] auto test_nullsub3::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } + +[[nodiscard]] auto test_nullsub3::match_50(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_50(), str); } + +[[nodiscard]] auto test_nullsub3::match_51(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_51(), str); } + +[[nodiscard]] auto test_nullsub3::match_52(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_52(), str); } + +[[nodiscard]] auto test_nullsub3::match_53(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_53(), str); } + +[[nodiscard]] auto test_nullsub3::match_54(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_54(), str); } + +[[nodiscard]] auto test_nullsub3::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } + +[[nodiscard]] auto test_nullsub3::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } + +[[nodiscard]] auto test_nullsub3::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } + +[[nodiscard]] auto test_nullsub3::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } + +#line 682 "pure2-regex.cpp2" + auto test_repetition2::run() const& -> void{ + std::cout << "Running repetition2:" << std::endl; + test(regex_1(), "1", "((..)|(.))", "NULL", "NOMATCH"); + test(regex_2(), "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_3(), "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_4(), "4", "((..)|(.)){1}", "NULL", "NOMATCH"); + test(regex_5(), "5", "((..)|(.)){2}", "NULL", "NOMATCH"); + test(regex_6(), "6", "((..)|(.)){3}", "NULL", "NOMATCH"); + test(regex_7(), "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)"); + test(regex_8(), "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_9(), "9", "((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_10(), "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_11(), "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_12(), "12", "((..)|(.)){2}", "a", "NOMATCH"); + test(regex_13(), "13", "((..)|(.)){3}", "a", "NOMATCH"); + test(regex_14(), "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_15(), "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_16(), "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)"); + test(regex_17(), "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH"); + test(regex_18(), "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_19(), "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_20(), "20", "((..)|(.)){3}", "aa", "NOMATCH"); + test(regex_21(), "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_22(), "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_23(), "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)"); + test(regex_24(), "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)"); + test(regex_25(), "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_26(), "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_27(), "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_28(), "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_29(), "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_30(), "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_31(), "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)"); + test(regex_32(), "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_33(), "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_34(), "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)"); + test(regex_35(), "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_36(), "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_37(), "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_38(), "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)"); + test(regex_39(), "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_40(), "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_41(), "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_42(), "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_43(), "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_44(), "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_45(), "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)"); + test(regex_46(), "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_47(), "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_48(), "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_49(), "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_100(), "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_101(), "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_102(), "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_103(), "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_104(), "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_105(), "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_106(), "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_107(), "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_108(), "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_110(), "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_111(), "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_112(), "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_113(), "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_114(), "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_115(), "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_116(), "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_117(), "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_118(), "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_260(), "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_261(), "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_262(), "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_263(), "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_264(), "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH"); + test(regex_265(), "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_266(), "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_267(), "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_268(), "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_269(), "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH"); + test(regex_270(), "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_271(), "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_repetition2::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } + +[[nodiscard]] auto test_repetition2::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } + +[[nodiscard]] auto test_repetition2::match_100(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_100(), str); } + +[[nodiscard]] auto test_repetition2::match_101(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_101(), str); } + +[[nodiscard]] auto test_repetition2::match_102(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_102(), str); } + +[[nodiscard]] auto test_repetition2::match_103(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_103(), str); } + +[[nodiscard]] auto test_repetition2::match_104(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_104(), str); } + +[[nodiscard]] auto test_repetition2::match_105(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_105(), str); } + +[[nodiscard]] auto test_repetition2::match_106(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_106(), str); } + +[[nodiscard]] auto test_repetition2::match_107(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_107(), str); } + +[[nodiscard]] auto test_repetition2::match_108(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_108(), str); } + +[[nodiscard]] auto test_repetition2::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_repetition2::match_110(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_110(), str); } + +[[nodiscard]] auto test_repetition2::match_111(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_111(), str); } + +[[nodiscard]] auto test_repetition2::match_112(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_112(), str); } + +[[nodiscard]] auto test_repetition2::match_113(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_113(), str); } + +[[nodiscard]] auto test_repetition2::match_114(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_114(), str); } + +[[nodiscard]] auto test_repetition2::match_115(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_115(), str); } + +[[nodiscard]] auto test_repetition2::match_116(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_116(), str); } + +[[nodiscard]] auto test_repetition2::match_117(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_117(), str); } + +[[nodiscard]] auto test_repetition2::match_118(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_118(), str); } + +[[nodiscard]] auto test_repetition2::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_repetition2::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } + +[[nodiscard]] auto test_repetition2::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } + +[[nodiscard]] auto test_repetition2::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } + +[[nodiscard]] auto test_repetition2::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } + +[[nodiscard]] auto test_repetition2::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } + +[[nodiscard]] auto test_repetition2::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } + +[[nodiscard]] auto test_repetition2::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } + +[[nodiscard]] auto test_repetition2::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } + +[[nodiscard]] auto test_repetition2::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } + +[[nodiscard]] auto test_repetition2::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } + +[[nodiscard]] auto test_repetition2::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } + +[[nodiscard]] auto test_repetition2::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } + +[[nodiscard]] auto test_repetition2::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } + +[[nodiscard]] auto test_repetition2::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } + +[[nodiscard]] auto test_repetition2::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } + +[[nodiscard]] auto test_repetition2::match_260(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_260(), str); } + +[[nodiscard]] auto test_repetition2::match_261(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_261(), str); } + +[[nodiscard]] auto test_repetition2::match_262(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_262(), str); } + +[[nodiscard]] auto test_repetition2::match_263(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_263(), str); } + +[[nodiscard]] auto test_repetition2::match_264(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_264(), str); } + +[[nodiscard]] auto test_repetition2::match_265(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_265(), str); } + +[[nodiscard]] auto test_repetition2::match_266(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_266(), str); } + +[[nodiscard]] auto test_repetition2::match_267(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_267(), str); } + +[[nodiscard]] auto test_repetition2::match_268(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_268(), str); } + +[[nodiscard]] auto test_repetition2::match_269(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_269(), str); } + +[[nodiscard]] auto test_repetition2::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } + +[[nodiscard]] auto test_repetition2::match_270(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_270(), str); } + +[[nodiscard]] auto test_repetition2::match_271(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_271(), str); } + +[[nodiscard]] auto test_repetition2::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } + +[[nodiscard]] auto test_repetition2::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } + +[[nodiscard]] auto test_repetition2::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } + +[[nodiscard]] auto test_repetition2::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } + +[[nodiscard]] auto test_repetition2::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } + +[[nodiscard]] auto test_repetition2::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } + +[[nodiscard]] auto test_repetition2::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } + +[[nodiscard]] auto test_repetition2::match_34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_34(), str); } + +[[nodiscard]] auto test_repetition2::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } + +[[nodiscard]] auto test_repetition2::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } + +[[nodiscard]] auto test_repetition2::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } + +[[nodiscard]] auto test_repetition2::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } + +[[nodiscard]] auto test_repetition2::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } + +[[nodiscard]] auto test_repetition2::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } + +[[nodiscard]] auto test_repetition2::match_40(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_40(), str); } + +[[nodiscard]] auto test_repetition2::match_41(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_41(), str); } + +[[nodiscard]] auto test_repetition2::match_42(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_42(), str); } + +[[nodiscard]] auto test_repetition2::match_43(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_43(), str); } + +[[nodiscard]] auto test_repetition2::match_44(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_44(), str); } + +[[nodiscard]] auto test_repetition2::match_45(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_45(), str); } + +[[nodiscard]] auto test_repetition2::match_46(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_46(), str); } + +[[nodiscard]] auto test_repetition2::match_47(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_47(), str); } + +[[nodiscard]] auto test_repetition2::match_48(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_48(), str); } + +[[nodiscard]] auto test_repetition2::match_49(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_49(), str); } + +[[nodiscard]] auto test_repetition2::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } + +[[nodiscard]] auto test_repetition2::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } + +[[nodiscard]] auto test_repetition2::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } + +[[nodiscard]] auto test_repetition2::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } + +[[nodiscard]] auto test_repetition2::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } + +#line 846 "pure2-regex.cpp2" + auto test_totest::run() const& -> void{ + std::cout << "Running totest:" << std::endl; + test(regex_01(), "01", "a+", "xaax", "(1,3)"); + test(regex_03(), "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)"); + test(regex_04(), "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)"); + test(regex_05(), "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)"); + test(regex_06(), "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)"); + test(regex_07(), "07", "(.?)", "x", "(0,1)(0,1)"); + test(regex_08(), "08", "(.?){1}", "x", "(0,1)(0,1)"); + test(regex_09(), "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)"); + test(regex_10(), "10", "(.?){2}", "x", "(0,1)(1,1)"); + test(regex_11(), "11", "(.?)*", "x", "(0,1)(0,1)"); + test(regex_12(), "12", "(.?.?)", "xxx", "(0,2)(0,2)"); + test(regex_13(), "13", "(.?.?){1}", "xxx", "(0,2)(0,2)"); + test(regex_14(), "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)"); + test(regex_15(), "15", "(.?.?){2}", "xxx", "(0,3)(2,3)"); + test(regex_16(), "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)"); + test(regex_17(), "17", "(.?.?){3}", "xxx", "(0,3)(3,3)"); + test(regex_18(), "18", "(.?.?)*", "xxx", "(0,3)(2,3)"); + test(regex_19(), "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)"); + test(regex_20(), "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)"); + test(regex_21(), "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)"); + test(regex_22(), "22", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_23(), "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_24(), "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_25(), "25", "(a|ab|ba)", "aba", "(0,2)(0,2)"); + test(regex_26(), "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_27(), "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)"); + test(regex_28(), "28", "(aba|a*b)", "ababa", "(0,3)(0,3)"); + test(regex_29(), "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1029(), "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH"); + test(regex_30(), "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_31(), "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)"); + test(regex_32(), "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1032(), "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)"); + test(regex_33(), "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)"); + test(regex_34(), "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)"); + test(regex_35(), "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)"); + test(regex_36(), "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_37(), "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)"); + test(regex_38(), "38", ".*(.*)", "xx", "(0,2)(2,2)"); + test(regex_39(), "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)"); + test(regex_40(), "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)"); + test(regex_41(), "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)"); + test(regex_42(), "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_43(), "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_44(), "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)"); + test(regex_45(), "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_83(), "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)"); + test(regex_84(), "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_85(), "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_90(), "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)"); + test(regex_91(), "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)"); + test(regex_110(), "110", "(^){0,3}", "a", "(0,0)(0,0)"); + test(regex_111(), "111", "(\\$){0,3}", "a", "(0,0)(?,?)"); + test(regex_112(), "112", "(^){1,3}", "a", "(0,0)(0,0)"); + test(regex_113(), "113", "(\\$){1,3}", "a", "(1,1)(1,1)"); + test(regex_200(), "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)"); + test(regex_201(), "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_202(), "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_203(), "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_204(), "204", "s()?e", "searchme", "(0,2)(1,1)"); + test(regex_205(), "205", "s(^)?e", "searchme", "(0,2)(?,?)"); + test(regex_206(), "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)"); + test(regex_207(), "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)"); + test(regex_208(), "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)"); + test(regex_209(), "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)"); + test(regex_210(), "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)"); + test(regex_211(), "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)"); + test(regex_212(), "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)"); + test(regex_213(), "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)"); + test(regex_214(), "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)"); + test(regex_215(), "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_216(), "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)"); + test(regex_217(), "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)"); + test(regex_218(), "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)"); + test(regex_219(), "219", "(.){2,}", "xx", "(0,2)(1,2)"); + test(regex_220(), "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)"); + test(regex_220(), "220", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)"); + test(regex_250(), "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)"); + test(regex_251(), "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_totest::match_01(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_01(), str); } + +[[nodiscard]] auto test_totest::match_03(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_03(), str); } + +[[nodiscard]] auto test_totest::match_04(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_04(), str); } + +[[nodiscard]] auto test_totest::match_05(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_05(), str); } + +[[nodiscard]] auto test_totest::match_06(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_06(), str); } + +[[nodiscard]] auto test_totest::match_07(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_07(), str); } + +[[nodiscard]] auto test_totest::match_08(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_08(), str); } + +[[nodiscard]] auto test_totest::match_09(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_09(), str); } + +[[nodiscard]] auto test_totest::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } + +[[nodiscard]] auto test_totest::match_1029(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1029(), str); } + +[[nodiscard]] auto test_totest::match_1032(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1032(), str); } + +[[nodiscard]] auto test_totest::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_totest::match_110(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_110(), str); } + +[[nodiscard]] auto test_totest::match_111(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_111(), str); } + +[[nodiscard]] auto test_totest::match_112(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_112(), str); } + +[[nodiscard]] auto test_totest::match_113(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_113(), str); } + +[[nodiscard]] auto test_totest::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_totest::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } + +[[nodiscard]] auto test_totest::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } + +[[nodiscard]] auto test_totest::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } + +[[nodiscard]] auto test_totest::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } + +[[nodiscard]] auto test_totest::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } + +[[nodiscard]] auto test_totest::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } + +[[nodiscard]] auto test_totest::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } + +[[nodiscard]] auto test_totest::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } + +[[nodiscard]] auto test_totest::match_200(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_200(), str); } + +[[nodiscard]] auto test_totest::match_201(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_201(), str); } + +[[nodiscard]] auto test_totest::match_202(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_202(), str); } + +[[nodiscard]] auto test_totest::match_203(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_203(), str); } + +[[nodiscard]] auto test_totest::match_204(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_204(), str); } + +[[nodiscard]] auto test_totest::match_205(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_205(), str); } + +[[nodiscard]] auto test_totest::match_206(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_206(), str); } + +[[nodiscard]] auto test_totest::match_207(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_207(), str); } + +[[nodiscard]] auto test_totest::match_208(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_208(), str); } + +[[nodiscard]] auto test_totest::match_209(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_209(), str); } + +[[nodiscard]] auto test_totest::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } + +[[nodiscard]] auto test_totest::match_210(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_210(), str); } + +[[nodiscard]] auto test_totest::match_211(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_211(), str); } + +[[nodiscard]] auto test_totest::match_212(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_212(), str); } + +[[nodiscard]] auto test_totest::match_213(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_213(), str); } + +[[nodiscard]] auto test_totest::match_214(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_214(), str); } + +[[nodiscard]] auto test_totest::match_215(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_215(), str); } + +[[nodiscard]] auto test_totest::match_216(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_216(), str); } + +[[nodiscard]] auto test_totest::match_217(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_217(), str); } + +[[nodiscard]] auto test_totest::match_218(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_218(), str); } + +[[nodiscard]] auto test_totest::match_219(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_219(), str); } + +[[nodiscard]] auto test_totest::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } + +[[nodiscard]] auto test_totest::match_220(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_220(), str); } + +[[nodiscard]] auto test_totest::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } + +[[nodiscard]] auto test_totest::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } + +[[nodiscard]] auto test_totest::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } + +[[nodiscard]] auto test_totest::match_250(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_250(), str); } + +[[nodiscard]] auto test_totest::match_251(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_251(), str); } + +[[nodiscard]] auto test_totest::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } + +[[nodiscard]] auto test_totest::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } + +[[nodiscard]] auto test_totest::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } + +[[nodiscard]] auto test_totest::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } + +[[nodiscard]] auto test_totest::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } + +[[nodiscard]] auto test_totest::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } + +[[nodiscard]] auto test_totest::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } + +[[nodiscard]] auto test_totest::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } + +[[nodiscard]] auto test_totest::match_34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_34(), str); } + +[[nodiscard]] auto test_totest::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } + +[[nodiscard]] auto test_totest::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } + +[[nodiscard]] auto test_totest::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } + +[[nodiscard]] auto test_totest::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } + +[[nodiscard]] auto test_totest::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } + +[[nodiscard]] auto test_totest::match_40(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_40(), str); } + +[[nodiscard]] auto test_totest::match_41(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_41(), str); } + +[[nodiscard]] auto test_totest::match_42(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_42(), str); } + +[[nodiscard]] auto test_totest::match_43(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_43(), str); } + +[[nodiscard]] auto test_totest::match_44(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_44(), str); } + +[[nodiscard]] auto test_totest::match_45(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_45(), str); } + +[[nodiscard]] auto test_totest::match_83(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_83(), str); } + +[[nodiscard]] auto test_totest::match_84(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_84(), str); } + +[[nodiscard]] auto test_totest::match_85(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_85(), str); } + +[[nodiscard]] auto test_totest::match_90(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_90(), str); } + +[[nodiscard]] auto test_totest::match_91(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_91(), str); } + +#line 942 "pure2-regex.cpp2" + auto test_osx_bsd_critical::run() const& -> void{ + std::cout << "Running osx_bsd_critical:" << std::endl; + test(regex_1(), "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M1(), "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_2(), "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2(), "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_3(), "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M3(), "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)"); + test(regex_11(), "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_12(), "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_14(), "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M14(), "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)"); + test(regex_20(), "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)"); + std::cout << std::endl; + } + + + [[nodiscard]] auto test_osx_bsd_critical::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_M1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M1(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_M14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M14(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_M2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M2(), str); } + +[[nodiscard]] auto test_osx_bsd_critical::match_M3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M3(), str); } + +#line 958 "pure2-regex.cpp2" +auto main(int const argc_, char** argv_) -> int{ + auto const args = cpp2::make_args(argc_, argv_); +#line 959 "pure2-regex.cpp2" + CPP2_UFCS(run)(test_basic3()); + CPP2_UFCS(run)(test_class()); + CPP2_UFCS(run)(test_left_assoc()); + CPP2_UFCS(run)(test_right_assoc()); + CPP2_UFCS(run)(test_forced_assoc()); + CPP2_UFCS(run)(test_nullsub3()); + CPP2_UFCS(run)(test_repetition2()); + CPP2_UFCS(run)(test_totest()); + CPP2_UFCS(run)(test_osx_bsd_critical()); +} + From e261ea3d67cc4e6ed3274f421ffddff16d0be731 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 4 Jan 2024 09:06:33 +0100 Subject: [PATCH 025/161] Remove initialization from context. --- source/regex.h2 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/regex.h2 b/source/regex.h2 index 98b20f04a1..fd93dc6c32 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -53,6 +53,12 @@ match_context: type = operator=: (out this, that) = {} + reset: (inout this, s: view) = { + str = s; + groups.fill(view()); + ranges.fill(std::make_pair(bstring::npos, bstring::npos)); + } + invalidate_group: (inout this, group: size_t) = { ranges[group] = (bstring::npos, bstring::npos); groups[group] = (); @@ -100,7 +106,7 @@ regular_expression: type = { search: (in this, str: view, inout ctx: context) -> bool = search(str, 0, ctx); search: (in this, str: view, start: size_t, inout ctx: context) -> bool = { - ctx = (str); + ctx.reset(str); // TODO: Improve find logic. (E.g. skip more elements on failure.) cur := start; From fff7cf12b9064bb337612ab6154e365ded1351be Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 4 Jan 2024 11:00:57 +0100 Subject: [PATCH 026/161] Basic char matching. --- source/reflect.h | 474 ++++++---------- source/reflect.h2 | 2 +- source/regex.h | 1372 +++------------------------------------------ source/regex.h2 | 899 ++--------------------------- 4 files changed, 264 insertions(+), 2483 deletions(-) diff --git a/source/reflect.h b/source/reflect.h index f6fdac913a..de0f7534ef 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -3,52 +3,34 @@ #define REFLECT_H_CPP2 -//=== Cpp2 type declarations ==================================================== - - #include "cpp2util.h" -#line 1 "reflect.h2" -#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 33 "reflect.h2" class compiler_services; -#line 224 "reflect.h2" class declaration_base; -#line 250 "reflect.h2" class declaration; -#line 332 "reflect.h2" class function_declaration; -#line 419 "reflect.h2" class object_declaration; -#line 455 "reflect.h2" class type_declaration; -#line 590 "reflect.h2" class alias_declaration; -#line 929 "reflect.h2" class value_member_info; -#line 1512 "reflect.h2" } } -//=== Cpp2 type definitions and function declarations =========================== - -#line 1 "reflect.h2" - // Copyright (c) Herb Sutter // SPDX-License-Identifier: CC-BY-NC-ND-4.0 @@ -68,12 +50,10 @@ class value_member_info; #include "parse.h" #include "regex.h" -#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 26 "reflect.h2" //----------------------------------------------------------------------- // // Compiler services @@ -101,34 +81,27 @@ class compiler_services std::deque* generated_tokens_ ); -#line 59 "reflect.h2" // Common API // public: auto set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void; -#line 67 "reflect.h2" public: [[nodiscard]] auto get_metafunction_name() const& -> std::string_view; public: [[nodiscard]] auto get_argument(cpp2::in index) & -> std::string; -#line 77 "reflect.h2" public: [[nodiscard]] auto get_arguments() & -> std::vector; -#line 82 "reflect.h2" public: [[nodiscard]] auto arguments_were_used() const& -> bool; using parse_statement_ret = std::unique_ptr; -#line 84 "reflect.h2" protected: [[nodiscard]] auto parse_statement( std::string_view source ) & -> parse_statement_ret; -#line 137 "reflect.h2" public: [[nodiscard]] virtual auto position() const -> source_position; -#line 143 "reflect.h2" // Error diagnosis and handling, integrated with compiler output // Unlike a contract violation, .requires continues further processing // @@ -138,24 +111,19 @@ using parse_statement_ret = std::unique_ptr; cpp2::in msg ) const& -> void; -#line 157 "reflect.h2" public: auto error(cpp2::in msg) const& -> void; -#line 166 "reflect.h2" // Enable custom contracts on this object, integrated with compiler output // Unlike .requires, a contract violation stops further processing // public: auto report_violation(auto const& msg) const& -> void; -#line 174 "reflect.h2" public: [[nodiscard]] auto has_handler() const& -> auto; public: virtual ~compiler_services() noexcept; public: compiler_services(compiler_services const& that); -#line 175 "reflect.h2" }; -#line 178 "reflect.h2" /* //----------------------------------------------------------------------- // @@ -192,7 +160,6 @@ type_id: @polymorphic_base @copyable type = } */ -#line 215 "reflect.h2" //----------------------------------------------------------------------- // // Declarations @@ -205,7 +172,6 @@ type_id: @polymorphic_base @copyable type = class declaration_base : public compiler_services { -#line 228 "reflect.h2" protected: declaration_node* n; protected: explicit declaration_base( @@ -214,31 +180,26 @@ class declaration_base cpp2::in s ); -#line 241 "reflect.h2" public: [[nodiscard]] auto position() const -> source_position override; public: [[nodiscard]] auto print() const& -> std::string; public: virtual ~declaration_base() noexcept; public: declaration_base(declaration_base const& that); -#line 244 "reflect.h2" }; -#line 247 "reflect.h2" //----------------------------------------------------------------------- // All declarations // class declaration : public declaration_base { -#line 254 "reflect.h2" public: explicit declaration( declaration_node* n_, cpp2::in s ); -#line 263 "reflect.h2" public: [[nodiscard]] auto is_public() const& -> bool; public: [[nodiscard]] auto is_protected() const& -> bool; public: [[nodiscard]] auto is_private() const& -> bool; @@ -257,7 +218,6 @@ class declaration public: [[nodiscard]] auto name() const& -> std::string_view; -#line 284 "reflect.h2" public: [[nodiscard]] auto has_initializer() const& -> bool; public: [[nodiscard]] auto is_global() const& -> bool; @@ -300,24 +260,20 @@ public: declaration(declaration const& that); // this precondition should be sufficient ... -#line 326 "reflect.h2" }; -#line 329 "reflect.h2" //----------------------------------------------------------------------- // Function declarations // class function_declaration : public declaration { -#line 336 "reflect.h2" public: explicit function_declaration( declaration_node* n_, cpp2::in s ); -#line 346 "reflect.h2" public: [[nodiscard]] auto index_of_parameter_named(cpp2::in s) const& -> int; public: [[nodiscard]] auto has_parameter_named(cpp2::in s) const& -> bool; public: [[nodiscard]] auto has_in_parameter_named(cpp2::in s) const& -> bool; @@ -354,7 +310,6 @@ class function_declaration public: [[nodiscard]] auto get_parameters() const& -> std::vector; -#line 390 "reflect.h2" public: [[nodiscard]] auto is_binary_comparison_function() const& -> bool; public: auto default_to_virtual() & -> void; @@ -365,103 +320,82 @@ class function_declaration public: function_declaration(function_declaration const& that); -#line 413 "reflect.h2" }; -#line 416 "reflect.h2" //----------------------------------------------------------------------- // Object declarations // class object_declaration : public declaration { -#line 423 "reflect.h2" public: explicit object_declaration( declaration_node* n_, cpp2::in s ); -#line 433 "reflect.h2" public: [[nodiscard]] auto is_const() const& -> bool; public: [[nodiscard]] auto has_wildcard_type() const& -> bool; public: [[nodiscard]] auto type() const& -> std::string; -#line 443 "reflect.h2" public: [[nodiscard]] auto initializer() const& -> std::string; public: object_declaration(object_declaration const& that); -#line 449 "reflect.h2" }; -#line 452 "reflect.h2" //----------------------------------------------------------------------- // Type declarations // class type_declaration : public declaration { -#line 459 "reflect.h2" public: explicit type_declaration( declaration_node* n_, cpp2::in s ); -#line 469 "reflect.h2" public: auto reserve_names(cpp2::in name, auto&& ...etc) const& -> void; -#line 481 "reflect.h2" public: [[nodiscard]] auto is_polymorphic() const& -> bool; public: [[nodiscard]] auto is_final() const& -> bool; public: [[nodiscard]] auto make_final() & -> bool; public: [[nodiscard]] auto get_member_functions() const& -> std::vector; -#line 496 "reflect.h2" public: [[nodiscard]] auto get_member_functions_needing_initializer() const& -> std::vector; -#line 511 "reflect.h2" public: [[nodiscard]] auto get_member_objects() const& -> std::vector; -#line 521 "reflect.h2" public: [[nodiscard]] auto get_member_types() const& -> std::vector; -#line 531 "reflect.h2" public: [[nodiscard]] auto get_member_aliases() const& -> std::vector; -#line 541 "reflect.h2" public: [[nodiscard]] auto get_members() const& -> std::vector; struct query_declared_value_set_functions_ret { bool out_this_in_that; bool out_this_move_that; bool inout_this_in_that; bool inout_this_move_that; }; -#line 551 "reflect.h2" public: [[nodiscard]] auto query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret; -#line 566 "reflect.h2" public: auto add_member(cpp2::in source) & -> void; -#line 580 "reflect.h2" public: auto remove_marked_members() & -> void; public: auto remove_all_members() & -> void; public: auto disable_member_function_generation() & -> void; public: type_declaration(type_declaration const& that); -#line 584 "reflect.h2" }; -#line 587 "reflect.h2" //----------------------------------------------------------------------- // Alias declarations // class alias_declaration : public declaration { -#line 594 "reflect.h2" public: explicit alias_declaration( declaration_node* n_, @@ -470,10 +404,8 @@ class alias_declaration public: alias_declaration(alias_declaration const& that); -#line 603 "reflect.h2" }; -#line 606 "reflect.h2" //----------------------------------------------------------------------- // // Metafunctions - these are hardwired for now until we get to the @@ -488,7 +420,6 @@ class alias_declaration // auto add_virtual_destructor(meta::type_declaration& t) -> void; -#line 624 "reflect.h2" //----------------------------------------------------------------------- // // "... an abstract base class defines an interface ..." @@ -503,7 +434,6 @@ auto add_virtual_destructor(meta::type_declaration& t) -> void; // auto interface(meta::type_declaration& t) -> void; -#line 663 "reflect.h2" //----------------------------------------------------------------------- // // "C.35: A base class destructor should be either public and @@ -525,7 +455,6 @@ auto interface(meta::type_declaration& t) -> void; // auto polymorphic_base(meta::type_declaration& t) -> void; -#line 707 "reflect.h2" //----------------------------------------------------------------------- // // "... A totally ordered type ... requires operator<=> that @@ -551,7 +480,6 @@ auto ordered_impl( cpp2::in ordering// must be "strong_ordering" etc. ) -> void; -#line 751 "reflect.h2" //----------------------------------------------------------------------- // ordered - a totally ordered type // @@ -559,19 +487,16 @@ auto ordered_impl( // auto ordered(meta::type_declaration& t) -> void; -#line 761 "reflect.h2" //----------------------------------------------------------------------- // weakly_ordered - a weakly ordered type // auto weakly_ordered(meta::type_declaration& t) -> void; -#line 769 "reflect.h2" //----------------------------------------------------------------------- // partially_ordered - a partially ordered type // auto partially_ordered(meta::type_declaration& t) -> void; -#line 778 "reflect.h2" //----------------------------------------------------------------------- // // "A value is ... a regular type. It must have all public @@ -590,7 +515,6 @@ auto partially_ordered(meta::type_declaration& t) -> void; // auto copyable(meta::type_declaration& t) -> void; -#line 815 "reflect.h2" //----------------------------------------------------------------------- // // basic_value @@ -600,7 +524,6 @@ auto copyable(meta::type_declaration& t) -> void; // auto basic_value(meta::type_declaration& t) -> void; -#line 840 "reflect.h2" //----------------------------------------------------------------------- // // "A 'value' is a totally ordered basic_value..." @@ -613,13 +536,10 @@ auto basic_value(meta::type_declaration& t) -> void; // auto value(meta::type_declaration& t) -> void; -#line 856 "reflect.h2" auto weakly_ordered_value(meta::type_declaration& t) -> void; -#line 862 "reflect.h2" auto partially_ordered_value(meta::type_declaration& t) -> void; -#line 869 "reflect.h2" //----------------------------------------------------------------------- // // "By definition, a `struct` is a `class` in which members @@ -647,7 +567,6 @@ auto partially_ordered_value(meta::type_declaration& t) -> void; // auto cpp2_struct(meta::type_declaration& t) -> void; -#line 912 "reflect.h2" //----------------------------------------------------------------------- // // "C enumerations constitute a curiously half-baked concept. ... @@ -677,7 +596,6 @@ auto basic_enum( cpp2::in bitwise ) -> void; -#line 1118 "reflect.h2" //----------------------------------------------------------------------- // // "An enum[...] is a totally ordered value type that stores a @@ -689,7 +607,6 @@ auto basic_enum( // auto cpp2_enum(meta::type_declaration& t) -> void; -#line 1144 "reflect.h2" //----------------------------------------------------------------------- // // "flag_enum expresses an enumeration that stores values @@ -702,7 +619,6 @@ auto cpp2_enum(meta::type_declaration& t) -> void; // auto flag_enum(meta::type_declaration& t) -> void; -#line 1176 "reflect.h2" //----------------------------------------------------------------------- // // "As with void*, programmers should know that unions [...] are @@ -729,14 +645,12 @@ auto flag_enum(meta::type_declaration& t) -> void; auto cpp2_union(meta::type_declaration& t) -> void; -#line 1332 "reflect.h2" //----------------------------------------------------------------------- // // print - output a pretty-printed visualization of t // auto print(cpp2::in t) -> void; -#line 1341 "reflect.h2" //----------------------------------------------------------------------- // // regex - creates regular expressions from members @@ -745,7 +659,6 @@ auto print(cpp2::in t) -> void; // auto regex_gen(meta::type_declaration& t) -> void; -#line 1405 "reflect.h2" //----------------------------------------------------------------------- // // apply_metafunctions @@ -756,38 +669,27 @@ auto regex_gen(meta::type_declaration& t) -> void; auto const& error ) -> bool; -#line 1512 "reflect.h2" } } - -//=== Cpp2 function definitions ================================================= - -#line 1 "reflect.h2" - -#line 21 "reflect.h2" namespace cpp2 { namespace meta { -#line 47 "reflect.h2" compiler_services::compiler_services( std::vector* errors_, std::deque* generated_tokens_ ) : errors{ errors_ } - , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*cpp2::assert_not_null(errors))) } + , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*errors)) } , generated_tokens{ generated_tokens_ } - , parser{ *cpp2::assert_not_null(errors) } -#line 52 "reflect.h2" + , parser{ *errors } { -#line 57 "reflect.h2" } -#line 61 "reflect.h2" auto compiler_services::set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void{ metafunction_name = name; metafunction_args = args; @@ -798,8 +700,8 @@ namespace meta { [[nodiscard]] auto compiler_services::get_argument(cpp2::in index) & -> std::string{ metafunctions_used = true; - if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less(_1,_2); }())) { - return CPP2_ASSERT_IN_BOUNDS(metafunction_args, index); + if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return _0<=_1 && _1<_2; }())) { + return metafunction_args[index]; } return ""; } @@ -818,14 +720,13 @@ namespace meta { { cpp2::deferred_init> ret; -#line 90 "reflect.h2" auto original_source {source}; CPP2_UFCS(push_back)(generated_lines, std::vector()); auto lines {&CPP2_UFCS(back)(generated_lines)}; auto add_line {[&, _1 = lines](cpp2::in s) mutable -> void{ - static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(_1)), s, source_line::category::cpp2)); + static_cast(CPP2_UFCS(emplace_back)((*_1), s, source_line::category::cpp2)); }}; { auto newline_pos = CPP2_UFCS(find)(source, '\n'); @@ -833,11 +734,10 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); // First split this string into source_lines // -#line 102 "reflect.h2" - if ( cpp2::cmp_greater(CPP2_UFCS(ssize)(source),1) - && newline_pos != source.npos) + if ( CPP2_UFCS(ssize)(source)>1 + && newline_pos!=source.npos) { - while( newline_pos != std::string_view::npos ) + while( newline_pos!=std::string_view::npos ) { add_line(CPP2_UFCS(substr)(source, 0, newline_pos)); CPP2_UFCS(remove_prefix)(source, newline_pos + 1); @@ -846,7 +746,6 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); } } -#line 113 "reflect.h2" if (!(CPP2_UFCS(empty)(source))) { std::move(add_line)(std::move(source)); } @@ -854,17 +753,17 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); // Now lex this source fragment to generate // a single grammar_map entry, whose .second // is the vector of tokens - static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *cpp2::assert_not_null(errors))); + static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *errors)); auto tokens {&CPP2_UFCS(back)(generated_lexers)}; - CPP2_UFCS(lex)((*cpp2::assert_not_null(tokens)), *cpp2::assert_not_null(std::move(lines)), true); + CPP2_UFCS(lex)((*tokens), *std::move(lines), true); - if (cpp2::Default.has_handler() && !(std::ssize(CPP2_UFCS(get_map)((*cpp2::assert_not_null(tokens)))) == 1) ) { cpp2::Default.report_violation(""); } + if (cpp2::Default.has_handler() && !(std::ssize(CPP2_UFCS(get_map)((*tokens)))==1) ) { cpp2::Default.report_violation(""); } // Now parse this single declaration from // the lexed tokens ret.construct(CPP2_UFCS(parse_one_declaration)(parser, - (*cpp2::assert_not_null(CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*cpp2::assert_not_null(std::move(tokens)))))).second, - *cpp2::assert_not_null(generated_tokens) + (*CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*std::move(tokens)))).second, + *generated_tokens )); if (!(ret.value())) { error("parse failed - the source string is not a valid statement:\n" + cpp2::to_string(std::move(original_source))); @@ -877,7 +776,6 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); return { }; } -#line 146 "reflect.h2" auto compiler_services::require( cpp2::in b, @@ -895,10 +793,9 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); if (!(CPP2_UFCS(empty)(metafunction_name))) { message = "while applying @" + cpp2::to_string(metafunction_name) + " - " + cpp2::to_string(message); } - static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(errors)), position(), std::move(message))); + static_cast(CPP2_UFCS(emplace_back)((*errors), position(), std::move(message))); } -#line 169 "reflect.h2" auto compiler_services::report_violation(auto const& msg) const& -> void{ error(msg); throw(std::runtime_error(" ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " - contract violation - see previous errors")); @@ -916,7 +813,6 @@ compiler_services::compiler_services(compiler_services const& that) , metafunction_args{ that.metafunction_args } , metafunctions_used{ that.metafunctions_used }{} -#line 230 "reflect.h2" declaration_base::declaration_base( declaration_node* n_, @@ -924,97 +820,92 @@ compiler_services::compiler_services(compiler_services const& that) ) : compiler_services{ s } , n{ n_ } -#line 235 "reflect.h2" { -#line 238 "reflect.h2" if (cpp2::Default.has_handler() && !(n) ) { cpp2::Default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); } } - [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*n)); } - [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*cpp2::assert_not_null(n)), 0); } + [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*n), 0); } declaration_base::~declaration_base() noexcept{} declaration_base::declaration_base(declaration_base const& that) : compiler_services{ static_cast(that) } , n{ that.n }{} -#line 254 "reflect.h2" declaration::declaration( declaration_node* n_, cpp2::in s ) : declaration_base{ n_, s } -#line 259 "reflect.h2" { } - [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*n)); } + [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*n)); } + [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*n)); } + [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*n)); } - auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*cpp2::assert_not_null(n)))); } - auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n)))); } - auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*cpp2::assert_not_null(n)))); } + auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*n))); } + auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*n))); } + auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*n))); } - [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*n)); } + [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*n)); } + [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*n)); } - [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::has_name(cpp2::in s) const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n)), s); } + [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*n)); } + [[nodiscard]] auto declaration::has_name(cpp2::in s) const& -> bool { return CPP2_UFCS(has_name)((*n), s); } [[nodiscard]] auto declaration::name() const& -> std::string_view{ - if (has_name()) {return CPP2_UFCS(as_string_view)((*cpp2::assert_not_null(CPP2_UFCS(name)(*cpp2::assert_not_null(n))))); } + if (has_name()) {return CPP2_UFCS(as_string_view)((*CPP2_UFCS(name)(*n))); } else { return ""; } } - [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*n)); } - [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*n)); } + [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*n)); } + [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*n)); } + [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*n)); } + [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*n)); } + [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*n)); } + [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*n)); } + [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*n)); } - [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*n)); } + [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*n)); } + [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*n)); } - [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*n)); } [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this)); } [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); } [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); } [[nodiscard]] auto declaration::as_alias() const& -> alias_declaration { return alias_declaration(n, (*this)); } - [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*cpp2::assert_not_null(n)).parent_declaration, (*this)); } + [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*n).parent_declaration, (*this)); } - [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*n)); } + [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*n)); } + [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*n)); } + [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*n)); } + [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*n)); } - [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*n)); } + [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*n)); } + [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*n)); } - [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*n)); } auto declaration::mark_for_removal_from_enclosing_type() & -> void { if (cpp2::Type.has_handler() && !(parent_is_type()) ) { cpp2::Type.report_violation(""); } -#line 323 "reflect.h2" - auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::assert_not_null(n)))}; + auto test {CPP2_UFCS(type_member_mark_for_removal)((*n))}; if (cpp2::Default.has_handler() && !(std::move(test)) ) { cpp2::Default.report_violation(""); }// ... to ensure this assert is true } @@ -1022,72 +913,69 @@ declaration_base::declaration_base(declaration_base const& that) declaration::declaration(declaration const& that) : declaration_base{ static_cast(that) }{} -#line 336 "reflect.h2" function_declaration::function_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 341 "reflect.h2" { - if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } + if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*n))) ) { cpp2::Default.report_violation(""); } } - [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::assert_not_null(n)), s); } - [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::assert_not_null(n)), s); } - [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::assert_not_null(n)), s); } - [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::assert_not_null(n)), s); } - [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::assert_not_null(n)), s); } - [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*n), s); } + [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*n), s); } + [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*n), s); } + [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*n), s); } + [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*n), s); } + [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*n)); } [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::in s, cpp2::in pass) const& -> bool { - return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::assert_not_null(n)), s, pass); } - [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*cpp2::assert_not_null(n))); } + return CPP2_UFCS(has_parameter_with_name_and_pass)((*n), s, pass); } + [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*n)); } + [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*n)); } + [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*n)); } + [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*n)); } + [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*n)); } + [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*n)); } + [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*n)); } + [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*n)); } + [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*n)); } + [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*n)); } + [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*n)); } + [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*n)); } + [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*n)); } + [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*n)); } + [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*n)); } [[nodiscard]] auto function_declaration::is_copy_or_move() const& -> bool { return is_constructor_with_that() || is_assignment_with_that(); } - [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*n)); } + [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*n)); } + [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*n)); } + [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*n)); } - [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*n)); } [[nodiscard]] auto function_declaration::get_parameters() const& -> std::vector { std::vector ret {}; - for ( auto const& param : CPP2_UFCS(get_function_parameters)((*cpp2::assert_not_null(n))) ) { - static_cast(CPP2_UFCS(emplace_back)(ret, &*cpp2::assert_not_null((*cpp2::assert_not_null(param)).declaration), (*this))); + for ( auto const& param : CPP2_UFCS(get_function_parameters)((*n)) ) { + static_cast(CPP2_UFCS(emplace_back)(ret, &*(*param).declaration, (*this))); } return ret; } - [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*n)); } - auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n)))); } + auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*n))); } - [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*n)); } auto function_declaration::add_initializer(cpp2::in source) & -> void -#line 399 "reflect.h2" { if ((*this).has_handler() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); } if ((*this).has_handler() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); } @@ -1096,44 +984,41 @@ declaration::declaration(declaration const& that) //require( parent_is_type(), // "cannot add an initializer to a function that isn't in a type scope"); -#line 405 "reflect.h2" auto stmt {parse_statement(source)}; if (!((cpp2::as_(stmt)))) { error("cannot add an initializer that is not a valid statement"); return ; } - require(CPP2_UFCS(add_function_initializer)((*cpp2::assert_not_null(n)), std::move(stmt)), + require(CPP2_UFCS(add_function_initializer)((*n), std::move(stmt)), std::string("unexpected error while attempting to add initializer")); } function_declaration::function_declaration(function_declaration const& that) : declaration{ static_cast(that) }{} -#line 423 "reflect.h2" object_declaration::object_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 428 "reflect.h2" { - if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } + if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*n))) ) { cpp2::Default.report_violation(""); } } - [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*n)); } + [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*n)); } [[nodiscard]] auto object_declaration::type() const& -> std::string{ - auto ret {CPP2_UFCS(object_type)((*cpp2::assert_not_null(n)))}; + auto ret {CPP2_UFCS(object_type)((*n))}; require(!(contains(ret, "(*ERROR*)")), "cannot to_string this type: " + ret); return ret; } [[nodiscard]] auto object_declaration::initializer() const& -> std::string{ - auto ret {CPP2_UFCS(object_initializer)((*cpp2::assert_not_null(n)))}; + auto ret {CPP2_UFCS(object_initializer)((*n))}; require(!(contains(ret, "(*ERROR*)")), "cannot to_string this initializer: " + ret); return ret; @@ -1142,17 +1027,15 @@ declaration::declaration(declaration const& that) object_declaration::object_declaration(object_declaration const& that) : declaration{ static_cast(that) }{} -#line 459 "reflect.h2" type_declaration::type_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 464 "reflect.h2" { - if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } + if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*n))) ) { cpp2::Default.report_violation(""); } } auto type_declaration::reserve_names(cpp2::in name, auto&& ...etc) const& -> void @@ -1167,16 +1050,16 @@ declaration::declaration(declaration const& that) } } - [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::assert_not_null(n))); } - [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*n)); } + [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*n)); } + [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*n)); } [[nodiscard]] auto type_declaration::get_member_functions() const& -> std::vector { std::vector ret {}; for ( - auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::functions) ) { + auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::functions) ) { static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); } return ret; @@ -1187,10 +1070,10 @@ declaration::declaration(declaration const& that) { std::vector ret {}; for ( - auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::functions) ) - if ( !(CPP2_UFCS(has_initializer)((*cpp2::assert_not_null(d)))) - && !(CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(d)))) - && !(CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(d))))) + auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::functions) ) + if ( !(CPP2_UFCS(has_initializer)((*d))) + && !(CPP2_UFCS(is_virtual_function)((*d))) + && !(CPP2_UFCS(is_defaultable_function)((*d)))) { static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); } @@ -1201,7 +1084,7 @@ declaration::declaration(declaration const& that) { std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::objects) ) { + for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::objects) ) { static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); } return ret; @@ -1211,7 +1094,7 @@ declaration::declaration(declaration const& that) { std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::types) ) { + for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::types) ) { static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); } return ret; @@ -1221,7 +1104,7 @@ declaration::declaration(declaration const& that) { std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::aliases) ) { + for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::aliases) ) { static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); } return ret; @@ -1231,7 +1114,7 @@ declaration::declaration(declaration const& that) { std::vector ret {}; - for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::all) ) { + for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::all) ) { static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this))); } return ret; @@ -1239,18 +1122,16 @@ declaration::declaration(declaration const& that) [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret -#line 558 "reflect.h2" { cpp2::deferred_init out_this_in_that; cpp2::deferred_init out_this_move_that; cpp2::deferred_init inout_this_in_that; cpp2::deferred_init inout_this_move_that; -#line 559 "reflect.h2" - auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::assert_not_null(n)))}; + auto declared {CPP2_UFCS(find_declared_value_set_functions)((*n))}; out_this_in_that.construct(declared.out_this_in_that != nullptr); - out_this_move_that.construct(declared.out_this_move_that != nullptr); - inout_this_in_that.construct(declared.inout_this_in_that != nullptr); - inout_this_move_that.construct(std::move(declared).inout_this_move_that != nullptr); + out_this_move_that.construct(declared.out_this_move_that!=nullptr); + inout_this_in_that.construct(declared.inout_this_in_that!=nullptr); + inout_this_move_that.construct(std::move(declared).inout_this_move_that!=nullptr); return { std::move(out_this_in_that.value()), std::move(out_this_move_that.value()), std::move(inout_this_in_that.value()), std::move(inout_this_move_that.value()) }; } auto type_declaration::add_member(cpp2::in source) & -> void @@ -1260,44 +1141,40 @@ declaration::declaration(declaration const& that) error("the provided source string is not a valid statement"); return ; } - if (!(CPP2_UFCS(is_declaration)((*cpp2::assert_not_null(decl))))) { + if (!(CPP2_UFCS(is_declaration)((*decl)))) { error("cannot add a member that is not a declaration"); } - require(CPP2_UFCS(add_type_member)((*cpp2::assert_not_null(n)), std::move(decl)), + require(CPP2_UFCS(add_type_member)((*n), std::move(decl)), std::string("unexpected error while attempting to add member:\n") + source); } - auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*cpp2::assert_not_null(n))); } - auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*cpp2::assert_not_null(n))); } + auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*n)); } + auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*n)); } - auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*cpp2::assert_not_null(n))); } + auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*n)); } type_declaration::type_declaration(type_declaration const& that) : declaration{ static_cast(that) }{} -#line 594 "reflect.h2" alias_declaration::alias_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } -#line 599 "reflect.h2" { - if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } + if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*n))) ) { cpp2::Default.report_violation(""); } } alias_declaration::alias_declaration(alias_declaration const& that) : declaration{ static_cast(that) }{} -#line 618 "reflect.h2" auto add_virtual_destructor(meta::type_declaration& t) -> void { CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }"); } -#line 636 "reflect.h2" auto interface(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1324,7 +1201,6 @@ auto interface(meta::type_declaration& t) -> void } } -#line 682 "reflect.h2" auto polymorphic_base(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1349,7 +1225,6 @@ auto polymorphic_base(meta::type_declaration& t) -> void } } -#line 727 "reflect.h2" auto ordered_impl( meta::type_declaration& t, cpp2::in ordering @@ -1362,7 +1237,7 @@ auto ordered_impl( if (CPP2_UFCS(has_name)(mf, "operator<=>")) { has_spaceship = true; auto return_name {CPP2_UFCS(unnamed_return_type)(mf)}; - if (CPP2_UFCS(find)(return_name, ordering) == return_name.npos) + if (CPP2_UFCS(find)(return_name, ordering)==return_name.npos) { CPP2_UFCS(error)(mf, "operator<=> must return std::" + cpp2::as_(ordering)); } @@ -1374,25 +1249,21 @@ auto ordered_impl( } } -#line 756 "reflect.h2" auto ordered(meta::type_declaration& t) -> void { ordered_impl(t, "strong_ordering"); } -#line 764 "reflect.h2" auto weakly_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "weak_ordering"); } -#line 772 "reflect.h2" auto partially_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "partial_ordering"); } -#line 794 "reflect.h2" auto copyable(meta::type_declaration& t) -> void { // If the user explicitly wrote any of the copy/move functions, @@ -1414,7 +1285,6 @@ auto copyable(meta::type_declaration& t) -> void }} } -#line 822 "reflect.h2" auto basic_value(meta::type_declaration& t) -> void { CPP2_UFCS(copyable)(t); @@ -1433,7 +1303,6 @@ auto basic_value(meta::type_declaration& t) -> void } } -#line 850 "reflect.h2" auto value(meta::type_declaration& t) -> void { CPP2_UFCS(ordered)(t); @@ -1452,7 +1321,6 @@ auto partially_ordered_value(meta::type_declaration& t) -> void CPP2_UFCS(basic_value)(t); } -#line 894 "reflect.h2" auto cpp2_struct(meta::type_declaration& t) -> void { for ( auto& m : CPP2_UFCS(get_members)(t) ) @@ -1470,7 +1338,6 @@ auto cpp2_struct(meta::type_declaration& t) -> void CPP2_UFCS(disable_member_function_generation)(t); } -#line 935 "reflect.h2" auto basic_enum( meta::type_declaration& t, auto const& nextval, @@ -1495,7 +1362,6 @@ auto basic_enum( { std::string value = "-1"; -#line 958 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) if ( CPP2_UFCS(is_member_object)(m)) @@ -1517,11 +1383,11 @@ std::string value = "-1"; nextval(value, init); - auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS(value, 0), nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now - if (cpp2::cmp_less(v,min_value)) { + auto v {std::strtoll(&value[0], nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now + if (vmax_value) { max_value = v; } @@ -1533,29 +1399,28 @@ std::string value = "-1"; } } -#line 994 "reflect.h2" if ((CPP2_UFCS(empty)(enumerators))) { CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value"); return ; } // Compute the default underlying type, if it wasn't explicitly specified - if (underlying_type.value() == "") + if (underlying_type.value()=="") { CPP2_UFCS(require)(t, !(std::move(found_non_numeric)), "if you write an enumerator with a non-numeric-literal value, you must specify the enumeration's underlying type"); if (!(bitwise)) { - if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) { + if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) { underlying_type.value() = "i8"; } - else {if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) { + else {if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) { underlying_type.value() = "i16"; } - else {if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) { + else {if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) { underlying_type.value() = "i32"; } - else {if (cpp2::cmp_greater_eq(std::move(min_value),std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) { + else {if (std::move(min_value)>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) { underlying_type.value() = "i64"; } else { @@ -1564,13 +1429,13 @@ std::string value = "-1"; } else { auto umax {std::move(max_value) * cpp2::as_()}; - if (cpp2::cmp_less_eq(umax,std::numeric_limits::max())) { + if (umax<=std::numeric_limits::max()) { underlying_type.value() = "u8"; } - else {if (cpp2::cmp_less_eq(umax,std::numeric_limits::max())) { + else {if (umax<=std::numeric_limits::max()) { underlying_type.value() = "u16"; } - else {if (cpp2::cmp_less_eq(std::move(umax),std::numeric_limits::max())) { + else {if (std::move(umax)<=std::numeric_limits::max()) { underlying_type.value() = "u32"; } else { @@ -1579,7 +1444,6 @@ std::string value = "-1"; } } -#line 1040 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents // // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' @@ -1588,7 +1452,7 @@ std::string value = "-1"; // Generate the 'none' value if appropriate, and use that or // else the first enumerator as the default-constructed value - auto default_value {CPP2_ASSERT_IN_BOUNDS(enumerators, 0).name}; + auto default_value {enumerators[0].name}; if (bitwise) { default_value = "none"; value_member_info e {"none", "", "0"}; @@ -1627,7 +1491,6 @@ std::string to_string = " to_string: (this) -> std::string = { \n"; // Provide a 'to_string' function to print enumerator name(s) -#line 1085 "reflect.h2" { if (bitwise) { to_string += " _ret : std::string = \"(\";\n"; @@ -1637,9 +1500,9 @@ std::string to_string = " to_string: (this) -> std::string = { \n"; for ( auto const& e : enumerators ) { - if (e.name != "_") {// ignore unnamed values + if (e.name!="_") { // ignore unnamed values if (bitwise) { - if (e.name != "none") { + if (e.name!="none") { to_string += " if (this & " + cpp2::to_string(e.name) + ") == " + cpp2::to_string(e.name) + " { _ret += _comma + \"" + cpp2::to_string(e.name) + "\"; _comma = \", \"; }\n"; } } @@ -1659,10 +1522,8 @@ std::string to_string = " to_string: (this) -> std::string = { \n"; CPP2_UFCS(add_member)(t, std::move(to_string)); } } -#line 1115 "reflect.h2" } -#line 1127 "reflect.h2" auto cpp2_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with an incrementing value generator @@ -1671,7 +1532,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void if (!(CPP2_UFCS(empty)(specified_value))) { value = specified_value; }else { - auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS(value, 0), nullptr, 10)}; + auto v {std::strtoll(&value[0], nullptr, 10)}; value = cpp2::as_((std::move(v) + 1)); } }, @@ -1679,7 +1540,6 @@ auto cpp2_enum(meta::type_declaration& t) -> void ); } -#line 1154 "reflect.h2" auto flag_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with a power-of-two value generator @@ -1688,8 +1548,8 @@ auto flag_enum(meta::type_declaration& t) -> void if (!(CPP2_UFCS(empty)(specified_value))) { value = specified_value; }else { - auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS(value, 0), nullptr, 10)}; - if (cpp2::cmp_less(v,1)) { + auto v {std::strtoll(&value[0], nullptr, 10)}; + if (v<1) { value = "1"; } else { @@ -1701,7 +1561,6 @@ auto flag_enum(meta::type_declaration& t) -> void ); } -#line 1200 "reflect.h2" auto cpp2_union(meta::type_declaration& t) -> void { std::vector alternatives {}; @@ -1710,7 +1569,6 @@ auto value = 0; // 1. Gather: All the user-written members, and find/compute the max size -#line 1207 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) { do @@ -1735,22 +1593,20 @@ auto value = 0; } while (false); ++value; } } -#line 1230 "reflect.h2" std::string discriminator_type {}; - if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { + if (CPP2_UFCS(ssize)(alternatives)::max()) { discriminator_type = "i8"; } - else {if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { + else {if (CPP2_UFCS(ssize)(alternatives)::max()) { discriminator_type = "i16"; } - else {if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) { + else {if (CPP2_UFCS(ssize)(alternatives)::max()) { discriminator_type = "i32"; } else { discriminator_type = "i64"; }}} -#line 1245 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents CPP2_UFCS(remove_marked_members)(t); @@ -1759,12 +1615,10 @@ std::string storage = " _storage: cpp2::aligned_storage t) -> void { std::cout << CPP2_UFCS(print)(t) << "\n"; } -#line 1347 "reflect.h2" auto regex_gen(meta::type_declaration& t) -> void { bool has_default {false}; @@ -1904,7 +1748,7 @@ auto regex_gen(meta::type_declaration& t) -> void } expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2); - CPP2_ASSERT_IN_BOUNDS(expressions, name) = expr; + expressions[name] = expr; } } @@ -1919,13 +1763,12 @@ auto regex_gen(meta::type_declaration& t) -> void } CPP2_UFCS(add_member)(t, "regex" + cpp2::to_string(name) + ": type == " + cpp2::to_string(regular_expression) + ";"); - CPP2_UFCS(add_member)(t, "match" + cpp2::to_string(name) + ": (in this, str: std::string) -> _ = regex" + cpp2::to_string(name) + "().match(str);"); + //t.add_member("match(name)$: (in this, str: std::string) -> _ = regex(name)$().match(str);"); //t.add_member("match(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().match(str, ctx);"); //t.add_member("find(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().find(str, ctx);"); } } -#line 1409 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -1939,7 +1782,7 @@ auto regex_gen(meta::type_declaration& t) -> void for ( auto const& m : CPP2_UFCS(get_members)(rtype) ) { - CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "_")) || cpp2::cmp_greater(CPP2_UFCS(ssize)(CPP2_UFCS(name)(m)),1), + CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "_")) || CPP2_UFCS(ssize)(CPP2_UFCS(name)(m))>1, "a type that applies a metafunction cannot have a body that declares a name that starts with '_' - those names are reserved for the metafunction implementation"); } @@ -1949,64 +1792,64 @@ auto regex_gen(meta::type_declaration& t) -> void { // Convert the name and any template arguments to strings // and record that in rtype - auto name {CPP2_UFCS(to_string)((*cpp2::assert_not_null(meta)))}; + auto name {CPP2_UFCS(to_string)((*meta))}; name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(find)(name, '<')); std::vector args {}; for ( - auto const& arg : CPP2_UFCS(template_arguments)((*cpp2::assert_not_null(meta))) ) + auto const& arg : CPP2_UFCS(template_arguments)((*meta)) ) CPP2_UFCS(push_back)(args, CPP2_UFCS(to_string)(arg)); CPP2_UFCS(set_metafunction_name)(rtype, name, args); // Dispatch // - if (name == "interface") { + if (name=="interface") { interface(rtype); } - else {if (name == "polymorphic_base") { + else {if (name=="polymorphic_base") { polymorphic_base(rtype); } - else {if (name == "ordered") { + else {if (name=="ordered") { ordered(rtype); } - else {if (name == "weakly_ordered") { + else {if (name=="weakly_ordered") { weakly_ordered(rtype); } - else {if (name == "partially_ordered") { + else {if (name=="partially_ordered") { partially_ordered(rtype); } - else {if (name == "copyable") { + else {if (name=="copyable") { copyable(rtype); } - else {if (name == "basic_value") { + else {if (name=="basic_value") { basic_value(rtype); } - else {if (name == "value") { + else {if (name=="value") { value(rtype); } - else {if (name == "weakly_ordered_value") { + else {if (name=="weakly_ordered_value") { weakly_ordered_value(rtype); } - else {if (name == "partially_ordered_value") { + else {if (name=="partially_ordered_value") { partially_ordered_value(rtype); } - else {if (name == "struct") { + else {if (name=="struct") { cpp2_struct(rtype); } - else {if (name == "enum") { + else {if (name=="enum") { cpp2_enum(rtype); } - else {if (name == "flag_enum") { + else {if (name=="flag_enum") { flag_enum(rtype); } - else {if (name == "union") { + else {if (name=="union") { cpp2_union(rtype); } - else {if (name == "print") { + else {if (name=="print") { print(rtype); } - else {if (name == "regex") { + else {if (name=="regex") { regex_gen(rtype); } else { @@ -2020,7 +1863,7 @@ auto regex_gen(meta::type_declaration& t) -> void && !(CPP2_UFCS(arguments_were_used)(rtype)))) { - error(name + " did not use its template arguments - did you mean to write '" + name + " <" + CPP2_ASSERT_IN_BOUNDS(args, 0) + "> type' (with the spaces)?"); + error(name + " did not use its template arguments - did you mean to write '" + name + " <" + args[0] + "> type' (with the spaces)?"); return false; } } @@ -2028,7 +1871,6 @@ auto regex_gen(meta::type_declaration& t) -> void return true; } -#line 1512 "reflect.h2" } } diff --git a/source/reflect.h2 b/source/reflect.h2 index b466c6bf40..91fca4c246 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -1395,7 +1395,7 @@ regex_gen: (inout t: meta::type_declaration) = } t.add_member("regex(name)$: type == (regular_expression)$;"); - t.add_member("match(name)$: (in this, str: std::string) -> _ = regex(name)$().match(str);"); + //t.add_member("match(name)$: (in this, str: std::string) -> _ = regex(name)$().match(str);"); //t.add_member("match(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().match(str, ctx);"); //t.add_member("find(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().find(str, ctx);"); } diff --git a/source/regex.h b/source/regex.h index 4e19cbc558..4162453de2 100644 --- a/source/regex.h +++ b/source/regex.h @@ -3,109 +3,34 @@ #define REGEX_H_CPP2 -//=== Cpp2 type declarations ==================================================== - - #include "cpp2util.h" -#line 1 "regex.h2" -#line 13 "regex.h2" namespace cpp2 { namespace regex { -#line 20 "regex.h2" -class list_end; - -class match_return; - -#line 37 "regex.h2" -template class match_context; - -#line 83 "regex.h2" -template class regular_expression; - -#line 124 "regex.h2" -template class alternative_matcher_logic; - -#line 199 "regex.h2" -template class any_matcher_logic; - -#line 207 "regex.h2" -template class char_matcher_logic; - -#line 215 "regex.h2" -template class single_class_entry; - -#line 221 "regex.h2" -template class range_class_entry; - -#line 227 "regex.h2" -template class and_class_entry; +template class match_group; -#line 232 "regex.h2" -template class list_class_entry; - +template class match_context; -#line 237 "regex.h2" -template class named_class_entry; - +template class template_list; -#line 261 "regex.h2" -template class class_matcher_logic; +template class regular_expression; -#line 306 "regex.h2" -template class empty_matcher_logic; +class end_matcher_logic; -#line 314 "regex.h2" -template class escaped_char_matcher_logic; - -#line 320 "regex.h2" -template class line_end_matcher_logic; - -#line 328 "regex.h2" -template class line_start_matcher_logic; - -#line 336 "regex.h2" -class list_matcher_state; - - -#line 340 "regex.h2" -template class list_matcher_logic; - -#line 430 "regex.h2" -template class group_matcher_logic; - - -#line 461 "regex.h2" -template class group_ref_matcher_logic; - - -#line 470 "regex.h2" -template class range_matcher_logic; - -#line 561 "regex.h2" -template class special_range_matcher_logic; - +template class char_matcher_logic; -#line 567 "regex.h2" class regex_parser_state; -#line 597 "regex.h2" template class regex_parser; -#line 982 "regex.h2" } } - -//=== Cpp2 type definitions and function declarations =========================== - -#line 1 "regex.h2" - // Copyright (c) Herb Sutter // SPDX-License-Identifier: CC-BY-NC-ND-4.0 @@ -117,7 +42,6 @@ template class regex_parser; // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#line 13 "regex.h2" namespace cpp2 { namespace regex { @@ -125,374 +49,62 @@ namespace regex { template using view = std::basic_string_view; template using bstring = std::basic_string; -class list_end { - public: list_end() = default; - public: list_end(list_end const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(list_end const&) -> void = delete; -}; -#line 21 "regex.h2" +template class match_group { + public: Iter start {}; + public: Iter end {}; -class match_return - { public: bool matched {false}; - public: size_t length {0}; - - public: [[nodiscard]] static auto create(cpp2::in m, cpp2::in l) -> match_return; - -#line 35 "regex.h2" }; -template class match_context +template class match_context { - public: view str; - public: std::array,max_groups> ranges {}; - public: std::array,max_groups> groups {}; - - public: State state {}; - - public: explicit match_context(); - -#line 49 "regex.h2" - public: explicit match_context(view const& s); -#line 49 "regex.h2" - public: auto operator=(view const& s) -> match_context& ; - -#line 54 "regex.h2" - public: match_context(match_context const& that); -#line 54 "regex.h2" - public: auto operator=(match_context const& that) -> match_context& ; -#line 54 "regex.h2" - public: match_context(match_context&& that) noexcept; -#line 54 "regex.h2" - public: auto operator=(match_context&& that) noexcept -> match_context& ; - - public: auto invalidate_group(cpp2::in group) & -> void; - -#line 61 "regex.h2" - public: auto set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void; + public: std::array,max_groups> groups {}; -#line 66 "regex.h2" - public: [[nodiscard]] auto print_ranges() const& -> bstring; + public: template [[nodiscard]] auto get_group() & -> auto; + public: match_context() = default; + public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(match_context const&) -> void = delete; -#line 80 "regex.h2" - public: template [[nodiscard]] auto get_state() & -> auto; }; -template class regular_expression { - - public: using context = match_context; +template class template_list { + public: template_list() = default; + public: template_list(template_list const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(template_list const&) -> void = delete; +}; - public: [[nodiscard]] auto match(cpp2::in> str) const& -> bool; +template class regular_expression { -#line 94 "regex.h2" - public: [[nodiscard]] auto match(cpp2::in> str, context& ctx) const& -> bool; + public: using Iter = view::const_iterator; + public: using context = match_context; -#line 101 "regex.h2" public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; - public: [[nodiscard]] auto search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool; -#line 116 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 117 "regex.h2" }; -/*regular_expression: @interface type = { - - match: (pos: size_t, inout ctx: Ctx) -> bool; -}*/ - -template class alternative_matcher_logic { - - private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; - -#line 136 "regex.h2" - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto invalidate_groups(auto& ctx) -> auto; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - - private: template [[nodiscard]] static auto alternate_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; - -#line 168 "regex.h2" - private: template static auto invalidate_all(auto& ctx) -> void; - -#line 176 "regex.h2" - private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; - public: alternative_matcher_logic() = default; - public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(alternative_matcher_logic const&) -> void = delete; - +class end_matcher_logic + { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] auto const& unnamed_param_5) -> bool; + public: end_matcher_logic() = default; + public: end_matcher_logic(end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(end_matcher_logic const&) -> void = delete; -#line 197 "regex.h2" -}; -template class any_matcher_logic - { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; - public: [[nodiscard]] static auto to_string() -> bstring; - public: any_matcher_logic() = default; - public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(any_matcher_logic const&) -> void = delete; - -#line 205 "regex.h2" }; template class char_matcher_logic { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; - public: [[nodiscard]] static auto to_string() -> bstring; + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] template_list const& unnamed_param_5) -> bool; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 213 "regex.h2" -}; - -template class single_class_entry - { - public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: single_class_entry() = default; - public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(single_class_entry const&) -> void = delete; - -#line 219 "regex.h2" -}; - -template class range_class_entry - { - public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: range_class_entry() = default; - public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(range_class_entry const&) -> void = delete; -#line 225 "regex.h2" -}; - -template class and_class_entry { - public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: and_class_entry() = default; - public: and_class_entry(and_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(and_class_entry const&) -> void = delete; - -#line 230 "regex.h2" -}; - -template class list_class_entry { - public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: list_class_entry() = default; - public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(list_class_entry const&) -> void = delete; - -#line 235 "regex.h2" -}; - -template class named_class_entry { - public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: named_class_entry() = default; - public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(named_class_entry const&) -> void = delete; - -#line 240 "regex.h2" -}; - -#line 243 "regex.h2" -// Named character classes. -template using digits_class = named_class_entry>; -template using lower_class = named_class_entry>; -template using upper_class = named_class_entry>; - -// Named classes. -template using alnum_class = named_class_entry,upper_class,digits_class>>; -template using alpha_class = named_class_entry,upper_class>>; -template using ascii_class = named_class_entry>; -template using blank_class = named_class_entry>; -template using cntrl_class = named_class_entry,single_class_entry>>; -template using graph_class = named_class_entry>; -template using print_class = named_class_entry>; -template using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; -template using space_class = named_class_entry>; -template using word_class = named_class_entry,single_class_entry>>; -template using xdigit_class = named_class_entry,range_class_entry,digits_class>>; - -template class class_matcher_logic - { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; - -#line 281 "regex.h2" - private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; - -#line 293 "regex.h2" - public: [[nodiscard]] static auto to_string() -> bstring; - public: class_matcher_logic() = default; - public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(class_matcher_logic const&) -> void = delete; - - -#line 303 "regex.h2" -}; - -#line 306 "regex.h2" -template class empty_matcher_logic - { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: empty_matcher_logic() = default; - public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(empty_matcher_logic const&) -> void = delete; - -#line 312 "regex.h2" -}; - -template class escaped_char_matcher_logic -: public char_matcher_logic { - - public: [[nodiscard]] static auto to_string() -> bstring; - public: escaped_char_matcher_logic() = default; - public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; - -#line 318 "regex.h2" -}; - -template class line_end_matcher_logic - { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto to_string() -> bstring; - public: line_end_matcher_logic() = default; - public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(line_end_matcher_logic const&) -> void = delete; - -#line 326 "regex.h2" -}; - -template class line_start_matcher_logic - { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: line_start_matcher_logic() = default; - public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(line_start_matcher_logic const&) -> void = delete; - -#line 334 "regex.h2" -}; - -class list_matcher_state: public std::vector { - -}; - -template class list_matcher_logic - { - - private: [[nodiscard]] static auto prepare_state(auto& ctx, cpp2::in init) -> auto; - -#line 354 "regex.h2" - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - - private: template static auto invalidate_all(auto& ctx) -> void; - -#line 367 "regex.h2" - private: template [[nodiscard]] static auto match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; - -#line 392 "regex.h2" - private: template [[nodiscard]] static auto rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return; - public: list_matcher_logic() = default; - public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(list_matcher_logic const&) -> void = delete; - - -#line 428 "regex.h2" -}; - -template class group_matcher_logic { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; - -#line 440 "regex.h2" - public: static auto invalidate_groups(auto& ctx) -> void; - - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; - -#line 451 "regex.h2" - public: [[nodiscard]] static auto to_string() -> bstring; - public: group_matcher_logic() = default; - public: group_matcher_logic(group_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(group_matcher_logic const&) -> void = delete; - - -#line 459 "regex.h2" -}; - -template class group_ref_matcher_logic { - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> auto; - public: static auto invalidate_groups(auto& ctx) -> void; - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> auto; - -#line 467 "regex.h2" - public: [[nodiscard]] static auto to_string() -> bstring; - public: group_ref_matcher_logic() = default; - public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(group_ref_matcher_logic const&) -> void = delete; - -#line 468 "regex.h2" -}; - -template class range_matcher_logic { - - // TODO: Add static assert on min_count and max_count. - - private: [[nodiscard]] static auto get_min_count() -> auto; - -#line 482 "regex.h2" - public: [[nodiscard]] static auto alternate_match(cpp2::in pos, auto& ctx) -> match_return; - -#line 502 "regex.h2" - public: static auto invalidate_groups(auto& ctx) -> void; - - public: [[nodiscard]] static auto match(cpp2::in pos, auto& ctx) -> match_return; - -#line 541 "regex.h2" - public: [[nodiscard]] static auto to_string() -> bstring; - public: range_matcher_logic() = default; - public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(range_matcher_logic const&) -> void = delete; - - -#line 559 "regex.h2" -}; - -template class special_range_matcher_logic: public range_matcher_logic { - -#line 564 "regex.h2" - public: [[nodiscard]] static auto to_string() -> bstring; - public: special_range_matcher_logic() = default; - public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(special_range_matcher_logic const&) -> void = delete; - -#line 565 "regex.h2" }; class regex_parser_state { @@ -501,20 +113,15 @@ class regex_parser_state { public: auto start_new_list() & -> void; -#line 577 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 582 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 586 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 593 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 597 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -523,205 +130,39 @@ template class regex_parser { private: int named_groups {1}; // Global capture group. - private: std::vector matcher_states {}; - private: Error_out error_out; - private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; - public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 616 "regex.h2" - public: [[nodiscard]] auto new_state() & -> regex_parser_state; - -#line 622 "regex.h2" - public: auto restore_state(cpp2::in old_state) & -> void; - -#line 626 "regex.h2" - private: [[nodiscard]] auto push_matcher_state(cpp2::in t) & -> int; + public: auto parse_until(cpp2::in term) & -> void; -#line 632 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 644 "regex.h2" - private: [[nodiscard]] auto create_matcher_from_list(cpp2::in> list) & -> std::string; - -#line 655 "regex.h2" - public: [[nodiscard]] auto create_matcher_state() const& -> std::string; - -#line 660 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 683 "regex.h2" - public: auto error(cpp2::in message) & -> void; - -#line 687 "regex.h2" - public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; - -#line 694 "regex.h2" - public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; - -#line 708 "regex.h2" - public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; - -#line 716 "regex.h2" - public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; - -#line 811 "regex.h2" - public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; - -#line 846 "regex.h2" - public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; - -#line 865 "regex.h2" - public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; - -#line 874 "regex.h2" - public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; - -#line 917 "regex.h2" - public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; - -#line 943 "regex.h2" - public: auto parse_until(cpp2::in term) & -> void; - -#line 964 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 973 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 982 "regex.h2" } } - -//=== Cpp2 function definitions ================================================= - -#line 1 "regex.h2" - -#line 13 "regex.h2" namespace cpp2 { namespace regex { -#line 27 "regex.h2" - [[nodiscard]] auto match_return::create(cpp2::in m, cpp2::in l) -> match_return{ - if (m) { - return { true, l }; - } - else { - return { false, 0 }; - } - } - -#line 45 "regex.h2" - template match_context::match_context() - : str{ "" }{// TODO: How to delegate??? - -#line 47 "regex.h2" - CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); - } - template match_context::match_context(view const& s) - : str{ s }{ - -#line 51 "regex.h2" - CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); - } -#line 49 "regex.h2" - template auto match_context::operator=(view const& s) -> match_context& { - str = s; - ranges = {}; - groups = {}; - state = {}; - -#line 51 "regex.h2" - CPP2_UFCS(fill)(ranges, std::make_pair(bstring::npos, bstring::npos)); - return *this; -#line 52 "regex.h2" - } - - template match_context::match_context(match_context const& that) - : str{ that.str } - , ranges{ that.ranges } - , groups{ that.groups } - , state{ that.state }{} -#line 54 "regex.h2" - template auto match_context::operator=(match_context const& that) -> match_context& { - str = that.str; - ranges = that.ranges; - groups = that.groups; - state = that.state; - return *this; } -#line 54 "regex.h2" - template match_context::match_context(match_context&& that) noexcept - : str{ std::move(that).str } - , ranges{ std::move(that).ranges } - , groups{ std::move(that).groups } - , state{ std::move(that).state }{} -#line 54 "regex.h2" - template auto match_context::operator=(match_context&& that) noexcept -> match_context& { - str = std::move(that).str; - ranges = std::move(that).ranges; - groups = std::move(that).groups; - state = std::move(that).state; - return *this; } - -#line 56 "regex.h2" - template auto match_context::invalidate_group(cpp2::in group) & -> void{ - CPP2_ASSERT_IN_BOUNDS(ranges, group) = { bstring::npos, bstring::npos }; - CPP2_ASSERT_IN_BOUNDS(groups, group) = { }; - } + template template [[nodiscard]] auto match_context::get_group() & -> auto { return &groups[pos]; } - template auto match_context::set_group(cpp2::in group, cpp2::in pos, cpp2::in length) & -> void{ - CPP2_ASSERT_IN_BOUNDS(ranges, group) = { pos, pos + length }; - CPP2_ASSERT_IN_BOUNDS(groups, group) = CPP2_UFCS(substr)(str, pos, pos + length); - } - - template [[nodiscard]] auto match_context::print_ranges() const& -> bstring{ - bstring r {""}; - for ( auto const& cur : ranges ) { - if (cur.first != bstring::npos) { - r += "(" + cpp2::to_string(cur.first) + "," + cpp2::to_string(cur.second) + ")"; - } - else { - r += "(?,?)"; - } - } - - return r; - } - - template template [[nodiscard]] auto match_context::get_state() & -> auto { return &std::get(state); } - -#line 87 "regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> bool{ - context ctx {str}; // TODO: Wrong error about not initialized. - auto r {match(str, ctx)}; - static_cast(std::move(ctx)); - return r; - } - - template [[nodiscard]] auto regular_expression::match(cpp2::in> str, context& ctx) const& -> bool{// TODO: Could call method with out parameter. - ctx = { str }; - auto r {Matcher::match(0, ctx)}; - - return std::move(r).matched && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).first == 0 && CPP2_ASSERT_IN_BOUNDS(ctx.ranges, 0).second == CPP2_UFCS(size)(str); - } - - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool { return search(str, 0, ctx); } - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, cpp2::in start, context& ctx) const& -> bool{ - ctx = { str }; - - // TODO: Improve find logic. (E.g. skip more elements on failure.) - auto cur {start}; - for( ; cpp2::cmp_less_eq(cur,CPP2_UFCS(size)(str)); (cur += 1) ) { - if (Matcher::match(cur, ctx).matched) { + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ + auto cur {CPP2_UFCS(begin)(str)}; + auto end {str.end()}; + for( ; cur!=end; (++cur) ) { + if (Matcher::match(cur, cur, end, ctx, template_list())) { return true; } } @@ -729,392 +170,20 @@ namespace regex { return false; } - template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } - -#line 126 "regex.h2" - template [[nodiscard]] auto alternative_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; - - if (init) { - *cpp2::assert_not_null(state) = 0; - } - - return state; - } - - template [[nodiscard]] auto alternative_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return alternate_all(pos, ctx, prepare_state(ctx, false)); } - template [[nodiscard]] auto alternative_matcher_logic::invalidate_groups(auto& ctx) -> auto { return invalidate_all(ctx); } - template [[nodiscard]] auto alternative_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx, prepare_state(ctx, true)); } - template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)(((bstring() + ... + ("|" + List::to_string()))), 1); }// substr: Remove first '|'. - - template template [[nodiscard]] auto alternative_matcher_logic::alternate_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ - auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; - - match_return r {false, 0}; - if (*cpp2::assert_not_null(state) == entry_pos) { - // Current state is the same element. Try an alternative match. - r = First::alternate_match(pos, ctx); - - if (!(r.matched)) { - First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. - } - } - else {if (cpp2::cmp_less((cpp2::as_(*cpp2::assert_not_null(state))),entry_pos)) { - // Previous alternative has not match. Try the next one. - *cpp2::assert_not_null(state) = entry_pos; - r = First::match(pos, ctx); - }} - - if (!(r.matched)) { - if constexpr (0 != sizeof...(Other)) { - r = alternate_all(pos, ctx, state); - } - } - - return r; - } - - template template auto alternative_matcher_logic::invalidate_all(auto& ctx) -> void{ - First::invalidate_groups(ctx); - - if constexpr (0 != sizeof...(Other)) { - invalidate_all(ctx); - } - } - - template template [[nodiscard]] auto alternative_matcher_logic::match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ - auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; - - match_return r {First::match(pos, ctx)}; - - if (r.matched) { - *cpp2::assert_not_null(state) = entry_pos; - return r; - } - else { - First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. - - if constexpr (0 != sizeof...(Other)) { - return match_all(pos + std::move(r).length, ctx, state); - } - else { - *cpp2::assert_not_null(state) = sizeof...(List); - return { false, 0 }; - } - } - } - -#line 201 "regex.h2" - template [[nodiscard]] auto any_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template auto any_matcher_logic::invalidate_groups(auto& ctx) -> void{} - template [[nodiscard]] auto any_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)), 1); } - template [[nodiscard]] auto any_matcher_logic::to_string() -> bstring { return bstring(1, '.'); } - -#line 209 "regex.h2" - template [[nodiscard]] auto char_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template auto char_matcher_logic::invalidate_groups(auto& ctx) -> void{} - template [[nodiscard]] auto char_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return { return match_return::create(cpp2::cmp_less(pos,CPP2_UFCS(size)(ctx.str)) && CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == C, 1); } - template [[nodiscard]] auto char_matcher_logic::to_string() -> bstring { return bstring(1, C); } - -#line 217 "regex.h2" - template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } - template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } - -#line 223 "regex.h2" - template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } - template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } - -#line 228 "regex.h2" - template [[nodiscard]] auto and_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } - template [[nodiscard]] auto and_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } - -#line 233 "regex.h2" - template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c)); } - template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } - -#line 238 "regex.h2" - template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } - template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } - -#line 263 "regex.h2" - template [[nodiscard]] auto class_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template auto class_matcher_logic::invalidate_groups(auto& ctx) -> void{} - - template [[nodiscard]] auto class_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ - if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(ctx.str))) { - return match_return(false, 0); - } - - CharT c {CPP2_ASSERT_IN_BOUNDS(ctx.str, pos)}; - bool r {match_any(std::move(c))}; + template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } - if (negate) { - r = !(r); - } - - return match_return::create(std::move(r), 1); - } - - template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ - bool r {First::includes(c)}; - - if (!(r)) { - if constexpr (0 != sizeof...(Other)) { - r = match_any(c); - } - } - - return r; - } - - template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ - bstring r {"["}; - if (negate) { - r += "^"; - } - r += (bstring() + ... + List::to_string()); - r += "]"; - - return r; - } - -#line 308 "regex.h2" - template [[nodiscard]] auto empty_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template auto empty_matcher_logic::invalidate_groups(auto& ctx) -> void{} - template [[nodiscard]] auto empty_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return(true, 0); } - template [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); } - -#line 317 "regex.h2" - template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> bstring { return "\\" + cpp2::to_string(C); } - -#line 322 "regex.h2" - template [[nodiscard]] auto line_end_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template auto line_end_matcher_logic::invalidate_groups(auto& ctx) -> void{} - template [[nodiscard]] auto line_end_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == CPP2_UFCS(size)(ctx.str) || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos) == '\n', 0); }// TODO: Extend to other line feeds. - template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } - -#line 330 "regex.h2" - template [[nodiscard]] auto line_start_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template auto line_start_matcher_logic::invalidate_groups(auto& ctx) -> void{} - template [[nodiscard]] auto line_start_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_return::create(pos == 0 || CPP2_ASSERT_IN_BOUNDS(ctx.str, pos - 1) == '\n', 0); }// TODO: Extend to other line feeds. - template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } - -#line 343 "regex.h2" - template [[nodiscard]] auto list_matcher_logic::prepare_state(auto& ctx, cpp2::in init) -> auto{ - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; - - if (init) { - CPP2_UFCS(clear)((*cpp2::assert_not_null(state))); - CPP2_UFCS(resize)((*cpp2::assert_not_null(state)), sizeof...(List)); - } - - return state; - } - - template [[nodiscard]] auto list_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return rematch_all(pos, ctx, prepare_state(ctx, false)); } - template auto list_matcher_logic::invalidate_groups(auto& ctx) -> void { invalidate_all(ctx); } - template [[nodiscard]] auto list_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { return match_all(pos, ctx, prepare_state(ctx, true)); } - template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return (bstring() + ... + List::to_string()); } - - template template auto list_matcher_logic::invalidate_all(auto& ctx) -> void{ - First::invalidate_groups(ctx); - - if constexpr (0 != sizeof...(Other)) { - invalidate_all(ctx); - } - } - - template template [[nodiscard]] auto list_matcher_logic::match_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ - auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; - match_return r {First::match(pos, ctx)}; - - if (r.matched) { - CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos) = pos; - - if constexpr (0 != sizeof...(Other)) { - while( r.matched ) { - match_return o {match_all(pos + r.length, ctx, state)}; - - if (o.matched) { - r.length += o.length; - break; - } - else { - r = First::alternate_match(pos, ctx); - } - } - } - } - - return r; - } - - template template [[nodiscard]] auto list_matcher_logic::rematch_all(cpp2::in pos, auto& ctx, auto const& state) -> match_return{ - auto constexpr entry_pos = sizeof...(List) - sizeof...(Other) - 1; - - match_return r {false, 0}; - auto length {0}; - if constexpr (0 != sizeof...(Other)) { - r = rematch_all(CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos + 1), ctx, state); - length = CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos + 1) - CPP2_ASSERT_IN_BOUNDS((*cpp2::assert_not_null(state)), entry_pos); - }else { - r = { false, 0 };// Default fails. This triggers the alternate on the last element. - } - - if (!(r.matched)) { - r = First::alternate_match(pos, ctx); - - if constexpr (0 != sizeof...(Other)) { - while( r.matched ) { - match_return o {match_all(pos + r.length, ctx, state)}; - - if (o.matched) { - r.length += o.length; - break; - } - else { - r = First::alternate_match(pos, ctx); - } - } - } - } - else { - // Adjust total match length of the list. - r.length += std::move(length); - } - - return r; - } - -#line 431 "regex.h2" - template [[nodiscard]] auto group_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {M::alternate_match(pos, ctx)}; - - if (r.matched) { - CPP2_UFCS(set_group)(ctx, group, pos, r.length); - } - return r; - } - - template auto group_matcher_logic::invalidate_groups(auto& ctx) -> void { CPP2_UFCS(invalidate_group)(ctx, group); } - - template [[nodiscard]] auto group_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {M::match(pos, ctx)}; - - if (r.matched) { - CPP2_UFCS(set_group)(ctx, group, pos, r.length); - } - return r; - } - - template [[nodiscard]] auto group_matcher_logic::to_string() -> bstring{ - if (group == 0) { - return M::to_string(); - } - else { - return "(" + cpp2::to_string(M::to_string()) + ")"; - } - } - -#line 462 "regex.h2" - template [[nodiscard]] auto group_ref_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> auto { return match_return(false, 0); } - template auto group_ref_matcher_logic::invalidate_groups(auto& ctx) -> void{} - template [[nodiscard]] auto group_ref_matcher_logic::match(cpp2::in pos, auto& ctx) -> auto { - return match_return::create(CPP2_UFCS(starts_with)(CPP2_UFCS(substr)(ctx.str, pos), CPP2_ASSERT_IN_BOUNDS(ctx.groups, group)), CPP2_UFCS(size)(CPP2_ASSERT_IN_BOUNDS(ctx.groups, group))); } - - template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } - -#line 474 "regex.h2" - template [[nodiscard]] auto range_matcher_logic::get_min_count() -> auto{ - if constexpr (min_count == -1) { - return 0; - }else { - return min_count; - } + template [[nodiscard]] auto end_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] auto const& unnamed_param_5) -> bool{ + return true; } - template [[nodiscard]] auto range_matcher_logic::alternate_match(cpp2::in pos, auto& ctx) -> match_return{ - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; - - if (!(CPP2_UFCS(empty)((*cpp2::assert_not_null(state))))) { - auto length {CPP2_UFCS(back)((*cpp2::assert_not_null(state)))}; - CPP2_UFCS(pop_back)((*cpp2::assert_not_null(state))); - - auto valid {cpp2::cmp_greater_eq(CPP2_UFCS(ssize)((*cpp2::assert_not_null(state))),get_min_count())}; - if (!(valid) || CPP2_UFCS(empty)((*cpp2::assert_not_null(state)))) { - M::invalidate_groups(ctx); - }else { - static_cast(M::match(pos + CPP2_UFCS(back)((*cpp2::assert_not_null(std::move(state)))), ctx));// Repopulate the ranges. - } - - return match_return::create(std::move(valid), std::move(length)); + template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] template_list const& unnamed_param_5) -> bool{ + if (cur!=end && *cur==C) { + return First::match(begin, cur + 1, end, ctx, template_list()); }else { - return match_return(false, 0); - } - } - - template auto range_matcher_logic::invalidate_groups(auto& ctx) -> void { M::invalidate_groups(ctx); } - - template [[nodiscard]] auto range_matcher_logic::match(cpp2::in pos, auto& ctx) -> match_return{ - match_return r {true, 0}; - match_return o {true, 0}; - - auto state {CPP2_UFCS_TEMPLATE(get_state)(ctx)}; - CPP2_UFCS(clear)((*cpp2::assert_not_null(state))); - - int count {0}; - - o = M::match(pos, ctx); - auto ctx_copy {ctx}; - for( ; (o.matched && cpp2::cmp_less(count,max_count)); o = M::match(pos + r.length, ctx_copy) ) { - - // Stop for empty matches. - if (o.length == 0 && cpp2::cmp_greater_eq(count,get_min_count())) { - break; + return false; } - - ctx = ctx_copy; - - CPP2_UFCS(push_back)((*cpp2::assert_not_null(state)), r.length); - r.length += o.length; - count += 1; - - ctx_copy = ctx; // For context. TODO: Separate context and state. - } - - static_cast(std::move(state)); - auto valid {cpp2::cmp_greater_eq(std::move(count),get_min_count())}; - - // If we do not reach the minimal count invalidate all groups. - if (!(valid)) { - M::invalidate_groups(ctx); - } - return match_return::create(std::move(valid), std::move(r).length); } - template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ - std::string r {M::to_string()}; - - if (min_count == max_count) { - r += "{" + cpp2::to_string(min_count) + "}"; - } - else {if (min_count == -1) { - r += "{," + cpp2::to_string(max_count) + "}"; - } - else {if (max_count == std::numeric_limits::max()) { - r += "{" + cpp2::to_string(min_count) + ",}"; - } - else { - r += "{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"; - }}} - - return r; - } - -#line 564 "regex.h2" - template [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring { return M::to_string() + symbol; } - -#line 571 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -1139,28 +208,31 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 611 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 614 "regex.h2" } - template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ - regex_parser_state old_state {}; - CPP2_UFCS(swap)(old_state, cur_state); - return old_state; - } + template auto regex_parser::parse_until(cpp2::in term) & -> void{ + for( ; pos!=CPP2_UFCS(size)(regex); pos += 1 ) { + char c {regex[pos]}; - template auto regex_parser::restore_state(cpp2::in old_state) & -> void{ - cur_state = old_state; - } + if (c==term) {return ; } + + // if is_alternative(c) { continue; } + // if is_any(c) { continue; } + // if is_class(c) { continue; } + // if is_escape(c) { continue; } + // if is_anchor(c) { continue; } + // if is_group(c) { continue; } + // if is_handle_special(c) { continue; } + // if is_range(c) { continue; } + // if is_special_range(c) { continue; } - template [[nodiscard]] auto regex_parser::push_matcher_state(cpp2::in t) & -> int{ - auto id {CPP2_UFCS(ssize)(matcher_states)}; - CPP2_UFCS(push_back)(matcher_states, t); - return id; + // No special char push a character match + CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); + } } template [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ @@ -1175,324 +247,8 @@ namespace regex { return r; } - template [[nodiscard]] auto regex_parser::create_matcher_from_list(cpp2::in> list) & -> std::string{ - if (CPP2_UFCS(empty)(list)) {return "::cpp2::regex::empty_matcher_logic"; } - - auto state_index {push_matcher_state("::cpp2::regex::list_matcher_state")}; - std::string matcher {"::cpp2::regex::list_matcher_logic [[nodiscard]] auto regex_parser::create_matcher_state() const& -> std::string{ - auto inner {join(matcher_states)}; - return "std::tuple<" + cpp2::to_string(std::move(inner)) + ">"; - } - template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ - // Early out for no alternatives - if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } - - auto state_index {push_matcher_state("int")}; - std::string matcher {"::cpp2::regex::alternative_matcher_logic void{ - *cpp2::assert_not_null(_1) += *cpp2::assert_not_null(_2) + create_matcher_from_list(list); - *cpp2::assert_not_null(_2) = ", "; - }}; - - auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; - for( ; cur != CPP2_UFCS(rend)(cur_state.alternate_match_lists); (++cur) ) { - add(*cpp2::assert_not_null(cur)); - } - if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {std::move(add)(cur_state.cur_match_list); } - matcher += ">"; - - return matcher; - } - - template auto regex_parser::error(cpp2::in message) & -> void{ - error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)); - } - - template [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{ - if (c != '|') {return false; } - - CPP2_UFCS(start_new_list)(cur_state); - return true; - } - - template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ - auto r {false}; - if (c == '^') { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_start_matcher_logic"); - r = true; - } - else {if (c == '$') { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); - r = true; - }} - - return r; - } - - template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ - if (c == '.') { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::any_matcher_logic"); - return true; - } - return false; - } - - template [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{ - if (c != '[') {return false; } - - std::vector classes {}; - - char c_cur {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; - auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{ - *cpp2::assert_not_null(_1) += 1; - if (cpp2::cmp_greater_eq(*cpp2::assert_not_null(_1),CPP2_UFCS(size)(_3))) {return false; } - - *cpp2::assert_not_null(_4) = CPP2_ASSERT_IN_BOUNDS(_3, *cpp2::assert_not_null(_1)); - return true; - - }}; - - auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{ - if (cpp2::cmp_greater_eq((_1 + 1),CPP2_UFCS(size)(_2))) {return '\0'; } - else {return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); } - }}; - - auto negate {false}; - - auto first {true}; - auto range {false}; - while( next_item() & (c_cur != ']' || first) ) { - if (c_cur == '^') { - negate = true; - continue; // Skip rest of the loop. Also the first update. - } - if (c_cur == '[' && peek_item() == ':') { - // We have a character class. - pos += 2; // Skip ':]' - - auto end {CPP2_UFCS(find)(regex, ":]", pos)}; - if (end == std::string::npos) {error_out("Could not find end of character class."); } - - auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; - if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) { - error_out("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))); - } - - CPP2_UFCS(push_back)(classes, "[:" + cpp2::to_string(name) + ":]"); - - end += 1; // Skip ':' pointing to the ending ']'. - pos = end; - - } - else {if (c_cur == '-') { - if (first) {// Literal if first entry. - CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); - }else { - range = true; - } - } - else { - if (range) {// Modify last element to be a range. - CPP2_UFCS(back)(classes) += "-" + cpp2::to_string(c_cur); - range = false; - } - else { - CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); - } - }} - - first = false; - } - - static_cast(std::move(next_item));// TODO: Use in while is not recognized. - - if (std::move(c_cur) != ']') { - error_out("Error end of character class definition before terminating ']'."); - } - - if (std::move(range)) {// If '-' is last entry treat it as a literal char. - CPP2_UFCS(push_back)(classes, "-"); - } - - for ( auto& cur : classes ) { - if (CPP2_UFCS(starts_with)(cur, "[:")) { - auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; - cur = "::cpp2::regex::" + cpp2::to_string(name) + "_class"; - } - else {if (1 != CPP2_UFCS(size)(cur)) { - cur = "::cpp2::regex::range_class_entry"; - } - else { - cur = "::cpp2::regex::single_class_entry"; - }} - } - - auto inner {join(std::move(classes))}; - CPP2_UFCS(add)(cur_state, "::cpp2::regex::class_matcher_logic"); - return true; - } - - template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ - if (c != '\\') {return false; } - - pos += 1; - - if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); } - - char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; - - if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) { - int group_id {c_next - '0'}; - - if (cpp2::cmp_greater_eq(group_id,named_groups)) {error("Group reference is used before the group is declared."); } - - CPP2_UFCS(add)(cur_state, "::cpp2::regex::group_ref_matcher_logic"); - } - else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) { - if (c_next == '$') { - // TODO: Provide proper escape for cppfront capture . - CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); - } - else { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::escaped_char_matcher_logic"); - } - } - else {if ('\\' == std::move(c_next)) { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::escaped_char_matcher_logic"); - } - else { - error("Unknown escape."); - }}} - - return true; - } - - template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ - if (c != '(') {return false; } - - auto group_number {named_groups}; - named_groups += 1; - - auto old_state {new_state()}; - - pos += 1; // Skip the '(' - parse_until(')'); - - auto inner {create_matcher_from_state()}; - restore_state(std::move(old_state)); - - CPP2_UFCS(add)(cur_state, "::cpp2::regex::group_matcher_logic"); - - return true; - } - - template [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{ - if (c == '\'') { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); - return true; - } - - return false; - } - - template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ - - if (c != '{') {return false; } - if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element."); } - - size_t end {CPP2_UFCS(find)(regex, "}", pos)}; - if (end == std::string::npos) {error("Missing closing bracket."); } - - std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; - if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } - - std::string min_count {"-1"}; - std::string max_count {"std::numeric_limits::max()"}; - - size_t sep {CPP2_UFCS(find)(inner, ",")}; - if (sep == std::string::npos) { - min_count = inner; - max_count = inner; - } - else { - std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; - std::string inner_last {trim_copy(CPP2_UFCS(substr)(inner, std::move(sep) + 1))}; - - if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) { - error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); - } - - if (!(CPP2_UFCS(empty)(inner_first))) { - min_count = std::move(inner_first); - } - if (!(CPP2_UFCS(empty)(inner_last))) { - max_count = std::move(inner_last); - } - } - - // TODO: Check 0 <=n <= m - auto matcher_state {push_matcher_state("std::vector")}; - CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); - pos = std::move(end); - - return true; - } - - template [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{ - std::string min_range {"0"}; - std::string max_range {"std::numeric_limits::max()"}; - if (c == '*') { - min_range = "0"; - } - else {if (c == '+') { - min_range = "1"; - } - else {if (c == '?') { - min_range = "0"; - max_range = "1"; - } - else { - return false; - }}} - - if (CPP2_UFCS(empty)(cur_state)) { - error("'" + cpp2::to_string(c) + "' without previous element."); - } - - auto matcher_state {push_matcher_state("std::vector")}; - CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); - return true; - } - - template auto regex_parser::parse_until(cpp2::in term) & -> void{ - for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) { - char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; - - if (c == term) {return ; } - - if (is_alternative(c)) {continue; } - if (is_any(c)) {continue; } - if (is_class(c)) {continue; } - if (is_escape(c)) {continue; } - if (is_anchor(c)) {continue; } - if (is_group(c)) {continue; } - if (is_handle_special(c)) {continue; } - if (is_range(c)) {continue; } - if (is_special_range(c)) {continue; } - - // No special char push a character match - CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); - } + return join(cur_state.cur_match_list); } template [[nodiscard]] auto regex_parser::parse() & -> std::string{ @@ -1500,11 +256,9 @@ namespace regex { parse_until('\0'); auto inner {create_matcher_from_state()}; - auto matcher_state {create_matcher_state()}; - return "::cpp2::regex::regular_expression, " + cpp2::to_string(std::move(matcher_state)) + ", " + cpp2::to_string(named_groups) + ">"; + return "::cpp2::regex::regular_expression"; } -#line 975 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index fd93dc6c32..76faf9dfa4 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -17,101 +17,32 @@ regex: namespace = { view: type == std::basic_string_view; bstring: type == std::basic_string; -list_end: type = {} +match_group: @struct type = { + start: Iter = (); + end: Iter = (); -match_return: @struct type = -{ matched: bool = false; - length: size_t = 0; - - create: (m: bool, l: size_t) -> match_return = { - if m { - return (true, l); - } - else { - return (false, 0); - } - } } -match_context: type = +match_context: type = { - public str: view; - public ranges: std::array, max_groups> = (); - public groups: std::array, max_groups> = (); - - public state: State = (); - - operator=: (out this) = { // TODO: How to delegate??? - str = ""; - ranges.fill(std::make_pair(bstring::npos, bstring::npos)); - } - operator=: (out this, s: view) = { - str = s; - ranges.fill(std::make_pair(bstring::npos, bstring::npos)); - } - - operator=: (out this, that) = {} - - reset: (inout this, s: view) = { - str = s; - groups.fill(view()); - ranges.fill(std::make_pair(bstring::npos, bstring::npos)); - } - - invalidate_group: (inout this, group: size_t) = { - ranges[group] = (bstring::npos, bstring::npos); - groups[group] = (); - } + public groups: std::array, max_groups> = (); - set_group: (inout this, group: size_t, pos: size_t, length: size_t) = { - ranges[group] = (pos, pos + length); - groups[group] = str.substr(pos, pos + length); - } - - print_ranges: (in this) -> bstring = { - r: bstring = ""; - for ranges do (cur) { - if cur.first != bstring::npos { - r += "((cur.first)$,(cur.second)$)"; - } - else { - r += "(?,?)"; - } - } - - return r; - } - - get_state: (inout this) -> _ = std::get(state)&; + get_group: (inout this) groups[pos]&; } -regular_expression: type = { - - context: type == match_context; +template_list: type = {} - match: (in this, str: view) -> bool = { - ctx: context = (str); // TODO: Wrong error about not initialized. - r := match(str, ctx); - _ = ctx; - return r; - } - - match: (in this, str: view, inout ctx: context) -> bool = { // TODO: Could call method with out parameter. - ctx = (str); - r := Matcher::match(0, ctx); +regular_expression: type = { - return r.matched && ctx.ranges[0].first == 0 && ctx.ranges[0].second == str.size(); - } - - search: (in this, str: view, inout ctx: context) -> bool = search(str, 0, ctx); - search: (in this, str: view, start: size_t, inout ctx: context) -> bool = { - ctx.reset(str); + Iter: type == view::const_iterator; + context: type == match_context; - // TODO: Improve find logic. (E.g. skip more elements on failure.) - cur := start; - while cur <= str.size() next (cur += 1) { - if Matcher::match(cur, ctx).matched { + search: (in this, str: view, inout ctx: context) -> bool = { + cur := str.begin(); + end := str.end(); + while cur != end next (cur++) { + if Matcher::match(cur, cur, end, ctx, template_list()) { return true; } } @@ -122,454 +53,24 @@ regular_expression: type = { to_string: (in this) -> _ = Matcher::to_string(); } -/*regular_expression: @interface type = { - - match: (pos: size_t, inout ctx: Ctx) -> bool; -}*/ - -alternative_matcher_logic: type = { - - private prepare_state: (inout ctx, init: bool) -> _ = { - state := ctx.get_state(); - - if init { - state* = 0; - } - - return state; - } - - alternate_match: (pos: size_t, inout ctx) alternate_all(pos, ctx, prepare_state(ctx, false)); - invalidate_groups: (inout ctx) invalidate_all(ctx); - match: (pos: size_t, inout ctx) -> _ = match_all(pos, ctx, prepare_state(ctx, true)); - to_string: () -> _ = ((bstring() + ... + ("|" + List::to_string()))).substr(1); // substr: Remove first '|'. - - private alternate_all: (pos: size_t, inout ctx, state) -> match_return = { - entry_pos :== sizeof...(List) - sizeof...(Other) - 1; - - r: match_return = (false, 0); - if state* == entry_pos { - // Current state is the same element. Try an alternative match. - r = First::alternate_match(pos, ctx); - - if !r.matched { - First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. - } - } - else if (state* as size_t) < entry_pos { - // Previous alternative has not match. Try the next one. - state* = entry_pos; - r = First::match(pos, ctx); - } - - if !r.matched { - if constexpr 0 != sizeof...(Other) { - r = alternate_all(pos, ctx, state); - } - } - - return r; - } - - private invalidate_all: (inout ctx) = { - First::invalidate_groups(ctx); - - if constexpr 0 != sizeof...(Other) { - invalidate_all(ctx); - } - } - - private match_all: (pos: size_t, inout ctx, state) -> match_return = { - entry_pos :== sizeof...(List) - sizeof...(Other) - 1; - - r: match_return = First::match(pos, ctx); - - if r.matched { - state* = entry_pos; - return r; - } - else { - First::invalidate_groups(ctx); // Did not match we need to remove matched ranges. - - if constexpr 0 != sizeof...(Other) { - return match_all(pos + r.length, ctx, state); - } - else { - state* = sizeof...(List); - return (false, 0); - } - } - } -} - -any_matcher_logic: type = -{ - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - invalidate_groups: (inout ctx) = {} - match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size(), 1); - to_string: () -> bstring = bstring(1, '.'); -} - -char_matcher_logic: type = -{ - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - invalidate_groups: (inout ctx) = {} - match: (pos: size_t, inout ctx: _) -> match_return = match_return::create(pos < ctx.str.size() && ctx.str[pos] == C, 1); - to_string: () -> bstring = bstring(1, C); -} - -single_class_entry: type = +end_matcher_logic: type = { - includes: (c: CharT) -> _ = c == C; - to_string: () -> _ = bstring(1, C); -} - -range_class_entry: type = -{ - includes: (c: CharT) -> _ = Start <= c <= End; - to_string: () -> _ = "(Start)$-(End)$"; -} - -and_class_entry: type = { - includes: (c: CharT) (false || ... || List::includes(c)); - to_string: () ("" + ... + List::to_string()); -} - -list_class_entry: type = { - includes: (c: CharT) (false || ... || (List == c)); - to_string: () ("" + ... + List); -} - -named_class_entry: type = { - includes: (c: CharT) Inner::includes(c); - to_string: () "[:(Name.data())$:]"; -} - - -// Named character classes. -digits_class : type == named_class_entry>; -lower_class : type == named_class_entry>; -upper_class : type == named_class_entry>; - -// Named classes. -alnum_class : type == named_class_entry, upper_class, digits_class>>; -alpha_class : type == named_class_entry, upper_class>>; -ascii_class : type == named_class_entry>; -blank_class : type == named_class_entry>; -cntrl_class : type == named_class_entry, single_class_entry>>; -graph_class : type == named_class_entry>; -print_class : type == named_class_entry>; -punct_class : type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; -space_class : type == named_class_entry>; -word_class : type == named_class_entry, single_class_entry>>; -xdigit_class : type == named_class_entry, range_class_entry, digits_class>>; - -class_matcher_logic: type = -{ - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - invalidate_groups: (inout ctx) = {} - - match: (pos: size_t, inout ctx: _) -> match_return = { - if pos >= ctx.str.size() { - return match_return(false, 0); - } - - c: CharT = ctx.str[pos]; - r: bool = match_any(c); - - if negate { - r = !r; - } - - return match_return::create(r, 1); - } - - private match_any: (c: CharT) -> bool = { - r: bool = First::includes(c); - - if !r { - if constexpr 0 != sizeof...(Other) { - r = match_any(c); - } - } - - return r; - } - - to_string: () -> bstring = { - r: bstring = "["; - if negate { - r += "^"; - } - r += (bstring() + ... + List::to_string()); - r += "]"; - - return r; + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _) -> bool = { + return true; } } - -empty_matcher_logic: type = -{ - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - invalidate_groups: (inout ctx) = {} - match: (pos: size_t, inout ctx: _) match_return(true, 0); - to_string: () bstring(); -} - -escaped_char_matcher_logic: type = -{ - this : char_matcher_logic = (); - to_string: () -> bstring = "\\(C)$"; -} - -line_end_matcher_logic: type = -{ - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - invalidate_groups: (inout ctx) = {} - match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == ctx.str.size() || ctx.str[pos] == '\n', 0); // TODO: Extend to other line feeds. - to_string: () -> bstring = "\\$"; -} - -line_start_matcher_logic: type = -{ - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - invalidate_groups: (inout ctx) = {} - match: (pos: size_t, inout ctx) -> _ = match_return::create(pos == 0 || ctx.str[pos - 1] == '\n', 0); // TODO: Extend to other line feeds. - to_string: () -> _ = bstring(1, '^'); -} - -list_matcher_state: @struct type = { - this: std::vector = 0; -} - -list_matcher_logic: type = +char_matcher_logic: type = { - - private prepare_state: (inout ctx, init: bool) -> _ = { - state := ctx.get_state(); - - if init { - state*.clear(); - state*.resize(sizeof...(List)); - } - - return state; - } - - alternate_match: (pos: size_t, inout ctx) rematch_all(pos, ctx, prepare_state(ctx, false)); - invalidate_groups: (inout ctx) = invalidate_all(ctx); - match: (pos: size_t, inout ctx: _) match_all(pos, ctx, prepare_state(ctx, true)); - to_string: () -> _ = (bstring() + ... + List::to_string()); - - private invalidate_all: (inout ctx) = { - First::invalidate_groups(ctx); - - if constexpr 0 != sizeof...(Other) { - invalidate_all(ctx); - } - } - - private match_all: (pos: size_t, inout ctx, state) -> match_return = { - entry_pos :== sizeof...(List) - sizeof...(Other) - 1; - r: match_return = First::match(pos, ctx); - - if r.matched { - state*[entry_pos] = pos; - - if constexpr 0 != sizeof...(Other) { - while r.matched { - o: match_return = match_all(pos + r.length, ctx, state); - - if o.matched { - r.length += o.length; - break; - } - else { - r = First::alternate_match(pos, ctx); - } - } - } - } - - return r; - } - - private rematch_all: (pos: size_t, inout ctx, state) -> match_return = { - entry_pos :== sizeof...(List) - sizeof...(Other) - 1; - - r: match_return = (false, 0); - length: = 0; - if constexpr 0 != sizeof...(Other) { - r = rematch_all(state*[entry_pos + 1], ctx, state); - length = state*[entry_pos + 1] - state*[entry_pos]; - } else { - r = (false, 0); // Default fails. This triggers the alternate on the last element. - } - - if !r.matched { - r = First::alternate_match(pos, ctx); - - if constexpr 0 != sizeof...(Other) { - while r.matched { - o: match_return = match_all(pos + r.length, ctx, state); - - if o.matched { - r.length += o.length; - break; - } - else { - r = First::alternate_match(pos, ctx); - } - } - } - } - else { - // Adjust total match length of the list. - r.length += length; - } - - return r; - } -} - -group_matcher_logic: type = { - alternate_match: (pos: size_t, inout ctx) -> match_return = { - r: match_return = M::alternate_match(pos, ctx); - - if r.matched { - ctx.set_group(group, pos, r.length); - } - return r; - } - - invalidate_groups: (inout ctx) = ctx.invalidate_group(group); - - match: (pos: size_t, inout ctx: _) -> match_return = { - r: match_return = M::match(pos, ctx); - - if r.matched { - ctx.set_group(group, pos, r.length); - } - return r; - } - - to_string: () -> bstring = { - if group == 0 { - return M::to_string(); - } - else { - return "((M::to_string())$)"; - } - } -} - -group_ref_matcher_logic: type = { - alternate_match: (pos: size_t, inout ctx) match_return(false, 0); - invalidate_groups: (inout ctx) = {} - match: (pos: size_t, inout ctx: _) -> _ = - match_return::create(ctx.str.substr(pos).starts_with(ctx.groups[group]), ctx.groups[group].size()); - - to_string: () -> bstring = "\\((group)$)"; -} - -range_matcher_logic: type = { - - // TODO: Add static assert on min_count and max_count. - - private get_min_count: () -> _ = { - if constexpr min_count == -1 { - return 0; + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : template_list) -> bool = { + if cur != end && cur* == C { + return First::match(begin, cur + 1, end, ctx, template_list()); } else { - return min_count; - } - } - - alternate_match: (pos: size_t, inout ctx) -> match_return = { - state := ctx.get_state(); - - if !state*.empty() { - length := state*.back(); - state*.pop_back(); - - valid := state*.ssize() >= get_min_count(); - if !valid || state*.empty() { - M::invalidate_groups(ctx); - } else { - _ = M::match(pos + state*.back(), ctx); // Repopulate the ranges. - } - - return match_return::create(valid, length); - } else { - return match_return(false, 0); - } - } - - invalidate_groups: (inout ctx) = M::invalidate_groups(ctx); - - match: (pos: size_t, inout ctx: _) -> match_return = { - r: match_return = (true, 0); - o: match_return = (true, 0); - - state := ctx.get_state(); - state*.clear(); - - count: int = 0; - - o = M::match(pos, ctx); - ctx_copy := ctx; - while (o.matched && count < max_count) next o = M::match(pos + r.length, ctx_copy) { - - // Stop for empty matches. - if o.length == 0 && count >= get_min_count() { - break; + return false; } - - ctx = ctx_copy; - - state*.push_back(r.length); - r.length += o.length; - count += 1; - - ctx_copy = ctx; // For context. TODO: Separate context and state. - } - - _ = state; - valid := count >= get_min_count(); - - // If we do not reach the minimal count invalidate all groups. - if !valid { - M::invalidate_groups(ctx); - } - return match_return::create(valid, r.length); - } - - to_string: () -> bstring = { - r: std::string = M::to_string(); - - if min_count == max_count { - r += "{(min_count)$}"; - } - else if min_count == -1 { - r += "{,(max_count)$}"; - } - else if max_count == std::numeric_limits::max() { - r += "{(min_count)$,}"; - } - else { - r += "{(min_count)$,(max_count)$}"; - } - - return r; } } -special_range_matcher_logic: type = { - this: range_matcher_logic = (); - - to_string: () -> bstring = M::to_string() + symbol; -} - regex_parser_state: @struct type = { cur_match_list: std::vector = (); alternate_match_lists: std::vector> = (); @@ -608,31 +109,32 @@ regex_parser: type = { named_groups: int = 1; // Global capture group. - matcher_states: std::vector = (); - error_out: Error_out; - supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"); - operator=: (out this, r: std::string_view, e: Error_out) = { this.regex = r; this.error_out = e; } - new_state: (inout this) -> regex_parser_state = { - old_state: regex_parser_state = (); - old_state.swap(cur_state); - return old_state; - } + parse_until:(inout this, term: char) = { + while pos != regex.size() next pos += 1 { + c: char = regex[pos]; - restore_state: (inout this, old_state: regex_parser_state) = { - cur_state = old_state; - } + if c == term { return; } - private push_matcher_state: (inout this, t: std::string) -> int = { - id := matcher_states.ssize(); - matcher_states.push_back(t); - return id; + // if is_alternative(c) { continue; } + // if is_any(c) { continue; } + // if is_class(c) { continue; } + // if is_escape(c) { continue; } + // if is_anchor(c) { continue; } + // if is_group(c) { continue; } + // if is_handle_special(c) { continue; } + // if is_range(c) { continue; } + // if is_special_range(c) { continue; } + + // No special char push a character match + cur_state.add("::cpp2::regex::char_matcher_logic"); + } } private join: (list: std::vector) -> std::string = { @@ -647,324 +149,8 @@ regex_parser: type = { return r; } - private create_matcher_from_list: (inout this, list: std::vector) -> std::string = { - if list.empty() { return "::cpp2::regex::empty_matcher_logic"; } - - state_index := push_matcher_state("::cpp2::regex::list_matcher_state"); - matcher: std::string = "::cpp2::regex::list_matcher_logic std::string = { - inner := join(matcher_states); - return "std::tuple<(inner)$>"; - } - create_matcher_from_state: (inout this) -> std::string = { - // Early out for no alternatives - if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } - - state_index := push_matcher_state("int"); - matcher: std::string = "::cpp2::regex::alternative_matcher_logic bool = { - if c != '|' { return false; } - - cur_state.start_new_list(); - return true; - } - - is_anchor: (inout this, c: char) -> bool = { - r := false; - if c == '^' { - cur_state.add("::cpp2::regex::line_start_matcher_logic"); - r = true; - } - else if c == '$' { - cur_state.add("::cpp2::regex::line_end_matcher_logic"); - r = true; - } - - return r; - } - - is_any: (inout this, c: char) -> bool = { - if c == '.' { - cur_state.add("::cpp2::regex::any_matcher_logic"); - return true; - } - return false; - } - - is_class: (inout this, c: char) -> bool = { - if c != '[' { return false; } - - classes: std::vector = (); - - c_cur: char = regex[pos]; - next_item:= :() -> bool = { - pos&$* += 1; - if pos&$* >= regex$.size() { return false; } - - c_cur&$* = regex$[pos&$*]; - return true; - - }; - - peek_item:= :() -> char = { - if (pos$ + 1) >= regex$.size() { return '\0'; } - else { return regex[pos + 1]; } - }; - - negate:= false; - - first:= true; - range:= false; - while next_item() & (c_cur != ']' || first) { - if c_cur == '^' { - negate = true; - continue; // Skip rest of the loop. Also the first update. - } - if c_cur == '[' && peek_item() == ':' { - // We have a character class. - pos += 2; // Skip ':]' - - end := regex.find(":]", pos); - if end == std::string::npos { error_out("Could not find end of character class."); } - - name := regex.substr(pos, end - pos); - if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) { - error_out("Unsupported character class. Supported ones are: (join(supported_classes))$"); - } - - classes.push_back("[:(name)$:]"); - - end += 1; // Skip ':' pointing to the ending ']'. - pos = end; - - } - else if c_cur == '-' { - if first { // Literal if first entry. - classes.push_back("(c_cur)$"); - } else { - range = true; - } - } - else { - if range { // Modify last element to be a range. - classes.back() += "-(c_cur)$"; - range = false; - } - else { - classes.push_back("(c_cur)$"); - } - } - - first = false; - } - - _ = next_item; // TODO: Use in while is not recognized. - - if c_cur != ']' { - error_out("Error end of character class definition before terminating ']'."); - } - - if range { // If '-' is last entry treat it as a literal char. - classes.push_back("-"); - } - - for classes do (inout cur) { - if cur.starts_with("[:") { - name := cur.substr(2, cur.size() - 4); - cur = "::cpp2::regex::(name)$_class"; - } - else if 1 != cur.size() { - cur = "::cpp2::regex::range_class_entry"; - } - else { - cur = "::cpp2::regex::single_class_entry"; - } - } - - inner := join(classes); - cur_state.add("::cpp2::regex::class_matcher_logic"); - return true; - } - - is_escape: (inout this, c: char) -> bool = { - if c != '\\' { return false; } - - pos += 1; - - if pos >= regex.size() { error("Escape without a following character."); } - - c_next: char = regex[pos]; - - if '1' <= c_next <= '9' { - group_id: int = c_next - '0'; - - if group_id >= named_groups { error("Group reference is used before the group is declared."); } - - cur_state.add("::cpp2::regex::group_ref_matcher_logic"); - } - else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) { - if c_next == '$' { - // TODO: Provide proper escape for cppfront capture . - cur_state.add("::cpp2::regex::line_end_matcher_logic"); - } - else { - cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); - } - } - else if '\\' == c_next { - cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); - } - else { - error("Unknown escape."); - } - - return true; - } - - is_group: (inout this, c: char) -> bool = { - if c != '(' { return false; } - - group_number := named_groups; - named_groups += 1; - - old_state: _ = new_state(); - - pos += 1; // Skip the '(' - parse_until(')'); - - inner:= create_matcher_from_state(); - restore_state(old_state); - - cur_state.add("::cpp2::regex::group_matcher_logic"); - - return true; - } - - is_handle_special: (inout this, c: char) -> bool = { - if c == '\'' { - cur_state.add("::cpp2::regex::char_matcher_logic"); - return true; - } - - return false; - } - - is_range: (inout this, c: char) -> bool = { - - if c != '{' { return false; } - if cur_state.empty() { error("'{' without previous element."); } - - end: size_t = regex.find("}", pos); - if end == std::string::npos { error("Missing closing bracket."); } - - inner: std::string = trim_copy(regex.substr(pos + 1, end - pos - 1)); - if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } - - min_count: std::string = "-1"; - max_count: std::string = "std::numeric_limits::max()"; - - sep: size_t = inner.find(","); - if sep == std::string::npos { - min_count = inner; - max_count = inner; - } - else { - inner_first: std::string = trim_copy(inner.substr(0, sep)); - inner_last: std::string = trim_copy(inner.substr(sep + 1)); - - if (inner_first.empty() && inner_last.empty()) { - error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); - } - - if !inner_first.empty() { - min_count = inner_first; - } - if !inner_last.empty() { - max_count = inner_last; - } - } - - // TODO: Check 0 <=n <= m - matcher_state := push_matcher_state("std::vector"); - cur_state.wrap_last( :(inner) -> _ == "::cpp2::regex::range_matcher_logic"); - pos = end; - - return true; - } - - is_special_range: (inout this, c: char) -> bool = { - min_range: std::string = "0"; - max_range: std::string = "std::numeric_limits::max()"; - if c == '*' { - min_range = "0"; - } - else if c == '+' { - min_range = "1"; - } - else if c == '?' { - min_range = "0"; - max_range = "1"; - } - else { - return false; - } - - if cur_state.empty() { - error("'(c)$' without previous element."); - } - - matcher_state := push_matcher_state("std::vector"); - cur_state.wrap_last(:(inner) -> _ == "::cpp2::regex::special_range_matcher_logic"); - return true; - } - - parse_until:(inout this, term: char) = { - while pos != regex.size() next pos += 1 { - c: char = regex[pos]; - - if c == term { return; } - - if is_alternative(c) { continue; } - if is_any(c) { continue; } - if is_class(c) { continue; } - if is_escape(c) { continue; } - if is_anchor(c) { continue; } - if is_group(c) { continue; } - if is_handle_special(c) { continue; } - if is_range(c) { continue; } - if is_special_range(c) { continue; } - - // No special char push a character match - cur_state.add("::cpp2::regex::char_matcher_logic"); - } + return join(cur_state.cur_match_list); } parse:(inout this) -> std::string = { @@ -972,8 +158,7 @@ regex_parser: type = { parse_until('\0'); inner := create_matcher_from_state(); - matcher_state := create_matcher_state(); - return "::cpp2::regex::regular_expression, (matcher_state)$, (named_groups)$>"; + return "::cpp2::regex::regular_expression"; } } From 1466a02bd24f0540a94474ed64399b9c18bda5ab Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 4 Jan 2024 11:26:58 +0100 Subject: [PATCH 027/161] Removed need of end logic. --- source/regex.h | 51 +++++++++++++++++++++++-------------------------- source/regex.h2 | 25 ++++++++++++------------ 2 files changed, 36 insertions(+), 40 deletions(-) diff --git a/source/regex.h b/source/regex.h index 4162453de2..3324e2cdb7 100644 --- a/source/regex.h +++ b/source/regex.h @@ -17,9 +17,8 @@ template class match_context; template class template_list; -template class regular_expression; -class end_matcher_logic; +template class regular_expression; template class char_matcher_logic; @@ -68,12 +67,18 @@ template class match_context }; template class template_list { - public: template_list() = default; - public: template_list(template_list const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(template_list const&) -> void = delete; + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + + private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + + private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + public: template_list() = default; + public: template_list(template_list const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(template_list const&) -> void = delete; + }; -template class regular_expression { +template class regular_expression { public: using Iter = view::const_iterator; public: using context = match_context; @@ -87,19 +92,9 @@ template cla }; -class end_matcher_logic - { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] auto const& unnamed_param_5) -> bool; - public: end_matcher_logic() = default; - public: end_matcher_logic(end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(end_matcher_logic const&) -> void = delete; - - -}; - template class char_matcher_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] template_list const& unnamed_param_5) -> bool; + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; @@ -158,11 +153,17 @@ namespace regex { template template [[nodiscard]] auto match_context::get_group() & -> auto { return &groups[pos]; } - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ + template template [[nodiscard]] auto template_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return select(begin, cur, end, ctx); } + + template template [[nodiscard]] auto template_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { + return First::match(begin, cur, end, ctx, template_list()); } + template template [[nodiscard]] auto template_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return true; } + + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ auto cur {CPP2_UFCS(begin)(str)}; auto end {str.end()}; for( ; cur!=end; (++cur) ) { - if (Matcher::match(cur, cur, end, ctx, template_list())) { + if (Matcher::match(cur, cur, end, ctx)) { return true; } } @@ -170,15 +171,11 @@ namespace regex { return false; } - template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } - - template [[nodiscard]] auto end_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] auto const& unnamed_param_5) -> bool{ - return true; - } + template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } - template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] template_list const& unnamed_param_5) -> bool{ + template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ if (cur!=end && *cur==C) { - return First::match(begin, cur + 1, end, ctx, template_list()); + return Other::match(begin, cur + 1, end, ctx); }else { return false; } @@ -256,7 +253,7 @@ namespace regex { parse_until('\0'); auto inner {create_matcher_from_state()}; - return "::cpp2::regex::regular_expression"; + return "::cpp2::regex::regular_expression>"; } template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ diff --git a/source/regex.h2 b/source/regex.h2 index 76faf9dfa4..f797f9b88d 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -31,9 +31,15 @@ match_context: type = get_group: (inout this) groups[pos]&; } -template_list: type = {} +template_list: type = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx) select(begin, cur, end, ctx); -regular_expression: type = { + private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) + First::match(begin, cur, end, ctx, template_list()); + private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) true; +} + +regular_expression: type = { Iter: type == view::const_iterator; context: type == match_context; @@ -42,7 +48,7 @@ regular_expression: type = { cur := str.begin(); end := str.end(); while cur != end next (cur++) { - if Matcher::match(cur, cur, end, ctx, template_list()) { + if Matcher::match(cur, cur, end, ctx) { return true; } } @@ -53,18 +59,11 @@ regular_expression: type = { to_string: (in this) -> _ = Matcher::to_string(); } -end_matcher_logic: type = -{ - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _) -> bool = { - return true; - } -} - char_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : template_list) -> bool = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { if cur != end && cur* == C { - return First::match(begin, cur + 1, end, ctx, template_list()); + return Other::match(begin, cur + 1, end, ctx); } else { return false; } @@ -158,7 +157,7 @@ regex_parser: type = { parse_until('\0'); inner := create_matcher_from_state(); - return "::cpp2::regex::regular_expression"; + return "::cpp2::regex::regular_expression>"; } } From 1c048248b4abf0a232a1ce8da148ca380d77f419 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 4 Jan 2024 11:59:02 +0100 Subject: [PATCH 028/161] Basic group matching. --- source/regex.h | 72 ++++++++++++++++++++++++++++++++++++++++--------- source/regex.h2 | 32 +++++++++++++++++++--- 2 files changed, 88 insertions(+), 16 deletions(-) diff --git a/source/regex.h b/source/regex.h index 3324e2cdb7..feaeab1466 100644 --- a/source/regex.h +++ b/source/regex.h @@ -15,13 +15,19 @@ template class match_group; template class match_context; -template class template_list; +template class matcher_list; template class regular_expression; template class char_matcher_logic; +template class group_matcher_start_logic; + + +template class group_matcher_end_logic; + + class regex_parser_state; @@ -59,22 +65,26 @@ template class match_context { public: std::array,max_groups> groups {}; - public: template [[nodiscard]] auto get_group() & -> auto; + public: auto set_group_start(auto const& pos, auto const& start) & -> void; + + public: auto set_group_end(auto const& pos, auto const& end) & -> void; + + public: [[nodiscard]] auto get_group(auto const& pos) & -> auto; public: match_context() = default; public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(match_context const&) -> void = delete; }; -template class template_list { +template class matcher_list { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; - public: template_list() = default; - public: template_list(template_list const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(template_list const&) -> void = delete; + public: matcher_list() = default; + public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(matcher_list const&) -> void = delete; }; @@ -100,6 +110,24 @@ template class char_matcher_logic public: auto operator=(char_matcher_logic const&) -> void = delete; +}; + +template class group_matcher_start_logic { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; + public: group_matcher_start_logic() = default; + public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_matcher_start_logic const&) -> void = delete; + + +}; + +template class group_matcher_end_logic { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; + public: group_matcher_end_logic() = default; + public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_matcher_end_logic const&) -> void = delete; + + }; class regex_parser_state { @@ -151,13 +179,22 @@ namespace cpp2 { namespace regex { - template template [[nodiscard]] auto match_context::get_group() & -> auto { return &groups[pos]; } + template auto match_context::set_group_start(auto const& pos, auto const& start) & -> void{ + groups[pos].start = start; + } + + template auto match_context::set_group_end(auto const& pos, auto const& end) & -> void{ + groups[pos].end = end; + groups[pos].matched = true; + } + + template [[nodiscard]] auto match_context::get_group(auto const& pos) & -> auto { return &groups[pos]; } - template template [[nodiscard]] auto template_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return select(begin, cur, end, ctx); } + template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return select(begin, cur, end, ctx); } - template template [[nodiscard]] auto template_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { - return First::match(begin, cur, end, ctx, template_list()); } - template template [[nodiscard]] auto template_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return true; } + template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { + return First::match(begin, cur, end, ctx, matcher_list()); } + template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return true; } template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ auto cur {CPP2_UFCS(begin)(str)}; @@ -181,6 +218,16 @@ namespace regex { } } + template template [[nodiscard]] auto group_matcher_start_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ + CPP2_UFCS(set_group_start)(ctx, group, cur); + return Other::match(begin, cur, end, ctx); + } + + template template [[nodiscard]] auto group_matcher_end_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ + CPP2_UFCS(set_group_end)(ctx, group, cur); + return Other::match(begin, cur, end, ctx); + } + auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -253,7 +300,8 @@ namespace regex { parse_until('\0'); auto inner {create_matcher_from_state()}; - return "::cpp2::regex::regular_expression>"; + inner = "::cpp2::regex::group_matcher_start_logic, " + cpp2::to_string(inner) + ", ::cpp2::regex::group_matcher_end_logic"; + return "::cpp2::regex::regular_expression>"; } template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ diff --git a/source/regex.h2 b/source/regex.h2 index f797f9b88d..0da39c93c3 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -28,14 +28,23 @@ match_context: type = { public groups: std::array, max_groups> = (); - get_group: (inout this) groups[pos]&; + set_group_start: (inout this, pos, start) = { + groups[pos].start = start; + } + + set_group_end: (inout this, pos, end) = { + groups[pos].end = end; + groups[pos].matched = true; + } + + get_group: (inout this, pos) groups[pos]&; } -template_list: type = { +matcher_list: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx) select(begin, cur, end, ctx); private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) - First::match(begin, cur, end, ctx, template_list()); + First::match(begin, cur, end, ctx, matcher_list()); private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) true; } @@ -70,6 +79,20 @@ char_matcher_logic: type = } } +group_matcher_start_logic: type = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { + ctx.set_group_start(group, cur); + return Other::match(begin, cur, end, ctx); + } +} + +group_matcher_end_logic: type = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { + ctx.set_group_end(group, cur); + return Other::match(begin, cur, end, ctx); + } +} + regex_parser_state: @struct type = { cur_match_list: std::vector = (); alternate_match_lists: std::vector> = (); @@ -157,7 +180,8 @@ regex_parser: type = { parse_until('\0'); inner := create_matcher_from_state(); - return "::cpp2::regex::regular_expression>"; + inner = "::cpp2::regex::group_matcher_start_logic, (inner)$, ::cpp2::regex::group_matcher_end_logic"; + return "::cpp2::regex::regular_expression>"; } } From bff293376efe23957af0b72faf2f233ded7f764b Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 4 Jan 2024 12:43:34 +0100 Subject: [PATCH 029/161] Added alternative. --- source/regex.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++-- source/regex.h2 | 58 ++++++++++++++++++++++++++++++++-- 2 files changed, 136 insertions(+), 4 deletions(-) diff --git a/source/regex.h b/source/regex.h index feaeab1466..56f1a199ed 100644 --- a/source/regex.h +++ b/source/regex.h @@ -20,6 +20,8 @@ template class matcher_list; template class regular_expression; +template class alternative_matcher_logic; + template class char_matcher_logic; template class group_matcher_start_logic; @@ -28,6 +30,8 @@ template class group_matcher_start_logic; template class group_matcher_end_logic; +template class list_matcher_logic; + class regex_parser_state; @@ -79,6 +83,8 @@ template class match_context template class matcher_list { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + public: template [[nodiscard]] static auto match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto; + private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; @@ -102,6 +108,17 @@ template class regular_expressi }; +template class alternative_matcher_logic { + + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; + private: template [[nodiscard]] static auto match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> bool; + public: alternative_matcher_logic() = default; + public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_matcher_logic const&) -> void = delete; + + +}; + template class char_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; @@ -128,6 +145,16 @@ template class group_matcher_end_logic { public: auto operator=(group_matcher_end_logic const&) -> void = delete; +}; + +template class list_matcher_logic + { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; + public: list_matcher_logic() = default; + public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(list_matcher_logic const&) -> void = delete; + + }; class regex_parser_state { @@ -157,10 +184,14 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); + public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; + public: auto parse_until(cpp2::in term) & -> void; private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; + public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; + public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; public: [[nodiscard]] auto parse() & -> std::string; @@ -192,6 +223,9 @@ namespace regex { template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return select(begin, cur, end, ctx); } + template template [[nodiscard]] auto matcher_list::match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { + return select(begin, cur, end, ctx); } + template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return First::match(begin, cur, end, ctx, matcher_list()); } template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return true; } @@ -210,6 +244,19 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } + template template [[nodiscard]] auto alternative_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_all(begin, cur, end, ctx, Other()); } + template template [[nodiscard]] auto alternative_matcher_logic::match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> bool{ + if (First::match(begin, cur, end, ctx, Tail())) { + return true; + }else { + if constexpr (0!=sizeof...(Other)) { + return match_all(begin, cur, end, ctx, Tail()); + }else { + return false; + } + } + } + template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ if (cur!=end && *cur==C) { return Other::match(begin, cur + 1, end, ctx); @@ -228,6 +275,10 @@ namespace regex { return Other::match(begin, cur, end, ctx); } + template template [[nodiscard]] auto list_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ + return List::match_combine(begin, cur, end, ctx, Other()); + } + auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -258,13 +309,20 @@ namespace regex { } + template [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{ + if (c!='|') {return false; } + + CPP2_UFCS(start_new_list)(cur_state); + return true; + } + template auto regex_parser::parse_until(cpp2::in term) & -> void{ for( ; pos!=CPP2_UFCS(size)(regex); pos += 1 ) { char c {regex[pos]}; if (c==term) {return ; } - // if is_alternative(c) { continue; } + if (is_alternative(c)) {continue; } // if is_any(c) { continue; } // if is_class(c) { continue; } // if is_escape(c) { continue; } @@ -291,8 +349,28 @@ namespace regex { return r; } + template [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { + return "::cpp2::regex::list_matcher_logic>"; } + template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ - return join(cur_state.cur_match_list); + if (0==CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } + + std::string matcher {"::cpp2::regex::alternative_matcher_logic void{ + *_1 += *_2 + create_matcher_from_list(list); + *_2 = ", "; + }}; + + auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; + for( ; cur!=CPP2_UFCS(rend)(cur_state.alternate_match_lists); (++cur) ) { + add(*cur); + } + if (0!=CPP2_UFCS(size)(cur_state.cur_match_list)) {std::move(add)(cur_state.cur_match_list); } + matcher += ">"; + + return matcher; } template [[nodiscard]] auto regex_parser::parse() & -> std::string{ diff --git a/source/regex.h2 b/source/regex.h2 index 0da39c93c3..87e989871c 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -43,6 +43,9 @@ match_context: type = matcher_list: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx) select(begin, cur, end, ctx); + match_combine: (begin: Iter, cur: Iter, end: Iter, inout ctx, _: matcher_list) + select(begin, cur, end, ctx); + private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) First::match(begin, cur, end, ctx, matcher_list()); private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) true; @@ -68,6 +71,22 @@ regular_expression: type = { to_string: (in this) -> _ = Matcher::to_string(); } +alternative_matcher_logic: type = { + + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) match_all(begin, cur, end, ctx, Other()); + private match_all: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Tail) -> bool = { + if First::match(begin, cur, end, ctx, Tail()) { + return true; + } else { + if constexpr 0 != sizeof...(Other) { + return match_all(begin, cur, end, ctx, Tail()); + } else { + return false; + } + } + } +} + char_matcher_logic: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { @@ -93,6 +112,14 @@ group_matcher_end_logic: type = { } } +list_matcher_logic: type = +{ + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { + return List::match_combine(begin, cur, end, ctx, Other()); + } +} + + regex_parser_state: @struct type = { cur_match_list: std::vector = (); alternate_match_lists: std::vector> = (); @@ -138,13 +165,20 @@ regex_parser: type = { this.error_out = e; } + is_alternative: (inout this, c: char) -> bool = { + if c != '|' { return false; } + + cur_state.start_new_list(); + return true; + } + parse_until:(inout this, term: char) = { while pos != regex.size() next pos += 1 { c: char = regex[pos]; if c == term { return; } - // if is_alternative(c) { continue; } + if is_alternative(c) { continue; } // if is_any(c) { continue; } // if is_class(c) { continue; } // if is_escape(c) { continue; } @@ -171,8 +205,28 @@ regex_parser: type = { return r; } + create_matcher_from_list: (inout this, list) + "::cpp2::regex::list_matcher_logic>" + create_matcher_from_state: (inout this) -> std::string = { - return join(cur_state.cur_match_list); + if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } + + matcher: std::string = "::cpp2::regex::alternative_matcher_logic std::string = { From 06020238557acf8e511677134b2ca78531466666 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 4 Jan 2024 14:36:26 +0100 Subject: [PATCH 030/161] Added range matcher logic. --- source/reflect.h | 158 ++++++++++++++++++++++++++++++++++ source/regex.h | 216 +++++++++++++++++++++++++++++++++++++++++++---- source/regex.h2 | 108 +++++++++++++++++++++--- 3 files changed, 453 insertions(+), 29 deletions(-) diff --git a/source/reflect.h b/source/reflect.h index de0f7534ef..70bc3ed9a5 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -3,34 +3,52 @@ #define REFLECT_H_CPP2 +//=== Cpp2 type declarations ==================================================== + + #include "cpp2util.h" +#line 1 "reflect.h2" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { +#line 33 "reflect.h2" class compiler_services; +#line 224 "reflect.h2" class declaration_base; +#line 250 "reflect.h2" class declaration; +#line 332 "reflect.h2" class function_declaration; +#line 419 "reflect.h2" class object_declaration; +#line 455 "reflect.h2" class type_declaration; +#line 590 "reflect.h2" class alias_declaration; +#line 929 "reflect.h2" class value_member_info; +#line 1512 "reflect.h2" } } +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "reflect.h2" + // Copyright (c) Herb Sutter // SPDX-License-Identifier: CC-BY-NC-ND-4.0 @@ -50,10 +68,12 @@ class value_member_info; #include "parse.h" #include "regex.h" +#line 21 "reflect.h2" namespace cpp2 { namespace meta { +#line 26 "reflect.h2" //----------------------------------------------------------------------- // // Compiler services @@ -81,27 +101,34 @@ class compiler_services std::deque* generated_tokens_ ); +#line 59 "reflect.h2" // Common API // public: auto set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void; +#line 67 "reflect.h2" public: [[nodiscard]] auto get_metafunction_name() const& -> std::string_view; public: [[nodiscard]] auto get_argument(cpp2::in index) & -> std::string; +#line 77 "reflect.h2" public: [[nodiscard]] auto get_arguments() & -> std::vector; +#line 82 "reflect.h2" public: [[nodiscard]] auto arguments_were_used() const& -> bool; using parse_statement_ret = std::unique_ptr; +#line 84 "reflect.h2" protected: [[nodiscard]] auto parse_statement( std::string_view source ) & -> parse_statement_ret; +#line 137 "reflect.h2" public: [[nodiscard]] virtual auto position() const -> source_position; +#line 143 "reflect.h2" // Error diagnosis and handling, integrated with compiler output // Unlike a contract violation, .requires continues further processing // @@ -111,19 +138,24 @@ using parse_statement_ret = std::unique_ptr; cpp2::in msg ) const& -> void; +#line 157 "reflect.h2" public: auto error(cpp2::in msg) const& -> void; +#line 166 "reflect.h2" // Enable custom contracts on this object, integrated with compiler output // Unlike .requires, a contract violation stops further processing // public: auto report_violation(auto const& msg) const& -> void; +#line 174 "reflect.h2" public: [[nodiscard]] auto has_handler() const& -> auto; public: virtual ~compiler_services() noexcept; public: compiler_services(compiler_services const& that); +#line 175 "reflect.h2" }; +#line 178 "reflect.h2" /* //----------------------------------------------------------------------- // @@ -160,6 +192,7 @@ type_id: @polymorphic_base @copyable type = } */ +#line 215 "reflect.h2" //----------------------------------------------------------------------- // // Declarations @@ -172,6 +205,7 @@ type_id: @polymorphic_base @copyable type = class declaration_base : public compiler_services { +#line 228 "reflect.h2" protected: declaration_node* n; protected: explicit declaration_base( @@ -180,26 +214,31 @@ class declaration_base cpp2::in s ); +#line 241 "reflect.h2" public: [[nodiscard]] auto position() const -> source_position override; public: [[nodiscard]] auto print() const& -> std::string; public: virtual ~declaration_base() noexcept; public: declaration_base(declaration_base const& that); +#line 244 "reflect.h2" }; +#line 247 "reflect.h2" //----------------------------------------------------------------------- // All declarations // class declaration : public declaration_base { +#line 254 "reflect.h2" public: explicit declaration( declaration_node* n_, cpp2::in s ); +#line 263 "reflect.h2" public: [[nodiscard]] auto is_public() const& -> bool; public: [[nodiscard]] auto is_protected() const& -> bool; public: [[nodiscard]] auto is_private() const& -> bool; @@ -218,6 +257,7 @@ class declaration public: [[nodiscard]] auto name() const& -> std::string_view; +#line 284 "reflect.h2" public: [[nodiscard]] auto has_initializer() const& -> bool; public: [[nodiscard]] auto is_global() const& -> bool; @@ -260,20 +300,24 @@ public: declaration(declaration const& that); // this precondition should be sufficient ... +#line 326 "reflect.h2" }; +#line 329 "reflect.h2" //----------------------------------------------------------------------- // Function declarations // class function_declaration : public declaration { +#line 336 "reflect.h2" public: explicit function_declaration( declaration_node* n_, cpp2::in s ); +#line 346 "reflect.h2" public: [[nodiscard]] auto index_of_parameter_named(cpp2::in s) const& -> int; public: [[nodiscard]] auto has_parameter_named(cpp2::in s) const& -> bool; public: [[nodiscard]] auto has_in_parameter_named(cpp2::in s) const& -> bool; @@ -310,6 +354,7 @@ class function_declaration public: [[nodiscard]] auto get_parameters() const& -> std::vector; +#line 390 "reflect.h2" public: [[nodiscard]] auto is_binary_comparison_function() const& -> bool; public: auto default_to_virtual() & -> void; @@ -320,82 +365,103 @@ class function_declaration public: function_declaration(function_declaration const& that); +#line 413 "reflect.h2" }; +#line 416 "reflect.h2" //----------------------------------------------------------------------- // Object declarations // class object_declaration : public declaration { +#line 423 "reflect.h2" public: explicit object_declaration( declaration_node* n_, cpp2::in s ); +#line 433 "reflect.h2" public: [[nodiscard]] auto is_const() const& -> bool; public: [[nodiscard]] auto has_wildcard_type() const& -> bool; public: [[nodiscard]] auto type() const& -> std::string; +#line 443 "reflect.h2" public: [[nodiscard]] auto initializer() const& -> std::string; public: object_declaration(object_declaration const& that); +#line 449 "reflect.h2" }; +#line 452 "reflect.h2" //----------------------------------------------------------------------- // Type declarations // class type_declaration : public declaration { +#line 459 "reflect.h2" public: explicit type_declaration( declaration_node* n_, cpp2::in s ); +#line 469 "reflect.h2" public: auto reserve_names(cpp2::in name, auto&& ...etc) const& -> void; +#line 481 "reflect.h2" public: [[nodiscard]] auto is_polymorphic() const& -> bool; public: [[nodiscard]] auto is_final() const& -> bool; public: [[nodiscard]] auto make_final() & -> bool; public: [[nodiscard]] auto get_member_functions() const& -> std::vector; +#line 496 "reflect.h2" public: [[nodiscard]] auto get_member_functions_needing_initializer() const& -> std::vector; +#line 511 "reflect.h2" public: [[nodiscard]] auto get_member_objects() const& -> std::vector; +#line 521 "reflect.h2" public: [[nodiscard]] auto get_member_types() const& -> std::vector; +#line 531 "reflect.h2" public: [[nodiscard]] auto get_member_aliases() const& -> std::vector; +#line 541 "reflect.h2" public: [[nodiscard]] auto get_members() const& -> std::vector; struct query_declared_value_set_functions_ret { bool out_this_in_that; bool out_this_move_that; bool inout_this_in_that; bool inout_this_move_that; }; +#line 551 "reflect.h2" public: [[nodiscard]] auto query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret; +#line 566 "reflect.h2" public: auto add_member(cpp2::in source) & -> void; +#line 580 "reflect.h2" public: auto remove_marked_members() & -> void; public: auto remove_all_members() & -> void; public: auto disable_member_function_generation() & -> void; public: type_declaration(type_declaration const& that); +#line 584 "reflect.h2" }; +#line 587 "reflect.h2" //----------------------------------------------------------------------- // Alias declarations // class alias_declaration : public declaration { +#line 594 "reflect.h2" public: explicit alias_declaration( declaration_node* n_, @@ -404,8 +470,10 @@ class alias_declaration public: alias_declaration(alias_declaration const& that); +#line 603 "reflect.h2" }; +#line 606 "reflect.h2" //----------------------------------------------------------------------- // // Metafunctions - these are hardwired for now until we get to the @@ -420,6 +488,7 @@ class alias_declaration // auto add_virtual_destructor(meta::type_declaration& t) -> void; +#line 624 "reflect.h2" //----------------------------------------------------------------------- // // "... an abstract base class defines an interface ..." @@ -434,6 +503,7 @@ auto add_virtual_destructor(meta::type_declaration& t) -> void; // auto interface(meta::type_declaration& t) -> void; +#line 663 "reflect.h2" //----------------------------------------------------------------------- // // "C.35: A base class destructor should be either public and @@ -455,6 +525,7 @@ auto interface(meta::type_declaration& t) -> void; // auto polymorphic_base(meta::type_declaration& t) -> void; +#line 707 "reflect.h2" //----------------------------------------------------------------------- // // "... A totally ordered type ... requires operator<=> that @@ -480,6 +551,7 @@ auto ordered_impl( cpp2::in ordering// must be "strong_ordering" etc. ) -> void; +#line 751 "reflect.h2" //----------------------------------------------------------------------- // ordered - a totally ordered type // @@ -487,16 +559,19 @@ auto ordered_impl( // auto ordered(meta::type_declaration& t) -> void; +#line 761 "reflect.h2" //----------------------------------------------------------------------- // weakly_ordered - a weakly ordered type // auto weakly_ordered(meta::type_declaration& t) -> void; +#line 769 "reflect.h2" //----------------------------------------------------------------------- // partially_ordered - a partially ordered type // auto partially_ordered(meta::type_declaration& t) -> void; +#line 778 "reflect.h2" //----------------------------------------------------------------------- // // "A value is ... a regular type. It must have all public @@ -515,6 +590,7 @@ auto partially_ordered(meta::type_declaration& t) -> void; // auto copyable(meta::type_declaration& t) -> void; +#line 815 "reflect.h2" //----------------------------------------------------------------------- // // basic_value @@ -524,6 +600,7 @@ auto copyable(meta::type_declaration& t) -> void; // auto basic_value(meta::type_declaration& t) -> void; +#line 840 "reflect.h2" //----------------------------------------------------------------------- // // "A 'value' is a totally ordered basic_value..." @@ -536,10 +613,13 @@ auto basic_value(meta::type_declaration& t) -> void; // auto value(meta::type_declaration& t) -> void; +#line 856 "reflect.h2" auto weakly_ordered_value(meta::type_declaration& t) -> void; +#line 862 "reflect.h2" auto partially_ordered_value(meta::type_declaration& t) -> void; +#line 869 "reflect.h2" //----------------------------------------------------------------------- // // "By definition, a `struct` is a `class` in which members @@ -567,6 +647,7 @@ auto partially_ordered_value(meta::type_declaration& t) -> void; // auto cpp2_struct(meta::type_declaration& t) -> void; +#line 912 "reflect.h2" //----------------------------------------------------------------------- // // "C enumerations constitute a curiously half-baked concept. ... @@ -596,6 +677,7 @@ auto basic_enum( cpp2::in bitwise ) -> void; +#line 1118 "reflect.h2" //----------------------------------------------------------------------- // // "An enum[...] is a totally ordered value type that stores a @@ -607,6 +689,7 @@ auto basic_enum( // auto cpp2_enum(meta::type_declaration& t) -> void; +#line 1144 "reflect.h2" //----------------------------------------------------------------------- // // "flag_enum expresses an enumeration that stores values @@ -619,6 +702,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void; // auto flag_enum(meta::type_declaration& t) -> void; +#line 1176 "reflect.h2" //----------------------------------------------------------------------- // // "As with void*, programmers should know that unions [...] are @@ -645,12 +729,14 @@ auto flag_enum(meta::type_declaration& t) -> void; auto cpp2_union(meta::type_declaration& t) -> void; +#line 1332 "reflect.h2" //----------------------------------------------------------------------- // // print - output a pretty-printed visualization of t // auto print(cpp2::in t) -> void; +#line 1341 "reflect.h2" //----------------------------------------------------------------------- // // regex - creates regular expressions from members @@ -659,6 +745,7 @@ auto print(cpp2::in t) -> void; // auto regex_gen(meta::type_declaration& t) -> void; +#line 1405 "reflect.h2" //----------------------------------------------------------------------- // // apply_metafunctions @@ -669,14 +756,22 @@ auto regex_gen(meta::type_declaration& t) -> void; auto const& error ) -> bool; +#line 1512 "reflect.h2" } } + +//=== Cpp2 function definitions ================================================= + +#line 1 "reflect.h2" + +#line 21 "reflect.h2" namespace cpp2 { namespace meta { +#line 47 "reflect.h2" compiler_services::compiler_services( std::vector* errors_, @@ -686,10 +781,13 @@ namespace meta { , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*errors)) } , generated_tokens{ generated_tokens_ } , parser{ *errors } +#line 52 "reflect.h2" { +#line 57 "reflect.h2" } +#line 61 "reflect.h2" auto compiler_services::set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void{ metafunction_name = name; metafunction_args = args; @@ -720,6 +818,7 @@ namespace meta { { cpp2::deferred_init> ret; +#line 90 "reflect.h2" auto original_source {source}; CPP2_UFCS(push_back)(generated_lines, std::vector()); @@ -734,6 +833,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); // First split this string into source_lines // +#line 102 "reflect.h2" if ( CPP2_UFCS(ssize)(source)>1 && newline_pos!=source.npos) { @@ -746,6 +846,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); } } +#line 113 "reflect.h2" if (!(CPP2_UFCS(empty)(source))) { std::move(add_line)(std::move(source)); } @@ -776,6 +877,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); return { }; } +#line 146 "reflect.h2" auto compiler_services::require( cpp2::in b, @@ -796,6 +898,7 @@ auto newline_pos = CPP2_UFCS(find)(source, '\n'); static_cast(CPP2_UFCS(emplace_back)((*errors), position(), std::move(message))); } +#line 169 "reflect.h2" auto compiler_services::report_violation(auto const& msg) const& -> void{ error(msg); throw(std::runtime_error(" ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " - contract violation - see previous errors")); @@ -813,6 +916,7 @@ compiler_services::compiler_services(compiler_services const& that) , metafunction_args{ that.metafunction_args } , metafunctions_used{ that.metafunctions_used }{} +#line 230 "reflect.h2" declaration_base::declaration_base( declaration_node* n_, @@ -820,8 +924,10 @@ compiler_services::compiler_services(compiler_services const& that) ) : compiler_services{ s } , n{ n_ } +#line 235 "reflect.h2" { +#line 238 "reflect.h2" if (cpp2::Default.has_handler() && !(n) ) { cpp2::Default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); } } @@ -834,12 +940,14 @@ declaration_base::declaration_base(declaration_base const& that) : compiler_services{ static_cast(that) } , n{ that.n }{} +#line 254 "reflect.h2" declaration::declaration( declaration_node* n_, cpp2::in s ) : declaration_base{ n_, s } +#line 259 "reflect.h2" { } @@ -905,6 +1013,7 @@ declaration_base::declaration_base(declaration_base const& that) { if (cpp2::Type.has_handler() && !(parent_is_type()) ) { cpp2::Type.report_violation(""); } +#line 323 "reflect.h2" auto test {CPP2_UFCS(type_member_mark_for_removal)((*n))}; if (cpp2::Default.has_handler() && !(std::move(test)) ) { cpp2::Default.report_violation(""); }// ... to ensure this assert is true } @@ -913,12 +1022,14 @@ declaration_base::declaration_base(declaration_base const& that) declaration::declaration(declaration const& that) : declaration_base{ static_cast(that) }{} +#line 336 "reflect.h2" function_declaration::function_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } +#line 341 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*n))) ) { cpp2::Default.report_violation(""); } @@ -976,6 +1087,7 @@ declaration::declaration(declaration const& that) auto function_declaration::add_initializer(cpp2::in source) & -> void +#line 399 "reflect.h2" { if ((*this).has_handler() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); } if ((*this).has_handler() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); } @@ -984,6 +1096,7 @@ declaration::declaration(declaration const& that) //require( parent_is_type(), // "cannot add an initializer to a function that isn't in a type scope"); +#line 405 "reflect.h2" auto stmt {parse_statement(source)}; if (!((cpp2::as_(stmt)))) { error("cannot add an initializer that is not a valid statement"); @@ -996,12 +1109,14 @@ declaration::declaration(declaration const& that) function_declaration::function_declaration(function_declaration const& that) : declaration{ static_cast(that) }{} +#line 423 "reflect.h2" object_declaration::object_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } +#line 428 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*n))) ) { cpp2::Default.report_violation(""); } @@ -1027,12 +1142,14 @@ declaration::declaration(declaration const& that) object_declaration::object_declaration(object_declaration const& that) : declaration{ static_cast(that) }{} +#line 459 "reflect.h2" type_declaration::type_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } +#line 464 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*n))) ) { cpp2::Default.report_violation(""); } @@ -1122,11 +1239,13 @@ declaration::declaration(declaration const& that) [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret +#line 558 "reflect.h2" { cpp2::deferred_init out_this_in_that; cpp2::deferred_init out_this_move_that; cpp2::deferred_init inout_this_in_that; cpp2::deferred_init inout_this_move_that; +#line 559 "reflect.h2" auto declared {CPP2_UFCS(find_declared_value_set_functions)((*n))}; out_this_in_that.construct(declared.out_this_in_that != nullptr); out_this_move_that.construct(declared.out_this_move_that!=nullptr); @@ -1156,12 +1275,14 @@ declaration::declaration(declaration const& that) type_declaration::type_declaration(type_declaration const& that) : declaration{ static_cast(that) }{} +#line 594 "reflect.h2" alias_declaration::alias_declaration( declaration_node* n_, cpp2::in s ) : declaration{ n_, s } +#line 599 "reflect.h2" { if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*n))) ) { cpp2::Default.report_violation(""); } @@ -1170,11 +1291,13 @@ declaration::declaration(declaration const& that) alias_declaration::alias_declaration(alias_declaration const& that) : declaration{ static_cast(that) }{} +#line 618 "reflect.h2" auto add_virtual_destructor(meta::type_declaration& t) -> void { CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }"); } +#line 636 "reflect.h2" auto interface(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1201,6 +1324,7 @@ auto interface(meta::type_declaration& t) -> void } } +#line 682 "reflect.h2" auto polymorphic_base(meta::type_declaration& t) -> void { auto has_dtor {false}; @@ -1225,6 +1349,7 @@ auto polymorphic_base(meta::type_declaration& t) -> void } } +#line 727 "reflect.h2" auto ordered_impl( meta::type_declaration& t, cpp2::in ordering @@ -1249,21 +1374,25 @@ auto ordered_impl( } } +#line 756 "reflect.h2" auto ordered(meta::type_declaration& t) -> void { ordered_impl(t, "strong_ordering"); } +#line 764 "reflect.h2" auto weakly_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "weak_ordering"); } +#line 772 "reflect.h2" auto partially_ordered(meta::type_declaration& t) -> void { ordered_impl(t, "partial_ordering"); } +#line 794 "reflect.h2" auto copyable(meta::type_declaration& t) -> void { // If the user explicitly wrote any of the copy/move functions, @@ -1285,6 +1414,7 @@ auto copyable(meta::type_declaration& t) -> void }} } +#line 822 "reflect.h2" auto basic_value(meta::type_declaration& t) -> void { CPP2_UFCS(copyable)(t); @@ -1303,6 +1433,7 @@ auto basic_value(meta::type_declaration& t) -> void } } +#line 850 "reflect.h2" auto value(meta::type_declaration& t) -> void { CPP2_UFCS(ordered)(t); @@ -1321,6 +1452,7 @@ auto partially_ordered_value(meta::type_declaration& t) -> void CPP2_UFCS(basic_value)(t); } +#line 894 "reflect.h2" auto cpp2_struct(meta::type_declaration& t) -> void { for ( auto& m : CPP2_UFCS(get_members)(t) ) @@ -1338,6 +1470,7 @@ auto cpp2_struct(meta::type_declaration& t) -> void CPP2_UFCS(disable_member_function_generation)(t); } +#line 935 "reflect.h2" auto basic_enum( meta::type_declaration& t, auto const& nextval, @@ -1362,6 +1495,7 @@ auto basic_enum( { std::string value = "-1"; +#line 958 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) if ( CPP2_UFCS(is_member_object)(m)) @@ -1399,6 +1533,7 @@ std::string value = "-1"; } } +#line 994 "reflect.h2" if ((CPP2_UFCS(empty)(enumerators))) { CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value"); return ; @@ -1444,6 +1579,7 @@ std::string value = "-1"; } } +#line 1040 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents // // Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr' @@ -1491,6 +1627,7 @@ std::string to_string = " to_string: (this) -> std::string = { \n"; // Provide a 'to_string' function to print enumerator name(s) +#line 1085 "reflect.h2" { if (bitwise) { to_string += " _ret : std::string = \"(\";\n"; @@ -1522,8 +1659,10 @@ std::string to_string = " to_string: (this) -> std::string = { \n"; CPP2_UFCS(add_member)(t, std::move(to_string)); } } +#line 1115 "reflect.h2" } +#line 1127 "reflect.h2" auto cpp2_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with an incrementing value generator @@ -1540,6 +1679,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void ); } +#line 1154 "reflect.h2" auto flag_enum(meta::type_declaration& t) -> void { // Let basic_enum do its thing, with a power-of-two value generator @@ -1561,6 +1701,7 @@ auto flag_enum(meta::type_declaration& t) -> void ); } +#line 1200 "reflect.h2" auto cpp2_union(meta::type_declaration& t) -> void { std::vector alternatives {}; @@ -1569,6 +1710,7 @@ auto value = 0; // 1. Gather: All the user-written members, and find/compute the max size +#line 1207 "reflect.h2" for ( auto const& m : CPP2_UFCS(get_members)(t) ) { do @@ -1593,6 +1735,7 @@ auto value = 0; } while (false); ++value; } } +#line 1230 "reflect.h2" std::string discriminator_type {}; if (CPP2_UFCS(ssize)(alternatives)::max()) { discriminator_type = "i8"; @@ -1607,6 +1750,7 @@ auto value = 0; discriminator_type = "i64"; }}} +#line 1245 "reflect.h2" // 2. Replace: Erase the contents and replace with modified contents CPP2_UFCS(remove_marked_members)(t); @@ -1615,10 +1759,12 @@ std::string storage = " _storage: cpp2::aligned_storage t) -> void { std::cout << CPP2_UFCS(print)(t) << "\n"; } +#line 1347 "reflect.h2" auto regex_gen(meta::type_declaration& t) -> void { bool has_default {false}; @@ -1769,6 +1925,7 @@ auto regex_gen(meta::type_declaration& t) -> void } } +#line 1409 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -1871,6 +2028,7 @@ auto regex_gen(meta::type_declaration& t) -> void return true; } +#line 1512 "reflect.h2" } } diff --git a/source/regex.h b/source/regex.h index 56f1a199ed..15e4eb461e 100644 --- a/source/regex.h +++ b/source/regex.h @@ -3,43 +3,72 @@ #define REGEX_H_CPP2 +//=== Cpp2 type declarations ==================================================== + + #include "cpp2util.h" +#line 1 "regex.h2" +#line 13 "regex.h2" namespace cpp2 { namespace regex { +#line 20 "regex.h2" template class match_group; +#line 27 "regex.h2" +template class match_return; + + +#line 32 "regex.h2" template class match_context; +#line 48 "regex.h2" template class matcher_list; +#line 59 "regex.h2" template class regular_expression; +#line 79 "regex.h2" template class alternative_matcher_logic; +#line 96 "regex.h2" template class char_matcher_logic; +#line 107 "regex.h2" template class group_matcher_start_logic; +#line 114 "regex.h2" template class group_matcher_end_logic; +#line 121 "regex.h2" template class list_matcher_logic; +#line 128 "regex.h2" +template class range_matcher_logic; + +#line 161 "regex.h2" class regex_parser_state; +#line 191 "regex.h2" template class regex_parser; +#line 334 "regex.h2" } } + +//=== Cpp2 type definitions and function declarations =========================== + +#line 1 "regex.h2" + // Copyright (c) Herb Sutter // SPDX-License-Identifier: CC-BY-NC-ND-4.0 @@ -51,6 +80,7 @@ template class regex_parser; // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. +#line 13 "regex.h2" namespace cpp2 { namespace regex { @@ -65,19 +95,27 @@ template class match_group { public: bool matched {false}; }; +template class match_return { + public: bool matched {false}; + public: Iter pos {}; +}; + template class match_context { public: std::array,max_groups> groups {}; public: auto set_group_start(auto const& pos, auto const& start) & -> void; +#line 40 "regex.h2" public: auto set_group_end(auto const& pos, auto const& end) & -> void; +#line 45 "regex.h2" public: [[nodiscard]] auto get_group(auto const& pos) & -> auto; public: match_context() = default; public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(match_context const&) -> void = delete; +#line 46 "regex.h2" }; template class matcher_list { @@ -85,6 +123,7 @@ template class matcher_list { public: template [[nodiscard]] static auto match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto; +#line 54 "regex.h2" private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; @@ -92,6 +131,7 @@ template class matcher_list { public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(matcher_list const&) -> void = delete; +#line 57 "regex.h2" }; template class regular_expression { @@ -101,77 +141,111 @@ template class regular_expressi public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; +#line 76 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; +#line 77 "regex.h2" }; template class alternative_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; - private: template [[nodiscard]] static auto match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> bool; + private: template [[nodiscard]] static auto match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; +#line 94 "regex.h2" }; template class char_matcher_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; +#line 105 "regex.h2" }; template class group_matcher_start_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; public: group_matcher_start_logic() = default; public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_start_logic const&) -> void = delete; +#line 112 "regex.h2" }; template class group_matcher_end_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; public: group_matcher_end_logic() = default; public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_end_logic const&) -> void = delete; +#line 119 "regex.h2" }; template class list_matcher_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool; + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; +#line 126 "regex.h2" }; +template class range_matcher_logic { + +#line 131 "regex.h2" + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; + +#line 134 "regex.h2" + private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool; + +#line 139 "regex.h2" + private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool; + +#line 144 "regex.h2" + private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_6) -> match_return; + public: range_matcher_logic() = default; + public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_matcher_logic const&) -> void = delete; + + +#line 158 "regex.h2" +}; + +#line 161 "regex.h2" class regex_parser_state { public: std::vector cur_match_list {}; public: std::vector> alternate_match_lists {}; public: auto start_new_list() & -> void; +#line 171 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; +#line 176 "regex.h2" public: auto add(auto const& matcher) & -> void; +#line 180 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; +#line 187 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; +#line 191 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -184,32 +258,53 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); +#line 206 "regex.h2" + public: auto error(cpp2::in message) & -> void; + +#line 210 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; +#line 217 "regex.h2" + public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; + +#line 259 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; +#line 280 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; +#line 292 "regex.h2" public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; +#line 295 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; +#line 316 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; +#line 325 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; +#line 334 "regex.h2" } } + +//=== Cpp2 function definitions ================================================= + +#line 1 "regex.h2" + +#line 13 "regex.h2" namespace cpp2 { namespace regex { +#line 36 "regex.h2" template auto match_context::set_group_start(auto const& pos, auto const& start) & -> void{ groups[pos].start = start; } @@ -221,6 +316,7 @@ namespace regex { template [[nodiscard]] auto match_context::get_group(auto const& pos) & -> auto { return &groups[pos]; } +#line 49 "regex.h2" template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return select(begin, cur, end, ctx); } template template [[nodiscard]] auto matcher_list::match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { @@ -228,13 +324,14 @@ namespace regex { template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return First::match(begin, cur, end, ctx, matcher_list()); } - template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return true; } + template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_return(true, cur); } +#line 64 "regex.h2" template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ auto cur {CPP2_UFCS(begin)(str)}; auto end {str.end()}; for( ; cur!=end; (++cur) ) { - if (Matcher::match(cur, cur, end, ctx)) { + if (Matcher::match(cur, cur, end, ctx).matched) { return true; } } @@ -244,41 +341,77 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } +#line 81 "regex.h2" template template [[nodiscard]] auto alternative_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_all(begin, cur, end, ctx, Other()); } - template template [[nodiscard]] auto alternative_matcher_logic::match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> bool{ - if (First::match(begin, cur, end, ctx, Tail())) { - return true; + template template [[nodiscard]] auto alternative_matcher_logic::match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return{ + auto r {First::match(begin, cur, end, ctx, Tail())}; + if (r.matched) { + return r; }else { if constexpr (0!=sizeof...(Other)) { return match_all(begin, cur, end, ctx, Tail()); }else { - return false; + return match_return(false, end); } } } - template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ +#line 98 "regex.h2" + template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end && *cur==C) { return Other::match(begin, cur + 1, end, ctx); }else { - return false; + return match_return(false, end); } } - template template [[nodiscard]] auto group_matcher_start_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ +#line 108 "regex.h2" + template template [[nodiscard]] auto group_matcher_start_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ CPP2_UFCS(set_group_start)(ctx, group, cur); return Other::match(begin, cur, end, ctx); } - template template [[nodiscard]] auto group_matcher_end_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ +#line 115 "regex.h2" + template template [[nodiscard]] auto group_matcher_end_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ CPP2_UFCS(set_group_end)(ctx, group, cur); return Other::match(begin, cur, end, ctx); } - template template [[nodiscard]] auto list_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> bool{ +#line 123 "regex.h2" + template template [[nodiscard]] auto list_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ return List::match_combine(begin, cur, end, ctx, Other()); } +#line 131 "regex.h2" + template template [[nodiscard]] auto range_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { + return match_greedy(0, begin, cur, end, ctx, Other()); } + + template [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{ + if (-1==max_count) {return true; } + else {return count [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{ + if (-1!=min_count && countmax_count) {return false; } + return true; + } + template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{ + auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; + if ( is_below_upper_bound(count) && r.matched && r.pos != cur) { + return match_greedy(count + 1, begin, std::move(r).pos, end, ctx, Other()); + } + else { + if (is_in_range(count)) { + return Other::match(begin, cur, end, ctx); + } + else { + return match_return(false, end); + } + } + } + +#line 165 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -303,10 +436,16 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } +#line 201 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ +#line 204 "regex.h2" + } + + template auto regex_parser::error(cpp2::in message) & -> void{ + error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)); } template [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{ @@ -316,6 +455,48 @@ namespace regex { return true; } + template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ + + if (c!='{') {return false; } + if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element."); } + + size_t end {CPP2_UFCS(find)(regex, "}", pos)}; + if (end==std::string::npos) {error("Missing closing bracket."); } + + std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; + if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } + + std::string min_count {"-1"}; + std::string max_count {"-1"}; + + size_t sep {CPP2_UFCS(find)(inner, ",")}; + if (sep==std::string::npos) { + min_count = inner; + max_count = inner; + } + else { + std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; + std::string inner_last {trim_copy(CPP2_UFCS(substr)(inner, std::move(sep) + 1))}; + + if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) { + error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); + } + + if (!(CPP2_UFCS(empty)(inner_first))) { + min_count = std::move(inner_first); + } + if (!(CPP2_UFCS(empty)(inner_last))) { + max_count = std::move(inner_last); + } + } + + // TODO: Check 0 <=n <= m + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); + pos = std::move(end); + + return true; + } + template auto regex_parser::parse_until(cpp2::in term) & -> void{ for( ; pos!=CPP2_UFCS(size)(regex); pos += 1 ) { char c {regex[pos]}; @@ -329,7 +510,7 @@ namespace regex { // if is_anchor(c) { continue; } // if is_group(c) { continue; } // if is_handle_special(c) { continue; } - // if is_range(c) { continue; } + if (is_range(c)) {continue; } // if is_special_range(c) { continue; } // No special char push a character match @@ -382,6 +563,7 @@ namespace regex { return "::cpp2::regex::regular_expression>"; } +#line 327 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 87e989871c..496f1ec4e4 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -24,6 +24,11 @@ match_group: @struct type = { matched: bool = false; } +match_return: @struct type = { + matched: bool = false; + pos: Iter = (); +} + match_context: type = { public groups: std::array, max_groups> = (); @@ -48,7 +53,7 @@ matcher_list: type = { private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) First::match(begin, cur, end, ctx, matcher_list()); - private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) true; + private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_return(true, cur); } regular_expression: type = { @@ -60,7 +65,7 @@ regular_expression: type = { cur := str.begin(); end := str.end(); while cur != end next (cur++) { - if Matcher::match(cur, cur, end, ctx) { + if Matcher::match(cur, cur, end, ctx).matched { return true; } } @@ -74,14 +79,15 @@ regular_expression: type = { alternative_matcher_logic: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) match_all(begin, cur, end, ctx, Other()); - private match_all: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Tail) -> bool = { - if First::match(begin, cur, end, ctx, Tail()) { - return true; + private match_all: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Tail) -> match_return = { + r := First::match(begin, cur, end, ctx, Tail()); + if r.matched { + return r; } else { if constexpr 0 != sizeof...(Other) { return match_all(begin, cur, end, ctx, Tail()); } else { - return false; + return match_return(false, end); } } } @@ -89,24 +95,24 @@ alternative_matcher_logic: type = { char_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { if cur != end && cur* == C { return Other::match(begin, cur + 1, end, ctx); } else { - return false; + return match_return(false, end); } } } group_matcher_start_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { ctx.set_group_start(group, cur); return Other::match(begin, cur, end, ctx); } } group_matcher_end_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { ctx.set_group_end(group, cur); return Other::match(begin, cur, end, ctx); } @@ -114,11 +120,43 @@ group_matcher_end_logic: type = { list_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> bool = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { return List::match_combine(begin, cur, end, ctx, Other()); } } +range_matcher_logic: type = { + + + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) + match_greedy(0, begin, cur, end, ctx, Other()); + + private is_below_upper_bound: (count: int) -> bool = { + if -1 == max_count { return true; } + else { return count < max_count; } + } + + private is_in_range: (count: int) -> bool = { + if -1 != min_count && count < min_count { return false; } + if -1 != max_count && count > max_count { return false; } + return true; + } + private match_greedy: (count: int, begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + r:= M::match(begin, cur, end, ctx, matcher_list<>()); + if is_below_upper_bound(count) && r.matched && r.pos != cur { + return match_greedy(count + 1, begin, r.pos, end, ctx, Other()); + } + else { + if is_in_range(count) { + return Other::match(begin, cur, end, ctx); + } + else { + return match_return(false, end); + } + } + } +} + regex_parser_state: @struct type = { cur_match_list: std::vector = (); @@ -165,6 +203,10 @@ regex_parser: type = { this.error_out = e; } + error:(inout this, message: std::string) = { + error_out("Error during parsing of regex '(regex)$' at position '(pos)$': (message)$"); + } + is_alternative: (inout this, c: char) -> bool = { if c != '|' { return false; } @@ -172,6 +214,48 @@ regex_parser: type = { return true; } + is_range: (inout this, c: char) -> bool = { + + if c != '{' { return false; } + if cur_state.empty() { error("'{' without previous element."); } + + end: size_t = regex.find("}", pos); + if end == std::string::npos { error("Missing closing bracket."); } + + inner: std::string = trim_copy(regex.substr(pos + 1, end - pos - 1)); + if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } + + min_count: std::string = "-1"; + max_count: std::string = "-1"; + + sep: size_t = inner.find(","); + if sep == std::string::npos { + min_count = inner; + max_count = inner; + } + else { + inner_first: std::string = trim_copy(inner.substr(0, sep)); + inner_last: std::string = trim_copy(inner.substr(sep + 1)); + + if (inner_first.empty() && inner_last.empty()) { + error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); + } + + if !inner_first.empty() { + min_count = inner_first; + } + if !inner_last.empty() { + max_count = inner_last; + } + } + + // TODO: Check 0 <=n <= m + cur_state.wrap_last( :(inner) -> _ == "::cpp2::regex::range_matcher_logic"); + pos = end; + + return true; + } + parse_until:(inout this, term: char) = { while pos != regex.size() next pos += 1 { c: char = regex[pos]; @@ -185,7 +269,7 @@ regex_parser: type = { // if is_anchor(c) { continue; } // if is_group(c) { continue; } // if is_handle_special(c) { continue; } - // if is_range(c) { continue; } + if is_range(c) { continue; } // if is_special_range(c) { continue; } // No special char push a character match From 545f9054d64f6913e14ca4d951c25de4eab53f14 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 5 Jan 2024 08:58:09 +0100 Subject: [PATCH 031/161] Added remaining regex patterns. --- source/regex.h | 774 +++++++++++++++++++++++++++++++++++++++++++----- source/regex.h2 | 452 +++++++++++++++++++++++++++- 2 files changed, 1143 insertions(+), 83 deletions(-) diff --git a/source/regex.h b/source/regex.h index 15e4eb461e..7546a72fcc 100644 --- a/source/regex.h +++ b/source/regex.h @@ -26,41 +26,82 @@ template class match_return; #line 32 "regex.h2" template class match_context; -#line 48 "regex.h2" +#line 62 "regex.h2" template class matcher_list; -#line 59 "regex.h2" +#line 75 "regex.h2" template class regular_expression; -#line 79 "regex.h2" +#line 99 "regex.h2" template class alternative_matcher_logic; -#line 96 "regex.h2" +#line 118 "regex.h2" +template class any_matcher_logic; + +#line 131 "regex.h2" template class char_matcher_logic; -#line 107 "regex.h2" +#line 143 "regex.h2" +template class single_class_entry; + +#line 149 "regex.h2" +template class range_class_entry; + +#line 155 "regex.h2" +template class and_class_entry; + + +#line 160 "regex.h2" +template class list_class_entry; + + +#line 165 "regex.h2" +template class named_class_entry; + + +#line 189 "regex.h2" +template class class_matcher_logic; + +#line 223 "regex.h2" +template class escaped_char_matcher_logic; + +#line 229 "regex.h2" template class group_matcher_start_logic; -#line 114 "regex.h2" +#line 244 "regex.h2" template class group_matcher_end_logic; -#line 121 "regex.h2" +#line 259 "regex.h2" +template class group_ref_matcher_logic; + + +#line 274 "regex.h2" +template class line_end_matcher_logic; + +#line 288 "regex.h2" +template class line_start_matcher_logic; + +#line 302 "regex.h2" template class list_matcher_logic; -#line 128 "regex.h2" +#line 310 "regex.h2" template class range_matcher_logic; -#line 161 "regex.h2" +#line 360 "regex.h2" +template class special_range_matcher_logic; + + +#line 366 "regex.h2" class regex_parser_state; -#line 191 "regex.h2" +#line 396 "regex.h2" template class regex_parser; -#line 334 "regex.h2" +#line 760 "regex.h2" } } @@ -111,11 +152,14 @@ template class match_context #line 45 "regex.h2" public: [[nodiscard]] auto get_group(auto const& pos) & -> auto; + + public: [[nodiscard]] auto print_ranges(auto const& begin) const& -> bstring; public: match_context() = default; public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(match_context const&) -> void = delete; -#line 46 "regex.h2" + +#line 60 "regex.h2" }; template class matcher_list { @@ -123,15 +167,17 @@ template class matcher_list { public: template [[nodiscard]] static auto match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto; -#line 54 "regex.h2" - private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; +#line 68 "regex.h2" + private: template [[nodiscard]] static auto match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + + private: template [[nodiscard]] static auto match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; - private: template [[nodiscard]] static auto select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; public: matcher_list() = default; public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(matcher_list const&) -> void = delete; -#line 57 "regex.h2" +#line 73 "regex.h2" }; template class regular_expression { @@ -141,111 +187,286 @@ template class regular_expressi public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; -#line 76 "regex.h2" +#line 96 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 77 "regex.h2" +#line 97 "regex.h2" }; template class alternative_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; private: template [[nodiscard]] static auto match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return; + +#line 115 "regex.h2" + public: [[nodiscard]] static auto to_string() -> auto; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; +#line 116 "regex.h2" +}; + +template class any_matcher_logic + { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 94 "regex.h2" +#line 128 "regex.h2" + public: [[nodiscard]] static auto to_string() -> auto; + public: any_matcher_logic() = default; + public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(any_matcher_logic const&) -> void = delete; + +#line 129 "regex.h2" }; template class char_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 140 "regex.h2" + public: [[nodiscard]] static auto to_string() -> auto; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; +#line 141 "regex.h2" +}; + +template class single_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: single_class_entry() = default; + public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(single_class_entry const&) -> void = delete; + +#line 147 "regex.h2" +}; + +template class range_class_entry + { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: range_class_entry() = default; + public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(range_class_entry const&) -> void = delete; + +#line 153 "regex.h2" +}; + +template class and_class_entry { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: and_class_entry() = default; + public: and_class_entry(and_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(and_class_entry const&) -> void = delete; + +#line 158 "regex.h2" +}; + +template class list_class_entry { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: list_class_entry() = default; + public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(list_class_entry const&) -> void = delete; + +#line 163 "regex.h2" +}; + +template class named_class_entry { + public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; + public: [[nodiscard]] static auto to_string() -> auto; + public: named_class_entry() = default; + public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(named_class_entry const&) -> void = delete; -#line 105 "regex.h2" +#line 168 "regex.h2" +}; + +#line 171 "regex.h2" +// Named character classes. +template using digits_class = named_class_entry>; +template using lower_class = named_class_entry>; +template using upper_class = named_class_entry>; + +// Named classes. +template using alnum_class = named_class_entry,upper_class,digits_class>>; +template using alpha_class = named_class_entry,upper_class>>; +template using ascii_class = named_class_entry>; +template using blank_class = named_class_entry>; +template using cntrl_class = named_class_entry,single_class_entry>>; +template using graph_class = named_class_entry>; +template using print_class = named_class_entry>; +template using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; +template using space_class = named_class_entry>; +template using word_class = named_class_entry,single_class_entry>>; +template using xdigit_class = named_class_entry,range_class_entry,digits_class>>; + +template class class_matcher_logic + { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 199 "regex.h2" + private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; + +#line 211 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + public: class_matcher_logic() = default; + public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(class_matcher_logic const&) -> void = delete; + + +#line 221 "regex.h2" +}; + +template class escaped_char_matcher_logic +: public char_matcher_logic { + + public: [[nodiscard]] static auto to_string() -> auto; + public: escaped_char_matcher_logic() = default; + public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; + +#line 227 "regex.h2" }; template class group_matcher_start_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 234 "regex.h2" + public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_start_logic() = default; public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_start_logic const&) -> void = delete; -#line 112 "regex.h2" +#line 242 "regex.h2" }; template class group_matcher_end_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 249 "regex.h2" + public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_end_logic() = default; public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_end_logic const&) -> void = delete; -#line 119 "regex.h2" +#line 257 "regex.h2" +}; + +template class group_ref_matcher_logic { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 271 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + public: group_ref_matcher_logic() = default; + public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(group_ref_matcher_logic const&) -> void = delete; + +#line 272 "regex.h2" +}; + +template class line_end_matcher_logic + { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 285 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; + public: line_end_matcher_logic() = default; + public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(line_end_matcher_logic const&) -> void = delete; + +#line 286 "regex.h2" +}; + +template class line_start_matcher_logic + { + public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 299 "regex.h2" + public: [[nodiscard]] static auto to_string() -> auto; + public: line_start_matcher_logic() = default; + public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(line_start_matcher_logic const&) -> void = delete; + +#line 300 "regex.h2" }; template class list_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + +#line 307 "regex.h2" + public: [[nodiscard]] static auto to_string() -> auto; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; - -#line 126 "regex.h2" +#line 308 "regex.h2" }; template class range_matcher_logic { -#line 131 "regex.h2" +#line 313 "regex.h2" public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; -#line 134 "regex.h2" +#line 316 "regex.h2" private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool; -#line 139 "regex.h2" +#line 321 "regex.h2" private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool; -#line 144 "regex.h2" +#line 326 "regex.h2" private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_6) -> match_return; + +#line 340 "regex.h2" + public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 158 "regex.h2" +#line 358 "regex.h2" }; -#line 161 "regex.h2" +template class special_range_matcher_logic: public range_matcher_logic { + + public: [[nodiscard]] static auto to_string() -> auto; + public: special_range_matcher_logic() = default; + public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(special_range_matcher_logic const&) -> void = delete; + +#line 363 "regex.h2" +}; + +#line 366 "regex.h2" class regex_parser_state { public: std::vector cur_match_list {}; public: std::vector> alternate_match_lists {}; public: auto start_new_list() & -> void; -#line 171 "regex.h2" +#line 376 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 176 "regex.h2" +#line 381 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 180 "regex.h2" +#line 385 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 187 "regex.h2" +#line 392 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 191 "regex.h2" +#line 396 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -256,41 +477,70 @@ template class regex_parser { private: Error_out error_out; + private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; + public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 206 "regex.h2" +#line 413 "regex.h2" + public: [[nodiscard]] auto new_state() & -> regex_parser_state; + +#line 419 "regex.h2" + public: auto restore_state(cpp2::in old_state) & -> void; + +#line 423 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 210 "regex.h2" +#line 427 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 217 "regex.h2" +#line 434 "regex.h2" + public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; + +#line 448 "regex.h2" + public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; + +#line 456 "regex.h2" + public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; + +#line 551 "regex.h2" + public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; + +#line 586 "regex.h2" + public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; + +#line 609 "regex.h2" + public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; + +#line 618 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 259 "regex.h2" +#line 660 "regex.h2" + public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; + +#line 685 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 280 "regex.h2" +#line 706 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 292 "regex.h2" +#line 718 "regex.h2" public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; -#line 295 "regex.h2" +#line 721 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 316 "regex.h2" +#line 742 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 325 "regex.h2" +#line 751 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 334 "regex.h2" +#line 760 "regex.h2" } } @@ -314,26 +564,46 @@ namespace regex { groups[pos].matched = true; } - template [[nodiscard]] auto match_context::get_group(auto const& pos) & -> auto { return &groups[pos]; } + template [[nodiscard]] auto match_context::get_group(auto const& pos) & -> auto { return groups[pos]; } -#line 49 "regex.h2" - template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return select(begin, cur, end, ctx); } + template [[nodiscard]] auto match_context::print_ranges(auto const& begin) const& -> bstring{ + bstring r {""}; + for ( auto const& cur : groups ) { + if (cur.matched) { + r += "(" + cpp2::to_string(std::distance(begin, cur.start)) + "," + cpp2::to_string(std::distance(begin, cur.end)) + ")"; + } + else { + r += "(?,?)"; + } + } + + return r; + } + +#line 63 "regex.h2" + template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_select(begin, cur, end, ctx); } template template [[nodiscard]] auto matcher_list::match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { - return select(begin, cur, end, ctx); } + return match_select(begin, cur, end, ctx); } - template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { + template template [[nodiscard]] auto matcher_list::match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return First::match(begin, cur, end, ctx, matcher_list()); } - template template [[nodiscard]] auto matcher_list::select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_return(true, cur); } + template template [[nodiscard]] auto matcher_list::match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_return(true, cur); } -#line 64 "regex.h2" + template [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); } + +#line 80 "regex.h2" template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ auto cur {CPP2_UFCS(begin)(str)}; auto end {str.end()}; - for( ; cur!=end; (++cur) ) { + for( ; true; (++cur) ) { if (Matcher::match(cur, cur, end, ctx).matched) { return true; } + + if (cur==end) { + break; + } } return false; @@ -341,7 +611,7 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 81 "regex.h2" +#line 101 "regex.h2" template template [[nodiscard]] auto alternative_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_all(begin, cur, end, ctx, Other()); } template template [[nodiscard]] auto alternative_matcher_logic::match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return{ auto r {First::match(begin, cur, end, ctx, Tail())}; @@ -356,7 +626,20 @@ namespace regex { } } -#line 98 "regex.h2" + template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. + +#line 120 "regex.h2" + template template [[nodiscard]] auto any_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ + if (cur!=end) { + return Other::match(begin, cur + 1, end, ctx); + }else { + return match_return(false, end); + } + } + + template [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); } + +#line 133 "regex.h2" template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end && *cur==C) { return Other::match(begin, cur + 1, end, ctx); @@ -364,25 +647,136 @@ namespace regex { return match_return(false, end); } } + template [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); } -#line 108 "regex.h2" +#line 145 "regex.h2" + template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c==C; } + template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } + +#line 151 "regex.h2" + template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return _0<=_1 && _1<=_2; }(); } + template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } + +#line 156 "regex.h2" + template [[nodiscard]] auto and_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } + template [[nodiscard]] auto and_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } + +#line 161 "regex.h2" + template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List==c)); } + template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } + +#line 166 "regex.h2" + template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } + template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } + +#line 191 "regex.h2" + template template [[nodiscard]] auto class_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ + if (cur!=end && negate!=match_any(*cur)) { + return Other::match(begin, cur + 1, end, ctx); + }else { + return match_return(false, end); + } + } + + template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ + bool r {First::includes(c)}; + + if (!(r)) { + if constexpr (0!=sizeof...(Other)) { + r = match_any(c); + } + } + + return r; + } + + template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ + bstring r {"["}; + if (negate) { + r += "^"; + } + r += (bstring() + ... + List::to_string()); + r += "]"; + + return r; + } + +#line 226 "regex.h2" + template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C); } + +#line 230 "regex.h2" template template [[nodiscard]] auto group_matcher_start_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ CPP2_UFCS(set_group_start)(ctx, group, cur); return Other::match(begin, cur, end, ctx); } + template [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{ + if (group!=0) { + return "("; + } + else { + return ""; + } + } -#line 115 "regex.h2" +#line 245 "regex.h2" template template [[nodiscard]] auto group_matcher_end_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ CPP2_UFCS(set_group_end)(ctx, group, cur); return Other::match(begin, cur, end, ctx); } + template [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{ + if (group!=0) { + return ")"; + } + else { + return ""; + } + } + +#line 260 "regex.h2" + template template [[nodiscard]] auto group_ref_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ + auto g {CPP2_UFCS(get_group)(ctx, group)}; + + for( ; g.start!=g.end && cur!=end; (++g.start, ++cur) ) { + if (*g.start!=*cur) { + return match_return(false, end); + } + } + + return Other::match(begin, cur, end, ctx); + } + template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 123 "regex.h2" +#line 276 "regex.h2" + template template [[nodiscard]] auto line_end_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ + if (cur==end || *cur=='\n') { + return Other::match(begin, cur, end, ctx); + } + else { + return match_return(false, end); + } + + } + template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } + +#line 290 "regex.h2" + template template [[nodiscard]] auto line_start_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ + if (cur==begin || *(cur - 1)=='\n') { + return Other::match(begin, cur, end, ctx); + } + else { + return match_return(false, end); + } + + } + template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } + +#line 304 "regex.h2" template template [[nodiscard]] auto list_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ return List::match_combine(begin, cur, end, ctx, Other()); } + template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return List::to_string(); } -#line 131 "regex.h2" +#line 313 "regex.h2" template template [[nodiscard]] auto range_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_greedy(0, begin, cur, end, ctx, Other()); } @@ -410,8 +804,29 @@ namespace regex { } } } + template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ + std::string r {M::to_string()}; + + if (min_count==max_count) { + r += "{" + cpp2::to_string(min_count) + "}"; + } + else {if (min_count==-1) { + r += "{," + cpp2::to_string(max_count) + "}"; + } + else {if (max_count==-1) { + r += "{" + cpp2::to_string(min_count) + ",}"; + } + else { + r += "{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"; + }}} + + return r; + } -#line 165 "regex.h2" +#line 362 "regex.h2" + template [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol; } + +#line 370 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -436,12 +851,22 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 201 "regex.h2" +#line 408 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 204 "regex.h2" +#line 411 "regex.h2" + } + + template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ + regex_parser_state old_state {}; + CPP2_UFCS(swap)(old_state, cur_state); + return old_state; + } + + template auto regex_parser::restore_state(cpp2::in old_state) & -> void{ + cur_state = old_state; } template auto regex_parser::error(cpp2::in message) & -> void{ @@ -455,6 +880,190 @@ namespace regex { return true; } + template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ + auto r {false}; + if (c=='^') { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_start_matcher_logic"); + r = true; + } + else {if (c=='$') { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); + r = true; + }} + + return r; + } + + template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ + if (c=='.') { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::any_matcher_logic"); + return true; + } + return false; + } + + template [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{ + if (c!='[') {return false; } + + std::vector classes {}; + + char c_cur {regex[pos]}; + auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{ + *_1 += 1; + if (*_1>=CPP2_UFCS(size)(_3)) {return false; } + + *_4 = _3[*_1]; + return true; + + }}; + + auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{ + if ((_1 + 1)>=CPP2_UFCS(size)(_2)) {return '\0'; } + else {return regex[pos + 1]; } + }}; + + auto negate {false}; + + auto first {true}; + auto range {false}; + while( next_item() & (c_cur!=']' || first) ) { + if (c_cur=='^') { + negate = true; + continue; // Skip rest of the loop. Also the first update. + } + if (c_cur=='[' && peek_item()==':') { + // We have a character class. + pos += 2; // Skip ':]' + + auto end {CPP2_UFCS(find)(regex, ":]", pos)}; + if (end==std::string::npos) {error_out("Could not find end of character class."); } + + auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; + if (CPP2_UFCS(end)(supported_classes)==std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) { + error_out("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))); + } + + CPP2_UFCS(push_back)(classes, "[:" + cpp2::to_string(name) + ":]"); + + end += 1; // Skip ':' pointing to the ending ']'. + pos = end; + + } + else {if (c_cur=='-') { + if (first) {// Literal if first entry. + CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); + }else { + range = true; + } + } + else { + if (range) {// Modify last element to be a range. + CPP2_UFCS(back)(classes) += "-" + cpp2::to_string(c_cur); + range = false; + } + else { + CPP2_UFCS(push_back)(classes, cpp2::to_string(c_cur)); + } + }} + + first = false; + } + + static_cast(std::move(next_item));// TODO: Use in while is not recognized. + + if (std::move(c_cur)!=']') { + error_out("Error end of character class definition before terminating ']'."); + } + + if (std::move(range)) {// If '-' is last entry treat it as a literal char. + CPP2_UFCS(push_back)(classes, "-"); + } + + for ( auto& cur : classes ) { + if (CPP2_UFCS(starts_with)(cur, "[:")) { + auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; + cur = "::cpp2::regex::" + cpp2::to_string(name) + "_class"; + } + else {if (1!=CPP2_UFCS(size)(cur)) { + cur = "::cpp2::regex::range_class_entry"; + } + else { + cur = "::cpp2::regex::single_class_entry"; + }} + } + + auto inner {join(std::move(classes))}; + CPP2_UFCS(add)(cur_state, "::cpp2::regex::class_matcher_logic"); + return true; + } + + template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ + if (c!='\\') {return false; } + + pos += 1; + + if (pos>=CPP2_UFCS(size)(regex)) {error("Escape without a following character."); } + + char c_next {regex[pos]}; + + if ([_0 = '1', _1 = c_next, _2 = '9']{ return _0<=_1 && _1<=_2; }()) { + int group_id {c_next - '0'}; + + if (group_id>=named_groups) {error("Group reference is used before the group is declared."); } + + CPP2_UFCS(add)(cur_state, "::cpp2::regex::group_ref_matcher_logic"); + } + else {if (std::string::npos!=CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) { + if (c_next=='$') { + // TODO: Provide proper escape for cppfront capture . + CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); + } + else { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::escaped_char_matcher_logic"); + } + } + else {if ('\\'==std::move(c_next)) { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::escaped_char_matcher_logic"); + } + else { + error("Unknown escape."); + }}} + + return true; + } + + template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ + if (c!='(') {return false; } + + auto group_number {named_groups}; + named_groups += 1; + + auto old_state {new_state()}; + + pos += 1; // Skip the '(' + parse_until(')'); + + auto inner {create_matcher_from_state()}; + restore_state(std::move(old_state)); + + std::vector v { + "::cpp2::regex::group_matcher_start_logic", + std::move(inner), + "::cpp2::regex::group_matcher_end_logic"}; + CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v))); + + return true; + } + + template [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{ + if (c=='\'') { + CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); + return true; + } + + return false; + } + template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ if (c!='{') {return false; } @@ -497,6 +1106,31 @@ namespace regex { return true; } + template [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{ + std::string min_range {"0"}; + std::string max_range {"-1"}; + if (c=='*') { + min_range = "0"; + } + else {if (c=='+') { + min_range = "1"; + } + else {if (c=='?') { + min_range = "0"; + max_range = "1"; + } + else { + return false; + }}} + + if (CPP2_UFCS(empty)(cur_state)) { + error("'" + cpp2::to_string(c) + "' without previous element."); + } + + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); + return true; + } + template auto regex_parser::parse_until(cpp2::in term) & -> void{ for( ; pos!=CPP2_UFCS(size)(regex); pos += 1 ) { char c {regex[pos]}; @@ -504,14 +1138,14 @@ namespace regex { if (c==term) {return ; } if (is_alternative(c)) {continue; } - // if is_any(c) { continue; } - // if is_class(c) { continue; } - // if is_escape(c) { continue; } - // if is_anchor(c) { continue; } - // if is_group(c) { continue; } - // if is_handle_special(c) { continue; } + if (is_any(c)) {continue; } + if (is_class(c)) {continue; } + if (is_escape(c)) {continue; } + if (is_anchor(c)) {continue; } + if (is_group(c)) {continue; } + if (is_handle_special(c)) {continue; } if (is_range(c)) {continue; } - // if is_special_range(c) { continue; } + if (is_special_range(c)) {continue; } // No special char push a character match CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); @@ -563,7 +1197,7 @@ namespace regex { return "::cpp2::regex::regular_expression>"; } -#line 327 "regex.h2" +#line 753 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 496f1ec4e4..a4b00f9b2e 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -42,18 +42,34 @@ match_context: type = groups[pos].matched = true; } - get_group: (inout this, pos) groups[pos]&; + get_group: (inout this, pos) groups[pos]; + + print_ranges: (in this, begin) -> bstring = { + r: bstring = ""; + for groups do (cur) { + if cur.matched { + r += "((std::distance(begin, cur.start))$,(std::distance(begin, cur.end))$)"; + } + else { + r += "(?,?)"; + } + } + + return r; + } } matcher_list: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx) select(begin, cur, end, ctx); + match: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_select(begin, cur, end, ctx); match_combine: (begin: Iter, cur: Iter, end: Iter, inout ctx, _: matcher_list) - select(begin, cur, end, ctx); + match_select(begin, cur, end, ctx); - private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) + private match_select: (begin: Iter, cur: Iter, end: Iter, inout ctx) First::match(begin, cur, end, ctx, matcher_list()); - private select: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_return(true, cur); + private match_select: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_return(true, cur); + + to_string: () (bstring() + ... + List::to_string()); } regular_expression: type = { @@ -64,10 +80,14 @@ regular_expression: type = { search: (in this, str: view, inout ctx: context) -> bool = { cur := str.begin(); end := str.end(); - while cur != end next (cur++) { + while true next (cur++) { if Matcher::match(cur, cur, end, ctx).matched { return true; } + + if cur == end { + break; + } } return false; @@ -91,6 +111,21 @@ alternative_matcher_logic: type = { } } } + + to_string: () (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'. +} + +any_matcher_logic: type = +{ + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + if cur != end { + return Other::match(begin, cur + 1, end, ctx); + } else { + return match_return(false, end); + } + } + + to_string: () bstring(1, '.'); } char_matcher_logic: type = @@ -102,6 +137,93 @@ char_matcher_logic: type = return match_return(false, end); } } + to_string: () bstring(1, C); +} + +single_class_entry: type = +{ + includes: (c: CharT) -> _ = c == C; + to_string: () -> _ = bstring(1, C); +} + +range_class_entry: type = +{ + includes: (c: CharT) -> _ = Start <= c <= End; + to_string: () -> _ = "(Start)$-(End)$"; +} + +and_class_entry: type = { + includes: (c: CharT) (false || ... || List::includes(c)); + to_string: () ("" + ... + List::to_string()); +} + +list_class_entry: type = { + includes: (c: CharT) (false || ... || (List == c)); + to_string: () ("" + ... + List); +} + +named_class_entry: type = { + includes: (c: CharT) Inner::includes(c); + to_string: () "[:(Name.data())$:]"; +} + + +// Named character classes. +digits_class : type == named_class_entry>; +lower_class : type == named_class_entry>; +upper_class : type == named_class_entry>; + +// Named classes. +alnum_class : type == named_class_entry, upper_class, digits_class>>; +alpha_class : type == named_class_entry, upper_class>>; +ascii_class : type == named_class_entry>; +blank_class : type == named_class_entry>; +cntrl_class : type == named_class_entry, single_class_entry>>; +graph_class : type == named_class_entry>; +print_class : type == named_class_entry>; +punct_class : type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; +space_class : type == named_class_entry>; +word_class : type == named_class_entry, single_class_entry>>; +xdigit_class : type == named_class_entry, range_class_entry, digits_class>>; + +class_matcher_logic: type = +{ + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + if cur != end && negate != match_any(cur*) { + return Other::match(begin, cur + 1, end, ctx); + } else { + return match_return(false, end); + } + } + + private match_any: (c: CharT) -> bool = { + r: bool = First::includes(c); + + if !r { + if constexpr 0 != sizeof...(Other) { + r = match_any(c); + } + } + + return r; + } + + to_string: () -> bstring = { + r: bstring = "["; + if negate { + r += "^"; + } + r += (bstring() + ... + List::to_string()); + r += "]"; + + return r; + } +} + +escaped_char_matcher_logic: type = +{ + this : char_matcher_logic = (); + to_string: () "\\(C)$"; } group_matcher_start_logic: type = { @@ -109,6 +231,14 @@ group_matcher_start_logic: type = { ctx.set_group_start(group, cur); return Other::match(begin, cur, end, ctx); } + to_string: () -> _ = { + if group != 0 { + return "("; + } + else { + return ""; + } + } } group_matcher_end_logic: type = { @@ -116,6 +246,57 @@ group_matcher_end_logic: type = { ctx.set_group_end(group, cur); return Other::match(begin, cur, end, ctx); } + to_string: () -> _ = { + if group != 0 { + return ")"; + } + else { + return ""; + } + } +} + +group_ref_matcher_logic: type = { + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + g := ctx.get_group(group); + + while g.start != g.end && cur != end next (g.start++, cur++) { + if g.start* != cur* { + return match_return(false, end); + } + } + + return Other::match(begin, cur, end, ctx); + } + to_string: () -> bstring = "\\((group)$)"; +} + +line_end_matcher_logic: type = +{ + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + if cur == end || cur* == '\n' { + return Other::match(begin, cur, end, ctx); + } + else { + return match_return(false, end); + } + + } + to_string: () -> bstring = "\\$"; +} + +line_start_matcher_logic: type = +{ + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + if cur == begin || (cur - 1)* == '\n' { + return Other::match(begin, cur, end, ctx); + } + else { + return match_return(false, end); + } + + } + to_string: () -> _ = bstring(1, '^'); } list_matcher_logic: type = @@ -123,6 +304,7 @@ list_matcher_logic: type = match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { return List::match_combine(begin, cur, end, ctx, Other()); } + to_string: () List::to_string(); } range_matcher_logic: type = { @@ -155,6 +337,29 @@ range_matcher_logic: type = { } } } + to_string: () -> bstring = { + r: std::string = M::to_string(); + + if min_count == max_count { + r += "{(min_count)$}"; + } + else if min_count == -1 { + r += "{,(max_count)$}"; + } + else if max_count == -1 { + r += "{(min_count)$,}"; + } + else { + r += "{(min_count)$,(max_count)$}"; + } + + return r; + } +} + +special_range_matcher_logic: type = { + this: range_matcher_logic = (); + to_string: () M::to_string() + symbol; } @@ -198,11 +403,23 @@ regex_parser: type = { error_out: Error_out; + supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"); + operator=: (out this, r: std::string_view, e: Error_out) = { this.regex = r; this.error_out = e; } + new_state: (inout this) -> regex_parser_state = { + old_state: regex_parser_state = (); + old_state.swap(cur_state); + return old_state; + } + + restore_state: (inout this, old_state: regex_parser_state) = { + cur_state = old_state; + } + error:(inout this, message: std::string) = { error_out("Error during parsing of regex '(regex)$' at position '(pos)$': (message)$"); } @@ -214,6 +431,190 @@ regex_parser: type = { return true; } + is_anchor: (inout this, c: char) -> bool = { + r := false; + if c == '^' { + cur_state.add("::cpp2::regex::line_start_matcher_logic"); + r = true; + } + else if c == '$' { + cur_state.add("::cpp2::regex::line_end_matcher_logic"); + r = true; + } + + return r; + } + + is_any: (inout this, c: char) -> bool = { + if c == '.' { + cur_state.add("::cpp2::regex::any_matcher_logic"); + return true; + } + return false; + } + + is_class: (inout this, c: char) -> bool = { + if c != '[' { return false; } + + classes: std::vector = (); + + c_cur: char = regex[pos]; + next_item:= :() -> bool = { + pos&$* += 1; + if pos&$* >= regex$.size() { return false; } + + c_cur&$* = regex$[pos&$*]; + return true; + + }; + + peek_item:= :() -> char = { + if (pos$ + 1) >= regex$.size() { return '\0'; } + else { return regex[pos + 1]; } + }; + + negate:= false; + + first:= true; + range:= false; + while next_item() & (c_cur != ']' || first) { + if c_cur == '^' { + negate = true; + continue; // Skip rest of the loop. Also the first update. + } + if c_cur == '[' && peek_item() == ':' { + // We have a character class. + pos += 2; // Skip ':]' + + end := regex.find(":]", pos); + if end == std::string::npos { error_out("Could not find end of character class."); } + + name := regex.substr(pos, end - pos); + if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) { + error_out("Unsupported character class. Supported ones are: (join(supported_classes))$"); + } + + classes.push_back("[:(name)$:]"); + + end += 1; // Skip ':' pointing to the ending ']'. + pos = end; + + } + else if c_cur == '-' { + if first { // Literal if first entry. + classes.push_back("(c_cur)$"); + } else { + range = true; + } + } + else { + if range { // Modify last element to be a range. + classes.back() += "-(c_cur)$"; + range = false; + } + else { + classes.push_back("(c_cur)$"); + } + } + + first = false; + } + + _ = next_item; // TODO: Use in while is not recognized. + + if c_cur != ']' { + error_out("Error end of character class definition before terminating ']'."); + } + + if range { // If '-' is last entry treat it as a literal char. + classes.push_back("-"); + } + + for classes do (inout cur) { + if cur.starts_with("[:") { + name := cur.substr(2, cur.size() - 4); + cur = "::cpp2::regex::(name)$_class"; + } + else if 1 != cur.size() { + cur = "::cpp2::regex::range_class_entry"; + } + else { + cur = "::cpp2::regex::single_class_entry"; + } + } + + inner := join(classes); + cur_state.add("::cpp2::regex::class_matcher_logic"); + return true; + } + + is_escape: (inout this, c: char) -> bool = { + if c != '\\' { return false; } + + pos += 1; + + if pos >= regex.size() { error("Escape without a following character."); } + + c_next: char = regex[pos]; + + if '1' <= c_next <= '9' { + group_id: int = c_next - '0'; + + if group_id >= named_groups { error("Group reference is used before the group is declared."); } + + cur_state.add("::cpp2::regex::group_ref_matcher_logic"); + } + else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) { + if c_next == '$' { + // TODO: Provide proper escape for cppfront capture . + cur_state.add("::cpp2::regex::line_end_matcher_logic"); + } + else { + cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); + } + } + else if '\\' == c_next { + cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); + } + else { + error("Unknown escape."); + } + + return true; + } + + is_group: (inout this, c: char) -> bool = { + if c != '(' { return false; } + + group_number := named_groups; + named_groups += 1; + + old_state: _ = new_state(); + + pos += 1; // Skip the '(' + parse_until(')'); + + inner:= create_matcher_from_state(); + restore_state(old_state); + + v: std::vector = ( + "::cpp2::regex::group_matcher_start_logic", + inner, + "::cpp2::regex::group_matcher_end_logic"); + cur_state.add(create_matcher_from_list(v)); + + return true; + } + + is_handle_special: (inout this, c: char) -> bool = { + if c == '\'' { + cur_state.add("::cpp2::regex::char_matcher_logic"); + return true; + } + + return false; + } + is_range: (inout this, c: char) -> bool = { if c != '{' { return false; } @@ -256,6 +657,31 @@ regex_parser: type = { return true; } + is_special_range: (inout this, c: char) -> bool = { + min_range: std::string = "0"; + max_range: std::string = "-1"; + if c == '*' { + min_range = "0"; + } + else if c == '+' { + min_range = "1"; + } + else if c == '?' { + min_range = "0"; + max_range = "1"; + } + else { + return false; + } + + if cur_state.empty() { + error("'(c)$' without previous element."); + } + + cur_state.wrap_last(:(inner) -> _ == "::cpp2::regex::special_range_matcher_logic"); + return true; + } + parse_until:(inout this, term: char) = { while pos != regex.size() next pos += 1 { c: char = regex[pos]; @@ -263,14 +689,14 @@ regex_parser: type = { if c == term { return; } if is_alternative(c) { continue; } - // if is_any(c) { continue; } - // if is_class(c) { continue; } - // if is_escape(c) { continue; } - // if is_anchor(c) { continue; } - // if is_group(c) { continue; } - // if is_handle_special(c) { continue; } + if is_any(c) { continue; } + if is_class(c) { continue; } + if is_escape(c) { continue; } + if is_anchor(c) { continue; } + if is_group(c) { continue; } + if is_handle_special(c) { continue; } if is_range(c) { continue; } - // if is_special_range(c) { continue; } + if is_special_range(c) { continue; } // No special char push a character match cur_state.add("::cpp2::regex::char_matcher_logic"); From a3e35ce43af152c2c99c5a1a9a9c89e2c4144bec Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 5 Jan 2024 09:00:21 +0100 Subject: [PATCH 032/161] Fixes for range matcher. --- source/regex.h | 20 ++++++++++++++++++++ source/regex.h2 | 27 +++++++++++++++++++-------- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/source/regex.h b/source/regex.h index 7546a72fcc..e6ed3a6e38 100644 --- a/source/regex.h +++ b/source/regex.h @@ -791,6 +791,7 @@ namespace regex { return true; } template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{ +<<<<<<< Updated upstream auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; if ( is_below_upper_bound(count) && r.matched && r.pos != cur) { return match_greedy(count + 1, begin, std::move(r).pos, end, ctx, Other()); @@ -802,6 +803,25 @@ namespace regex { else { return match_return(false, end); } +======= + auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; + if ( is_below_upper_bound(count) && r.matched && + (is_below_lower_bound(count) || r.pos!=cur)) + { + auto inner {match_greedy(count + 1, begin, std::move(r).pos, end, ctx, Other())}; + + if (inner.matched) { + return inner; + } + } + + // No match from the recursion. Try to match our tail. + if (is_in_range(count)) { + return Other::match(begin, cur, end, ctx); + } + else { + return match_return(false, end); +>>>>>>> Stashed changes } } template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ diff --git a/source/regex.h2 b/source/regex.h2 index a4b00f9b2e..b4228609bc 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -318,6 +318,11 @@ range_matcher_logic: type = { else { return count < max_count; } } + private is_below_lower_bound: (count: int) -> bool = { + if -1 == min_count { return false; } + else { return count < min_count; } + } + private is_in_range: (count: int) -> bool = { if -1 != min_count && count < min_count { return false; } if -1 != max_count && count > max_count { return false; } @@ -325,16 +330,22 @@ range_matcher_logic: type = { } private match_greedy: (count: int, begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { r:= M::match(begin, cur, end, ctx, matcher_list<>()); - if is_below_upper_bound(count) && r.matched && r.pos != cur { - return match_greedy(count + 1, begin, r.pos, end, ctx, Other()); + if is_below_upper_bound(count) && r.matched && + (is_below_lower_bound(count) || r.pos != cur) + { + inner := match_greedy(count + 1, begin, r.pos, end, ctx, Other()); + + if inner.matched { + return inner; + } + } + + // No match from the recursion. Try to match our tail. + if is_in_range(count) { + return Other::match(begin, cur, end, ctx); } else { - if is_in_range(count) { - return Other::match(begin, cur, end, ctx); - } - else { - return match_return(false, end); - } + return match_return(false, end); } } to_string: () -> bstring = { From e52a217490b391583eca89e13cbb316fda14a290 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 5 Jan 2024 10:03:08 +0100 Subject: [PATCH 033/161] Improved group handling. --- source/regex.h | 286 +++++++++++++++++++++++++----------------------- source/regex.h2 | 35 ++++-- 2 files changed, 178 insertions(+), 143 deletions(-) diff --git a/source/regex.h b/source/regex.h index e6ed3a6e38..27a46cd24f 100644 --- a/source/regex.h +++ b/source/regex.h @@ -26,82 +26,82 @@ template class match_return; #line 32 "regex.h2" template class match_context; -#line 62 "regex.h2" +#line 66 "regex.h2" template class matcher_list; -#line 75 "regex.h2" +#line 79 "regex.h2" template class regular_expression; -#line 99 "regex.h2" +#line 103 "regex.h2" template class alternative_matcher_logic; -#line 118 "regex.h2" +#line 122 "regex.h2" template class any_matcher_logic; -#line 131 "regex.h2" +#line 135 "regex.h2" template class char_matcher_logic; -#line 143 "regex.h2" +#line 147 "regex.h2" template class single_class_entry; -#line 149 "regex.h2" +#line 153 "regex.h2" template class range_class_entry; -#line 155 "regex.h2" +#line 159 "regex.h2" template class and_class_entry; -#line 160 "regex.h2" +#line 164 "regex.h2" template class list_class_entry; -#line 165 "regex.h2" +#line 169 "regex.h2" template class named_class_entry; -#line 189 "regex.h2" +#line 193 "regex.h2" template class class_matcher_logic; -#line 223 "regex.h2" +#line 227 "regex.h2" template class escaped_char_matcher_logic; -#line 229 "regex.h2" +#line 233 "regex.h2" template class group_matcher_start_logic; -#line 244 "regex.h2" +#line 253 "regex.h2" template class group_matcher_end_logic; -#line 259 "regex.h2" +#line 271 "regex.h2" template class group_ref_matcher_logic; -#line 274 "regex.h2" +#line 286 "regex.h2" template class line_end_matcher_logic; -#line 288 "regex.h2" +#line 300 "regex.h2" template class line_start_matcher_logic; -#line 302 "regex.h2" +#line 314 "regex.h2" template class list_matcher_logic; -#line 310 "regex.h2" +#line 322 "regex.h2" template class range_matcher_logic; -#line 360 "regex.h2" +#line 390 "regex.h2" template class special_range_matcher_logic; -#line 366 "regex.h2" +#line 396 "regex.h2" class regex_parser_state; -#line 396 "regex.h2" +#line 426 "regex.h2" template class regex_parser; -#line 760 "regex.h2" +#line 790 "regex.h2" } } @@ -151,6 +151,9 @@ template class match_context public: auto set_group_end(auto const& pos, auto const& end) & -> void; #line 45 "regex.h2" + public: auto set_group_invalid(auto const& pos) & -> void; + +#line 49 "regex.h2" public: [[nodiscard]] auto get_group(auto const& pos) & -> auto; public: [[nodiscard]] auto print_ranges(auto const& begin) const& -> bstring; @@ -159,7 +162,7 @@ template class match_context public: auto operator=(match_context const&) -> void = delete; -#line 60 "regex.h2" +#line 64 "regex.h2" }; template class matcher_list { @@ -167,7 +170,7 @@ template class matcher_list { public: template [[nodiscard]] static auto match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto; -#line 68 "regex.h2" +#line 72 "regex.h2" private: template [[nodiscard]] static auto match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; private: template [[nodiscard]] static auto match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; @@ -177,7 +180,7 @@ template class matcher_list { public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(matcher_list const&) -> void = delete; -#line 73 "regex.h2" +#line 77 "regex.h2" }; template class regular_expression { @@ -187,13 +190,13 @@ template class regular_expressi public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; -#line 96 "regex.h2" +#line 100 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 97 "regex.h2" +#line 101 "regex.h2" }; template class alternative_matcher_logic { @@ -201,39 +204,39 @@ template class alternative_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; private: template [[nodiscard]] static auto match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return; -#line 115 "regex.h2" +#line 119 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 116 "regex.h2" +#line 120 "regex.h2" }; template class any_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 128 "regex.h2" +#line 132 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: any_matcher_logic() = default; public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 129 "regex.h2" +#line 133 "regex.h2" }; template class char_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 140 "regex.h2" +#line 144 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 141 "regex.h2" +#line 145 "regex.h2" }; template class single_class_entry @@ -244,7 +247,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 147 "regex.h2" +#line 151 "regex.h2" }; template class range_class_entry @@ -255,7 +258,7 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 153 "regex.h2" +#line 157 "regex.h2" }; template class and_class_entry { @@ -265,7 +268,7 @@ template class and_class_entry { public: and_class_entry(and_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(and_class_entry const&) -> void = delete; -#line 158 "regex.h2" +#line 162 "regex.h2" }; template class list_class_entry { @@ -275,7 +278,7 @@ template class list_class_entry { public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_class_entry const&) -> void = delete; -#line 163 "regex.h2" +#line 167 "regex.h2" }; template class named_class_entry { @@ -285,10 +288,10 @@ template class named_class_en public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(named_class_entry const&) -> void = delete; -#line 168 "regex.h2" +#line 172 "regex.h2" }; -#line 171 "regex.h2" +#line 175 "regex.h2" // Named character classes. template using digits_class = named_class_entry>; template using lower_class = named_class_entry>; @@ -311,17 +314,17 @@ template class class_matcher_logi { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 199 "regex.h2" +#line 203 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 211 "regex.h2" +#line 215 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 221 "regex.h2" +#line 225 "regex.h2" }; template class escaped_char_matcher_logic @@ -332,108 +335,111 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 227 "regex.h2" +#line 231 "regex.h2" }; template class group_matcher_start_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 234 "regex.h2" +#line 243 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_start_logic() = default; public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_start_logic const&) -> void = delete; -#line 242 "regex.h2" +#line 251 "regex.h2" }; template class group_matcher_end_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 249 "regex.h2" +#line 261 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_end_logic() = default; public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_end_logic const&) -> void = delete; -#line 257 "regex.h2" +#line 269 "regex.h2" }; template class group_ref_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 271 "regex.h2" +#line 283 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 272 "regex.h2" +#line 284 "regex.h2" }; template class line_end_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 285 "regex.h2" +#line 297 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: line_end_matcher_logic() = default; public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 286 "regex.h2" +#line 298 "regex.h2" }; template class line_start_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 299 "regex.h2" +#line 311 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: line_start_matcher_logic() = default; public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 300 "regex.h2" +#line 312 "regex.h2" }; template class list_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 307 "regex.h2" +#line 319 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 308 "regex.h2" +#line 320 "regex.h2" }; template class range_matcher_logic { -#line 313 "regex.h2" +#line 325 "regex.h2" public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; -#line 316 "regex.h2" +#line 328 "regex.h2" private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool; -#line 321 "regex.h2" +#line 333 "regex.h2" + private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool; + +#line 338 "regex.h2" private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool; -#line 326 "regex.h2" - private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_6) -> match_return; +#line 343 "regex.h2" + private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& last_valid, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_7) -> match_return; -#line 340 "regex.h2" +#line 370 "regex.h2" public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 358 "regex.h2" +#line 388 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { @@ -443,30 +449,30 @@ template public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 363 "regex.h2" +#line 393 "regex.h2" }; -#line 366 "regex.h2" +#line 396 "regex.h2" class regex_parser_state { public: std::vector cur_match_list {}; public: std::vector> alternate_match_lists {}; public: auto start_new_list() & -> void; -#line 376 "regex.h2" +#line 406 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 381 "regex.h2" +#line 411 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 385 "regex.h2" +#line 415 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 392 "regex.h2" +#line 422 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 396 "regex.h2" +#line 426 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -481,66 +487,66 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 413 "regex.h2" +#line 443 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 419 "regex.h2" +#line 449 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 423 "regex.h2" +#line 453 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 427 "regex.h2" +#line 457 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 434 "regex.h2" +#line 464 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 448 "regex.h2" +#line 478 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 456 "regex.h2" +#line 486 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 551 "regex.h2" +#line 581 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 586 "regex.h2" +#line 616 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 609 "regex.h2" +#line 639 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 618 "regex.h2" +#line 648 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 660 "regex.h2" +#line 690 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 685 "regex.h2" +#line 715 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 706 "regex.h2" +#line 736 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 718 "regex.h2" +#line 748 "regex.h2" public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; -#line 721 "regex.h2" +#line 751 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 742 "regex.h2" +#line 772 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 751 "regex.h2" +#line 781 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 760 "regex.h2" +#line 790 "regex.h2" } } @@ -564,6 +570,10 @@ namespace regex { groups[pos].matched = true; } + template auto match_context::set_group_invalid(auto const& pos) & -> void{ + groups[pos].matched = false; + } + template [[nodiscard]] auto match_context::get_group(auto const& pos) & -> auto { return groups[pos]; } template [[nodiscard]] auto match_context::print_ranges(auto const& begin) const& -> bstring{ @@ -580,7 +590,7 @@ namespace regex { return r; } -#line 63 "regex.h2" +#line 67 "regex.h2" template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_select(begin, cur, end, ctx); } template template [[nodiscard]] auto matcher_list::match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { @@ -592,7 +602,7 @@ namespace regex { template [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); } -#line 80 "regex.h2" +#line 84 "regex.h2" template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ auto cur {CPP2_UFCS(begin)(str)}; auto end {str.end()}; @@ -611,7 +621,7 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 101 "regex.h2" +#line 105 "regex.h2" template template [[nodiscard]] auto alternative_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_all(begin, cur, end, ctx, Other()); } template template [[nodiscard]] auto alternative_matcher_logic::match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return{ auto r {First::match(begin, cur, end, ctx, Tail())}; @@ -628,7 +638,7 @@ namespace regex { template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. -#line 120 "regex.h2" +#line 124 "regex.h2" template template [[nodiscard]] auto any_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end) { return Other::match(begin, cur + 1, end, ctx); @@ -639,7 +649,7 @@ namespace regex { template [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); } -#line 133 "regex.h2" +#line 137 "regex.h2" template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end && *cur==C) { return Other::match(begin, cur + 1, end, ctx); @@ -649,27 +659,27 @@ namespace regex { } template [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); } -#line 145 "regex.h2" +#line 149 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c==C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 151 "regex.h2" +#line 155 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return _0<=_1 && _1<=_2; }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 156 "regex.h2" +#line 160 "regex.h2" template [[nodiscard]] auto and_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } template [[nodiscard]] auto and_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } -#line 161 "regex.h2" +#line 165 "regex.h2" template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List==c)); } template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } -#line 166 "regex.h2" +#line 170 "regex.h2" template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } -#line 191 "regex.h2" +#line 195 "regex.h2" template template [[nodiscard]] auto class_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end && negate!=match_any(*cur)) { return Other::match(begin, cur + 1, end, ctx); @@ -701,13 +711,18 @@ namespace regex { return r; } -#line 226 "regex.h2" +#line 230 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C); } -#line 230 "regex.h2" +#line 234 "regex.h2" template template [[nodiscard]] auto group_matcher_start_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - CPP2_UFCS(set_group_start)(ctx, group, cur); - return Other::match(begin, cur, end, ctx); + auto r {Other::match(begin, cur, end, ctx)}; + if (r.matched) { + CPP2_UFCS(set_group_start)(ctx, group, cur); + }else { + CPP2_UFCS(set_group_invalid)(ctx, group); + } + return r; } template [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{ if (group!=0) { @@ -718,10 +733,13 @@ namespace regex { } } -#line 245 "regex.h2" +#line 254 "regex.h2" template template [[nodiscard]] auto group_matcher_end_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - CPP2_UFCS(set_group_end)(ctx, group, cur); - return Other::match(begin, cur, end, ctx); + auto r {Other::match(begin, cur, end, ctx)}; + if (r.matched) { + CPP2_UFCS(set_group_end)(ctx, group, cur); + } + return r; } template [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{ if (group!=0) { @@ -732,7 +750,7 @@ namespace regex { } } -#line 260 "regex.h2" +#line 272 "regex.h2" template template [[nodiscard]] auto group_ref_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ auto g {CPP2_UFCS(get_group)(ctx, group)}; @@ -746,7 +764,7 @@ namespace regex { } template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 276 "regex.h2" +#line 288 "regex.h2" template template [[nodiscard]] auto line_end_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur==end || *cur=='\n') { return Other::match(begin, cur, end, ctx); @@ -758,7 +776,7 @@ namespace regex { } template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 290 "regex.h2" +#line 302 "regex.h2" template template [[nodiscard]] auto line_start_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur==begin || *(cur - 1)=='\n') { return Other::match(begin, cur, end, ctx); @@ -770,45 +788,37 @@ namespace regex { } template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 304 "regex.h2" +#line 316 "regex.h2" template template [[nodiscard]] auto list_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ return List::match_combine(begin, cur, end, ctx, Other()); } template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return List::to_string(); } -#line 313 "regex.h2" +#line 325 "regex.h2" template template [[nodiscard]] auto range_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { - return match_greedy(0, begin, cur, end, ctx, Other()); } + return match_greedy(0, begin, cur, cur, end, ctx, Other()); } template [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{ if (-1==max_count) {return true; } else {return count [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{ + if (-1==min_count) {return false; } + else {return count [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{ if (-1!=min_count && countmax_count) {return false; } return true; } - template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{ -<<<<<<< Updated upstream - auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; - if ( is_below_upper_bound(count) && r.matched && r.pos != cur) { - return match_greedy(count + 1, begin, std::move(r).pos, end, ctx, Other()); - } - else { - if (is_in_range(count)) { - return Other::match(begin, cur, end, ctx); - } - else { - return match_return(false, end); - } -======= + template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& last_valid, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{ auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; if ( is_below_upper_bound(count) && r.matched && (is_below_lower_bound(count) || r.pos!=cur)) { - auto inner {match_greedy(count + 1, begin, std::move(r).pos, end, ctx, Other())}; + auto inner {match_greedy(count + 1, begin, std::move(r).pos, cur, end, ctx, Other())}; if (inner.matched) { return inner; @@ -817,11 +827,17 @@ namespace regex { // No match from the recursion. Try to match our tail. if (is_in_range(count)) { - return Other::match(begin, cur, end, ctx); + auto o {Other::match(begin, cur, end, ctx)}; + + if (o.matched) { + // Rematch M to set the groups. + static_cast(M::match(begin, last_valid, end, ctx, matcher_list<>())); + } + + return o; } else { return match_return(false, end); ->>>>>>> Stashed changes } } template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ @@ -843,10 +859,10 @@ namespace regex { return r; } -#line 362 "regex.h2" +#line 392 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol; } -#line 370 "regex.h2" +#line 400 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -871,12 +887,12 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 408 "regex.h2" +#line 438 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 411 "regex.h2" +#line 441 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ @@ -1217,7 +1233,7 @@ namespace regex { return "::cpp2::regex::regular_expression>"; } -#line 753 "regex.h2" +#line 783 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index b4228609bc..8675f2460f 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -42,6 +42,10 @@ match_context: type = groups[pos].matched = true; } + set_group_invalid: (inout this, pos) = { + groups[pos].matched = false; + } + get_group: (inout this, pos) groups[pos]; print_ranges: (in this, begin) -> bstring = { @@ -228,8 +232,13 @@ escaped_char_matcher_logic: type = group_matcher_start_logic: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - ctx.set_group_start(group, cur); - return Other::match(begin, cur, end, ctx); + r := Other::match(begin, cur, end, ctx); + if r.matched { + ctx.set_group_start(group, cur); + } else { + ctx.set_group_invalid(group); + } + return r; } to_string: () -> _ = { if group != 0 { @@ -243,8 +252,11 @@ group_matcher_start_logic: type = { group_matcher_end_logic: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - ctx.set_group_end(group, cur); - return Other::match(begin, cur, end, ctx); + r := Other::match(begin, cur, end, ctx); + if r.matched { + ctx.set_group_end(group, cur); + } + return r; } to_string: () -> _ = { if group != 0 { @@ -311,7 +323,7 @@ range_matcher_logic: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) - match_greedy(0, begin, cur, end, ctx, Other()); + match_greedy(0, begin, cur, cur, end, ctx, Other()); private is_below_upper_bound: (count: int) -> bool = { if -1 == max_count { return true; } @@ -328,12 +340,12 @@ range_matcher_logic: type = { if -1 != max_count && count > max_count { return false; } return true; } - private match_greedy: (count: int, begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + private match_greedy: (count: int, begin: Iter, cur: Iter, last_valid: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { r:= M::match(begin, cur, end, ctx, matcher_list<>()); if is_below_upper_bound(count) && r.matched && (is_below_lower_bound(count) || r.pos != cur) { - inner := match_greedy(count + 1, begin, r.pos, end, ctx, Other()); + inner := match_greedy(count + 1, begin, r.pos, cur, end, ctx, Other()); if inner.matched { return inner; @@ -342,7 +354,14 @@ range_matcher_logic: type = { // No match from the recursion. Try to match our tail. if is_in_range(count) { - return Other::match(begin, cur, end, ctx); + o:= Other::match(begin, cur, end, ctx); + + if o.matched { + // Rematch M to set the groups. + _ = M::match(begin, last_valid, end, ctx, matcher_list<>()); + } + + return o; } else { return match_return(false, end); From 671d6dc34c1197084bf1cf937d5b099bf4c00ec1 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 5 Jan 2024 19:05:36 +0100 Subject: [PATCH 034/161] Proper reset of ranges. --- source/regex.h | 467 ++++++++++++++++++++++++++---------------------- source/regex.h2 | 17 ++ 2 files changed, 266 insertions(+), 218 deletions(-) diff --git a/source/regex.h b/source/regex.h index 27a46cd24f..c6ca4e7ae2 100644 --- a/source/regex.h +++ b/source/regex.h @@ -21,87 +21,87 @@ template class match_group; #line 27 "regex.h2" template class match_return; - + #line 32 "regex.h2" template class match_context; #line 66 "regex.h2" template class matcher_list; + - -#line 79 "regex.h2" +#line 80 "regex.h2" template class regular_expression; -#line 103 "regex.h2" +#line 104 "regex.h2" template class alternative_matcher_logic; -#line 122 "regex.h2" +#line 127 "regex.h2" template class any_matcher_logic; -#line 135 "regex.h2" +#line 142 "regex.h2" template class char_matcher_logic; -#line 147 "regex.h2" +#line 155 "regex.h2" template class single_class_entry; -#line 153 "regex.h2" +#line 161 "regex.h2" template class range_class_entry; -#line 159 "regex.h2" +#line 167 "regex.h2" template class and_class_entry; + - -#line 164 "regex.h2" +#line 172 "regex.h2" template class list_class_entry; + - -#line 169 "regex.h2" +#line 177 "regex.h2" template class named_class_entry; + - -#line 193 "regex.h2" +#line 201 "regex.h2" template class class_matcher_logic; -#line 227 "regex.h2" +#line 236 "regex.h2" template class escaped_char_matcher_logic; -#line 233 "regex.h2" +#line 242 "regex.h2" template class group_matcher_start_logic; + - -#line 253 "regex.h2" +#line 263 "regex.h2" template class group_matcher_end_logic; + - -#line 271 "regex.h2" +#line 282 "regex.h2" template class group_ref_matcher_logic; + - -#line 286 "regex.h2" +#line 298 "regex.h2" template class line_end_matcher_logic; -#line 300 "regex.h2" +#line 313 "regex.h2" template class line_start_matcher_logic; -#line 314 "regex.h2" +#line 328 "regex.h2" template class list_matcher_logic; -#line 322 "regex.h2" +#line 337 "regex.h2" template class range_matcher_logic; -#line 390 "regex.h2" +#line 407 "regex.h2" template class special_range_matcher_logic; + - -#line 396 "regex.h2" +#line 413 "regex.h2" class regex_parser_state; -#line 426 "regex.h2" +#line 443 "regex.h2" template class regex_parser; -#line 790 "regex.h2" +#line 807 "regex.h2" } } @@ -137,8 +137,8 @@ template class match_group { }; template class match_return { - public: bool matched {false}; - public: Iter pos {}; + public: bool matched {false}; + public: Iter pos {}; }; template class match_context @@ -175,12 +175,13 @@ template class matcher_list { private: template [[nodiscard]] static auto match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: matcher_list() = default; public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(matcher_list const&) -> void = delete; -#line 77 "regex.h2" +#line 78 "regex.h2" }; template class regular_expression { @@ -190,13 +191,13 @@ template class regular_expressi public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; -#line 100 "regex.h2" +#line 101 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 101 "regex.h2" +#line 102 "regex.h2" }; template class alternative_matcher_logic { @@ -204,39 +205,44 @@ template class alternative_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; private: template [[nodiscard]] static auto match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return; -#line 119 "regex.h2" +#line 122 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 120 "regex.h2" +#line 125 "regex.h2" }; template class any_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 132 "regex.h2" +#line 137 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; public: any_matcher_logic() = default; public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 133 "regex.h2" +#line 140 "regex.h2" }; template class char_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 144 "regex.h2" +#line 151 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 145 "regex.h2" +#line 153 "regex.h2" }; template class single_class_entry @@ -247,7 +253,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 151 "regex.h2" +#line 159 "regex.h2" }; template class range_class_entry @@ -258,7 +264,7 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 157 "regex.h2" +#line 165 "regex.h2" }; template class and_class_entry { @@ -268,7 +274,7 @@ template class and_class_entry { public: and_class_entry(and_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(and_class_entry const&) -> void = delete; -#line 162 "regex.h2" +#line 170 "regex.h2" }; template class list_class_entry { @@ -278,7 +284,7 @@ template class list_class_entry { public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_class_entry const&) -> void = delete; -#line 167 "regex.h2" +#line 175 "regex.h2" }; template class named_class_entry { @@ -288,10 +294,10 @@ template class named_class_en public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(named_class_entry const&) -> void = delete; -#line 172 "regex.h2" +#line 180 "regex.h2" }; -#line 175 "regex.h2" +#line 183 "regex.h2" // Named character classes. template using digits_class = named_class_entry>; template using lower_class = named_class_entry>; @@ -314,17 +320,18 @@ template class class_matcher_logi { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 203 "regex.h2" +#line 211 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 215 "regex.h2" +#line 223 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 225 "regex.h2" +#line 234 "regex.h2" }; template class escaped_char_matcher_logic @@ -335,111 +342,118 @@ template class escaped_char_matcher_logic public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 231 "regex.h2" +#line 240 "regex.h2" }; template class group_matcher_start_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 243 "regex.h2" +#line 252 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_start_logic() = default; public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_start_logic const&) -> void = delete; -#line 251 "regex.h2" +#line 261 "regex.h2" }; template class group_matcher_end_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 261 "regex.h2" +#line 271 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_end_logic() = default; public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_end_logic const&) -> void = delete; -#line 269 "regex.h2" +#line 280 "regex.h2" }; template class group_ref_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 283 "regex.h2" +#line 294 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> bstring; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 284 "regex.h2" +#line 296 "regex.h2" }; template class line_end_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 297 "regex.h2" +#line 309 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> bstring; public: line_end_matcher_logic() = default; public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 298 "regex.h2" +#line 311 "regex.h2" }; template class line_start_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 311 "regex.h2" +#line 324 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: line_start_matcher_logic() = default; public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 312 "regex.h2" +#line 326 "regex.h2" }; template class list_matcher_logic { public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; -#line 319 "regex.h2" +#line 333 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: list_matcher_logic() = default; public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_matcher_logic const&) -> void = delete; -#line 320 "regex.h2" +#line 335 "regex.h2" }; template class range_matcher_logic { -#line 325 "regex.h2" +#line 340 "regex.h2" public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; -#line 328 "regex.h2" +#line 343 "regex.h2" private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool; -#line 333 "regex.h2" +#line 348 "regex.h2" private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool; -#line 338 "regex.h2" +#line 353 "regex.h2" private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool; -#line 343 "regex.h2" +#line 358 "regex.h2" private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& last_valid, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_7) -> match_return; -#line 370 "regex.h2" +#line 386 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> bstring; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 388 "regex.h2" +#line 405 "regex.h2" }; template class special_range_matcher_logic: public range_matcher_logic { @@ -449,30 +463,30 @@ template public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 393 "regex.h2" +#line 410 "regex.h2" }; -#line 396 "regex.h2" +#line 413 "regex.h2" class regex_parser_state { public: std::vector cur_match_list {}; public: std::vector> alternate_match_lists {}; public: auto start_new_list() & -> void; -#line 406 "regex.h2" +#line 423 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 411 "regex.h2" +#line 428 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 415 "regex.h2" +#line 432 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 422 "regex.h2" +#line 439 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 426 "regex.h2" +#line 443 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -483,70 +497,70 @@ template class regex_parser { private: Error_out error_out; - private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; + private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 443 "regex.h2" +#line 460 "regex.h2" public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 449 "regex.h2" +#line 466 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 453 "regex.h2" +#line 470 "regex.h2" public: auto error(cpp2::in message) & -> void; -#line 457 "regex.h2" +#line 474 "regex.h2" public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 464 "regex.h2" +#line 481 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 478 "regex.h2" +#line 495 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 486 "regex.h2" +#line 503 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 581 "regex.h2" +#line 598 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 616 "regex.h2" +#line 633 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 639 "regex.h2" +#line 656 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 648 "regex.h2" +#line 665 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 690 "regex.h2" +#line 707 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 715 "regex.h2" +#line 732 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 736 "regex.h2" +#line 753 "regex.h2" private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 748 "regex.h2" +#line 765 "regex.h2" public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; -#line 751 "regex.h2" +#line 768 "regex.h2" public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 772 "regex.h2" +#line 789 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 781 "regex.h2" +#line 798 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 790 "regex.h2" +#line 807 "regex.h2" } } @@ -577,7 +591,7 @@ namespace regex { template [[nodiscard]] auto match_context::get_group(auto const& pos) & -> auto { return groups[pos]; } template [[nodiscard]] auto match_context::print_ranges(auto const& begin) const& -> bstring{ - bstring r {""}; + bstring r {""}; for ( auto const& cur : groups ) { if (cur.matched) { r += "(" + cpp2::to_string(std::distance(begin, cur.start)) + "," + cpp2::to_string(std::distance(begin, cur.end)) + ")"; @@ -587,22 +601,23 @@ namespace regex { } } - return r; + return r; } #line 67 "regex.h2" template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_select(begin, cur, end, ctx); } - template template [[nodiscard]] auto matcher_list::match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { + template template [[nodiscard]] auto matcher_list::match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { return match_select(begin, cur, end, ctx); } - template template [[nodiscard]] auto matcher_list::match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { + template template [[nodiscard]] auto matcher_list::match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return First::match(begin, cur, end, ctx, matcher_list()); } template template [[nodiscard]] auto matcher_list::match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_return(true, cur); } + template auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } template [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); } -#line 84 "regex.h2" +#line 85 "regex.h2" template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ auto cur {CPP2_UFCS(begin)(str)}; auto end {str.end()}; @@ -621,75 +636,82 @@ namespace regex { template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 105 "regex.h2" +#line 106 "regex.h2" template template [[nodiscard]] auto alternative_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_all(begin, cur, end, ctx, Other()); } template template [[nodiscard]] auto alternative_matcher_logic::match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return{ - auto r {First::match(begin, cur, end, ctx, Tail())}; + auto r {First::match(begin, cur, end, ctx, Tail())}; if (r.matched) { - return r; + return r; }else { + First::reset_ranges(ctx); + if constexpr (0!=sizeof...(Other)) { - return match_all(begin, cur, end, ctx, Tail()); + return match_all(begin, cur, end, ctx, Tail()); }else { - return match_return(false, end); + return match_return(false, end); } } } + template auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } + template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. -#line 124 "regex.h2" +#line 129 "regex.h2" template template [[nodiscard]] auto any_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end) { - return Other::match(begin, cur + 1, end, ctx); + return Other::match(begin, cur + 1, end, ctx); }else { - return match_return(false, end); + return match_return(false, end); } } + template auto any_matcher_logic::reset_ranges(auto& ctx) -> void{} + template [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); } -#line 137 "regex.h2" +#line 144 "regex.h2" template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end && *cur==C) { - return Other::match(begin, cur + 1, end, ctx); + return Other::match(begin, cur + 1, end, ctx); }else { - return match_return(false, end); + return match_return(false, end); } } + template auto char_matcher_logic::reset_ranges(auto& ctx) -> void{} template [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); } -#line 149 "regex.h2" +#line 157 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c==C; } template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 155 "regex.h2" +#line 163 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return _0<=_1 && _1<=_2; }(); } template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 160 "regex.h2" +#line 168 "regex.h2" template [[nodiscard]] auto and_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } template [[nodiscard]] auto and_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } -#line 165 "regex.h2" +#line 173 "regex.h2" template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List==c)); } template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } -#line 170 "regex.h2" +#line 178 "regex.h2" template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } -#line 195 "regex.h2" +#line 203 "regex.h2" template template [[nodiscard]] auto class_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur!=end && negate!=match_any(*cur)) { - return Other::match(begin, cur + 1, end, ctx); + return Other::match(begin, cur + 1, end, ctx); }else { - return match_return(false, end); + return match_return(false, end); } } template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ - bool r {First::includes(c)}; + bool r {First::includes(c)}; if (!(r)) { if constexpr (0!=sizeof...(Other)) { @@ -697,105 +719,112 @@ namespace regex { } } - return r; + return r; } + template auto class_matcher_logic::reset_ranges(auto& ctx) -> void{} template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ - bstring r {"["}; + bstring r {"["}; if (negate) { r += "^"; } r += (bstring() + ... + List::to_string()); r += "]"; - return r; + return r; } -#line 230 "regex.h2" +#line 239 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C); } -#line 234 "regex.h2" +#line 243 "regex.h2" template template [[nodiscard]] auto group_matcher_start_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - auto r {Other::match(begin, cur, end, ctx)}; + auto r {Other::match(begin, cur, end, ctx)}; if (r.matched) { CPP2_UFCS(set_group_start)(ctx, group, cur); }else { CPP2_UFCS(set_group_invalid)(ctx, group); } - return r; + return r; } + template auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{CPP2_UFCS(set_group_invalid)(ctx, group); } template [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{ if (group!=0) { - return "("; + return "("; } else { - return ""; + return ""; } } -#line 254 "regex.h2" +#line 264 "regex.h2" template template [[nodiscard]] auto group_matcher_end_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - auto r {Other::match(begin, cur, end, ctx)}; + auto r {Other::match(begin, cur, end, ctx)}; if (r.matched) { CPP2_UFCS(set_group_end)(ctx, group, cur); } - return r; + return r; } + template auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{} template [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{ if (group!=0) { - return ")"; + return ")"; } else { - return ""; + return ""; } } -#line 272 "regex.h2" +#line 283 "regex.h2" template template [[nodiscard]] auto group_ref_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - auto g {CPP2_UFCS(get_group)(ctx, group)}; + auto g {CPP2_UFCS(get_group)(ctx, group)}; for( ; g.start!=g.end && cur!=end; (++g.start, ++cur) ) { if (*g.start!=*cur) { - return match_return(false, end); + return match_return(false, end); } } - return Other::match(begin, cur, end, ctx); + return Other::match(begin, cur, end, ctx); } + template auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{} template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return "\\(" + cpp2::to_string(group) + ")"; } -#line 288 "regex.h2" +#line 300 "regex.h2" template template [[nodiscard]] auto line_end_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur==end || *cur=='\n') { - return Other::match(begin, cur, end, ctx); + return Other::match(begin, cur, end, ctx); } else { - return match_return(false, end); + return match_return(false, end); } } + template auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{} template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } -#line 302 "regex.h2" +#line 315 "regex.h2" template template [[nodiscard]] auto line_start_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ if (cur==begin || *(cur - 1)=='\n') { - return Other::match(begin, cur, end, ctx); + return Other::match(begin, cur, end, ctx); } else { - return match_return(false, end); + return match_return(false, end); } } + template auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{} template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 316 "regex.h2" +#line 330 "regex.h2" template template [[nodiscard]] auto list_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - return List::match_combine(begin, cur, end, ctx, Other()); + return List::match_combine(begin, cur, end, ctx, Other()); } + template auto list_matcher_logic::reset_ranges(auto& ctx) -> void{List::reset_ranges(ctx); } template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return List::to_string(); } -#line 325 "regex.h2" - template template [[nodiscard]] auto range_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { +#line 340 "regex.h2" + template template [[nodiscard]] auto range_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_greedy(0, begin, cur, cur, end, ctx, Other()); } template [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{ @@ -811,37 +840,39 @@ namespace regex { template [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{ if (-1!=min_count && countmax_count) {return false; } - return true; + return true; } template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& last_valid, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{ - auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; - if ( is_below_upper_bound(count) && r.matched && - (is_below_lower_bound(count) || r.pos!=cur)) + auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; + if ( is_below_upper_bound(count) && r.matched && + (is_below_lower_bound(count) || r.pos!=cur)) { - auto inner {match_greedy(count + 1, begin, std::move(r).pos, cur, end, ctx, Other())}; + auto inner {match_greedy(count + 1, begin, std::move(r).pos, cur, end, ctx, Other())}; if (inner.matched) { - return inner; + return inner; } } // No match from the recursion. Try to match our tail. if (is_in_range(count)) { - auto o {Other::match(begin, cur, end, ctx)}; + auto o {Other::match(begin, cur, end, ctx)}; if (o.matched) { // Rematch M to set the groups. + M::reset_ranges(ctx); static_cast(M::match(begin, last_valid, end, ctx, matcher_list<>())); } - return o; + return o; } else { - return match_return(false, end); + return match_return(false, end); } } + template auto range_matcher_logic::reset_ranges(auto& ctx) -> void{M::reset_ranges(ctx); } template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ - std::string r {M::to_string()}; + std::string r {M::to_string()}; if (min_count==max_count) { r += "{" + cpp2::to_string(min_count) + "}"; @@ -856,13 +887,13 @@ namespace regex { r += "{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"; }}} - return r; + return r; } -#line 392 "regex.h2" +#line 409 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol; } -#line 400 "regex.h2" +#line 417 "regex.h2" auto regex_parser_state::start_new_list() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); @@ -887,18 +918,18 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 438 "regex.h2" +#line 455 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 441 "regex.h2" +#line 458 "regex.h2" } template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ - regex_parser_state old_state {}; + regex_parser_state old_state {}; CPP2_UFCS(swap)(old_state, cur_state); - return old_state; + return old_state; } template auto regex_parser::restore_state(cpp2::in old_state) & -> void{ @@ -913,11 +944,11 @@ namespace regex { if (c!='|') {return false; } CPP2_UFCS(start_new_list)(cur_state); - return true; + return true; } template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ - auto r {false}; + auto r {false}; if (c=='^') { CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_start_matcher_logic"); r = true; @@ -927,41 +958,41 @@ namespace regex { r = true; }} - return r; + return r; } template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ if (c=='.') { CPP2_UFCS(add)(cur_state, "::cpp2::regex::any_matcher_logic"); - return true; + return true; } - return false; + return false; } template [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{ if (c!='[') {return false; } - std::vector classes {}; + std::vector classes {}; - char c_cur {regex[pos]}; + char c_cur {regex[pos]}; auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{ *_1 += 1; if (*_1>=CPP2_UFCS(size)(_3)) {return false; } *_4 = _3[*_1]; - return true; + return true; - }}; + }}; auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{ if ((_1 + 1)>=CPP2_UFCS(size)(_2)) {return '\0'; } else {return regex[pos + 1]; } - }}; + }}; - auto negate {false}; + auto negate {false}; - auto first {true}; - auto range {false}; + auto first {true}; + auto range {false}; while( next_item() & (c_cur!=']' || first) ) { if (c_cur=='^') { negate = true; @@ -971,10 +1002,10 @@ namespace regex { // We have a character class. pos += 2; // Skip ':]' - auto end {CPP2_UFCS(find)(regex, ":]", pos)}; + auto end {CPP2_UFCS(find)(regex, ":]", pos)}; if (end==std::string::npos) {error_out("Could not find end of character class."); } - auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; + auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; if (CPP2_UFCS(end)(supported_classes)==std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) { error_out("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))); } @@ -1017,7 +1048,7 @@ namespace regex { for ( auto& cur : classes ) { if (CPP2_UFCS(starts_with)(cur, "[:")) { - auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; + auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; cur = "::cpp2::regex::" + cpp2::to_string(name) + "_class"; } else {if (1!=CPP2_UFCS(size)(cur)) { @@ -1028,9 +1059,9 @@ namespace regex { }} } - auto inner {join(std::move(classes))}; + auto inner {join(std::move(classes))}; CPP2_UFCS(add)(cur_state, "::cpp2::regex::class_matcher_logic"); - return true; + return true; } template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ @@ -1040,10 +1071,10 @@ namespace regex { if (pos>=CPP2_UFCS(size)(regex)) {error("Escape without a following character."); } - char c_next {regex[pos]}; + char c_next {regex[pos]}; if ([_0 = '1', _1 = c_next, _2 = '9']{ return _0<=_1 && _1<=_2; }()) { - int group_id {c_next - '0'}; + int group_id {c_next - '0'}; if (group_id>=named_groups) {error("Group reference is used before the group is declared."); } @@ -1065,39 +1096,39 @@ namespace regex { error("Unknown escape."); }}} - return true; + return true; } template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ if (c!='(') {return false; } - auto group_number {named_groups}; + auto group_number {named_groups}; named_groups += 1; - auto old_state {new_state()}; + auto old_state {new_state()}; pos += 1; // Skip the '(' parse_until(')'); - auto inner {create_matcher_from_state()}; + auto inner {create_matcher_from_state()}; restore_state(std::move(old_state)); std::vector v { - "::cpp2::regex::group_matcher_start_logic", - std::move(inner), - "::cpp2::regex::group_matcher_end_logic"}; + "::cpp2::regex::group_matcher_start_logic", + std::move(inner), + "::cpp2::regex::group_matcher_end_logic"}; CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v))); - return true; + return true; } template [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{ if (c=='\'') { CPP2_UFCS(add)(cur_state, "::cpp2::regex::char_matcher_logic"); - return true; + return true; } - return false; + return false; } template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ @@ -1105,23 +1136,23 @@ namespace regex { if (c!='{') {return false; } if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element."); } - size_t end {CPP2_UFCS(find)(regex, "}", pos)}; + size_t end {CPP2_UFCS(find)(regex, "}", pos)}; if (end==std::string::npos) {error("Missing closing bracket."); } - std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; + std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } - std::string min_count {"-1"}; - std::string max_count {"-1"}; + std::string min_count {"-1"}; + std::string max_count {"-1"}; - size_t sep {CPP2_UFCS(find)(inner, ",")}; + size_t sep {CPP2_UFCS(find)(inner, ",")}; if (sep==std::string::npos) { min_count = inner; max_count = inner; } else { - std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; - std::string inner_last {trim_copy(CPP2_UFCS(substr)(inner, std::move(sep) + 1))}; + std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; + std::string inner_last {trim_copy(CPP2_UFCS(substr)(inner, std::move(sep) + 1))}; if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); @@ -1139,12 +1170,12 @@ namespace regex { CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); pos = std::move(end); - return true; + return true; } template [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{ - std::string min_range {"0"}; - std::string max_range {"-1"}; + std::string min_range {"0"}; + std::string max_range {"-1"}; if (c=='*') { min_range = "0"; } @@ -1156,7 +1187,7 @@ namespace regex { max_range = "1"; } else { - return false; + return false; }}} if (CPP2_UFCS(empty)(cur_state)) { @@ -1164,7 +1195,7 @@ namespace regex { } CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); - return true; + return true; } template auto regex_parser::parse_until(cpp2::in term) & -> void{ @@ -1200,28 +1231,28 @@ namespace regex { return r; } - template [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { + template [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return "::cpp2::regex::list_matcher_logic>"; } template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ if (0==CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } - std::string matcher {"::cpp2::regex::alternative_matcher_logic void{ *_1 += *_2 + create_matcher_from_list(list); *_2 = ", "; - }}; + }}; - auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; + auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; for( ; cur!=CPP2_UFCS(rend)(cur_state.alternate_match_lists); (++cur) ) { add(*cur); } if (0!=CPP2_UFCS(size)(cur_state.cur_match_list)) {std::move(add)(cur_state.cur_match_list); } matcher += ">"; - return matcher; + return matcher; } template [[nodiscard]] auto regex_parser::parse() & -> std::string{ @@ -1230,10 +1261,10 @@ namespace regex { auto inner {create_matcher_from_state()}; inner = "::cpp2::regex::group_matcher_start_logic, " + cpp2::to_string(inner) + ", ::cpp2::regex::group_matcher_end_logic"; - return "::cpp2::regex::regular_expression>"; + return "::cpp2::regex::regular_expression>"; } -#line 783 "regex.h2" +#line 800 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 8675f2460f..0d92099275 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -73,6 +73,7 @@ matcher_list: type = { First::match(begin, cur, end, ctx, matcher_list()); private match_select: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_return(true, cur); + reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...); to_string: () (bstring() + ... + List::to_string()); } @@ -108,6 +109,8 @@ alternative_matcher_logic: type = { if r.matched { return r; } else { + First::reset_ranges(ctx); + if constexpr 0 != sizeof...(Other) { return match_all(begin, cur, end, ctx, Tail()); } else { @@ -116,6 +119,8 @@ alternative_matcher_logic: type = { } } + reset_ranges: (inout ctx) = (List::reset_ranges(ctx) , ...); + to_string: () (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'. } @@ -129,6 +134,8 @@ any_matcher_logic: type = } } + reset_ranges: (inout ctx) = {} + to_string: () bstring(1, '.'); } @@ -141,6 +148,7 @@ char_matcher_logic: type = return match_return(false, end); } } + reset_ranges: (inout ctx) = {} to_string: () bstring(1, C); } @@ -212,6 +220,7 @@ class_matcher_logic: type = return r; } + reset_ranges: (inout ctx) = {} to_string: () -> bstring = { r: bstring = "["; if negate { @@ -240,6 +249,7 @@ group_matcher_start_logic: type = { } return r; } + reset_ranges: (inout ctx) = { ctx.set_group_invalid(group); } to_string: () -> _ = { if group != 0 { return "("; @@ -258,6 +268,7 @@ group_matcher_end_logic: type = { } return r; } + reset_ranges: (inout ctx) = {} to_string: () -> _ = { if group != 0 { return ")"; @@ -280,6 +291,7 @@ group_ref_matcher_logic: type = { return Other::match(begin, cur, end, ctx); } + reset_ranges: (inout ctx) = {} to_string: () -> bstring = "\\((group)$)"; } @@ -294,6 +306,7 @@ line_end_matcher_logic: type = } } + reset_ranges: (inout ctx) = {} to_string: () -> bstring = "\\$"; } @@ -308,6 +321,7 @@ line_start_matcher_logic: type = } } + reset_ranges: (inout ctx) = {} to_string: () -> _ = bstring(1, '^'); } @@ -316,6 +330,7 @@ list_matcher_logic: type = match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { return List::match_combine(begin, cur, end, ctx, Other()); } + reset_ranges: (inout ctx) = { List::reset_ranges(ctx); } to_string: () List::to_string(); } @@ -358,6 +373,7 @@ range_matcher_logic: type = { if o.matched { // Rematch M to set the groups. + M::reset_ranges(ctx); _ = M::match(begin, last_valid, end, ctx, matcher_list<>()); } @@ -367,6 +383,7 @@ range_matcher_logic: type = { return match_return(false, end); } } + reset_ranges: (inout ctx) = { M::reset_ranges(ctx); } to_string: () -> bstring = { r: std::string = M::to_string(); From 1e0feccc9d931ab3046d0a4d1efb93c8c295e747 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 12 Jan 2024 10:31:19 +0100 Subject: [PATCH 035/161] Refactor. --- source/regex.h2 | 67 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 46 insertions(+), 21 deletions(-) diff --git a/source/regex.h2 b/source/regex.h2 index 0d92099275..59df42f0c0 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -17,6 +17,13 @@ regex: namespace = { view: type == std::basic_string_view; bstring: type == std::basic_string; +//----------------------------------------------------------------------- +// +// Helper structures for the expression matching. +// +//----------------------------------------------------------------------- +// + match_group: @struct type = { start: Iter = (); end: Iter = (); @@ -31,23 +38,29 @@ match_return: @struct type = { match_context: type = { - public groups: std::array, max_groups> = (); + private groups: std::array, max_groups> = (); + + // Getter and setter for groups + // + get_group: (in this, group) groups[group]; - set_group_start: (inout this, pos, start) = { - groups[pos].start = start; + set_group_end: (inout this, group, end) = { + groups[group].end = end; + groups[group].matched = true; } - set_group_end: (inout this, pos, end) = { - groups[pos].end = end; - groups[pos].matched = true; + set_group_invalid: (inout this, group) = { + groups[group].matched = false; } - set_group_invalid: (inout this, pos) = { - groups[pos].matched = false; + set_group_start: (inout this, group, start) = { + groups[group].start = start; } - get_group: (inout this, pos) groups[pos]; + size: (in this) max_groups; + // Misc functions + // print_ranges: (in this, begin) -> bstring = { r: bstring = ""; for groups do (cur) { @@ -63,20 +76,28 @@ match_context: type = } } -matcher_list: type = { +// Represents the remainder of the regular expression. +// +// A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found. +// Otherwise the matcher can try a different alternative. +// +match_tail: type = { match: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_select(begin, cur, end, ctx); - match_combine: (begin: Iter, cur: Iter, end: Iter, inout ctx, _: matcher_list) + match_combine: (begin: Iter, cur: Iter, end: Iter, inout ctx, _: match_tail) match_select(begin, cur, end, ctx); private match_select: (begin: Iter, cur: Iter, end: Iter, inout ctx) - First::match(begin, cur, end, ctx, matcher_list()); + First::match(begin, cur, end, ctx, match_tail()); private match_select: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_return(true, cur); reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...); - to_string: () (bstring() + ... + List::to_string()); + to_string: () (bstring() + ... + List::to_string()); } +no_match_tail: type == match_tail; + +// TODO regular_expression: type = { Iter: type == view::const_iterator; @@ -101,18 +122,22 @@ regular_expression: type = { to_string: (in this) -> _ = Matcher::to_string(); } +// Regex syntax: | +// Example: ab|ba +// +// Non greedy implementation. First alternative that matches is chosen. alternative_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) match_all(begin, cur, end, ctx, Other()); - private match_all: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Tail) -> match_return = { - r := First::match(begin, cur, end, ctx, Tail()); + match: (begin: Iter, cur: Iter, end: Iter, inout ctx, tail) match_all(begin, cur, end, ctx, tail); + private match_all: (begin: Iter, cur: Iter, end: Iter, inout ctx, tail) -> match_return = { + r := First::match(begin, cur, end, ctx, tail); if r.matched { return r; } else { First::reset_ranges(ctx); if constexpr 0 != sizeof...(Other) { - return match_all(begin, cur, end, ctx, Tail()); + return match_all(begin, cur, end, ctx, tail); } else { return match_return(false, end); } @@ -356,7 +381,7 @@ range_matcher_logic: type = { return true; } private match_greedy: (count: int, begin: Iter, cur: Iter, last_valid: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - r:= M::match(begin, cur, end, ctx, matcher_list<>()); + r:= M::match(begin, cur, end, ctx, no_match_tail()); if is_below_upper_bound(count) && r.matched && (is_below_lower_bound(count) || r.pos != cur) { @@ -374,7 +399,7 @@ range_matcher_logic: type = { if o.matched { // Rematch M to set the groups. M::reset_ranges(ctx); - _ = M::match(begin, last_valid, end, ctx, matcher_list<>()); + _ = M::match(begin, last_valid, end, ctx, no_match_tail()); } return o; @@ -763,7 +788,7 @@ regex_parser: type = { } create_matcher_from_list: (inout this, list) - "::cpp2::regex::list_matcher_logic>" + "::cpp2::regex::list_matcher_logic>" create_matcher_from_state: (inout this) -> std::string = { if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } @@ -792,7 +817,7 @@ regex_parser: type = { inner := create_matcher_from_state(); inner = "::cpp2::regex::group_matcher_start_logic, (inner)$, ::cpp2::regex::group_matcher_end_logic"; - return "::cpp2::regex::regular_expression>"; + return "::cpp2::regex::regular_expression>"; } } From 42287e8031684a2ded7a15f1a3bbe82f1757d522 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 12 Jan 2024 10:47:31 +0100 Subject: [PATCH 036/161] Moved begin and end to context. --- source/regex.h2 | 134 +++++++++++++++++++++++++++--------------------- 1 file changed, 75 insertions(+), 59 deletions(-) diff --git a/source/regex.h2 b/source/regex.h2 index 59df42f0c0..7b85c479f1 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -38,14 +38,27 @@ match_return: @struct type = { match_context: type = { + public begin: Iter; + public end: Iter; + private groups: std::array, max_groups> = (); + operator=: (out this, begin_: Iter, end_: Iter) = { + begin = begin_; + end = end_; + } + + operator=: (out this) = { // TODO: Remove + begin = (); + end = (); + } + // Getter and setter for groups // get_group: (in this, group) groups[group]; - set_group_end: (inout this, group, end) = { - groups[group].end = end; + set_group_end: (inout this, group, pos) = { + groups[group].end = pos; groups[group].matched = true; } @@ -53,15 +66,15 @@ match_context: type = groups[group].matched = false; } - set_group_start: (inout this, group, start) = { - groups[group].start = start; + set_group_start: (inout this, group, pos) = { + groups[group].start = pos; } size: (in this) max_groups; // Misc functions // - print_ranges: (in this, begin) -> bstring = { + print_ranges: (in this, begin_) -> bstring = { // TODO: Remove Argument r: bstring = ""; for groups do (cur) { if cur.matched { @@ -82,14 +95,14 @@ match_context: type = // Otherwise the matcher can try a different alternative. // match_tail: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_select(begin, cur, end, ctx); + match: (cur: Iter, inout ctx) match_select(cur, ctx); - match_combine: (begin: Iter, cur: Iter, end: Iter, inout ctx, _: match_tail) - match_select(begin, cur, end, ctx); + match_combine: (cur: Iter, inout ctx, _: match_tail) + match_select(cur, ctx); - private match_select: (begin: Iter, cur: Iter, end: Iter, inout ctx) - First::match(begin, cur, end, ctx, match_tail()); - private match_select: (begin: Iter, cur: Iter, end: Iter, inout ctx) match_return(true, cur); + private match_select: (cur: Iter, inout ctx) + First::match(cur, ctx, match_tail()); + private match_select: (cur: Iter, inout ctx) match_return(true, cur); reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...); to_string: () (bstring() + ... + List::to_string()); @@ -104,14 +117,15 @@ regular_expression: type = { context: type == match_context; search: (in this, str: view, inout ctx: context) -> bool = { + ctx.begin = str.begin(); + ctx.end = str.end(); cur := str.begin(); - end := str.end(); while true next (cur++) { - if Matcher::match(cur, cur, end, ctx).matched { + if Matcher::match(cur, ctx).matched { return true; } - if cur == end { + if cur == ctx.end { break; } } @@ -125,21 +139,23 @@ regular_expression: type = { // Regex syntax: | // Example: ab|ba // -// Non greedy implementation. First alternative that matches is chosen. +// Non greedy implementation. First alternative that matches is chosen. alternative_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, tail) match_all(begin, cur, end, ctx, tail); - private match_all: (begin: Iter, cur: Iter, end: Iter, inout ctx, tail) -> match_return = { - r := First::match(begin, cur, end, ctx, tail); + match: (cur: Iter, inout ctx, tail) + match_all(cur, ctx, tail); + + private match_all: (cur: Iter, inout ctx, tail) -> match_return = { + r := First::match(cur, ctx, tail); if r.matched { return r; } else { First::reset_ranges(ctx); - if constexpr 0 != sizeof...(Other) { - return match_all(begin, cur, end, ctx, tail); + if constexpr 0 != sizeof...(Next) { + return match_all(cur, ctx, tail); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } } @@ -151,11 +167,11 @@ alternative_matcher_logic: type = { any_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - if cur != end { - return Other::match(begin, cur + 1, end, ctx); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + if cur != ctx.end { + return Other::match(cur + 1, ctx); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } @@ -166,11 +182,11 @@ any_matcher_logic: type = char_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - if cur != end && cur* == C { - return Other::match(begin, cur + 1, end, ctx); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + if cur != ctx.end && cur* == C { + return Other::match(cur + 1, ctx); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } reset_ranges: (inout ctx) = {} @@ -225,11 +241,11 @@ xdigit_class : type == named_class_entry type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - if cur != end && negate != match_any(cur*) { - return Other::match(begin, cur + 1, end, ctx); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + if cur != ctx.end && negate != match_any(cur*) { + return Other::match(cur + 1, ctx); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } @@ -265,8 +281,8 @@ escaped_char_matcher_logic: type = } group_matcher_start_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - r := Other::match(begin, cur, end, ctx); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + r := Other::match(cur, ctx); if r.matched { ctx.set_group_start(group, cur); } else { @@ -286,8 +302,8 @@ group_matcher_start_logic: type = { } group_matcher_end_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - r := Other::match(begin, cur, end, ctx); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + r := Other::match(cur, ctx); if r.matched { ctx.set_group_end(group, cur); } @@ -305,16 +321,16 @@ group_matcher_end_logic: type = { } group_ref_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { g := ctx.get_group(group); - while g.start != g.end && cur != end next (g.start++, cur++) { + while g.start != g.end && cur != ctx.end next (g.start++, cur++) { if g.start* != cur* { - return match_return(false, end); + return match_return(false, ctx.end); } } - return Other::match(begin, cur, end, ctx); + return Other::match(cur, ctx); } reset_ranges: (inout ctx) = {} to_string: () -> bstring = "\\((group)$)"; @@ -322,12 +338,12 @@ group_ref_matcher_logic: type = { line_end_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - if cur == end || cur* == '\n' { - return Other::match(begin, cur, end, ctx); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + if cur == ctx.end || cur* == '\n' { + return Other::match(cur, ctx); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } @@ -337,12 +353,12 @@ line_end_matcher_logic: type = line_start_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - if cur == begin || (cur - 1)* == '\n' { - return Other::match(begin, cur, end, ctx); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + if cur == ctx.begin || (cur - 1)* == '\n' { + return Other::match(cur, ctx); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } @@ -352,8 +368,8 @@ line_start_matcher_logic: type = list_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - return List::match_combine(begin, cur, end, ctx, Other()); + match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + return List::match_combine(cur, ctx, Other()); } reset_ranges: (inout ctx) = { List::reset_ranges(ctx); } to_string: () List::to_string(); @@ -362,8 +378,8 @@ list_matcher_logic: type = range_matcher_logic: type = { - match: (begin: Iter, cur: Iter, end: Iter, inout ctx, _ : Other) - match_greedy(0, begin, cur, cur, end, ctx, Other()); + match: (cur: Iter, inout ctx, _ : Other) + match_greedy(0, cur, cur, ctx, Other()); private is_below_upper_bound: (count: int) -> bool = { if -1 == max_count { return true; } @@ -380,12 +396,12 @@ range_matcher_logic: type = { if -1 != max_count && count > max_count { return false; } return true; } - private match_greedy: (count: int, begin: Iter, cur: Iter, last_valid: Iter, end: Iter, inout ctx, _ : Other) -> match_return = { - r:= M::match(begin, cur, end, ctx, no_match_tail()); + private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, _ : Other) -> match_return = { + r:= M::match(cur, ctx, no_match_tail()); if is_below_upper_bound(count) && r.matched && (is_below_lower_bound(count) || r.pos != cur) { - inner := match_greedy(count + 1, begin, r.pos, cur, end, ctx, Other()); + inner := match_greedy(count + 1, r.pos, cur, ctx, Other()); if inner.matched { return inner; @@ -394,18 +410,18 @@ range_matcher_logic: type = { // No match from the recursion. Try to match our tail. if is_in_range(count) { - o:= Other::match(begin, cur, end, ctx); + o:= Other::match(cur, ctx); if o.matched { // Rematch M to set the groups. M::reset_ranges(ctx); - _ = M::match(begin, last_valid, end, ctx, no_match_tail()); + _ = M::match(last_valid, ctx, no_match_tail()); } return o; } else { - return match_return(false, end); + return match_return(false, ctx.end); } } reset_ranges: (inout ctx) = { M::reset_ranges(ctx); } From 526f40568ed156948ff2f9aae49ee04372c4d8a7 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 12 Jan 2024 11:08:37 +0100 Subject: [PATCH 037/161] Removed Iter as template argument. --- source/regex.h2 | 54 ++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/source/regex.h2 b/source/regex.h2 index 7b85c479f1..b077687c56 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -95,14 +95,14 @@ match_context: type = // Otherwise the matcher can try a different alternative. // match_tail: type = { - match: (cur: Iter, inout ctx) match_select(cur, ctx); + match: (cur, inout ctx) match_select(cur, ctx); - match_combine: (cur: Iter, inout ctx, _: match_tail) - match_select(cur, ctx); + match_combine: (cur, inout ctx, _: match_tail) + match_select(cur, ctx); - private match_select: (cur: Iter, inout ctx) + private match_select: (cur, inout ctx) First::match(cur, ctx, match_tail()); - private match_select: (cur: Iter, inout ctx) match_return(true, cur); + private match_select: (cur, inout ctx) match_return(true, cur); reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...); to_string: () (bstring() + ... + List::to_string()); @@ -142,10 +142,10 @@ regular_expression: type = { // Non greedy implementation. First alternative that matches is chosen. alternative_matcher_logic: type = { - match: (cur: Iter, inout ctx, tail) - match_all(cur, ctx, tail); + match: (cur, inout ctx, tail) + match_all(cur, ctx, tail); - private match_all: (cur: Iter, inout ctx, tail) -> match_return = { + private match_all: (cur, inout ctx, tail) -> _ = { r := First::match(cur, ctx, tail); if r.matched { return r; @@ -153,9 +153,9 @@ alternative_matcher_logic: type = { First::reset_ranges(ctx); if constexpr 0 != sizeof...(Next) { - return match_all(cur, ctx, tail); + return match_all(cur, ctx, tail); } else { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } } @@ -167,11 +167,11 @@ alternative_matcher_logic: type = { any_matcher_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { if cur != ctx.end { return Other::match(cur + 1, ctx); } else { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } @@ -182,11 +182,11 @@ any_matcher_logic: type = char_matcher_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { if cur != ctx.end && cur* == C { return Other::match(cur + 1, ctx); } else { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } reset_ranges: (inout ctx) = {} @@ -241,11 +241,11 @@ xdigit_class : type == named_class_entry type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { if cur != ctx.end && negate != match_any(cur*) { return Other::match(cur + 1, ctx); } else { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } @@ -281,7 +281,7 @@ escaped_char_matcher_logic: type = } group_matcher_start_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { r := Other::match(cur, ctx); if r.matched { ctx.set_group_start(group, cur); @@ -302,7 +302,7 @@ group_matcher_start_logic: type = { } group_matcher_end_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { r := Other::match(cur, ctx); if r.matched { ctx.set_group_end(group, cur); @@ -321,12 +321,12 @@ group_matcher_end_logic: type = { } group_ref_matcher_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { g := ctx.get_group(group); while g.start != g.end && cur != ctx.end next (g.start++, cur++) { if g.start* != cur* { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } @@ -338,12 +338,12 @@ group_ref_matcher_logic: type = { line_end_matcher_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { if cur == ctx.end || cur* == '\n' { return Other::match(cur, ctx); } else { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } @@ -353,12 +353,12 @@ line_end_matcher_logic: type = line_start_matcher_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { if cur == ctx.begin || (cur - 1)* == '\n' { return Other::match(cur, ctx); } else { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } @@ -368,7 +368,7 @@ line_start_matcher_logic: type = list_matcher_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) -> match_return = { + match: (cur, inout ctx, _ : Other) -> _ = { return List::match_combine(cur, ctx, Other()); } reset_ranges: (inout ctx) = { List::reset_ranges(ctx); } @@ -378,7 +378,7 @@ list_matcher_logic: type = range_matcher_logic: type = { - match: (cur: Iter, inout ctx, _ : Other) + match: (cur, inout ctx, _ : Other) match_greedy(0, cur, cur, ctx, Other()); private is_below_upper_bound: (count: int) -> bool = { @@ -421,7 +421,7 @@ range_matcher_logic: type = { return o; } else { - return match_return(false, ctx.end); + return match_return(false, ctx.end); } } reset_ranges: (inout ctx) = { M::reset_ranges(ctx); } From 1073a7325e732ca8c8ec1f83adfd28ac2ca838db Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 12 Jan 2024 11:35:03 +0100 Subject: [PATCH 038/161] Refactor. --- source/regex.h2 | 191 +++++++++++++++++++++++++++++------------------- 1 file changed, 116 insertions(+), 75 deletions(-) diff --git a/source/regex.h2 b/source/regex.h2 index b077687c56..f737742f6b 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -110,40 +110,87 @@ match_tail: type = { no_match_tail: type == match_tail; -// TODO -regular_expression: type = { +//----------------------------------------------------------------------- +// +// Character classes for regular expressions. +// +//----------------------------------------------------------------------- +// - Iter: type == view::const_iterator; - context: type == match_context; +// Class syntax: Example: a +// +single_class_entry: type = +{ + includes: (c: CharT) c == C; + to_string: () bstring(1, C); +} - search: (in this, str: view, inout ctx: context) -> bool = { - ctx.begin = str.begin(); - ctx.end = str.end(); - cur := str.begin(); - while true next (cur++) { - if Matcher::match(cur, ctx).matched { - return true; - } +// Class syntax: - Example: a-c +// +range_class_entry: type = +{ + includes: (c: CharT) Start <= c <= End; + to_string: () "(Start)$-(End)$"; +} - if cur == ctx.end { - break; - } - } +// Helper for combining two character classes +// +combined_class_entry: type = { + includes: (c: CharT) (false || ... || List::includes(c)); + to_string: () ("" + ... + List::to_string()); +} - return false; - } +// Class syntax: Example: abcd +// +list_class_entry: type = { + includes: (c: CharT) (false || ... || (List == c)); + to_string: () ("" + ... + List); +} - to_string: (in this) -> _ = Matcher::to_string(); +// Class syntax: [: type = { + includes: (c: CharT) Inner::includes(c); + to_string: () "[:(Name.data())$:]"; } -// Regex syntax: | -// Example: ab|ba + +// Named basic character classes +// +digits_class : type == named_class_entry>; +lower_class : type == named_class_entry>; +upper_class : type == named_class_entry>; + +// Named other classes +// +alnum_class : type == named_class_entry, upper_class, digits_class>>; +alpha_class : type == named_class_entry, upper_class>>; +ascii_class : type == named_class_entry>; +blank_class : type == named_class_entry>; +cntrl_class : type == named_class_entry, single_class_entry>>; +graph_class : type == named_class_entry>; +print_class : type == named_class_entry>; +punct_class : type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; +space_class : type == named_class_entry>; +word_class : type == named_class_entry, single_class_entry>>; +xdigit_class : type == named_class_entry, range_class_entry, digits_class>>; + +//----------------------------------------------------------------------- +// +// Matchers for regular expressions. +// +//----------------------------------------------------------------------- +// + +// Regex syntax: | Example: ab|ba // // Non greedy implementation. First alternative that matches is chosen. +// alternative_matcher_logic: type = { - match: (cur, inout ctx, tail) - match_all(cur, ctx, tail); + match: (cur, inout ctx, tail) match_all(cur, ctx, tail); + reset_ranges: (inout ctx) = (List::reset_ranges(ctx) , ...); + to_string: () (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'. private match_all: (cur, inout ctx, tail) -> _ = { r := First::match(cur, ctx, tail); @@ -159,12 +206,10 @@ alternative_matcher_logic: type = { } } } - - reset_ranges: (inout ctx) = (List::reset_ranges(ctx) , ...); - - to_string: () (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'. } +// Regex syntax: . +// any_matcher_logic: type = { match: (cur, inout ctx, _ : Other) -> _ = { @@ -176,10 +221,11 @@ any_matcher_logic: type = } reset_ranges: (inout ctx) = {} - - to_string: () bstring(1, '.'); + to_string: () bstring(1, '.'); } +// Regex syntax: Example: a +// char_matcher_logic: type = { match: (cur, inout ctx, _ : Other) -> _ = { @@ -190,55 +236,12 @@ char_matcher_logic: type = } } reset_ranges: (inout ctx) = {} - to_string: () bstring(1, C); -} - -single_class_entry: type = -{ - includes: (c: CharT) -> _ = c == C; - to_string: () -> _ = bstring(1, C); -} - -range_class_entry: type = -{ - includes: (c: CharT) -> _ = Start <= c <= End; - to_string: () -> _ = "(Start)$-(End)$"; -} - -and_class_entry: type = { - includes: (c: CharT) (false || ... || List::includes(c)); - to_string: () ("" + ... + List::to_string()); -} - -list_class_entry: type = { - includes: (c: CharT) (false || ... || (List == c)); - to_string: () ("" + ... + List); -} - -named_class_entry: type = { - includes: (c: CharT) Inner::includes(c); - to_string: () "[:(Name.data())$:]"; + to_string: () bstring(1, C); } -// Named character classes. -digits_class : type == named_class_entry>; -lower_class : type == named_class_entry>; -upper_class : type == named_class_entry>; - -// Named classes. -alnum_class : type == named_class_entry, upper_class, digits_class>>; -alpha_class : type == named_class_entry, upper_class>>; -ascii_class : type == named_class_entry>; -blank_class : type == named_class_entry>; -cntrl_class : type == named_class_entry, single_class_entry>>; -graph_class : type == named_class_entry>; -print_class : type == named_class_entry>; -punct_class : type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; -space_class : type == named_class_entry>; -word_class : type == named_class_entry, single_class_entry>>; -xdigit_class : type == named_class_entry, range_class_entry, digits_class>>; - +// Regex syntax: [] Example: [abcx-y[:digits:]] +// class_matcher_logic: type = { match: (cur, inout ctx, _ : Other) -> _ = { @@ -262,6 +265,7 @@ class_matcher_logic: type = } reset_ranges: (inout ctx) = {} + to_string: () -> bstring = { r: bstring = "["; if negate { @@ -274,9 +278,12 @@ class_matcher_logic: type = } } +// Regex syntax: \ Example: \. +// escaped_char_matcher_logic: type = { this : char_matcher_logic = (); + to_string: () "\\(C)$"; } @@ -450,6 +457,40 @@ special_range_matcher_logic: type = { + + Iter: type == view::const_iterator; + context: type == match_context; + + search: (in this, str: view, inout ctx: context) -> bool = { + ctx.begin = str.begin(); + ctx.end = str.end(); + cur := str.begin(); + while true next (cur++) { + if Matcher::match(cur, ctx).matched { + return true; + } + + if cur == ctx.end { + break; + } + } + + return false; + } + + to_string: (in this) -> _ = Matcher::to_string(); +} + + regex_parser_state: @struct type = { cur_match_list: std::vector = (); From 6153cda10f9020eb5e1e6dd9f38c473cfeecc19a Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 12 Jan 2024 14:07:18 +0100 Subject: [PATCH 039/161] Refactor of parser. --- source/regex.h2 | 275 ++++++++++++++++++++++++++++-------------------- 1 file changed, 162 insertions(+), 113 deletions(-) diff --git a/source/regex.h2 b/source/regex.h2 index f737742f6b..105b06b6d1 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -94,21 +94,21 @@ match_context: type = // A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found. // Otherwise the matcher can try a different alternative. // -match_tail: type = { +matcher_list: type = { match: (cur, inout ctx) match_select(cur, ctx); - match_combine: (cur, inout ctx, _: match_tail) + match: (cur, inout ctx, _: matcher_list) match_select(cur, ctx); private match_select: (cur, inout ctx) - First::match(cur, ctx, match_tail()); + First::match(cur, ctx, matcher_list()); private match_select: (cur, inout ctx) match_return(true, cur); reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...); to_string: () (bstring() + ... + List::to_string()); } -no_match_tail: type == match_tail; +no_tail: type == matcher_list; //----------------------------------------------------------------------- // @@ -283,10 +283,12 @@ class_matcher_logic: type = escaped_char_matcher_logic: type = { this : char_matcher_logic = (); - + to_string: () "\\(C)$"; } +// Regex syntax: () Example: (.*) +// group_matcher_start_logic: type = { match: (cur, inout ctx, _ : Other) -> _ = { r := Other::match(cur, ctx); @@ -297,7 +299,9 @@ group_matcher_start_logic: type = { } return r; } - reset_ranges: (inout ctx) = { ctx.set_group_invalid(group); } + + reset_ranges: (inout ctx) = ctx.set_group_invalid(group); + to_string: () -> _ = { if group != 0 { return "("; @@ -316,7 +320,9 @@ group_matcher_end_logic: type = { } return r; } + reset_ranges: (inout ctx) = {} + to_string: () -> _ = { if group != 0 { return ")"; @@ -327,6 +333,8 @@ group_matcher_end_logic: type = { } } +// Regex syntax: \ Example: \1 +// group_ref_matcher_logic: type = { match: (cur, inout ctx, _ : Other) -> _ = { g := ctx.get_group(group); @@ -340,9 +348,13 @@ group_ref_matcher_logic: type = { return Other::match(cur, ctx); } reset_ranges: (inout ctx) = {} - to_string: () -> bstring = "\\((group)$)"; + to_string: () "\\((group)$)"; } +// Regex syntax: $ Example: aa$ +// +// Also matches new lines endings. +// line_end_matcher_logic: type = { match: (cur, inout ctx, _ : Other) -> _ = { @@ -354,10 +366,15 @@ line_end_matcher_logic: type = } } + reset_ranges: (inout ctx) = {} - to_string: () -> bstring = "\\$"; + to_string: () "\\$"; } +// Regex syntax: ^ Example: ^aa +// +// Also matches new line starts. +// line_start_matcher_logic: type = { match: (cur, inout ctx, _ : Other) -> _ = { @@ -370,23 +387,33 @@ line_start_matcher_logic: type = } reset_ranges: (inout ctx) = {} - to_string: () -> _ = bstring(1, '^'); -} - -list_matcher_logic: type = -{ - match: (cur, inout ctx, _ : Other) -> _ = { - return List::match_combine(cur, ctx, Other()); - } - reset_ranges: (inout ctx) = { List::reset_ranges(ctx); } - to_string: () List::to_string(); + to_string: () bstring(1, '^'); } +// Regex syntax: {min, max} Example: a{2,4} range_matcher_logic: type = { + match: (cur, inout ctx, tail) match_greedy(0, cur, cur, ctx, tail); + reset_ranges: (inout ctx) = M::reset_ranges(ctx); - match: (cur, inout ctx, _ : Other) - match_greedy(0, cur, cur, ctx, Other()); + to_string: () -> bstring = { + r: std::string = M::to_string(); + + if min_count == max_count { + r += "{(min_count)$}"; + } + else if min_count == -1 { + r += "{,(max_count)$}"; + } + else if max_count == -1 { + r += "{(min_count)$,}"; + } + else { + r += "{(min_count)$,(max_count)$}"; + } + + return r; + } private is_below_upper_bound: (count: int) -> bool = { if -1 == max_count { return true; } @@ -403,8 +430,9 @@ range_matcher_logic: type = { if -1 != max_count && count > max_count { return false; } return true; } + private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, _ : Other) -> match_return = { - r:= M::match(cur, ctx, no_match_tail()); + r:= M::match(cur, ctx, no_tail()); if is_below_upper_bound(count) && r.matched && (is_below_lower_bound(count) || r.pos != cur) { @@ -422,7 +450,7 @@ range_matcher_logic: type = { if o.matched { // Rematch M to set the groups. M::reset_ranges(ctx); - _ = M::match(last_valid, ctx, no_match_tail()); + _ = M::match(last_valid, ctx, no_tail()); } return o; @@ -431,27 +459,10 @@ range_matcher_logic: type = { return match_return(false, ctx.end); } } - reset_ranges: (inout ctx) = { M::reset_ranges(ctx); } - to_string: () -> bstring = { - r: std::string = M::to_string(); - - if min_count == max_count { - r += "{(min_count)$}"; - } - else if min_count == -1 { - r += "{,(max_count)$}"; - } - else if max_count == -1 { - r += "{(min_count)$,}"; - } - else { - r += "{(min_count)$,(max_count)$}"; - } - - return r; - } } +// Regex syntax: *, +, or ? Example: aa* +// special_range_matcher_logic: type = { this: range_matcher_logic = (); to_string: () M::to_string() + symbol; @@ -491,15 +502,25 @@ regular_expression: type = { } +//----------------------------------------------------------------------- +// +// Parser for regular expression. +// +//----------------------------------------------------------------------- +// regex_parser_state: @struct type = { + + // Current list of matchers cur_match_list: std::vector = (); + + /// List of alternate matcher lists. E.g. ab|cd|xy alternate_match_lists: std::vector> = (); - start_new_list: (inout this) = { + next_alternative: (inout this) = { new_list: std::vector = (); std::swap(new_list, cur_match_list); - _ = alternate_match_lists.insert(alternate_match_lists.begin(), new_list); + _ = alternate_match_lists.insert(alternate_match_lists.end(), new_list); } swap: (inout this, inout t: regex_parser_state) = { @@ -507,12 +528,10 @@ regex_parser_state: @struct type = { std::swap(alternate_match_lists, t.alternate_match_lists); } - add: (inout this, matcher: _) = { - cur_match_list.push_back(matcher); - } + add: (inout this, matcher: _) = cur_match_list.push_back(matcher); wrap_last: (inout this, matcher) = { - last: std::string = cur_match_list.back(); + last:= cur_match_list.back(); cur_match_list.back() = matcher(last); _ = matcher; _ = last; @@ -532,13 +551,16 @@ regex_parser: type = { error_out: Error_out; - supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"); + supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", + "lower", "print", "punct", "space", "upper", "word", "xdigit"); operator=: (out this, r: std::string_view, e: Error_out) = { this.regex = r; this.error_out = e; } + // State management functions + // new_state: (inout this) -> regex_parser_state = { old_state: regex_parser_state = (); old_state.swap(cur_state); @@ -549,34 +571,76 @@ regex_parser: type = { cur_state = old_state; } + // Misc functions + // error:(inout this, message: std::string) = { error_out("Error during parsing of regex '(regex)$' at position '(pos)$': (message)$"); } + create_matcher: (in this, name: std::string, template_arguments: std::string) -> _ = { + sep := ", "; + if template_arguments.empty() { sep = ""; } + + return "::cpp2::regex::(name)$"; + } + + create_matcher_from_list: (inout this, list) create_matcher("matcher_list", join(list)); + + create_matcher_from_state: (inout this) -> std::string = { + if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } + + if 0 != cur_state.cur_match_list.size() { + cur_state.next_alternative(); + } + + list: std::string = ""; + separator: std::string = ""; + for cur_state.alternate_match_lists do (cur) { + list += separator + create_matcher_from_list(cur); + separator = ", "; + } + + return create_matcher("alternative_matcher_logic", list); + } + + join: (list: std::vector) -> std::string = { + r: std::string = ""; + + separator: std::string = ""; + for list do (cur) { + r += separator + cur; + separator = ", "; + } + + return r; + } + + // Parsing functions + // + is_alternative: (inout this, c: char) -> bool = { if c != '|' { return false; } - cur_state.start_new_list(); + cur_state.next_alternative(); return true; } is_anchor: (inout this, c: char) -> bool = { - r := false; if c == '^' { - cur_state.add("::cpp2::regex::line_start_matcher_logic"); - r = true; + cur_state.add(create_matcher("line_start_matcher_logic", "")); + return true; } else if c == '$' { - cur_state.add("::cpp2::regex::line_end_matcher_logic"); - r = true; + cur_state.add(create_matcher("line_end_matcher_logic", "")); + return true; } - return r; + return false; } is_any: (inout this, c: char) -> bool = { if c == '.' { - cur_state.add("::cpp2::regex::any_matcher_logic"); + cur_state.add(create_matcher("any_matcher_logic", "")); return true; } return false; @@ -602,8 +666,8 @@ regex_parser: type = { else { return regex[pos + 1]; } }; + // First step: parse until the end bracket and push single chars, ranges or groups on the class stack. negate:= false; - first:= true; range:= false; while next_item() & (c_cur != ']' || first) { @@ -659,21 +723,22 @@ regex_parser: type = { classes.push_back("-"); } + // Second step: Wrap the item on the class stack with corresponding class implementation. for classes do (inout cur) { if cur.starts_with("[:") { name := cur.substr(2, cur.size() - 4); - cur = "::cpp2::regex::(name)$_class"; + cur = create_matcher("(name)$_class", ""); } else if 1 != cur.size() { - cur = "::cpp2::regex::range_class_entry"; + cur = create_matcher("range_class_entry", "'(cur[0])$', '(cur[2])$'"); } else { - cur = "::cpp2::regex::single_class_entry"; + cur = create_matcher("single_class_entry", "'(cur)$'"); } } inner := join(classes); - cur_state.add("::cpp2::regex::class_matcher_logic"); + cur_state.add(create_matcher("class_matcher_logic", "(negate)$, (inner)$")); return true; } @@ -691,19 +756,19 @@ regex_parser: type = { if group_id >= named_groups { error("Group reference is used before the group is declared."); } - cur_state.add("::cpp2::regex::group_ref_matcher_logic"); + cur_state.add(create_matcher("group_ref_matcher_logic", "(group_id)$")); } else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) { if c_next == '$' { - // TODO: Provide proper escape for cppfront capture . - cur_state.add("::cpp2::regex::line_end_matcher_logic"); + // TODO: Provide proper escape for cppfront capture + cur_state.add(create_matcher("line_end_matcher_logic", "")); } else { - cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); + cur_state.add(create_matcher("escaped_char_matcher_logic", "'(c_next)$'")); } } else if '\\' == c_next { - cur_state.add("::cpp2::regex::escaped_char_matcher_logic"); + cur_state.add(create_matcher("escaped_char_matcher_logic", "'\\\\'")); } else { error("Unknown escape."); @@ -727,9 +792,9 @@ regex_parser: type = { restore_state(old_state); v: std::vector = ( - "::cpp2::regex::group_matcher_start_logic", + create_matcher("group_matcher_start_logic", "(group_number)$"), inner, - "::cpp2::regex::group_matcher_end_logic"); + create_matcher("group_matcher_end_logic", "(group_number)$")); cur_state.add(create_matcher_from_list(v)); return true; @@ -737,7 +802,7 @@ regex_parser: type = { is_handle_special: (inout this, c: char) -> bool = { if c == '\'' { - cur_state.add("::cpp2::regex::char_matcher_logic"); + cur_state.add(create_matcher("char_matcher_logic", "'\\(c)$'")); return true; } @@ -746,6 +811,16 @@ regex_parser: type = { is_range: (inout this, c: char) -> bool = { + to_int := :(str) -> int = { + // TODO: Add exception handling. + // try { + return std::stoi(str); + // } catch (_) { + // error("Could not convert range argument '(inner)$' to int."); + // } + // return 0; + }; + if c != '{' { return false; } if cur_state.empty() { error("'{' without previous element."); } @@ -756,12 +831,16 @@ regex_parser: type = { if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } min_count: std::string = "-1"; + min_count_number: int = 0; max_count: std::string = "-1"; + max_count_number: int = std::numeric_limits::max(); sep: size_t = inner.find(","); if sep == std::string::npos { min_count = inner; max_count = inner; + min_count_number = to_int(inner); + max_count_number = min_count_number; } else { inner_first: std::string = trim_copy(inner.substr(0, sep)); @@ -773,14 +852,19 @@ regex_parser: type = { if !inner_first.empty() { min_count = inner_first; + min_count_number = to_int(inner_first); } if !inner_last.empty() { max_count = inner_last; + max_count_number = to_int(inner_last); } } - // TODO: Check 0 <=n <= m - cur_state.wrap_last( :(inner) -> _ == "::cpp2::regex::range_matcher_logic"); + if !(0 <= min_count_number <= max_count_number) { + error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (min_count_number)$ <= (max_count_number)$"); + } + + cur_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$")); pos = end; return true; @@ -807,7 +891,7 @@ regex_parser: type = { error("'(c)$' without previous element."); } - cur_state.wrap_last(:(inner) -> _ == "::cpp2::regex::special_range_matcher_logic"); + cur_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, '(c$)$'")); return true; } @@ -827,54 +911,19 @@ regex_parser: type = { if is_range(c) { continue; } if is_special_range(c) { continue; } - // No special char push a character match - cur_state.add("::cpp2::regex::char_matcher_logic"); + // No special char, push a character match + cur_state.add(create_matcher("char_matcher_logic", "'(c)$'")); } } - private join: (list: std::vector) -> std::string = { - r: std::string = ""; - - seperator: std::string = ""; - for list do (cur) { - r += seperator + cur; - seperator = ", "; - } - - return r; - } - - create_matcher_from_list: (inout this, list) - "::cpp2::regex::list_matcher_logic>" - - create_matcher_from_state: (inout this) -> std::string = { - if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); } - - matcher: std::string = "::cpp2::regex::alternative_matcher_logic std::string = { - parse_until('\0'); inner := create_matcher_from_state(); - inner = "::cpp2::regex::group_matcher_start_logic, (inner)$, ::cpp2::regex::group_matcher_end_logic"; - return "::cpp2::regex::regular_expression>"; + start := create_matcher("group_matcher_start_logic", "0"); + end := create_matcher("group_matcher_end_logic", "0"); + list := create_matcher("matcher_list", "(start)$, (inner)$, (end)$"); + return create_matcher("regular_expression", "(named_groups)$, (list)$"); } } From e155cc53dcbaf835816d0801648819b9cec82991 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 12 Jan 2024 16:07:31 +0100 Subject: [PATCH 040/161] Regular expression update. --- source/reflect.h2 | 5 +--- source/regex.h2 | 60 +++++++++++++++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/source/reflect.h2 b/source/reflect.h2 index 5ec580d3d6..989ff1cd5f 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -1428,10 +1428,7 @@ regex_gen: (inout t: meta::type_declaration) = name = "_" + name; } - t.add_member("regex(name)$: type == (regular_expression)$;"); - //t.add_member("match(name)$: (in this, str: std::string) -> _ = regex(name)$().match(str);"); - //t.add_member("match(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().match(str, ctx);"); - //t.add_member("find(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().find(str, ctx);"); + t.add_member("regex(name)$: (regular_expression)$ = ();"); } } diff --git a/source/regex.h2 b/source/regex.h2 index 105b06b6d1..293a479952 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -48,10 +48,7 @@ match_context: type = end = end_; } - operator=: (out this) = { // TODO: Remove - begin = (); - end = (); - } + operator=: (out this, that) = {} // Getter and setter for groups // @@ -74,7 +71,7 @@ match_context: type = // Misc functions // - print_ranges: (in this, begin_) -> bstring = { // TODO: Remove Argument + print_ranges: (in this) -> bstring = { r: bstring = ""; for groups do (cur) { if cur.matched { @@ -475,19 +472,53 @@ special_range_matcher_logic: type = { - Iter: type == view::const_iterator; - context: type == match_context; + context: type == match_context; - search: (in this, str: view, inout ctx: context) -> bool = { - ctx.begin = str.begin(); - ctx.end = str.end(); - cur := str.begin(); + private get_iter: (str: view, pos) -> _ = { + if pos < str.size() { + return str.begin() + pos; + } + else { + return str.end(); + } + } + + // TODO: Named multiple return has problems with templates. + search_return: type = { + public matched: bool; + public ctx: context; + + operator=:(out this, matched_: bool, ctx_: context) = { + matched = matched_; + ctx = ctx_; + } + } + + match: (in this, str: view) match(str.begin(), str.end()); + match: (in this, str: view, start) match(get_iter(str, start), str.end()); + match: (in this, str: view, start, length) match(get_iter(str, start), get_iter(str, start + length)); + match: (in this, start: Iter, end: Iter) -> search_return = { + ctx: context = (start, end); + + r := Matcher::match(start, ctx); + return search_return(r.matched && r.pos == end, ctx); + } + + search: (in this, str: view) search(str.begin(), str.end()); + search: (in this, str: view, start) search(get_iter(str, start), str.end()); + search: (in this, str: view, start, length) search(get_iter(str, start), get_iter(str, start + length)); + search: (in this, start: Iter, end: Iter) -> search_return = { + matched := false; + ctx: context = (start, end); + + cur:= start; while true next (cur++) { if Matcher::match(cur, ctx).matched { - return true; + matched = true; + break; } if cur == ctx.end { @@ -495,13 +526,12 @@ regular_expression: type = { } } - return false; + return search_return(matched, ctx); } to_string: (in this) -> _ = Matcher::to_string(); } - //----------------------------------------------------------------------- // // Parser for regular expression. From c074dc03384c728110c2bcefcb999fa36b97cfa5 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 12 Jan 2024 16:10:47 +0100 Subject: [PATCH 041/161] Update of test and header files. --- regression-tests/pure2-regex.cpp2 | 874 +++---- .../gcc-13/pure2-regex.cpp.execution | 62 +- regression-tests/test-results/pure2-regex.cpp | 2179 ++++------------- source/reflect.h | 15 +- source/regex.h | 1075 ++++---- 5 files changed, 1559 insertions(+), 2646 deletions(-) diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2 index 802755faa1..bc7fd02680 100644 --- a/regression-tests/pure2-regex.cpp2 +++ b/regression-tests/pure2-regex.cpp2 @@ -1,22 +1,21 @@ test: (regex: M, id: std::string, regex_str: std::string, str: std::string, result: std::string) = { - context : type == M::context; - ctx: context = (); - str_mod := str; if str_mod == "NULL" { str_mod = ""; } + ranges_result: std::string = "NOMATCH"; + status: std::string = "OK"; if regex.to_string() != regex_str { status = "Failure: Parsed regex does not match."; } else { - m : bool = regex.search(str_mod, ctx); + r := regex.search(str_mod); is_pass := !result.starts_with("NOMATCH"); // Check if we expect a match. - if is_pass != m { + if is_pass != r.matched { if is_pass { status = "Failure: Regex should apply."; } @@ -26,8 +25,9 @@ test: (regex: M, id: std::string, regex_str: std::string, str: std::string, } // If we have a match. Check the ranges. - if m { - ranges_match := result == ctx.print_ranges(); + if r.matched { + ranges_result = r.ctx.print_ranges(); + ranges_match := result == ranges_result; should_ranges_match := !id.starts_with("M"); if ranges_match != should_ranges_match { @@ -41,7 +41,7 @@ test: (regex: M, id: std::string, regex_str: std::string, str: std::string, } } - std::cout << "(id)$: (status)$ regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result: (ctx.print_ranges())$ expected_results (result)$" << std::endl; + std::cout << "(id)$: (status)$ regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result: (ranges_result)$ expected_results (result)$" << std::endl; } @@ -190,148 +190,148 @@ test_basic3: @regex type = { regex_146 := "\\000"; run: (this) = { std::cout << "Running basic3:"<< std::endl; - test(regex_1(), "1", "\\)", "()", "(1,2)"); - test(regex_2(), "2", "\\}", "}", "(0,1)"); - test(regex_3(), "3", "]", "]", "(0,1)"); - test(regex_4(), "4", "\\$^", "NULL", "(0,0)"); - test(regex_5(), "5", "a(\\$)", "aa", "(1,2)(2,2)"); - test(regex_6(), "6", "a*(^a)", "aa", "(0,1)(0,1)"); - test(regex_7(), "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)"); - test(regex_8(), "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)"); - test(regex_9(), "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)"); - test(regex_10(), "10", "(ab)c|abc", "abc", "(0,3)(0,2)"); - test(regex_11(), "11", "a{0}b", "ab", "(1,2)"); - test(regex_12(), "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); - test(regex_13(), "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); - test(regex_15(), "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)"); - test(regex_16(), "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)"); - test(regex_17(), "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)"); - test(regex_18(), "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)"); - test(regex_19(), "19", "(a|b)?.*", "b", "(0,1)(0,1)"); - test(regex_20(), "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)"); - test(regex_21(), "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)"); - test(regex_22(), "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)"); - test(regex_23(), "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)"); - test(regex_24(), "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)"); - test(regex_25(), "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)"); - test(regex_26(), "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)"); - test(regex_27(), "27", "ab|abab", "abbabab", "(0,2)"); - test(regex_28(), "28", "aba|bab|bba", "baaabbbaba", "(5,8)"); - test(regex_29(), "29", "aba|bab", "baaabbbaba", "(6,9)"); - test(regex_30(), "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)"); - test(regex_31(), "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)"); - test(regex_32(), "32", "ab|a", "xabc", "(1,3)"); - test(regex_33(), "33", "ab|a", "xxabc", "(2,4)"); - test(regex_M34(), "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); - test(regex_35(), "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)"); - test(regex_36(), "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)"); - test(regex_37(), "37", "[[:lower:]]+", "`az{", "(1,3)"); - test(regex_38(), "38", "[[:upper:]]+", "@AZ[", "(1,3)"); - test(regex_39(), "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_43 (), "43 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); - test(regex_44 (), "44 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)"); - test(regex_45(), "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)"); - test(regex_46(), "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)"); - test(regex_47(), "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)"); - test(regex_48(), "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)"); - test(regex_49(), "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)"); - test(regex_50(), "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)"); - test(regex_51(), "51", "ab+bc", "abbc", "(0,4)"); - test(regex_52(), "52", "ab+bc", "abbbbc", "(0,6)"); - test(regex_53(), "53", "ab?bc", "abbc", "(0,4)"); - test(regex_54(), "54", "ab?bc", "abc", "(0,3)"); - test(regex_55(), "55", "ab?c", "abc", "(0,3)"); - test(regex_56(), "56", "ab|cd", "abc", "(0,2)"); - test(regex_57(), "57", "ab|cd", "abcd", "(0,2)"); - test(regex_58(), "58", "a\\(b", "a(b", "(0,3)"); - test(regex_59(), "59", "a\\(*b", "ab", "(0,2)"); - test(regex_60(), "60", "a\\(*b", "a((b", "(0,4)"); - test(regex_61(), "61", "((a))", "abc", "(0,1)(0,1)(0,1)"); - test(regex_62(), "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)"); - test(regex_63(), "63", "a+b+c", "aabbabc", "(4,7)"); - test(regex_64(), "64", "a*", "aaa", "(0,3)"); - test(regex_65(), "65", "(a*)*", "-", "(0,0)(0,0)"); - test(regex_66(), "66", "(a*)+", "-", "(0,0)(0,0)"); - test(regex_67(), "67", "(a*|b)*", "-", "(0,0)(0,0)"); - test(regex_68(), "68", "(a+|b)*", "ab", "(0,2)(1,2)"); - test(regex_69(), "69", "(a+|b)+", "ab", "(0,2)(1,2)"); - test(regex_70(), "70", "(a+|b)?", "ab", "(0,1)(0,1)"); - test(regex_71(), "71", "(^)*", "-", "(0,0)(0,0)"); - test(regex_72(), "72", "([abc])*d", "abbbcd", "(0,6)(4,5)"); - test(regex_73(), "73", "([abc])*bcd", "abcd", "(0,4)(0,1)"); - test(regex_74(), "74", "a|b|c|d|e", "e", "(0,1)"); - test(regex_75(), "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)"); - test(regex_76(), "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)"); - test(regex_77(), "77", "(ab|cd)e", "abcde", "(2,5)(2,4)"); - test(regex_78(), "78", "(a|b)c*d", "abcd", "(1,4)(1,2)"); - test(regex_79(), "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)"); - test(regex_80(), "80", "a([bc]*)c*", "abc", "(0,3)(1,3)"); - test(regex_81(), "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); - test(regex_82(), "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); - test(regex_83(), "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)"); - test(regex_84(), "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)"); - test(regex_85(), "85", "(ab|a)b*c", "abc", "(0,3)(0,2)"); - test(regex_86(), "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)"); - test(regex_87(), "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)"); - test(regex_88(), "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)"); - test(regex_89(), "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)"); - test(regex_90(), "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)"); - test(regex_91(), "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); - test(regex_92(), "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)"); - test(regex_93(), "93", "a(bc)d", "abcd", "(0,4)(1,3)"); - test(regex_94(), "94", "a[-]?c", "ac", "(0,3)"); - test(regex_95(), "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)"); - test(regex_96(), "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)"); - test(regex_97(), "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)"); - test(regex_98(), "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)"); - test(regex_99(), "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)"); - test(regex_100(), "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)"); - test(regex_101(), "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)"); - test(regex_102(), "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)"); - test(regex_103(), "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)"); - test(regex_104(), "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)"); - test(regex_105(), "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)"); - test(regex_106(), "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)"); - test(regex_107(), "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)"); - test(regex_108(), "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)"); - test(regex_109(), "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)"); - test(regex_110(), "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)"); - test(regex_111(), "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)"); - test(regex_112(), "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)"); - test(regex_113(), "113", "^.+\\$", "vivi", "(0,4)"); - test(regex_114(), "114", "^(.+)\\$", "vivi", "(0,4)(0,4)"); - test(regex_115(), "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)"); - test(regex_116(), "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)"); - test(regex_117(), "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)"); - test(regex_118(), "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)"); - test(regex_119(), "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)"); - test(regex_120(), "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)"); - test(regex_121(), "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)"); - test(regex_122(), "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)"); - test(regex_123(), "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)"); - test(regex_124(), "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)"); - test(regex_125(), "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)"); - test(regex_126(), "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)"); - test(regex_127(), "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)"); - test(regex_128(), "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)"); - test(regex_129(), "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)"); - test(regex_130(), "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)"); - test(regex_131(), "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)"); - test(regex_132(), "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); - test(regex_133(), "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)"); - test(regex_134(), "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_135(), "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)"); - test(regex_136(), "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_137(), "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)"); - test(regex_138(), "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_139(), "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); - test(regex_140(), "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_141(), "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)"); - test(regex_142(), "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)"); - test(regex_143(), "143", "\\\\XXX", "\\XXX", "(0,4)"); - test(regex_144(), "144", ".*(/000).*", "/000", "(0,4)(0,4)"); - test(regex_145(), "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)"); - test(regex_146(), "146", "\\\\000", "\\000", "(0,4)"); + test(regex_1, "1", "\\)", "()", "(1,2)"); + test(regex_2, "2", "\\}", "}", "(0,1)"); + test(regex_3, "3", "]", "]", "(0,1)"); + test(regex_4, "4", "\\$^", "NULL", "(0,0)"); + test(regex_5, "5", "a(\\$)", "aa", "(1,2)(2,2)"); + test(regex_6, "6", "a*(^a)", "aa", "(0,1)(0,1)"); + test(regex_7, "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)"); + test(regex_8, "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)"); + test(regex_9, "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)"); + test(regex_10, "10", "(ab)c|abc", "abc", "(0,3)(0,2)"); + test(regex_11, "11", "a{0}b", "ab", "(1,2)"); + test(regex_12, "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_13, "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_15, "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)"); + test(regex_16, "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)"); + test(regex_17, "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)"); + test(regex_18, "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)"); + test(regex_19, "19", "(a|b)?.*", "b", "(0,1)(0,1)"); + test(regex_20, "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)"); + test(regex_21, "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)"); + test(regex_22, "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)"); + test(regex_23, "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)"); + test(regex_24, "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)"); + test(regex_25, "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_26, "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_27, "27", "ab|abab", "abbabab", "(0,2)"); + test(regex_28, "28", "aba|bab|bba", "baaabbbaba", "(5,8)"); + test(regex_29, "29", "aba|bab", "baaabbbaba", "(6,9)"); + test(regex_30, "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_31, "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_32, "32", "ab|a", "xabc", "(1,3)"); + test(regex_33, "33", "ab|a", "xxabc", "(2,4)"); + test(regex_M34, "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); + test(regex_35, "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_36, "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_37, "37", "[[:lower:]]+", "`az{", "(1,3)"); + test(regex_38, "38", "[[:upper:]]+", "@AZ[", "(1,3)"); + test(regex_39, "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_43 , "43 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_44 , "44 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)"); + test(regex_45, "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)"); + test(regex_46, "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)"); + test(regex_47, "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)"); + test(regex_48, "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)"); + test(regex_49, "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)"); + test(regex_50, "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)"); + test(regex_51, "51", "ab+bc", "abbc", "(0,4)"); + test(regex_52, "52", "ab+bc", "abbbbc", "(0,6)"); + test(regex_53, "53", "ab?bc", "abbc", "(0,4)"); + test(regex_54, "54", "ab?bc", "abc", "(0,3)"); + test(regex_55, "55", "ab?c", "abc", "(0,3)"); + test(regex_56, "56", "ab|cd", "abc", "(0,2)"); + test(regex_57, "57", "ab|cd", "abcd", "(0,2)"); + test(regex_58, "58", "a\\(b", "a(b", "(0,3)"); + test(regex_59, "59", "a\\(*b", "ab", "(0,2)"); + test(regex_60, "60", "a\\(*b", "a((b", "(0,4)"); + test(regex_61, "61", "((a))", "abc", "(0,1)(0,1)(0,1)"); + test(regex_62, "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)"); + test(regex_63, "63", "a+b+c", "aabbabc", "(4,7)"); + test(regex_64, "64", "a*", "aaa", "(0,3)"); + test(regex_65, "65", "(a*)*", "-", "(0,0)(0,0)"); + test(regex_66, "66", "(a*)+", "-", "(0,0)(0,0)"); + test(regex_67, "67", "(a*|b)*", "-", "(0,0)(0,0)"); + test(regex_68, "68", "(a+|b)*", "ab", "(0,2)(1,2)"); + test(regex_69, "69", "(a+|b)+", "ab", "(0,2)(1,2)"); + test(regex_70, "70", "(a+|b)?", "ab", "(0,1)(0,1)"); + test(regex_71, "71", "(^)*", "-", "(0,0)(0,0)"); + test(regex_72, "72", "([abc])*d", "abbbcd", "(0,6)(4,5)"); + test(regex_73, "73", "([abc])*bcd", "abcd", "(0,4)(0,1)"); + test(regex_74, "74", "a|b|c|d|e", "e", "(0,1)"); + test(regex_75, "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)"); + test(regex_76, "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)"); + test(regex_77, "77", "(ab|cd)e", "abcde", "(2,5)(2,4)"); + test(regex_78, "78", "(a|b)c*d", "abcd", "(1,4)(1,2)"); + test(regex_79, "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)"); + test(regex_80, "80", "a([bc]*)c*", "abc", "(0,3)(1,3)"); + test(regex_81, "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_82, "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_83, "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)"); + test(regex_84, "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)"); + test(regex_85, "85", "(ab|a)b*c", "abc", "(0,3)(0,2)"); + test(regex_86, "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)"); + test(regex_87, "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)"); + test(regex_88, "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)"); + test(regex_89, "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)"); + test(regex_90, "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)"); + test(regex_91, "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_92, "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)"); + test(regex_93, "93", "a(bc)d", "abcd", "(0,4)(1,3)"); + test(regex_94, "94", "a[-]?c", "ac", "(0,3)"); + test(regex_95, "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)"); + test(regex_96, "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)"); + test(regex_97, "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)"); + test(regex_98, "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)"); + test(regex_99, "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)"); + test(regex_100, "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)"); + test(regex_101, "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)"); + test(regex_102, "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)"); + test(regex_103, "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)"); + test(regex_104, "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)"); + test(regex_105, "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)"); + test(regex_106, "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)"); + test(regex_107, "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)"); + test(regex_108, "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)"); + test(regex_109, "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)"); + test(regex_110, "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)"); + test(regex_111, "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)"); + test(regex_112, "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)"); + test(regex_113, "113", "^.+\\$", "vivi", "(0,4)"); + test(regex_114, "114", "^(.+)\\$", "vivi", "(0,4)(0,4)"); + test(regex_115, "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)"); + test(regex_116, "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)"); + test(regex_117, "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)"); + test(regex_118, "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)"); + test(regex_119, "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)"); + test(regex_120, "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)"); + test(regex_121, "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)"); + test(regex_122, "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)"); + test(regex_123, "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)"); + test(regex_124, "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)"); + test(regex_125, "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)"); + test(regex_126, "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)"); + test(regex_127, "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)"); + test(regex_128, "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)"); + test(regex_129, "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)"); + test(regex_130, "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)"); + test(regex_131, "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)"); + test(regex_132, "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_133, "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_134, "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_135, "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_136, "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_137, "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_138, "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_139, "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_140, "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_141, "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)"); + test(regex_142, "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)"); + test(regex_143, "143", "\\\\XXX", "\\XXX", "(0,4)"); + test(regex_144, "144", ".*(/000).*", "/000", "(0,4)(0,4)"); + test(regex_145, "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)"); + test(regex_146, "146", "\\\\000", "\\000", "(0,4)"); std::cout << std::endl; } } @@ -352,20 +352,20 @@ test_class: @regex type = { regex_M12 := "(a?)((ab)?)(b?)a?(ab)?b?"; run: (this) = { std::cout << "Running class:"<< std::endl; - test(regex_1(), "1", "aa*", "xaxaax", "(1,2)"); - test(regex_2(), "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_M2(), "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)"); - test(regex_3(), "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)"); - test(regex_4(), "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)"); - test(regex_5(), "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)"); - test(regex_6(), "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); - test(regex_7(), "7", "(a*){2}", "xxxxx", "(0,0)(0,0)"); - test(regex_8(), "8", "(a*)*", "a", "(0,1)(0,1)"); - test(regex_9(), "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); - test(regex_10(), "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); - test(regex_11(), "11", ".*(.*)", "ab", "(0,2)(2,2)"); - test(regex_12(), "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)"); - test(regex_M12(), "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)"); + test(regex_1, "1", "aa*", "xaxaax", "(1,2)"); + test(regex_2, "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2, "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)"); + test(regex_3, "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)"); + test(regex_4, "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)"); + test(regex_5, "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)"); + test(regex_6, "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_7, "7", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_8, "8", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_9, "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_10, "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_11, "11", ".*(.*)", "ab", "(0,2)(2,2)"); + test(regex_12, "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)"); + test(regex_M12, "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)"); std::cout << std::endl; } } @@ -384,18 +384,18 @@ test_left_assoc: @regex type = { regex_M12 := "(ab|a)(bcd|c)(d|.*)"; run: (this) = { std::cout << "Running left_assoc:"<< std::endl; - test(regex_M1(), "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M2(), "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M3(), "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M4(), "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M5(), "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M6(), "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M7(), "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M8(), "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M9(), "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M10(), "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M11(), "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M12(), "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M1, "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M2, "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M3, "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M4, "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M5, "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M6, "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M7, "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M8, "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M9, "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M10, "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M11, "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M12, "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); std::cout << std::endl; } } @@ -414,18 +414,18 @@ test_right_assoc: @regex type = { regex_12 := "(ab|a)(bcd|c)(d|.*)"; run: (this) = { std::cout << "Running right_assoc:"<< std::endl; - test(regex_1(), "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_2(), "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_3(), "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_4(), "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_5(), "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_6(), "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_7(), "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_8(), "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_9(), "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_10(), "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_11(), "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_12(), "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_1, "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_2, "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_3, "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_4, "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_5, "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_6, "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_7, "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_8, "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_9, "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_10, "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_11, "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_12, "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); std::cout << std::endl; } } @@ -460,34 +460,34 @@ test_forced_assoc: @regex type = { regex_28 := "(ab|a)(b*)"; run: (this) = { std::cout << "Running forced_assoc:"<< std::endl; - test(regex_1(), "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_2(), "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_3(), "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_4(), "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_5(), "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_6(), "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_7(), "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_8(), "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_9(), "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_10(), "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_11(), "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_12(), "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_13(), "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_14(), "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_15(), "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_16(), "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_17(), "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_18(), "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_19(), "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_20(), "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_21(), "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_22(), "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_23(), "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_24(), "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_25(), "25", "(a|ab)", "ab", "(0,2)(0,2)"); - test(regex_26(), "26", "(ab|a)", "ab", "(0,2)(0,2)"); - test(regex_27(), "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)"); - test(regex_28(), "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_1, "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_2, "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_3, "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_4, "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_5, "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_6, "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_7, "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_8, "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_9, "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_10, "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_11, "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_12, "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_13, "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_14, "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_15, "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_16, "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_17, "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_18, "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_19, "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_20, "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_21, "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_22, "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_23, "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_24, "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_25, "25", "(a|ab)", "ab", "(0,2)(0,2)"); + test(regex_26, "26", "(ab|a)", "ab", "(0,2)(0,2)"); + test(regex_27, "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_28, "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)"); std::cout << std::endl; } } @@ -545,57 +545,57 @@ test_nullsub3: @regex type = { regex_54 := "(a*){2}(x)"; run: (this) = { std::cout << "Running nullsub3:"<< std::endl; - test(regex_1(), "1", "(a*)*", "a", "(0,1)(0,1)"); - test(regex_2(), "2", "(a*)*", "x", "(0,0)(0,0)"); - test(regex_3(), "3", "(a*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_4(), "4", "(a*)*", "aaaaaax", "(0,6)(0,6)"); - test(regex_5(), "5", "(a*)+", "a", "(0,1)(0,1)"); - test(regex_6(), "6", "(a*)+", "x", "(0,0)(0,0)"); - test(regex_7(), "7", "(a*)+", "aaaaaa", "(0,6)(0,6)"); - test(regex_8(), "8", "(a*)+", "aaaaaax", "(0,6)(0,6)"); - test(regex_9(), "9", "(a+)*", "a", "(0,1)(0,1)"); - test(regex_10(), "10", "(a+)*", "x", "(0,0)(?,?)"); - test(regex_11(), "11", "(a+)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_12(), "12", "(a+)*", "aaaaaax", "(0,6)(0,6)"); - test(regex_13(), "13", "(a+)+", "a", "(0,1)(0,1)"); - test(regex_14(), "14", "(a+)+", "x", "NOMATCH"); - test(regex_15(), "15", "(a+)+", "aaaaaa", "(0,6)(0,6)"); - test(regex_16(), "16", "(a+)+", "aaaaaax", "(0,6)(0,6)"); - test(regex_17(), "17", "([a]*)*", "a", "(0,1)(0,1)"); - test(regex_18(), "18", "([a]*)*", "x", "(0,0)(0,0)"); - test(regex_19(), "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_20(), "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)"); - test(regex_21(), "21", "([a]*)+", "a", "(0,1)(0,1)"); - test(regex_22(), "22", "([a]*)+", "x", "(0,0)(0,0)"); - test(regex_23(), "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)"); - test(regex_24(), "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)"); - test(regex_25(), "25", "([^b]*)*", "a", "(0,1)(0,1)"); - test(regex_26(), "26", "([^b]*)*", "b", "(0,0)(0,0)"); - test(regex_27(), "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_28(), "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)"); - test(regex_29(), "29", "([ab]*)*", "a", "(0,1)(0,1)"); - test(regex_30(), "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_31(), "31", "([ab]*)*", "ababab", "(0,6)(0,6)"); - test(regex_32(), "32", "([ab]*)*", "bababa", "(0,6)(0,6)"); - test(regex_33(), "33", "([ab]*)*", "b", "(0,1)(0,1)"); - test(regex_34(), "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)"); - test(regex_35(), "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)"); - test(regex_36(), "36", "([^a]*)*", "b", "(0,1)(0,1)"); - test(regex_37(), "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)"); - test(regex_38(), "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)"); - test(regex_39(), "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)"); - test(regex_40(), "40", "([^ab]*)*", "ababab", "(0,0)(0,0)"); - test(regex_41(), "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)"); - test(regex_42(), "42", "(a)", "aaa", "(0,1)(0,1)"); - test(regex_46(), "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)"); - test(regex_47(), "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)"); - test(regex_48(), "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)"); - test(regex_49(), "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)"); - test(regex_50(), "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)"); - test(regex_51(), "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)"); - test(regex_52(), "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)"); - test(regex_53(), "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)"); - test(regex_54(), "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)"); + test(regex_1, "1", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_2, "2", "(a*)*", "x", "(0,0)(0,0)"); + test(regex_3, "3", "(a*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_4, "4", "(a*)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_5, "5", "(a*)+", "a", "(0,1)(0,1)"); + test(regex_6, "6", "(a*)+", "x", "(0,0)(0,0)"); + test(regex_7, "7", "(a*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_8, "8", "(a*)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_9, "9", "(a+)*", "a", "(0,1)(0,1)"); + test(regex_10, "10", "(a+)*", "x", "(0,0)(?,?)"); + test(regex_11, "11", "(a+)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_12, "12", "(a+)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_13, "13", "(a+)+", "a", "(0,1)(0,1)"); + test(regex_14, "14", "(a+)+", "x", "NOMATCH"); + test(regex_15, "15", "(a+)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_16, "16", "(a+)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_17, "17", "([a]*)*", "a", "(0,1)(0,1)"); + test(regex_18, "18", "([a]*)*", "x", "(0,0)(0,0)"); + test(regex_19, "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_20, "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_21, "21", "([a]*)+", "a", "(0,1)(0,1)"); + test(regex_22, "22", "([a]*)+", "x", "(0,0)(0,0)"); + test(regex_23, "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_24, "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_25, "25", "([^b]*)*", "a", "(0,1)(0,1)"); + test(regex_26, "26", "([^b]*)*", "b", "(0,0)(0,0)"); + test(regex_27, "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_28, "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)"); + test(regex_29, "29", "([ab]*)*", "a", "(0,1)(0,1)"); + test(regex_30, "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_31, "31", "([ab]*)*", "ababab", "(0,6)(0,6)"); + test(regex_32, "32", "([ab]*)*", "bababa", "(0,6)(0,6)"); + test(regex_33, "33", "([ab]*)*", "b", "(0,1)(0,1)"); + test(regex_34, "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_35, "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)"); + test(regex_36, "36", "([^a]*)*", "b", "(0,1)(0,1)"); + test(regex_37, "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_38, "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)"); + test(regex_39, "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)"); + test(regex_40, "40", "([^ab]*)*", "ababab", "(0,0)(0,0)"); + test(regex_41, "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)"); + test(regex_42, "42", "(a)", "aaa", "(0,1)(0,1)"); + test(regex_46, "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_47, "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_48, "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_49, "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_50, "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_51, "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_52, "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_53, "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)"); + test(regex_54, "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)"); std::cout << std::endl; } } @@ -681,85 +681,85 @@ test_repetition2: @regex type = { regex_271 := "(a|ab|c|bcd)+(d*)"; run: (this) = { std::cout << "Running repetition2:"<< std::endl; - test(regex_1(), "1", "((..)|(.))", "NULL", "NOMATCH"); - test(regex_2(), "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH"); - test(regex_3(), "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH"); - test(regex_4(), "4", "((..)|(.)){1}", "NULL", "NOMATCH"); - test(regex_5(), "5", "((..)|(.)){2}", "NULL", "NOMATCH"); - test(regex_6(), "6", "((..)|(.)){3}", "NULL", "NOMATCH"); - test(regex_7(), "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)"); - test(regex_8(), "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)"); - test(regex_9(), "9", "((..)|(.))((..)|(.))", "a", "NOMATCH"); - test(regex_10(), "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH"); - test(regex_11(), "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)"); - test(regex_12(), "12", "((..)|(.)){2}", "a", "NOMATCH"); - test(regex_13(), "13", "((..)|(.)){3}", "a", "NOMATCH"); - test(regex_14(), "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)"); - test(regex_15(), "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_16(), "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)"); - test(regex_17(), "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH"); - test(regex_18(), "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_19(), "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)"); - test(regex_20(), "20", "((..)|(.)){3}", "aa", "NOMATCH"); - test(regex_21(), "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_22(), "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_23(), "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)"); - test(regex_24(), "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)"); - test(regex_25(), "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_26(), "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); - test(regex_27(), "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); - test(regex_28(), "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)"); - test(regex_29(), "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_30(), "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); - test(regex_31(), "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)"); - test(regex_32(), "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_33(), "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_34(), "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)"); - test(regex_35(), "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_36(), "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_37(), "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); - test(regex_38(), "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)"); - test(regex_39(), "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_40(), "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_41(), "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); - test(regex_42(), "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); - test(regex_43(), "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_44(), "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); - test(regex_45(), "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)"); - test(regex_46(), "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_47(), "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_48(), "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); - test(regex_49(), "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); - test(regex_100(), "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_101(), "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_102(), "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_103(), "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_104(), "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_105(), "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_106(), "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_107(), "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_108(), "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)"); - test(regex_110(), "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_111(), "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_112(), "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_113(), "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_114(), "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_115(), "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_116(), "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_117(), "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_118(), "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)"); - test(regex_260(), "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_261(), "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_262(), "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_263(), "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_264(), "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH"); - test(regex_265(), "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_266(), "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_267(), "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_268(), "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_269(), "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH"); - test(regex_270(), "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_271(), "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_1, "1", "((..)|(.))", "NULL", "NOMATCH"); + test(regex_2, "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_3, "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_4, "4", "((..)|(.)){1}", "NULL", "NOMATCH"); + test(regex_5, "5", "((..)|(.)){2}", "NULL", "NOMATCH"); + test(regex_6, "6", "((..)|(.)){3}", "NULL", "NOMATCH"); + test(regex_7, "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)"); + test(regex_8, "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_9, "9", "((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_10, "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_11, "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_12, "12", "((..)|(.)){2}", "a", "NOMATCH"); + test(regex_13, "13", "((..)|(.)){3}", "a", "NOMATCH"); + test(regex_14, "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_15, "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_16, "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)"); + test(regex_17, "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH"); + test(regex_18, "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_19, "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_20, "20", "((..)|(.)){3}", "aa", "NOMATCH"); + test(regex_21, "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_22, "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_23, "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)"); + test(regex_24, "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)"); + test(regex_25, "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_26, "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_27, "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_28, "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_29, "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_30, "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_31, "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)"); + test(regex_32, "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_33, "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_34, "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)"); + test(regex_35, "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_36, "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_37, "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_38, "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)"); + test(regex_39, "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_40, "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_41, "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_42, "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_43, "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_44, "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_45, "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)"); + test(regex_46, "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_47, "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_48, "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_49, "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_100, "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_101, "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_102, "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_103, "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_104, "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_105, "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_106, "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_107, "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_108, "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_110, "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_111, "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_112, "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_113, "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_114, "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_115, "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_116, "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_117, "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_118, "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_260, "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_261, "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_262, "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_263, "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_264, "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH"); + test(regex_265, "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_266, "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_267, "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_268, "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_269, "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH"); + test(regex_270, "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_271, "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)"); std::cout << std::endl; } } @@ -840,90 +840,90 @@ test_totest: @regex type = { regex_218 := "(.|\$){2,2}"; regex_219 := "(.){2,}"; regex_220 := "(a|())(b|())(c|())"; - regex_220 := "ab()c|ab()c()"; + regex_230 := "ab()c|ab()c()"; regex_250 := "(b(c)|d(e))*"; regex_251 := "(a(b)*)*"; run: (this) = { std::cout << "Running totest:"<< std::endl; - test(regex_01(), "01", "a+", "xaax", "(1,3)"); - test(regex_03(), "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)"); - test(regex_04(), "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)"); - test(regex_05(), "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)"); - test(regex_06(), "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)"); - test(regex_07(), "07", "(.?)", "x", "(0,1)(0,1)"); - test(regex_08(), "08", "(.?){1}", "x", "(0,1)(0,1)"); - test(regex_09(), "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)"); - test(regex_10(), "10", "(.?){2}", "x", "(0,1)(1,1)"); - test(regex_11(), "11", "(.?)*", "x", "(0,1)(0,1)"); - test(regex_12(), "12", "(.?.?)", "xxx", "(0,2)(0,2)"); - test(regex_13(), "13", "(.?.?){1}", "xxx", "(0,2)(0,2)"); - test(regex_14(), "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)"); - test(regex_15(), "15", "(.?.?){2}", "xxx", "(0,3)(2,3)"); - test(regex_16(), "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)"); - test(regex_17(), "17", "(.?.?){3}", "xxx", "(0,3)(3,3)"); - test(regex_18(), "18", "(.?.?)*", "xxx", "(0,3)(2,3)"); - test(regex_19(), "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)"); - test(regex_20(), "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)"); - test(regex_21(), "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)"); - test(regex_22(), "22", "(a*){2}", "xxxxx", "(0,0)(0,0)"); - test(regex_23(), "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)"); - test(regex_24(), "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)"); - test(regex_25(), "25", "(a|ab|ba)", "aba", "(0,2)(0,2)"); - test(regex_26(), "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)"); - test(regex_27(), "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)"); - test(regex_28(), "28", "(aba|a*b)", "ababa", "(0,3)(0,3)"); - test(regex_29(), "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); - test(regex_1029(), "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH"); - test(regex_30(), "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); - test(regex_31(), "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)"); - test(regex_32(), "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)"); - test(regex_1032(), "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)"); - test(regex_33(), "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)"); - test(regex_34(), "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)"); - test(regex_35(), "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)"); - test(regex_36(), "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); - test(regex_37(), "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)"); - test(regex_38(), "38", ".*(.*)", "xx", "(0,2)(2,2)"); - test(regex_39(), "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)"); - test(regex_40(), "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)"); - test(regex_41(), "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)"); - test(regex_42(), "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)"); - test(regex_43(), "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)"); - test(regex_44(), "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)"); - test(regex_45(), "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)"); - test(regex_83(), "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)"); - test(regex_84(), "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); - test(regex_85(), "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_90(), "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)"); - test(regex_91(), "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)"); - test(regex_110(), "110", "(^){0,3}", "a", "(0,0)(0,0)"); - test(regex_111(), "111", "(\\$){0,3}", "a", "(0,0)(?,?)"); - test(regex_112(), "112", "(^){1,3}", "a", "(0,0)(0,0)"); - test(regex_113(), "113", "(\\$){1,3}", "a", "(1,1)(1,1)"); - test(regex_200(), "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)"); - test(regex_201(), "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)"); - test(regex_202(), "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); - test(regex_203(), "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); - test(regex_204(), "204", "s()?e", "searchme", "(0,2)(1,1)"); - test(regex_205(), "205", "s(^)?e", "searchme", "(0,2)(?,?)"); - test(regex_206(), "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)"); - test(regex_207(), "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)"); - test(regex_208(), "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)"); - test(regex_209(), "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)"); - test(regex_210(), "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)"); - test(regex_211(), "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)"); - test(regex_212(), "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)"); - test(regex_213(), "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)"); - test(regex_214(), "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)"); - test(regex_215(), "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)"); - test(regex_216(), "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)"); - test(regex_217(), "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)"); - test(regex_218(), "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)"); - test(regex_219(), "219", "(.){2,}", "xx", "(0,2)(1,2)"); - test(regex_220(), "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)"); - test(regex_220(), "220", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)"); - test(regex_250(), "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)"); - test(regex_251(), "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)"); + test(regex_01, "01", "a+", "xaax", "(1,3)"); + test(regex_03, "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)"); + test(regex_04, "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)"); + test(regex_05, "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)"); + test(regex_06, "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)"); + test(regex_07, "07", "(.?)", "x", "(0,1)(0,1)"); + test(regex_08, "08", "(.?){1}", "x", "(0,1)(0,1)"); + test(regex_09, "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)"); + test(regex_10, "10", "(.?){2}", "x", "(0,1)(1,1)"); + test(regex_11, "11", "(.?)*", "x", "(0,1)(0,1)"); + test(regex_12, "12", "(.?.?)", "xxx", "(0,2)(0,2)"); + test(regex_13, "13", "(.?.?){1}", "xxx", "(0,2)(0,2)"); + test(regex_14, "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)"); + test(regex_15, "15", "(.?.?){2}", "xxx", "(0,3)(2,3)"); + test(regex_16, "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)"); + test(regex_17, "17", "(.?.?){3}", "xxx", "(0,3)(3,3)"); + test(regex_18, "18", "(.?.?)*", "xxx", "(0,3)(2,3)"); + test(regex_19, "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)"); + test(regex_20, "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)"); + test(regex_21, "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)"); + test(regex_22, "22", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_23, "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_24, "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_25, "25", "(a|ab|ba)", "aba", "(0,2)(0,2)"); + test(regex_26, "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_27, "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)"); + test(regex_28, "28", "(aba|a*b)", "ababa", "(0,3)(0,3)"); + test(regex_29, "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1029, "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH"); + test(regex_30, "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_31, "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)"); + test(regex_32, "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1032, "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)"); + test(regex_33, "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)"); + test(regex_34, "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)"); + test(regex_35, "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)"); + test(regex_36, "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_37, "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)"); + test(regex_38, "38", ".*(.*)", "xx", "(0,2)(2,2)"); + test(regex_39, "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)"); + test(regex_40, "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)"); + test(regex_41, "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)"); + test(regex_42, "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_43, "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_44, "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)"); + test(regex_45, "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_83, "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)"); + test(regex_84, "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_85, "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_90, "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)"); + test(regex_91, "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)"); + test(regex_110, "110", "(^){0,3}", "a", "(0,0)(0,0)"); + test(regex_111, "111", "(\\$){0,3}", "a", "(0,0)(?,?)"); + test(regex_112, "112", "(^){1,3}", "a", "(0,0)(0,0)"); + test(regex_113, "113", "(\\$){1,3}", "a", "(1,1)(1,1)"); + test(regex_200, "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)"); + test(regex_201, "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_202, "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_203, "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_204, "204", "s()?e", "searchme", "(0,2)(1,1)"); + test(regex_205, "205", "s(^)?e", "searchme", "(0,2)(?,?)"); + test(regex_206, "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)"); + test(regex_207, "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)"); + test(regex_208, "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)"); + test(regex_209, "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)"); + test(regex_210, "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)"); + test(regex_211, "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)"); + test(regex_212, "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)"); + test(regex_213, "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)"); + test(regex_214, "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)"); + test(regex_215, "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_216, "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)"); + test(regex_217, "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)"); + test(regex_218, "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)"); + test(regex_219, "219", "(.){2,}", "xx", "(0,2)(1,2)"); + test(regex_220, "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)"); + test(regex_230, "230", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)"); + test(regex_250, "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)"); + test(regex_251, "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)"); std::cout << std::endl; } } @@ -941,17 +941,17 @@ test_osx_bsd_critical: @regex type = { regex_20 := "(.?)(b)"; run: (this) = { std::cout << "Running osx_bsd_critical:"<< std::endl; - test(regex_1(), "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_M1(), "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); - test(regex_2(), "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_M2(), "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); - test(regex_3(), "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)"); - test(regex_M3(), "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)"); - test(regex_11(), "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_12(), "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_14(), "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)"); - test(regex_M14(), "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)"); - test(regex_20(), "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)"); + test(regex_1, "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M1, "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_2, "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2, "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_3, "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M3, "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)"); + test(regex_11, "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_12, "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_14, "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M14, "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)"); + test(regex_20, "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)"); std::cout << std::endl; } } diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution index 0585b2f5f4..585f616d3f 100644 --- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution +++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution @@ -153,7 +153,7 @@ M2: OK regex: (a*)(ab)*(b*) parsed_regex: (a*)(ab)*(b*) str: abc result: (0,2)(0 7: OK regex: (a*){2} parsed_regex: (a*){2} str: xxxxx result: (0,0)(0,0) expected_results (0,0)(0,0) 8: OK regex: (a*)* parsed_regex: (a*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) 9: Failure: Ranges are wrong. regex: (aba|a*b)* parsed_regex: (aba|a*b)* str: ababa result: (0,4)(3,4) expected_results (0,5)(2,5) -10: Failure: Ranges are wrong. regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(?,?) +10: OK regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(?,?) 11: OK regex: .*(.*) parsed_regex: .*(.*) str: ab result: (0,2)(2,2) expected_results (0,2)(2,2) 12: OK regex: (a?)((ab)?)(b?)a?(ab)?b? parsed_regex: (a?)((ab)?)(b?)a?(ab)?b? str: abab result: (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) expected_results (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) M12: OK regex: (a?)((ab)?)(b?)a?(ab)?b? parsed_regex: (a?)((ab)?)(b?)a?(ab)?b? str: abab result: (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) expected_results (0,4)(0,1)(1,1)(?,?)(1,2)(2,4) @@ -230,7 +230,7 @@ Running nullsub3: 11: OK regex: (a+)* parsed_regex: (a+)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) 12: OK regex: (a+)* parsed_regex: (a+)* str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) 13: OK regex: (a+)+ parsed_regex: (a+)+ str: a result: (0,1)(0,1) expected_results (0,1)(0,1) -14: OK regex: (a+)+ parsed_regex: (a+)+ str: x result: (?,?)(?,?) expected_results NOMATCH +14: OK regex: (a+)+ parsed_regex: (a+)+ str: x result: NOMATCH expected_results NOMATCH 15: OK regex: (a+)+ parsed_regex: (a+)+ str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6) 16: OK regex: (a+)+ parsed_regex: (a+)+ str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6) 17: OK regex: ([a]*)* parsed_regex: ([a]*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1) @@ -270,40 +270,40 @@ Running nullsub3: 54: OK regex: (a*){2}(x) parsed_regex: (a*){2}(x) str: axa result: (0,2)(1,1)(1,2) expected_results (0,2)(1,1)(1,2) Running repetition2: -1: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH -2: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: NULL result: (?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH -3: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: NULL result: (?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH -4: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH -5: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH -6: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: NULL result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +1: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: NULL result: NOMATCH expected_results NOMATCH +2: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: NULL result: NOMATCH expected_results NOMATCH +3: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: NULL result: NOMATCH expected_results NOMATCH +4: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: NULL result: NOMATCH expected_results NOMATCH +5: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: NULL result: NOMATCH expected_results NOMATCH +6: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: NULL result: NOMATCH expected_results NOMATCH 7: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: NULL result: (0,0)(?,?)(?,?)(?,?) expected_results (0,0)(?,?)(?,?)(?,?) 8: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1) -9: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: a result: (?,?)(0,1)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH -10: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: a result: (?,?)(0,1)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +9: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: a result: NOMATCH expected_results NOMATCH +10: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: a result: NOMATCH expected_results NOMATCH 11: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1) -12: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: a result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH -13: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: a result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +12: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: a result: NOMATCH expected_results NOMATCH +13: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: a result: NOMATCH expected_results NOMATCH 14: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1) 15: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) 16: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aa result: (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2) -17: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aa result: (?,?)(1,2)(?,?)(?,?)(1,2)(?,?)(?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +17: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aa result: NOMATCH expected_results NOMATCH 18: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) -19: Failure: Regex should apply. regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aa result: (?,?)(?,?)(?,?)(?,?) expected_results (0,2)(1,2)(?,?)(1,2) -20: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aa result: (?,?)(?,?)(?,?)(?,?) expected_results NOMATCH +19: Failure: Regex should apply. regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aa result: NOMATCH expected_results (0,2)(1,2)(?,?)(1,2) +20: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aa result: NOMATCH expected_results NOMATCH 21: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) 22: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) 23: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaa result: (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3) expected_results (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3) 24: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaa result: (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3) expected_results (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3) 25: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) 26: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaa result: (0,3)(2,3)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(2,3) -27: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaa result: (?,?)(?,?)(?,?)(?,?) expected_results (0,3)(2,3)(?,?)(2,3) +27: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaa result: NOMATCH expected_results (0,3)(2,3)(?,?)(2,3) 28: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaa result: (0,3)(2,3)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(2,3) 29: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) 30: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) 31: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaaa result: (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4) expected_results (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4) 32: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) 33: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?) -34: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaa result: (?,?)(?,?)(?,?)(?,?) expected_results (0,4)(3,4)(?,?)(3,4) +34: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaa result: NOMATCH expected_results (0,4)(3,4)(?,?)(3,4) 35: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?) 36: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?) 37: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) @@ -327,7 +327,7 @@ Running repetition2: 105: OK regex: X(.?){5,}Y parsed_regex: X(.?){5,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) 106: OK regex: X(.?){6,}Y parsed_regex: X(.?){6,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) 107: OK regex: X(.?){7,}Y parsed_regex: X(.?){7,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) -108: Failure: Regex should apply. regex: X(.?){8,}Y parsed_regex: X(.?){8,}Y str: X1234567Y result: (?,?)(?,?) expected_results (0,9)(8,8) +108: Failure: Regex should apply. regex: X(.?){8,}Y parsed_regex: X(.?){8,}Y str: X1234567Y result: NOMATCH expected_results (0,9)(8,8) 110: OK regex: X(.?){0,8}Y parsed_regex: X(.?){0,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) 111: OK regex: X(.?){1,8}Y parsed_regex: X(.?){1,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) 112: OK regex: X(.?){2,8}Y parsed_regex: X(.?){2,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) @@ -336,17 +336,17 @@ Running repetition2: 115: OK regex: X(.?){5,8}Y parsed_regex: X(.?){5,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) 116: OK regex: X(.?){6,8}Y parsed_regex: X(.?){6,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) 117: OK regex: X(.?){7,8}Y parsed_regex: X(.?){7,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8) -118: Failure: Parsed regex does not match. regex: X(.?){8,8}Y parsed_regex: X(.?){8}Y str: X1234567Y result: (?,?)(?,?) expected_results (0,9)(8,8) +118: Failure: Parsed regex does not match. regex: X(.?){8,8}Y parsed_regex: X(.?){8}Y str: X1234567Y result: NOMATCH expected_results (0,9)(8,8) 260: Failure: Ranges are wrong. regex: (a|ab|c|bcd){0,}(d*) parsed_regex: (a|ab|c|bcd){0,}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) 261: Failure: Ranges are wrong. regex: (a|ab|c|bcd){1,}(d*) parsed_regex: (a|ab|c|bcd){1,}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) 262: Failure: Ranges are wrong. regex: (a|ab|c|bcd){2,}(d*) parsed_regex: (a|ab|c|bcd){2,}(d*) str: ababcd result: (2,6)(3,6)(6,6) expected_results (0,6)(3,6)(6,6) -263: Failure: Regex should apply. regex: (a|ab|c|bcd){3,}(d*) parsed_regex: (a|ab|c|bcd){3,}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results (0,6)(3,6)(6,6) -264: OK regex: (a|ab|c|bcd){4,}(d*) parsed_regex: (a|ab|c|bcd){4,}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results NOMATCH +263: Failure: Regex should apply. regex: (a|ab|c|bcd){3,}(d*) parsed_regex: (a|ab|c|bcd){3,}(d*) str: ababcd result: NOMATCH expected_results (0,6)(3,6)(6,6) +264: OK regex: (a|ab|c|bcd){4,}(d*) parsed_regex: (a|ab|c|bcd){4,}(d*) str: ababcd result: NOMATCH expected_results NOMATCH 265: Failure: Ranges are wrong. regex: (a|ab|c|bcd){0,10}(d*) parsed_regex: (a|ab|c|bcd){0,10}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) 266: Failure: Ranges are wrong. regex: (a|ab|c|bcd){1,10}(d*) parsed_regex: (a|ab|c|bcd){1,10}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) 267: Failure: Ranges are wrong. regex: (a|ab|c|bcd){2,10}(d*) parsed_regex: (a|ab|c|bcd){2,10}(d*) str: ababcd result: (2,6)(3,6)(6,6) expected_results (0,6)(3,6)(6,6) -268: Failure: Regex should apply. regex: (a|ab|c|bcd){3,10}(d*) parsed_regex: (a|ab|c|bcd){3,10}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results (0,6)(3,6)(6,6) -269: OK regex: (a|ab|c|bcd){4,10}(d*) parsed_regex: (a|ab|c|bcd){4,10}(d*) str: ababcd result: (?,?)(?,?)(?,?) expected_results NOMATCH +268: Failure: Regex should apply. regex: (a|ab|c|bcd){3,10}(d*) parsed_regex: (a|ab|c|bcd){3,10}(d*) str: ababcd result: NOMATCH expected_results (0,6)(3,6)(6,6) +269: OK regex: (a|ab|c|bcd){4,10}(d*) parsed_regex: (a|ab|c|bcd){4,10}(d*) str: ababcd result: NOMATCH expected_results NOMATCH 270: Failure: Ranges are wrong. regex: (a|ab|c|bcd)*(d*) parsed_regex: (a|ab|c|bcd)*(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) 271: Failure: Ranges are wrong. regex: (a|ab|c|bcd)+(d*) parsed_regex: (a|ab|c|bcd)+(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6) @@ -379,7 +379,7 @@ Running totest: 27: Failure: Ranges are wrong. regex: (a|ab|ba)* parsed_regex: (a|ab|ba)* str: aba result: (0,3)(1,3) expected_results (0,3)(2,3) 28: OK regex: (aba|a*b) parsed_regex: (aba|a*b) str: ababa result: (0,3)(0,3) expected_results (0,3)(0,3) 29: Failure: Ranges are wrong. regex: (aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b) str: ababa result: (0,4)(0,3)(3,4) expected_results (0,5)(0,2)(2,5) -1029: OK regex: (aba|a*b)(aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b)(aba|a*b) str: ababa result: (?,?)(3,4)(2,4)(?,?) expected_results NOMATCH +1029: OK regex: (aba|a*b)(aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b)(aba|a*b) str: ababa result: NOMATCH expected_results NOMATCH 30: Failure: Ranges are wrong. regex: (aba|a*b)* parsed_regex: (aba|a*b)* str: ababa result: (0,4)(3,4) expected_results (0,5)(2,5) 31: OK regex: (aba|ab|a) parsed_regex: (aba|ab|a) str: ababa result: (0,3)(0,3) expected_results (0,3)(0,3) 32: OK regex: (aba|ab|a)(aba|ab|a) parsed_regex: (aba|ab|a)(aba|ab|a) str: ababa result: (0,5)(0,2)(2,5) expected_results (0,5)(0,2)(2,5) @@ -387,7 +387,7 @@ Running totest: 33: Failure: Ranges are wrong. regex: (aba|ab|a)* parsed_regex: (aba|ab|a)* str: ababa result: (0,3)(0,3) expected_results (0,5)(2,5) 34: OK regex: (a(b)?) parsed_regex: (a(b)?) str: aba result: (0,2)(0,2)(1,2) expected_results (0,2)(0,2)(1,2) 35: OK regex: (a(b)?)(a(b)?) parsed_regex: (a(b)?)(a(b)?) str: aba result: (0,3)(0,2)(1,2)(2,3)(?,?) expected_results (0,3)(0,2)(1,2)(2,3)(?,?) -36: Failure: Ranges are wrong. regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(?,?) +36: OK regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(?,?) 37: OK regex: (.*)(.*) parsed_regex: (.*)(.*) str: xx result: (0,2)(0,2)(2,2) expected_results (0,2)(0,2)(2,2) 38: OK regex: .*(.*) parsed_regex: .*(.*) str: xx result: (0,2)(2,2) expected_results (0,2)(2,2) 39: OK regex: (a.*z|b.*y) parsed_regex: (a.*z|b.*y) str: azbazby result: (0,5)(0,5) expected_results (0,5)(0,5) @@ -397,8 +397,8 @@ Running totest: 43: Failure: Ranges are wrong. regex: ((..)*(...)*) parsed_regex: ((..)*(...)*) str: xxx result: (0,2)(0,2)(0,2)(?,?) expected_results (0,3)(0,3)(?,?)(0,3) 44: Failure: Ranges are wrong. regex: ((..)*(...)*)((..)*(...)*) parsed_regex: ((..)*(...)*)((..)*(...)*) str: xxx result: (0,2)(0,2)(0,2)(?,?)(2,2)(?,?)(?,?) expected_results (0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?) 45: Failure: Ranges are wrong. regex: ((..)*(...)*)* parsed_regex: ((..)*(...)*)* str: xxx result: (0,2)(0,2)(0,2)(?,?) expected_results (0,3)(0,3)(?,?)(0,3) -83: Failure: Ranges are wrong. regex: (aa(b(b))?)+ parsed_regex: (aa(b(b))?)+ str: aabbaa result: (0,6)(4,6)(2,4)(3,4) expected_results (0,6)(4,6)(?,?)(?,?) -84: Failure: Ranges are wrong. regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(?,?) +83: OK regex: (aa(b(b))?)+ parsed_regex: (aa(b(b))?)+ str: aabbaa result: (0,6)(4,6)(?,?)(?,?) expected_results (0,6)(4,6)(?,?)(?,?) +84: OK regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(?,?) 85: OK regex: ([ab]+)([bc]+)([cd]*) parsed_regex: ([ab]+)([bc]+)([cd]*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4) 90: OK regex: ^(A([^B]*))?(B(.*))? parsed_regex: ^(A([^B]*))?(B(.*))? str: Aa result: (0,2)(0,2)(1,2)(?,?)(?,?) expected_results (0,2)(0,2)(1,2)(?,?)(?,?) 91: OK regex: ^(A([^B]*))?(B(.*))? parsed_regex: ^(A([^B]*))?(B(.*))? str: Bb result: (0,2)(?,?)(?,?)(0,2)(1,2) expected_results (0,2)(?,?)(?,?)(0,2)(1,2) @@ -424,12 +424,12 @@ Running totest: 215: OK regex: ((a)|(b)){2,} parsed_regex: ((a)|(b)){2,} str: ab result: (0,2)(1,2)(?,?)(1,2) expected_results (0,2)(1,2)(?,?)(1,2) 216: OK regex: .()|((.)?) parsed_regex: .()|((.)?) str: NULL result: (0,0)(?,?)(0,0)(?,?) expected_results (0,0)(?,?)(0,0)(?,?) 217: OK regex: (.|\$){2,} parsed_regex: (.|\$){2,} str: xx result: (0,2)(1,2) expected_results (0,2)(1,2) -218: Failure: Parsed regex does not match. regex: (.|\$){2,2} parsed_regex: (.|\$){2} str: xx result: (?,?)(?,?) expected_results (0,2)(1,2) +218: Failure: Parsed regex does not match. regex: (.|\$){2,2} parsed_regex: (.|\$){2} str: xx result: NOMATCH expected_results (0,2)(1,2) 219: OK regex: (.){2,} parsed_regex: (.){2,} str: xx result: (0,2)(1,2) expected_results (0,2)(1,2) -220: Failure: Parsed regex does not match. regex: (a|())(b|())(c|()) parsed_regex: ab()c|ab()c() str: abc result: (?,?)(?,?)(?,?)(?,?) expected_results (0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?) -220: Failure: Ranges are wrong. regex: ab()c|ab()c() parsed_regex: ab()c|ab()c() str: abc result: (0,3)(2,2)(?,?)(?,?) expected_results (0,3)(2,2)(-1,-1)(-1,-1) +220: OK regex: (a|())(b|())(c|()) parsed_regex: (a|())(b|())(c|()) str: abc result: (0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?) expected_results (0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?) +230: Failure: Ranges are wrong. regex: ab()c|ab()c() parsed_regex: ab()c|ab()c() str: abc result: (0,3)(2,2)(?,?)(?,?) expected_results (0,3)(2,2)(-1,-1)(-1,-1) 250: Failure: Ranges are wrong. regex: (b(c)|d(e))* parsed_regex: (b(c)|d(e))* str: bcde result: (0,4)(2,4)(?,?)(3,4) expected_results (0,4)(2,4)(-1,-1)(3,4) -251: Failure: Ranges are wrong. regex: (a(b)*)* parsed_regex: (a(b)*)* str: aba result: (0,3)(2,3)(1,2) expected_results (0,3)(2,3)(-1,-1) +251: Failure: Ranges are wrong. regex: (a(b)*)* parsed_regex: (a(b)*)* str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(-1,-1) Running osx_bsd_critical: 1: OK regex: (()|.)(b) parsed_regex: (()|.)(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2) diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp index 0308388025..e86a13dbf8 100644 --- a/regression-tests/test-results/pure2-regex.cpp +++ b/regression-tests/test-results/pure2-regex.cpp @@ -56,291 +56,7 @@ class test_basic3 { #line 191 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_1 = ::cpp2::regex::regular_expression>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; -public: using regex_10 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; -public: using regex_100 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_100(cpp2::in str) const& -> auto; -public: using regex_101 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_101(cpp2::in str) const& -> auto; -public: using regex_102 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_102(cpp2::in str) const& -> auto; -public: using regex_103 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_103(cpp2::in str) const& -> auto; -public: using regex_104 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_104(cpp2::in str) const& -> auto; -public: using regex_105 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_105(cpp2::in str) const& -> auto; -public: using regex_106 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_106(cpp2::in str) const& -> auto; -public: using regex_107 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_107(cpp2::in str) const& -> auto; -public: using regex_108 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_108(cpp2::in str) const& -> auto; -public: using regex_109 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_109(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression,0,0,0>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_110 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_110(cpp2::in str) const& -> auto; -public: using regex_111 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_111(cpp2::in str) const& -> auto; -public: using regex_112 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::special_range_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_112(cpp2::in str) const& -> auto; -public: using regex_113 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_113(cpp2::in str) const& -> auto; -public: using regex_114 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_114(cpp2::in str) const& -> auto; -public: using regex_115 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),2,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_115(cpp2::in str) const& -> auto; -public: using regex_116 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_116(cpp2::in str) const& -> auto; -public: using regex_117 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_117(cpp2::in str) const& -> auto; -public: using regex_118 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_118(cpp2::in str) const& -> auto; -public: using regex_119 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_119(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2,'?'>>,2>,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),4,'+'>>,3>,::cpp2::regex::range_matcher_logic,3,3,6>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_120 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,3>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_120(cpp2::in str) const& -> auto; -public: using regex_121 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,3>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_121(cpp2::in str) const& -> auto; -public: using regex_122 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,3>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_122(cpp2::in str) const& -> auto; -public: using regex_123 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_123(cpp2::in str) const& -> auto; -public: using regex_124 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_124(cpp2::in str) const& -> auto; -public: using regex_125 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_125(cpp2::in str) const& -> auto; -public: using regex_126 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_126(cpp2::in str) const& -> auto; -public: using regex_127 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_127(cpp2::in str) const& -> auto; -public: using regex_128 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,2>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_128(cpp2::in str) const& -> auto; -public: using regex_129 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_129(cpp2::in str) const& -> auto; -public: using regex_13 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2>>,2>,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),4>>,3>,::cpp2::regex::range_matcher_logic,3,3,6>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; -public: using regex_130 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_130(cpp2::in str) const& -> auto; -public: using regex_131 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_131(cpp2::in str) const& -> auto; -public: using regex_132 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_132(cpp2::in str) const& -> auto; -public: using regex_133 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_133(cpp2::in str) const& -> auto; -public: using regex_134 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_134(cpp2::in str) const& -> auto; -public: using regex_135 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_135(cpp2::in str) const& -> auto; -public: using regex_136 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,1>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,2>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,3>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,4>,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_136(cpp2::in str) const& -> auto; -public: using regex_137 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_137(cpp2::in str) const& -> auto; -public: using regex_138 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_138(cpp2::in str) const& -> auto; -public: using regex_139 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_139(cpp2::in str) const& -> auto; -public: using regex_140 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),3,'+'>>,3>>,::cpp2::regex::list_matcher_logic,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::char_matcher_logic>,4>,::cpp2::regex::group_matcher_logic>,1,std::numeric_limits::max(),8,'+'>>,5>>>,1>,::cpp2::regex::line_end_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_140(cpp2::in str) const& -> auto; -public: using regex_141 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_141(cpp2::in str) const& -> auto; -public: using regex_142 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_142(cpp2::in str) const& -> auto; -public: using regex_143 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_143(cpp2::in str) const& -> auto; -public: using regex_144 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_144(cpp2::in str) const& -> auto; -public: using regex_145 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_145(cpp2::in str) const& -> auto; -public: using regex_146 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_146(cpp2::in str) const& -> auto; -public: using regex_15 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,2>>,::cpp2::regex::list_matcher_logic>>,1>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; -public: using regex_16 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; -public: using regex_17 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; -public: using regex_18 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,3>,::cpp2::regex::char_matcher_logic>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; -public: using regex_19 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; -public: using regex_2 = ::cpp2::regex::regular_expression>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; -public: using regex_20 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; -public: using regex_21 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; -public: using regex_22 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,0,std::numeric_limits::max(),7,'*'>,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; -public: using regex_23 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,0,std::numeric_limits::max(),7,'*'>,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; -public: using regex_24 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; -public: using regex_25 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; -public: using regex_26 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::range_matcher_logic,0,0,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; -public: using regex_27 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; -public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; -public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; -public: using regex_3 = ::cpp2::regex::regular_expression>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; -public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; -public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>>,2>>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; -public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; -public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; -public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; -public: using regex_36 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; -public: using regex_37 = ::cpp2::regex::regular_expression>,1,std::numeric_limits::max(),0,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; -public: using regex_38 = ::cpp2::regex::regular_expression>,1,std::numeric_limits::max(),0,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; -public: using regex_39 = ::cpp2::regex::regular_expression>,1>,::cpp2::regex::group_matcher_logic>,2>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; -public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::line_start_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; -public: using regex_43 = ::cpp2::regex::regular_expression>,30>>,29>>,28>>,27>>,26>>,25>>,24>>,23>>,22>>,21>>,20>>,19>>,18>>,17>>,16>>,15>>,14>>,13>>,12>>,11>>,10>>,9>>,8>>,7>>,6>>,5>>,4>>,3>>,2>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,31>; -public: [[nodiscard]] auto match_43(cpp2::in str) const& -> auto; -public: using regex_44 = ::cpp2::regex::regular_expression>,30>>,29>>,28>>,27>>,26>>,25>>,24>>,23>>,22>>,21>>,20>>,19>>,18>>,17>>,16>>,15>>,14>>,13>>,12>>,11>>,10>>,9>>,8>>,7>>,6>>,5>>,4>>,3>>,2>>,1>,0,std::numeric_limits::max(),30,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,31>; -public: [[nodiscard]] auto match_44(cpp2::in str) const& -> auto; -public: using regex_45 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_45(cpp2::in str) const& -> auto; -public: using regex_46 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_46(cpp2::in str) const& -> auto; -public: using regex_47 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_47(cpp2::in str) const& -> auto; -public: using regex_48 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_48(cpp2::in str) const& -> auto; -public: using regex_49 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_49(cpp2::in str) const& -> auto; -public: using regex_5 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; -public: using regex_50 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_50(cpp2::in str) const& -> auto; -public: using regex_51 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_51(cpp2::in str) const& -> auto; -public: using regex_52 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_52(cpp2::in str) const& -> auto; -public: using regex_53 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_53(cpp2::in str) const& -> auto; -public: using regex_54 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_54(cpp2::in str) const& -> auto; -public: using regex_55 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_55(cpp2::in str) const& -> auto; -public: using regex_56 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_56(cpp2::in str) const& -> auto; -public: using regex_57 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_57(cpp2::in str) const& -> auto; -public: using regex_58 = ::cpp2::regex::regular_expression,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_58(cpp2::in str) const& -> auto; -public: using regex_59 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_59(cpp2::in str) const& -> auto; -public: using regex_6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,1>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; -public: using regex_60 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_60(cpp2::in str) const& -> auto; -public: using regex_61 = ::cpp2::regex::regular_expression>,2>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_61(cpp2::in str) const& -> auto; -public: using regex_62 = ::cpp2::regex::regular_expression>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_62(cpp2::in str) const& -> auto; -public: using regex_63 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_63(cpp2::in str) const& -> auto; -public: using regex_64 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_64(cpp2::in str) const& -> auto; -public: using regex_65 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_65(cpp2::in str) const& -> auto; -public: using regex_66 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_66(cpp2::in str) const& -> auto; -public: using regex_67 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_67(cpp2::in str) const& -> auto; -public: using regex_68 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_68(cpp2::in str) const& -> auto; -public: using regex_69 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,1,std::numeric_limits::max(),4,'+'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_69(cpp2::in str) const& -> auto; -public: using regex_7 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; -public: using regex_70 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,0,1,4,'?'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_70(cpp2::in str) const& -> auto; -public: using regex_71 = ::cpp2::regex::regular_expression>,1>,0,std::numeric_limits::max(),1,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_71(cpp2::in str) const& -> auto; -public: using regex_72 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_72(cpp2::in str) const& -> auto; -public: using regex_73 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_73(cpp2::in str) const& -> auto; -public: using regex_74 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>>,0>,std::tuple,1>; -public: [[nodiscard]] auto match_74(cpp2::in str) const& -> auto; -public: using regex_75 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_75(cpp2::in str) const& -> auto; -public: using regex_76 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,::cpp2::regex::list_matcher_logic>>,2>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_76(cpp2::in str) const& -> auto; -public: using regex_77 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_77(cpp2::in str) const& -> auto; -public: using regex_78 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_78(cpp2::in str) const& -> auto; -public: using regex_79 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_79(cpp2::in str) const& -> auto; -public: using regex_8 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,1>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; -public: using regex_80 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_80(cpp2::in str) const& -> auto; -public: using regex_81 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_81(cpp2::in str) const& -> auto; -public: using regex_82 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_82(cpp2::in str) const& -> auto; -public: using regex_83 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_83(cpp2::in str) const& -> auto; -public: using regex_84 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_84(cpp2::in str) const& -> auto; -public: using regex_85 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_85(cpp2::in str) const& -> auto; -public: using regex_86 = ::cpp2::regex::regular_expression>,2>,::cpp2::regex::group_matcher_logic>,3>,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::group_matcher_logic>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_86(cpp2::in str) const& -> auto; -public: using regex_87 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_87(cpp2::in str) const& -> auto; -public: using regex_88 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,1>>,0>,std::tuple,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_88(cpp2::in str) const& -> auto; -public: using regex_89 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,1>>,0>,std::tuple,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_89(cpp2::in str) const& -> auto; -public: using regex_9 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; -public: using regex_90 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),0,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>>,1>>,0>,std::tuple,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_90(cpp2::in str) const& -> auto; -public: using regex_91 = ::cpp2::regex::regular_expression>,9>>,8>>,7>>,6>>,5>>,4>>,3>>,2>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_91(cpp2::in str) const& -> auto; -public: using regex_92 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_92(cpp2::in str) const& -> auto; -public: using regex_93 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_93(cpp2::in str) const& -> auto; -public: using regex_94 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,0,1,0,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_94(cpp2::in str) const& -> auto; -public: using regex_95 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_95(cpp2::in str) const& -> auto; -public: using regex_96 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_96(cpp2::in str) const& -> auto; -public: using regex_97 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_97(cpp2::in str) const& -> auto; -public: using regex_98 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_98(cpp2::in str) const& -> auto; -public: using regex_99 = ::cpp2::regex::regular_expression,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,std::numeric_limits::max(),1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,1>,0,1,4,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),6,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,7,'?'>>,2>,1,std::numeric_limits::max(),9,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,0>,std::tuple,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_99(cpp2::in str) const& -> auto; -public: using regex_M34 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_M34(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::range_matcher_logic,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_M34 {}; public: test_basic3() = default; public: test_basic3(test_basic3 const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_basic3 const&) -> void = delete; @@ -352,35 +68,7 @@ class test_class { #line 353 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_1 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; -public: using regex_10 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,1,std::numeric_limits::max(),3,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),1,'*'>>,1>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,4>,::cpp2::regex::special_range_matcher_logic,0,1,7,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,5>,0,1,9,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,10,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_2 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; -public: using regex_3 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,6>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; -public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; -public: using regex_5 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; -public: using regex_6 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; -public: using regex_7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; -public: using regex_8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; -public: using regex_9 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; -public: using regex_M12 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,4>,::cpp2::regex::special_range_matcher_logic,0,1,7,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,5>,0,1,9,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,10,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_M12(cpp2::in str) const& -> auto; -public: using regex_M2 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,std::numeric_limits::max(),3,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M2(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; public: test_class() = default; public: test_class(test_class const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_class const&) -> void = delete; @@ -392,31 +80,7 @@ class test_left_assoc { #line 385 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_M1 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M1(cpp2::in str) const& -> auto; -public: using regex_M10 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M10(cpp2::in str) const& -> auto; -public: using regex_M11 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M11(cpp2::in str) const& -> auto; -public: using regex_M12 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M12(cpp2::in str) const& -> auto; -public: using regex_M2 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M2(cpp2::in str) const& -> auto; -public: using regex_M3 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M3(cpp2::in str) const& -> auto; -public: using regex_M4 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M4(cpp2::in str) const& -> auto; -public: using regex_M5 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M5(cpp2::in str) const& -> auto; -public: using regex_M6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M6(cpp2::in str) const& -> auto; -public: using regex_M7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M7(cpp2::in str) const& -> auto; -public: using regex_M8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M8(cpp2::in str) const& -> auto; -public: using regex_M9 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_M9(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M9 {}; public: test_left_assoc() = default; public: test_left_assoc(test_left_assoc const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_left_assoc const&) -> void = delete; @@ -428,31 +92,7 @@ class test_right_assoc { #line 415 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_1 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; -public: using regex_10 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_2 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; -public: using regex_3 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; -public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; -public: using regex_5 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; -public: using regex_6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; -public: using regex_7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; -public: using regex_8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; -public: using regex_9 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),6,'*'>>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: test_right_assoc() = default; public: test_right_assoc(test_right_assoc const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_right_assoc const&) -> void = delete; @@ -464,63 +104,7 @@ class test_forced_assoc { #line 461 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_1 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; -public: using regex_10 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_13 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; -public: using regex_14 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; -public: using regex_15 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; -public: using regex_16 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; -public: using regex_17 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; -public: using regex_18 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; -public: using regex_19 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; -public: using regex_2 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; -public: using regex_20 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; -public: using regex_21 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; -public: using regex_22 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; -public: using regex_23 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; -public: using regex_24 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),5,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; -public: using regex_25 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; -public: using regex_26 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; -public: using regex_27 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; -public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; -public: using regex_3 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; -public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; -public: using regex_5 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; -public: using regex_6 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; -public: using regex_7 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; -public: using regex_8 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),7,'*'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; -public: using regex_9 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,3>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,4>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: test_forced_assoc() = default; public: test_forced_assoc(test_forced_assoc const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_forced_assoc const&) -> void = delete; @@ -532,109 +116,7 @@ class test_nullsub3 { #line 546 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_1 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; -public: using regex_10 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_13 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; -public: using regex_14 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; -public: using regex_15 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; -public: using regex_16 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; -public: using regex_17 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; -public: using regex_18 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; -public: using regex_19 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; -public: using regex_2 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; -public: using regex_20 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; -public: using regex_21 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; -public: using regex_22 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; -public: using regex_23 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; -public: using regex_24 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; -public: using regex_25 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; -public: using regex_26 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; -public: using regex_27 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; -public: using regex_28 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; -public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; -public: using regex_3 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; -public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; -public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; -public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; -public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; -public: using regex_34 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_34(cpp2::in str) const& -> auto; -public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; -public: using regex_36 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; -public: using regex_37 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; -public: using regex_38 = ::cpp2::regex::regular_expression>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; -public: using regex_39 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; -public: using regex_4 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; -public: using regex_40 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_40(cpp2::in str) const& -> auto; -public: using regex_41 = ::cpp2::regex::regular_expression>,2>,1,std::numeric_limits::max(),1,'+'>>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_41(cpp2::in str) const& -> auto; -public: using regex_42 = ::cpp2::regex::regular_expression>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_42(cpp2::in str) const& -> auto; -public: using regex_46 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_46(cpp2::in str) const& -> auto; -public: using regex_47 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_47(cpp2::in str) const& -> auto; -public: using regex_48 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,0,std::numeric_limits::max(),2,'*'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_48(cpp2::in str) const& -> auto; -public: using regex_49 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_49(cpp2::in str) const& -> auto; -public: using regex_5 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; -public: using regex_50 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_50(cpp2::in str) const& -> auto; -public: using regex_51 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_51(cpp2::in str) const& -> auto; -public: using regex_52 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_52(cpp2::in str) const& -> auto; -public: using regex_53 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_53(cpp2::in str) const& -> auto; -public: using regex_54 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_54(cpp2::in str) const& -> auto; -public: using regex_6 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; -public: using regex_7 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; -public: using regex_8 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,1,std::numeric_limits::max(),2,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; -public: using regex_9 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: test_nullsub3() = default; public: test_nullsub3(test_nullsub3 const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_nullsub3 const&) -> void = delete; @@ -646,165 +128,7 @@ class test_repetition2 { #line 682 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_1 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; -public: using regex_10 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; -public: using regex_100 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,0,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_100(cpp2::in str) const& -> auto; -public: using regex_101 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,1,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_101(cpp2::in str) const& -> auto; -public: using regex_102 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,2,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_102(cpp2::in str) const& -> auto; -public: using regex_103 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,3,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_103(cpp2::in str) const& -> auto; -public: using regex_104 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,4,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_104(cpp2::in str) const& -> auto; -public: using regex_105 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,5,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_105(cpp2::in str) const& -> auto; -public: using regex_106 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,6,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_106(cpp2::in str) const& -> auto; -public: using regex_107 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,7,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_107(cpp2::in str) const& -> auto; -public: using regex_108 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,8,std::numeric_limits::max(),2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_108(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_110 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,0,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_110(cpp2::in str) const& -> auto; -public: using regex_111 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,1,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_111(cpp2::in str) const& -> auto; -public: using regex_112 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,2,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_112(cpp2::in str) const& -> auto; -public: using regex_113 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,3,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_113(cpp2::in str) const& -> auto; -public: using regex_114 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,4,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_114(cpp2::in str) const& -> auto; -public: using regex_115 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,5,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_115(cpp2::in str) const& -> auto; -public: using regex_116 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,6,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_116(cpp2::in str) const& -> auto; -public: using regex_117 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,7,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_117(cpp2::in str) const& -> auto; -public: using regex_118 = ::cpp2::regex::regular_expression,::cpp2::regex::range_matcher_logic,0,1,0,'?'>>,1>,8,8,2>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_118(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_13 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; -public: using regex_14 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; -public: using regex_15 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; -public: using regex_16 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; -public: using regex_17 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; -public: using regex_18 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; -public: using regex_19 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; -public: using regex_2 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; -public: using regex_20 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; -public: using regex_21 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; -public: using regex_22 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; -public: using regex_23 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; -public: using regex_24 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; -public: using regex_25 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; -public: using regex_26 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; -public: using regex_260 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_260(cpp2::in str) const& -> auto; -public: using regex_261 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,1,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_261(cpp2::in str) const& -> auto; -public: using regex_262 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,2,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_262(cpp2::in str) const& -> auto; -public: using regex_263 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,3,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_263(cpp2::in str) const& -> auto; -public: using regex_264 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,4,std::numeric_limits::max(),5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_264(cpp2::in str) const& -> auto; -public: using regex_265 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_265(cpp2::in str) const& -> auto; -public: using regex_266 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,1,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_266(cpp2::in str) const& -> auto; -public: using regex_267 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,2,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_267(cpp2::in str) const& -> auto; -public: using regex_268 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,3,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_268(cpp2::in str) const& -> auto; -public: using regex_269 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,4,10,5>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_269(cpp2::in str) const& -> auto; -public: using regex_27 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; -public: using regex_270 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),5,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_270(cpp2::in str) const& -> auto; -public: using regex_271 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,1,std::numeric_limits::max(),5,'+'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),6,'*'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_271(cpp2::in str) const& -> auto; -public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; -public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; -public: using regex_3 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; -public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; -public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; -public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; -public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; -public: using regex_34 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_34(cpp2::in str) const& -> auto; -public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; -public: using regex_36 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; -public: using regex_37 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; -public: using regex_38 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; -public: using regex_39 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; -public: using regex_4 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_4(cpp2::in str) const& -> auto; -public: using regex_40 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_40(cpp2::in str) const& -> auto; -public: using regex_41 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_41(cpp2::in str) const& -> auto; -public: using regex_42 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_42(cpp2::in str) const& -> auto; -public: using regex_43 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_43(cpp2::in str) const& -> auto; -public: using regex_44 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_44(cpp2::in str) const& -> auto; -public: using regex_45 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,8>>,::cpp2::regex::list_matcher_logic>,9>>>,7>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,10>; -public: [[nodiscard]] auto match_45(cpp2::in str) const& -> auto; -public: using regex_46 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,1,1,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_46(cpp2::in str) const& -> auto; -public: using regex_47 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_47(cpp2::in str) const& -> auto; -public: using regex_48 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_48(cpp2::in str) const& -> auto; -public: using regex_49 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_49(cpp2::in str) const& -> auto; -public: using regex_5 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,2,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_5(cpp2::in str) const& -> auto; -public: using regex_6 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,3,3,5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_6(cpp2::in str) const& -> auto; -public: using regex_7 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_7(cpp2::in str) const& -> auto; -public: using regex_8 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_8(cpp2::in str) const& -> auto; -public: using regex_9 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic>,6>>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_9(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: test_repetition2() = default; public: test_repetition2(test_repetition2 const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_repetition2 const&) -> void = delete; @@ -816,163 +140,7 @@ class test_totest { #line 846 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_01 = ::cpp2::regex::regular_expression,1,std::numeric_limits::max(),0,'+'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,1>; -public: [[nodiscard]] auto match_01(cpp2::in str) const& -> auto; -public: using regex_03 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_03(cpp2::in str) const& -> auto; -public: using regex_04 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,4>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_04(cpp2::in str) const& -> auto; -public: using regex_05 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,4>,0,1,3,'?'>>,3>>,1>,::cpp2::regex::group_matcher_logic,0,1,6,'?'>>,5>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_05(cpp2::in str) const& -> auto; -public: using regex_06 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,4>,0,1,3,'?'>>,3>,::cpp2::regex::group_matcher_logic,0,1,5,'?'>>,5>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,6>; -public: [[nodiscard]] auto match_06(cpp2::in str) const& -> auto; -public: using regex_07 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_07(cpp2::in str) const& -> auto; -public: using regex_08 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,1,1,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_08(cpp2::in str) const& -> auto; -public: using regex_09 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2,'?'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_09(cpp2::in str) const& -> auto; -public: using regex_10 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,2,2,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_10(cpp2::in str) const& -> auto; -public: using regex_1029 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),8,'*'>,::cpp2::regex::char_matcher_logic>>,3>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_1029(cpp2::in str) const& -> auto; -public: using regex_1032 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,3>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_1032(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,0,std::numeric_limits::max(),2,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_110 = ::cpp2::regex::regular_expression>,1>,0,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_110(cpp2::in str) const& -> auto; -public: using regex_111 = ::cpp2::regex::regular_expression>,1>,0,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_111(cpp2::in str) const& -> auto; -public: using regex_112 = ::cpp2::regex::regular_expression>,1>,1,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_112(cpp2::in str) const& -> auto; -public: using regex_113 = ::cpp2::regex::regular_expression>,1>,1,3,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_113(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_13 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,1,1,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_13(cpp2::in str) const& -> auto; -public: using regex_14 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,4,'?'>>,2>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; -public: using regex_15 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,2,2,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_15(cpp2::in str) const& -> auto; -public: using regex_16 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,4,'?'>>,2>,::cpp2::regex::group_matcher_logic,0,1,6,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,7,'?'>>,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_16(cpp2::in str) const& -> auto; -public: using regex_17 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,3,3,3>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_17(cpp2::in str) const& -> auto; -public: using regex_18 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_18(cpp2::in str) const& -> auto; -public: using regex_19 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,4,'?'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_19(cpp2::in str) const& -> auto; -public: using regex_20 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,3>,0,1,3,'?'>>,2>,::cpp2::regex::special_range_matcher_logic,0,1,5,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; -public: using regex_200 = ::cpp2::regex::regular_expression,::cpp2::regex::line_start_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic>,3>>,::cpp2::regex::list_matcher_logic>,4>>,::cpp2::regex::list_matcher_logic>,5>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::any_matcher_logic>,6>>>,1>,0,std::numeric_limits::max(),11,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_200(cpp2::in str) const& -> auto; -public: using regex_201 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,2>>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_201(cpp2::in str) const& -> auto; -public: using regex_202 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_202(cpp2::in str) const& -> auto; -public: using regex_203 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_203(cpp2::in str) const& -> auto; -public: using regex_204 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,1>,0,1,0,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_204(cpp2::in str) const& -> auto; -public: using regex_205 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,1>,0,1,1,'?'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_205(cpp2::in str) const& -> auto; -public: using regex_206 = ::cpp2::regex::regular_expression>,2>>,::cpp2::regex::list_matcher_logic>,3>>,::cpp2::regex::list_matcher_logic>,4>>>,1>,0,std::numeric_limits::max(),7,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_206(cpp2::in str) const& -> auto; -public: using regex_207 = ::cpp2::regex::regular_expression>,2>>,::cpp2::regex::list_matcher_logic>,3>>,::cpp2::regex::list_matcher_logic,4>>>,1>,0,std::numeric_limits::max(),6,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_207(cpp2::in str) const& -> auto; -public: using regex_208 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,3>>>,1>,0,std::numeric_limits::max(),7,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_208(cpp2::in str) const& -> auto; -public: using regex_209 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,1,0,'?'>>,2>>>,1>,2,4,5>>,0>,std::tuple,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_209(cpp2::in str) const& -> auto; -public: using regex_21 = ::cpp2::regex::regular_expression,0,1,0,'?'>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,2>,0,1,2,'?'>>,1>,::cpp2::regex::special_range_matcher_logic,0,1,4,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_21(cpp2::in str) const& -> auto; -public: using regex_210 = ::cpp2::regex::regular_expression>,1>>,::cpp2::regex::list_matcher_logic,2>>>,0>,std::tuple<::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_210(cpp2::in str) const& -> auto; -public: using regex_211 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic,2>>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_211(cpp2::in str) const& -> auto; -public: using regex_212 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic,2>>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_212(cpp2::in str) const& -> auto; -public: using regex_213 = ::cpp2::regex::regular_expression>,1>,0,1,1,'?'>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_213(cpp2::in str) const& -> auto; -public: using regex_214 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,2>>,::cpp2::regex::list_matcher_logic,3>>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_214(cpp2::in str) const& -> auto; -public: using regex_215 = ::cpp2::regex::regular_expression>,2>>,::cpp2::regex::list_matcher_logic>,3>>>,1>,2,std::numeric_limits::max(),5>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_215(cpp2::in str) const& -> auto; -public: using regex_216 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic,1>>,::cpp2::regex::list_matcher_logic>,3>,0,1,1,'?'>>,2>>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_216(cpp2::in str) const& -> auto; -public: using regex_217 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,2,std::numeric_limits::max(),3>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_217(cpp2::in str) const& -> auto; -public: using regex_218 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic>>,1>,2,2,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_218(cpp2::in str) const& -> auto; -public: using regex_219 = ::cpp2::regex::regular_expression>,1>,2,std::numeric_limits::max(),1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_219(cpp2::in str) const& -> auto; -public: using regex_22 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,2,2,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_22(cpp2::in str) const& -> auto; -public: using regex_220 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_matcher_logic,3>>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_220(cpp2::in str) const& -> auto; -public: using regex_23 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_23(cpp2::in str) const& -> auto; -public: using regex_24 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_24(cpp2::in str) const& -> auto; -public: using regex_25 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_25(cpp2::in str) const& -> auto; -public: using regex_250 = ::cpp2::regex::regular_expression,::cpp2::regex::group_matcher_logic>,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::group_matcher_logic>,3>>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_250(cpp2::in str) const& -> auto; -public: using regex_251 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>>,1>,0,std::numeric_limits::max(),3,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_251(cpp2::in str) const& -> auto; -public: using regex_26 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_26(cpp2::in str) const& -> auto; -public: using regex_27 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_27(cpp2::in str) const& -> auto; -public: using regex_28 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_28(cpp2::in str) const& -> auto; -public: using regex_29 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),4,'*'>,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_29(cpp2::in str) const& -> auto; -public: using regex_30 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_30(cpp2::in str) const& -> auto; -public: using regex_31 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>>,0>,std::tuple,2>; -public: [[nodiscard]] auto match_31(cpp2::in str) const& -> auto; -public: using regex_32 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,2>>,0>,std::tuple,3>; -public: [[nodiscard]] auto match_32(cpp2::in str) const& -> auto; -public: using regex_33 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic>>,1>,0,std::numeric_limits::max(),4,'*'>>,0>,std::tuple,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_33(cpp2::in str) const& -> auto; -public: using regex_34 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_34(cpp2::in str) const& -> auto; -public: using regex_35 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::special_range_matcher_logic>,4>,0,1,4,'?'>>,3>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_35(cpp2::in str) const& -> auto; -public: using regex_36 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,1,std::numeric_limits::max(),3,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_36(cpp2::in str) const& -> auto; -public: using regex_37 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),2,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_37(cpp2::in str) const& -> auto; -public: using regex_38 = ::cpp2::regex::regular_expression,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),1,'*'>>,1>>,0>,std::tuple,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_38(cpp2::in str) const& -> auto; -public: using regex_39 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>>,1>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_39(cpp2::in str) const& -> auto; -public: using regex_40 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),5,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),6,'*'>,::cpp2::regex::char_matcher_logic>>,2>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_40(cpp2::in str) const& -> auto; -public: using regex_41 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),0,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::list_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::char_matcher_logic>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple,std::vector,int,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,2>; -public: [[nodiscard]] auto match_41(cpp2::in str) const& -> auto; -public: using regex_42 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,::cpp2::regex::any_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),3,'*'>>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_42(cpp2::in str) const& -> auto; -public: using regex_43 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_43(cpp2::in str) const& -> auto; -public: using regex_44 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::any_matcher_logic>,5>,0,std::numeric_limits::max(),6,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,6>,0,std::numeric_limits::max(),8,'*'>>,4>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,7>; -public: [[nodiscard]] auto match_44(cpp2::in str) const& -> auto; -public: using regex_45 = ::cpp2::regex::regular_expression,::cpp2::regex::any_matcher_logic>,2>,0,std::numeric_limits::max(),1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,3>,0,std::numeric_limits::max(),3,'*'>>,1>,0,std::numeric_limits::max(),5,'*'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_45(cpp2::in str) const& -> auto; -public: using regex_83 = ::cpp2::regex::regular_expression,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic>,3>>,2>,0,1,2,'?'>>,1>,1,std::numeric_limits::max(),4,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_83(cpp2::in str) const& -> auto; -public: using regex_84 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic>,2>,0,1,1,'?'>>,1>,1,std::numeric_limits::max(),3,'+'>>,0>,std::tuple<::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_84(cpp2::in str) const& -> auto; -public: using regex_85 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),0,'+'>>,1>,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,1,std::numeric_limits::max(),2,'+'>>,2>,::cpp2::regex::group_matcher_logic,::cpp2::regex::single_class_entry>,0,std::numeric_limits::max(),4,'*'>>,3>>,0>,std::tuple,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,4>; -public: [[nodiscard]] auto match_85(cpp2::in str) const& -> auto; -public: using regex_90 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic>,0,std::numeric_limits::max(),0,'*'>>,2>>,1>,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,4>>,3>,0,1,7,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_90(cpp2::in str) const& -> auto; -public: using regex_91 = ::cpp2::regex::regular_expression,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic>,0,std::numeric_limits::max(),0,'*'>>,2>>,1>,0,1,3,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::group_matcher_logic,0,std::numeric_limits::max(),4,'*'>>,4>>,3>,0,1,7,'?'>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,std::vector,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,std::vector,::cpp2::regex::list_matcher_state>,5>; -public: [[nodiscard]] auto match_91(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_01 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_03 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_04 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_05 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_06 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_07 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_08 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_09 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1029 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1032 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,4>>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: test_totest() = default; public: test_totest(test_totest const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_totest const&) -> void = delete; @@ -984,29 +152,7 @@ class test_osx_bsd_critical { #line 942 "pure2-regex.cpp2" public: auto run() const& -> void; - public: using regex_1 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_1(cpp2::in str) const& -> auto; -public: using regex_11 = ::cpp2::regex::regular_expression>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_11(cpp2::in str) const& -> auto; -public: using regex_12 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>>,::cpp2::regex::list_matcher_logic,2>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_12(cpp2::in str) const& -> auto; -public: using regex_14 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>>,::cpp2::regex::list_matcher_logic,2>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_14(cpp2::in str) const& -> auto; -public: using regex_2 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_2(cpp2::in str) const& -> auto; -public: using regex_20 = ::cpp2::regex::regular_expression,0,1,0,'?'>>,1>,::cpp2::regex::group_matcher_logic>,2>>,0>,std::tuple,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_20(cpp2::in str) const& -> auto; -public: using regex_3 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_3(cpp2::in str) const& -> auto; -public: using regex_M1 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_M1(cpp2::in str) const& -> auto; -public: using regex_M14 = ::cpp2::regex::regular_expression,::cpp2::regex::single_class_entry>>,::cpp2::regex::list_matcher_logic,2>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_M14(cpp2::in str) const& -> auto; -public: using regex_M2 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,::cpp2::regex::group_matcher_logic>,3>>,0>,std::tuple,4>; -public: [[nodiscard]] auto match_M2(cpp2::in str) const& -> auto; -public: using regex_M3 = ::cpp2::regex::regular_expression,2>>,::cpp2::regex::list_matcher_logic,::cpp2::regex::single_class_entry>>>,1>,1,std::numeric_limits::max(),3,'+'>,::cpp2::regex::char_matcher_logic>,0>,std::tuple,::cpp2::regex::list_matcher_state>,3>; -public: [[nodiscard]] auto match_M3(cpp2::in str) const& -> auto; - + private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; public: test_osx_bsd_critical() = default; public: test_osx_bsd_critical(test_osx_bsd_critical const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(test_osx_bsd_critical const&) -> void = delete; @@ -1022,23 +168,22 @@ auto main(int const argc_, char** argv_) -> int; #line 2 "pure2-regex.cpp2" template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in result) -> void{ - using context = M::context; - context ctx {}; - auto str_mod {str}; if (str_mod == "NULL") { str_mod = ""; } + std::string ranges_result {"NOMATCH"}; + std::string status {"OK"}; if (CPP2_UFCS(to_string)(regex) != regex_str) { status = "Failure: Parsed regex does not match."; }else { - bool m {CPP2_UFCS(search)(regex, std::move(str_mod), ctx)}; + auto r {CPP2_UFCS(search)(regex, std::move(str_mod))}; auto is_pass {!(CPP2_UFCS(starts_with)(result, "NOMATCH"))}; // Check if we expect a match. - if (is_pass != m) { + if (is_pass != r.matched) { if (std::move(is_pass)) { status = "Failure: Regex should apply."; } @@ -1048,8 +193,9 @@ template auto test(M const& regex, cpp2::in id, cpp2::i } // If we have a match. Check the ranges. - if (std::move(m)) { - auto ranges_match {result == CPP2_UFCS(print_ranges)(ctx)}; + if (r.matched) { + ranges_result = CPP2_UFCS(print_ranges)(std::move(r).ctx); + auto ranges_match {result == ranges_result}; auto should_ranges_match {!(CPP2_UFCS(starts_with)(id, "M"))}; if (ranges_match != std::move(should_ranges_match)) { @@ -1063,1353 +209,918 @@ template auto test(M const& regex, cpp2::in id, cpp2::i } } - std::cout << cpp2::to_string(id) + ": " + cpp2::to_string(std::move(status)) + " regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result: " + cpp2::to_string(CPP2_UFCS(print_ranges)(std::move(ctx))) + " expected_results " + cpp2::to_string(result) << std::endl; + std::cout << (cpp2::to_string(id) + ": " + cpp2::to_string(std::move(status)) + " regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result: " + cpp2::to_string(std::move(ranges_result)) + " expected_results " + cpp2::to_string(result)) << std::endl; } #line 191 "pure2-regex.cpp2" auto test_basic3::run() const& -> void{ std::cout << "Running basic3:" << std::endl; - test(regex_1(), "1", "\\)", "()", "(1,2)"); - test(regex_2(), "2", "\\}", "}", "(0,1)"); - test(regex_3(), "3", "]", "]", "(0,1)"); - test(regex_4(), "4", "\\$^", "NULL", "(0,0)"); - test(regex_5(), "5", "a(\\$)", "aa", "(1,2)(2,2)"); - test(regex_6(), "6", "a*(^a)", "aa", "(0,1)(0,1)"); - test(regex_7(), "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)"); - test(regex_8(), "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)"); - test(regex_9(), "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)"); - test(regex_10(), "10", "(ab)c|abc", "abc", "(0,3)(0,2)"); - test(regex_11(), "11", "a{0}b", "ab", "(1,2)"); - test(regex_12(), "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); - test(regex_13(), "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); - test(regex_15(), "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)"); - test(regex_16(), "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)"); - test(regex_17(), "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)"); - test(regex_18(), "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)"); - test(regex_19(), "19", "(a|b)?.*", "b", "(0,1)(0,1)"); - test(regex_20(), "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)"); - test(regex_21(), "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)"); - test(regex_22(), "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)"); - test(regex_23(), "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)"); - test(regex_24(), "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)"); - test(regex_25(), "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)"); - test(regex_26(), "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)"); - test(regex_27(), "27", "ab|abab", "abbabab", "(0,2)"); - test(regex_28(), "28", "aba|bab|bba", "baaabbbaba", "(5,8)"); - test(regex_29(), "29", "aba|bab", "baaabbbaba", "(6,9)"); - test(regex_30(), "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)"); - test(regex_31(), "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)"); - test(regex_32(), "32", "ab|a", "xabc", "(1,3)"); - test(regex_33(), "33", "ab|a", "xxabc", "(2,4)"); - test(regex_M34(), "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); - test(regex_35(), "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)"); - test(regex_36(), "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)"); - test(regex_37(), "37", "[[:lower:]]+", "`az{", "(1,3)"); - test(regex_38(), "38", "[[:upper:]]+", "@AZ[", "(1,3)"); - test(regex_39(), "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_43 (), "43 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); - test(regex_44 (), "44 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)"); - test(regex_45(), "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)"); - test(regex_46(), "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)"); - test(regex_47(), "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)"); - test(regex_48(), "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)"); - test(regex_49(), "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)"); - test(regex_50(), "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)"); - test(regex_51(), "51", "ab+bc", "abbc", "(0,4)"); - test(regex_52(), "52", "ab+bc", "abbbbc", "(0,6)"); - test(regex_53(), "53", "ab?bc", "abbc", "(0,4)"); - test(regex_54(), "54", "ab?bc", "abc", "(0,3)"); - test(regex_55(), "55", "ab?c", "abc", "(0,3)"); - test(regex_56(), "56", "ab|cd", "abc", "(0,2)"); - test(regex_57(), "57", "ab|cd", "abcd", "(0,2)"); - test(regex_58(), "58", "a\\(b", "a(b", "(0,3)"); - test(regex_59(), "59", "a\\(*b", "ab", "(0,2)"); - test(regex_60(), "60", "a\\(*b", "a((b", "(0,4)"); - test(regex_61(), "61", "((a))", "abc", "(0,1)(0,1)(0,1)"); - test(regex_62(), "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)"); - test(regex_63(), "63", "a+b+c", "aabbabc", "(4,7)"); - test(regex_64(), "64", "a*", "aaa", "(0,3)"); - test(regex_65(), "65", "(a*)*", "-", "(0,0)(0,0)"); - test(regex_66(), "66", "(a*)+", "-", "(0,0)(0,0)"); - test(regex_67(), "67", "(a*|b)*", "-", "(0,0)(0,0)"); - test(regex_68(), "68", "(a+|b)*", "ab", "(0,2)(1,2)"); - test(regex_69(), "69", "(a+|b)+", "ab", "(0,2)(1,2)"); - test(regex_70(), "70", "(a+|b)?", "ab", "(0,1)(0,1)"); - test(regex_71(), "71", "(^)*", "-", "(0,0)(0,0)"); - test(regex_72(), "72", "([abc])*d", "abbbcd", "(0,6)(4,5)"); - test(regex_73(), "73", "([abc])*bcd", "abcd", "(0,4)(0,1)"); - test(regex_74(), "74", "a|b|c|d|e", "e", "(0,1)"); - test(regex_75(), "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)"); - test(regex_76(), "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)"); - test(regex_77(), "77", "(ab|cd)e", "abcde", "(2,5)(2,4)"); - test(regex_78(), "78", "(a|b)c*d", "abcd", "(1,4)(1,2)"); - test(regex_79(), "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)"); - test(regex_80(), "80", "a([bc]*)c*", "abc", "(0,3)(1,3)"); - test(regex_81(), "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); - test(regex_82(), "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); - test(regex_83(), "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)"); - test(regex_84(), "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)"); - test(regex_85(), "85", "(ab|a)b*c", "abc", "(0,3)(0,2)"); - test(regex_86(), "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)"); - test(regex_87(), "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)"); - test(regex_88(), "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)"); - test(regex_89(), "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)"); - test(regex_90(), "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)"); - test(regex_91(), "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); - test(regex_92(), "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)"); - test(regex_93(), "93", "a(bc)d", "abcd", "(0,4)(1,3)"); - test(regex_94(), "94", "a[-]?c", "ac", "(0,3)"); - test(regex_95(), "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)"); - test(regex_96(), "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)"); - test(regex_97(), "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)"); - test(regex_98(), "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)"); - test(regex_99(), "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)"); - test(regex_100(), "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)"); - test(regex_101(), "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)"); - test(regex_102(), "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)"); - test(regex_103(), "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)"); - test(regex_104(), "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)"); - test(regex_105(), "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)"); - test(regex_106(), "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)"); - test(regex_107(), "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)"); - test(regex_108(), "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)"); - test(regex_109(), "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)"); - test(regex_110(), "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)"); - test(regex_111(), "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)"); - test(regex_112(), "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)"); - test(regex_113(), "113", "^.+\\$", "vivi", "(0,4)"); - test(regex_114(), "114", "^(.+)\\$", "vivi", "(0,4)(0,4)"); - test(regex_115(), "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)"); - test(regex_116(), "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)"); - test(regex_117(), "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)"); - test(regex_118(), "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)"); - test(regex_119(), "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)"); - test(regex_120(), "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)"); - test(regex_121(), "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)"); - test(regex_122(), "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)"); - test(regex_123(), "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)"); - test(regex_124(), "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)"); - test(regex_125(), "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)"); - test(regex_126(), "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)"); - test(regex_127(), "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)"); - test(regex_128(), "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)"); - test(regex_129(), "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)"); - test(regex_130(), "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)"); - test(regex_131(), "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)"); - test(regex_132(), "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); - test(regex_133(), "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)"); - test(regex_134(), "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_135(), "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)"); - test(regex_136(), "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_137(), "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)"); - test(regex_138(), "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_139(), "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); - test(regex_140(), "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); - test(regex_141(), "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)"); - test(regex_142(), "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)"); - test(regex_143(), "143", "\\\\XXX", "\\XXX", "(0,4)"); - test(regex_144(), "144", ".*(/000).*", "/000", "(0,4)(0,4)"); - test(regex_145(), "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)"); - test(regex_146(), "146", "\\\\000", "\\000", "(0,4)"); + test(regex_1, "1", "\\)", "()", "(1,2)"); + test(regex_2, "2", "\\}", "}", "(0,1)"); + test(regex_3, "3", "]", "]", "(0,1)"); + test(regex_4, "4", "\\$^", "NULL", "(0,0)"); + test(regex_5, "5", "a(\\$)", "aa", "(1,2)(2,2)"); + test(regex_6, "6", "a*(^a)", "aa", "(0,1)(0,1)"); + test(regex_7, "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)"); + test(regex_8, "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)"); + test(regex_9, "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)"); + test(regex_10, "10", "(ab)c|abc", "abc", "(0,3)(0,2)"); + test(regex_11, "11", "a{0}b", "ab", "(1,2)"); + test(regex_12, "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_13, "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)"); + test(regex_15, "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)"); + test(regex_16, "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)"); + test(regex_17, "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)"); + test(regex_18, "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)"); + test(regex_19, "19", "(a|b)?.*", "b", "(0,1)(0,1)"); + test(regex_20, "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)"); + test(regex_21, "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)"); + test(regex_22, "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)"); + test(regex_23, "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)"); + test(regex_24, "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)"); + test(regex_25, "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_26, "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)"); + test(regex_27, "27", "ab|abab", "abbabab", "(0,2)"); + test(regex_28, "28", "aba|bab|bba", "baaabbbaba", "(5,8)"); + test(regex_29, "29", "aba|bab", "baaabbbaba", "(6,9)"); + test(regex_30, "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_31, "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)"); + test(regex_32, "32", "ab|a", "xabc", "(1,3)"); + test(regex_33, "33", "ab|a", "xxabc", "(2,4)"); + test(regex_M34, "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)"); + test(regex_35, "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_36, "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)"); + test(regex_37, "37", "[[:lower:]]+", "`az{", "(1,3)"); + test(regex_38, "38", "[[:upper:]]+", "@AZ[", "(1,3)"); + test(regex_39, "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_43, "43 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_44, "44 ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)"); + test(regex_45, "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)"); + test(regex_46, "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)"); + test(regex_47, "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)"); + test(regex_48, "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)"); + test(regex_49, "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)"); + test(regex_50, "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)"); + test(regex_51, "51", "ab+bc", "abbc", "(0,4)"); + test(regex_52, "52", "ab+bc", "abbbbc", "(0,6)"); + test(regex_53, "53", "ab?bc", "abbc", "(0,4)"); + test(regex_54, "54", "ab?bc", "abc", "(0,3)"); + test(regex_55, "55", "ab?c", "abc", "(0,3)"); + test(regex_56, "56", "ab|cd", "abc", "(0,2)"); + test(regex_57, "57", "ab|cd", "abcd", "(0,2)"); + test(regex_58, "58", "a\\(b", "a(b", "(0,3)"); + test(regex_59, "59", "a\\(*b", "ab", "(0,2)"); + test(regex_60, "60", "a\\(*b", "a((b", "(0,4)"); + test(regex_61, "61", "((a))", "abc", "(0,1)(0,1)(0,1)"); + test(regex_62, "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)"); + test(regex_63, "63", "a+b+c", "aabbabc", "(4,7)"); + test(regex_64, "64", "a*", "aaa", "(0,3)"); + test(regex_65, "65", "(a*)*", "-", "(0,0)(0,0)"); + test(regex_66, "66", "(a*)+", "-", "(0,0)(0,0)"); + test(regex_67, "67", "(a*|b)*", "-", "(0,0)(0,0)"); + test(regex_68, "68", "(a+|b)*", "ab", "(0,2)(1,2)"); + test(regex_69, "69", "(a+|b)+", "ab", "(0,2)(1,2)"); + test(regex_70, "70", "(a+|b)?", "ab", "(0,1)(0,1)"); + test(regex_71, "71", "(^)*", "-", "(0,0)(0,0)"); + test(regex_72, "72", "([abc])*d", "abbbcd", "(0,6)(4,5)"); + test(regex_73, "73", "([abc])*bcd", "abcd", "(0,4)(0,1)"); + test(regex_74, "74", "a|b|c|d|e", "e", "(0,1)"); + test(regex_75, "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)"); + test(regex_76, "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)"); + test(regex_77, "77", "(ab|cd)e", "abcde", "(2,5)(2,4)"); + test(regex_78, "78", "(a|b)c*d", "abcd", "(1,4)(1,2)"); + test(regex_79, "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)"); + test(regex_80, "80", "a([bc]*)c*", "abc", "(0,3)(1,3)"); + test(regex_81, "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_82, "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)"); + test(regex_83, "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)"); + test(regex_84, "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)"); + test(regex_85, "85", "(ab|a)b*c", "abc", "(0,3)(0,2)"); + test(regex_86, "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)"); + test(regex_87, "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)"); + test(regex_88, "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)"); + test(regex_89, "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)"); + test(regex_90, "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)"); + test(regex_91, "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)"); + test(regex_92, "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)"); + test(regex_93, "93", "a(bc)d", "abcd", "(0,4)(1,3)"); + test(regex_94, "94", "a[-]?c", "ac", "(0,3)"); + test(regex_95, "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)"); + test(regex_96, "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)"); + test(regex_97, "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)"); + test(regex_98, "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)"); + test(regex_99, "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)"); + test(regex_100, "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)"); + test(regex_101, "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)"); + test(regex_102, "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)"); + test(regex_103, "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)"); + test(regex_104, "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)"); + test(regex_105, "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)"); + test(regex_106, "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)"); + test(regex_107, "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)"); + test(regex_108, "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)"); + test(regex_109, "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)"); + test(regex_110, "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)"); + test(regex_111, "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)"); + test(regex_112, "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)"); + test(regex_113, "113", "^.+\\$", "vivi", "(0,4)"); + test(regex_114, "114", "^(.+)\\$", "vivi", "(0,4)(0,4)"); + test(regex_115, "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)"); + test(regex_116, "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)"); + test(regex_117, "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)"); + test(regex_118, "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)"); + test(regex_119, "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)"); + test(regex_120, "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)"); + test(regex_121, "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)"); + test(regex_122, "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)"); + test(regex_123, "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)"); + test(regex_124, "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)"); + test(regex_125, "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)"); + test(regex_126, "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)"); + test(regex_127, "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)"); + test(regex_128, "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)"); + test(regex_129, "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)"); + test(regex_130, "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)"); + test(regex_131, "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)"); + test(regex_132, "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_133, "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_134, "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_135, "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_136, "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_137, "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)"); + test(regex_138, "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_139, "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)"); + test(regex_140, "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)"); + test(regex_141, "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)"); + test(regex_142, "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)"); + test(regex_143, "143", "\\\\XXX", "\\XXX", "(0,4)"); + test(regex_144, "144", ".*(/000).*", "/000", "(0,4)(0,4)"); + test(regex_145, "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)"); + test(regex_146, "146", "\\\\000", "\\000", "(0,4)"); std::cout << std::endl; } - [[nodiscard]] auto test_basic3::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } - -[[nodiscard]] auto test_basic3::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } -[[nodiscard]] auto test_basic3::match_100(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_100(), str); } -[[nodiscard]] auto test_basic3::match_101(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_101(), str); } -[[nodiscard]] auto test_basic3::match_102(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_102(), str); } -[[nodiscard]] auto test_basic3::match_103(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_103(), str); } -[[nodiscard]] auto test_basic3::match_104(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_104(), str); } -[[nodiscard]] auto test_basic3::match_105(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_105(), str); } -[[nodiscard]] auto test_basic3::match_106(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_106(), str); } -[[nodiscard]] auto test_basic3::match_107(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_107(), str); } -[[nodiscard]] auto test_basic3::match_108(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_108(), str); } -[[nodiscard]] auto test_basic3::match_109(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_109(), str); } -[[nodiscard]] auto test_basic3::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_basic3::match_110(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_110(), str); } -[[nodiscard]] auto test_basic3::match_111(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_111(), str); } -[[nodiscard]] auto test_basic3::match_112(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_112(), str); } -[[nodiscard]] auto test_basic3::match_113(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_113(), str); } -[[nodiscard]] auto test_basic3::match_114(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_114(), str); } -[[nodiscard]] auto test_basic3::match_115(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_115(), str); } -[[nodiscard]] auto test_basic3::match_116(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_116(), str); } -[[nodiscard]] auto test_basic3::match_117(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_117(), str); } -[[nodiscard]] auto test_basic3::match_118(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_118(), str); } -[[nodiscard]] auto test_basic3::match_119(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_119(), str); } -[[nodiscard]] auto test_basic3::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_basic3::match_120(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_120(), str); } -[[nodiscard]] auto test_basic3::match_121(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_121(), str); } -[[nodiscard]] auto test_basic3::match_122(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_122(), str); } -[[nodiscard]] auto test_basic3::match_123(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_123(), str); } -[[nodiscard]] auto test_basic3::match_124(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_124(), str); } -[[nodiscard]] auto test_basic3::match_125(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_125(), str); } -[[nodiscard]] auto test_basic3::match_126(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_126(), str); } -[[nodiscard]] auto test_basic3::match_127(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_127(), str); } -[[nodiscard]] auto test_basic3::match_128(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_128(), str); } -[[nodiscard]] auto test_basic3::match_129(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_129(), str); } -[[nodiscard]] auto test_basic3::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } -[[nodiscard]] auto test_basic3::match_130(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_130(), str); } -[[nodiscard]] auto test_basic3::match_131(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_131(), str); } -[[nodiscard]] auto test_basic3::match_132(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_132(), str); } -[[nodiscard]] auto test_basic3::match_133(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_133(), str); } -[[nodiscard]] auto test_basic3::match_134(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_134(), str); } -[[nodiscard]] auto test_basic3::match_135(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_135(), str); } -[[nodiscard]] auto test_basic3::match_136(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_136(), str); } -[[nodiscard]] auto test_basic3::match_137(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_137(), str); } -[[nodiscard]] auto test_basic3::match_138(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_138(), str); } -[[nodiscard]] auto test_basic3::match_139(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_139(), str); } -[[nodiscard]] auto test_basic3::match_140(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_140(), str); } -[[nodiscard]] auto test_basic3::match_141(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_141(), str); } -[[nodiscard]] auto test_basic3::match_142(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_142(), str); } -[[nodiscard]] auto test_basic3::match_143(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_143(), str); } -[[nodiscard]] auto test_basic3::match_144(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_144(), str); } -[[nodiscard]] auto test_basic3::match_145(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_145(), str); } -[[nodiscard]] auto test_basic3::match_146(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_146(), str); } -[[nodiscard]] auto test_basic3::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } -[[nodiscard]] auto test_basic3::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } -[[nodiscard]] auto test_basic3::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } -[[nodiscard]] auto test_basic3::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } -[[nodiscard]] auto test_basic3::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } -[[nodiscard]] auto test_basic3::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } -[[nodiscard]] auto test_basic3::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } -[[nodiscard]] auto test_basic3::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } -[[nodiscard]] auto test_basic3::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } -[[nodiscard]] auto test_basic3::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } -[[nodiscard]] auto test_basic3::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } -[[nodiscard]] auto test_basic3::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } -[[nodiscard]] auto test_basic3::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } -[[nodiscard]] auto test_basic3::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } -[[nodiscard]] auto test_basic3::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } -[[nodiscard]] auto test_basic3::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } -[[nodiscard]] auto test_basic3::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } -[[nodiscard]] auto test_basic3::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } -[[nodiscard]] auto test_basic3::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } -[[nodiscard]] auto test_basic3::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } -[[nodiscard]] auto test_basic3::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } -[[nodiscard]] auto test_basic3::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } -[[nodiscard]] auto test_basic3::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } -[[nodiscard]] auto test_basic3::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } -[[nodiscard]] auto test_basic3::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } -[[nodiscard]] auto test_basic3::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } -[[nodiscard]] auto test_basic3::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } -[[nodiscard]] auto test_basic3::match_43(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_43(), str); } -[[nodiscard]] auto test_basic3::match_44(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_44(), str); } -[[nodiscard]] auto test_basic3::match_45(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_45(), str); } -[[nodiscard]] auto test_basic3::match_46(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_46(), str); } -[[nodiscard]] auto test_basic3::match_47(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_47(), str); } -[[nodiscard]] auto test_basic3::match_48(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_48(), str); } -[[nodiscard]] auto test_basic3::match_49(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_49(), str); } -[[nodiscard]] auto test_basic3::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } -[[nodiscard]] auto test_basic3::match_50(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_50(), str); } -[[nodiscard]] auto test_basic3::match_51(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_51(), str); } -[[nodiscard]] auto test_basic3::match_52(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_52(), str); } -[[nodiscard]] auto test_basic3::match_53(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_53(), str); } -[[nodiscard]] auto test_basic3::match_54(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_54(), str); } -[[nodiscard]] auto test_basic3::match_55(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_55(), str); } -[[nodiscard]] auto test_basic3::match_56(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_56(), str); } -[[nodiscard]] auto test_basic3::match_57(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_57(), str); } -[[nodiscard]] auto test_basic3::match_58(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_58(), str); } -[[nodiscard]] auto test_basic3::match_59(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_59(), str); } -[[nodiscard]] auto test_basic3::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } -[[nodiscard]] auto test_basic3::match_60(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_60(), str); } -[[nodiscard]] auto test_basic3::match_61(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_61(), str); } -[[nodiscard]] auto test_basic3::match_62(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_62(), str); } -[[nodiscard]] auto test_basic3::match_63(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_63(), str); } -[[nodiscard]] auto test_basic3::match_64(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_64(), str); } -[[nodiscard]] auto test_basic3::match_65(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_65(), str); } -[[nodiscard]] auto test_basic3::match_66(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_66(), str); } -[[nodiscard]] auto test_basic3::match_67(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_67(), str); } -[[nodiscard]] auto test_basic3::match_68(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_68(), str); } -[[nodiscard]] auto test_basic3::match_69(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_69(), str); } -[[nodiscard]] auto test_basic3::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } -[[nodiscard]] auto test_basic3::match_70(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_70(), str); } -[[nodiscard]] auto test_basic3::match_71(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_71(), str); } -[[nodiscard]] auto test_basic3::match_72(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_72(), str); } -[[nodiscard]] auto test_basic3::match_73(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_73(), str); } -[[nodiscard]] auto test_basic3::match_74(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_74(), str); } -[[nodiscard]] auto test_basic3::match_75(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_75(), str); } -[[nodiscard]] auto test_basic3::match_76(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_76(), str); } -[[nodiscard]] auto test_basic3::match_77(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_77(), str); } -[[nodiscard]] auto test_basic3::match_78(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_78(), str); } -[[nodiscard]] auto test_basic3::match_79(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_79(), str); } -[[nodiscard]] auto test_basic3::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } -[[nodiscard]] auto test_basic3::match_80(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_80(), str); } -[[nodiscard]] auto test_basic3::match_81(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_81(), str); } -[[nodiscard]] auto test_basic3::match_82(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_82(), str); } -[[nodiscard]] auto test_basic3::match_83(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_83(), str); } -[[nodiscard]] auto test_basic3::match_84(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_84(), str); } -[[nodiscard]] auto test_basic3::match_85(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_85(), str); } -[[nodiscard]] auto test_basic3::match_86(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_86(), str); } -[[nodiscard]] auto test_basic3::match_87(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_87(), str); } -[[nodiscard]] auto test_basic3::match_88(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_88(), str); } -[[nodiscard]] auto test_basic3::match_89(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_89(), str); } -[[nodiscard]] auto test_basic3::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } -[[nodiscard]] auto test_basic3::match_90(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_90(), str); } -[[nodiscard]] auto test_basic3::match_91(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_91(), str); } -[[nodiscard]] auto test_basic3::match_92(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_92(), str); } -[[nodiscard]] auto test_basic3::match_93(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_93(), str); } -[[nodiscard]] auto test_basic3::match_94(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_94(), str); } -[[nodiscard]] auto test_basic3::match_95(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_95(), str); } -[[nodiscard]] auto test_basic3::match_96(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_96(), str); } -[[nodiscard]] auto test_basic3::match_97(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_97(), str); } -[[nodiscard]] auto test_basic3::match_98(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_98(), str); } -[[nodiscard]] auto test_basic3::match_99(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_99(), str); } -[[nodiscard]] auto test_basic3::match_M34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M34(), str); } #line 353 "pure2-regex.cpp2" auto test_class::run() const& -> void{ std::cout << "Running class:" << std::endl; - test(regex_1(), "1", "aa*", "xaxaax", "(1,2)"); - test(regex_2(), "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_M2(), "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)"); - test(regex_3(), "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)"); - test(regex_4(), "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)"); - test(regex_5(), "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)"); - test(regex_6(), "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); - test(regex_7(), "7", "(a*){2}", "xxxxx", "(0,0)(0,0)"); - test(regex_8(), "8", "(a*)*", "a", "(0,1)(0,1)"); - test(regex_9(), "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); - test(regex_10(), "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); - test(regex_11(), "11", ".*(.*)", "ab", "(0,2)(2,2)"); - test(regex_12(), "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)"); - test(regex_M12(), "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)"); + test(regex_1, "1", "aa*", "xaxaax", "(1,2)"); + test(regex_2, "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2, "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)"); + test(regex_3, "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)"); + test(regex_4, "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)"); + test(regex_5, "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)"); + test(regex_6, "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_7, "7", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_8, "8", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_9, "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_10, "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_11, "11", ".*(.*)", "ab", "(0,2)(2,2)"); + test(regex_12, "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)"); + test(regex_M12, "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)"); std::cout << std::endl; } - [[nodiscard]] auto test_class::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } - -[[nodiscard]] auto test_class::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } -[[nodiscard]] auto test_class::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_class::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_class::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } -[[nodiscard]] auto test_class::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } -[[nodiscard]] auto test_class::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } -[[nodiscard]] auto test_class::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } -[[nodiscard]] auto test_class::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } -[[nodiscard]] auto test_class::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } -[[nodiscard]] auto test_class::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } -[[nodiscard]] auto test_class::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } -[[nodiscard]] auto test_class::match_M12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M12(), str); } -[[nodiscard]] auto test_class::match_M2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M2(), str); } #line 385 "pure2-regex.cpp2" auto test_left_assoc::run() const& -> void{ std::cout << "Running left_assoc:" << std::endl; - test(regex_M1(), "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M2(), "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M3(), "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M4(), "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M5(), "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M6(), "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M7(), "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M8(), "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); - test(regex_M9(), "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M10(), "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M11(), "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); - test(regex_M12(), "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M1, "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M2, "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M3, "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M4, "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M5, "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M6, "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M7, "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M8, "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)"); + test(regex_M9, "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M10, "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M11, "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); + test(regex_M12, "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)"); std::cout << std::endl; } - [[nodiscard]] auto test_left_assoc::match_M1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M1(), str); } -[[nodiscard]] auto test_left_assoc::match_M10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M10(), str); } -[[nodiscard]] auto test_left_assoc::match_M11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M11(), str); } -[[nodiscard]] auto test_left_assoc::match_M12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M12(), str); } -[[nodiscard]] auto test_left_assoc::match_M2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M2(), str); } -[[nodiscard]] auto test_left_assoc::match_M3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M3(), str); } -[[nodiscard]] auto test_left_assoc::match_M4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M4(), str); } -[[nodiscard]] auto test_left_assoc::match_M5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M5(), str); } -[[nodiscard]] auto test_left_assoc::match_M6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M6(), str); } -[[nodiscard]] auto test_left_assoc::match_M7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M7(), str); } -[[nodiscard]] auto test_left_assoc::match_M8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M8(), str); } - -[[nodiscard]] auto test_left_assoc::match_M9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M9(), str); } #line 415 "pure2-regex.cpp2" auto test_right_assoc::run() const& -> void{ std::cout << "Running right_assoc:" << std::endl; - test(regex_1(), "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_2(), "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_3(), "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_4(), "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_5(), "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_6(), "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_7(), "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_8(), "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); - test(regex_9(), "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_10(), "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_11(), "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_12(), "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_1, "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_2, "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_3, "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_4, "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_5, "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_6, "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_7, "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_8, "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)"); + test(regex_9, "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_10, "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_11, "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_12, "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); std::cout << std::endl; } - [[nodiscard]] auto test_right_assoc::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } - -[[nodiscard]] auto test_right_assoc::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } -[[nodiscard]] auto test_right_assoc::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_right_assoc::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_right_assoc::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } -[[nodiscard]] auto test_right_assoc::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } -[[nodiscard]] auto test_right_assoc::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } -[[nodiscard]] auto test_right_assoc::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } -[[nodiscard]] auto test_right_assoc::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } -[[nodiscard]] auto test_right_assoc::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } -[[nodiscard]] auto test_right_assoc::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } -[[nodiscard]] auto test_right_assoc::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } #line 461 "pure2-regex.cpp2" auto test_forced_assoc::run() const& -> void{ std::cout << "Running forced_assoc:" << std::endl; - test(regex_1(), "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_2(), "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_3(), "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_4(), "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); - test(regex_5(), "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_6(), "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_7(), "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_8(), "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); - test(regex_9(), "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_10(), "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_11(), "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_12(), "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); - test(regex_13(), "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_14(), "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_15(), "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_16(), "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_17(), "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_18(), "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_19(), "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_20(), "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); - test(regex_21(), "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_22(), "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); - test(regex_23(), "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_24(), "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); - test(regex_25(), "25", "(a|ab)", "ab", "(0,2)(0,2)"); - test(regex_26(), "26", "(ab|a)", "ab", "(0,2)(0,2)"); - test(regex_27(), "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)"); - test(regex_28(), "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_1, "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_2, "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_3, "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_4, "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)"); + test(regex_5, "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_6, "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_7, "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_8, "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)"); + test(regex_9, "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_10, "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_11, "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_12, "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)"); + test(regex_13, "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_14, "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_15, "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_16, "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_17, "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_18, "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_19, "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_20, "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)"); + test(regex_21, "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_22, "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)"); + test(regex_23, "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_24, "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)"); + test(regex_25, "25", "(a|ab)", "ab", "(0,2)(0,2)"); + test(regex_26, "26", "(ab|a)", "ab", "(0,2)(0,2)"); + test(regex_27, "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_28, "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)"); std::cout << std::endl; } - [[nodiscard]] auto test_forced_assoc::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } -[[nodiscard]] auto test_forced_assoc::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } -[[nodiscard]] auto test_forced_assoc::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_forced_assoc::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_forced_assoc::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } -[[nodiscard]] auto test_forced_assoc::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } -[[nodiscard]] auto test_forced_assoc::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } -[[nodiscard]] auto test_forced_assoc::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } -[[nodiscard]] auto test_forced_assoc::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } -[[nodiscard]] auto test_forced_assoc::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } -[[nodiscard]] auto test_forced_assoc::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } -[[nodiscard]] auto test_forced_assoc::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } -[[nodiscard]] auto test_forced_assoc::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } -[[nodiscard]] auto test_forced_assoc::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } -[[nodiscard]] auto test_forced_assoc::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } -[[nodiscard]] auto test_forced_assoc::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } -[[nodiscard]] auto test_forced_assoc::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } -[[nodiscard]] auto test_forced_assoc::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } -[[nodiscard]] auto test_forced_assoc::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } -[[nodiscard]] auto test_forced_assoc::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } -[[nodiscard]] auto test_forced_assoc::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } -[[nodiscard]] auto test_forced_assoc::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } -[[nodiscard]] auto test_forced_assoc::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } -[[nodiscard]] auto test_forced_assoc::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } -[[nodiscard]] auto test_forced_assoc::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } -[[nodiscard]] auto test_forced_assoc::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } -[[nodiscard]] auto test_forced_assoc::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } - -[[nodiscard]] auto test_forced_assoc::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } #line 546 "pure2-regex.cpp2" auto test_nullsub3::run() const& -> void{ std::cout << "Running nullsub3:" << std::endl; - test(regex_1(), "1", "(a*)*", "a", "(0,1)(0,1)"); - test(regex_2(), "2", "(a*)*", "x", "(0,0)(0,0)"); - test(regex_3(), "3", "(a*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_4(), "4", "(a*)*", "aaaaaax", "(0,6)(0,6)"); - test(regex_5(), "5", "(a*)+", "a", "(0,1)(0,1)"); - test(regex_6(), "6", "(a*)+", "x", "(0,0)(0,0)"); - test(regex_7(), "7", "(a*)+", "aaaaaa", "(0,6)(0,6)"); - test(regex_8(), "8", "(a*)+", "aaaaaax", "(0,6)(0,6)"); - test(regex_9(), "9", "(a+)*", "a", "(0,1)(0,1)"); - test(regex_10(), "10", "(a+)*", "x", "(0,0)(?,?)"); - test(regex_11(), "11", "(a+)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_12(), "12", "(a+)*", "aaaaaax", "(0,6)(0,6)"); - test(regex_13(), "13", "(a+)+", "a", "(0,1)(0,1)"); - test(regex_14(), "14", "(a+)+", "x", "NOMATCH"); - test(regex_15(), "15", "(a+)+", "aaaaaa", "(0,6)(0,6)"); - test(regex_16(), "16", "(a+)+", "aaaaaax", "(0,6)(0,6)"); - test(regex_17(), "17", "([a]*)*", "a", "(0,1)(0,1)"); - test(regex_18(), "18", "([a]*)*", "x", "(0,0)(0,0)"); - test(regex_19(), "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_20(), "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)"); - test(regex_21(), "21", "([a]*)+", "a", "(0,1)(0,1)"); - test(regex_22(), "22", "([a]*)+", "x", "(0,0)(0,0)"); - test(regex_23(), "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)"); - test(regex_24(), "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)"); - test(regex_25(), "25", "([^b]*)*", "a", "(0,1)(0,1)"); - test(regex_26(), "26", "([^b]*)*", "b", "(0,0)(0,0)"); - test(regex_27(), "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_28(), "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)"); - test(regex_29(), "29", "([ab]*)*", "a", "(0,1)(0,1)"); - test(regex_30(), "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)"); - test(regex_31(), "31", "([ab]*)*", "ababab", "(0,6)(0,6)"); - test(regex_32(), "32", "([ab]*)*", "bababa", "(0,6)(0,6)"); - test(regex_33(), "33", "([ab]*)*", "b", "(0,1)(0,1)"); - test(regex_34(), "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)"); - test(regex_35(), "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)"); - test(regex_36(), "36", "([^a]*)*", "b", "(0,1)(0,1)"); - test(regex_37(), "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)"); - test(regex_38(), "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)"); - test(regex_39(), "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)"); - test(regex_40(), "40", "([^ab]*)*", "ababab", "(0,0)(0,0)"); - test(regex_41(), "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)"); - test(regex_42(), "42", "(a)", "aaa", "(0,1)(0,1)"); - test(regex_46(), "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)"); - test(regex_47(), "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)"); - test(regex_48(), "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)"); - test(regex_49(), "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)"); - test(regex_50(), "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)"); - test(regex_51(), "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)"); - test(regex_52(), "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)"); - test(regex_53(), "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)"); - test(regex_54(), "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)"); + test(regex_1, "1", "(a*)*", "a", "(0,1)(0,1)"); + test(regex_2, "2", "(a*)*", "x", "(0,0)(0,0)"); + test(regex_3, "3", "(a*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_4, "4", "(a*)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_5, "5", "(a*)+", "a", "(0,1)(0,1)"); + test(regex_6, "6", "(a*)+", "x", "(0,0)(0,0)"); + test(regex_7, "7", "(a*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_8, "8", "(a*)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_9, "9", "(a+)*", "a", "(0,1)(0,1)"); + test(regex_10, "10", "(a+)*", "x", "(0,0)(?,?)"); + test(regex_11, "11", "(a+)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_12, "12", "(a+)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_13, "13", "(a+)+", "a", "(0,1)(0,1)"); + test(regex_14, "14", "(a+)+", "x", "NOMATCH"); + test(regex_15, "15", "(a+)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_16, "16", "(a+)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_17, "17", "([a]*)*", "a", "(0,1)(0,1)"); + test(regex_18, "18", "([a]*)*", "x", "(0,0)(0,0)"); + test(regex_19, "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_20, "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)"); + test(regex_21, "21", "([a]*)+", "a", "(0,1)(0,1)"); + test(regex_22, "22", "([a]*)+", "x", "(0,0)(0,0)"); + test(regex_23, "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)"); + test(regex_24, "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)"); + test(regex_25, "25", "([^b]*)*", "a", "(0,1)(0,1)"); + test(regex_26, "26", "([^b]*)*", "b", "(0,0)(0,0)"); + test(regex_27, "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_28, "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)"); + test(regex_29, "29", "([ab]*)*", "a", "(0,1)(0,1)"); + test(regex_30, "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)"); + test(regex_31, "31", "([ab]*)*", "ababab", "(0,6)(0,6)"); + test(regex_32, "32", "([ab]*)*", "bababa", "(0,6)(0,6)"); + test(regex_33, "33", "([ab]*)*", "b", "(0,1)(0,1)"); + test(regex_34, "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_35, "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)"); + test(regex_36, "36", "([^a]*)*", "b", "(0,1)(0,1)"); + test(regex_37, "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)"); + test(regex_38, "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)"); + test(regex_39, "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)"); + test(regex_40, "40", "([^ab]*)*", "ababab", "(0,0)(0,0)"); + test(regex_41, "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)"); + test(regex_42, "42", "(a)", "aaa", "(0,1)(0,1)"); + test(regex_46, "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_47, "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_48, "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_49, "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_50, "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)"); + test(regex_51, "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)"); + test(regex_52, "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)"); + test(regex_53, "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)"); + test(regex_54, "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)"); std::cout << std::endl; } - [[nodiscard]] auto test_nullsub3::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } - -[[nodiscard]] auto test_nullsub3::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } -[[nodiscard]] auto test_nullsub3::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_nullsub3::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_nullsub3::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } -[[nodiscard]] auto test_nullsub3::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } -[[nodiscard]] auto test_nullsub3::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } -[[nodiscard]] auto test_nullsub3::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } -[[nodiscard]] auto test_nullsub3::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } -[[nodiscard]] auto test_nullsub3::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } -[[nodiscard]] auto test_nullsub3::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } -[[nodiscard]] auto test_nullsub3::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } -[[nodiscard]] auto test_nullsub3::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } -[[nodiscard]] auto test_nullsub3::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } -[[nodiscard]] auto test_nullsub3::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } -[[nodiscard]] auto test_nullsub3::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } -[[nodiscard]] auto test_nullsub3::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } -[[nodiscard]] auto test_nullsub3::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } -[[nodiscard]] auto test_nullsub3::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } -[[nodiscard]] auto test_nullsub3::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } -[[nodiscard]] auto test_nullsub3::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } -[[nodiscard]] auto test_nullsub3::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } -[[nodiscard]] auto test_nullsub3::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } -[[nodiscard]] auto test_nullsub3::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } -[[nodiscard]] auto test_nullsub3::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } -[[nodiscard]] auto test_nullsub3::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } -[[nodiscard]] auto test_nullsub3::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } -[[nodiscard]] auto test_nullsub3::match_34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_34(), str); } -[[nodiscard]] auto test_nullsub3::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } -[[nodiscard]] auto test_nullsub3::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } -[[nodiscard]] auto test_nullsub3::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } -[[nodiscard]] auto test_nullsub3::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } -[[nodiscard]] auto test_nullsub3::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } -[[nodiscard]] auto test_nullsub3::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } -[[nodiscard]] auto test_nullsub3::match_40(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_40(), str); } -[[nodiscard]] auto test_nullsub3::match_41(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_41(), str); } -[[nodiscard]] auto test_nullsub3::match_42(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_42(), str); } -[[nodiscard]] auto test_nullsub3::match_46(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_46(), str); } -[[nodiscard]] auto test_nullsub3::match_47(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_47(), str); } -[[nodiscard]] auto test_nullsub3::match_48(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_48(), str); } -[[nodiscard]] auto test_nullsub3::match_49(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_49(), str); } -[[nodiscard]] auto test_nullsub3::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } -[[nodiscard]] auto test_nullsub3::match_50(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_50(), str); } -[[nodiscard]] auto test_nullsub3::match_51(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_51(), str); } -[[nodiscard]] auto test_nullsub3::match_52(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_52(), str); } -[[nodiscard]] auto test_nullsub3::match_53(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_53(), str); } -[[nodiscard]] auto test_nullsub3::match_54(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_54(), str); } -[[nodiscard]] auto test_nullsub3::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } -[[nodiscard]] auto test_nullsub3::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } -[[nodiscard]] auto test_nullsub3::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } -[[nodiscard]] auto test_nullsub3::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } #line 682 "pure2-regex.cpp2" auto test_repetition2::run() const& -> void{ std::cout << "Running repetition2:" << std::endl; - test(regex_1(), "1", "((..)|(.))", "NULL", "NOMATCH"); - test(regex_2(), "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH"); - test(regex_3(), "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH"); - test(regex_4(), "4", "((..)|(.)){1}", "NULL", "NOMATCH"); - test(regex_5(), "5", "((..)|(.)){2}", "NULL", "NOMATCH"); - test(regex_6(), "6", "((..)|(.)){3}", "NULL", "NOMATCH"); - test(regex_7(), "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)"); - test(regex_8(), "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)"); - test(regex_9(), "9", "((..)|(.))((..)|(.))", "a", "NOMATCH"); - test(regex_10(), "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH"); - test(regex_11(), "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)"); - test(regex_12(), "12", "((..)|(.)){2}", "a", "NOMATCH"); - test(regex_13(), "13", "((..)|(.)){3}", "a", "NOMATCH"); - test(regex_14(), "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)"); - test(regex_15(), "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_16(), "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)"); - test(regex_17(), "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH"); - test(regex_18(), "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_19(), "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)"); - test(regex_20(), "20", "((..)|(.)){3}", "aa", "NOMATCH"); - test(regex_21(), "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_22(), "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_23(), "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)"); - test(regex_24(), "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)"); - test(regex_25(), "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_26(), "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); - test(regex_27(), "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); - test(regex_28(), "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)"); - test(regex_29(), "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_30(), "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); - test(regex_31(), "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)"); - test(regex_32(), "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_33(), "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_34(), "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)"); - test(regex_35(), "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_36(), "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_37(), "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); - test(regex_38(), "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)"); - test(regex_39(), "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_40(), "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_41(), "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); - test(regex_42(), "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); - test(regex_43(), "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_44(), "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); - test(regex_45(), "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)"); - test(regex_46(), "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); - test(regex_47(), "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)"); - test(regex_48(), "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); - test(regex_49(), "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); - test(regex_100(), "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_101(), "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_102(), "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_103(), "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_104(), "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_105(), "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_106(), "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_107(), "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_108(), "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)"); - test(regex_110(), "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_111(), "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_112(), "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_113(), "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_114(), "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_115(), "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_116(), "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_117(), "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)"); - test(regex_118(), "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)"); - test(regex_260(), "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_261(), "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_262(), "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_263(), "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_264(), "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH"); - test(regex_265(), "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_266(), "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_267(), "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_268(), "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_269(), "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH"); - test(regex_270(), "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)"); - test(regex_271(), "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_1, "1", "((..)|(.))", "NULL", "NOMATCH"); + test(regex_2, "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_3, "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH"); + test(regex_4, "4", "((..)|(.)){1}", "NULL", "NOMATCH"); + test(regex_5, "5", "((..)|(.)){2}", "NULL", "NOMATCH"); + test(regex_6, "6", "((..)|(.)){3}", "NULL", "NOMATCH"); + test(regex_7, "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)"); + test(regex_8, "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_9, "9", "((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_10, "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH"); + test(regex_11, "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_12, "12", "((..)|(.)){2}", "a", "NOMATCH"); + test(regex_13, "13", "((..)|(.)){3}", "a", "NOMATCH"); + test(regex_14, "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)"); + test(regex_15, "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_16, "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)"); + test(regex_17, "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH"); + test(regex_18, "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_19, "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_20, "20", "((..)|(.)){3}", "aa", "NOMATCH"); + test(regex_21, "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_22, "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_23, "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)"); + test(regex_24, "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)"); + test(regex_25, "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_26, "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_27, "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_28, "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)"); + test(regex_29, "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_30, "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_31, "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)"); + test(regex_32, "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_33, "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_34, "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)"); + test(regex_35, "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_36, "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_37, "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_38, "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)"); + test(regex_39, "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_40, "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_41, "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_42, "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)"); + test(regex_43, "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_44, "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)"); + test(regex_45, "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)"); + test(regex_46, "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)"); + test(regex_47, "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)"); + test(regex_48, "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_49, "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)"); + test(regex_100, "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_101, "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_102, "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_103, "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_104, "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_105, "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_106, "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_107, "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_108, "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_110, "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_111, "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_112, "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_113, "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_114, "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_115, "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_116, "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_117, "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)"); + test(regex_118, "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)"); + test(regex_260, "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_261, "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_262, "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_263, "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_264, "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH"); + test(regex_265, "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_266, "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_267, "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_268, "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_269, "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH"); + test(regex_270, "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)"); + test(regex_271, "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)"); std::cout << std::endl; } - [[nodiscard]] auto test_repetition2::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } -[[nodiscard]] auto test_repetition2::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } -[[nodiscard]] auto test_repetition2::match_100(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_100(), str); } -[[nodiscard]] auto test_repetition2::match_101(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_101(), str); } -[[nodiscard]] auto test_repetition2::match_102(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_102(), str); } -[[nodiscard]] auto test_repetition2::match_103(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_103(), str); } -[[nodiscard]] auto test_repetition2::match_104(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_104(), str); } -[[nodiscard]] auto test_repetition2::match_105(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_105(), str); } -[[nodiscard]] auto test_repetition2::match_106(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_106(), str); } -[[nodiscard]] auto test_repetition2::match_107(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_107(), str); } -[[nodiscard]] auto test_repetition2::match_108(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_108(), str); } -[[nodiscard]] auto test_repetition2::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_repetition2::match_110(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_110(), str); } -[[nodiscard]] auto test_repetition2::match_111(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_111(), str); } -[[nodiscard]] auto test_repetition2::match_112(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_112(), str); } -[[nodiscard]] auto test_repetition2::match_113(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_113(), str); } -[[nodiscard]] auto test_repetition2::match_114(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_114(), str); } -[[nodiscard]] auto test_repetition2::match_115(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_115(), str); } -[[nodiscard]] auto test_repetition2::match_116(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_116(), str); } -[[nodiscard]] auto test_repetition2::match_117(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_117(), str); } -[[nodiscard]] auto test_repetition2::match_118(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_118(), str); } -[[nodiscard]] auto test_repetition2::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_repetition2::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } -[[nodiscard]] auto test_repetition2::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } -[[nodiscard]] auto test_repetition2::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } -[[nodiscard]] auto test_repetition2::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } -[[nodiscard]] auto test_repetition2::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } -[[nodiscard]] auto test_repetition2::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } -[[nodiscard]] auto test_repetition2::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } -[[nodiscard]] auto test_repetition2::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } -[[nodiscard]] auto test_repetition2::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } -[[nodiscard]] auto test_repetition2::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } -[[nodiscard]] auto test_repetition2::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } -[[nodiscard]] auto test_repetition2::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } -[[nodiscard]] auto test_repetition2::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } -[[nodiscard]] auto test_repetition2::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } -[[nodiscard]] auto test_repetition2::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } -[[nodiscard]] auto test_repetition2::match_260(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_260(), str); } -[[nodiscard]] auto test_repetition2::match_261(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_261(), str); } -[[nodiscard]] auto test_repetition2::match_262(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_262(), str); } -[[nodiscard]] auto test_repetition2::match_263(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_263(), str); } -[[nodiscard]] auto test_repetition2::match_264(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_264(), str); } -[[nodiscard]] auto test_repetition2::match_265(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_265(), str); } -[[nodiscard]] auto test_repetition2::match_266(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_266(), str); } -[[nodiscard]] auto test_repetition2::match_267(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_267(), str); } -[[nodiscard]] auto test_repetition2::match_268(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_268(), str); } -[[nodiscard]] auto test_repetition2::match_269(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_269(), str); } -[[nodiscard]] auto test_repetition2::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } -[[nodiscard]] auto test_repetition2::match_270(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_270(), str); } -[[nodiscard]] auto test_repetition2::match_271(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_271(), str); } -[[nodiscard]] auto test_repetition2::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } -[[nodiscard]] auto test_repetition2::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } -[[nodiscard]] auto test_repetition2::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } -[[nodiscard]] auto test_repetition2::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } -[[nodiscard]] auto test_repetition2::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } -[[nodiscard]] auto test_repetition2::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } -[[nodiscard]] auto test_repetition2::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } -[[nodiscard]] auto test_repetition2::match_34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_34(), str); } -[[nodiscard]] auto test_repetition2::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } -[[nodiscard]] auto test_repetition2::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } -[[nodiscard]] auto test_repetition2::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } -[[nodiscard]] auto test_repetition2::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } -[[nodiscard]] auto test_repetition2::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } -[[nodiscard]] auto test_repetition2::match_4(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_4(), str); } -[[nodiscard]] auto test_repetition2::match_40(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_40(), str); } -[[nodiscard]] auto test_repetition2::match_41(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_41(), str); } -[[nodiscard]] auto test_repetition2::match_42(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_42(), str); } -[[nodiscard]] auto test_repetition2::match_43(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_43(), str); } -[[nodiscard]] auto test_repetition2::match_44(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_44(), str); } -[[nodiscard]] auto test_repetition2::match_45(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_45(), str); } -[[nodiscard]] auto test_repetition2::match_46(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_46(), str); } -[[nodiscard]] auto test_repetition2::match_47(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_47(), str); } -[[nodiscard]] auto test_repetition2::match_48(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_48(), str); } -[[nodiscard]] auto test_repetition2::match_49(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_49(), str); } -[[nodiscard]] auto test_repetition2::match_5(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_5(), str); } -[[nodiscard]] auto test_repetition2::match_6(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_6(), str); } -[[nodiscard]] auto test_repetition2::match_7(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_7(), str); } -[[nodiscard]] auto test_repetition2::match_8(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_8(), str); } - -[[nodiscard]] auto test_repetition2::match_9(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_9(), str); } #line 846 "pure2-regex.cpp2" auto test_totest::run() const& -> void{ std::cout << "Running totest:" << std::endl; - test(regex_01(), "01", "a+", "xaax", "(1,3)"); - test(regex_03(), "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)"); - test(regex_04(), "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)"); - test(regex_05(), "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)"); - test(regex_06(), "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)"); - test(regex_07(), "07", "(.?)", "x", "(0,1)(0,1)"); - test(regex_08(), "08", "(.?){1}", "x", "(0,1)(0,1)"); - test(regex_09(), "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)"); - test(regex_10(), "10", "(.?){2}", "x", "(0,1)(1,1)"); - test(regex_11(), "11", "(.?)*", "x", "(0,1)(0,1)"); - test(regex_12(), "12", "(.?.?)", "xxx", "(0,2)(0,2)"); - test(regex_13(), "13", "(.?.?){1}", "xxx", "(0,2)(0,2)"); - test(regex_14(), "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)"); - test(regex_15(), "15", "(.?.?){2}", "xxx", "(0,3)(2,3)"); - test(regex_16(), "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)"); - test(regex_17(), "17", "(.?.?){3}", "xxx", "(0,3)(3,3)"); - test(regex_18(), "18", "(.?.?)*", "xxx", "(0,3)(2,3)"); - test(regex_19(), "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)"); - test(regex_20(), "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)"); - test(regex_21(), "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)"); - test(regex_22(), "22", "(a*){2}", "xxxxx", "(0,0)(0,0)"); - test(regex_23(), "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)"); - test(regex_24(), "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)"); - test(regex_25(), "25", "(a|ab|ba)", "aba", "(0,2)(0,2)"); - test(regex_26(), "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)"); - test(regex_27(), "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)"); - test(regex_28(), "28", "(aba|a*b)", "ababa", "(0,3)(0,3)"); - test(regex_29(), "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); - test(regex_1029(), "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH"); - test(regex_30(), "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); - test(regex_31(), "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)"); - test(regex_32(), "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)"); - test(regex_1032(), "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)"); - test(regex_33(), "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)"); - test(regex_34(), "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)"); - test(regex_35(), "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)"); - test(regex_36(), "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); - test(regex_37(), "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)"); - test(regex_38(), "38", ".*(.*)", "xx", "(0,2)(2,2)"); - test(regex_39(), "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)"); - test(regex_40(), "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)"); - test(regex_41(), "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)"); - test(regex_42(), "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)"); - test(regex_43(), "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)"); - test(regex_44(), "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)"); - test(regex_45(), "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)"); - test(regex_83(), "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)"); - test(regex_84(), "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); - test(regex_85(), "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); - test(regex_90(), "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)"); - test(regex_91(), "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)"); - test(regex_110(), "110", "(^){0,3}", "a", "(0,0)(0,0)"); - test(regex_111(), "111", "(\\$){0,3}", "a", "(0,0)(?,?)"); - test(regex_112(), "112", "(^){1,3}", "a", "(0,0)(0,0)"); - test(regex_113(), "113", "(\\$){1,3}", "a", "(1,1)(1,1)"); - test(regex_200(), "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)"); - test(regex_201(), "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)"); - test(regex_202(), "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); - test(regex_203(), "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); - test(regex_204(), "204", "s()?e", "searchme", "(0,2)(1,1)"); - test(regex_205(), "205", "s(^)?e", "searchme", "(0,2)(?,?)"); - test(regex_206(), "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)"); - test(regex_207(), "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)"); - test(regex_208(), "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)"); - test(regex_209(), "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)"); - test(regex_210(), "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)"); - test(regex_211(), "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)"); - test(regex_212(), "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)"); - test(regex_213(), "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)"); - test(regex_214(), "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)"); - test(regex_215(), "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)"); - test(regex_216(), "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)"); - test(regex_217(), "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)"); - test(regex_218(), "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)"); - test(regex_219(), "219", "(.){2,}", "xx", "(0,2)(1,2)"); - test(regex_220(), "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)"); - test(regex_220(), "220", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)"); - test(regex_250(), "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)"); - test(regex_251(), "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)"); + test(regex_01, "01", "a+", "xaax", "(1,3)"); + test(regex_03, "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)"); + test(regex_04, "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)"); + test(regex_05, "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)"); + test(regex_06, "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)"); + test(regex_07, "07", "(.?)", "x", "(0,1)(0,1)"); + test(regex_08, "08", "(.?){1}", "x", "(0,1)(0,1)"); + test(regex_09, "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)"); + test(regex_10, "10", "(.?){2}", "x", "(0,1)(1,1)"); + test(regex_11, "11", "(.?)*", "x", "(0,1)(0,1)"); + test(regex_12, "12", "(.?.?)", "xxx", "(0,2)(0,2)"); + test(regex_13, "13", "(.?.?){1}", "xxx", "(0,2)(0,2)"); + test(regex_14, "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)"); + test(regex_15, "15", "(.?.?){2}", "xxx", "(0,3)(2,3)"); + test(regex_16, "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)"); + test(regex_17, "17", "(.?.?){3}", "xxx", "(0,3)(3,3)"); + test(regex_18, "18", "(.?.?)*", "xxx", "(0,3)(2,3)"); + test(regex_19, "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)"); + test(regex_20, "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)"); + test(regex_21, "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)"); + test(regex_22, "22", "(a*){2}", "xxxxx", "(0,0)(0,0)"); + test(regex_23, "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_24, "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_25, "25", "(a|ab|ba)", "aba", "(0,2)(0,2)"); + test(regex_26, "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)"); + test(regex_27, "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)"); + test(regex_28, "28", "(aba|a*b)", "ababa", "(0,3)(0,3)"); + test(regex_29, "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1029, "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH"); + test(regex_30, "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)"); + test(regex_31, "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)"); + test(regex_32, "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)"); + test(regex_1032, "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)"); + test(regex_33, "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)"); + test(regex_34, "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)"); + test(regex_35, "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)"); + test(regex_36, "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_37, "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)"); + test(regex_38, "38", ".*(.*)", "xx", "(0,2)(2,2)"); + test(regex_39, "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)"); + test(regex_40, "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)"); + test(regex_41, "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)"); + test(regex_42, "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)"); + test(regex_43, "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_44, "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)"); + test(regex_45, "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)"); + test(regex_83, "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)"); + test(regex_84, "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)"); + test(regex_85, "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)"); + test(regex_90, "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)"); + test(regex_91, "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)"); + test(regex_110, "110", "(^){0,3}", "a", "(0,0)(0,0)"); + test(regex_111, "111", "(\\$){0,3}", "a", "(0,0)(?,?)"); + test(regex_112, "112", "(^){1,3}", "a", "(0,0)(0,0)"); + test(regex_113, "113", "(\\$){1,3}", "a", "(1,1)(1,1)"); + test(regex_200, "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)"); + test(regex_201, "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_202, "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_203, "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)"); + test(regex_204, "204", "s()?e", "searchme", "(0,2)(1,1)"); + test(regex_205, "205", "s(^)?e", "searchme", "(0,2)(?,?)"); + test(regex_206, "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)"); + test(regex_207, "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)"); + test(regex_208, "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)"); + test(regex_209, "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)"); + test(regex_210, "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)"); + test(regex_211, "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)"); + test(regex_212, "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)"); + test(regex_213, "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)"); + test(regex_214, "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)"); + test(regex_215, "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)"); + test(regex_216, "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)"); + test(regex_217, "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)"); + test(regex_218, "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)"); + test(regex_219, "219", "(.){2,}", "xx", "(0,2)(1,2)"); + test(regex_220, "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)"); + test(regex_230, "230", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)"); + test(regex_250, "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)"); + test(regex_251, "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)"); std::cout << std::endl; } - [[nodiscard]] auto test_totest::match_01(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_01(), str); } -[[nodiscard]] auto test_totest::match_03(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_03(), str); } -[[nodiscard]] auto test_totest::match_04(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_04(), str); } -[[nodiscard]] auto test_totest::match_05(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_05(), str); } -[[nodiscard]] auto test_totest::match_06(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_06(), str); } -[[nodiscard]] auto test_totest::match_07(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_07(), str); } -[[nodiscard]] auto test_totest::match_08(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_08(), str); } -[[nodiscard]] auto test_totest::match_09(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_09(), str); } -[[nodiscard]] auto test_totest::match_10(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_10(), str); } -[[nodiscard]] auto test_totest::match_1029(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1029(), str); } -[[nodiscard]] auto test_totest::match_1032(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1032(), str); } -[[nodiscard]] auto test_totest::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_totest::match_110(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_110(), str); } -[[nodiscard]] auto test_totest::match_111(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_111(), str); } -[[nodiscard]] auto test_totest::match_112(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_112(), str); } -[[nodiscard]] auto test_totest::match_113(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_113(), str); } -[[nodiscard]] auto test_totest::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_totest::match_13(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_13(), str); } -[[nodiscard]] auto test_totest::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } -[[nodiscard]] auto test_totest::match_15(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_15(), str); } -[[nodiscard]] auto test_totest::match_16(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_16(), str); } -[[nodiscard]] auto test_totest::match_17(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_17(), str); } -[[nodiscard]] auto test_totest::match_18(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_18(), str); } -[[nodiscard]] auto test_totest::match_19(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_19(), str); } -[[nodiscard]] auto test_totest::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } -[[nodiscard]] auto test_totest::match_200(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_200(), str); } -[[nodiscard]] auto test_totest::match_201(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_201(), str); } -[[nodiscard]] auto test_totest::match_202(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_202(), str); } -[[nodiscard]] auto test_totest::match_203(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_203(), str); } -[[nodiscard]] auto test_totest::match_204(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_204(), str); } -[[nodiscard]] auto test_totest::match_205(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_205(), str); } -[[nodiscard]] auto test_totest::match_206(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_206(), str); } -[[nodiscard]] auto test_totest::match_207(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_207(), str); } -[[nodiscard]] auto test_totest::match_208(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_208(), str); } -[[nodiscard]] auto test_totest::match_209(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_209(), str); } -[[nodiscard]] auto test_totest::match_21(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_21(), str); } -[[nodiscard]] auto test_totest::match_210(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_210(), str); } -[[nodiscard]] auto test_totest::match_211(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_211(), str); } -[[nodiscard]] auto test_totest::match_212(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_212(), str); } -[[nodiscard]] auto test_totest::match_213(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_213(), str); } -[[nodiscard]] auto test_totest::match_214(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_214(), str); } -[[nodiscard]] auto test_totest::match_215(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_215(), str); } -[[nodiscard]] auto test_totest::match_216(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_216(), str); } -[[nodiscard]] auto test_totest::match_217(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_217(), str); } -[[nodiscard]] auto test_totest::match_218(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_218(), str); } -[[nodiscard]] auto test_totest::match_219(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_219(), str); } -[[nodiscard]] auto test_totest::match_22(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_22(), str); } -[[nodiscard]] auto test_totest::match_220(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_220(), str); } -[[nodiscard]] auto test_totest::match_23(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_23(), str); } -[[nodiscard]] auto test_totest::match_24(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_24(), str); } -[[nodiscard]] auto test_totest::match_25(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_25(), str); } -[[nodiscard]] auto test_totest::match_250(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_250(), str); } -[[nodiscard]] auto test_totest::match_251(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_251(), str); } -[[nodiscard]] auto test_totest::match_26(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_26(), str); } -[[nodiscard]] auto test_totest::match_27(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_27(), str); } -[[nodiscard]] auto test_totest::match_28(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_28(), str); } -[[nodiscard]] auto test_totest::match_29(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_29(), str); } -[[nodiscard]] auto test_totest::match_30(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_30(), str); } -[[nodiscard]] auto test_totest::match_31(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_31(), str); } -[[nodiscard]] auto test_totest::match_32(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_32(), str); } -[[nodiscard]] auto test_totest::match_33(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_33(), str); } -[[nodiscard]] auto test_totest::match_34(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_34(), str); } -[[nodiscard]] auto test_totest::match_35(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_35(), str); } -[[nodiscard]] auto test_totest::match_36(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_36(), str); } -[[nodiscard]] auto test_totest::match_37(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_37(), str); } -[[nodiscard]] auto test_totest::match_38(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_38(), str); } -[[nodiscard]] auto test_totest::match_39(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_39(), str); } -[[nodiscard]] auto test_totest::match_40(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_40(), str); } -[[nodiscard]] auto test_totest::match_41(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_41(), str); } -[[nodiscard]] auto test_totest::match_42(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_42(), str); } -[[nodiscard]] auto test_totest::match_43(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_43(), str); } -[[nodiscard]] auto test_totest::match_44(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_44(), str); } -[[nodiscard]] auto test_totest::match_45(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_45(), str); } -[[nodiscard]] auto test_totest::match_83(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_83(), str); } -[[nodiscard]] auto test_totest::match_84(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_84(), str); } -[[nodiscard]] auto test_totest::match_85(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_85(), str); } -[[nodiscard]] auto test_totest::match_90(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_90(), str); } -[[nodiscard]] auto test_totest::match_91(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_91(), str); } #line 942 "pure2-regex.cpp2" auto test_osx_bsd_critical::run() const& -> void{ std::cout << "Running osx_bsd_critical:" << std::endl; - test(regex_1(), "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_M1(), "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); - test(regex_2(), "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_M2(), "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); - test(regex_3(), "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)"); - test(regex_M3(), "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)"); - test(regex_11(), "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_12(), "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); - test(regex_14(), "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)"); - test(regex_M14(), "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)"); - test(regex_20(), "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)"); + test(regex_1, "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M1, "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_2, "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_M2, "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)"); + test(regex_3, "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M3, "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)"); + test(regex_11, "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_12, "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)"); + test(regex_14, "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)"); + test(regex_M14, "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)"); + test(regex_20, "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)"); std::cout << std::endl; } - [[nodiscard]] auto test_osx_bsd_critical::match_1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_1(), str); } - -[[nodiscard]] auto test_osx_bsd_critical::match_11(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_11(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_12(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_12(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_14(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_2(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_20(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_20(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_3(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_M1(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M1(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_M14(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M14(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_M2(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M2(), str); } -[[nodiscard]] auto test_osx_bsd_critical::match_M3(cpp2::in str) const& -> auto { return CPP2_UFCS(match)(regex_M3(), str); } #line 958 "pure2-regex.cpp2" auto main(int const argc_, char** argv_) -> int{ diff --git a/source/reflect.h b/source/reflect.h index 7a89ddb608..7f4ced014f 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -39,7 +39,7 @@ class alias_declaration; #line 963 "reflect.h2" class value_member_info; -#line 1549 "reflect.h2" +#line 1546 "reflect.h2" } } @@ -770,7 +770,7 @@ auto print(cpp2::in t) -> void; // auto regex_gen(meta::type_declaration& t) -> void; -#line 1439 "reflect.h2" +#line 1436 "reflect.h2" //----------------------------------------------------------------------- // // apply_metafunctions @@ -781,7 +781,7 @@ auto regex_gen(meta::type_declaration& t) -> void; auto const& error ) -> bool; -#line 1549 "reflect.h2" +#line 1546 "reflect.h2" } } @@ -1956,14 +1956,11 @@ auto regex_gen(meta::type_declaration& t) -> void name = "_" + name; } - CPP2_UFCS(add_member)(t, ("regex" + cpp2::to_string(name) + ": type == " + cpp2::to_string(regular_expression) + ";")); - //t.add_member("match(name)$: (in this, str: std::string) -> _ = regex(name)$().match(str);"); - //t.add_member("match(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().match(str, ctx);"); - //t.add_member("find(name)$: (in this, str: std::string, out ctx: regex(name)$::context) -> _ = regex(name)$().find(str, ctx);"); + CPP2_UFCS(add_member)(t, ("regex" + cpp2::to_string(name) + ": " + cpp2::to_string(regular_expression) + " = ();")); } } -#line 1443 "reflect.h2" +#line 1440 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -2069,7 +2066,7 @@ auto regex_gen(meta::type_declaration& t) -> void return true; } -#line 1549 "reflect.h2" +#line 1546 "reflect.h2" } } diff --git a/source/regex.h b/source/regex.h index 8243b736a9..e3af6b88fc 100644 --- a/source/regex.h +++ b/source/regex.h @@ -15,93 +15,89 @@ namespace cpp2 { namespace regex { -#line 20 "regex.h2" +#line 27 "regex.h2" template class match_group; -#line 27 "regex.h2" +#line 34 "regex.h2" template class match_return; -#line 32 "regex.h2" +#line 39 "regex.h2" template class match_context; -#line 66 "regex.h2" -template class matcher_list; +#line 94 "regex.h2" +template class matcher_list; -#line 80 "regex.h2" -template class regular_expression; - -#line 104 "regex.h2" -template class alternative_matcher_logic; - -#line 127 "regex.h2" -template class any_matcher_logic; - -#line 142 "regex.h2" -template class char_matcher_logic; - -#line 155 "regex.h2" +#line 119 "regex.h2" template class single_class_entry; -#line 161 "regex.h2" +#line 127 "regex.h2" template class range_class_entry; -#line 167 "regex.h2" -template class and_class_entry; +#line 135 "regex.h2" +template class combined_class_entry; -#line 172 "regex.h2" +#line 142 "regex.h2" template class list_class_entry; -#line 177 "regex.h2" +#line 149 "regex.h2" template class named_class_entry; -#line 201 "regex.h2" +#line 186 "regex.h2" +template class alternative_matcher_logic; + +#line 210 "regex.h2" +template class any_matcher_logic; + +#line 226 "regex.h2" +template class char_matcher_logic; + +#line 242 "regex.h2" template class class_matcher_logic; -#line 236 "regex.h2" +#line 280 "regex.h2" template class escaped_char_matcher_logic; -#line 242 "regex.h2" +#line 289 "regex.h2" template class group_matcher_start_logic; -#line 263 "regex.h2" +#line 312 "regex.h2" template class group_matcher_end_logic; -#line 282 "regex.h2" +#line 335 "regex.h2" template class group_ref_matcher_logic; -#line 298 "regex.h2" +#line 355 "regex.h2" template class line_end_matcher_logic; -#line 313 "regex.h2" +#line 375 "regex.h2" template class line_start_matcher_logic; -#line 328 "regex.h2" -template class list_matcher_logic; - -#line 337 "regex.h2" +#line 391 "regex.h2" template class range_matcher_logic; -#line 407 "regex.h2" +#line 463 "regex.h2" template class special_range_matcher_logic; -#line 413 "regex.h2" +#line 476 "regex.h2" +template class regular_expression; + +#line 542 "regex.h2" class regex_parser_state; - -#line 443 "regex.h2" +#line 574 "regex.h2" template class regex_parser; -#line 807 "regex.h2" +#line 968 "regex.h2" } } @@ -129,6 +125,13 @@ namespace regex { template using view = std::basic_string_view; template using bstring = std::basic_string; +//----------------------------------------------------------------------- +// +// Helper structures for the expression matching. +// +//----------------------------------------------------------------------- +// + template class match_group { public: Iter start {}; public: Iter end {}; @@ -143,108 +146,79 @@ template class match_return { template class match_context { - public: std::array,max_groups> groups {}; - - public: auto set_group_start(auto const& pos, auto const& start) & -> void; - -#line 40 "regex.h2" - public: auto set_group_end(auto const& pos, auto const& end) & -> void; - -#line 45 "regex.h2" - public: auto set_group_invalid(auto const& pos) & -> void; - -#line 49 "regex.h2" - public: [[nodiscard]] auto get_group(auto const& pos) & -> auto; - - public: [[nodiscard]] auto print_ranges(auto const& begin) const& -> bstring; - public: match_context() = default; - public: match_context(match_context const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(match_context const&) -> void = delete; - - -#line 64 "regex.h2" -}; - -template class matcher_list { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + public: Iter begin; + public: Iter end; - public: template [[nodiscard]] static auto match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto; + private: std::array,max_groups> groups {}; -#line 72 "regex.h2" - private: template [[nodiscard]] static auto match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; + public: explicit match_context(Iter const& begin_, Iter const& end_); - private: template [[nodiscard]] static auto match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto; +#line 51 "regex.h2" + public: match_context(match_context const& that); +#line 51 "regex.h2" + public: auto operator=(match_context const& that) -> match_context& ; +#line 51 "regex.h2" + public: match_context(match_context&& that) noexcept; +#line 51 "regex.h2" + public: auto operator=(match_context&& that) noexcept -> match_context& ; - public: static auto reset_ranges(auto& ctx) -> void; - public: [[nodiscard]] static auto to_string() -> auto; - public: matcher_list() = default; - public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(matcher_list const&) -> void = delete; + // Getter and setter for groups + // + public: [[nodiscard]] auto get_group(auto const& group) const& -> auto; -#line 78 "regex.h2" -}; + public: auto set_group_end(auto const& group, auto const& pos) & -> void; -template class regular_expression { +#line 62 "regex.h2" + public: auto set_group_invalid(auto const& group) & -> void; - public: using Iter = view::const_iterator; - public: using context = match_context; +#line 66 "regex.h2" + public: auto set_group_start(auto const& group, auto const& pos) & -> void; - public: [[nodiscard]] auto search(cpp2::in> str, context& ctx) const& -> bool; +#line 70 "regex.h2" + public: [[nodiscard]] auto size() const& -> auto; -#line 101 "regex.h2" - public: [[nodiscard]] auto to_string() const& -> auto; - public: regular_expression() = default; - public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(regular_expression const&) -> void = delete; + // Misc functions + // + public: [[nodiscard]] auto print_ranges() const& -> bstring; -#line 102 "regex.h2" +#line 87 "regex.h2" }; -template class alternative_matcher_logic { - - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; - private: template [[nodiscard]] static auto match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return; - -#line 122 "regex.h2" - public: static auto reset_ranges(auto& ctx) -> void; +// Represents the remainder of the regular expression. +// +// A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found. +// Otherwise the matcher can try a different alternative. +// +template class matcher_list { + public: [[nodiscard]] static auto match(auto const& cur, auto& ctx) -> auto; - public: [[nodiscard]] static auto to_string() -> auto; - public: alternative_matcher_logic() = default; - public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(alternative_matcher_logic const&) -> void = delete; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto; -#line 125 "regex.h2" -}; +#line 100 "regex.h2" + private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto; -template class any_matcher_logic - { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto; -#line 137 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; - public: [[nodiscard]] static auto to_string() -> auto; - public: any_matcher_logic() = default; - public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(any_matcher_logic const&) -> void = delete; + public: matcher_list() = default; + public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(matcher_list const&) -> void = delete; -#line 140 "regex.h2" +#line 106 "regex.h2" }; -template class char_matcher_logic - { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; - -#line 151 "regex.h2" - public: static auto reset_ranges(auto& ctx) -> void; - public: [[nodiscard]] static auto to_string() -> auto; - public: char_matcher_logic() = default; - public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(char_matcher_logic const&) -> void = delete; +template using no_tail = matcher_list; -#line 153 "regex.h2" -}; +//----------------------------------------------------------------------- +// +// Character classes for regular expressions. +// +//----------------------------------------------------------------------- +// +// Class syntax: Example: a +// template class single_class_entry { public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; @@ -253,9 +227,11 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 159 "regex.h2" +#line 123 "regex.h2" }; +// Class syntax: - Example: a-c +// template class range_class_entry { public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; @@ -264,19 +240,23 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 165 "regex.h2" +#line 131 "regex.h2" }; -template class and_class_entry { +// Helper for combining two character classes +// +template class combined_class_entry { public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; public: [[nodiscard]] static auto to_string() -> auto; - public: and_class_entry() = default; - public: and_class_entry(and_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(and_class_entry const&) -> void = delete; + public: combined_class_entry() = default; + public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(combined_class_entry const&) -> void = delete; -#line 170 "regex.h2" +#line 138 "regex.h2" }; +// Class syntax: Example: abcd +// template class list_class_entry { public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; public: [[nodiscard]] static auto to_string() -> auto; @@ -284,9 +264,11 @@ template class list_class_entry { public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_class_entry const&) -> void = delete; -#line 175 "regex.h2" +#line 145 "regex.h2" }; +// Class syntax: [: class named_class_entry { public: [[nodiscard]] static auto includes(cpp2::in c) -> auto; public: [[nodiscard]] static auto to_string() -> auto; @@ -294,168 +276,236 @@ template class named_class_en public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(named_class_entry const&) -> void = delete; -#line 180 "regex.h2" +#line 152 "regex.h2" }; -#line 183 "regex.h2" -// Named character classes. +#line 155 "regex.h2" +// Named basic character classes +// template using digits_class = named_class_entry>; template using lower_class = named_class_entry>; template using upper_class = named_class_entry>; -// Named classes. -template using alnum_class = named_class_entry,upper_class,digits_class>>; -template using alpha_class = named_class_entry,upper_class>>; +// Named other classes +// +template using alnum_class = named_class_entry,upper_class,digits_class>>; +template using alpha_class = named_class_entry,upper_class>>; template using ascii_class = named_class_entry>; template using blank_class = named_class_entry>; -template using cntrl_class = named_class_entry,single_class_entry>>; +template using cntrl_class = named_class_entry,single_class_entry>>; template using graph_class = named_class_entry>; template using print_class = named_class_entry>; template using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>; template using space_class = named_class_entry>; -template using word_class = named_class_entry,single_class_entry>>; -template using xdigit_class = named_class_entry,range_class_entry,digits_class>>; +template using word_class = named_class_entry,single_class_entry>>; +template using xdigit_class = named_class_entry,range_class_entry,digits_class>>; + +//----------------------------------------------------------------------- +// +// Matchers for regular expressions. +// +//----------------------------------------------------------------------- +// + +// Regex syntax: | Example: ab|ba +// +// Non greedy implementation. First alternative that matches is chosen. +// +template class alternative_matcher_logic { + public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& tail) -> auto; + public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; + + private: template [[nodiscard]] static auto match_all(auto const& cur, auto& ctx, auto const& tail) -> auto; + public: alternative_matcher_logic() = default; + public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(alternative_matcher_logic const&) -> void = delete; + + +#line 206 "regex.h2" +}; + +// Regex syntax: . +// +template class any_matcher_logic + { + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; + +#line 220 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; + public: any_matcher_logic() = default; + public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(any_matcher_logic const&) -> void = delete; + +#line 222 "regex.h2" +}; + +// Regex syntax: Example: a +// +template class char_matcher_logic + { + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; + +#line 235 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; + public: char_matcher_logic() = default; + public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(char_matcher_logic const&) -> void = delete; + +#line 237 "regex.h2" +}; + +#line 240 "regex.h2" +// Regex syntax: [] Example: [abcx-y[:digits:]] +// template class class_matcher_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 211 "regex.h2" +#line 252 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 223 "regex.h2" +#line 264 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> bstring; public: class_matcher_logic() = default; public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 234 "regex.h2" +#line 276 "regex.h2" }; +// Regex syntax: \ Example: \. +// template class escaped_char_matcher_logic : public char_matcher_logic { +#line 284 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: escaped_char_matcher_logic() = default; public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 240 "regex.h2" +#line 285 "regex.h2" }; +// Regex syntax: () Example: (.*) +// template class group_matcher_start_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 252 "regex.h2" +#line 300 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_start_logic() = default; public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_start_logic const&) -> void = delete; -#line 261 "regex.h2" +#line 310 "regex.h2" }; template class group_matcher_end_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 271 "regex.h2" +#line 321 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; public: group_matcher_end_logic() = default; public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_matcher_end_logic const&) -> void = delete; -#line 280 "regex.h2" +#line 331 "regex.h2" }; +// Regex syntax: \ Example: \1 +// template class group_ref_matcher_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 294 "regex.h2" +#line 347 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; - public: [[nodiscard]] static auto to_string() -> bstring; + public: [[nodiscard]] static auto to_string() -> auto; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 296 "regex.h2" +#line 349 "regex.h2" }; +// Regex syntax: $ Example: aa$ +// +// Also matches new lines endings. +// template class line_end_matcher_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 309 "regex.h2" +#line 367 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; - public: [[nodiscard]] static auto to_string() -> bstring; + public: [[nodiscard]] static auto to_string() -> auto; public: line_end_matcher_logic() = default; public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 311 "regex.h2" +#line 369 "regex.h2" }; +// Regex syntax: ^ Example: ^aa +// +// Also matches new line starts. +// template class line_start_matcher_logic { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 324 "regex.h2" +#line 386 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: line_start_matcher_logic() = default; public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 326 "regex.h2" +#line 388 "regex.h2" }; -template class list_matcher_logic - { - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; +// Regex syntax: {min, max} Example: a{2,4} +template class range_matcher_logic { -#line 333 "regex.h2" + public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& tail) -> auto; public: static auto reset_ranges(auto& ctx) -> void; - public: [[nodiscard]] static auto to_string() -> auto; - public: list_matcher_logic() = default; - public: list_matcher_logic(list_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ - public: auto operator=(list_matcher_logic const&) -> void = delete; - -#line 335 "regex.h2" -}; -template class range_matcher_logic { - -#line 340 "regex.h2" - public: template [[nodiscard]] static auto match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto; + public: [[nodiscard]] static auto to_string() -> bstring; -#line 343 "regex.h2" +#line 415 "regex.h2" private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool; -#line 348 "regex.h2" +#line 420 "regex.h2" private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool; -#line 353 "regex.h2" +#line 425 "regex.h2" private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool; -#line 358 "regex.h2" - private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& last_valid, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_7) -> match_return; - -#line 386 "regex.h2" - public: static auto reset_ranges(auto& ctx) -> void; - public: [[nodiscard]] static auto to_string() -> bstring; +#line 431 "regex.h2" + private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 405 "regex.h2" +#line 459 "regex.h2" }; +// Regex syntax: *, +, or ? Example: aa* +// template class special_range_matcher_logic: public range_matcher_logic { public: [[nodiscard]] static auto to_string() -> auto; @@ -463,30 +513,87 @@ template public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 410 "regex.h2" +#line 466 "regex.h2" }; -#line 413 "regex.h2" +//----------------------------------------------------------------------- +// +// Regular expression implementation. +// +//----------------------------------------------------------------------- +// + +// Regular expression implementation +template class regular_expression { + + public: template using context = match_context; + + private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto; + +#line 489 "regex.h2" + // TODO: Named multiple return has problems with templates. + public: template class search_return { + public: bool matched; + public: context ctx; + + public: explicit search_return(cpp2::in matched_, context const& ctx_); + public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(search_return const&) -> void = delete; + + +#line 498 "regex.h2" + }; + + public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto; + public: [[nodiscard]] auto match(cpp2::in> str, auto const& start) const& -> auto; + public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto; + public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return; + +#line 510 "regex.h2" + public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto; + public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto; + public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto; + public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return; + +#line 532 "regex.h2" + public: [[nodiscard]] auto to_string() const& -> auto; + public: regular_expression() = default; + public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(regular_expression const&) -> void = delete; + +#line 533 "regex.h2" +}; + +//----------------------------------------------------------------------- +// +// Parser for regular expression. +// +//----------------------------------------------------------------------- +// + class regex_parser_state { + + // Current list of matchers public: std::vector cur_match_list {}; + + /// List of alternate matcher lists. E.g. ab|cd|xy public: std::vector> alternate_match_lists {}; - public: auto start_new_list() & -> void; + public: auto next_alternative() & -> void; -#line 423 "regex.h2" +#line 556 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 428 "regex.h2" +#line 561 "regex.h2" public: auto add(auto const& matcher) & -> void; -#line 432 "regex.h2" public: auto wrap_last(auto const& matcher) & -> void; -#line 439 "regex.h2" +#line 570 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 443 "regex.h2" +#line 574 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -497,70 +604,80 @@ template class regex_parser { private: Error_out error_out; - private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", "lower", "print", "punct", "space", "upper", "word", "xdigit"}; + private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", + "lower", "print", "punct", "space", "upper", "word", "xdigit"}; public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 460 "regex.h2" +#line 592 "regex.h2" + // State management functions + // public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 466 "regex.h2" +#line 600 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 470 "regex.h2" +#line 604 "regex.h2" + // Misc functions + // public: auto error(cpp2::in message) & -> void; -#line 474 "regex.h2" +#line 610 "regex.h2" + public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto; + +#line 617 "regex.h2" + public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; + + public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; + +#line 636 "regex.h2" + public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; + +#line 648 "regex.h2" + // Parsing functions + // + public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 481 "regex.h2" +#line 658 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 495 "regex.h2" +#line 671 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 503 "regex.h2" +#line 679 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 598 "regex.h2" +#line 775 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 633 "regex.h2" +#line 810 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 656 "regex.h2" +#line 833 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 665 "regex.h2" +#line 842 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 707 "regex.h2" +#line 903 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 732 "regex.h2" +#line 928 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 753 "regex.h2" - private: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; - -#line 765 "regex.h2" - public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; - -#line 768 "regex.h2" - public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; - -#line 789 "regex.h2" +#line 949 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 798 "regex.h2" +#line 959 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 807 "regex.h2" +#line 968 "regex.h2" } } @@ -574,23 +691,56 @@ namespace cpp2 { namespace regex { -#line 36 "regex.h2" - template auto match_context::set_group_start(auto const& pos, auto const& start) & -> void{ - CPP2_ASSERT_IN_BOUNDS(groups, pos).start = start; +#line 46 "regex.h2" + template match_context::match_context(Iter const& begin_, Iter const& end_) + : begin{ begin_ } + , end{ end_ }{ + +#line 49 "regex.h2" + } + + template match_context::match_context(match_context const& that) + : begin{ that.begin } + , end{ that.end } + , groups{ that.groups }{} +#line 51 "regex.h2" + template auto match_context::operator=(match_context const& that) -> match_context& { + begin = that.begin; + end = that.end; + groups = that.groups; + return *this; } +#line 51 "regex.h2" + template match_context::match_context(match_context&& that) noexcept + : begin{ std::move(that).begin } + , end{ std::move(that).end } + , groups{ std::move(that).groups }{} +#line 51 "regex.h2" + template auto match_context::operator=(match_context&& that) noexcept -> match_context& { + begin = std::move(that).begin; + end = std::move(that).end; + groups = std::move(that).groups; + return *this; } + +#line 55 "regex.h2" + template [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group); } + + template auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{ + CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos; + CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true; } - template auto match_context::set_group_end(auto const& pos, auto const& end) & -> void{ - CPP2_ASSERT_IN_BOUNDS(groups, pos).end = end; - CPP2_ASSERT_IN_BOUNDS(groups, pos).matched = true; + template auto match_context::set_group_invalid(auto const& group) & -> void{ + CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false; } - template auto match_context::set_group_invalid(auto const& pos) & -> void{ - CPP2_ASSERT_IN_BOUNDS(groups, pos).matched = false; + template auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{ + CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos; } - template [[nodiscard]] auto match_context::get_group(auto const& pos) & -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, pos); } + template [[nodiscard]] auto match_context::size() const& -> auto { return max_groups; } - template [[nodiscard]] auto match_context::print_ranges(auto const& begin) const& -> bstring{ +#line 74 "regex.h2" + template [[nodiscard]] auto match_context::print_ranges() const& -> bstring{ bstring r {""}; for ( auto const& cur : groups ) { if (cur.matched) { @@ -604,109 +754,88 @@ namespace regex { return r; } -#line 67 "regex.h2" - template template [[nodiscard]] auto matcher_list::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_select(begin, cur, end, ctx); } +#line 95 "regex.h2" + template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx); } - template template [[nodiscard]] auto matcher_list::match_combine(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { - return match_select(begin, cur, end, ctx); } + template template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { + return match_select(cur, ctx); } - template template [[nodiscard]] auto matcher_list::match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { - return First::match(begin, cur, end, ctx, matcher_list()); } - template template [[nodiscard]] auto matcher_list::match_select(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx) -> auto { return match_return(true, cur); } + template template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { + return First::match(cur, ctx, matcher_list()); } + template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur); } - template auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } - template [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); } + template auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } + template [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); } -#line 85 "regex.h2" - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, context& ctx) const& -> bool{ - auto cur {CPP2_UFCS(begin)(str)}; - auto end {str.end()}; - for( ; true; (++cur) ) { - if (Matcher::match(cur, cur, end, ctx).matched) { - return true; - } +#line 121 "regex.h2" + template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } + template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } - if (cur == end) { - break; - } - } +#line 129 "regex.h2" + template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } + template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } - return false; - } +#line 136 "regex.h2" + template [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } + template [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } - template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } +#line 143 "regex.h2" + template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c)); } + template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } -#line 106 "regex.h2" - template template [[nodiscard]] auto alternative_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return match_all(begin, cur, end, ctx, Other()); } - template template [[nodiscard]] auto alternative_matcher_logic::match_all(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> match_return{ - auto r {First::match(begin, cur, end, ctx, Tail())}; +#line 150 "regex.h2" + template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } + template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } + +#line 188 "regex.h2" + template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_all(cur, ctx, tail); } + template auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } + template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. + + template template [[nodiscard]] auto alternative_matcher_logic::match_all(auto const& cur, auto& ctx, auto const& tail) -> auto{ + auto r {First::match(cur, ctx, tail)}; if (r.matched) { return r; }else { First::reset_ranges(ctx); - if constexpr (0 != sizeof...(Other)) { - return match_all(begin, cur, end, ctx, Tail()); + if constexpr (0 != sizeof...(Next)) { + return match_all(cur, ctx, tail); }else { - return match_return(false, end); + return match_return(false, ctx.end); } } } - template auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } - - template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. - -#line 129 "regex.h2" - template template [[nodiscard]] auto any_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - if (cur != end) { - return Other::match(begin, cur + 1, end, ctx); +#line 212 "regex.h2" + template template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + if (cur != ctx.end) { + return Other::match(cur + 1, ctx); }else { - return match_return(false, end); + return match_return(false, ctx.end); } } template auto any_matcher_logic::reset_ranges(auto& ctx) -> void{} + template [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); } - template [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); } - -#line 144 "regex.h2" - template template [[nodiscard]] auto char_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - if (cur != end && *cpp2::assert_not_null(cur) == C) { - return Other::match(begin, cur + 1, end, ctx); +#line 228 "regex.h2" + template template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) { + return Other::match(cur + 1, ctx); }else { - return match_return(false, end); + return match_return(false, ctx.end); } } template auto char_matcher_logic::reset_ranges(auto& ctx) -> void{} - template [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); } - -#line 157 "regex.h2" - template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } - template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } - -#line 163 "regex.h2" - template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } - template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } - -#line 168 "regex.h2" - template [[nodiscard]] auto and_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } - template [[nodiscard]] auto and_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } + template [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); } -#line 173 "regex.h2" - template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c)); } - template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } - -#line 178 "regex.h2" - template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } - template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } - -#line 203 "regex.h2" - template template [[nodiscard]] auto class_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - if (cur != end && negate != match_any(*cpp2::assert_not_null(cur))) { - return Other::match(begin, cur + 1, end, ctx); +#line 244 "regex.h2" + template template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) { + return Other::match(cur + 1, ctx); }else { - return match_return(false, end); + return match_return(false, ctx.end); } } @@ -723,6 +852,7 @@ namespace regex { } template auto class_matcher_logic::reset_ranges(auto& ctx) -> void{} + template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ bstring r {"["}; if (negate) { @@ -734,12 +864,12 @@ namespace regex { return r; } -#line 239 "regex.h2" +#line 284 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C); } -#line 243 "regex.h2" - template template [[nodiscard]] auto group_matcher_start_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - auto r {Other::match(begin, cur, end, ctx)}; +#line 290 "regex.h2" + template template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + auto r {Other::match(cur, ctx)}; if (r.matched) { CPP2_UFCS(set_group_start)(ctx, group, cur); }else { @@ -747,7 +877,9 @@ namespace regex { } return r; } - template auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{CPP2_UFCS(set_group_invalid)(ctx, group); } + + template auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group); } + template [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{ if (group != 0) { return "("; @@ -757,15 +889,17 @@ namespace regex { } } -#line 264 "regex.h2" - template template [[nodiscard]] auto group_matcher_end_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - auto r {Other::match(begin, cur, end, ctx)}; +#line 313 "regex.h2" + template template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + auto r {Other::match(cur, ctx)}; if (r.matched) { CPP2_UFCS(set_group_end)(ctx, group, cur); } return r; } + template auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{} + template [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{ if (group != 0) { return ")"; @@ -775,57 +909,70 @@ namespace regex { } } -#line 283 "regex.h2" - template template [[nodiscard]] auto group_ref_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ +#line 336 "regex.h2" + template template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ auto g {CPP2_UFCS(get_group)(ctx, group)}; - for( ; g.start != g.end && cur != end; (++g.start, ++cur) ) { + for( ; g.start != g.end && cur != ctx.end; (++g.start, ++cur) ) { if (*cpp2::assert_not_null(g.start) != *cpp2::assert_not_null(cur)) { - return match_return(false, end); + return match_return(false, ctx.end); } } - return Other::match(begin, cur, end, ctx); + return Other::match(cur, ctx); } template auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{} - template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> bstring { return { "\\(" + cpp2::to_string(group) + ")" }; } + template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return "\\(" + cpp2::to_string(group) + ")"; } -#line 300 "regex.h2" - template template [[nodiscard]] auto line_end_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - if (cur == end || *cpp2::assert_not_null(cur) == '\n') { - return Other::match(begin, cur, end, ctx); +#line 357 "regex.h2" + template template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + if (cur == ctx.end || *cpp2::assert_not_null(cur) == '\n') { + return Other::match(cur, ctx); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } + template auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{} - template [[nodiscard]] auto line_end_matcher_logic::to_string() -> bstring { return "\\$"; } + template [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; } -#line 315 "regex.h2" - template template [[nodiscard]] auto line_start_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - if (cur == begin || *cpp2::assert_not_null((cur - 1)) == '\n') { - return Other::match(begin, cur, end, ctx); +#line 377 "regex.h2" + template template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + if (cur == ctx.begin || *cpp2::assert_not_null((cur - 1)) == '\n') { + return Other::match(cur, ctx); } else { - return match_return(false, end); + return match_return(false, ctx.end); } } template auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{} - template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } + template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 330 "regex.h2" - template template [[nodiscard]] auto list_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ - return List::match_combine(begin, cur, end, ctx, Other()); - } - template auto list_matcher_logic::reset_ranges(auto& ctx) -> void{List::reset_ranges(ctx); } - template [[nodiscard]] auto list_matcher_logic::to_string() -> auto { return List::to_string(); } +#line 393 "regex.h2" + template [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); } + template auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); } -#line 340 "regex.h2" - template template [[nodiscard]] auto range_matcher_logic::match(Iter const& begin, Iter const& cur, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> auto { - return match_greedy(0, begin, cur, cur, end, ctx, Other()); } + template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ + std::string r {M::to_string()}; + + if (min_count == max_count) { + r += ("{" + cpp2::to_string(min_count) + "}"); + } + else {if (min_count == -1) { + r += ("{," + cpp2::to_string(max_count) + "}"); + } + else {if (max_count == -1) { + r += ("{" + cpp2::to_string(min_count) + ",}"); + } + else { + r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"); + }}} + + return r; + } template [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{ if (-1 == max_count) {return true; } @@ -842,12 +989,13 @@ namespace regex { if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; } return true; } - template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& begin, Iter const& cur, Iter const& last_valid, Iter const& end, auto& ctx, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{ - auto r {M::match(begin, cur, end, ctx, matcher_list<>())}; + + template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ + auto r {M::match(cur, ctx, no_tail())}; if ( is_below_upper_bound(count) && r.matched && (is_below_lower_bound(count) || r.pos != cur)) { - auto inner {match_greedy(count + 1, begin, std::move(r).pos, cur, end, ctx, Other())}; + auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, Other())}; if (inner.matched) { return inner; @@ -856,48 +1004,82 @@ namespace regex { // No match from the recursion. Try to match our tail. if (is_in_range(count)) { - auto o {Other::match(begin, cur, end, ctx)}; + auto o {Other::match(cur, ctx)}; if (o.matched) { // Rematch M to set the groups. M::reset_ranges(ctx); - static_cast(M::match(begin, last_valid, end, ctx, matcher_list<>())); + static_cast(M::match(last_valid, ctx, no_tail())); } return o; } else { - return match_return(false, end); + return match_return(false, ctx.end); } } - template auto range_matcher_logic::reset_ranges(auto& ctx) -> void{M::reset_ranges(ctx); } - template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ - std::string r {M::to_string()}; - if (min_count == max_count) { - r += ("{" + cpp2::to_string(min_count) + "}"); - } - else {if (min_count == -1) { - r += ("{," + cpp2::to_string(max_count) + "}"); - } - else {if (max_count == -1) { - r += ("{" + cpp2::to_string(min_count) + ",}"); - } - else { - r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}"); - }}} +#line 465 "regex.h2" + template [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol; } - return r; +#line 480 "regex.h2" + template [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{ + if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) { + return CPP2_UFCS(begin)(str) + pos; + } + else { + return CPP2_UFCS(end)(str); + } } -#line 409 "regex.h2" - template [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol; } +#line 494 "regex.h2" + template template regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_) + : matched{ matched_ } + , ctx{ ctx_ }{ + +#line 497 "regex.h2" + } + +#line 500 "regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } + template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); } + template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); } + template template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{ + context ctx {start, end}; + + auto r {Matcher::match(start, ctx)}; + return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); + } + + template [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); } + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); } + template template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{ + auto matched {false}; + context ctx {start, end}; + + auto cur {start}; + for( ; true; (++cur) ) { + if (Matcher::match(cur, ctx).matched) { + matched = true; + break; + } + + if (cur == ctx.end) { + break; + } + } -#line 417 "regex.h2" - auto regex_parser_state::start_new_list() & -> void{ + return search_return(std::move(matched), std::move(ctx)); + } + + template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } + +#line 550 "regex.h2" + auto regex_parser_state::next_alternative() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); - static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(begin)(alternate_match_lists), std::move(new_list))); + static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list))); } auto regex_parser_state::swap(regex_parser_state& t) & -> void{ @@ -905,12 +1087,10 @@ namespace regex { std::swap(alternate_match_lists, t.alternate_match_lists); } - auto regex_parser_state::add(auto const& matcher) & -> void{ - CPP2_UFCS(push_back)(cur_match_list, matcher); - } + auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher); } auto regex_parser_state::wrap_last(auto const& matcher) & -> void{ - std::string last {CPP2_UFCS(back)(cur_match_list)}; + auto last {CPP2_UFCS(back)(cur_match_list)}; CPP2_UFCS(back)(cur_match_list) = matcher(last); static_cast(matcher); static_cast(std::move(last)); @@ -918,14 +1098,15 @@ namespace regex { [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 455 "regex.h2" +#line 587 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 458 "regex.h2" +#line 590 "regex.h2" } +#line 594 "regex.h2" template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ regex_parser_state old_state {}; CPP2_UFCS(swap)(old_state, cur_state); @@ -936,34 +1117,73 @@ namespace regex { cur_state = old_state; } +#line 606 "regex.h2" template auto regex_parser::error(cpp2::in message) & -> void{ error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message))); } + template [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{ + auto sep {", "}; + if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; } + + return "::cpp2::regex::" + cpp2::to_string(name) + ""; + } + + template [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list)); } + + template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ + if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } + + if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) { + CPP2_UFCS(next_alternative)(cur_state); + } + + std::string list {""}; + std::string separator {""}; + for ( auto const& cur : cur_state.alternate_match_lists ) { + list += separator + create_matcher_from_list(cur); + separator = ", "; + } + + return create_matcher("alternative_matcher_logic", std::move(list)); + } + + template [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ + std::string r {""}; + + std::string separator {""}; + for ( auto const& cur : list ) { + r += separator + cur; + separator = ", "; + } + + return r; + } + +#line 651 "regex.h2" template [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{ if (c != '|') {return false; } - CPP2_UFCS(start_new_list)(cur_state); + CPP2_UFCS(next_alternative)(cur_state); return true; } template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ - auto r {false}; if (c == '^') { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_start_matcher_logic"); - r = true; + CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "")); + return true; } else {if (c == '$') { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); - r = true; + CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "")); + return true; }} - return r; + return false; } template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ if (c == '.') { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::any_matcher_logic"); + CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", "")); return true; } return false; @@ -989,8 +1209,8 @@ namespace regex { else {return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); } }}; + // First step: parse until the end bracket and push single chars, ranges or groups on the class stack. auto negate {false}; - auto first {true}; auto range {false}; while( next_item() & (c_cur != ']' || first) ) { @@ -1046,21 +1266,22 @@ namespace regex { CPP2_UFCS(push_back)(classes, "-"); } + // Second step: Wrap the item on the class stack with corresponding class implementation. for ( auto& cur : classes ) { if (CPP2_UFCS(starts_with)(cur, "[:")) { auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; - cur = { "::cpp2::regex::" + cpp2::to_string(name) + "_class" }; + cur = create_matcher((cpp2::to_string(name) + "_class"), ""); } else {if (1 != CPP2_UFCS(size)(cur)) { - cur = { "::cpp2::regex::range_class_entry" }; + cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS(cur, 2)) + "'")); } else { - cur = { "::cpp2::regex::single_class_entry" }; + cur = create_matcher("single_class_entry", ("'" + cpp2::to_string(cur) + "'")); }} } auto inner {join(std::move(classes))}; - CPP2_UFCS(add)(cur_state, ("::cpp2::regex::class_matcher_logic")); + CPP2_UFCS(add)(cur_state, create_matcher("class_matcher_logic", (cpp2::to_string(std::move(negate)) + ", " + cpp2::to_string(std::move(inner))))); return true; } @@ -1078,19 +1299,19 @@ namespace regex { if (cpp2::cmp_greater_eq(group_id,named_groups)) {error("Group reference is used before the group is declared."); } - CPP2_UFCS(add)(cur_state, ("::cpp2::regex::group_ref_matcher_logic")); + CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id))))); } else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) { if (c_next == '$') { - // TODO: Provide proper escape for cppfront capture . - CPP2_UFCS(add)(cur_state, "::cpp2::regex::line_end_matcher_logic"); + // TODO: Provide proper escape for cppfront capture + CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "")); } else { - CPP2_UFCS(add)(cur_state, ("::cpp2::regex::escaped_char_matcher_logic")); + CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "'"))); } } else {if ('\\' == std::move(c_next)) { - CPP2_UFCS(add)(cur_state, "::cpp2::regex::escaped_char_matcher_logic"); + CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\'")); } else { error("Unknown escape."); @@ -1114,9 +1335,9 @@ namespace regex { restore_state(std::move(old_state)); std::vector v { - ("::cpp2::regex::group_matcher_start_logic"), + create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number))), std::move(inner), - ("::cpp2::regex::group_matcher_end_logic")}; + create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number))))}; CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v))); return true; @@ -1124,7 +1345,7 @@ namespace regex { template [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{ if (c == '\'') { - CPP2_UFCS(add)(cur_state, ("::cpp2::regex::char_matcher_logic")); + CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'"))); return true; } @@ -1133,6 +1354,16 @@ namespace regex { template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ + auto to_int {[&](auto const& str) mutable -> int{ + // TODO: Add exception handling. + // try { + return std::stoi(str); + // } catch (_) { + // error("Could not convert range argument '(inner)$' to int."); + // } + // return 0; + }}; + if (c != '{') {return false; } if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element."); } @@ -1143,12 +1374,16 @@ namespace regex { if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); } std::string min_count {"-1"}; + int min_count_number {0}; std::string max_count {"-1"}; + int max_count_number {std::numeric_limits::max()}; size_t sep {CPP2_UFCS(find)(inner, ",")}; if (sep == std::string::npos) { min_count = inner; max_count = inner; + min_count_number = std::move(to_int)(inner); + max_count_number = min_count_number; } else { std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; @@ -1159,15 +1394,20 @@ namespace regex { } if (!(CPP2_UFCS(empty)(inner_first))) { - min_count = std::move(inner_first); + min_count = inner_first; + min_count_number = to_int(std::move(inner_first)); } if (!(CPP2_UFCS(empty)(inner_last))) { - max_count = std::move(inner_last); + max_count = inner_last; + max_count_number = std::move(to_int)(std::move(inner_last)); } } - // TODO: Check 0 <=n <= m - CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return "::cpp2::regex::range_matcher_logic"; }); + if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) { + error(("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string(std::move(min_count_number)) + " <= " + cpp2::to_string(std::move(max_count_number)))); + } + + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2))); }); pos = std::move(end); return true; @@ -1194,7 +1434,7 @@ namespace regex { error(("'" + cpp2::to_string(c) + "' without previous element.")); } - CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return "::cpp2::regex::special_range_matcher_logic"; }); + CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", '" + cpp2::to_string(_3) + "'")); }); return true; } @@ -1214,57 +1454,22 @@ namespace regex { if (is_range(c)) {continue; } if (is_special_range(c)) {continue; } - // No special char push a character match - CPP2_UFCS(add)(cur_state, ("::cpp2::regex::char_matcher_logic")); + // No special char, push a character match + CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "'"))); } } - template [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ - std::string r {""}; - - std::string seperator {""}; - for ( auto const& cur : list ) { - r += seperator + cur; - seperator = ", "; - } - - return r; - } - - template [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { - return "::cpp2::regex::list_matcher_logic>"; } - - template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ - if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } - - std::string matcher {"::cpp2::regex::alternative_matcher_logic void{ - *cpp2::assert_not_null(_1) += *cpp2::assert_not_null(_2) + create_matcher_from_list(list); - *cpp2::assert_not_null(_2) = ", "; - }}; - - auto cur {CPP2_UFCS(rbegin)(cur_state.alternate_match_lists)}; - for( ; cur != CPP2_UFCS(rend)(cur_state.alternate_match_lists); (++cur) ) { - add(*cpp2::assert_not_null(cur)); - } - if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {std::move(add)(cur_state.cur_match_list); } - matcher += ">"; - - return matcher; - } - template [[nodiscard]] auto regex_parser::parse() & -> std::string{ - parse_until('\0'); auto inner {create_matcher_from_state()}; - inner = { "::cpp2::regex::group_matcher_start_logic, " + cpp2::to_string(inner) + ", ::cpp2::regex::group_matcher_end_logic" }; - return { "::cpp2::regex::regular_expression>" }; + auto start {create_matcher("group_matcher_start_logic", "0")}; + auto end {create_matcher("group_matcher_end_logic", "0")}; + auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; + return create_matcher("regular_expression", (cpp2::to_string(named_groups) + ", " + cpp2::to_string(std::move(list)))); } -#line 800 "regex.h2" +#line 961 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; From c0738a48b982d8b01072668cab2df1b87a9d775f Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Wed, 17 Jan 2024 21:29:54 +0100 Subject: [PATCH 042/161] Addressed review comments. In addition: - Removed TODO in reflect.h2. - Reworked name handling in regex_gen. --- source/reflect.h | 34 ++++++++++++---------------------- source/reflect.h2 | 34 ++++++++++++++++------------------ 2 files changed, 28 insertions(+), 40 deletions(-) diff --git a/source/reflect.h b/source/reflect.h index 7f4ced014f..584bd06619 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -39,7 +39,7 @@ class alias_declaration; #line 963 "reflect.h2" class value_member_info; -#line 1546 "reflect.h2" +#line 1536 "reflect.h2" } } @@ -770,7 +770,7 @@ auto print(cpp2::in t) -> void; // auto regex_gen(meta::type_declaration& t) -> void; -#line 1436 "reflect.h2" +#line 1426 "reflect.h2" //----------------------------------------------------------------------- // // apply_metafunctions @@ -781,7 +781,7 @@ auto regex_gen(meta::type_declaration& t) -> void; auto const& error ) -> bool; -#line 1546 "reflect.h2" +#line 1536 "reflect.h2" } } @@ -1908,13 +1908,14 @@ auto print(cpp2::in t) -> void #line 1381 "reflect.h2" auto regex_gen(meta::type_declaration& t) -> void { - bool has_default {false}; + auto has_default {false}; + + auto prefix {"regex"}; std::map expressions {}; for ( auto& m : CPP2_UFCS(get_member_objects)(t) ) { std::string name {CPP2_UFCS(name)(m)}; - std::string prefix {"regex"}; if (CPP2_UFCS(starts_with)(name, prefix)) { @@ -1923,13 +1924,7 @@ auto regex_gen(meta::type_declaration& t) -> void } CPP2_UFCS(mark_for_removal_from_enclosing_type)(m); - name = CPP2_UFCS(substr)(name, CPP2_UFCS(size)(prefix)); - - if (CPP2_UFCS(starts_with)(name, "_")) { - name = CPP2_UFCS(substr)(name, 1); - } - - if (CPP2_UFCS(empty)(name)) { + if (name == prefix) { if (has_default) { CPP2_UFCS(error)(t, "Type can only contain one default named regular expression."); } @@ -1937,7 +1932,7 @@ auto regex_gen(meta::type_declaration& t) -> void } std::string expr {CPP2_UFCS(initializer)(m)}; - if (!((CPP2_UFCS(starts_with)(expr, "\"") && CPP2_UFCS(ends_with)(expr, "")))) { + if (!((CPP2_UFCS(starts_with)(expr, "\"") && CPP2_UFCS(ends_with)(expr, "\"")))) { CPP2_UFCS(error)(t, ("Unknown string format '" + cpp2::to_string(expr) + "'")); } expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2); @@ -1949,18 +1944,13 @@ auto regex_gen(meta::type_declaration& t) -> void CPP2_UFCS(remove_marked_members)(t); for ( auto const& expr : expressions ) { - std::string regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; - - std::string name {expr.first}; - if (!(CPP2_UFCS(empty)(name))) { - name = "_" + name; - } + auto regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message); })}; - CPP2_UFCS(add_member)(t, ("regex" + cpp2::to_string(name) + ": " + cpp2::to_string(regular_expression) + " = ();")); + CPP2_UFCS(add_member)(t, (cpp2::to_string(expr.first) + ": " + cpp2::to_string(regular_expression) + " = ();")); } } -#line 1440 "reflect.h2" +#line 1430 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -2066,7 +2056,7 @@ auto regex_gen(meta::type_declaration& t) -> void return true; } -#line 1546 "reflect.h2" +#line 1536 "reflect.h2" } } diff --git a/source/reflect.h2 b/source/reflect.h2 index 989ff1cd5f..29862e90d3 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -1376,17 +1376,26 @@ print: (t: meta::type_declaration) = // // regex - creates regular expressions from members // -// TODO +// Each member that starts with `regex` is replaced by a regular expression +// of the initializer string. E.g.: +// ``` +// regex := "ab"; +// ``` +// is replaced with +// ``` +// regex := ::cpp2::regex::regular_expression<...>; +// ``` // regex_gen: (inout t: meta::type_declaration) = { - has_default: bool = false; + has_default: = false; + prefix:= "regex"; + expressions: std::map = (); for t.get_member_objects() do (inout m) { name: std::string = m.name(); - prefix: std::string = "regex"; if name.starts_with(prefix) { @@ -1395,13 +1404,7 @@ regex_gen: (inout t: meta::type_declaration) = } m.mark_for_removal_from_enclosing_type(); - name = name.substr(prefix.size()); - - if name.starts_with("_") { - name = name.substr(1); - } - - if name.empty() { + if name == prefix { if has_default { t.error("Type can only contain one default named regular expression."); } @@ -1409,7 +1412,7 @@ regex_gen: (inout t: meta::type_declaration) = } expr: std::string = m.initializer(); - if !(expr.starts_with("\"") && expr.ends_with("")) { + if !(expr.starts_with("\"") && expr.ends_with("\"")) { t.error("Unknown string format '(expr)$'"); } expr = expr.substr(1, expr.size() - 2); @@ -1421,14 +1424,9 @@ regex_gen: (inout t: meta::type_declaration) = t.remove_marked_members(); for expressions do (expr) { - regular_expression: std::string = ::cpp2::regex::generate_template(expr.second, :(message: _) = t$.error(message);); - - name: std::string = expr.first; - if !name.empty() { - name = "_" + name; - } + regular_expression:= ::cpp2::regex::generate_template(expr.second, :(message: _) = t$.error(message);); - t.add_member("regex(name)$: (regular_expression)$ = ();"); + t.add_member("(expr.first)$: (regular_expression)$ = ();"); } } From 628c7917a29b3b50608319e669c6baf679860193 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Mon, 22 Jan 2024 10:21:37 +0100 Subject: [PATCH 043/161] Review updates. - Moved 'source/regex.h' to '../include/cpp2regex.h'. - Created 'source/cpp2regex.h' - Added a utility function for 'is_escaped'. --- source/regex.h => include/cpp2regex.h | 74 +++++- include/cpp2util.h | 2 +- include/string_util.h | 6 + .../test-results/pure2-regex.cpp2.output | 2 + source/cpp2regex.h | 1 + source/reflect.h | 238 +++++++++--------- source/reflect.h2 | 4 +- 7 files changed, 206 insertions(+), 121 deletions(-) rename source/regex.h => include/cpp2regex.h (97%) create mode 100644 regression-tests/test-results/pure2-regex.cpp2.output create mode 100644 source/cpp2regex.h diff --git a/source/regex.h b/include/cpp2regex.h similarity index 97% rename from source/regex.h rename to include/cpp2regex.h index e3af6b88fc..05407a8300 100644 --- a/source/regex.h +++ b/include/cpp2regex.h @@ -1,6 +1,6 @@ -#ifndef REGEX_H_CPP2 -#define REGEX_H_CPP2 +#ifndef ___INCLUDE_CPP2REGEX_H_CPP2 +#define ___INCLUDE_CPP2REGEX_H_CPP2 //=== Cpp2 type declarations ==================================================== @@ -699,6 +699,7 @@ namespace regex { #line 49 "regex.h2" } +#line 51 "regex.h2" template match_context::match_context(match_context const& that) : begin{ that.begin } , end{ that.end } @@ -724,19 +725,23 @@ namespace regex { #line 55 "regex.h2" template [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group); } +#line 57 "regex.h2" template auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos; CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true; } +#line 62 "regex.h2" template auto match_context::set_group_invalid(auto const& group) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false; } +#line 66 "regex.h2" template auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos; } +#line 70 "regex.h2" template [[nodiscard]] auto match_context::size() const& -> auto { return max_groups; } #line 74 "regex.h2" @@ -757,41 +762,54 @@ namespace regex { #line 95 "regex.h2" template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx); } +#line 97 "regex.h2" template template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { return match_select(cur, ctx); } +#line 100 "regex.h2" template template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return First::match(cur, ctx, matcher_list()); } +#line 102 "regex.h2" template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur); } +#line 104 "regex.h2" template auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } +#line 105 "regex.h2" template [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); } #line 121 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } +#line 122 "regex.h2" template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } #line 129 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } +#line 130 "regex.h2" template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } #line 136 "regex.h2" template [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } +#line 137 "regex.h2" template [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } #line 143 "regex.h2" template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c)); } +#line 144 "regex.h2" template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } #line 150 "regex.h2" template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } +#line 151 "regex.h2" template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } #line 188 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_all(cur, ctx, tail); } +#line 189 "regex.h2" template auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } +#line 190 "regex.h2" template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. +#line 192 "regex.h2" template template [[nodiscard]] auto alternative_matcher_logic::match_all(auto const& cur, auto& ctx, auto const& tail) -> auto{ auto r {First::match(cur, ctx, tail)}; if (r.matched) { @@ -816,7 +834,9 @@ namespace regex { } } +#line 220 "regex.h2" template auto any_matcher_logic::reset_ranges(auto& ctx) -> void{} +#line 221 "regex.h2" template [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); } #line 228 "regex.h2" @@ -827,7 +847,9 @@ namespace regex { return match_return(false, ctx.end); } } +#line 235 "regex.h2" template auto char_matcher_logic::reset_ranges(auto& ctx) -> void{} +#line 236 "regex.h2" template [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); } #line 244 "regex.h2" @@ -839,6 +861,7 @@ namespace regex { } } +#line 252 "regex.h2" template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ bool r {First::includes(c)}; @@ -851,8 +874,10 @@ namespace regex { return r; } +#line 264 "regex.h2" template auto class_matcher_logic::reset_ranges(auto& ctx) -> void{} +#line 266 "regex.h2" template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ bstring r {"["}; if (negate) { @@ -878,8 +903,10 @@ namespace regex { return r; } +#line 300 "regex.h2" template auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group); } +#line 302 "regex.h2" template [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{ if (group != 0) { return "("; @@ -898,8 +925,10 @@ namespace regex { return r; } +#line 321 "regex.h2" template auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{} +#line 323 "regex.h2" template [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{ if (group != 0) { return ")"; @@ -921,7 +950,9 @@ namespace regex { return Other::match(cur, ctx); } +#line 347 "regex.h2" template auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{} +#line 348 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return "\\(" + cpp2::to_string(group) + ")"; } #line 357 "regex.h2" @@ -935,7 +966,9 @@ namespace regex { } +#line 367 "regex.h2" template auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{} +#line 368 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; } #line 377 "regex.h2" @@ -948,13 +981,17 @@ namespace regex { } } +#line 386 "regex.h2" template auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{} +#line 387 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } #line 393 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); } +#line 394 "regex.h2" template auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); } +#line 396 "regex.h2" template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ std::string r {M::to_string()}; @@ -974,22 +1011,26 @@ namespace regex { return r; } +#line 415 "regex.h2" template [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{ if (-1 == max_count) {return true; } else {return cpp2::cmp_less(count,max_count); } } +#line 420 "regex.h2" template [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{ if (-1 == min_count) {return false; } else {return cpp2::cmp_less(count,min_count); } } +#line 425 "regex.h2" template [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{ if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; } if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; } return true; } +#line 431 "regex.h2" template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ auto r {M::match(cur, ctx, no_tail())}; if ( is_below_upper_bound(count) && r.matched && @@ -1042,8 +1083,11 @@ namespace regex { #line 500 "regex.h2" template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } +#line 501 "regex.h2" template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); } +#line 502 "regex.h2" template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); } +#line 503 "regex.h2" template template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{ context ctx {start, end}; @@ -1051,9 +1095,13 @@ namespace regex { return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); } +#line 510 "regex.h2" template [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } +#line 511 "regex.h2" template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); } +#line 512 "regex.h2" template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); } +#line 513 "regex.h2" template template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{ auto matched {false}; context ctx {start, end}; @@ -1073,6 +1121,7 @@ namespace regex { return search_return(std::move(matched), std::move(ctx)); } +#line 532 "regex.h2" template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } #line 550 "regex.h2" @@ -1082,13 +1131,16 @@ namespace regex { static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list))); } +#line 556 "regex.h2" auto regex_parser_state::swap(regex_parser_state& t) & -> void{ std::swap(cur_match_list, t.cur_match_list); std::swap(alternate_match_lists, t.alternate_match_lists); } +#line 561 "regex.h2" auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher); } +#line 563 "regex.h2" auto regex_parser_state::wrap_last(auto const& matcher) & -> void{ auto last {CPP2_UFCS(back)(cur_match_list)}; CPP2_UFCS(back)(cur_match_list) = matcher(last); @@ -1096,6 +1148,7 @@ namespace regex { static_cast(std::move(last)); } +#line 570 "regex.h2" [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } #line 587 "regex.h2" @@ -1113,6 +1166,7 @@ namespace regex { return old_state; } +#line 600 "regex.h2" template auto regex_parser::restore_state(cpp2::in old_state) & -> void{ cur_state = old_state; } @@ -1122,6 +1176,7 @@ namespace regex { error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message))); } +#line 610 "regex.h2" template [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{ auto sep {", "}; if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; } @@ -1129,8 +1184,10 @@ namespace regex { return "::cpp2::regex::" + cpp2::to_string(name) + ""; } +#line 617 "regex.h2" template [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list)); } +#line 619 "regex.h2" template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } @@ -1148,6 +1205,7 @@ namespace regex { return create_matcher("alternative_matcher_logic", std::move(list)); } +#line 636 "regex.h2" template [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ std::string r {""}; @@ -1168,6 +1226,7 @@ namespace regex { return true; } +#line 658 "regex.h2" template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ if (c == '^') { CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "")); @@ -1181,6 +1240,7 @@ namespace regex { return false; } +#line 671 "regex.h2" template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ if (c == '.') { CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", "")); @@ -1189,6 +1249,7 @@ namespace regex { return false; } +#line 679 "regex.h2" template [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{ if (c != '[') {return false; } @@ -1273,7 +1334,7 @@ namespace regex { cur = create_matcher((cpp2::to_string(name) + "_class"), ""); } else {if (1 != CPP2_UFCS(size)(cur)) { - cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS(cur, 2)) + "'")); + cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'")); } else { cur = create_matcher("single_class_entry", ("'" + cpp2::to_string(cur) + "'")); @@ -1285,6 +1346,7 @@ namespace regex { return true; } +#line 775 "regex.h2" template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ if (c != '\\') {return false; } @@ -1320,6 +1382,7 @@ namespace regex { return true; } +#line 810 "regex.h2" template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ if (c != '(') {return false; } @@ -1343,6 +1406,7 @@ namespace regex { return true; } +#line 833 "regex.h2" template [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{ if (c == '\'') { CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'"))); @@ -1352,6 +1416,7 @@ namespace regex { return false; } +#line 842 "regex.h2" template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ auto to_int {[&](auto const& str) mutable -> int{ @@ -1413,6 +1478,7 @@ namespace regex { return true; } +#line 903 "regex.h2" template [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{ std::string min_range {"0"}; std::string max_range {"-1"}; @@ -1438,6 +1504,7 @@ namespace regex { return true; } +#line 928 "regex.h2" template auto regex_parser::parse_until(cpp2::in term) & -> void{ for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) { char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; @@ -1459,6 +1526,7 @@ namespace regex { } } +#line 949 "regex.h2" template [[nodiscard]] auto regex_parser::parse() & -> std::string{ parse_until('\0'); diff --git a/include/cpp2util.h b/include/cpp2util.h index 9e3a96e206..d703e469d3 100644 --- a/include/cpp2util.h +++ b/include/cpp2util.h @@ -2041,7 +2041,7 @@ inline constexpr auto as_() -> decltype(auto) } -#include "../source/regex.h" +#include "cpp2regex.h" using cpp2::cpp2_new; diff --git a/include/string_util.h b/include/string_util.h index 2b8fd26764..628907b0ce 100644 --- a/include/string_util.h +++ b/include/string_util.h @@ -65,3 +65,9 @@ struct fixed_string { template fixed_string(const CharT (&)[N])->fixed_string; + +// Other utility functions. + +static inline bool is_escaped(std::string_view s) { + return s.starts_with("\"") && s.ends_with("\""); +} diff --git a/regression-tests/test-results/pure2-regex.cpp2.output b/regression-tests/test-results/pure2-regex.cpp2.output new file mode 100644 index 0000000000..ed8201eed4 --- /dev/null +++ b/regression-tests/test-results/pure2-regex.cpp2.output @@ -0,0 +1,2 @@ +pure2-regex.cpp2... ok (all Cpp2, passes safety checks) + diff --git a/source/cpp2regex.h b/source/cpp2regex.h new file mode 100644 index 0000000000..552c608d9b --- /dev/null +++ b/source/cpp2regex.h @@ -0,0 +1 @@ +#include "../include/cpp2regex.h" diff --git a/source/reflect.h b/source/reflect.h index 7697c0a730..a52af97081 100644 --- a/source/reflect.h +++ b/source/reflect.h @@ -39,7 +39,7 @@ class alias_declaration; #line 963 "reflect.h2" class value_member_info; -#line 1536 "reflect.h2" +#line 1544 "reflect.h2" } } @@ -66,7 +66,7 @@ class value_member_info; //=========================================================================== #include "parse.h" -#include "regex.h" +#include "cpp2regex.h" #line 21 "reflect.h2" namespace cpp2 { @@ -766,11 +766,19 @@ auto print(cpp2::in t) -> void; // // regex - creates regular expressions from members // -// TODO +// Each member that starts with `regex` is replaced by a regular expression +// of the initializer string. E.g.: +// ``` +// regex := "ab"; +// ``` +// is replaced with +// ``` +// regex := ::cpp2::regex::regular_expression<...>; +// ``` // auto regex_gen(meta::type_declaration& t) -> void; -#line 1426 "reflect.h2" +#line 1434 "reflect.h2" //----------------------------------------------------------------------- // // apply_metafunctions @@ -781,7 +789,7 @@ auto regex_gen(meta::type_declaration& t) -> void; auto const& error ) -> bool; -#line 1536 "reflect.h2" +#line 1544 "reflect.h2" } } @@ -819,10 +827,10 @@ namespace meta { metafunctions_used = CPP2_UFCS(empty)(args); } -#line 66 "reflect.h2" +#line 67 "reflect.h2" [[nodiscard]] auto compiler_services::get_metafunction_name() const& -> std::string_view { return metafunction_name; } -#line 68 "reflect.h2" +#line 69 "reflect.h2" [[nodiscard]] auto compiler_services::get_argument(cpp2::in index) & -> std::string{ metafunctions_used = true; if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less(_1,_2); }())) { @@ -831,16 +839,16 @@ namespace meta { return ""; } -#line 76 "reflect.h2" +#line 77 "reflect.h2" [[nodiscard]] auto compiler_services::get_arguments() & -> std::vector{ metafunctions_used = true; return metafunction_args; } -#line 81 "reflect.h2" +#line 82 "reflect.h2" [[nodiscard]] auto compiler_services::arguments_were_used() const& -> bool { return metafunctions_used; } -#line 83 "reflect.h2" +#line 84 "reflect.h2" [[nodiscard]] auto compiler_services::parse_statement( std::string_view source @@ -901,7 +909,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; }return std::move(ret.value()); } -#line 136 "reflect.h2" +#line 137 "reflect.h2" [[nodiscard]] auto compiler_services::position() const -> source_position { @@ -920,7 +928,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; } } -#line 156 "reflect.h2" +#line 157 "reflect.h2" auto compiler_services::error(cpp2::in msg) const& -> void { auto message {cpp2::as_(msg)}; @@ -936,7 +944,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')}; throw(std::runtime_error((" ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " - contract violation - see previous errors"))); } -#line 173 "reflect.h2" +#line 174 "reflect.h2" [[nodiscard]] auto compiler_services::has_handler() const& -> auto { return true; } compiler_services::~compiler_services() noexcept{} @@ -964,10 +972,10 @@ compiler_services::compiler_services(compiler_services const& that) if (cpp2::Default.has_handler() && !(n) ) { cpp2::Default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); } } -#line 240 "reflect.h2" +#line 241 "reflect.h2" [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*cpp2::assert_not_null(n))); } -#line 242 "reflect.h2" +#line 243 "reflect.h2" [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*cpp2::assert_not_null(n)), 0); } declaration_base::~declaration_base() noexcept{} @@ -987,104 +995,104 @@ declaration_base::declaration_base(declaration_base const& that) } -#line 262 "reflect.h2" - [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::assert_not_null(n))); } #line 263 "reflect.h2" - [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::assert_not_null(n))); } #line 264 "reflect.h2" - [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::assert_not_null(n))); } #line 265 "reflect.h2" + [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::assert_not_null(n))); } +#line 266 "reflect.h2" [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*cpp2::assert_not_null(n))); } -#line 267 "reflect.h2" - auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*cpp2::assert_not_null(n)))); } #line 268 "reflect.h2" - auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n)))); } + auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*cpp2::assert_not_null(n)))); } #line 269 "reflect.h2" + auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n)))); } +#line 270 "reflect.h2" auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*cpp2::assert_not_null(n)))); } -#line 271 "reflect.h2" - [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::assert_not_null(n))); } #line 272 "reflect.h2" - [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::assert_not_null(n))); } #line 273 "reflect.h2" + [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n))); } +#line 274 "reflect.h2" [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*cpp2::assert_not_null(n))); } -#line 275 "reflect.h2" - [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n))); } #line 276 "reflect.h2" + [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n))); } +#line 277 "reflect.h2" [[nodiscard]] auto declaration::has_name(cpp2::in s) const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n)), s); } -#line 278 "reflect.h2" +#line 279 "reflect.h2" [[nodiscard]] auto declaration::name() const& -> std::string_view{ if (has_name()) {return CPP2_UFCS(as_string_view)((*cpp2::assert_not_null(CPP2_UFCS(name)(*cpp2::assert_not_null(n))))); } else { return ""; } } -#line 283 "reflect.h2" +#line 284 "reflect.h2" [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*cpp2::assert_not_null(n))); } -#line 285 "reflect.h2" - [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::assert_not_null(n))); } #line 286 "reflect.h2" - [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::assert_not_null(n))); } #line 287 "reflect.h2" - [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::assert_not_null(n))); } #line 288 "reflect.h2" - [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::assert_not_null(n))); } #line 289 "reflect.h2" - [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::assert_not_null(n))); } #line 290 "reflect.h2" - [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::assert_not_null(n))); } #line 291 "reflect.h2" - [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::assert_not_null(n))); } #line 292 "reflect.h2" + [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::assert_not_null(n))); } +#line 293 "reflect.h2" [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n))); } -#line 294 "reflect.h2" - [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::assert_not_null(n))); } #line 295 "reflect.h2" - [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::assert_not_null(n))); } #line 296 "reflect.h2" + [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::assert_not_null(n))); } +#line 297 "reflect.h2" [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*cpp2::assert_not_null(n))); } -#line 298 "reflect.h2" +#line 299 "reflect.h2" [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*cpp2::assert_not_null(n))); } -#line 300 "reflect.h2" - [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this)); } #line 301 "reflect.h2" - [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); } + [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this)); } #line 302 "reflect.h2" - [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); } + [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); } #line 303 "reflect.h2" + [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); } +#line 304 "reflect.h2" [[nodiscard]] auto declaration::as_alias() const& -> alias_declaration { return alias_declaration(n, (*this)); } -#line 305 "reflect.h2" +#line 306 "reflect.h2" [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*cpp2::assert_not_null(n)).parent_declaration, (*this)); } -#line 307 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::assert_not_null(n))); } #line 308 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::assert_not_null(n))); } #line 309 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::assert_not_null(n))); } #line 310 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::assert_not_null(n))); } #line 311 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::assert_not_null(n))); } +#line 312 "reflect.h2" [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*cpp2::assert_not_null(n))); } -#line 313 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::assert_not_null(n))); } #line 314 "reflect.h2" - [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::assert_not_null(n))); } #line 315 "reflect.h2" + [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::assert_not_null(n))); } +#line 316 "reflect.h2" [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*cpp2::assert_not_null(n))); } -#line 317 "reflect.h2" +#line 318 "reflect.h2" [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*cpp2::assert_not_null(n))); } -#line 319 "reflect.h2" +#line 320 "reflect.h2" auto declaration::mark_for_removal_from_enclosing_type() & -> void { @@ -1111,69 +1119,69 @@ declaration::declaration(declaration const& that) if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } } -#line 345 "reflect.h2" - [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::assert_not_null(n)), s); } #line 346 "reflect.h2" - [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::assert_not_null(n)), s); } #line 347 "reflect.h2" - [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::assert_not_null(n)), s); } #line 348 "reflect.h2" - [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::assert_not_null(n)), s); } #line 349 "reflect.h2" - [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::assert_not_null(n)), s); } + [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::assert_not_null(n)), s); } #line 350 "reflect.h2" + [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::assert_not_null(n)), s); } +#line 351 "reflect.h2" [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::assert_not_null(n))); } -#line 352 "reflect.h2" +#line 353 "reflect.h2" [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::in s, cpp2::in pass) const& -> bool { return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::assert_not_null(n)), s, pass); } -#line 354 "reflect.h2" - [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::assert_not_null(n))); } #line 355 "reflect.h2" - [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::assert_not_null(n))); } #line 356 "reflect.h2" - [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(n))); } #line 357 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(n))); } #line 358 "reflect.h2" - [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::assert_not_null(n))); } #line 359 "reflect.h2" - [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::assert_not_null(n))); } #line 360 "reflect.h2" - [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::assert_not_null(n))); } #line 361 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::assert_not_null(n))); } #line 362 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::assert_not_null(n))); } #line 363 "reflect.h2" - [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::assert_not_null(n))); } #line 364 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::assert_not_null(n))); } #line 365 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::assert_not_null(n))); } #line 366 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::assert_not_null(n))); } #line 367 "reflect.h2" - [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::assert_not_null(n))); } #line 368 "reflect.h2" + [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::assert_not_null(n))); } +#line 369 "reflect.h2" [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*cpp2::assert_not_null(n))); } -#line 370 "reflect.h2" +#line 371 "reflect.h2" [[nodiscard]] auto function_declaration::is_copy_or_move() const& -> bool { return is_constructor_with_that() || is_assignment_with_that(); } -#line 372 "reflect.h2" - [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::assert_not_null(n))); } #line 373 "reflect.h2" - [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::assert_not_null(n))); } #line 374 "reflect.h2" - [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::assert_not_null(n))); } #line 375 "reflect.h2" + [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::assert_not_null(n))); } +#line 376 "reflect.h2" [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*cpp2::assert_not_null(n))); } -#line 377 "reflect.h2" +#line 378 "reflect.h2" [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*cpp2::assert_not_null(n))); } -#line 379 "reflect.h2" +#line 380 "reflect.h2" [[nodiscard]] auto function_declaration::get_parameters() const& -> std::vector { @@ -1184,16 +1192,16 @@ declaration::declaration(declaration const& that) return ret; } -#line 389 "reflect.h2" +#line 390 "reflect.h2" [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*cpp2::assert_not_null(n))); } -#line 391 "reflect.h2" +#line 392 "reflect.h2" auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n)))); } -#line 393 "reflect.h2" +#line 394 "reflect.h2" [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n))); } -#line 395 "reflect.h2" +#line 396 "reflect.h2" auto function_declaration::add_initializer(cpp2::in source) & -> void #line 399 "reflect.h2" @@ -1231,12 +1239,12 @@ declaration::declaration(declaration const& that) if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } } -#line 432 "reflect.h2" - [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::assert_not_null(n))); } #line 433 "reflect.h2" + [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::assert_not_null(n))); } +#line 434 "reflect.h2" [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*cpp2::assert_not_null(n))); } -#line 435 "reflect.h2" +#line 436 "reflect.h2" [[nodiscard]] auto object_declaration::type() const& -> std::string{ auto ret {CPP2_UFCS(object_type)((*cpp2::assert_not_null(n)))}; require(!(contains(ret, "(*ERROR*)")), @@ -1244,7 +1252,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 442 "reflect.h2" +#line 443 "reflect.h2" [[nodiscard]] auto object_declaration::initializer() const& -> std::string{ auto ret {CPP2_UFCS(object_initializer)((*cpp2::assert_not_null(n)))}; require(!(contains(ret, "(*ERROR*)")), @@ -1268,7 +1276,7 @@ declaration::declaration(declaration const& that) if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); } } -#line 468 "reflect.h2" +#line 469 "reflect.h2" auto type_declaration::reserve_names(cpp2::in name, auto&& ...etc) const& -> void { // etc is not declared ':string_view' for compatibility with GCC 10.x for ( @@ -1281,14 +1289,14 @@ declaration::declaration(declaration const& that) } } -#line 480 "reflect.h2" - [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::assert_not_null(n))); } #line 481 "reflect.h2" - [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::assert_not_null(n))); } + [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::assert_not_null(n))); } #line 482 "reflect.h2" + [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::assert_not_null(n))); } +#line 483 "reflect.h2" [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*cpp2::assert_not_null(n))); } -#line 484 "reflect.h2" +#line 485 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_functions() const& -> std::vector { @@ -1300,7 +1308,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 495 "reflect.h2" +#line 496 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_functions_needing_initializer() const& -> std::vector { @@ -1316,7 +1324,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 510 "reflect.h2" +#line 511 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_objects() const& -> std::vector { @@ -1327,7 +1335,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 520 "reflect.h2" +#line 521 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_types() const& -> std::vector { @@ -1338,7 +1346,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 530 "reflect.h2" +#line 531 "reflect.h2" [[nodiscard]] auto type_declaration::get_member_aliases() const& -> std::vector { @@ -1349,7 +1357,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 540 "reflect.h2" +#line 541 "reflect.h2" [[nodiscard]] auto type_declaration::get_members() const& -> std::vector { @@ -1360,7 +1368,7 @@ declaration::declaration(declaration const& that) return ret; } -#line 550 "reflect.h2" +#line 551 "reflect.h2" [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret #line 558 "reflect.h2" @@ -1377,7 +1385,7 @@ declaration::declaration(declaration const& that) inout_this_move_that.construct(std::move(declared).inout_this_move_that != nullptr); return { std::move(out_this_in_that.value()), std::move(out_this_move_that.value()), std::move(inout_this_in_that.value()), std::move(inout_this_move_that.value()) }; } -#line 565 "reflect.h2" +#line 566 "reflect.h2" auto type_declaration::add_member(cpp2::in source) & -> void { auto decl {parse_statement(source)}; @@ -1392,12 +1400,12 @@ declaration::declaration(declaration const& that) std::string("unexpected error while attempting to add member:\n") + source); } -#line 579 "reflect.h2" - auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*cpp2::assert_not_null(n))); } #line 580 "reflect.h2" + auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*cpp2::assert_not_null(n))); } +#line 581 "reflect.h2" auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*cpp2::assert_not_null(n))); } -#line 582 "reflect.h2" +#line 583 "reflect.h2" auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*cpp2::assert_not_null(n))); } type_declaration::type_declaration(type_declaration const& that) @@ -1568,14 +1576,14 @@ auto value(meta::type_declaration& t) -> void CPP2_UFCS(basic_value)(t); } -#line 855 "reflect.h2" +#line 856 "reflect.h2" auto weakly_ordered_value(meta::type_declaration& t) -> void { CPP2_UFCS(weakly_ordered)(t); CPP2_UFCS(basic_value)(t); } -#line 861 "reflect.h2" +#line 862 "reflect.h2" auto partially_ordered_value(meta::type_declaration& t) -> void { CPP2_UFCS(partially_ordered)(t); @@ -2010,12 +2018,12 @@ auto print(cpp2::in t) -> void std::cout << CPP2_UFCS(print)(t) << "\n"; } -#line 1381 "reflect.h2" +#line 1389 "reflect.h2" auto regex_gen(meta::type_declaration& t) -> void { auto has_default {false}; - auto prefix {"regex"}; + std::map expressions {}; for ( auto& m : CPP2_UFCS(get_member_objects)(t) ) @@ -2037,7 +2045,7 @@ auto regex_gen(meta::type_declaration& t) -> void } std::string expr {CPP2_UFCS(initializer)(m)}; - if (!((CPP2_UFCS(starts_with)(expr, "\"") && CPP2_UFCS(ends_with)(expr, "\"")))) { + if (!(CPP2_UFCS(is_escaped)(expr))) { CPP2_UFCS(error)(t, ("Unknown string format '" + cpp2::to_string(expr) + "'")); } expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2); @@ -2055,7 +2063,7 @@ auto regex_gen(meta::type_declaration& t) -> void } } -#line 1430 "reflect.h2" +#line 1438 "reflect.h2" [[nodiscard]] auto apply_metafunctions( declaration_node& n, type_declaration& rtype, @@ -2161,7 +2169,7 @@ auto regex_gen(meta::type_declaration& t) -> void return true; } -#line 1536 "reflect.h2" +#line 1544 "reflect.h2" } } diff --git a/source/reflect.h2 b/source/reflect.h2 index 29862e90d3..fc552ad0ea 100644 --- a/source/reflect.h2 +++ b/source/reflect.h2 @@ -16,7 +16,7 @@ //=========================================================================== #include "parse.h" -#include "regex.h" +#include "cpp2regex.h" cpp2: namespace = { @@ -1412,7 +1412,7 @@ regex_gen: (inout t: meta::type_declaration) = } expr: std::string = m.initializer(); - if !(expr.starts_with("\"") && expr.ends_with("\"")) { + if !expr.is_escaped() { t.error("Unknown string format '(expr)$'"); } expr = expr.substr(1, expr.size() - 2); From c3e28fe3f06006ff967d9ad6b21202a89b6d317a Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Thu, 25 Jan 2024 08:17:41 +0100 Subject: [PATCH 044/161] Removed static annotation. --- include/string_util.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/string_util.h b/include/string_util.h index 628907b0ce..bbe897c6a7 100644 --- a/include/string_util.h +++ b/include/string_util.h @@ -6,41 +6,41 @@ // From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring // trim from start (in place) -static inline void ltrim(std::string &s) { +inline void ltrim(std::string &s) { s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) { return !std::isspace(ch); })); } // trim from end (in place) -static inline void rtrim(std::string &s) { +inline void rtrim(std::string &s) { s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { return !std::isspace(ch); }).base(), s.end()); } // trim from both ends (in place) -static inline void trim(std::string &s) { +inline void trim(std::string &s) { rtrim(s); ltrim(s); } // trim from start (copying) -static inline std::string ltrim_copy(std::string_view s) { +inline std::string ltrim_copy(std::string_view s) { std::string t(s); ltrim(t); return t; } // trim from end (copying) -static inline std::string rtrim_copy(std::string_view s) { +inline std::string rtrim_copy(std::string_view s) { std::string t(s); rtrim(t); return t; } // trim from both ends (copying) -static inline std::string trim_copy(std::string_view s) { +inline std::string trim_copy(std::string_view s) { std::string t(s); trim(t); return t; @@ -68,6 +68,6 @@ fixed_string(const CharT (&)[N])->fixed_string; // Other utility functions. -static inline bool is_escaped(std::string_view s) { +inline bool is_escaped(std::string_view s) { return s.starts_with("\"") && s.ends_with("\""); } From 5686639a710c913582ee84b190858b76fea48cd6 Mon Sep 17 00:00:00 2001 From: Max Sagebaum Date: Fri, 26 Jan 2024 18:37:46 +0100 Subject: [PATCH 045/161] Added greedy matching for alternatives. --- include/cpp2regex.h | 599 ++++++++++++++++++++++++++------------------ source/regex.h2 | 107 +++++++- 2 files changed, 459 insertions(+), 247 deletions(-) diff --git a/include/cpp2regex.h b/include/cpp2regex.h index 05407a8300..b5f788dbbd 100644 --- a/include/cpp2regex.h +++ b/include/cpp2regex.h @@ -24,80 +24,84 @@ template class match_return; #line 39 "regex.h2" -template class match_context; +template class match_context; -#line 94 "regex.h2" +#line 103 "regex.h2" template class matcher_list; -#line 119 "regex.h2" +#line 130 "regex.h2" template class single_class_entry; -#line 127 "regex.h2" +#line 138 "regex.h2" template class range_class_entry; -#line 135 "regex.h2" +#line 146 "regex.h2" template class combined_class_entry; -#line 142 "regex.h2" +#line 153 "regex.h2" template class list_class_entry; -#line 149 "regex.h2" +#line 160 "regex.h2" template class named_class_entry; -#line 186 "regex.h2" -template class alternative_matcher_logic; +#line 196 "regex.h2" +template class extract_position_helper; + + +#line 213 "regex.h2" +template class alternative_matcher_logic; -#line 210 "regex.h2" +#line 293 "regex.h2" template class any_matcher_logic; -#line 226 "regex.h2" +#line 309 "regex.h2" template class char_matcher_logic; -#line 242 "regex.h2" +#line 325 "regex.h2" template class class_matcher_logic; -#line 280 "regex.h2" +#line 363 "regex.h2" template class escaped_char_matcher_logic; -#line 289 "regex.h2" +#line 372 "regex.h2" template class group_matcher_start_logic; -#line 312 "regex.h2" +#line 395 "regex.h2" template class group_matcher_end_logic; -#line 335 "regex.h2" +#line 418 "regex.h2" template class group_ref_matcher_logic; -#line 355 "regex.h2" +#line 438 "regex.h2" template class line_end_matcher_logic; -#line 375 "regex.h2" +#line 458 "regex.h2" template class line_start_matcher_logic; -#line 391 "regex.h2" +#line 474 "regex.h2" template class range_matcher_logic; -#line 463 "regex.h2" +#line 546 "regex.h2" template class special_range_matcher_logic; -#line 476 "regex.h2" -template class regular_expression; +#line 559 "regex.h2" +template class regular_expression; -#line 542 "regex.h2" +#line 625 "regex.h2" class regex_parser_state; -#line 574 "regex.h2" +#line 657 "regex.h2" template class regex_parser; -#line 968 "regex.h2" +#line 1055 "regex.h2" } } @@ -144,22 +148,23 @@ template class match_return { public: Iter pos {}; }; -template class match_context +template class match_context { public: Iter begin; public: Iter end; private: std::array,max_groups> groups {}; + private: std::array alternatives_pos {}; public: explicit match_context(Iter const& begin_, Iter const& end_); -#line 51 "regex.h2" +#line 52 "regex.h2" public: match_context(match_context const& that); -#line 51 "regex.h2" +#line 52 "regex.h2" public: auto operator=(match_context const& that) -> match_context& ; -#line 51 "regex.h2" +#line 52 "regex.h2" public: match_context(match_context&& that) noexcept; -#line 51 "regex.h2" +#line 52 "regex.h2" public: auto operator=(match_context&& that) noexcept -> match_context& ; // Getter and setter for groups @@ -168,20 +173,27 @@ template class match_context public: auto set_group_end(auto const& group, auto const& pos) & -> void; -#line 62 "regex.h2" +#line 63 "regex.h2" public: auto set_group_invalid(auto const& group) & -> void; -#line 66 "regex.h2" +#line 67 "regex.h2" public: auto set_group_start(auto const& group, auto const& pos) & -> void; -#line 70 "regex.h2" +#line 71 "regex.h2" public: [[nodiscard]] auto size() const& -> auto; + // Getter and setter for alternatives + + public: [[nodiscard]] auto get_alternative_pos(auto const& alternative) const& -> auto; + + public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void; + +#line 81 "regex.h2" // Misc functions // public: [[nodiscard]] auto print_ranges() const& -> bstring; -#line 87 "regex.h2" +#line 96 "regex.h2" }; // Represents the remainder of the regular expression. @@ -194,18 +206,20 @@ template class matcher_list { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto; -#line 100 "regex.h2" +#line 109 "regex.h2" private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto; private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto; public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; + + public: template [[nodiscard]] static auto prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto; public: matcher_list() = default; public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(matcher_list const&) -> void = delete; -#line 106 "regex.h2" +#line 117 "regex.h2" }; template using no_tail = matcher_list; @@ -227,7 +241,7 @@ template class single_class_entry public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(single_class_entry const&) -> void = delete; -#line 123 "regex.h2" +#line 134 "regex.h2" }; // Class syntax: - Example: a-c @@ -240,7 +254,7 @@ template class range_class_entry public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_class_entry const&) -> void = delete; -#line 131 "regex.h2" +#line 142 "regex.h2" }; // Helper for combining two character classes @@ -252,7 +266,7 @@ template class combined_class_entry { public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(combined_class_entry const&) -> void = delete; -#line 138 "regex.h2" +#line 149 "regex.h2" }; // Class syntax: Example: abcd @@ -264,7 +278,7 @@ template class list_class_entry { public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(list_class_entry const&) -> void = delete; -#line 145 "regex.h2" +#line 156 "regex.h2" }; // Class syntax: [: class named_class_en public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(named_class_entry const&) -> void = delete; -#line 152 "regex.h2" +#line 163 "regex.h2" }; -#line 155 "regex.h2" +#line 166 "regex.h2" // Named basic character classes // template using digits_class = named_class_entry>; @@ -307,23 +321,44 @@ template using xdigit_class = named_class_entry class extract_position_helper { + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; + +#line 205 "regex.h2" + public: static auto reset_ranges(auto& ctx) -> void; + public: [[nodiscard]] static auto to_string() -> auto; + public: extract_position_helper() = default; + public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */ + public: auto operator=(extract_position_helper const&) -> void = delete; + +#line 207 "regex.h2" +}; + // Regex syntax: | Example: ab|ba // // Non greedy implementation. First alternative that matches is chosen. // -template class alternative_matcher_logic { +template class alternative_matcher_logic { - public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& tail) -> auto; + public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto; + +#line 223 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; - private: template [[nodiscard]] static auto match_all(auto const& cur, auto& ctx, auto const& tail) -> auto; + private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto; + +#line 241 "regex.h2" + private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto; public: alternative_matcher_logic() = default; public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(alternative_matcher_logic const&) -> void = delete; -#line 206 "regex.h2" +#line 289 "regex.h2" }; // Regex syntax: . @@ -332,14 +367,14 @@ template class any_matcher_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 220 "regex.h2" +#line 303 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: any_matcher_logic() = default; public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(any_matcher_logic const&) -> void = delete; -#line 222 "regex.h2" +#line 305 "regex.h2" }; // Regex syntax: Example: a @@ -348,27 +383,27 @@ template class char_matcher_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 235 "regex.h2" +#line 318 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: char_matcher_logic() = default; public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(char_matcher_logic const&) -> void = delete; -#line 237 "regex.h2" +#line 320 "regex.h2" }; -#line 240 "regex.h2" +#line 323 "regex.h2" // Regex syntax: [] Example: [abcx-y[:digits:]] // template class class_matcher_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 252 "regex.h2" +#line 335 "regex.h2" private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool; -#line 264 "regex.h2" +#line 347 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> bstring; @@ -377,7 +412,7 @@ template class class_matcher_logi public: auto operator=(class_matcher_logic const&) -> void = delete; -#line 276 "regex.h2" +#line 359 "regex.h2" }; // Regex syntax: \ Example: \. @@ -385,13 +420,13 @@ template class class_matcher_logi template class escaped_char_matcher_logic : public char_matcher_logic { -#line 284 "regex.h2" +#line 367 "regex.h2" public: [[nodiscard]] static auto to_string() -> auto; public: escaped_char_matcher_logic() = default; public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(escaped_char_matcher_logic const&) -> void = delete; -#line 285 "regex.h2" +#line 368 "regex.h2" }; // Regex syntax: () Example: (.*) @@ -399,7 +434,7 @@ template class escaped_char_matcher_logic template class group_matcher_start_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 300 "regex.h2" +#line 383 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; @@ -408,13 +443,13 @@ template class group_matcher_start_logic { public: auto operator=(group_matcher_start_logic const&) -> void = delete; -#line 310 "regex.h2" +#line 393 "regex.h2" }; template class group_matcher_end_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 321 "regex.h2" +#line 404 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; @@ -423,7 +458,7 @@ template class group_matcher_end_logic { public: auto operator=(group_matcher_end_logic const&) -> void = delete; -#line 331 "regex.h2" +#line 414 "regex.h2" }; // Regex syntax: \ Example: \1 @@ -431,14 +466,14 @@ template class group_matcher_end_logic { template class group_ref_matcher_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 347 "regex.h2" +#line 430 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: group_ref_matcher_logic() = default; public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(group_ref_matcher_logic const&) -> void = delete; -#line 349 "regex.h2" +#line 432 "regex.h2" }; // Regex syntax: $ Example: aa$ @@ -449,14 +484,14 @@ template class line_end_matcher_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 367 "regex.h2" +#line 450 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: line_end_matcher_logic() = default; public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_end_matcher_logic const&) -> void = delete; -#line 369 "regex.h2" +#line 452 "regex.h2" }; // Regex syntax: ^ Example: ^aa @@ -467,14 +502,14 @@ template class line_start_matcher_logic { public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto; -#line 386 "regex.h2" +#line 469 "regex.h2" public: static auto reset_ranges(auto& ctx) -> void; public: [[nodiscard]] static auto to_string() -> auto; public: line_start_matcher_logic() = default; public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(line_start_matcher_logic const&) -> void = delete; -#line 388 "regex.h2" +#line 471 "regex.h2" }; // Regex syntax: {min, max} Example: a{2,4} @@ -485,23 +520,23 @@ template class range_m public: [[nodiscard]] static auto to_string() -> bstring; -#line 415 "regex.h2" +#line 498 "regex.h2" private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool; -#line 420 "regex.h2" +#line 503 "regex.h2" private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool; -#line 425 "regex.h2" +#line 508 "regex.h2" private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool; -#line 431 "regex.h2" +#line 514 "regex.h2" private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return; public: range_matcher_logic() = default; public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(range_matcher_logic const&) -> void = delete; -#line 459 "regex.h2" +#line 542 "regex.h2" }; // Regex syntax: *, +, or ? Example: aa* @@ -513,7 +548,7 @@ template public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(special_range_matcher_logic const&) -> void = delete; -#line 466 "regex.h2" +#line 549 "regex.h2" }; //----------------------------------------------------------------------- @@ -524,13 +559,13 @@ template // // Regular expression implementation -template class regular_expression { +template class regular_expression { - public: template using context = match_context; + public: template using context = match_context; private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto; -#line 489 "regex.h2" +#line 572 "regex.h2" // TODO: Named multiple return has problems with templates. public: template class search_return { public: bool matched; @@ -541,7 +576,7 @@ template class regular_expressi public: auto operator=(search_return const&) -> void = delete; -#line 498 "regex.h2" +#line 581 "regex.h2" }; public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto; @@ -549,19 +584,19 @@ template class regular_expressi public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto; public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return; -#line 510 "regex.h2" +#line 593 "regex.h2" public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto; public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto; public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto; public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return; -#line 532 "regex.h2" +#line 615 "regex.h2" public: [[nodiscard]] auto to_string() const& -> auto; public: regular_expression() = default; public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regular_expression const&) -> void = delete; -#line 533 "regex.h2" +#line 616 "regex.h2" }; //----------------------------------------------------------------------- @@ -581,19 +616,19 @@ class regex_parser_state { public: auto next_alternative() & -> void; -#line 556 "regex.h2" +#line 639 "regex.h2" public: auto swap(regex_parser_state& t) & -> void; -#line 561 "regex.h2" +#line 644 "regex.h2" public: auto add(auto const& matcher) & -> void; public: auto wrap_last(auto const& matcher) & -> void; -#line 570 "regex.h2" +#line 653 "regex.h2" public: [[nodiscard]] auto empty() const& -> bool; }; -#line 574 "regex.h2" +#line 657 "regex.h2" template class regex_parser { private: std::string_view regex; @@ -601,6 +636,7 @@ template class regex_parser { private: size_t pos {0}; private: int named_groups {1}; // Global capture group. + private: int alternatives_count {0}; private: Error_out error_out; @@ -609,75 +645,75 @@ template class regex_parser { public: explicit regex_parser(cpp2::in r, Error_out const& e); -#line 592 "regex.h2" +#line 676 "regex.h2" // State management functions // public: [[nodiscard]] auto new_state() & -> regex_parser_state; -#line 600 "regex.h2" +#line 684 "regex.h2" public: auto restore_state(cpp2::in old_state) & -> void; -#line 604 "regex.h2" +#line 688 "regex.h2" // Misc functions // public: auto error(cpp2::in message) & -> void; -#line 610 "regex.h2" +#line 694 "regex.h2" public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto; -#line 617 "regex.h2" +#line 701 "regex.h2" public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto; public: [[nodiscard]] auto create_matcher_from_state() & -> std::string; -#line 636 "regex.h2" +#line 723 "regex.h2" public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string; -#line 648 "regex.h2" +#line 735 "regex.h2" // Parsing functions // public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool; -#line 658 "regex.h2" +#line 745 "regex.h2" public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool; -#line 671 "regex.h2" +#line 758 "regex.h2" public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool; -#line 679 "regex.h2" +#line 766 "regex.h2" public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool; -#line 775 "regex.h2" +#line 862 "regex.h2" public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool; -#line 810 "regex.h2" +#line 897 "regex.h2" public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool; -#line 833 "regex.h2" +#line 920 "regex.h2" public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool; -#line 842 "regex.h2" +#line 929 "regex.h2" public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool; -#line 903 "regex.h2" +#line 990 "regex.h2" public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool; -#line 928 "regex.h2" +#line 1015 "regex.h2" public: auto parse_until(cpp2::in term) & -> void; -#line 949 "regex.h2" +#line 1036 "regex.h2" public: [[nodiscard]] auto parse() & -> std::string; public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */ public: auto operator=(regex_parser const&) -> void = delete; -#line 959 "regex.h2" +#line 1046 "regex.h2" }; template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string; -#line 968 "regex.h2" +#line 1055 "regex.h2" } } @@ -691,61 +727,73 @@ namespace cpp2 { namespace regex { -#line 46 "regex.h2" - template match_context::match_context(Iter const& begin_, Iter const& end_) +#line 47 "regex.h2" + template match_context::match_context(Iter const& begin_, Iter const& end_) : begin{ begin_ } , end{ end_ }{ -#line 49 "regex.h2" +#line 50 "regex.h2" } -#line 51 "regex.h2" - template match_context::match_context(match_context const& that) +#line 52 "regex.h2" + template match_context::match_context(match_context const& that) : begin{ that.begin } , end{ that.end } - , groups{ that.groups }{} -#line 51 "regex.h2" - template auto match_context::operator=(match_context const& that) -> match_context& { + , groups{ that.groups } + , alternatives_pos{ that.alternatives_pos }{} +#line 52 "regex.h2" + template auto match_context::operator=(match_context const& that) -> match_context& { begin = that.begin; end = that.end; groups = that.groups; + alternatives_pos = that.alternatives_pos; return *this; } -#line 51 "regex.h2" - template match_context::match_context(match_context&& that) noexcept +#line 52 "regex.h2" + template match_context::match_context(match_context&& that) noexcept : begin{ std::move(that).begin } , end{ std::move(that).end } - , groups{ std::move(that).groups }{} -#line 51 "regex.h2" - template auto match_context::operator=(match_context&& that) noexcept -> match_context& { + , groups{ std::move(that).groups } + , alternatives_pos{ std::move(that).alternatives_pos }{} +#line 52 "regex.h2" + template auto match_context::operator=(match_context&& that) noexcept -> match_context& { begin = std::move(that).begin; end = std::move(that).end; groups = std::move(that).groups; + alternatives_pos = std::move(that).alternatives_pos; return *this; } -#line 55 "regex.h2" - template [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group); } +#line 56 "regex.h2" + template [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group); } -#line 57 "regex.h2" - template auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{ +#line 58 "regex.h2" + template auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos; CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true; } -#line 62 "regex.h2" - template auto match_context::set_group_invalid(auto const& group) & -> void{ +#line 63 "regex.h2" + template auto match_context::set_group_invalid(auto const& group) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false; } -#line 66 "regex.h2" - template auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{ +#line 67 "regex.h2" + template auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{ CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos; } -#line 70 "regex.h2" - template [[nodiscard]] auto match_context::size() const& -> auto { return max_groups; } +#line 71 "regex.h2" + template [[nodiscard]] auto match_context::size() const& -> auto { return max_groups; } + +#line 75 "regex.h2" + template [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative); } -#line 74 "regex.h2" - template [[nodiscard]] auto match_context::print_ranges() const& -> bstring{ +#line 77 "regex.h2" + template auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{ + CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos; + } + +#line 83 "regex.h2" + template [[nodiscard]] auto match_context::print_ranges() const& -> bstring{ bstring r {""}; for ( auto const& cur : groups ) { if (cur.matched) { @@ -759,58 +807,82 @@ namespace regex { return r; } -#line 95 "regex.h2" +#line 104 "regex.h2" template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx); } -#line 97 "regex.h2" +#line 106 "regex.h2" template template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { return match_select(cur, ctx); } -#line 100 "regex.h2" +#line 109 "regex.h2" template template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return First::match(cur, ctx, matcher_list()); } -#line 102 "regex.h2" +#line 111 "regex.h2" template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur); } -#line 104 "regex.h2" +#line 113 "regex.h2" template auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } -#line 105 "regex.h2" +#line 114 "regex.h2" template [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); } -#line 121 "regex.h2" +#line 116 "regex.h2" + template template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list(); } + +#line 132 "regex.h2" template [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C; } -#line 122 "regex.h2" +#line 133 "regex.h2" template [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); } -#line 129 "regex.h2" +#line 140 "regex.h2" template [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }(); } -#line 130 "regex.h2" +#line 141 "regex.h2" template [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); } -#line 136 "regex.h2" +#line 147 "regex.h2" template [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c)); } -#line 137 "regex.h2" +#line 148 "regex.h2" template [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); } -#line 143 "regex.h2" +#line 154 "regex.h2" template [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c)); } -#line 144 "regex.h2" +#line 155 "regex.h2" template [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); } -#line 150 "regex.h2" +#line 161 "regex.h2" template [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c); } -#line 151 "regex.h2" +#line 162 "regex.h2" template [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; } -#line 188 "regex.h2" - template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_all(cur, ctx, tail); } -#line 189 "regex.h2" - template auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } -#line 190 "regex.h2" - template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. +#line 197 "regex.h2" + template template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ + auto r {Other::match(cur, ctx)}; + if (r.matched) { + CPP2_UFCS(set_alternative_pos)(ctx, alternative, cur); + } + return r; + } + +#line 205 "regex.h2" + template auto extract_position_helper::reset_ranges(auto& ctx) -> void{} +#line 206 "regex.h2" + template [[nodiscard]] auto extract_position_helper::to_string() -> auto{} + +#line 215 "regex.h2" + template template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{ + auto max_overall_length {0}; + auto max_current_length {0}; + auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, tail)}; + static_cast(std::move(max_overall_length)); + static_cast(std::move(max_current_length)); + return r; + } +#line 223 "regex.h2" + template auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); } +#line 224 "regex.h2" + template [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'. -#line 192 "regex.h2" - template template [[nodiscard]] auto alternative_matcher_logic::match_all(auto const& cur, auto& ctx, auto const& tail) -> auto{ +#line 226 "regex.h2" + template template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{ auto r {First::match(cur, ctx, tail)}; if (r.matched) { return r; @@ -818,14 +890,64 @@ namespace regex { First::reset_ranges(ctx); if constexpr (0 != sizeof...(Next)) { - return match_all(cur, ctx, tail); + return match_first(cur, ctx, tail); }else { return match_return(false, ctx.end); } } } -#line 212 "regex.h2" +#line 241 "regex.h2" + template template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{ + auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; + + // Get the end position of First. + auto end_overall_pos {cur}; + auto end_current_pos {cur}; + if (r.matched) { + end_overall_pos = r.pos; + end_current_pos = CPP2_UFCS(get_alternative_pos)(ctx, alternative); + } + + // Compute the new max length and our max length. + auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; + max_overall_length = std::max(max_overall_length, my_overall_length); + +#line 257 "regex.h2" + // Check if someone other has something larker + auto o {match_return(false, ctx.end)}; + if constexpr (0 != sizeof...(Next)) { + o = match_greedy(cur, max_overall_length, max_current_length, ctx, Tail()); + } + + auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; + if (max_overall_length == my_overall_length) { + max_current_length = std::max(max_current_length, my_current_length); + } + +#line 269 "regex.h2" + if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) { + // We are the longest. Check now if we are also the longest in this alternative. + if (std::move(my_current_length) == max_current_length) { + // Yes we are. Reset all groups by matching again. + (Next::reset_ranges(ctx), ...); // Reset all other ranges. + return First::match(cur, ctx, Tail::prepend(extract_position_helper())); + } + else { + // We are not, so there was an other match. + First::reset_ranges(ctx); + + return o; + } + }else { + // We are not the largest one. + First::reset_ranges(ctx); + + return o; + } + } + +#line 295 "regex.h2" template template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ if (cur != ctx.end) { return Other::match(cur + 1, ctx); @@ -834,12 +956,12 @@ namespace regex { } } -#line 220 "regex.h2" +#line 303 "regex.h2" template auto any_matcher_logic::reset_ranges(auto& ctx) -> void{} -#line 221 "regex.h2" +#line 304 "regex.h2" template [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); } -#line 228 "regex.h2" +#line 311 "regex.h2" template template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) { return Other::match(cur + 1, ctx); @@ -847,12 +969,12 @@ namespace regex { return match_return(false, ctx.end); } } -#line 235 "regex.h2" +#line 318 "regex.h2" template auto char_matcher_logic::reset_ranges(auto& ctx) -> void{} -#line 236 "regex.h2" +#line 319 "regex.h2" template [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); } -#line 244 "regex.h2" +#line 327 "regex.h2" template template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) { return Other::match(cur + 1, ctx); @@ -861,7 +983,7 @@ namespace regex { } } -#line 252 "regex.h2" +#line 335 "regex.h2" template template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{ bool r {First::includes(c)}; @@ -874,10 +996,10 @@ namespace regex { return r; } -#line 264 "regex.h2" +#line 347 "regex.h2" template auto class_matcher_logic::reset_ranges(auto& ctx) -> void{} -#line 266 "regex.h2" +#line 349 "regex.h2" template [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{ bstring r {"["}; if (negate) { @@ -889,10 +1011,10 @@ namespace regex { return r; } -#line 284 "regex.h2" +#line 367 "regex.h2" template [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C); } -#line 290 "regex.h2" +#line 373 "regex.h2" template template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ auto r {Other::match(cur, ctx)}; if (r.matched) { @@ -903,10 +1025,10 @@ namespace regex { return r; } -#line 300 "regex.h2" +#line 383 "regex.h2" template auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group); } -#line 302 "regex.h2" +#line 385 "regex.h2" template [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{ if (group != 0) { return "("; @@ -916,7 +1038,7 @@ namespace regex { } } -#line 313 "regex.h2" +#line 396 "regex.h2" template template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ auto r {Other::match(cur, ctx)}; if (r.matched) { @@ -925,10 +1047,10 @@ namespace regex { return r; } -#line 321 "regex.h2" +#line 404 "regex.h2" template auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{} -#line 323 "regex.h2" +#line 406 "regex.h2" template [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{ if (group != 0) { return ")"; @@ -938,7 +1060,7 @@ namespace regex { } } -#line 336 "regex.h2" +#line 419 "regex.h2" template template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ auto g {CPP2_UFCS(get_group)(ctx, group)}; @@ -950,12 +1072,12 @@ namespace regex { return Other::match(cur, ctx); } -#line 347 "regex.h2" +#line 430 "regex.h2" template auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{} -#line 348 "regex.h2" +#line 431 "regex.h2" template [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return "\\(" + cpp2::to_string(group) + ")"; } -#line 357 "regex.h2" +#line 440 "regex.h2" template template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ if (cur == ctx.end || *cpp2::assert_not_null(cur) == '\n') { return Other::match(cur, ctx); @@ -966,12 +1088,12 @@ namespace regex { } -#line 367 "regex.h2" +#line 450 "regex.h2" template auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{} -#line 368 "regex.h2" +#line 451 "regex.h2" template [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; } -#line 377 "regex.h2" +#line 460 "regex.h2" template template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{ if (cur == ctx.begin || *cpp2::assert_not_null((cur - 1)) == '\n') { return Other::match(cur, ctx); @@ -981,17 +1103,17 @@ namespace regex { } } -#line 386 "regex.h2" +#line 469 "regex.h2" template auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{} -#line 387 "regex.h2" +#line 470 "regex.h2" template [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); } -#line 393 "regex.h2" +#line 476 "regex.h2" template [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); } -#line 394 "regex.h2" +#line 477 "regex.h2" template auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); } -#line 396 "regex.h2" +#line 479 "regex.h2" template [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{ std::string r {M::to_string()}; @@ -1011,26 +1133,26 @@ namespace regex { return r; } -#line 415 "regex.h2" +#line 498 "regex.h2" template [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{ if (-1 == max_count) {return true; } else {return cpp2::cmp_less(count,max_count); } } -#line 420 "regex.h2" +#line 503 "regex.h2" template [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{ if (-1 == min_count) {return false; } else {return cpp2::cmp_less(count,min_count); } } -#line 425 "regex.h2" +#line 508 "regex.h2" template [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{ if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; } if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; } return true; } -#line 431 "regex.h2" +#line 514 "regex.h2" template template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{ auto r {M::match(cur, ctx, no_tail())}; if ( is_below_upper_bound(count) && r.matched && @@ -1060,11 +1182,11 @@ namespace regex { } } -#line 465 "regex.h2" +#line 548 "regex.h2" template [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol; } -#line 480 "regex.h2" - template [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{ +#line 563 "regex.h2" + template [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{ if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) { return CPP2_UFCS(begin)(str) + pos; } @@ -1073,36 +1195,36 @@ namespace regex { } } -#line 494 "regex.h2" - template template regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_) +#line 577 "regex.h2" + template template regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_) : matched{ matched_ } , ctx{ ctx_ }{ -#line 497 "regex.h2" +#line 580 "regex.h2" } -#line 500 "regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } -#line 501 "regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); } -#line 502 "regex.h2" - template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); } -#line 503 "regex.h2" - template template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{ +#line 583 "regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } +#line 584 "regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); } +#line 585 "regex.h2" + template [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); } +#line 586 "regex.h2" + template template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{ context ctx {start, end}; auto r {Matcher::match(start, ctx)}; return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); } -#line 510 "regex.h2" - template [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } -#line 511 "regex.h2" - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); } -#line 512 "regex.h2" - template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); } -#line 513 "regex.h2" - template template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{ +#line 593 "regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); } +#line 594 "regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); } +#line 595 "regex.h2" + template [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); } +#line 596 "regex.h2" + template template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{ auto matched {false}; context ctx {start, end}; @@ -1121,26 +1243,26 @@ namespace regex { return search_return(std::move(matched), std::move(ctx)); } -#line 532 "regex.h2" - template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } +#line 615 "regex.h2" + template [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string(); } -#line 550 "regex.h2" +#line 633 "regex.h2" auto regex_parser_state::next_alternative() & -> void{ std::vector new_list {}; std::swap(new_list, cur_match_list); static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list))); } -#line 556 "regex.h2" +#line 639 "regex.h2" auto regex_parser_state::swap(regex_parser_state& t) & -> void{ std::swap(cur_match_list, t.cur_match_list); std::swap(alternate_match_lists, t.alternate_match_lists); } -#line 561 "regex.h2" +#line 644 "regex.h2" auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher); } -#line 563 "regex.h2" +#line 646 "regex.h2" auto regex_parser_state::wrap_last(auto const& matcher) & -> void{ auto last {CPP2_UFCS(back)(cur_match_list)}; CPP2_UFCS(back)(cur_match_list) = matcher(last); @@ -1148,35 +1270,35 @@ namespace regex { static_cast(std::move(last)); } -#line 570 "regex.h2" +#line 653 "regex.h2" [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list); } -#line 587 "regex.h2" +#line 671 "regex.h2" template regex_parser::regex_parser(cpp2::in r, Error_out const& e) : regex{ r } , error_out{ e }{ -#line 590 "regex.h2" +#line 674 "regex.h2" } -#line 594 "regex.h2" +#line 678 "regex.h2" template [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{ regex_parser_state old_state {}; CPP2_UFCS(swap)(old_state, cur_state); return old_state; } -#line 600 "regex.h2" +#line 684 "regex.h2" template auto regex_parser::restore_state(cpp2::in old_state) & -> void{ cur_state = old_state; } -#line 606 "regex.h2" +#line 690 "regex.h2" template auto regex_parser::error(cpp2::in message) & -> void{ error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message))); } -#line 610 "regex.h2" +#line 694 "regex.h2" template [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{ auto sep {", "}; if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; } @@ -1184,10 +1306,10 @@ namespace regex { return "::cpp2::regex::" + cpp2::to_string(name) + ""; } -#line 617 "regex.h2" +#line 701 "regex.h2" template [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list)); } -#line 619 "regex.h2" +#line 703 "regex.h2" template [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{ if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); } @@ -1202,10 +1324,13 @@ namespace regex { separator = ", "; } - return create_matcher("alternative_matcher_logic", std::move(list)); + auto alternative_id {alternatives_count}; + alternatives_count += 1; + + return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); } -#line 636 "regex.h2" +#line 723 "regex.h2" template [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{ std::string r {""}; @@ -1218,7 +1343,7 @@ namespace regex { return r; } -#line 651 "regex.h2" +#line 738 "regex.h2" template [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{ if (c != '|') {return false; } @@ -1226,7 +1351,7 @@ namespace regex { return true; } -#line 658 "regex.h2" +#line 745 "regex.h2" template [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{ if (c == '^') { CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "")); @@ -1240,7 +1365,7 @@ namespace regex { return false; } -#line 671 "regex.h2" +#line 758 "regex.h2" template [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{ if (c == '.') { CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", "")); @@ -1249,7 +1374,7 @@ namespace regex { return false; } -#line 679 "regex.h2" +#line 766 "regex.h2" template [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{ if (c != '[') {return false; } @@ -1346,7 +1471,7 @@ namespace regex { return true; } -#line 775 "regex.h2" +#line 862 "regex.h2" template [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{ if (c != '\\') {return false; } @@ -1382,7 +1507,7 @@ namespace regex { return true; } -#line 810 "regex.h2" +#line 897 "regex.h2" template [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{ if (c != '(') {return false; } @@ -1406,7 +1531,7 @@ namespace regex { return true; } -#line 833 "regex.h2" +#line 920 "regex.h2" template [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{ if (c == '\'') { CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'"))); @@ -1416,7 +1541,7 @@ namespace regex { return false; } -#line 842 "regex.h2" +#line 929 "regex.h2" template [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{ auto to_int {[&](auto const& str) mutable -> int{ @@ -1478,7 +1603,7 @@ namespace regex { return true; } -#line 903 "regex.h2" +#line 990 "regex.h2" template [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{ std::string min_range {"0"}; std::string max_range {"-1"}; @@ -1504,7 +1629,7 @@ namespace regex { return true; } -#line 928 "regex.h2" +#line 1015 "regex.h2" template auto regex_parser::parse_until(cpp2::in term) & -> void{ for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) { char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; @@ -1526,7 +1651,7 @@ namespace regex { } } -#line 949 "regex.h2" +#line 1036 "regex.h2" template [[nodiscard]] auto regex_parser::parse() & -> std::string{ parse_until('\0'); @@ -1534,10 +1659,10 @@ namespace regex { auto start {create_matcher("group_matcher_start_logic", "0")}; auto end {create_matcher("group_matcher_end_logic", "0")}; auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; - return create_matcher("regular_expression", (cpp2::to_string(named_groups) + ", " + cpp2::to_string(std::move(list)))); + return create_matcher("regular_expression", (cpp2::to_string(named_groups) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(list)))); } -#line 961 "regex.h2" +#line 1048 "regex.h2" template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{ regex_parser parser {regex, err}; auto r {CPP2_UFCS(parse)(parser)}; diff --git a/source/regex.h2 b/source/regex.h2 index 293a479952..bf6eed70d2 100644 --- a/source/regex.h2 +++ b/source/regex.h2 @@ -36,12 +36,13 @@ match_return: @struct type = { pos: Iter = (); } -match_context: type = +match_context: type = { public begin: Iter; public end: Iter; private groups: std::array, max_groups> = (); + private alternatives_pos: std::array = (); operator=: (out this, begin_: Iter, end_: Iter) = { begin = begin_; @@ -69,6 +70,14 @@ match_context: type = size: (in this) max_groups; + // Getter and setter for alternatives + + get_alternative_pos: (in this, alternative) alternatives_pos[alternative]; + + set_alternative_pos: (inout this, alternative, pos) = { + alternatives_pos[alternative] = pos; + } + // Misc functions // print_ranges: (in this) -> bstring = { @@ -103,6 +112,8 @@ matcher_list: type = { reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...); to_string: () (bstring() + ... + List::to_string()); + + prepend:
 (_ : Pre) matcher_list();
 }
 
 no_tail:  type == matcher_list;
@@ -179,17 +190,40 @@ xdigit_class  :  type == named_class_entry type = {
+    match:  (cur, inout ctx, _ : Other) -> _ = {
+        r := Other::match(cur, ctx);
+        if r.matched {
+            ctx.set_alternative_pos(alternative, cur);
+        }
+        return r;
+    }
+
+    reset_ranges: (inout ctx) = {}
+    to_string: () -> _ = {}
+}
+
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
 //
-alternative_matcher_logic:  type = {
-
-    match: (cur, inout ctx, tail)   match_all(cur, ctx, tail);
+alternative_matcher_logic:  type = {
+
+    match:  (cur, inout ctx, tail: Tail) -> _ = {
+        max_overall_length: = 0;
+        max_current_length: = 0;
+        r := match_greedy(cur, max_overall_length, max_current_length, ctx, tail);
+        _ = max_overall_length;
+        _ = max_current_length;
+        return r;
+    }
     reset_ranges: (inout ctx)     = (List::reset_ranges(ctx) , ...);
     to_string: ()                   (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'.
 
-    private match_all:  (cur, inout ctx, tail) -> _ = {
+    private match_first:  (cur, inout ctx, tail) -> _ = {
         r := First::match(cur, ctx, tail);
         if r.matched {
             return r;
@@ -197,12 +231,61 @@ alternative_matcher_logic:  type = {
             First::reset_ranges(ctx);
 
             if constexpr 0 != sizeof...(Next) {
-                return match_all(cur, ctx, tail);
+                return match_first(cur, ctx, tail);
             } else {
                 return match_return(false, ctx.end);
             }
         }
     }
+
+    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, _: Tail) -> _ = {
+        r := First::match(cur, ctx, Tail::prepend(extract_position_helper()));
+
+        // Get the end position of First.
+        end_overall_pos := cur;
+        end_current_pos := cur;
+        if r.matched {
+            end_overall_pos = r.pos;
+            end_current_pos = ctx.get_alternative_pos(alternative);
+        }
+
+        // Compute the new max length and our max length.
+        my_overall_length := unsafe_narrow(std::distance(cur, end_overall_pos));
+        max_overall_length = std::max(max_overall_length, my_overall_length);
+
+
+        // Check if someone other has something larker
+        o := match_return(false, ctx.end);
+        if constexpr 0 != sizeof...(Next) {
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, Tail());
+        }
+
+        my_current_length := unsafe_narrow(std::distance(cur, end_current_pos));
+        if max_overall_length == my_overall_length {
+            max_current_length = std::max(max_current_length, my_current_length);
+        }
+
+
+        if r.matched && my_overall_length == max_overall_length {
+            // We are the longest. Check now if we are also the longest in this alternative.
+            if my_current_length == max_current_length {
+                // Yes we are. Reset all groups by matching again.
+                (Next::reset_ranges(ctx) , ...); // Reset all other ranges.
+                return First::match(cur, ctx, Tail::prepend(extract_position_helper()));
+            }
+            else {
+                // We are not, so there was an other match.
+                First::reset_ranges(ctx);
+
+                return o;
+            }
+        } else {
+            // We are not the largest one.
+            First::reset_ranges(ctx);
+
+            return o;
+        }
+    }
 }
 
 //  Regex syntax: .
@@ -473,9 +556,9 @@ special_range_matcher_logic:  type = {
+regular_expression:  type = {
 
-    context:  type == match_context;
+    context:  type == match_context;
 
     private get_iter: (str: view, pos) -> _ = {
         if pos < str.size() {
@@ -578,6 +661,7 @@ regex_parser:  type = {
     pos: size_t = 0;
 
     named_groups: int = 1; // Global capture group.
+    alternatives_count: int = 0;
 
     error_out: Error_out;
 
@@ -630,7 +714,10 @@ regex_parser:  type = {
             separator = ", ";
         }
 
-        return create_matcher("alternative_matcher_logic", list);
+        alternative_id := alternatives_count;
+        alternatives_count += 1;
+
+        return create_matcher("alternative_matcher_logic", "(alternative_id)$, (list)$");
     }
 
     join: (list: std::vector) -> std::string = {
@@ -953,7 +1040,7 @@ regex_parser:  type = {
         start := create_matcher("group_matcher_start_logic", "0");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-        return   create_matcher("regular_expression", "(named_groups)$, (list)$");
+        return   create_matcher("regular_expression", "(named_groups)$, (alternatives_count)$, (list)$");
     }
 
 }

From 437f19da762bcec2245c48e22c0c1ed1c389f8eb Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 26 Jan 2024 19:27:28 +0100
Subject: [PATCH 046/161] Greedy version of alternative regex.

---
 include/cpp2regex.h                           | 450 +++++++++---------
 regression-tests/test-results/pure2-regex.cpp |  18 +-
 source/regex.h2                               |  18 +-
 3 files changed, 249 insertions(+), 237 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index b5f788dbbd..bf2d0a81d0 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -15,93 +15,93 @@ namespace cpp2 {
 
 namespace regex {
 
-#line 27 "regex.h2"
+#line 29 "regex.h2"
 template class match_group;
     
 
-#line 34 "regex.h2"
+#line 36 "regex.h2"
 template class match_return;
     
 
-#line 39 "regex.h2"
+#line 41 "regex.h2"
 template class match_context;
 
-#line 103 "regex.h2"
+#line 105 "regex.h2"
 template class matcher_list;
     
 
-#line 130 "regex.h2"
+#line 132 "regex.h2"
 template class single_class_entry;
 
-#line 138 "regex.h2"
+#line 140 "regex.h2"
 template class range_class_entry;
 
-#line 146 "regex.h2"
+#line 148 "regex.h2"
 template class combined_class_entry;
     
 
-#line 153 "regex.h2"
+#line 155 "regex.h2"
 template class list_class_entry;
     
 
-#line 160 "regex.h2"
+#line 162 "regex.h2"
 template class named_class_entry;
     
 
-#line 196 "regex.h2"
+#line 198 "regex.h2"
 template class extract_position_helper;
     
 
-#line 213 "regex.h2"
+#line 215 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 293 "regex.h2"
+#line 299 "regex.h2"
 template class any_matcher_logic;
 
-#line 309 "regex.h2"
+#line 315 "regex.h2"
 template class char_matcher_logic;
 
-#line 325 "regex.h2"
+#line 331 "regex.h2"
 template class class_matcher_logic;
 
-#line 363 "regex.h2"
+#line 369 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 372 "regex.h2"
+#line 378 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 395 "regex.h2"
+#line 401 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 418 "regex.h2"
+#line 424 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 438 "regex.h2"
+#line 444 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 458 "regex.h2"
+#line 464 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 474 "regex.h2"
+#line 480 "regex.h2"
 template class range_matcher_logic;
 
-#line 546 "regex.h2"
+#line 552 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 559 "regex.h2"
+#line 565 "regex.h2"
 template class regular_expression;
 
-#line 625 "regex.h2"
+#line 631 "regex.h2"
 class regex_parser_state;
 
-#line 657 "regex.h2"
+#line 663 "regex.h2"
 template class regex_parser;
 
-#line 1055 "regex.h2"
+#line 1061 "regex.h2"
 }
 }
 
@@ -126,6 +126,8 @@ namespace cpp2 {
 
 namespace regex {
 
+bool inline constexpr greedy_alternative = false;
+
 template using view = std::basic_string_view;
 template using bstring = std::basic_string;
 
@@ -158,13 +160,13 @@ template match_context& ;
-#line 52 "regex.h2"
+#line 54 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 52 "regex.h2"
+#line 54 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -173,13 +175,13 @@ template void;
 
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 67 "regex.h2"
+#line 69 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 71 "regex.h2"
+#line 73 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -188,12 +190,12 @@ template void;
 
-#line 81 "regex.h2"
+#line 83 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 96 "regex.h2"
+#line 98 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -206,7 +208,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto;
 
-#line 109 "regex.h2"
+#line 111 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
@@ -219,7 +221,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 117 "regex.h2"
+#line 119 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -241,7 +243,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 134 "regex.h2"
+#line 136 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -254,7 +256,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 142 "regex.h2"
+#line 144 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -266,7 +268,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 149 "regex.h2"
+#line 151 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -278,7 +280,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 156 "regex.h2"
+#line 158 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 163 "regex.h2"
+#line 165 "regex.h2"
 };
 
-#line 166 "regex.h2"
+#line 168 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -321,20 +323,20 @@ template         using xdigit_class = named_class_entry class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 205 "regex.h2"
+#line 207 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 207 "regex.h2"
+#line 209 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -345,20 +347,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
 
-#line 223 "regex.h2"
+#line 229 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
 
-#line 241 "regex.h2"
+#line 247 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 289 "regex.h2"
+#line 295 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -367,14 +369,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 303 "regex.h2"
+#line 309 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 305 "regex.h2"
+#line 311 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -383,27 +385,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 318 "regex.h2"
+#line 324 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 320 "regex.h2"
+#line 326 "regex.h2"
 };
 
-#line 323 "regex.h2"
+#line 329 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 335 "regex.h2"
+#line 341 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 347 "regex.h2"
+#line 353 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -412,7 +414,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 359 "regex.h2"
+#line 365 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -420,13 +422,13 @@ template class class_matcher_logi
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 367 "regex.h2"
+#line 373 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 368 "regex.h2"
+#line 374 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -434,7 +436,7 @@ template class escaped_char_matcher_logic
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 383 "regex.h2"
+#line 389 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -443,13 +445,13 @@ template class group_matcher_start_logic {
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 393 "regex.h2"
+#line 399 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 404 "regex.h2"
+#line 410 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -458,7 +460,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 414 "regex.h2"
+#line 420 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -466,14 +468,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 430 "regex.h2"
+#line 436 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 432 "regex.h2"
+#line 438 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -484,14 +486,14 @@ template class line_end_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 450 "regex.h2"
+#line 456 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 452 "regex.h2"
+#line 458 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -502,14 +504,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 469 "regex.h2"
+#line 475 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 471 "regex.h2"
+#line 477 "regex.h2"
 };
 
 // Regex syntax: {min, max}  Example: a{2,4}
@@ -520,23 +522,23 @@ template class range_m
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 498 "regex.h2"
+#line 504 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 503 "regex.h2"
+#line 509 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 508 "regex.h2"
+#line 514 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 514 "regex.h2"
+#line 520 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 542 "regex.h2"
+#line 548 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -548,7 +550,7 @@ template
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
-#line 549 "regex.h2"
+#line 555 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -565,7 +567,7 @@ template c
 
     private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
 
-#line 572 "regex.h2"
+#line 578 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -576,7 +578,7 @@ template c
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 581 "regex.h2"
+#line 587 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -584,19 +586,19 @@ template c
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 593 "regex.h2"
+#line 599 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 615 "regex.h2"
+#line 621 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 616 "regex.h2"
+#line 622 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -616,19 +618,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 639 "regex.h2"
+#line 645 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 644 "regex.h2"
+#line 650 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 653 "regex.h2"
+#line 659 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 657 "regex.h2"
+#line 663 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -645,75 +647,75 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, Error_out const& e);
 
-#line 676 "regex.h2"
+#line 682 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 684 "regex.h2"
+#line 690 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 688 "regex.h2"
+#line 694 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 694 "regex.h2"
+#line 700 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 701 "regex.h2"
+#line 707 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 723 "regex.h2"
+#line 729 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 735 "regex.h2"
+#line 741 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 745 "regex.h2"
+#line 751 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 758 "regex.h2"
+#line 764 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 766 "regex.h2"
+#line 772 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 862 "regex.h2"
+#line 868 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 897 "regex.h2"
+#line 903 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 920 "regex.h2"
+#line 926 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 929 "regex.h2"
+#line 935 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 990 "regex.h2"
+#line 996 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1015 "regex.h2"
+#line 1021 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1036 "regex.h2"
+#line 1042 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1046 "regex.h2"
+#line 1052 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string;
 
-#line 1055 "regex.h2"
+#line 1061 "regex.h2"
 }
 }
 
@@ -727,34 +729,34 @@ namespace cpp2 {
 
 namespace regex {
 
-#line 47 "regex.h2"
+#line 49 "regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 50 "regex.h2"
+#line 52 "regex.h2"
     }
 
-#line 52 "regex.h2"
+#line 54 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 52 "regex.h2"
+#line 54 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 52 "regex.h2"
+#line 54 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 52 "regex.h2"
+#line 54 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -762,37 +764,37 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 56 "regex.h2"
+#line 58 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 58 "regex.h2"
+#line 60 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 67 "regex.h2"
+#line 69 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 71 "regex.h2"
+#line 73 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 75 "regex.h2"
+#line 77 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 77 "regex.h2"
+#line 79 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 83 "regex.h2"
+#line 85 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -807,53 +809,53 @@ namespace regex {
         return r; 
     }
 
-#line 104 "regex.h2"
+#line 106 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx);  }
 
-#line 106 "regex.h2"
+#line 108 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { 
         return match_select(cur, ctx);  }
 
-#line 109 "regex.h2"
+#line 111 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { 
         return First::match(cur, ctx, matcher_list());  }
-#line 111 "regex.h2"
+#line 113 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur);  }
 
-#line 113 "regex.h2"
+#line 115 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 114 "regex.h2"
+#line 116 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 116 "regex.h2"
+#line 118 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 132 "regex.h2"
+#line 134 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 133 "regex.h2"
+#line 135 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 140 "regex.h2"
+#line 142 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 141 "regex.h2"
+#line 143 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 147 "regex.h2"
+#line 149 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 148 "regex.h2"
+#line 150 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 154 "regex.h2"
+#line 156 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 155 "regex.h2"
+#line 157 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 161 "regex.h2"
+#line 163 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 162 "regex.h2"
+#line 164 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 197 "regex.h2"
+#line 199 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -862,26 +864,30 @@ namespace regex {
         return r; 
     }
 
-#line 205 "regex.h2"
+#line 207 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 206 "regex.h2"
+#line 208 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 215 "regex.h2"
+#line 217 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
-        auto max_overall_length {0}; 
-        auto max_current_length {0}; 
-        auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, tail)}; 
-        static_cast(std::move(max_overall_length));
-        static_cast(std::move(max_current_length));
-        return r; 
+        if constexpr (greedy_alternative) {
+            auto max_overall_length {0}; 
+            auto max_current_length {0}; 
+            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, tail)}; 
+            static_cast(std::move(max_overall_length));
+            static_cast(std::move(max_current_length));
+            return r; 
+        }else {
+            return match_first(cur, ctx, tail); 
+        }
     }
-#line 223 "regex.h2"
+#line 229 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 224 "regex.h2"
+#line 230 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 226 "regex.h2"
+#line 232 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, tail)}; 
         if (r.matched) {
@@ -897,7 +903,7 @@ namespace regex {
         }
     }
 
-#line 241 "regex.h2"
+#line 247 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
         auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
 
@@ -913,7 +919,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 257 "regex.h2"
+#line 263 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -925,7 +931,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 269 "regex.h2"
+#line 275 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -947,7 +953,7 @@ namespace regex {
         }
     }
 
-#line 295 "regex.h2"
+#line 301 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end) {
             return Other::match(cur + 1, ctx); 
@@ -956,12 +962,12 @@ namespace regex {
         }
     }
 
-#line 303 "regex.h2"
+#line 309 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 304 "regex.h2"
+#line 310 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 311 "regex.h2"
+#line 317 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
             return Other::match(cur + 1, ctx); 
@@ -969,12 +975,12 @@ namespace regex {
             return match_return(false, ctx.end); 
         }
     }
-#line 318 "regex.h2"
+#line 324 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 319 "regex.h2"
+#line 325 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 327 "regex.h2"
+#line 333 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
             return Other::match(cur + 1, ctx); 
@@ -983,7 +989,7 @@ namespace regex {
         }
     }
 
-#line 335 "regex.h2"
+#line 341 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -996,10 +1002,10 @@ namespace regex {
         return r; 
     }
 
-#line 347 "regex.h2"
+#line 353 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 349 "regex.h2"
+#line 355 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1011,10 +1017,10 @@ namespace regex {
         return r; 
     }
 
-#line 367 "regex.h2"
+#line 373 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 373 "regex.h2"
+#line 379 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1025,10 +1031,10 @@ namespace regex {
         return r; 
     }
 
-#line 383 "regex.h2"
+#line 389 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 385 "regex.h2"
+#line 391 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{
         if (group != 0) {
             return "("; 
@@ -1038,7 +1044,7 @@ namespace regex {
         }
     }
 
-#line 396 "regex.h2"
+#line 402 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1047,10 +1053,10 @@ namespace regex {
         return r; 
     }
 
-#line 404 "regex.h2"
+#line 410 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 406 "regex.h2"
+#line 412 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1060,7 +1066,7 @@ namespace regex {
         }
     }
 
-#line 419 "regex.h2"
+#line 425 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1072,12 +1078,12 @@ namespace regex {
 
         return Other::match(cur, ctx); 
     }
-#line 430 "regex.h2"
+#line 436 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 431 "regex.h2"
+#line 437 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return "\\(" + cpp2::to_string(group) + ")"; }
 
-#line 440 "regex.h2"
+#line 446 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.end || *cpp2::assert_not_null(cur) == '\n') {
             return Other::match(cur, ctx); 
@@ -1088,12 +1094,12 @@ namespace regex {
 
     }
 
-#line 450 "regex.h2"
+#line 456 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 451 "regex.h2"
+#line 457 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 460 "regex.h2"
+#line 466 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.begin || *cpp2::assert_not_null((cur - 1)) == '\n') {
             return Other::match(cur, ctx); 
@@ -1103,17 +1109,17 @@ namespace regex {
         }
 
     }
-#line 469 "regex.h2"
+#line 475 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 470 "regex.h2"
+#line 476 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 476 "regex.h2"
+#line 482 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); }
-#line 477 "regex.h2"
+#line 483 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 479 "regex.h2"
+#line 485 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1133,26 +1139,26 @@ namespace regex {
       return r; 
     }
 
-#line 498 "regex.h2"
+#line 504 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 503 "regex.h2"
+#line 509 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 508 "regex.h2"
+#line 514 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 514 "regex.h2"
+#line 520 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto r {M::match(cur, ctx, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1182,10 +1188,10 @@ namespace regex {
         }
     }
 
-#line 548 "regex.h2"
+#line 554 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol;  }
 
-#line 563 "regex.h2"
+#line 569 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1195,21 +1201,21 @@ namespace regex {
         }
     }
 
-#line 577 "regex.h2"
+#line 583 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 580 "regex.h2"
+#line 586 "regex.h2"
         }
 
-#line 583 "regex.h2"
+#line 589 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 584 "regex.h2"
+#line 590 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 585 "regex.h2"
+#line 591 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 586 "regex.h2"
+#line 592 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1217,13 +1223,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 593 "regex.h2"
+#line 599 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 594 "regex.h2"
+#line 600 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 595 "regex.h2"
+#line 601 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 596 "regex.h2"
+#line 602 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1243,26 +1249,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 615 "regex.h2"
+#line 621 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 633 "regex.h2"
+#line 639 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 639 "regex.h2"
+#line 645 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 644 "regex.h2"
+#line 650 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 646 "regex.h2"
+#line 652 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1270,35 +1276,35 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 653 "regex.h2"
+#line 659 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 671 "regex.h2"
+#line 677 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 674 "regex.h2"
+#line 680 "regex.h2"
     }
 
-#line 678 "regex.h2"
+#line 684 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 684 "regex.h2"
+#line 690 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 690 "regex.h2"
+#line 696 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
     }
 
-#line 694 "regex.h2"
+#line 700 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1306,10 +1312,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 701 "regex.h2"
+#line 707 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 703 "regex.h2"
+#line 709 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1330,7 +1336,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 723 "regex.h2"
+#line 729 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1343,7 +1349,7 @@ namespace regex {
         return r; 
     }
 
-#line 738 "regex.h2"
+#line 744 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1351,7 +1357,7 @@ namespace regex {
         return true; 
     }
 
-#line 745 "regex.h2"
+#line 751 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", ""));
@@ -1365,7 +1371,7 @@ namespace regex {
         return false; 
     }
 
-#line 758 "regex.h2"
+#line 764 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1374,7 +1380,7 @@ namespace regex {
         return false; 
     }
 
-#line 766 "regex.h2"
+#line 772 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -1471,7 +1477,7 @@ namespace regex {
         return true; 
     }
 
-#line 862 "regex.h2"
+#line 868 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -1507,7 +1513,7 @@ namespace regex {
         return true; 
     }
 
-#line 897 "regex.h2"
+#line 903 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -1531,7 +1537,7 @@ namespace regex {
         return true; 
     }
 
-#line 920 "regex.h2"
+#line 926 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'")));
@@ -1541,7 +1547,7 @@ namespace regex {
         return false; 
     }
 
-#line 929 "regex.h2"
+#line 935 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -1603,7 +1609,7 @@ namespace regex {
         return true; 
     }
 
-#line 990 "regex.h2"
+#line 996 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -1629,7 +1635,7 @@ namespace regex {
         return true; 
     }
 
-#line 1015 "regex.h2"
+#line 1021 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -1651,7 +1657,7 @@ namespace regex {
         }
     }
 
-#line 1036 "regex.h2"
+#line 1042 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -1662,7 +1668,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(named_groups) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1048 "regex.h2"
+#line 1054 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{
     regex_parser parser {regex, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp
index e86a13dbf8..8304178f2e 100644
--- a/regression-tests/test-results/pure2-regex.cpp
+++ b/regression-tests/test-results/pure2-regex.cpp
@@ -56,7 +56,7 @@ class test_basic3 {
 
 #line 191 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::range_matcher_logic,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_M34 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::range_matcher_logic,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_M34 {}; 
   public: test_basic3() = default;
   public: test_basic3(test_basic3 const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_basic3 const&) -> void = delete;
@@ -68,7 +68,7 @@ class test_class {
 
 #line 353 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; 
   public: test_class() = default;
   public: test_class(test_class const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_class const&) -> void = delete;
@@ -80,7 +80,7 @@ class test_left_assoc {
 
 #line 385 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M9 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M9 {}; 
   public: test_left_assoc() = default;
   public: test_left_assoc(test_left_assoc const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_left_assoc const&) -> void = delete;
@@ -92,7 +92,7 @@ class test_right_assoc {
 
 #line 415 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
   public: test_right_assoc() = default;
   public: test_right_assoc(test_right_assoc const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_right_assoc const&) -> void = delete;
@@ -104,7 +104,7 @@ class test_forced_assoc {
 
 #line 461 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
   public: test_forced_assoc() = default;
   public: test_forced_assoc(test_forced_assoc const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_forced_assoc const&) -> void = delete;
@@ -116,7 +116,7 @@ class test_nullsub3 {
 
 #line 546 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
   public: test_nullsub3() = default;
   public: test_nullsub3(test_nullsub3 const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_nullsub3 const&) -> void = delete;
@@ -128,7 +128,7 @@ class test_repetition2 {
 
 #line 682 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
   public: test_repetition2() = default;
   public: test_repetition2(test_repetition2 const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_repetition2 const&) -> void = delete;
@@ -140,7 +140,7 @@ class test_totest {
 
 #line 846 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_01 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_03 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_04 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_05 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_06 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_07 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_08 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_09 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1029 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1032 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,4>>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_01 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_03 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_04 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_05 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_06 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_07 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_08 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_09 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1029 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1032 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,4>>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; 
   public: test_totest() = default;
   public: test_totest(test_totest const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_totest const&) -> void = delete;
@@ -152,7 +152,7 @@ class test_osx_bsd_critical {
 
 #line 942 "pure2-regex.cpp2"
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; 
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; 
   public: test_osx_bsd_critical() = default;
   public: test_osx_bsd_critical(test_osx_bsd_critical const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_osx_bsd_critical const&) -> void = delete;
diff --git a/source/regex.h2 b/source/regex.h2
index bf6eed70d2..ae4ddd8166 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -14,6 +14,8 @@ cpp2: namespace = {
 
 regex: namespace = {
 
+greedy_alternative : bool == false;
+
 view:  type == std::basic_string_view;
 bstring:  type == std::basic_string;
 
@@ -213,12 +215,16 @@ extract_position_helper:  type = {
 alternative_matcher_logic:  type = {
 
     match:  (cur, inout ctx, tail: Tail) -> _ = {
-        max_overall_length: = 0;
-        max_current_length: = 0;
-        r := match_greedy(cur, max_overall_length, max_current_length, ctx, tail);
-        _ = max_overall_length;
-        _ = max_current_length;
-        return r;
+        if constexpr greedy_alternative {
+            max_overall_length: = 0;
+            max_current_length: = 0;
+            r := match_greedy(cur, max_overall_length, max_current_length, ctx, tail);
+            _ = max_overall_length;
+            _ = max_current_length;
+            return r;
+        } else {
+            return match_first(cur, ctx, tail);
+        }
     }
     reset_ranges: (inout ctx)     = (List::reset_ranges(ctx) , ...);
     to_string: ()                   (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'.

From 907e9618a1539285da7f0f18b0b7b430aaa73aed Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 15 Feb 2024 15:36:47 +0100
Subject: [PATCH 047/161] Helpers in match return and first shorthand character
 class.

---
 source/regex.h2 | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/source/regex.h2 b/source/regex.h2
index ae4ddd8166..a505176070 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -57,6 +57,10 @@ match_context:  type
     //
     get_group: (in this, group) groups[group];
 
+    get_group_string: (in this, group) std::string(groups[group].start, groups[group].end);
+    get_group_start:  (in this, group) std::distance(begin, groups[group].start);
+    get_group_end:    (in this, group) std::distance(begin, groups[group].end);
+
     set_group_end: (inout this, group, pos) = {
         groups[group].end = pos;
         groups[group].matched = true;
@@ -476,6 +480,15 @@ line_start_matcher_logic:  type =
     to_string: ()               bstring(1, '^');
 }
 
+// Named character classes
+//
+named_class_matcher_logic:  type =  {
+    this: class_matcher_logic = ();
+    to_string: () bstring(Name.data());
+}
+
+named_class_no_new_line:  type == named_class_matcher_logic>; // TODO: Remove second \, switch to raw strings.
+
 // Regex syntax: {min, max}  Example: a{2,4}
 range_matcher_logic:  type = {
 
@@ -584,6 +597,11 @@ regular_expression:  type
             matched = matched_;
             ctx = ctx_;
         }
+
+        group_number: (this) ctx.size();
+        group:        (this, g: int) ctx.get_group_string(g);
+        group_start:  (this, g: int) ctx.get_group_start(g);
+        group_end:    (this, g: int) ctx.get_group_end(g);
     }
 
     match: (in this, str: view)                 match(str.begin(), str.end());
@@ -893,6 +911,9 @@ regex_parser:  type = {
         else if '\\' == c_next {
             cur_state.add(create_matcher("escaped_char_matcher_logic", "'\\\\'"));
         }
+        else if 'N' == c_next {
+            cur_state.add(create_matcher("named_class_no_new_line", ""));
+        }
         else {
             error("Unknown escape.");
         }

From 6fd7240c0fd4bd64d2dab8ba8ea620210a86c90c Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 15 Feb 2024 15:43:03 +0100
Subject: [PATCH 048/161] Proper error handling.

---
 include/cpp2regex.h | 503 +++++++++++++++++++++++++-------------------
 source/regex.h2     |  46 ++--
 2 files changed, 311 insertions(+), 238 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index bf2d0a81d0..da3b6ae8b1 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -26,82 +26,86 @@ template class match_return;
 #line 41 "regex.h2"
 template class match_context;
 
-#line 105 "regex.h2"
+#line 109 "regex.h2"
 template class matcher_list;
     
 
-#line 132 "regex.h2"
+#line 136 "regex.h2"
 template class single_class_entry;
 
-#line 140 "regex.h2"
+#line 144 "regex.h2"
 template class range_class_entry;
 
-#line 148 "regex.h2"
+#line 152 "regex.h2"
 template class combined_class_entry;
     
 
-#line 155 "regex.h2"
+#line 159 "regex.h2"
 template class list_class_entry;
     
 
-#line 162 "regex.h2"
+#line 166 "regex.h2"
 template class named_class_entry;
     
 
-#line 198 "regex.h2"
+#line 202 "regex.h2"
 template class extract_position_helper;
     
 
-#line 215 "regex.h2"
+#line 219 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 299 "regex.h2"
+#line 303 "regex.h2"
 template class any_matcher_logic;
 
-#line 315 "regex.h2"
+#line 319 "regex.h2"
 template class char_matcher_logic;
 
-#line 331 "regex.h2"
+#line 335 "regex.h2"
 template class class_matcher_logic;
 
-#line 369 "regex.h2"
+#line 373 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 378 "regex.h2"
+#line 382 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 401 "regex.h2"
+#line 405 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 424 "regex.h2"
+#line 428 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 444 "regex.h2"
+#line 448 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 464 "regex.h2"
+#line 468 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 480 "regex.h2"
+#line 485 "regex.h2"
+template                    class named_class_matcher_logic;
+    
+
+#line 493 "regex.h2"
 template class range_matcher_logic;
 
-#line 552 "regex.h2"
+#line 565 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 565 "regex.h2"
+#line 578 "regex.h2"
 template class regular_expression;
 
-#line 631 "regex.h2"
+#line 649 "regex.h2"
 class regex_parser_state;
 
-#line 663 "regex.h2"
+#line 681 "regex.h2"
 template class regex_parser;
 
-#line 1061 "regex.h2"
+#line 1094 "regex.h2"
 }
 }
 
@@ -173,15 +177,19 @@ template auto;
 
+    public: [[nodiscard]] auto get_group_string(auto const& group) const& -> auto;
+    public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
+    public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
+
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 65 "regex.h2"
+#line 69 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 69 "regex.h2"
+#line 73 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 73 "regex.h2"
+#line 77 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -190,12 +198,12 @@ template void;
 
-#line 83 "regex.h2"
+#line 87 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 98 "regex.h2"
+#line 102 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -208,7 +216,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto;
 
-#line 111 "regex.h2"
+#line 115 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
@@ -221,7 +229,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 119 "regex.h2"
+#line 123 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -243,7 +251,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 136 "regex.h2"
+#line 140 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -256,7 +264,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 144 "regex.h2"
+#line 148 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -268,7 +276,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 151 "regex.h2"
+#line 155 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -280,7 +288,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 158 "regex.h2"
+#line 162 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 165 "regex.h2"
+#line 169 "regex.h2"
 };
 
-#line 168 "regex.h2"
+#line 172 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -323,20 +331,20 @@ template         using xdigit_class = named_class_entry class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 207 "regex.h2"
+#line 211 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 209 "regex.h2"
+#line 213 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -347,20 +355,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
 
-#line 229 "regex.h2"
+#line 233 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
 
-#line 247 "regex.h2"
+#line 251 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 295 "regex.h2"
+#line 299 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -369,14 +377,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 309 "regex.h2"
+#line 313 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 311 "regex.h2"
+#line 315 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -385,27 +393,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 324 "regex.h2"
+#line 328 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 326 "regex.h2"
+#line 330 "regex.h2"
 };
 
-#line 329 "regex.h2"
+#line 333 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 341 "regex.h2"
+#line 345 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 353 "regex.h2"
+#line 357 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -414,7 +422,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 365 "regex.h2"
+#line 369 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -422,13 +430,13 @@ template class class_matcher_logi
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 373 "regex.h2"
+#line 377 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 374 "regex.h2"
+#line 378 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -436,7 +444,7 @@ template class escaped_char_matcher_logic
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 389 "regex.h2"
+#line 393 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -445,13 +453,13 @@ template class group_matcher_start_logic {
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 399 "regex.h2"
+#line 403 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 410 "regex.h2"
+#line 414 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -460,7 +468,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 420 "regex.h2"
+#line 424 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -468,14 +476,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 436 "regex.h2"
+#line 440 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 438 "regex.h2"
+#line 442 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -486,14 +494,14 @@ template class line_end_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 456 "regex.h2"
+#line 460 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 458 "regex.h2"
+#line 462 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -504,16 +512,30 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 475 "regex.h2"
+#line 479 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 477 "regex.h2"
+#line 481 "regex.h2"
+};
+
+// Named character classes
+//
+template                    class named_class_matcher_logic: public class_matcher_logic {
+
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: named_class_matcher_logic() = default;
+    public: named_class_matcher_logic(named_class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(named_class_matcher_logic const&) -> void = delete;
+
+#line 488 "regex.h2"
 };
 
+template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
+
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
@@ -522,23 +544,23 @@ template class range_m
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 504 "regex.h2"
+#line 517 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 509 "regex.h2"
+#line 522 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 514 "regex.h2"
+#line 527 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 520 "regex.h2"
+#line 533 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 548 "regex.h2"
+#line 561 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -550,7 +572,7 @@ template
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
-#line 555 "regex.h2"
+#line 568 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -567,18 +589,23 @@ template c
 
     private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
 
-#line 578 "regex.h2"
+#line 591 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
         public: context ctx; 
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
+
+#line 601 "regex.h2"
+        public: [[nodiscard]] auto group_number() const& -> auto;
+        public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
+        public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
+        public: [[nodiscard]] auto group_end(cpp2::in g) const& -> auto;
         public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */
         public: auto operator=(search_return const&) -> void = delete;
 
-
-#line 587 "regex.h2"
+#line 605 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -586,19 +613,19 @@ template c
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 599 "regex.h2"
+#line 617 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 621 "regex.h2"
+#line 639 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 622 "regex.h2"
+#line 640 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -618,19 +645,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 645 "regex.h2"
+#line 663 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 650 "regex.h2"
+#line 668 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 659 "regex.h2"
+#line 677 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 663 "regex.h2"
+#line 681 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -640,6 +667,7 @@ template class regex_parser {
     private: int named_groups {1}; // Global capture group.
     private: int alternatives_count {0}; 
 
+    private: bool has_error {false}; 
     private: Error_out error_out; 
 
     private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
@@ -647,75 +675,75 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, Error_out const& e);
 
-#line 682 "regex.h2"
+#line 701 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 690 "regex.h2"
+#line 709 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 694 "regex.h2"
+#line 713 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 700 "regex.h2"
+#line 720 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 707 "regex.h2"
+#line 727 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 729 "regex.h2"
+#line 749 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 741 "regex.h2"
+#line 761 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 751 "regex.h2"
+#line 771 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 764 "regex.h2"
+#line 784 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 772 "regex.h2"
+#line 792 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 868 "regex.h2"
+#line 890 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 903 "regex.h2"
+#line 929 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 926 "regex.h2"
+#line 952 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 935 "regex.h2"
+#line 961 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 996 "regex.h2"
+#line 1024 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1021 "regex.h2"
+#line 1050 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1042 "regex.h2"
+#line 1073 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1052 "regex.h2"
+#line 1085 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string;
 
-#line 1061 "regex.h2"
+#line 1094 "regex.h2"
 }
 }
 
@@ -768,33 +796,40 @@ namespace regex {
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
 #line 60 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> auto { return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end);  }
+#line 61 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
+#line 62 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
+
+#line 64 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 65 "regex.h2"
+#line 69 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 69 "regex.h2"
+#line 73 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 73 "regex.h2"
+#line 77 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 77 "regex.h2"
+#line 81 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 79 "regex.h2"
+#line 83 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 85 "regex.h2"
+#line 89 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -809,53 +844,53 @@ namespace regex {
         return r; 
     }
 
-#line 106 "regex.h2"
+#line 110 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx);  }
 
-#line 108 "regex.h2"
+#line 112 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { 
         return match_select(cur, ctx);  }
 
-#line 111 "regex.h2"
+#line 115 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { 
         return First::match(cur, ctx, matcher_list());  }
-#line 113 "regex.h2"
+#line 117 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur);  }
 
-#line 115 "regex.h2"
+#line 119 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 116 "regex.h2"
+#line 120 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 118 "regex.h2"
+#line 122 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 134 "regex.h2"
+#line 138 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 135 "regex.h2"
+#line 139 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 142 "regex.h2"
+#line 146 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 143 "regex.h2"
+#line 147 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 149 "regex.h2"
+#line 153 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 150 "regex.h2"
+#line 154 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 156 "regex.h2"
+#line 160 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 157 "regex.h2"
+#line 161 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 163 "regex.h2"
+#line 167 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 164 "regex.h2"
+#line 168 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 199 "regex.h2"
+#line 203 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -864,12 +899,12 @@ namespace regex {
         return r; 
     }
 
-#line 207 "regex.h2"
+#line 211 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 208 "regex.h2"
+#line 212 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 217 "regex.h2"
+#line 221 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -882,12 +917,12 @@ namespace regex {
             return match_first(cur, ctx, tail); 
         }
     }
-#line 229 "regex.h2"
+#line 233 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 230 "regex.h2"
+#line 234 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 232 "regex.h2"
+#line 236 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, tail)}; 
         if (r.matched) {
@@ -903,7 +938,7 @@ namespace regex {
         }
     }
 
-#line 247 "regex.h2"
+#line 251 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
         auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
 
@@ -919,7 +954,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 263 "regex.h2"
+#line 267 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -931,7 +966,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 275 "regex.h2"
+#line 279 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -953,7 +988,7 @@ namespace regex {
         }
     }
 
-#line 301 "regex.h2"
+#line 305 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end) {
             return Other::match(cur + 1, ctx); 
@@ -962,12 +997,12 @@ namespace regex {
         }
     }
 
-#line 309 "regex.h2"
+#line 313 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 310 "regex.h2"
+#line 314 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 317 "regex.h2"
+#line 321 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
             return Other::match(cur + 1, ctx); 
@@ -975,12 +1010,12 @@ namespace regex {
             return match_return(false, ctx.end); 
         }
     }
-#line 324 "regex.h2"
+#line 328 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 325 "regex.h2"
+#line 329 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 333 "regex.h2"
+#line 337 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
             return Other::match(cur + 1, ctx); 
@@ -989,7 +1024,7 @@ namespace regex {
         }
     }
 
-#line 341 "regex.h2"
+#line 345 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1002,10 +1037,10 @@ namespace regex {
         return r; 
     }
 
-#line 353 "regex.h2"
+#line 357 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 355 "regex.h2"
+#line 359 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1017,10 +1052,10 @@ namespace regex {
         return r; 
     }
 
-#line 373 "regex.h2"
+#line 377 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 379 "regex.h2"
+#line 383 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1031,10 +1066,10 @@ namespace regex {
         return r; 
     }
 
-#line 389 "regex.h2"
+#line 393 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 391 "regex.h2"
+#line 395 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{
         if (group != 0) {
             return "("; 
@@ -1044,7 +1079,7 @@ namespace regex {
         }
     }
 
-#line 402 "regex.h2"
+#line 406 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1053,10 +1088,10 @@ namespace regex {
         return r; 
     }
 
-#line 410 "regex.h2"
+#line 414 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 412 "regex.h2"
+#line 416 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1066,7 +1101,7 @@ namespace regex {
         }
     }
 
-#line 425 "regex.h2"
+#line 429 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1078,12 +1113,12 @@ namespace regex {
 
         return Other::match(cur, ctx); 
     }
-#line 436 "regex.h2"
+#line 440 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 437 "regex.h2"
+#line 441 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return "\\(" + cpp2::to_string(group) + ")"; }
 
-#line 446 "regex.h2"
+#line 450 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.end || *cpp2::assert_not_null(cur) == '\n') {
             return Other::match(cur, ctx); 
@@ -1094,12 +1129,12 @@ namespace regex {
 
     }
 
-#line 456 "regex.h2"
+#line 460 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 457 "regex.h2"
+#line 461 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 466 "regex.h2"
+#line 470 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.begin || *cpp2::assert_not_null((cur - 1)) == '\n') {
             return Other::match(cur, ctx); 
@@ -1109,17 +1144,20 @@ namespace regex {
         }
 
     }
-#line 475 "regex.h2"
+#line 479 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 476 "regex.h2"
+#line 480 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 482 "regex.h2"
+#line 487 "regex.h2"
+    template  [[nodiscard]] auto named_class_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
+
+#line 495 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); }
-#line 483 "regex.h2"
+#line 496 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 485 "regex.h2"
+#line 498 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1139,26 +1177,26 @@ namespace regex {
       return r; 
     }
 
-#line 504 "regex.h2"
+#line 517 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 509 "regex.h2"
+#line 522 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 514 "regex.h2"
+#line 527 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 520 "regex.h2"
+#line 533 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto r {M::match(cur, ctx, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1188,10 +1226,10 @@ namespace regex {
         }
     }
 
-#line 554 "regex.h2"
+#line 567 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol;  }
 
-#line 569 "regex.h2"
+#line 582 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1201,21 +1239,30 @@ namespace regex {
         }
     }
 
-#line 583 "regex.h2"
+#line 596 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 586 "regex.h2"
+#line 599 "regex.h2"
         }
 
-#line 589 "regex.h2"
+#line 601 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 602 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+#line 603 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 604 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+
+#line 607 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 590 "regex.h2"
+#line 608 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 591 "regex.h2"
+#line 609 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 592 "regex.h2"
+#line 610 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1223,13 +1270,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 599 "regex.h2"
+#line 617 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 600 "regex.h2"
+#line 618 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 601 "regex.h2"
+#line 619 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 602 "regex.h2"
+#line 620 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1249,26 +1296,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 621 "regex.h2"
+#line 639 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 639 "regex.h2"
+#line 657 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 645 "regex.h2"
+#line 663 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 650 "regex.h2"
+#line 668 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 652 "regex.h2"
+#line 670 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1276,35 +1323,36 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 659 "regex.h2"
+#line 677 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 677 "regex.h2"
+#line 696 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 680 "regex.h2"
+#line 699 "regex.h2"
     }
 
-#line 684 "regex.h2"
+#line 703 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 690 "regex.h2"
+#line 709 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 696 "regex.h2"
+#line 715 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
+        has_error = true;
     }
 
-#line 700 "regex.h2"
+#line 720 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1312,10 +1360,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 707 "regex.h2"
+#line 727 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 709 "regex.h2"
+#line 729 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1336,7 +1384,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 729 "regex.h2"
+#line 749 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1349,7 +1397,7 @@ namespace regex {
         return r; 
     }
 
-#line 744 "regex.h2"
+#line 764 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1357,7 +1405,7 @@ namespace regex {
         return true; 
     }
 
-#line 751 "regex.h2"
+#line 771 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", ""));
@@ -1371,7 +1419,7 @@ namespace regex {
         return false; 
     }
 
-#line 764 "regex.h2"
+#line 784 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1380,7 +1428,7 @@ namespace regex {
         return false; 
     }
 
-#line 772 "regex.h2"
+#line 792 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -1415,11 +1463,12 @@ namespace regex {
                 pos += 2; // Skip ':]'
 
                 auto end {CPP2_UFCS(find)(regex, ":]", pos)}; 
-                if (end == std::string::npos) {error_out("Could not find end of character class."); }
+                if (end == std::string::npos) {error("Could not find end of character class."); return false; }
 
                 auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; 
                 if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
-                    error_out(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))));
+                    error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))));
+                    return false; 
                 }
 
                 CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
@@ -1451,7 +1500,8 @@ namespace regex {
         static_cast(std::move(next_item));// TODO: Use in while is not recognized.
 
         if (std::move(c_cur) != ']') {
-            error_out("Error end of character class definition before terminating ']'.");
+            error("Error end of character class definition before terminating ']'.");
+            return false; 
         }
 
         if (std::move(range)) {// If '-' is last entry treat it as a literal char.
@@ -1477,20 +1527,20 @@ namespace regex {
         return true; 
     }
 
-#line 868 "regex.h2"
+#line 890 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
         pos += 1;
 
-        if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); }
+        if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); return false; }
 
         char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
 
         if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
             int group_id {c_next - '0'}; 
 
-            if (cpp2::cmp_greater_eq(group_id,named_groups)) {error("Group reference is used before the group is declared."); }
+            if (cpp2::cmp_greater_eq(group_id,named_groups)) {error("Group reference is used before the group is declared."); return false; }
 
             CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)))));
         }
@@ -1503,17 +1553,21 @@ namespace regex {
                 CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "'")));
             }
         }
-        else {if ('\\' == std::move(c_next)) {
+        else {if ('\\' == c_next) {
             CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\'"));
         }
+        else {if ('N' == std::move(c_next)) {
+            CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", ""));
+        }
         else {
             error("Unknown escape.");
-        }}}
+            return false; 
+        }}}}
 
         return true; 
     }
 
-#line 903 "regex.h2"
+#line 929 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -1537,7 +1591,7 @@ namespace regex {
         return true; 
     }
 
-#line 926 "regex.h2"
+#line 952 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'")));
@@ -1547,7 +1601,7 @@ namespace regex {
         return false; 
     }
 
-#line 935 "regex.h2"
+#line 961 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -1561,13 +1615,13 @@ namespace regex {
         }}; 
 
         if (c != '{') {return false; }
-        if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element."); }
+        if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element.");return false; }
 
         size_t end {CPP2_UFCS(find)(regex, "}", pos)}; 
-        if (end == std::string::npos) {error("Missing closing bracket."); }
+        if (end == std::string::npos) {error("Missing closing bracket."); return false; }
 
         std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; 
-        if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
+        if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
         std::string min_count {"-1"}; 
         int min_count_number {0}; 
@@ -1587,6 +1641,7 @@ namespace regex {
 
             if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) {
                 error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
+                return false; 
             }
 
             if (!(CPP2_UFCS(empty)(inner_first))) {
@@ -1601,6 +1656,7 @@ namespace regex {
 
         if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) {
             error(("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string(std::move(min_count_number)) + " <= " + cpp2::to_string(std::move(max_count_number))));
+            return false; 
         }
 
         CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2)));  });
@@ -1609,7 +1665,7 @@ namespace regex {
         return true; 
     }
 
-#line 996 "regex.h2"
+#line 1024 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -1629,38 +1685,43 @@ namespace regex {
 
         if (CPP2_UFCS(empty)(cur_state)) {
             error(("'" + cpp2::to_string(c) + "' without previous element."));
+            return false; 
         }
 
         CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", '" + cpp2::to_string(_3) + "'"));  });
         return true; 
     }
 
-#line 1021 "regex.h2"
+#line 1050 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
 
             if (c == term) {return ; }
 
-            if (is_alternative(c)) {continue; }
-            if (is_any(c)) {continue; }
-            if (is_class(c)) {continue; }
-            if (is_escape(c)) {continue; }
-            if (is_anchor(c)) {continue; }
-            if (is_group(c)) {continue; }
-            if (is_handle_special(c)) {continue; }
-            if (is_range(c)) {continue; }
-            if (is_special_range(c)) {continue; }
+            if (!(has_error) && is_alternative(c)) {continue; }
+            if (!(has_error) && is_any(c)) {continue; }
+            if (!(has_error) && is_class(c)) {continue; }
+            if (!(has_error) && is_escape(c)) {continue; }
+            if (!(has_error) && is_anchor(c)) {continue; }
+            if (!(has_error) && is_group(c)) {continue; }
+            if (!(has_error) && is_handle_special(c)) {continue; }
+            if (!(has_error) && is_range(c)) {continue; }
+            if (!(has_error) && is_special_range(c)) {continue; }
+
+            if (has_error) {return ; }
 
             // No special char, push a character match
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "'")));
         }
     }
 
-#line 1042 "regex.h2"
+#line 1073 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
+        if (has_error) {return "Error"; }
+
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
@@ -1668,7 +1729,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(named_groups) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1054 "regex.h2"
+#line 1087 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{
     regex_parser parser {regex, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index a505176070..fdd34c7db1 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -687,6 +687,7 @@ regex_parser:  type = {
     named_groups: int = 1; // Global capture group.
     alternatives_count: int = 0;
 
+    has_error: bool = false;
     error_out: Error_out;
 
     supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
@@ -713,6 +714,7 @@ regex_parser:  type = {
     //
     error:(inout this, message: std::string) = {
         error_out("Error during parsing of regex '(regex)$' at position '(pos)$': (message)$");
+        has_error = true;
     }
 
     create_matcher: (in this, name: std::string, template_arguments: std::string) -> _ = {
@@ -821,11 +823,12 @@ regex_parser:  type = {
                 pos += 2; // Skip ':]'
 
                 end := regex.find(":]", pos);
-                if end == std::string::npos { error_out("Could not find end of character class."); }
+                if end == std::string::npos { error("Could not find end of character class."); return false; }
 
                 name := regex.substr(pos, end - pos);
                 if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) {
-                    error_out("Unsupported character class. Supported ones are: (join(supported_classes))$");
+                    error("Unsupported character class. Supported ones are: (join(supported_classes))$");
+                    return false;
                 }
 
                 classes.push_back("[:(name)$:]");
@@ -857,7 +860,8 @@ regex_parser:  type = {
         _ = next_item; // TODO: Use in while is not recognized.
 
         if c_cur != ']' {
-            error_out("Error end of character class definition before terminating ']'.");
+            error("Error end of character class definition before terminating ']'.");
+            return false;
         }
 
         if range { // If '-' is last entry treat it as a literal char.
@@ -888,14 +892,14 @@ regex_parser:  type = {
 
         pos += 1;
 
-        if pos >= regex.size() { error("Escape without a following character."); }
+        if pos >= regex.size() { error("Escape without a following character."); return false;}
 
         c_next: char = regex[pos];
 
         if '1' <= c_next <= '9' {
             group_id: int = c_next - '0';
 
-            if group_id >= named_groups { error("Group reference is used before the group is declared."); }
+            if group_id >= named_groups { error("Group reference is used before the group is declared."); return false; }
 
             cur_state.add(create_matcher("group_ref_matcher_logic", "(group_id)$"));
         }
@@ -916,6 +920,7 @@ regex_parser:  type = {
         }
         else {
             error("Unknown escape.");
+            return false;
         }
 
         return true;
@@ -966,13 +971,13 @@ regex_parser:  type = {
         };
 
         if c != '{' { return false; }
-        if cur_state.empty() { error("'{' without previous element."); }
+        if cur_state.empty() { error("'{' without previous element.");  return false; }
 
         end: size_t = regex.find("}", pos);
-        if end == std::string::npos { error("Missing closing bracket."); }
+        if end == std::string::npos { error("Missing closing bracket."); return false; }
 
         inner: std::string = trim_copy(regex.substr(pos + 1, end - pos - 1));
-        if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
+        if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
         min_count: std::string = "-1";
         min_count_number: int  = 0;
@@ -992,6 +997,7 @@ regex_parser:  type = {
 
             if (inner_first.empty() && inner_last.empty()) {
                 error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
+                return false;
             }
 
             if !inner_first.empty() {
@@ -1006,6 +1012,7 @@ regex_parser:  type = {
 
         if !(0 <= min_count_number <= max_count_number) {
             error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (min_count_number)$ <= (max_count_number)$");
+            return false;
         }
 
         cur_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$"));
@@ -1033,6 +1040,7 @@ regex_parser:  type = {
 
         if cur_state.empty() {
             error("'(c)$' without previous element.");
+            return false;
         }
 
         cur_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, '(c$)$'"));
@@ -1045,15 +1053,17 @@ regex_parser:  type = {
 
             if c == term { return; }
 
-            if is_alternative(c) { continue; }
-            if is_any(c) { continue; }
-            if is_class(c) { continue; }
-            if is_escape(c) { continue; }
-            if is_anchor(c) { continue; }
-            if is_group(c) { continue; }
-            if is_handle_special(c) { continue; }
-            if is_range(c) { continue; }
-            if is_special_range(c) { continue; }
+            if !has_error && is_alternative(c) { continue; }
+            if !has_error && is_any(c) { continue; }
+            if !has_error && is_class(c) { continue; }
+            if !has_error && is_escape(c) { continue; }
+            if !has_error && is_anchor(c) { continue; }
+            if !has_error && is_group(c) { continue; }
+            if !has_error && is_handle_special(c) { continue; }
+            if !has_error && is_range(c) { continue; }
+            if !has_error && is_special_range(c) { continue; }
+
+            if has_error { return; }
 
             // No special char, push a character match
             cur_state.add(create_matcher("char_matcher_logic", "'(c)$'"));
@@ -1063,6 +1073,8 @@ regex_parser:  type = {
     parse:(inout this) -> std::string = {
         parse_until('\0');
 
+        if has_error { return "Error"; }
+
         inner := create_matcher_from_state();
         start := create_matcher("group_matcher_start_logic", "0");
         end   := create_matcher("group_matcher_end_logic", "0");

From 80a05dbf8b812eb983ede1f6b6154be7be67dd69 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 15 Feb 2024 22:02:10 +0100
Subject: [PATCH 049/161] Escaped characters from perl.

---
 include/cpp2regex.h | 689 +++++++++++++++++++++++++++-----------------
 source/regex.h2     | 153 +++++++++-
 2 files changed, 569 insertions(+), 273 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index da3b6ae8b1..747ac88b77 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -24,88 +24,103 @@ template class match_return;
     
 
 #line 41 "regex.h2"
-template class match_context;
+template class match_context;
 
-#line 109 "regex.h2"
+#line 114 "regex.h2"
 template class matcher_list;
     
 
-#line 136 "regex.h2"
+#line 141 "regex.h2"
 template class single_class_entry;
 
-#line 144 "regex.h2"
+#line 149 "regex.h2"
 template class range_class_entry;
 
-#line 152 "regex.h2"
+#line 157 "regex.h2"
 template class combined_class_entry;
     
 
-#line 159 "regex.h2"
+#line 164 "regex.h2"
 template class list_class_entry;
     
 
-#line 166 "regex.h2"
+#line 171 "regex.h2"
 template class named_class_entry;
     
 
-#line 202 "regex.h2"
+#line 176 "regex.h2"
+template class negated_class_entry;
+    
+
+#line 183 "regex.h2"
+template class shorthand_class_entry;
+    
+
+#line 229 "regex.h2"
 template class extract_position_helper;
     
 
-#line 219 "regex.h2"
+#line 246 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 303 "regex.h2"
+#line 330 "regex.h2"
 template class any_matcher_logic;
 
-#line 319 "regex.h2"
+#line 346 "regex.h2"
 template class char_matcher_logic;
 
-#line 335 "regex.h2"
+#line 362 "regex.h2"
 template class class_matcher_logic;
 
-#line 373 "regex.h2"
+#line 400 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 382 "regex.h2"
+#line 409 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 405 "regex.h2"
+#line 432 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 428 "regex.h2"
+#line 455 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 448 "regex.h2"
-template class line_end_matcher_logic;
+#line 475 "regex.h2"
+template class line_end_matcher_logic;
 
-#line 468 "regex.h2"
-template class line_start_matcher_logic;
+#line 497 "regex.h2"
+template class line_start_matcher_logic;
+
+#line 515 "regex.h2"
+template class named_matcher_logic;
+    
 
-#line 485 "regex.h2"
+#line 519 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 493 "regex.h2"
+#line 541 "regex.h2"
 template class range_matcher_logic;
 
-#line 565 "regex.h2"
+#line 613 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 578 "regex.h2"
+#line 622 "regex.h2"
+template class word_boundary_matcher_logic;
+
+#line 672 "regex.h2"
 template class regular_expression;
 
-#line 649 "regex.h2"
+#line 743 "regex.h2"
 class regex_parser_state;
 
-#line 681 "regex.h2"
+#line 775 "regex.h2"
 template class regex_parser;
 
-#line 1094 "regex.h2"
+#line 1215 "regex.h2"
 }
 }
 
@@ -154,7 +169,7 @@ template class match_return {
     public: Iter pos {}; 
 };
 
-template class match_context
+template class match_context
  {
     public: Iter begin; 
     public: Iter end; 
@@ -177,19 +192,21 @@ template auto;
 
-    public: [[nodiscard]] auto get_group_string(auto const& group) const& -> auto;
+    public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
+
+#line 66 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
 
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 69 "regex.h2"
+#line 74 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 73 "regex.h2"
+#line 78 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 77 "regex.h2"
+#line 82 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -198,12 +215,12 @@ template void;
 
-#line 87 "regex.h2"
+#line 92 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 102 "regex.h2"
+#line 107 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -216,7 +233,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto;
 
-#line 115 "regex.h2"
+#line 120 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
@@ -229,7 +246,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 123 "regex.h2"
+#line 128 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -251,7 +268,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 140 "regex.h2"
+#line 145 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -264,7 +281,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 148 "regex.h2"
+#line 153 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -276,7 +293,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 155 "regex.h2"
+#line 160 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -288,7 +305,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 162 "regex.h2"
+#line 167 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 169 "regex.h2"
+#line 174 "regex.h2"
 };
 
-#line 172 "regex.h2"
+template class negated_class_entry: public Inner {
+
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: negated_class_entry() = default;
+    public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(negated_class_entry const&) -> void = delete;
+
+#line 179 "regex.h2"
+};
+
+// Short class syntax: \  Example: \w
+//
+template class shorthand_class_entry {
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: shorthand_class_entry() = default;
+    public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(shorthand_class_entry const&) -> void = delete;
+
+#line 186 "regex.h2"
+};
+
+#line 189 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -324,6 +363,16 @@ template         using space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template         using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
+// Shorthand class entries
+//
+template using short_digits_class = shorthand_class_entry>;
+template              using short_word_class = shorthand_class_entry>;
+template              using short_space_class = shorthand_class_entry>;
+
+template using short_not_digits_class = negated_class_entry>>;
+template                  using short_not_word_class = negated_class_entry>>;
+template                  using short_not_space_class = negated_class_entry>>;
+
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -331,20 +380,20 @@ template         using xdigit_class = named_class_entry class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 211 "regex.h2"
+#line 238 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 213 "regex.h2"
+#line 240 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -355,20 +404,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
 
-#line 233 "regex.h2"
+#line 260 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
 
-#line 251 "regex.h2"
+#line 278 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 299 "regex.h2"
+#line 326 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -377,14 +426,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 313 "regex.h2"
+#line 340 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 315 "regex.h2"
+#line 342 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -393,27 +442,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 328 "regex.h2"
+#line 355 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 330 "regex.h2"
+#line 357 "regex.h2"
 };
 
-#line 333 "regex.h2"
+#line 360 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 345 "regex.h2"
+#line 372 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 357 "regex.h2"
+#line 384 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -422,7 +471,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 369 "regex.h2"
+#line 396 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -430,13 +479,13 @@ template class class_matcher_logi
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 377 "regex.h2"
+#line 404 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 378 "regex.h2"
+#line 405 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -444,7 +493,7 @@ template class escaped_char_matcher_logic
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 393 "regex.h2"
+#line 420 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -453,13 +502,13 @@ template class group_matcher_start_logic {
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 403 "regex.h2"
+#line 430 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 414 "regex.h2"
+#line 441 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -468,7 +517,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 424 "regex.h2"
+#line 451 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -476,66 +525,89 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 440 "regex.h2"
+#line 467 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 442 "regex.h2"
+#line 469 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 // Also matches new lines endings.
 //
-template class line_end_matcher_logic
+template class line_end_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 460 "regex.h2"
+#line 489 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 462 "regex.h2"
+#line 491 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
 //
 // Also matches new line starts.
 //
-template class line_start_matcher_logic
+template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 479 "regex.h2"
+#line 508 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 481 "regex.h2"
+#line 510 "regex.h2"
 };
 
 // Named character classes
 //
-template                    class named_class_matcher_logic: public class_matcher_logic {
+
+template class named_matcher_logic: public Base {
 
     public: [[nodiscard]] static auto to_string() -> auto;
+    public: named_matcher_logic() = default;
+    public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(named_matcher_logic const&) -> void = delete;
+
+#line 518 "regex.h2"
+};
+template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
     public: named_class_matcher_logic(named_class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_matcher_logic const&) -> void = delete;
 
-#line 488 "regex.h2"
+
+#line 521 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
+template using named_class_white_space = named_class_matcher_logic>;
+template using named_class_word = named_class_matcher_logic>;
+template using named_class_digits = named_class_matcher_logic>;
+
+#line 529 "regex.h2"
+template using named_class_not_white_space = named_class_matcher_logic>;
+template using named_class_not_word = named_class_matcher_logic>;
+template using named_class_not_digits = named_class_matcher_logic>;
+
+// Other named matchers
+template using named_string_end_or_before_new_line_at_end = named_matcher_logic>;
+template using named_string_end = named_matcher_logic>;
+template using named_string_start = named_matcher_logic>;
 
+#line 540 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
@@ -544,23 +616,23 @@ template class range_m
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 517 "regex.h2"
+#line 565 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 522 "regex.h2"
+#line 570 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 527 "regex.h2"
+#line 575 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 533 "regex.h2"
+#line 581 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 561 "regex.h2"
+#line 609 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -572,9 +644,29 @@ template
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
-#line 568 "regex.h2"
+#line 616 "regex.h2"
 };
 
+// Regex syntax: \b or \B  Example: \bword\b
+//
+// Matches the start end end of word boundaries.
+//
+template class word_boundary_matcher_logic
+ {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+
+#line 653 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> std::string;
+    public: word_boundary_matcher_logic() = default;
+    public: word_boundary_matcher_logic(word_boundary_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
+
+
+#line 661 "regex.h2"
+};
+
+#line 664 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -589,7 +681,7 @@ template c
 
     private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
 
-#line 591 "regex.h2"
+#line 685 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -597,7 +689,7 @@ template c
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 601 "regex.h2"
+#line 695 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -605,7 +697,7 @@ template c
         public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */
         public: auto operator=(search_return const&) -> void = delete;
 
-#line 605 "regex.h2"
+#line 699 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -613,19 +705,19 @@ template c
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 617 "regex.h2"
+#line 711 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 639 "regex.h2"
+#line 733 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 640 "regex.h2"
+#line 734 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -645,19 +737,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 663 "regex.h2"
+#line 757 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 668 "regex.h2"
+#line 762 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 677 "regex.h2"
+#line 771 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 681 "regex.h2"
+#line 775 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -675,75 +767,75 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, Error_out const& e);
 
-#line 701 "regex.h2"
+#line 795 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 709 "regex.h2"
+#line 803 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 713 "regex.h2"
+#line 807 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 720 "regex.h2"
+#line 814 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 727 "regex.h2"
+#line 821 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 749 "regex.h2"
+#line 843 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 761 "regex.h2"
+#line 855 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 771 "regex.h2"
+#line 865 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 784 "regex.h2"
+#line 878 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 792 "regex.h2"
+#line 886 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 890 "regex.h2"
+#line 1002 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 929 "regex.h2"
+#line 1050 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 952 "regex.h2"
+#line 1073 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 961 "regex.h2"
+#line 1082 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1024 "regex.h2"
+#line 1145 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1050 "regex.h2"
+#line 1171 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1073 "regex.h2"
+#line 1194 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1085 "regex.h2"
+#line 1206 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string;
 
-#line 1094 "regex.h2"
+#line 1215 "regex.h2"
 }
 }
 
@@ -758,7 +850,7 @@ namespace cpp2 {
 namespace regex {
 
 #line 49 "regex.h2"
-    template  match_context::match_context(Iter const& begin_, Iter const& end_)
+    template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
@@ -766,26 +858,26 @@ namespace regex {
     }
 
 #line 54 "regex.h2"
-    template  match_context::match_context(match_context const& that)
+    template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
 #line 54 "regex.h2"
-    template  auto match_context::operator=(match_context const& that) -> match_context& {
+    template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
 #line 54 "regex.h2"
-    template  match_context::match_context(match_context&& that) noexcept
+    template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
 #line 54 "regex.h2"
-    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
+    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
                                    groups = std::move(that).groups;
@@ -793,44 +885,49 @@ namespace regex {
                                    return *this; }
 
 #line 58 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
+    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
 #line 60 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> auto { return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end);  }
-#line 61 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
-#line 62 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
-
-#line 64 "regex.h2"
-    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
+    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
+        if (cpp2::cmp_greater_eq(group,max_groups)) {
+            return ""; 
+        }
+        return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+    }
+#line 66 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
+#line 67 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
+
+#line 69 "regex.h2"
+    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 69 "regex.h2"
-    template  auto match_context::set_group_invalid(auto const& group) & -> void{
+#line 74 "regex.h2"
+    template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 73 "regex.h2"
-    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
+#line 78 "regex.h2"
+    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 77 "regex.h2"
-    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
+#line 82 "regex.h2"
+    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 81 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
+#line 86 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 83 "regex.h2"
-    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
+#line 88 "regex.h2"
+    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 89 "regex.h2"
-    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
+#line 94 "regex.h2"
+    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
             if (cur.matched) {
@@ -844,53 +941,61 @@ namespace regex {
         return r; 
     }
 
-#line 110 "regex.h2"
+#line 115 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx);  }
 
-#line 112 "regex.h2"
+#line 117 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { 
         return match_select(cur, ctx);  }
 
-#line 115 "regex.h2"
+#line 120 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { 
         return First::match(cur, ctx, matcher_list());  }
-#line 117 "regex.h2"
+#line 122 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur);  }
 
-#line 119 "regex.h2"
+#line 124 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 120 "regex.h2"
+#line 125 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 122 "regex.h2"
+#line 127 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 138 "regex.h2"
+#line 143 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 139 "regex.h2"
+#line 144 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 146 "regex.h2"
+#line 151 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 147 "regex.h2"
+#line 152 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 153 "regex.h2"
+#line 158 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 154 "regex.h2"
+#line 159 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 160 "regex.h2"
+#line 165 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 161 "regex.h2"
+#line 166 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 167 "regex.h2"
+#line 172 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 168 "regex.h2"
+#line 173 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 203 "regex.h2"
+#line 178 "regex.h2"
+    template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
+
+#line 184 "regex.h2"
+    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 185 "regex.h2"
+    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
+
+#line 230 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -899,12 +1004,12 @@ namespace regex {
         return r; 
     }
 
-#line 211 "regex.h2"
+#line 238 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 212 "regex.h2"
+#line 239 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 221 "regex.h2"
+#line 248 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -917,12 +1022,12 @@ namespace regex {
             return match_first(cur, ctx, tail); 
         }
     }
-#line 233 "regex.h2"
+#line 260 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 234 "regex.h2"
+#line 261 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 236 "regex.h2"
+#line 263 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, tail)}; 
         if (r.matched) {
@@ -938,7 +1043,7 @@ namespace regex {
         }
     }
 
-#line 251 "regex.h2"
+#line 278 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
         auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
 
@@ -954,7 +1059,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 267 "regex.h2"
+#line 294 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -966,7 +1071,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 279 "regex.h2"
+#line 306 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -988,7 +1093,7 @@ namespace regex {
         }
     }
 
-#line 305 "regex.h2"
+#line 332 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end) {
             return Other::match(cur + 1, ctx); 
@@ -997,12 +1102,12 @@ namespace regex {
         }
     }
 
-#line 313 "regex.h2"
+#line 340 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 314 "regex.h2"
+#line 341 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 321 "regex.h2"
+#line 348 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
             return Other::match(cur + 1, ctx); 
@@ -1010,12 +1115,12 @@ namespace regex {
             return match_return(false, ctx.end); 
         }
     }
-#line 328 "regex.h2"
+#line 355 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 329 "regex.h2"
+#line 356 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 337 "regex.h2"
+#line 364 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
             return Other::match(cur + 1, ctx); 
@@ -1024,7 +1129,7 @@ namespace regex {
         }
     }
 
-#line 345 "regex.h2"
+#line 372 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1037,10 +1142,10 @@ namespace regex {
         return r; 
     }
 
-#line 357 "regex.h2"
+#line 384 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 359 "regex.h2"
+#line 386 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1052,10 +1157,10 @@ namespace regex {
         return r; 
     }
 
-#line 377 "regex.h2"
+#line 404 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 383 "regex.h2"
+#line 410 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1066,10 +1171,10 @@ namespace regex {
         return r; 
     }
 
-#line 393 "regex.h2"
+#line 420 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 395 "regex.h2"
+#line 422 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{
         if (group != 0) {
             return "("; 
@@ -1079,7 +1184,7 @@ namespace regex {
         }
     }
 
-#line 406 "regex.h2"
+#line 433 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1088,10 +1193,10 @@ namespace regex {
         return r; 
     }
 
-#line 414 "regex.h2"
+#line 441 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 416 "regex.h2"
+#line 443 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1101,7 +1206,7 @@ namespace regex {
         }
     }
 
-#line 429 "regex.h2"
+#line 456 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1113,30 +1218,32 @@ namespace regex {
 
         return Other::match(cur, ctx); 
     }
-#line 440 "regex.h2"
+#line 467 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 441 "regex.h2"
+#line 468 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return "\\(" + cpp2::to_string(group) + ")"; }
 
-#line 450 "regex.h2"
-    template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur == ctx.end || *cpp2::assert_not_null(cur) == '\n') {
+#line 477 "regex.h2"
+    template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+        if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
+            return Other::match(cur, ctx); 
+        }
+        else {if (!(match_new_line_before_end) && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special cas for new line at end.
             return Other::match(cur, ctx); 
         }
         else {
             return match_return(false, ctx.end); 
-        }
-
+        }}
     }
 
-#line 460 "regex.h2"
-    template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 461 "regex.h2"
-    template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
+#line 489 "regex.h2"
+    template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 490 "regex.h2"
+    template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 470 "regex.h2"
-    template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur == ctx.begin || *cpp2::assert_not_null((cur - 1)) == '\n') {
+#line 499 "regex.h2"
+    template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+        if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx); 
         }
         else {
@@ -1144,20 +1251,20 @@ namespace regex {
         }
 
     }
-#line 479 "regex.h2"
-    template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 480 "regex.h2"
-    template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
+#line 508 "regex.h2"
+    template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 509 "regex.h2"
+    template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 487 "regex.h2"
-    template  [[nodiscard]] auto named_class_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
+#line 517 "regex.h2"
+    template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 495 "regex.h2"
+#line 543 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); }
-#line 496 "regex.h2"
+#line 544 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 498 "regex.h2"
+#line 546 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1177,26 +1284,26 @@ namespace regex {
       return r; 
     }
 
-#line 517 "regex.h2"
+#line 565 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 522 "regex.h2"
+#line 570 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 527 "regex.h2"
+#line 575 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 533 "regex.h2"
+#line 581 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto r {M::match(cur, ctx, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1226,10 +1333,51 @@ namespace regex {
         }
     }
 
-#line 567 "regex.h2"
+#line 615 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol;  }
 
-#line 582 "regex.h2"
+#line 624 "regex.h2"
+    template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+        word_class words {}; 
+        auto is_match {false}; 
+        if (cur == ctx.begin) {// String start
+            if (cur != ctx.end) {// No empty string
+                is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur));
+            }
+        }
+        else {if (cur == ctx.end) {// String end
+            is_match = CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)));
+        }
+        else { // Middle of string
+            is_match = 
+                   (CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)))) // End of word: \w\W
+                || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur)));// Start of word: \W\w
+
+        }}
+        if (negate) {
+            is_match = !(is_match);
+        }
+
+        if (std::move(is_match)) {
+            return Other::match(cur, ctx); 
+        }
+        else {
+            return match_return(false, ctx.end); 
+        }
+
+    }
+#line 653 "regex.h2"
+    template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 654 "regex.h2"
+    template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
+        if (negate) {
+            return "\\B"; 
+        }else {
+            return "\\b"; 
+        }
+    }
+
+#line 676 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1239,30 +1387,30 @@ namespace regex {
         }
     }
 
-#line 596 "regex.h2"
+#line 690 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 599 "regex.h2"
+#line 693 "regex.h2"
         }
 
-#line 601 "regex.h2"
+#line 695 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 602 "regex.h2"
+#line 696 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 603 "regex.h2"
+#line 697 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 604 "regex.h2"
+#line 698 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 607 "regex.h2"
+#line 701 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 608 "regex.h2"
+#line 702 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 609 "regex.h2"
+#line 703 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 610 "regex.h2"
+#line 704 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1270,13 +1418,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 617 "regex.h2"
+#line 711 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 618 "regex.h2"
+#line 712 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 619 "regex.h2"
+#line 713 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 620 "regex.h2"
+#line 714 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1296,26 +1444,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 639 "regex.h2"
+#line 733 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 657 "regex.h2"
+#line 751 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 663 "regex.h2"
+#line 757 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 668 "regex.h2"
+#line 762 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 670 "regex.h2"
+#line 764 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1323,36 +1471,36 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 677 "regex.h2"
+#line 771 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 696 "regex.h2"
+#line 790 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 699 "regex.h2"
+#line 793 "regex.h2"
     }
 
-#line 703 "regex.h2"
+#line 797 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 709 "regex.h2"
+#line 803 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 715 "regex.h2"
+#line 809 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 720 "regex.h2"
+#line 814 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1360,10 +1508,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 727 "regex.h2"
+#line 821 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 729 "regex.h2"
+#line 823 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1384,7 +1532,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 749 "regex.h2"
+#line 843 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1397,7 +1545,7 @@ namespace regex {
         return r; 
     }
 
-#line 764 "regex.h2"
+#line 858 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1405,21 +1553,21 @@ namespace regex {
         return true; 
     }
 
-#line 771 "regex.h2"
+#line 865 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
-            CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", ""));
+            CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
             return true; 
         }
         else {if (c == '$') {
-            CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", ""));
+            CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
             return true; 
         }}
 
         return false; 
     }
 
-#line 784 "regex.h2"
+#line 878 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1428,7 +1576,7 @@ namespace regex {
         return false; 
     }
 
-#line 792 "regex.h2"
+#line 886 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -1475,7 +1623,25 @@ namespace regex {
 
                 end += 1; // Skip ':' pointing to the ending ']'.
                 pos = end;
-
+            }
+            else {if (c_cur == '\\') {
+                if (next_item()  && (c_cur != ']')) {
+                    auto name {""}; 
+                    if (     's' == c_cur) { name = "short_space"; }
+                    else {if ('S' == c_cur) {name = "short_not_space"; }
+                    else {if ('w' == c_cur) {name = "short_word"; }
+                    else {if ('W' == c_cur) {name = "short_not_word"; }
+                    else {if ('d' == c_cur) {name = "short_digits"; }
+                    else {if ('D' == c_cur) {name = "short_not_digits"; }
+                    else {
+                        error("Unknown group escape.");
+                        return false; 
+                    }}}}}}
+                    CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
+                }else {
+                    error("Escape without a following character.");
+                    return false; 
+                }
             }
             else {if (c_cur == '-') {
                 if (first) {// Literal if first entry.
@@ -1492,7 +1658,7 @@ namespace regex {
                 else {
                     CPP2_UFCS(push_back)(classes, (cpp2::to_string(c_cur)));
                 }
-            }}
+            }}}
 
             first = false;
         }
@@ -1527,7 +1693,7 @@ namespace regex {
         return true; 
     }
 
-#line 890 "regex.h2"
+#line 1002 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -1547,7 +1713,7 @@ namespace regex {
         else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
             if (c_next == '$') {
                 // TODO: Provide proper escape for cppfront capture
-                CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", ""));
+                CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
             }
             else {
                 CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "'")));
@@ -1556,18 +1722,27 @@ namespace regex {
         else {if ('\\' == c_next) {
             CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\'"));
         }
-        else {if ('N' == std::move(c_next)) {
-            CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", ""));
-        }
+        else {if ('N' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
+        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_white_space", "")); }
+        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_white_space", "")); }
+        else {if ('w' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_word", "")); }
+        else {if ('W' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_word", "")); }
+        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
+        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
+        else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
+        else {if ('z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
+        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
+        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
+        else {if ('B' == std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
         else {
             error("Unknown escape.");
             return false; 
-        }}}}
+        }}}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 929 "regex.h2"
+#line 1050 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -1591,7 +1766,7 @@ namespace regex {
         return true; 
     }
 
-#line 952 "regex.h2"
+#line 1073 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'")));
@@ -1601,7 +1776,7 @@ namespace regex {
         return false; 
     }
 
-#line 961 "regex.h2"
+#line 1082 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -1665,7 +1840,7 @@ namespace regex {
         return true; 
     }
 
-#line 1024 "regex.h2"
+#line 1145 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -1692,7 +1867,7 @@ namespace regex {
         return true; 
     }
 
-#line 1050 "regex.h2"
+#line 1171 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -1716,7 +1891,7 @@ namespace regex {
         }
     }
 
-#line 1073 "regex.h2"
+#line 1194 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -1729,7 +1904,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(named_groups) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1087 "regex.h2"
+#line 1208 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{
     regex_parser parser {regex, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index fdd34c7db1..9d79149eda 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -38,7 +38,7 @@ match_return: @struct  type = {
     pos: Iter = ();
 }
 
-match_context:  type =
+match_context:  type =
 {
     public begin: Iter;
     public end: Iter;
@@ -57,7 +57,12 @@ match_context:  type
     //
     get_group: (in this, group) groups[group];
 
-    get_group_string: (in this, group) std::string(groups[group].start, groups[group].end);
+    get_group_string: (in this, group) -> std::string = {
+        if group >= max_groups {
+            return "";
+        }
+        return std::string(groups[group].start, groups[group].end);
+    }
     get_group_start:  (in this, group) std::distance(begin, groups[group].start);
     get_group_end:    (in this, group) std::distance(begin, groups[group].end);
 
@@ -168,6 +173,18 @@ named_class_entry:  type = {
     to_string: ()        "[:(Name.data())$:]";
 }
 
+negated_class_entry:  type = {
+    this: Inner = ();
+    includes: (c: CharT) !Inner::includes(c);
+}
+
+// Short class syntax: \  Example: \w
+//
+shorthand_class_entry:  type = {
+    includes: (c: CharT) Inner::includes(c);
+    to_string: ()        bstring(Name.data());
+}
+
 
 // Named basic character classes
 //
@@ -189,6 +206,16 @@ space_class   :  type == named_class_entry type == named_class_entry, single_class_entry>>;
 xdigit_class  :  type == named_class_entry, range_class_entry, digits_class>>;
 
+// Shorthand class entries
+//
+short_digits_class :  type == shorthand_class_entry>;
+short_word_class :    type == shorthand_class_entry>;
+short_space_class :   type == shorthand_class_entry>;
+
+short_not_digits_class :  type == negated_class_entry>>;
+short_not_word_class :    type == negated_class_entry>>;
+short_not_space_class :   type == negated_class_entry>>;
+
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -445,16 +472,18 @@ group_ref_matcher_logic:  type = {
 //
 // Also matches new lines endings.
 //
-line_end_matcher_logic:  type =
+line_end_matcher_logic:  type =
 {
     match:  (cur, inout ctx, _ : Other) -> _ = {
-        if cur == ctx.end || cur* == '\n' {
+        if cur == ctx.end || (match_new_line && cur* == '\n') {
+            return Other::match(cur, ctx);
+        }
+        else if !match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special cas for new line at end.
             return Other::match(cur, ctx);
         }
         else {
             return match_return(false, ctx.end);
         }
-
     }
 
     reset_ranges: (inout ctx) = {}
@@ -465,10 +494,10 @@ line_end_matcher_logic:  type =
 //
 // Also matches new line starts.
 //
-line_start_matcher_logic:  type =
+line_start_matcher_logic:  type =
 {
     match:  (cur, inout ctx, _ : Other) -> _ = {
-        if cur == ctx.begin || (cur - 1)* == '\n' {
+        if cur == ctx.begin || (match_new_line && (cur - 1)* == '\n') {
             return Other::match(cur, ctx);
         }
         else {
@@ -482,12 +511,31 @@ line_start_matcher_logic:  type =
 
 // Named character classes
 //
-named_class_matcher_logic:  type =  {
-    this: class_matcher_logic = ();
+
+named_matcher_logic:  type = {
+    this: Base = ();
     to_string: () bstring(Name.data());
 }
+named_class_matcher_logic:  type =  {
+    this: named_matcher_logic> = ();
+}
 
 named_class_no_new_line:  type == named_class_matcher_logic>; // TODO: Remove second \, switch to raw strings.
+named_class_white_space:  type == named_class_matcher_logic>;
+named_class_word:  type == named_class_matcher_logic>;
+named_class_digits:  type == named_class_matcher_logic>;
+
+
+named_class_not_white_space:  type == named_class_matcher_logic>;
+named_class_not_word:  type == named_class_matcher_logic>;
+named_class_not_digits:  type == named_class_matcher_logic>;
+
+// Other named matchers
+named_string_end_or_before_new_line_at_end:  type == named_matcher_logic>;
+named_string_end:  type == named_matcher_logic>;
+named_string_start:  type == named_matcher_logic>;
+
+
 
 // Regex syntax: {min, max}  Example: a{2,4}
 range_matcher_logic:  type = {
@@ -567,6 +615,52 @@ special_range_matcher_logic:  type =
+{
+    match:  (cur, inout ctx, _: Other) -> _ = {
+        words : word_class = ();
+        is_match := false;
+        if cur == ctx.begin { // String start
+            if cur != ctx.end { // No empty string
+                is_match = words.includes(cur*);
+            }
+        }
+        else if cur == ctx.end { // String end
+            is_match = words.includes((cur - 1)*);
+        }
+        else { // Middle of string
+            is_match =
+                   (words.includes((cur - 1)*) && !words.includes(cur*))  // End of word: \w\W
+                || (!words.includes((cur - 1)*) && words.includes(cur*)); // Start of word: \W\w
+
+        }
+        if negate {
+            is_match = !is_match;
+        }
+
+        if is_match{
+            return Other::match(cur, ctx);
+        }
+        else {
+            return match_return(false, ctx.end);
+        }
+
+    }
+    reset_ranges: (inout ctx) = {}
+    to_string: () -> std::string = {
+        if negate {
+            return "\\B";
+        } else {
+            return "\\b";
+        }
+    }
+}
+
+
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -770,11 +864,11 @@ regex_parser:  type = {
 
     is_anchor: (inout this, c: char) -> bool = {
         if c == '^' {
-            cur_state.add(create_matcher("line_start_matcher_logic", ""));
+            cur_state.add(create_matcher("line_start_matcher_logic", "true"));
             return true;
         }
         else if c == '$' {
-            cur_state.add(create_matcher("line_end_matcher_logic", ""));
+            cur_state.add(create_matcher("line_end_matcher_logic", "true, false"));
             return true;
         }
 
@@ -835,7 +929,25 @@ regex_parser:  type = {
 
                 end += 1; // Skip ':' pointing to the ending ']'.
                 pos = end;
-
+            }
+            else if c_cur == '\\' {
+                if next_item()  && (c_cur != ']') {
+                    name := "";
+                    if      's' == c_cur { name = "short_space"; }
+                    else if 'S' == c_cur { name = "short_not_space"; }
+                    else if 'w' == c_cur { name = "short_word"; }
+                    else if 'W' == c_cur { name = "short_not_word"; }
+                    else if 'd' == c_cur { name = "short_digits"; }
+                    else if 'D' == c_cur { name = "short_not_digits"; }
+                    else {
+                        error("Unknown group escape.");
+                        return false;
+                    }
+                    classes.push_back("[:(name)$:]");
+                } else {
+                    error("Escape without a following character.");
+                    return false;
+                }
             }
             else if c_cur == '-' {
                 if first { // Literal if first entry.
@@ -906,7 +1018,7 @@ regex_parser:  type = {
         else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {
                 // TODO: Provide proper escape for cppfront capture
-                cur_state.add(create_matcher("line_end_matcher_logic", ""));
+                cur_state.add(create_matcher("line_end_matcher_logic", "true, false"));
             }
             else {
                 cur_state.add(create_matcher("escaped_char_matcher_logic", "'(c_next)$'"));
@@ -915,9 +1027,18 @@ regex_parser:  type = {
         else if '\\' == c_next {
             cur_state.add(create_matcher("escaped_char_matcher_logic", "'\\\\'"));
         }
-        else if 'N' == c_next {
-            cur_state.add(create_matcher("named_class_no_new_line", ""));
-        }
+        else if 'N' == c_next { cur_state.add(create_matcher("named_class_no_new_line", "")); }
+        else if 's' == c_next { cur_state.add(create_matcher("named_class_white_space", "")); }
+        else if 'S' == c_next { cur_state.add(create_matcher("named_class_not_white_space", "")); }
+        else if 'w' == c_next { cur_state.add(create_matcher("named_class_word", "")); }
+        else if 'W' == c_next { cur_state.add(create_matcher("named_class_not_word", "")); }
+        else if 'd' == c_next { cur_state.add(create_matcher("named_class_digits", "")); }
+        else if 'D' == c_next { cur_state.add(create_matcher("named_class_not_digits", "")); }
+        else if 'Z' == c_next { cur_state.add(create_matcher("named_string_end_or_before_new_line_at_end", "")); }
+        else if 'z' == c_next { cur_state.add(create_matcher("named_string_end", "")); }
+        else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
+        else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
+        else if 'B' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "true")); }
         else {
             error("Unknown escape.");
             return false;

From 14d873c0e2cd35f9668ed739a615597d47236c66 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 17 Feb 2024 19:24:19 +0100
Subject: [PATCH 050/161] Group escapes and named group handling.

---
 include/cpp2regex.h   | 707 +++++++++++++++++++++++++-----------------
 include/string_util.h |  16 +
 source/regex.h2       | 181 +++++++++--
 3 files changed, 593 insertions(+), 311 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 747ac88b77..ecefd05f42 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,117 +10,117 @@
 
 #line 1 "regex.h2"
 
-#line 13 "regex.h2"
+#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 29 "regex.h2"
+#line 31 "regex.h2"
 template class match_group;
     
 
-#line 36 "regex.h2"
+#line 38 "regex.h2"
 template class match_return;
     
 
-#line 41 "regex.h2"
+#line 43 "regex.h2"
 template class match_context;
 
-#line 114 "regex.h2"
+#line 116 "regex.h2"
 template class matcher_list;
     
 
-#line 141 "regex.h2"
+#line 143 "regex.h2"
 template class single_class_entry;
 
-#line 149 "regex.h2"
+#line 151 "regex.h2"
 template class range_class_entry;
 
-#line 157 "regex.h2"
+#line 159 "regex.h2"
 template class combined_class_entry;
     
 
-#line 164 "regex.h2"
+#line 166 "regex.h2"
 template class list_class_entry;
     
 
-#line 171 "regex.h2"
+#line 173 "regex.h2"
 template class named_class_entry;
     
 
-#line 176 "regex.h2"
+#line 178 "regex.h2"
 template class negated_class_entry;
     
 
-#line 183 "regex.h2"
+#line 185 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 229 "regex.h2"
+#line 231 "regex.h2"
 template class extract_position_helper;
     
 
-#line 246 "regex.h2"
+#line 248 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 330 "regex.h2"
+#line 332 "regex.h2"
 template class any_matcher_logic;
 
-#line 346 "regex.h2"
+#line 348 "regex.h2"
 template class char_matcher_logic;
 
-#line 362 "regex.h2"
+#line 364 "regex.h2"
 template class class_matcher_logic;
 
-#line 400 "regex.h2"
+#line 402 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 409 "regex.h2"
-template class group_matcher_start_logic;
+#line 411 "regex.h2"
+template class group_matcher_start_logic;
     
 
-#line 432 "regex.h2"
+#line 435 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 455 "regex.h2"
-template class group_ref_matcher_logic;
+#line 459 "regex.h2"
+template class group_ref_matcher_logic;
     
 
-#line 475 "regex.h2"
+#line 480 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 497 "regex.h2"
+#line 502 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 515 "regex.h2"
+#line 520 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 519 "regex.h2"
+#line 524 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 541 "regex.h2"
+#line 546 "regex.h2"
 template class range_matcher_logic;
 
-#line 613 "regex.h2"
+#line 618 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 622 "regex.h2"
+#line 627 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 672 "regex.h2"
+#line 677 "regex.h2"
 template class regular_expression;
 
-#line 743 "regex.h2"
+#line 750 "regex.h2"
 class regex_parser_state;
 
-#line 775 "regex.h2"
+#line 782 "regex.h2"
 template class regex_parser;
 
-#line 1215 "regex.h2"
+#line 1342 "regex.h2"
 }
 }
 
@@ -140,7 +140,9 @@ template class regex_parser;
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-#line 13 "regex.h2"
+#include 
+
+#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -179,13 +181,13 @@ template cl
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     public: match_context(match_context const& that);
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -194,19 +196,19 @@ template cl
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 66 "regex.h2"
+#line 68 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
 
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 78 "regex.h2"
+#line 80 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 82 "regex.h2"
+#line 84 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -215,12 +217,12 @@ template cl
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 92 "regex.h2"
+#line 94 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 107 "regex.h2"
+#line 109 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -233,7 +235,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto;
 
-#line 120 "regex.h2"
+#line 122 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
@@ -246,7 +248,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 128 "regex.h2"
+#line 130 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -268,7 +270,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 145 "regex.h2"
+#line 147 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -281,7 +283,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 153 "regex.h2"
+#line 155 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -293,7 +295,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 160 "regex.h2"
+#line 162 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -305,7 +307,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 167 "regex.h2"
+#line 169 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 174 "regex.h2"
+#line 176 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -327,7 +329,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 179 "regex.h2"
+#line 181 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -339,10 +341,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 186 "regex.h2"
+#line 188 "regex.h2"
 };
 
-#line 189 "regex.h2"
+#line 191 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -380,20 +382,20 @@ template                  using short_not_space_class = negated_
 //-----------------------------------------------------------------------
 //
 
-#line 227 "regex.h2"
+#line 229 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 238 "regex.h2"
+#line 240 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 240 "regex.h2"
+#line 242 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -404,20 +406,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
 
-#line 260 "regex.h2"
+#line 262 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
 
-#line 278 "regex.h2"
+#line 280 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 326 "regex.h2"
+#line 328 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -426,14 +428,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 340 "regex.h2"
+#line 342 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 342 "regex.h2"
+#line 344 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -442,27 +444,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 355 "regex.h2"
+#line 357 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 357 "regex.h2"
+#line 359 "regex.h2"
 };
 
-#line 360 "regex.h2"
+#line 362 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 372 "regex.h2"
+#line 374 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 384 "regex.h2"
+#line 386 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -471,7 +473,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 396 "regex.h2"
+#line 398 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -479,36 +481,36 @@ template class class_matcher_logi
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 404 "regex.h2"
+#line 406 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 405 "regex.h2"
+#line 407 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
 //
-template class group_matcher_start_logic {
+template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 420 "regex.h2"
+#line 418 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-    public: [[nodiscard]] static auto to_string() -> auto;
+    public: [[nodiscard]] static auto to_string() -> std::string;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 430 "regex.h2"
+#line 433 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 441 "regex.h2"
+#line 445 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -517,22 +519,22 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 451 "regex.h2"
+#line 455 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
 //
-template class group_ref_matcher_logic {
+template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 467 "regex.h2"
+#line 472 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 469 "regex.h2"
+#line 474 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -543,14 +545,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 489 "regex.h2"
+#line 494 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 491 "regex.h2"
+#line 496 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -561,14 +563,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 508 "regex.h2"
+#line 513 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 510 "regex.h2"
+#line 515 "regex.h2"
 };
 
 // Named character classes
@@ -581,7 +583,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 518 "regex.h2"
+#line 523 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -589,7 +591,7 @@ template                    void = delete;
 
 
-#line 521 "regex.h2"
+#line 526 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -597,7 +599,7 @@ template using named_class_white_space = named_class_matcher_log
 template using named_class_word = named_class_matcher_logic>;
 template using named_class_digits = named_class_matcher_logic>;
 
-#line 529 "regex.h2"
+#line 534 "regex.h2"
 template using named_class_not_white_space = named_class_matcher_logic>;
 template using named_class_not_word = named_class_matcher_logic>;
 template using named_class_not_digits = named_class_matcher_logic>;
@@ -607,7 +609,7 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 540 "regex.h2"
+#line 545 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
@@ -616,23 +618,23 @@ template class range_m
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 565 "regex.h2"
+#line 570 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 570 "regex.h2"
+#line 575 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 575 "regex.h2"
+#line 580 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 581 "regex.h2"
+#line 586 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 609 "regex.h2"
+#line 614 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -644,7 +646,7 @@ template
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
-#line 616 "regex.h2"
+#line 621 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -655,7 +657,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 653 "regex.h2"
+#line 658 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -663,10 +665,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 661 "regex.h2"
+#line 666 "regex.h2"
 };
 
-#line 664 "regex.h2"
+#line 669 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -677,11 +679,13 @@ template class word_boundary_matcher_logic
 // Regular expression implementation
 template class regular_expression {
 
+    // TODO: Add named groups.
+
     public: template using context = match_context;
 
     private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
 
-#line 685 "regex.h2"
+#line 692 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -689,7 +693,7 @@ template c
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 695 "regex.h2"
+#line 702 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -697,7 +701,7 @@ template c
         public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */
         public: auto operator=(search_return const&) -> void = delete;
 
-#line 699 "regex.h2"
+#line 706 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -705,19 +709,19 @@ template c
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 711 "regex.h2"
+#line 718 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 733 "regex.h2"
+#line 740 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 734 "regex.h2"
+#line 741 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -737,28 +741,30 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 757 "regex.h2"
+#line 764 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 762 "regex.h2"
+#line 769 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 771 "regex.h2"
+#line 778 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 775 "regex.h2"
+#line 782 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
     private: regex_parser_state cur_state {}; 
     private: size_t pos {0}; 
 
-    private: int named_groups {1}; // Global capture group.
+    private: int next_group_id {1}; // Global capture group.
     private: int alternatives_count {0}; 
 
+    private: std::map named_groups {}; 
+
     private: bool has_error {false}; 
     private: Error_out error_out; 
 
@@ -767,75 +773,87 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, Error_out const& e);
 
-#line 795 "regex.h2"
+#line 804 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 803 "regex.h2"
+#line 812 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 807 "regex.h2"
+#line 816 "regex.h2"
+    // Position management functions
+    //
+
+    public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
+
+#line 831 "regex.h2"
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
+
+#line 846 "regex.h2"
+    public: [[nodiscard]] auto grab_number() & -> std::string;
+
+#line 866 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 814 "regex.h2"
+#line 873 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 821 "regex.h2"
+#line 880 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 843 "regex.h2"
+#line 902 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 855 "regex.h2"
+#line 914 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 865 "regex.h2"
+#line 924 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 878 "regex.h2"
+#line 937 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 886 "regex.h2"
+#line 945 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1002 "regex.h2"
+#line 1061 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1050 "regex.h2"
+#line 1160 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1073 "regex.h2"
+#line 1200 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1082 "regex.h2"
+#line 1209 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1145 "regex.h2"
+#line 1272 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1171 "regex.h2"
+#line 1298 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1194 "regex.h2"
+#line 1321 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1206 "regex.h2"
+#line 1333 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string;
 
-#line 1215 "regex.h2"
+#line 1342 "regex.h2"
 }
 }
 
@@ -844,39 +862,39 @@ template [[nodiscard]] auto generate_template(cpp2::in match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 52 "regex.h2"
+#line 54 "regex.h2"
     }
 
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 54 "regex.h2"
+#line 56 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -884,49 +902,49 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 58 "regex.h2"
+#line 60 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 60 "regex.h2"
+#line 62 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::cmp_greater_eq(group,max_groups)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 66 "regex.h2"
+#line 68 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
-#line 67 "regex.h2"
+#line 69 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
 
-#line 69 "regex.h2"
+#line 71 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 78 "regex.h2"
+#line 80 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 82 "regex.h2"
+#line 84 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 86 "regex.h2"
+#line 88 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 88 "regex.h2"
+#line 90 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 94 "regex.h2"
+#line 96 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -941,61 +959,61 @@ namespace regex {
         return r; 
     }
 
-#line 115 "regex.h2"
+#line 117 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx);  }
 
-#line 117 "regex.h2"
+#line 119 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { 
         return match_select(cur, ctx);  }
 
-#line 120 "regex.h2"
+#line 122 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { 
         return First::match(cur, ctx, matcher_list());  }
-#line 122 "regex.h2"
+#line 124 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur);  }
 
-#line 124 "regex.h2"
+#line 126 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 125 "regex.h2"
+#line 127 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 127 "regex.h2"
+#line 129 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 143 "regex.h2"
+#line 145 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 144 "regex.h2"
+#line 146 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 151 "regex.h2"
+#line 153 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 152 "regex.h2"
+#line 154 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 158 "regex.h2"
+#line 160 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 159 "regex.h2"
+#line 161 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 165 "regex.h2"
+#line 167 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 166 "regex.h2"
+#line 168 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 172 "regex.h2"
+#line 174 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 173 "regex.h2"
+#line 175 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 178 "regex.h2"
+#line 180 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 184 "regex.h2"
+#line 186 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 185 "regex.h2"
+#line 187 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 230 "regex.h2"
+#line 232 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1004,12 +1022,12 @@ namespace regex {
         return r; 
     }
 
-#line 238 "regex.h2"
+#line 240 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 239 "regex.h2"
+#line 241 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 248 "regex.h2"
+#line 250 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1022,12 +1040,12 @@ namespace regex {
             return match_first(cur, ctx, tail); 
         }
     }
-#line 260 "regex.h2"
+#line 262 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 261 "regex.h2"
+#line 263 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 263 "regex.h2"
+#line 265 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, tail)}; 
         if (r.matched) {
@@ -1043,7 +1061,7 @@ namespace regex {
         }
     }
 
-#line 278 "regex.h2"
+#line 280 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
         auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
 
@@ -1059,7 +1077,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 294 "regex.h2"
+#line 296 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1071,7 +1089,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 306 "regex.h2"
+#line 308 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1093,7 +1111,7 @@ namespace regex {
         }
     }
 
-#line 332 "regex.h2"
+#line 334 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end) {
             return Other::match(cur + 1, ctx); 
@@ -1102,12 +1120,12 @@ namespace regex {
         }
     }
 
-#line 340 "regex.h2"
+#line 342 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 341 "regex.h2"
+#line 343 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 348 "regex.h2"
+#line 350 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
             return Other::match(cur + 1, ctx); 
@@ -1115,12 +1133,12 @@ namespace regex {
             return match_return(false, ctx.end); 
         }
     }
-#line 355 "regex.h2"
+#line 357 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 356 "regex.h2"
+#line 358 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 364 "regex.h2"
+#line 366 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
             return Other::match(cur + 1, ctx); 
@@ -1129,7 +1147,7 @@ namespace regex {
         }
     }
 
-#line 372 "regex.h2"
+#line 374 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1142,10 +1160,10 @@ namespace regex {
         return r; 
     }
 
-#line 384 "regex.h2"
+#line 386 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 386 "regex.h2"
+#line 388 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1157,46 +1175,48 @@ namespace regex {
         return r; 
     }
 
-#line 404 "regex.h2"
+#line 406 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 410 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 412 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+        CPP2_UFCS(set_group_start)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
-        if (r.matched) {
-            CPP2_UFCS(set_group_start)(ctx, group, cur);
-        }else {
-            CPP2_UFCS(set_group_invalid)(ctx, group);
-        }
         return r; 
     }
 
-#line 420 "regex.h2"
-    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
+#line 418 "regex.h2"
+    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 422 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> auto{
+#line 420 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
-            return "("; 
+            if (0 != CPP2_UFCS(size)(name)) {
+                return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
+            }
+            else {
+                return "("; 
+            }
         }
         else {
             return ""; 
         }
     }
 
-#line 433 "regex.h2"
+#line 436 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+        CPP2_UFCS(set_group_end)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
-        if (r.matched) {
-            CPP2_UFCS(set_group_end)(ctx, group, cur);
+        if (!(r.matched)) {
+            CPP2_UFCS(set_group_invalid)(ctx, group);
         }
         return r; 
     }
 
-#line 441 "regex.h2"
+#line 445 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 443 "regex.h2"
+#line 447 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1206,24 +1226,25 @@ namespace regex {
         }
     }
 
-#line 456 "regex.h2"
-    template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 460 "regex.h2"
+    template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
-        for( ; g.start != g.end && cur != ctx.end; (++g.start, ++cur) ) {
-            if (*cpp2::assert_not_null(g.start) != *cpp2::assert_not_null(cur)) {
+        auto pos {cur}; 
+        for( ; g.start != g.end && pos != ctx.end; (++g.start, ++pos) ) {
+            if (*cpp2::assert_not_null(g.start) != *cpp2::assert_not_null(pos)) {
                 return match_return(false, ctx.end); 
             }
         }
 
-        return Other::match(cur, ctx); 
+        return Other::match(std::move(pos), ctx); 
     }
-#line 467 "regex.h2"
-    template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 468 "regex.h2"
-    template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return "\\(" + cpp2::to_string(group) + ")"; }
+#line 472 "regex.h2"
+    template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 473 "regex.h2"
+    template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 477 "regex.h2"
+#line 482 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx); 
@@ -1236,12 +1257,12 @@ namespace regex {
         }}
     }
 
-#line 489 "regex.h2"
+#line 494 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 490 "regex.h2"
+#line 495 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 499 "regex.h2"
+#line 504 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx); 
@@ -1251,20 +1272,20 @@ namespace regex {
         }
 
     }
-#line 508 "regex.h2"
+#line 513 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 509 "regex.h2"
+#line 514 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 517 "regex.h2"
+#line 522 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 543 "regex.h2"
+#line 548 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); }
-#line 544 "regex.h2"
+#line 549 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 546 "regex.h2"
+#line 551 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1284,26 +1305,26 @@ namespace regex {
       return r; 
     }
 
-#line 565 "regex.h2"
+#line 570 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 570 "regex.h2"
+#line 575 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 575 "regex.h2"
+#line 580 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 581 "regex.h2"
+#line 586 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto r {M::match(cur, ctx, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1333,10 +1354,10 @@ namespace regex {
         }
     }
 
-#line 615 "regex.h2"
+#line 620 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol;  }
 
-#line 624 "regex.h2"
+#line 629 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1366,9 +1387,9 @@ namespace regex {
         }
 
     }
-#line 653 "regex.h2"
+#line 658 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 654 "regex.h2"
+#line 659 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1377,7 +1398,7 @@ namespace regex {
         }
     }
 
-#line 676 "regex.h2"
+#line 683 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1387,30 +1408,30 @@ namespace regex {
         }
     }
 
-#line 690 "regex.h2"
+#line 697 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 693 "regex.h2"
+#line 700 "regex.h2"
         }
 
-#line 695 "regex.h2"
+#line 702 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 696 "regex.h2"
+#line 703 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 697 "regex.h2"
+#line 704 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 698 "regex.h2"
+#line 705 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 701 "regex.h2"
+#line 708 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 702 "regex.h2"
+#line 709 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 703 "regex.h2"
+#line 710 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 704 "regex.h2"
+#line 711 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1418,13 +1439,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 711 "regex.h2"
+#line 718 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 712 "regex.h2"
+#line 719 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 713 "regex.h2"
+#line 720 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 714 "regex.h2"
+#line 721 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1444,26 +1465,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 733 "regex.h2"
+#line 740 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 751 "regex.h2"
+#line 758 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 757 "regex.h2"
+#line 764 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 762 "regex.h2"
+#line 769 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 764 "regex.h2"
+#line 771 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1471,36 +1492,86 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 771 "regex.h2"
+#line 778 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 790 "regex.h2"
+#line 799 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 793 "regex.h2"
+#line 802 "regex.h2"
     }
 
-#line 797 "regex.h2"
+#line 806 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 803 "regex.h2"
+#line 812 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 809 "regex.h2"
+#line 819 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
+        if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
+            pos += 1;
+            n.construct(CPP2_ASSERT_IN_BOUNDS(regex, pos));
+            return true; 
+        }
+        else {
+            n.construct('\0');
+            return false; 
+        }
+    }
+
+#line 831 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
+        auto start {pos}; 
+        auto end {CPP2_UFCS(find)(regex, e, pos)}; 
+
+        if (end != std::string_view::npos) {
+            r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
+            pos = std::move(end);
+            return true; 
+        }
+        else {
+            r.construct("");
+            return false; 
+        }
+    }
+
+#line 846 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
+        auto start {pos}; 
+        auto start_search {pos}; 
+        if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
+            start_search += 1;
+        }
+        auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", std::move(start_search))}; 
+
+        cpp2::deferred_init r; 
+        if (end != std::string_view::npos) {
+            r.construct(CPP2_UFCS(substr)(regex, start, end - std::move(start)));
+            pos = std::move(end) - 1;
+        }
+        else {
+            r.construct(CPP2_UFCS(substr)(regex, std::move(start)));
+            pos = CPP2_UFCS(size)(regex) - 1;
+        }
+        return r.value(); 
+    }
+
+#line 868 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 814 "regex.h2"
+#line 873 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1508,10 +1579,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 821 "regex.h2"
+#line 880 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 823 "regex.h2"
+#line 882 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1532,7 +1603,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 843 "regex.h2"
+#line 902 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1545,7 +1616,7 @@ namespace regex {
         return r; 
     }
 
-#line 858 "regex.h2"
+#line 917 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1553,7 +1624,7 @@ namespace regex {
         return true; 
     }
 
-#line 865 "regex.h2"
+#line 924 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -1567,7 +1638,7 @@ namespace regex {
         return false; 
     }
 
-#line 878 "regex.h2"
+#line 937 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1576,7 +1647,7 @@ namespace regex {
         return false; 
     }
 
-#line 886 "regex.h2"
+#line 945 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -1693,22 +1764,46 @@ namespace regex {
         return true; 
     }
 
-#line 1002 "regex.h2"
+#line 1061 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
+        auto start {pos}; // Keep start for group matchers.
         pos += 1;
 
+        auto add_group_matcher {[&, _1 = std::move(start), _2 = (&pos)](cpp2::in name) mutable -> bool{
+
+            int group_id {0}; 
+            if (string_to_int(name, group_id)) {
+                if (cpp2::cmp_less(group_id,0)) {
+                    group_id = next_group_id + group_id;
+
+                    if (cpp2::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
+                        error(("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)"));
+                        return false; 
+                    }
+                }
+
+                if (cpp2::cmp_greater_eq(group_id,next_group_id)) {error("Group reference is used before the group is declared."); return false; }
+            }
+            else {
+                // Named group
+                auto iter {CPP2_UFCS(find)(named_groups, name)}; 
+                if (iter == CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
+
+                group_id = (*cpp2::assert_not_null(std::move(iter))).second;
+            }
+            CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *cpp2::assert_not_null(_2) - _1 + 1)) + "\"")));
+
+            return true; 
+        }}; 
+
         if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); return false; }
 
         char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
 
         if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
-            int group_id {c_next - '0'}; 
-
-            if (cpp2::cmp_greater_eq(group_id,named_groups)) {error("Group reference is used before the group is declared."); return false; }
-
-            CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)))));
+            if (!(add_group_matcher(std::string(1, c_next)))) {return false; }
         }
         else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
             if (c_next == '$') {
@@ -1722,6 +1817,33 @@ namespace regex {
         else {if ('\\' == c_next) {
             CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\'"));
         }
+        else {if ('g' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
+
+            std::string group {""}; 
+            if (c_next == '{') {
+                if (!((next(cpp2::out(&c_next)) && grab_until('}', cpp2::out(&group))))) {error("No ending bracket."); return false; }
+            }
+            else {
+                group = grab_number();
+            }
+            if (!(add_group_matcher(std::move(group)))) {return false; }
+        }
+        else {if ('k' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
+
+            auto term_char {'\0'}; 
+            if (c_next == '{') {term_char = '}'; }
+            else {if (c_next == '<') {term_char = '>'; }
+            else {if (c_next == '\'') {term_char = '\''; }
+            else {
+                error("Group escape has wrong operator."); return false; 
+            }}}
+
+            std::string group {""}; 
+            if (!((next(cpp2::out(&c_next)) && grab_until(std::move(term_char), cpp2::out(&group))))) {error("No ending bracket."); return false; }
+            if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
+        }
         else {if ('N' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
         else {if ('s' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_white_space", "")); }
         else {if ('S' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_white_space", "")); }
@@ -1737,28 +1859,45 @@ namespace regex {
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}}
+        }}}}}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 1050 "regex.h2"
+#line 1160 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
-        auto group_number {named_groups}; 
-        named_groups += 1;
+        auto group_number {next_group_id}; 
+        next_group_id += 1;
 
         auto old_state {new_state()}; 
 
-        pos += 1;  // Skip the '('
+        auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"\""))}; 
+
+        char c_next {'\0'}; 
+        // Skip the '('
+        if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
+        if (c_next == '?') {
+            // Named group
+            if (!((next(cpp2::out(&c_next)) && c_next == '<'))) {error("Missing opening bracket for named group."); return false; }
+            std::string name {""}; 
+            if (!(grab_until('>', cpp2::out(&name)))) {error("Missing ending bracket for named group."); return false; }
+            if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
+
+            if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
+                CPP2_ASSERT_IN_BOUNDS(named_groups, name) = group_number;
+            }
+            start_matcher = create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"" + cpp2::to_string(std::move(name)) + "\""));
+        }
+
         parse_until(')');
 
         auto inner {create_matcher_from_state()}; 
         restore_state(std::move(old_state));
 
         std::vector v {
-            create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number))), 
+            std::move(start_matcher), 
             std::move(inner), 
             create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number))))}; 
         CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v)));
@@ -1766,7 +1905,7 @@ namespace regex {
         return true; 
     }
 
-#line 1073 "regex.h2"
+#line 1200 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'")));
@@ -1776,7 +1915,7 @@ namespace regex {
         return false; 
     }
 
-#line 1082 "regex.h2"
+#line 1209 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -1840,7 +1979,7 @@ namespace regex {
         return true; 
     }
 
-#line 1145 "regex.h2"
+#line 1272 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -1867,7 +2006,7 @@ namespace regex {
         return true; 
     }
 
-#line 1171 "regex.h2"
+#line 1298 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -1891,20 +2030,20 @@ namespace regex {
         }
     }
 
-#line 1194 "regex.h2"
+#line 1321 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
         if (has_error) {return "Error"; }
 
         auto inner {create_matcher_from_state()}; 
-        auto start {create_matcher("group_matcher_start_logic", "0")}; 
+        auto start {create_matcher("group_matcher_start_logic", "0, \"\"")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
-        return   create_matcher("regular_expression", (cpp2::to_string(named_groups) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(list)))); 
+        return   create_matcher("regular_expression", (cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1208 "regex.h2"
+#line 1335 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{
     regex_parser parser {regex, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/include/string_util.h b/include/string_util.h
index bbe897c6a7..a2e6f49f5c 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -71,3 +71,19 @@ fixed_string(const CharT (&)[N])->fixed_string;
 inline bool is_escaped(std::string_view s) {
     return s.starts_with("\"") && s.ends_with("\"");
 }
+
+inline bool string_to_int(std::string const& s, int& v) {
+    try {
+        v = stoi(s);
+        return true;
+    }
+    catch (std::invalid_argument const& ex)
+    {
+        return false;
+    }
+    catch (std::out_of_range const& ex)
+    {
+        return false;
+    }
+
+}
diff --git a/source/regex.h2 b/source/regex.h2
index 9d79149eda..705055d4af 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -10,6 +10,8 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
+#include 
+
 cpp2: namespace = {
 
 regex: namespace = {
@@ -406,22 +408,23 @@ escaped_char_matcher_logic:  type =
 
 // Regex syntax: () Example: (.*)
 //
-group_matcher_start_logic:  type = {
+group_matcher_start_logic:  type = {
     match:  (cur, inout ctx, _ : Other) -> _ = {
+        ctx.set_group_start(group, cur);
         r := Other::match(cur, ctx);
-        if r.matched {
-            ctx.set_group_start(group, cur);
-        } else {
-            ctx.set_group_invalid(group);
-        }
         return r;
     }
 
     reset_ranges: (inout ctx) = ctx.set_group_invalid(group);
 
-    to_string: () -> _ = {
+    to_string: () -> std::string = {
         if group != 0 {
-            return "(";
+            if 0 != name.size() {
+                return "(?<(name.data())$>";
+            }
+            else {
+                return "(";
+            }
         }
         else {
             return "";
@@ -431,9 +434,10 @@ group_matcher_start_logic:  type = {
 
 group_matcher_end_logic:  type = {
     match:  (cur, inout ctx, _ : Other) -> _ = {
+        ctx.set_group_end(group, cur);
         r := Other::match(cur, ctx);
-        if r.matched {
-            ctx.set_group_end(group, cur);
+        if !r.matched {
+            ctx.set_group_invalid(group);
         }
         return r;
     }
@@ -452,20 +456,21 @@ group_matcher_end_logic:  type = {
 
 // Regex syntax: \  Example: \1
 //
-group_ref_matcher_logic:  type = {
+group_ref_matcher_logic:  type = {
     match:  (cur, inout ctx, _ : Other) -> _ = {
         g := ctx.get_group(group);
 
-        while g.start != g.end && cur != ctx.end next (g.start++, cur++) {
-            if g.start* != cur* {
+        pos := cur;
+        while g.start != g.end && pos != ctx.end next (g.start++, pos++) {
+            if g.start* != pos* {
                 return match_return(false, ctx.end);
             }
         }
 
-        return Other::match(cur, ctx);
+        return Other::match(pos, ctx);
     }
     reset_ranges: (inout ctx) = {}
-    to_string: ()               "\\((group)$)";
+    to_string: ()               bstring(symbol.data());
 }
 
 // Regex syntax: $  Example: aa$
@@ -671,6 +676,8 @@ word_boundary_matcher_logic:  type =
 // Regular expression implementation
 regular_expression:  type = {
 
+    // TODO: Add named groups.
+
     context:  type == match_context;
 
     private get_iter: (str: view, pos) -> _ = {
@@ -778,9 +785,11 @@ regex_parser:  type = {
     cur_state: regex_parser_state = ();
     pos: size_t = 0;
 
-    named_groups: int = 1; // Global capture group.
+    next_group_id: int = 1; // Global capture group.
     alternatives_count: int = 0;
 
+    named_groups : std::map = ();
+
     has_error: bool = false;
     error_out: Error_out;
 
@@ -804,6 +813,56 @@ regex_parser:  type = {
         cur_state = old_state;
     }
 
+    // Position management functions
+    //
+
+    next: (inout this, out n: char) -> bool = {
+        if (pos + 1) < regex.size() {
+            pos += 1;
+            n = regex[pos];
+            return true;
+        }
+        else {
+            n = '\0';
+            return false;
+        }
+    }
+
+    grab_until: (inout this, in e: char, out r: std::string) -> bool = {
+        start := pos;
+        end: = regex.find(e, pos);
+
+        if end != std::string_view::npos {
+            r = regex.substr(start, end - pos);
+            pos = end;
+            return true;
+        }
+        else {
+            r = "";
+            return false;
+        }
+    }
+
+    grab_number: (inout this) -> std::string = {
+        start := pos;
+        start_search := pos;
+        if regex[start_search] == '-' {
+            start_search += 1;
+        }
+        end := regex.find_first_not_of("1234567890", start_search);
+
+        r : std::string;
+        if end != std::string_view::npos {
+            r = regex.substr(start, end - start);
+            pos = end - 1;
+        }
+        else {
+            r = regex.substr(start);
+            pos = regex.size() - 1;
+        }
+        return r;
+    }
+
     // Misc functions
     //
     error:(inout this, message: std::string) = {
@@ -1002,18 +1061,42 @@ regex_parser:  type = {
     is_escape: (inout this, c: char) -> bool = {
         if c != '\\' { return false; }
 
+        start := pos; // Keep start for group matchers.
         pos += 1;
 
+        add_group_matcher:= :(name: std::string) -> bool = {
+
+            group_id : int = 0;
+            if string_to_int(name, group_id) {
+                if group_id < 0 {
+                    group_id = next_group_id + group_id;
+
+                    if group_id < 1 { // Negative and zero are no valid groups.
+                        error("Relative group reference does not reference a valid group. (Would be (group_id)$.)");
+                        return false;
+                    }
+                }
+
+                if group_id >= next_group_id { error("Group reference is used before the group is declared."); return false; }
+            }
+            else {
+                // Named group
+                iter := named_groups.find(name);
+                if iter == named_groups.end() { error("Group names does not exist. (Name is: (name)$)"); return false; }
+
+                group_id = iter*.second;
+            }
+            cur_state.add(create_matcher("group_ref_matcher_logic", "(group_id)$, \"\\(regex.substr(start$, pos&$* - start$ + 1))$\""));
+
+            return true;
+        };
+
         if pos >= regex.size() { error("Escape without a following character."); return false;}
 
         c_next: char = regex[pos];
 
         if '1' <= c_next <= '9' {
-            group_id: int = c_next - '0';
-
-            if group_id >= named_groups { error("Group reference is used before the group is declared."); return false; }
-
-            cur_state.add(create_matcher("group_ref_matcher_logic", "(group_id)$"));
+            if !add_group_matcher(std::string(1, c_next)) { return false; }
         }
         else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {
@@ -1027,6 +1110,33 @@ regex_parser:  type = {
         else if '\\' == c_next {
             cur_state.add(create_matcher("escaped_char_matcher_logic", "'\\\\'"));
         }
+        else if 'g' == c_next {
+            if !next(out c_next) {error("Group escape without a following char."); return false; }
+
+            group : std::string = "";
+            if c_next == '{' {
+                if !(next(out c_next) && grab_until('}', out group)) { error("No ending bracket."); return false; }
+            }
+            else {
+                group = grab_number();
+            }
+            if !add_group_matcher(group) { return false; }
+        }
+        else if 'k' == c_next {
+            if !next(out c_next) {error("Group escape without a following char."); return false; }
+
+            term_char := '\0';
+            if c_next == '{' { term_char = '}'; }
+            else if c_next == '<' { term_char = '>'; }
+            else if c_next == '\'' { term_char = '\''; }
+            else {
+                error("Group escape has wrong operator."); return false;
+            }
+
+            group : std::string = "";
+            if !(next(out c_next) && grab_until(term_char, out group)) { error("No ending bracket."); return false; }
+            if !add_group_matcher(group) { return false; }
+        }
         else if 'N' == c_next { cur_state.add(create_matcher("named_class_no_new_line", "")); }
         else if 's' == c_next { cur_state.add(create_matcher("named_class_white_space", "")); }
         else if 'S' == c_next { cur_state.add(create_matcher("named_class_not_white_space", "")); }
@@ -1050,19 +1160,36 @@ regex_parser:  type = {
     is_group: (inout this, c: char) -> bool = {
         if c != '(' { return false; }
 
-        group_number := named_groups;
-        named_groups += 1;
+        group_number := next_group_id;
+        next_group_id += 1;
 
         old_state: _ = new_state();
 
-        pos += 1;  // Skip the '('
+        start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, \"\"");
+
+        c_next : char = '\0';
+        // Skip the '('
+        if !next(out c_next) { error("Group without closing bracket."); return false;}
+        if c_next == '?' {
+            // Named group
+            if !(next(out c_next) && c_next == '<') { error("Missing opening bracket for named group."); return false; }
+            name : std::string = "";
+            if !grab_until('>', out name) { error("Missing ending bracket for named group."); return false; }
+            if !next(out c_next) { error("Group without closing bracket."); return false;}
+
+            if !named_groups.contains(name) { // Redefinition of group name is not an error. The left most one is retained.
+                named_groups[name] = group_number;
+            }
+            start_matcher = create_matcher("group_matcher_start_logic", "(group_number)$, \"(name)$\"");
+        }
+
         parse_until(')');
 
         inner:= create_matcher_from_state();
         restore_state(old_state);
 
         v: std::vector = (
-            create_matcher("group_matcher_start_logic", "(group_number)$"),
+            start_matcher,
             inner,
             create_matcher("group_matcher_end_logic", "(group_number)$"));
         cur_state.add(create_matcher_from_list(v));
@@ -1197,10 +1324,10 @@ regex_parser:  type = {
         if has_error { return "Error"; }
 
         inner := create_matcher_from_state();
-        start := create_matcher("group_matcher_start_logic", "0");
+        start := create_matcher("group_matcher_start_logic", "0, \"\"");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-        return   create_matcher("regular_expression", "(named_groups)$, (alternatives_count)$, (list)$");
+        return   create_matcher("regular_expression", "(next_group_id)$, (alternatives_count)$, (list)$");
     }
 
 }

From fb367514c5b1d5cd9a239a4842392a1949de25b4 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 18 Feb 2024 19:42:16 +0100
Subject: [PATCH 051/161] Named group access in regex result.

---
 include/cpp2regex.h | 281 ++++++++++++++++++++++++++++----------------
 source/regex.h2     |  48 +++++++-
 2 files changed, 224 insertions(+), 105 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index ecefd05f42..8ee47d757d 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -111,16 +111,23 @@ template
 #line 627 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 677 "regex.h2"
-template class regular_expression;
+#line 678 "regex.h2"
+template class group_name_list;
 
-#line 750 "regex.h2"
+#line 690 "regex.h2"
+class group_name_list_end;
+
+
+#line 695 "regex.h2"
+template class regular_expression;
+
+#line 778 "regex.h2"
 class regex_parser_state;
 
-#line 782 "regex.h2"
+#line 810 "regex.h2"
 template class regex_parser;
 
-#line 1342 "regex.h2"
+#line 1382 "regex.h2"
 }
 }
 
@@ -676,16 +683,36 @@ template class word_boundary_matcher_logic
 //-----------------------------------------------------------------------
 //
 
-// Regular expression implementation
-template class regular_expression {
+// Helper for named groups.
+
+template class group_name_list {
+
+    public: [[nodiscard]] static auto get_group_id(auto const& name) -> int;
+    public: group_name_list() = default;
+    public: group_name_list(group_name_list const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_name_list const&) -> void = delete;
+
+
+#line 688 "regex.h2"
+};
+
+class group_name_list_end {
+    public: [[nodiscard]] static auto get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto;
+    public: group_name_list_end() = default;
+    public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_name_list_end const&) -> void = delete;
+
+#line 692 "regex.h2"
+};
 
-    // TODO: Add named groups.
+// Regular expression implementation
+template class regular_expression {
 
     public: template using context = match_context;
 
     private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
 
-#line 692 "regex.h2"
+#line 708 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -693,15 +720,22 @@ template c
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 702 "regex.h2"
+#line 718 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_end(cpp2::in g) const& -> auto;
+
+        public: [[nodiscard]] auto group(cpp2::in> g) const& -> auto;
+        public: [[nodiscard]] auto group_start(cpp2::in> g) const& -> auto;
+        public: [[nodiscard]] auto group_end(cpp2::in> g) const& -> auto;
+
+        private: [[nodiscard]] auto get_group_id(cpp2::in> g) const& -> auto;
         public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */
         public: auto operator=(search_return const&) -> void = delete;
 
-#line 706 "regex.h2"
+
+#line 734 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -709,19 +743,19 @@ template c
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 718 "regex.h2"
+#line 746 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 740 "regex.h2"
+#line 768 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 741 "regex.h2"
+#line 769 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -741,19 +775,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 764 "regex.h2"
+#line 792 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 769 "regex.h2"
+#line 797 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 778 "regex.h2"
+#line 806 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 782 "regex.h2"
+#line 810 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -773,87 +807,90 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, Error_out const& e);
 
-#line 804 "regex.h2"
+#line 832 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 812 "regex.h2"
+#line 840 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 816 "regex.h2"
+#line 844 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 831 "regex.h2"
+#line 859 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 846 "regex.h2"
+#line 874 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 866 "regex.h2"
+#line 894 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 873 "regex.h2"
+#line 901 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 880 "regex.h2"
+#line 908 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 902 "regex.h2"
+#line 930 "regex.h2"
+    public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
+
+#line 940 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 914 "regex.h2"
+#line 952 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 924 "regex.h2"
+#line 962 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 937 "regex.h2"
+#line 975 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 945 "regex.h2"
+#line 983 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1061 "regex.h2"
+#line 1099 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1160 "regex.h2"
+#line 1198 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1200 "regex.h2"
+#line 1239 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1209 "regex.h2"
+#line 1248 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1272 "regex.h2"
+#line 1311 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1298 "regex.h2"
+#line 1337 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1321 "regex.h2"
+#line 1360 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1333 "regex.h2"
+#line 1373 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string;
 
-#line 1342 "regex.h2"
+#line 1382 "regex.h2"
 }
 }
 
@@ -1398,8 +1435,21 @@ namespace regex {
         }
     }
 
-#line 683 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
+#line 680 "regex.h2"
+    template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
+        if (name == CPP2_UFCS(data)(Name)) {
+            return group_id;
+        }
+        else {
+            return Inner::get_group_id(name);
+        }
+    }
+
+#line 691 "regex.h2"
+    [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
+
+#line 699 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
         }
@@ -1408,45 +1458,61 @@ namespace regex {
         }
     }
 
-#line 697 "regex.h2"
-        template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
+#line 713 "regex.h2"
+        template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 700 "regex.h2"
+#line 716 "regex.h2"
         }
 
-#line 702 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 703 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 704 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 705 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+#line 718 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 719 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+#line 720 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 721 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+
+#line 723 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
+#line 724 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+#line 725 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
+
+#line 727 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
+            auto group_id {named_groups::get_group_id(g)};
+            if (-1 == group_id) {
+                // TODO: Throw error.
+            }
+            return group_id;
+        }
 
-#line 708 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 709 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 710 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 711 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
+#line 736 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 737 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 738 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 739 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
         auto r {Matcher::match(start, ctx)}; 
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 718 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 719 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 720 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 721 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
+#line 746 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 747 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 748 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 749 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
 
@@ -1465,26 +1531,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 740 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
+#line 768 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 758 "regex.h2"
+#line 786 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 764 "regex.h2"
+#line 792 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 769 "regex.h2"
+#line 797 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 771 "regex.h2"
+#line 799 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1492,30 +1558,30 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 778 "regex.h2"
+#line 806 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 799 "regex.h2"
+#line 827 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 802 "regex.h2"
+#line 830 "regex.h2"
     }
 
-#line 806 "regex.h2"
+#line 834 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 812 "regex.h2"
+#line 840 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 819 "regex.h2"
+#line 847 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1528,7 +1594,7 @@ namespace regex {
         }
     }
 
-#line 831 "regex.h2"
+#line 859 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find)(regex, e, pos)}; 
@@ -1544,7 +1610,7 @@ namespace regex {
         }
     }
 
-#line 846 "regex.h2"
+#line 874 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -1565,13 +1631,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 868 "regex.h2"
+#line 896 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 873 "regex.h2"
+#line 901 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1579,10 +1645,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 880 "regex.h2"
+#line 908 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 882 "regex.h2"
+#line 910 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1603,7 +1669,18 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 902 "regex.h2"
+#line 930 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
+        std::string r {"::cpp2::regex::group_name_list_end"};
+
+        for ( auto const& cur : named_groups ) {
+            r = { "::cpp2::regex::group_name_list<\"" + cpp2::to_string(cur.first) + "\", " + cpp2::to_string(cur.second) + ", " + cpp2::to_string(r) + ">" };
+        }
+
+        return r;
+    }
+
+#line 940 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1616,7 +1693,7 @@ namespace regex {
         return r; 
     }
 
-#line 917 "regex.h2"
+#line 955 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1624,7 +1701,7 @@ namespace regex {
         return true; 
     }
 
-#line 924 "regex.h2"
+#line 962 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -1638,7 +1715,7 @@ namespace regex {
         return false; 
     }
 
-#line 937 "regex.h2"
+#line 975 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1647,7 +1724,7 @@ namespace regex {
         return false; 
     }
 
-#line 945 "regex.h2"
+#line 983 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -1764,7 +1841,7 @@ namespace regex {
         return true; 
     }
 
-#line 1061 "regex.h2"
+#line 1099 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -1864,7 +1941,7 @@ namespace regex {
         return true; 
     }
 
-#line 1160 "regex.h2"
+#line 1198 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -1881,6 +1958,7 @@ namespace regex {
         if (c_next == '?') {
             // Named group
             if (!((next(cpp2::out(&c_next)) && c_next == '<'))) {error("Missing opening bracket for named group."); return false; }
+            if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
             std::string name {""}; 
             if (!(grab_until('>', cpp2::out(&name)))) {error("Missing ending bracket for named group."); return false; }
             if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
@@ -1905,7 +1983,7 @@ namespace regex {
         return true; 
     }
 
-#line 1200 "regex.h2"
+#line 1239 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'")));
@@ -1915,7 +1993,7 @@ namespace regex {
         return false; 
     }
 
-#line 1209 "regex.h2"
+#line 1248 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -1979,7 +2057,7 @@ namespace regex {
         return true; 
     }
 
-#line 1272 "regex.h2"
+#line 1311 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2006,7 +2084,7 @@ namespace regex {
         return true; 
     }
 
-#line 1298 "regex.h2"
+#line 1337 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2030,20 +2108,21 @@ namespace regex {
         }
     }
 
-#line 1321 "regex.h2"
+#line 1360 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
         if (has_error) {return "Error"; }
 
+        auto named_groups_arg {create_named_groups_arg()};
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0, \"\"")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
-        return   create_matcher("regular_expression", (cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(list)))); 
+        return   create_matcher("regular_expression", (cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list))));
     }
 
-#line 1335 "regex.h2"
+#line 1375 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{
     regex_parser parser {regex, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 705055d4af..88dbe533a5 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -673,10 +673,26 @@ word_boundary_matcher_logic:  type =
 //-----------------------------------------------------------------------
 //
 
-// Regular expression implementation
-regular_expression:  type = {
+// Helper for named groups.
+
+group_name_list:  type = {
 
-    // TODO: Add named groups.
+    get_group_id: (name) -> int = {
+        if name == Name.data() {
+            return group_id;
+        }
+        else {
+            return Inner::get_group_id(name);
+        }
+    }
+}
+
+group_name_list_end: type = {
+    get_group_id: (_) -1;
+}
+
+// Regular expression implementation
+regular_expression:  type = {
 
     context:  type == match_context;
 
@@ -703,6 +719,18 @@ regular_expression:  type
         group:        (this, g: int) ctx.get_group_string(g);
         group_start:  (this, g: int) ctx.get_group_start(g);
         group_end:    (this, g: int) ctx.get_group_end(g);
+
+        group:        (this, g: bstring) group(get_group_id(g));
+        group_start:  (this, g: bstring) group_start(get_group_id(g));
+        group_end:    (this, g: bstring) group_end(get_group_id(g));
+
+        private get_group_id: (this, g: bstring) -> _ = {
+            group_id := named_groups::get_group_id(g);
+            if -1 == group_id {
+                // TODO: Throw error.
+            }
+            return group_id;
+        }
     }
 
     match: (in this, str: view)                 match(str.begin(), str.end());
@@ -899,6 +927,16 @@ regex_parser:  type = {
         return create_matcher("alternative_matcher_logic", "(alternative_id)$, (list)$");
     }
 
+    create_named_groups_arg: (in this) -> std::string = {
+        r : std::string = "::cpp2::regex::group_name_list_end";
+
+        for named_groups do (cur) {
+            r = "::cpp2::regex::group_name_list<\"(cur.first)$\", (cur.second)$, (r)$>";
+        }
+
+        return r;
+    }
+
     join: (list: std::vector) -> std::string = {
         r: std::string = "";
 
@@ -1173,6 +1211,7 @@ regex_parser:  type = {
         if c_next == '?' {
             // Named group
             if !(next(out c_next) && c_next == '<') { error("Missing opening bracket for named group."); return false; }
+            if !next(out c_next) /* skip '<' */ { error("Missing ending bracket for named group."); return false; }
             name : std::string = "";
             if !grab_until('>', out name) { error("Missing ending bracket for named group."); return false; }
             if !next(out c_next) { error("Group without closing bracket."); return false;}
@@ -1323,11 +1362,12 @@ regex_parser:  type = {
 
         if has_error { return "Error"; }
 
+        named_groups_arg := create_named_groups_arg();
         inner := create_matcher_from_state();
         start := create_matcher("group_matcher_start_logic", "0, \"\"");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-        return   create_matcher("regular_expression", "(next_group_id)$, (alternatives_count)$, (list)$");
+        return   create_matcher("regular_expression", "(next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
     }
 
 }

From 5485acd33bd8b27ef6784ced6da81943ae1a36b2 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 18 Feb 2024 22:31:15 +0100
Subject: [PATCH 052/161] Case insensitive matching flag.

---
 include/cpp2regex.h   | 733 +++++++++++++++---------------------------
 include/string_util.h |   7 +
 source/reflect.h      | 611 ++++++++++-------------------------
 source/regex.h2       |  80 +++--
 4 files changed, 490 insertions(+), 941 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 8ee47d757d..90385600b3 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -3,139 +3,100 @@
 #define ___INCLUDE_CPP2REGEX_H_CPP2
 
 
-//=== Cpp2 type declarations ====================================================
-
-
 #include "cpp2util.h"
 
-#line 1 "regex.h2"
 
-#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 31 "regex.h2"
+class expression_flags;
+    
+
 template class match_group;
     
 
-#line 38 "regex.h2"
 template class match_return;
     
 
-#line 43 "regex.h2"
-template class match_context;
+template class match_context;
 
-#line 116 "regex.h2"
 template class matcher_list;
     
 
-#line 143 "regex.h2"
 template class single_class_entry;
 
-#line 151 "regex.h2"
 template class range_class_entry;
 
-#line 159 "regex.h2"
 template class combined_class_entry;
     
 
-#line 166 "regex.h2"
 template class list_class_entry;
     
 
-#line 173 "regex.h2"
 template class named_class_entry;
     
 
-#line 178 "regex.h2"
 template class negated_class_entry;
     
 
-#line 185 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 231 "regex.h2"
 template class extract_position_helper;
     
 
-#line 248 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 332 "regex.h2"
 template class any_matcher_logic;
 
-#line 348 "regex.h2"
-template class char_matcher_logic;
+template class char_matcher_logic;
 
-#line 364 "regex.h2"
 template class class_matcher_logic;
 
-#line 402 "regex.h2"
-template class escaped_char_matcher_logic;
+template class escaped_char_matcher_logic;
 
-#line 411 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 435 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 459 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 480 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 502 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 520 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 524 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 546 "regex.h2"
 template class range_matcher_logic;
 
-#line 618 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 627 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 678 "regex.h2"
 template class group_name_list;
 
-#line 690 "regex.h2"
 class group_name_list_end;
+    
 
+template class regular_expression;
 
-#line 695 "regex.h2"
-template class regular_expression;
-
-#line 778 "regex.h2"
 class regex_parser_state;
 
-#line 810 "regex.h2"
 template class regex_parser;
 
-#line 1382 "regex.h2"
 }
 }
 
 
-//=== Cpp2 type definitions and function declarations ===========================
-
-#line 1 "regex.h2"
-
 //  Copyright (c) Herb Sutter
 //  SPDX-License-Identifier: CC-BY-NC-ND-4.0
 
@@ -149,7 +110,6 @@ template class regex_parser;
 
 #include 
 
-#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -166,6 +126,14 @@ template using bstring = std::basic_string;
 //-----------------------------------------------------------------------
 //
 
+class expression_flags {
+    public: static const int case_insensitive;
+
+    public: expression_flags() = default;
+    public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(expression_flags const&) -> void = delete;
+};
+
 template class match_group {
     public: Iter start {}; 
     public: Iter end {}; 
@@ -178,7 +146,7 @@ template class match_return {
     public: Iter pos {}; 
 };
 
-template class match_context
+template class match_context
  {
     public: Iter begin; 
     public: Iter end; 
@@ -188,13 +156,9 @@ template cl
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 56 "regex.h2"
     public: match_context(match_context const& that);
-#line 56 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 56 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 56 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -203,19 +167,15 @@ template cl
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 68 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
 
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 76 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 80 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 84 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -224,12 +184,15 @@ template cl
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 94 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 109 "regex.h2"
+    // Flag management
+    //
+
+    public: [[nodiscard]] static auto has_flag(cpp2::in f) -> bool;
+
 };
 
 //  Represents the remainder of the regular expression.
@@ -242,7 +205,6 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto;
 
-#line 122 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
@@ -255,7 +217,6 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 130 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -277,7 +238,6 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 147 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -290,7 +250,6 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 155 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -302,7 +261,6 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 162 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -314,7 +272,6 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 169 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 176 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -336,7 +292,6 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 181 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -348,10 +303,8 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 188 "regex.h2"
 };
 
-#line 191 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -389,20 +342,17 @@ template                  using short_not_space_class = negated_
 //-----------------------------------------------------------------------
 //
 
-#line 229 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 240 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 242 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -413,20 +363,17 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
 
-#line 262 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
 
-#line 280 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 328 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -435,43 +382,36 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 342 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 344 "regex.h2"
 };
 
 // Regex syntax:   Example: a
 //
-template class char_matcher_logic
+template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 357 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 359 "regex.h2"
 };
 
-#line 362 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 374 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 386 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -480,21 +420,18 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 398 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
 //
-template class escaped_char_matcher_logic
-: public char_matcher_logic {
+template class escaped_char_matcher_logic
+: public char_matcher_logic {
 
-#line 406 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 407 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -502,7 +439,6 @@ template class escaped_char_matcher_logic
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 418 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -511,13 +447,11 @@ template class group_matcher_start
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 433 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 445 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -526,7 +460,6 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 455 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -534,14 +467,12 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 472 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 474 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -552,14 +483,12 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 494 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 496 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -570,14 +499,12 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 513 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 515 "regex.h2"
 };
 
 // Named character classes
@@ -590,7 +517,6 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 523 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -598,7 +524,6 @@ template                    void = delete;
 
 
-#line 526 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -606,7 +531,6 @@ template using named_class_white_space = named_class_matcher_log
 template using named_class_word = named_class_matcher_logic>;
 template using named_class_digits = named_class_matcher_logic>;
 
-#line 534 "regex.h2"
 template using named_class_not_white_space = named_class_matcher_logic>;
 template using named_class_not_word = named_class_matcher_logic>;
 template using named_class_not_digits = named_class_matcher_logic>;
@@ -616,7 +540,6 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 545 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
@@ -625,23 +548,18 @@ template class range_m
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 570 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 575 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 580 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 586 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 614 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -653,7 +571,6 @@ template
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
-#line 621 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -664,7 +581,6 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 658 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -672,10 +588,8 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 666 "regex.h2"
 };
 
-#line 669 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -693,7 +607,6 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 688 "regex.h2"
 };
 
 class group_name_list_end {
@@ -702,17 +615,15 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 692 "regex.h2"
 };
 
 // Regular expression implementation
-template class regular_expression {
+template class regular_expression {
 
-    public: template using context = match_context;
+    public: template using context = match_context;
 
     private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
 
-#line 708 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -720,7 +631,6 @@ template matched_, context const& ctx_);
 
-#line 718 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -735,7 +645,6 @@ template void = delete;
 
 
-#line 734 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -743,19 +652,16 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 746 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 768 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 769 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -775,19 +681,15 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 792 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 797 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 806 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 810 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -807,182 +709,138 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, Error_out const& e);
 
-#line 832 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 840 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 844 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 859 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 874 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 894 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 901 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 908 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 930 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 940 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 952 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 962 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 975 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 983 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1099 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1198 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1239 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1248 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1311 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1337 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1360 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1373 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string;
 
-#line 1382 "regex.h2"
 }
 }
 
-
-//=== Cpp2 function definitions =================================================
-
-#line 1 "regex.h2"
-
-#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 51 "regex.h2"
-    template  match_context::match_context(Iter const& begin_, Iter const& end_)
+    inline CPP2_CONSTEXPR int expression_flags::case_insensitive = 1;
+
+    template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 54 "regex.h2"
     }
 
-#line 56 "regex.h2"
-    template  match_context::match_context(match_context const& that)
+    template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 56 "regex.h2"
-    template  auto match_context::operator=(match_context const& that) -> match_context& {
+    template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 56 "regex.h2"
-    template  match_context::match_context(match_context&& that) noexcept
+    template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 56 "regex.h2"
-    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
+    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
                                    groups = std::move(that).groups;
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 60 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
+    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return groups[group];  }
 
-#line 62 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
-        if (cpp2::cmp_greater_eq(group,max_groups)) {
+    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
+        if (group>=max_groups) {
             return ""; 
         }
-        return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+        return std::string(groups[group].start, groups[group].end); 
     }
-#line 68 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
-#line 69 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
-
-#line 71 "regex.h2"
-    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
-        CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
-        CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, groups[group].start); }
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, groups[group].end); }
+
+    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
+        groups[group].end = pos;
+        groups[group].matched = true;
     }
 
-#line 76 "regex.h2"
-    template  auto match_context::set_group_invalid(auto const& group) & -> void{
-        CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
+    template  auto match_context::set_group_invalid(auto const& group) & -> void{
+        groups[group].matched = false;
     }
 
-#line 80 "regex.h2"
-    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
-        CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
+    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
+        groups[group].start = pos;
     }
 
-#line 84 "regex.h2"
-    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
+    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 88 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
+    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return alternatives_pos[alternative];  }
 
-#line 90 "regex.h2"
-    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
-        CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
+    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
+        alternatives_pos[alternative] = pos;
     }
 
-#line 96 "regex.h2"
-    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
+    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
             if (cur.matched) {
@@ -996,61 +854,44 @@ namespace regex {
         return r; 
     }
 
-#line 117 "regex.h2"
+    template  [[nodiscard]] auto match_context::has_flag(cpp2::in f) -> bool{
+        return  0 != (f & flags); 
+    }
+
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx);  }
 
-#line 119 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { 
         return match_select(cur, ctx);  }
 
-#line 122 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { 
         return First::match(cur, ctx, matcher_list());  }
-#line 124 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur);  }
 
-#line 126 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 127 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 129 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 145 "regex.h2"
-    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 146 "regex.h2"
+    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c==C;  }
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 153 "regex.h2"
-    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 154 "regex.h2"
+    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return _0<=_1 && _1<=_2; }();  }
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 160 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 161 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 167 "regex.h2"
-    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 168 "regex.h2"
+    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List==c));  }
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 174 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 175 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 180 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 186 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 187 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 232 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1059,12 +900,9 @@ namespace regex {
         return r; 
     }
 
-#line 240 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 241 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 250 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1077,12 +915,9 @@ namespace regex {
             return match_first(cur, ctx, tail); 
         }
     }
-#line 262 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 263 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 265 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, tail)}; 
         if (r.matched) {
@@ -1090,7 +925,7 @@ namespace regex {
         }else {
             First::reset_ranges(ctx);
 
-            if constexpr (0 != sizeof...(Next)) {
+            if constexpr (0!=sizeof...(Next)) {
                 return match_first(cur, ctx, tail); 
             }else {
                 return match_return(false, ctx.end); 
@@ -1098,7 +933,6 @@ namespace regex {
         }
     }
 
-#line 280 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
         auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
 
@@ -1114,22 +948,20 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 296 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
-        if constexpr (0 != sizeof...(Next)) {
+        if constexpr (0!=sizeof...(Next)) {
             o = match_greedy(cur, max_overall_length, max_current_length, ctx, Tail());
         }
 
         auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; 
-        if (max_overall_length == my_overall_length) {
+        if (max_overall_length==my_overall_length) {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 308 "regex.h2"
-        if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
+        if (std::move(r).matched && std::move(my_overall_length)==max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
-            if (std::move(my_current_length) == max_current_length) {
+            if (std::move(my_current_length)==max_current_length) {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx), ...);  // Reset all other ranges.
                 return First::match(cur, ctx, Tail::prepend(extract_position_helper())); 
@@ -1148,48 +980,60 @@ namespace regex {
         }
     }
 
-#line 334 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur != ctx.end) {
+        if (cur!=ctx.end) {
             return Other::match(cur + 1, ctx); 
         }else {
             return match_return(false, ctx.end); 
         }
     }
 
-#line 342 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 343 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 350 "regex.h2"
-    template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
-            return Other::match(cur + 1, ctx); 
-        }else {
-            return match_return(false, ctx.end); 
+    template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+        if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
+            if (cur!=ctx.end && (*cur==L || *cur==U)) {
+                return Other::match(cur + 1, ctx); 
+            }
+            else {
+                return match_return(false, ctx.end); 
+            }
         }
+        else {
+            if (cur!=ctx.end && *cur==C) {
+                return Other::match(cur + 1, ctx); 
+            }
+            else {
+                return match_return(false, ctx.end); 
+            }
+        }
+
     }
-#line 357 "regex.h2"
-    template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 358 "regex.h2"
-    template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
+    template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 366 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
-            return Other::match(cur + 1, ctx); 
-        }else {
-            return match_return(false, ctx.end); 
+        if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
+            if (cur!=ctx.end && (negate!=match_any(safe_tolower(*cur)) || negate!=match_any(safe_toupper(*cur)))) {
+                return Other::match(cur + 1, ctx); 
+            }
+            else {
+                return match_return(false, ctx.end); 
+            }
+        }
+        else {
+            if (cur!=ctx.end && negate!=match_any(*cur)) {
+                return Other::match(cur + 1, ctx); 
+            }
         }
     }
 
-#line 374 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
         if (!(r)) {
-            if constexpr (0 != sizeof...(Other)) {
+            if constexpr (0!=sizeof...(Other)) {
                 r = match_any(c);
             }
         }
@@ -1197,10 +1041,8 @@ namespace regex {
         return r; 
     }
 
-#line 386 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 388 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1212,23 +1054,19 @@ namespace regex {
         return r; 
     }
 
-#line 406 "regex.h2"
-    template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
+    template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 412 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_start)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
         return r; 
     }
 
-#line 418 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 420 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
-        if (group != 0) {
-            if (0 != CPP2_UFCS(size)(name)) {
+        if (group!=0) {
+            if (0!=CPP2_UFCS(size)(name)) {
                 return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
             }
             else {
@@ -1240,7 +1078,6 @@ namespace regex {
         }
     }
 
-#line 436 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_end)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
@@ -1250,12 +1087,10 @@ namespace regex {
         return r; 
     }
 
-#line 445 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 447 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
-        if (group != 0) {
+        if (group!=0) {
             return ")"; 
         }
         else {
@@ -1263,30 +1098,33 @@ namespace regex {
         }
     }
 
-#line 460 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
         auto pos {cur}; 
-        for( ; g.start != g.end && pos != ctx.end; (++g.start, ++pos) ) {
-            if (*cpp2::assert_not_null(g.start) != *cpp2::assert_not_null(pos)) {
-                return match_return(false, ctx.end); 
+        for( ; g.start!=g.end && pos!=ctx.end; (++g.start, ++pos) ) {
+            if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
+                if (safe_tolower(*g.start)!=safe_tolower(*pos)) {
+                    return match_return(false, ctx.end); 
+                }
+            }
+            else {
+                if (*g.start!=*pos) {
+                    return match_return(false, ctx.end); 
+                }
             }
         }
 
         return Other::match(std::move(pos), ctx); 
     }
-#line 472 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 473 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 482 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
+        if (cur==ctx.end || (match_new_line && *cur=='\n')) {
             return Other::match(cur, ctx); 
         }
-        else {if (!(match_new_line_before_end) && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special cas for new line at end.
+        else {if (!(match_new_line_before_end) && (*cur=='\n' && (cur + 1)==ctx.end)) {// Special cas for new line at end.
             return Other::match(cur, ctx); 
         }
         else {
@@ -1294,14 +1132,11 @@ namespace regex {
         }}
     }
 
-#line 494 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 495 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 504 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
+        if (cur==ctx.begin || (match_new_line && *(cur - 1)=='\n')) {
             return Other::match(cur, ctx); 
         }
         else {
@@ -1309,30 +1144,24 @@ namespace regex {
         }
 
     }
-#line 513 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 514 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 522 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 548 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); }
-#line 549 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 551 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
-      if (min_count == max_count) {
+      if (min_count==max_count) {
         r += ("{" + cpp2::to_string(min_count) + "}");
       }
-      else {if (min_count == -1) {
+      else {if (min_count==-1) {
         r += ("{," + cpp2::to_string(max_count) + "}");
       }
-      else {if (max_count == -1) {
+      else {if (max_count==-1) {
         r += ("{" + cpp2::to_string(min_count) + ",}");
       }
       else {
@@ -1342,30 +1171,26 @@ namespace regex {
       return r; 
     }
 
-#line 570 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
-        if (-1 == max_count) {return true; }
-        else {return cpp2::cmp_less(count,max_count); }
+        if (-1==max_count) {return true; }
+        else {return count [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
-        if (-1 == min_count) {return false; }
-        else {return cpp2::cmp_less(count,min_count); }
+        if (-1==min_count) {return false; }
+        else {return count [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
-        if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
-        if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
+        if (-1!=min_count && countmax_count) {return false; }
         return true; 
     }
 
-#line 586 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto r {M::match(cur, ctx, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
-            (is_below_lower_bound(count) || r.pos != cur)) 
+            (is_below_lower_bound(count) || r.pos!=cur)) 
         {
             auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, Other())}; 
 
@@ -1391,25 +1216,23 @@ namespace regex {
         }
     }
 
-#line 620 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol;  }
 
-#line 629 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         word_class words {}; 
         auto is_match {false}; 
-        if (cur == ctx.begin) {// String start
-            if (cur != ctx.end) {// No empty string
-                is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur));
+        if (cur==ctx.begin) { // String start
+            if (cur!=ctx.end) { // No empty string
+                is_match = CPP2_UFCS(includes)(std::move(words), *cur);
             }
         }
-        else {if (cur == ctx.end) {// String end
-            is_match = CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)));
+        else {if (cur==ctx.end) {// String end
+            is_match = CPP2_UFCS(includes)(words, *(cur - 1));
         }
         else { // Middle of string
             is_match = 
-                   (CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)))) // End of word: \w\W
-                || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur)));// Start of word: \W\w
+                   (CPP2_UFCS(includes)(words, *(cur - 1)) && !(CPP2_UFCS(includes)(words, *cur))) // End of word: \w\W
+                || (!(CPP2_UFCS(includes)(words, *(cur - 1))) && CPP2_UFCS(includes)(std::move(words), *cur));// Start of word: \W\w
 
         }}
         if (negate) {
@@ -1424,9 +1247,7 @@ namespace regex {
         }
 
     }
-#line 658 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 659 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1435,22 +1256,19 @@ namespace regex {
         }
     }
 
-#line 680 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
-        if (name == CPP2_UFCS(data)(Name)) {
-            return group_id;
+        if (name==CPP2_UFCS(data)(Name)) {
+            return group_id; 
         }
         else {
-            return Inner::get_group_id(name);
+            return Inner::get_group_id(name); 
         }
     }
 
-#line 691 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 699 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
-        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
+    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
+        if (pos template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
+        template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 716 "regex.h2"
-        }
-
-#line 718 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 719 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 720 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 721 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
-
-#line 723 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 724 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 725 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
-
-#line 727 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
-            auto group_id {named_groups::get_group_id(g)};
-            if (-1 == group_id) {
+        }
+
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
+
+        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
+            auto group_id {named_groups::get_group_id(g)}; 
+            if (-1==group_id) {
                 // TODO: Throw error.
             }
-            return group_id;
+            return group_id; 
         }
 
-#line 736 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 737 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 738 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 739 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
         auto r {Matcher::match(start, ctx)}; 
-        return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
+        return search_return(r.matched && std::move(r).pos==end, std::move(ctx)); 
     }
 
-#line 746 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 747 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 748 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 749 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
 
@@ -1523,7 +1323,7 @@ namespace regex {
                 break;
             }
 
-            if (cur == ctx.end) {
+            if (cur==ctx.end) {
                 break;
             }
         }
@@ -1531,26 +1331,21 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 768 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
+    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 786 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 792 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 797 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 799 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1558,34 +1353,28 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 806 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 827 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 830 "regex.h2"
     }
 
-#line 834 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 840 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 847 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
-        if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
+        if ((pos + 1) [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find)(regex, e, pos)}; 
 
-        if (end != std::string_view::npos) {
+        if (end!=std::string_view::npos) {
             r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
             pos = std::move(end);
             return true; 
@@ -1610,17 +1398,16 @@ namespace regex {
         }
     }
 
-#line 874 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
-        if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
+        if (regex[start_search]=='-') {
             start_search += 1;
         }
         auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", std::move(start_search))}; 
 
         cpp2::deferred_init r; 
-        if (end != std::string_view::npos) {
+        if (end!=std::string_view::npos) {
             r.construct(CPP2_UFCS(substr)(regex, start, end - std::move(start)));
             pos = std::move(end) - 1;
         }
@@ -1631,13 +1418,11 @@ namespace regex {
         return r.value(); 
     }
 
-#line 896 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 901 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1645,14 +1430,12 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 908 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 910 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
-        if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
+        if (0==CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
-        if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {
+        if (0!=CPP2_UFCS(size)(cur_state.cur_match_list)) {
             CPP2_UFCS(next_alternative)(cur_state);
         }
 
@@ -1669,18 +1452,16 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 930 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
-        std::string r {"::cpp2::regex::group_name_list_end"};
+        std::string r {"::cpp2::regex::group_name_list_end"}; 
 
         for ( auto const& cur : named_groups ) {
             r = { "::cpp2::regex::group_name_list<\"" + cpp2::to_string(cur.first) + "\", " + cpp2::to_string(cur.second) + ", " + cpp2::to_string(r) + ">" };
         }
 
-        return r;
+        return r; 
     }
 
-#line 940 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1693,21 +1474,19 @@ namespace regex {
         return r; 
     }
 
-#line 955 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
-        if (c != '|') {return false; }
+        if (c!='|') {return false; }
 
         CPP2_UFCS(next_alternative)(cur_state);
         return true; 
     }
 
-#line 962 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
-        if (c == '^') {
+        if (c=='^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
             return true; 
         }
-        else {if (c == '$') {
+        else {if (c=='$') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
             return true; 
         }}
@@ -1715,54 +1494,52 @@ namespace regex {
         return false; 
     }
 
-#line 975 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
-        if (c == '.') {
+        if (c=='.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
             return true; 
         }
         return false; 
     }
 
-#line 983 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
-        if (c != '[') {return false; }
+        if (c!='[') {return false; }
 
         std::vector classes {}; 
 
-        char c_cur {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
+        char c_cur {regex[pos]}; 
         auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{
-            *cpp2::assert_not_null(_1) += 1;
-            if (cpp2::cmp_greater_eq(*cpp2::assert_not_null(_1),CPP2_UFCS(size)(_3))) {return false; }
+            *_1 += 1;
+            if (*_1>=CPP2_UFCS(size)(_3)) {return false; }
 
-            *cpp2::assert_not_null(_4) = CPP2_ASSERT_IN_BOUNDS(_3, *cpp2::assert_not_null(_1));
+            *_4 = _3[*_1];
             return true; 
 
         }}; 
 
         auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{
-            if (cpp2::cmp_greater_eq((_1 + 1),CPP2_UFCS(size)(_2))) {return '\0'; }
-            else {return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); }
+            if ((_1 + 1)>=CPP2_UFCS(size)(_2)) {return '\0'; }
+            else {return regex[pos + 1]; }
         }}; 
 
         // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
         auto negate {false}; 
         auto first {true}; 
         auto range {false}; 
-        while( next_item() & (c_cur != ']' || first) ) {
-            if (c_cur == '^') {
+        while( next_item() & (c_cur!=']' || first) ) {
+            if (c_cur=='^') {
                 negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if (c_cur == '[' && peek_item() == ':') {
+            if (c_cur=='[' && peek_item()==':') {
                 // We have a character class.
                 pos += 2; // Skip ':]'
 
                 auto end {CPP2_UFCS(find)(regex, ":]", pos)}; 
-                if (end == std::string::npos) {error("Could not find end of character class."); return false; }
+                if (end==std::string::npos) {error("Could not find end of character class."); return false; }
 
                 auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; 
-                if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
+                if (CPP2_UFCS(end)(supported_classes)==std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
                     error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))));
                     return false; 
                 }
@@ -1772,15 +1549,15 @@ namespace regex {
                 end += 1; // Skip ':' pointing to the ending ']'.
                 pos = end;
             }
-            else {if (c_cur == '\\') {
+            else {if (c_cur=='\\') {
                 if (next_item()  && (c_cur != ']')) {
                     auto name {""}; 
                     if (     's' == c_cur) { name = "short_space"; }
-                    else {if ('S' == c_cur) {name = "short_not_space"; }
-                    else {if ('w' == c_cur) {name = "short_word"; }
-                    else {if ('W' == c_cur) {name = "short_not_word"; }
-                    else {if ('d' == c_cur) {name = "short_digits"; }
-                    else {if ('D' == c_cur) {name = "short_not_digits"; }
+                    else {if ('S'==c_cur) {name = "short_not_space"; }
+                    else {if ('w'==c_cur) {name = "short_word"; }
+                    else {if ('W'==c_cur) {name = "short_not_word"; }
+                    else {if ('d'==c_cur) {name = "short_digits"; }
+                    else {if ('D'==c_cur) {name = "short_not_digits"; }
                     else {
                         error("Unknown group escape.");
                         return false; 
@@ -1791,7 +1568,7 @@ namespace regex {
                     return false; 
                 }
             }
-            else {if (c_cur == '-') {
+            else {if (c_cur=='-') {
                 if (first) {// Literal if first entry.
                     CPP2_UFCS(push_back)(classes, (cpp2::to_string(c_cur)));
                 }else {
@@ -1813,7 +1590,7 @@ namespace regex {
 
         static_cast(std::move(next_item));// TODO: Use in while is not recognized.
 
-        if (std::move(c_cur) != ']') {
+        if (std::move(c_cur)!=']') {
             error("Error end of character class definition before terminating ']'.");
             return false; 
         }
@@ -1828,8 +1605,8 @@ namespace regex {
                 auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; 
                 cur = create_matcher((cpp2::to_string(name) + "_class"), "");
             }
-            else {if (1 != CPP2_UFCS(size)(cur)) {
-                cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"));
+            else {if (1!=CPP2_UFCS(size)(cur)) {
+                cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(cur[0]) + "', '" + cpp2::to_string(cur[2]) + "'"));
             }
             else {
                 cur = create_matcher("single_class_entry", ("'" + cpp2::to_string(cur) + "'"));
@@ -1841,9 +1618,8 @@ namespace regex {
         return true; 
     }
 
-#line 1099 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
-        if (c != '\\') {return false; }
+        if (c!='\\') {return false; }
 
         auto start {pos}; // Keep start for group matchers.
         pos += 1;
@@ -1852,53 +1628,53 @@ namespace regex {
 
             int group_id {0}; 
             if (string_to_int(name, group_id)) {
-                if (cpp2::cmp_less(group_id,0)) {
+                if (group_id<0) {
                     group_id = next_group_id + group_id;
 
-                    if (cpp2::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
+                    if (group_id<1) { // Negative and zero are no valid groups.
                         error(("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)"));
                         return false; 
                     }
                 }
 
-                if (cpp2::cmp_greater_eq(group_id,next_group_id)) {error("Group reference is used before the group is declared."); return false; }
+                if (group_id>=next_group_id) {error("Group reference is used before the group is declared."); return false; }
             }
             else {
                 // Named group
                 auto iter {CPP2_UFCS(find)(named_groups, name)}; 
-                if (iter == CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
+                if (iter==CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
 
-                group_id = (*cpp2::assert_not_null(std::move(iter))).second;
+                group_id = (*std::move(iter)).second;
             }
-            CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *cpp2::assert_not_null(_2) - _1 + 1)) + "\"")));
+            CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *_2 - _1 + 1)) + "\"")));
 
             return true; 
         }}; 
 
-        if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); return false; }
+        if (pos>=CPP2_UFCS(size)(regex)) {error("Escape without a following character."); return false; }
 
-        char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
+        char c_next {regex[pos]}; 
 
-        if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
+        if ([_0 = '1', _1 = c_next, _2 = '9']{ return _0<=_1 && _1<=_2; }()) {
             if (!(add_group_matcher(std::string(1, c_next)))) {return false; }
         }
-        else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
-            if (c_next == '$') {
+        else {if (std::string::npos!=CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
+            if (c_next=='$') {
                 // TODO: Provide proper escape for cppfront capture
                 CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
             }
             else {
-                CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "'")));
+                CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "', '" + cpp2::to_string(safe_tolower(c_next)) + "', '" + cpp2::to_string(safe_toupper(c_next)) + "'")));
             }
         }
-        else {if ('\\' == c_next) {
-            CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\'"));
+        else {if ('\\'==c_next) {
+            CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\', '\\\\', '\\\\'"));
         }
-        else {if ('g' == c_next) {
+        else {if ('g'==c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
 
             std::string group {""}; 
-            if (c_next == '{') {
+            if (c_next=='{') {
                 if (!((next(cpp2::out(&c_next)) && grab_until('}', cpp2::out(&group))))) {error("No ending bracket."); return false; }
             }
             else {
@@ -1906,13 +1682,13 @@ namespace regex {
             }
             if (!(add_group_matcher(std::move(group)))) {return false; }
         }
-        else {if ('k' == c_next) {
+        else {if ('k'==c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
 
             auto term_char {'\0'}; 
-            if (c_next == '{') {term_char = '}'; }
-            else {if (c_next == '<') {term_char = '>'; }
-            else {if (c_next == '\'') {term_char = '\''; }
+            if (c_next=='{') {term_char = '}'; }
+            else {if (c_next=='<') {term_char = '>'; }
+            else {if (c_next=='\'') {term_char = '\''; }
             else {
                 error("Group escape has wrong operator."); return false; 
             }}}
@@ -1921,18 +1697,18 @@ namespace regex {
             if (!((next(cpp2::out(&c_next)) && grab_until(std::move(term_char), cpp2::out(&group))))) {error("No ending bracket."); return false; }
             if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
         }
-        else {if ('N' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
-        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_white_space", "")); }
-        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_white_space", "")); }
-        else {if ('w' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_word", "")); }
-        else {if ('W' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_word", "")); }
-        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
-        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
-        else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
-        else {if ('z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
-        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
-        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
-        else {if ('B' == std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
+        else {if ('N'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
+        else {if ('s'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_white_space", "")); }
+        else {if ('S'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_white_space", "")); }
+        else {if ('w'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_word", "")); }
+        else {if ('W'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_word", "")); }
+        else {if ('d'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
+        else {if ('D'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
+        else {if ('Z'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
+        else {if ('z'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
+        else {if ('A'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
+        else {if ('b'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
+        else {if ('B'==std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
         else {
             error("Unknown escape.");
             return false; 
@@ -1941,9 +1717,8 @@ namespace regex {
         return true; 
     }
 
-#line 1198 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
-        if (c != '(') {return false; }
+        if (c!='(') {return false; }
 
         auto group_number {next_group_id}; 
         next_group_id += 1;
@@ -1955,16 +1730,16 @@ namespace regex {
         char c_next {'\0'}; 
         // Skip the '('
         if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
-        if (c_next == '?') {
+        if (c_next=='?') {
             // Named group
-            if (!((next(cpp2::out(&c_next)) && c_next == '<'))) {error("Missing opening bracket for named group."); return false; }
+            if (!((next(cpp2::out(&c_next)) && c_next=='<'))) {error("Missing opening bracket for named group."); return false; }
             if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
             std::string name {""}; 
             if (!(grab_until('>', cpp2::out(&name)))) {error("Missing ending bracket for named group."); return false; }
             if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
 
             if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
-                CPP2_ASSERT_IN_BOUNDS(named_groups, name) = group_number;
+                named_groups[name] = group_number;
             }
             start_matcher = create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"" + cpp2::to_string(std::move(name)) + "\""));
         }
@@ -1983,17 +1758,15 @@ namespace regex {
         return true; 
     }
 
-#line 1239 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
-        if (c == '\'') {
-            CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "'")));
+        if (c=='\'') {
+            CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
             return true; 
         }
 
         return false; 
     }
 
-#line 1248 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2006,11 +1779,11 @@ namespace regex {
             // return 0;
         }}; 
 
-        if (c != '{') {return false; }
+        if (c!='{') {return false; }
         if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element.");return false; }
 
         size_t end {CPP2_UFCS(find)(regex, "}", pos)}; 
-        if (end == std::string::npos) {error("Missing closing bracket."); return false; }
+        if (end==std::string::npos) {error("Missing closing bracket."); return false; }
 
         std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; 
         if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
@@ -2021,7 +1794,7 @@ namespace regex {
         int max_count_number {std::numeric_limits::max()}; 
 
         size_t sep {CPP2_UFCS(find)(inner, ",")}; 
-        if (sep == std::string::npos) {
+        if (sep==std::string::npos) {
             min_count = inner;
             max_count = inner;
             min_count_number = std::move(to_int)(inner);
@@ -2046,7 +1819,7 @@ namespace regex {
             }
         }
 
-        if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) {
+        if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return _0<=_1 && _1<=_2; }()))) {
             error(("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string(std::move(min_count_number)) + " <= " + cpp2::to_string(std::move(max_count_number))));
             return false; 
         }
@@ -2057,17 +1830,16 @@ namespace regex {
         return true; 
     }
 
-#line 1311 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
-        if (c == '*') {
+        if (c=='*') {
             min_range = "0";
         }
-        else {if (c == '+') {
+        else {if (c=='+') {
             min_range = "1";
         }
-        else {if (c == '?') {
+        else {if (c=='?') {
             min_range = "0";
             max_range = "1";
         }
@@ -2084,12 +1856,11 @@ namespace regex {
         return true; 
     }
 
-#line 1337 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
-        for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
-            char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
+        for( ; pos!=CPP2_UFCS(size)(regex); pos += 1 ) {
+            char c {regex[pos]}; 
 
-            if (c == term) {return ; }
+            if (c==term) {return ; }
 
             if (!(has_error) && is_alternative(c)) {continue; }
             if (!(has_error) && is_any(c)) {continue; }
@@ -2104,25 +1875,23 @@ namespace regex {
             if (has_error) {return ; }
 
             // No special char, push a character match
-            CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "'")));
+            CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "', '" + cpp2::to_string(safe_tolower(c)) + "', '" + cpp2::to_string(safe_toupper(c)) + "'")));
         }
     }
 
-#line 1360 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
         if (has_error) {return "Error"; }
 
-        auto named_groups_arg {create_named_groups_arg()};
+        auto named_groups_arg {create_named_groups_arg()}; 
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0, \"\"")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
-        return   create_matcher("regular_expression", (cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list))));
+        return   create_matcher("regular_expression", ("cpp2::regex::expression_flags::case_insensitive, " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1375 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{
     regex_parser parser {regex, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/include/string_util.h b/include/string_util.h
index a2e6f49f5c..dd56b85ca9 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -85,5 +85,12 @@ inline bool string_to_int(std::string const& s, int& v) {
     {
         return false;
     }
+}
+
+inline char safe_toupper(char ch) {
+    return static_cast(std::toupper(static_cast(ch)));
+}
 
+inline char safe_tolower(char ch) {
+    return static_cast(std::tolower(static_cast(ch)));
 }
diff --git a/source/reflect.h b/source/reflect.h
index a52af97081..964813e8f1 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -3,52 +3,34 @@
 #define REFLECT_H_CPP2
 
 
-//=== Cpp2 type declarations ====================================================
-
-
 #include "cpp2util.h"
 
-#line 1 "reflect.h2"
 
-#line 21 "reflect.h2"
 namespace cpp2 {
 
 namespace meta {
 
-#line 33 "reflect.h2"
 class compiler_services;
 
-#line 224 "reflect.h2"
 class declaration_base;
 
-#line 250 "reflect.h2"
 class declaration;
 
-#line 332 "reflect.h2"
 class function_declaration;
 
-#line 419 "reflect.h2"
 class object_declaration;
 
-#line 455 "reflect.h2"
 class type_declaration;
 
-#line 590 "reflect.h2"
 class alias_declaration;
 
-#line 963 "reflect.h2"
 class value_member_info;
 
-#line 1544 "reflect.h2"
 }
 
 }
 
 
-//=== Cpp2 type definitions and function declarations ===========================
-
-#line 1 "reflect.h2"
-
 //  Copyright (c) Herb Sutter
 //  SPDX-License-Identifier: CC-BY-NC-ND-4.0
 
@@ -68,12 +50,10 @@ class value_member_info;
 #include "parse.h"
 #include "cpp2regex.h"
 
-#line 21 "reflect.h2"
 namespace cpp2 {
 
 namespace meta {
 
-#line 26 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  Compiler services
@@ -101,34 +81,27 @@ class compiler_services
         std::deque* generated_tokens_
     );
 
-#line 59 "reflect.h2"
     //  Common API
     //
     public: auto set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void;
 
-#line 67 "reflect.h2"
     public: [[nodiscard]] auto get_metafunction_name() const& -> std::string_view;
 
     public: [[nodiscard]] auto get_argument(cpp2::in index) & -> std::string;
 
-#line 77 "reflect.h2"
     public: [[nodiscard]] auto get_arguments() & -> std::vector;
 
-#line 82 "reflect.h2"
     public: [[nodiscard]] auto arguments_were_used() const& -> bool;
 using parse_statement_ret = std::unique_ptr;
 
 
-#line 84 "reflect.h2"
     protected: [[nodiscard]] auto parse_statement(
 
         std::string_view source
     ) & -> parse_statement_ret;
 
-#line 137 "reflect.h2"
     public: [[nodiscard]] virtual auto position() const -> source_position;
 
-#line 143 "reflect.h2"
     //  Error diagnosis and handling, integrated with compiler output
     //  Unlike a contract violation, .requires continues further processing
     //
@@ -138,24 +111,19 @@ using parse_statement_ret = std::unique_ptr;
         cpp2::in msg
     ) const& -> void;
 
-#line 157 "reflect.h2"
     public: auto error(cpp2::in msg) const& -> void;
 
-#line 166 "reflect.h2"
     //  Enable custom contracts on this object, integrated with compiler output
     //  Unlike .requires, a contract violation stops further processing
     //
     public: auto report_violation(auto const& msg) const& -> void;
 
-#line 174 "reflect.h2"
     public: [[nodiscard]] auto has_handler() const& -> auto;
     public: virtual ~compiler_services() noexcept;
 public: compiler_services(compiler_services const& that);
 
-#line 175 "reflect.h2"
 };
 
-#line 178 "reflect.h2"
 /*
 //-----------------------------------------------------------------------
 //
@@ -192,7 +160,6 @@ type_id: @polymorphic_base @copyable type =
 }
 */
 
-#line 215 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  Declarations
@@ -205,7 +172,6 @@ type_id: @polymorphic_base @copyable type =
 class declaration_base
 : public compiler_services {
 
-#line 228 "reflect.h2"
     protected: declaration_node* n; 
 
     protected: explicit declaration_base(
@@ -214,31 +180,26 @@ class declaration_base
         cpp2::in s
     );
 
-#line 241 "reflect.h2"
     public: [[nodiscard]] auto position() const -> source_position override;
 
     public: [[nodiscard]] auto print() const& -> std::string;
     public: virtual ~declaration_base() noexcept;
 public: declaration_base(declaration_base const& that);
 
-#line 244 "reflect.h2"
 };
 
-#line 247 "reflect.h2"
 //-----------------------------------------------------------------------
 //  All declarations
 //
 class declaration
 : public declaration_base {
 
-#line 254 "reflect.h2"
     public: explicit declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
-#line 263 "reflect.h2"
     public: [[nodiscard]] auto is_public() const& -> bool;
     public: [[nodiscard]] auto is_protected() const& -> bool;
     public: [[nodiscard]] auto is_private() const& -> bool;
@@ -257,7 +218,6 @@ class declaration
 
     public: [[nodiscard]] auto name() const& -> std::string_view;
 
-#line 284 "reflect.h2"
     public: [[nodiscard]] auto has_initializer() const& -> bool;
 
     public: [[nodiscard]] auto is_global() const& -> bool;
@@ -300,24 +260,20 @@ public: declaration(declaration const& that);
 
                                                     // this precondition should be sufficient ...
 
-#line 326 "reflect.h2"
 };
 
-#line 329 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Function declarations
 //
 class function_declaration
 : public declaration {
 
-#line 336 "reflect.h2"
     public: explicit function_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
-#line 346 "reflect.h2"
     public: [[nodiscard]] auto index_of_parameter_named(cpp2::in s) const& -> int;
     public: [[nodiscard]] auto has_parameter_named(cpp2::in s) const& -> bool;
     public: [[nodiscard]] auto has_in_parameter_named(cpp2::in s) const& -> bool;
@@ -354,7 +310,6 @@ class function_declaration
 
     public: [[nodiscard]] auto get_parameters() const& -> std::vector;
 
-#line 390 "reflect.h2"
     public: [[nodiscard]] auto is_binary_comparison_function() const& -> bool;
 
     public: auto default_to_virtual() & -> void;
@@ -365,103 +320,82 @@ class function_declaration
     public: function_declaration(function_declaration const& that);
 
 
-#line 413 "reflect.h2"
 };
 
-#line 416 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Object declarations
 //
 class object_declaration
 : public declaration {
 
-#line 423 "reflect.h2"
     public: explicit object_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
-#line 433 "reflect.h2"
     public: [[nodiscard]] auto is_const() const& -> bool;
     public: [[nodiscard]] auto has_wildcard_type() const& -> bool;
 
     public: [[nodiscard]] auto type() const& -> std::string;
 
-#line 443 "reflect.h2"
     public: [[nodiscard]] auto initializer() const& -> std::string;
     public: object_declaration(object_declaration const& that);
 
 
-#line 449 "reflect.h2"
 };
 
-#line 452 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Type declarations
 //
 class type_declaration
 : public declaration {
 
-#line 459 "reflect.h2"
     public: explicit type_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
-#line 469 "reflect.h2"
     public: auto reserve_names(cpp2::in name, auto&& ...etc) const& -> void;
 
-#line 481 "reflect.h2"
     public: [[nodiscard]] auto is_polymorphic() const& -> bool;
     public: [[nodiscard]] auto is_final() const& -> bool;
     public: [[nodiscard]] auto make_final() & -> bool;
 
     public: [[nodiscard]] auto get_member_functions() const& -> std::vector;
 
-#line 496 "reflect.h2"
     public: [[nodiscard]] auto get_member_functions_needing_initializer() const& -> std::vector;
 
-#line 511 "reflect.h2"
     public: [[nodiscard]] auto get_member_objects() const& -> std::vector;
 
-#line 521 "reflect.h2"
     public: [[nodiscard]] auto get_member_types() const& -> std::vector;
 
-#line 531 "reflect.h2"
     public: [[nodiscard]] auto get_member_aliases() const& -> std::vector;
 
-#line 541 "reflect.h2"
     public: [[nodiscard]] auto get_members() const& -> std::vector;
 struct query_declared_value_set_functions_ret { bool out_this_in_that; bool out_this_move_that; bool inout_this_in_that; bool inout_this_move_that; };
 
 
 
-#line 551 "reflect.h2"
     public: [[nodiscard]] auto query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret;
 
-#line 566 "reflect.h2"
     public: auto add_member(cpp2::in source) & -> void;
 
-#line 580 "reflect.h2"
     public: auto remove_marked_members() & -> void;
     public: auto remove_all_members() & -> void;
 
     public: auto disable_member_function_generation() & -> void;
     public: type_declaration(type_declaration const& that);
 
-#line 584 "reflect.h2"
 };
 
-#line 587 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Alias declarations
 //
 class alias_declaration
 : public declaration {
 
-#line 594 "reflect.h2"
     public: explicit alias_declaration(
 
         declaration_node* n_, 
@@ -470,10 +404,8 @@ class alias_declaration
     public: alias_declaration(alias_declaration const& that);
 
 
-#line 603 "reflect.h2"
 };
 
-#line 606 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  Metafunctions - these are hardwired for now until we get to the
@@ -488,7 +420,6 @@ class alias_declaration
 //
 auto add_virtual_destructor(meta::type_declaration& t) -> void;
 
-#line 624 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //      "... an abstract base class defines an interface ..."
@@ -503,7 +434,6 @@ auto add_virtual_destructor(meta::type_declaration& t) -> void;
 //
 auto interface(meta::type_declaration& t) -> void;
 
-#line 663 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "C.35: A base class destructor should be either public and
@@ -525,7 +455,6 @@ auto interface(meta::type_declaration& t) -> void;
 //
 auto polymorphic_base(meta::type_declaration& t) -> void;
 
-#line 707 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "... A totally ordered type ... requires operator<=> that
@@ -551,7 +480,6 @@ auto ordered_impl(
     cpp2::in ordering// must be "strong_ordering" etc.
 ) -> void;
 
-#line 751 "reflect.h2"
 //-----------------------------------------------------------------------
 //  ordered - a totally ordered type
 //
@@ -559,19 +487,16 @@ auto ordered_impl(
 //
 auto ordered(meta::type_declaration& t) -> void;
 
-#line 761 "reflect.h2"
 //-----------------------------------------------------------------------
 //  weakly_ordered - a weakly ordered type
 //
 auto weakly_ordered(meta::type_declaration& t) -> void;
 
-#line 769 "reflect.h2"
 //-----------------------------------------------------------------------
 //  partially_ordered - a partially ordered type
 //
 auto partially_ordered(meta::type_declaration& t) -> void;
 
-#line 778 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "A value is ... a regular type. It must have all public
@@ -590,7 +515,6 @@ auto partially_ordered(meta::type_declaration& t) -> void;
 //
 auto copyable(meta::type_declaration& t) -> void;
 
-#line 815 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  basic_value
@@ -600,7 +524,6 @@ auto copyable(meta::type_declaration& t) -> void;
 //
 auto basic_value(meta::type_declaration& t) -> void;
 
-#line 840 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "A 'value' is a totally ordered basic_value..."
@@ -613,13 +536,10 @@ auto basic_value(meta::type_declaration& t) -> void;
 //
 auto value(meta::type_declaration& t) -> void;
 
-#line 856 "reflect.h2"
 auto weakly_ordered_value(meta::type_declaration& t) -> void;
 
-#line 862 "reflect.h2"
 auto partially_ordered_value(meta::type_declaration& t) -> void;
 
-#line 869 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     C.20: If you can avoid defining default operations, do
@@ -644,7 +564,6 @@ auto partially_ordered_value(meta::type_declaration& t) -> void;
 //
 auto cpp1_rule_of_zero(meta::type_declaration& t) -> void;
 
-#line 903 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "By definition, a `struct` is a `class` in which members
@@ -672,7 +591,6 @@ auto cpp1_rule_of_zero(meta::type_declaration& t) -> void;
 //
 auto cpp2_struct(meta::type_declaration& t) -> void;
 
-#line 946 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "C enumerations constitute a curiously half-baked concept. ...
@@ -702,7 +620,6 @@ auto basic_enum(
     cpp2::in bitwise
     ) -> void;
 
-#line 1152 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //    "An enum[...] is a totally ordered value type that stores a
@@ -714,7 +631,6 @@ auto basic_enum(
 //
 auto cpp2_enum(meta::type_declaration& t) -> void;
 
-#line 1178 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "flag_enum expresses an enumeration that stores values
@@ -727,7 +643,6 @@ auto cpp2_enum(meta::type_declaration& t) -> void;
 //
 auto flag_enum(meta::type_declaration& t) -> void;
 
-#line 1210 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "As with void*, programmers should know that unions [...] are
@@ -754,14 +669,12 @@ auto flag_enum(meta::type_declaration& t) -> void;
 
 auto cpp2_union(meta::type_declaration& t) -> void;
 
-#line 1366 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  print - output a pretty-printed visualization of t
 //
 auto print(cpp2::in t) -> void;
 
-#line 1375 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  regex - creates regular expressions from members
@@ -778,7 +691,6 @@ auto print(cpp2::in t) -> void;
 //
 auto regex_gen(meta::type_declaration& t) -> void;
 
-#line 1434 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  apply_metafunctions
@@ -789,66 +701,50 @@ auto regex_gen(meta::type_declaration& t) -> void;
     auto const& error
     ) -> bool;
 
-#line 1544 "reflect.h2"
 }
 
 }
 
-
-//=== Cpp2 function definitions =================================================
-
-#line 1 "reflect.h2"
-
-#line 21 "reflect.h2"
 namespace cpp2 {
 
 namespace meta {
 
-#line 47 "reflect.h2"
     compiler_services::compiler_services(
 
         std::vector* errors_, 
         std::deque* generated_tokens_
     )
         : errors{ errors_ }
-        , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*cpp2::assert_not_null(errors))) }
+        , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*errors)) }
         , generated_tokens{ generated_tokens_ }
-        , parser{ *cpp2::assert_not_null(errors) }
-#line 52 "reflect.h2"
+        , parser{ *errors }
     {
 
-#line 57 "reflect.h2"
     }
 
-#line 61 "reflect.h2"
     auto compiler_services::set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void{
         metafunction_name  = name;
         metafunction_args  = args;
         metafunctions_used = CPP2_UFCS(empty)(args);
     }
 
-#line 67 "reflect.h2"
     [[nodiscard]] auto compiler_services::get_metafunction_name() const& -> std::string_view { return metafunction_name;  }
 
-#line 69 "reflect.h2"
     [[nodiscard]] auto compiler_services::get_argument(cpp2::in index) & -> std::string{
         metafunctions_used = true;
-        if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less(_1,_2); }())) {
-            return CPP2_ASSERT_IN_BOUNDS(metafunction_args, index); 
+        if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return _0<=_1 && _1<_2; }())) {
+            return metafunction_args[index]; 
         }
         return ""; 
     }
 
-#line 77 "reflect.h2"
     [[nodiscard]] auto compiler_services::get_arguments() & -> std::vector{
         metafunctions_used = true;
         return metafunction_args; 
     }
 
-#line 82 "reflect.h2"
     [[nodiscard]] auto compiler_services::arguments_were_used() const& -> bool { return metafunctions_used;  }
 
-#line 84 "reflect.h2"
     [[nodiscard]] auto compiler_services::parse_statement(
 
         std::string_view source
@@ -856,14 +752,13 @@ namespace meta {
 
     {
             cpp2::deferred_init> ret;
-#line 90 "reflect.h2"
         auto original_source {source}; 
 
         CPP2_UFCS(push_back)(generated_lines, std::vector());
         auto lines {&CPP2_UFCS(back)(generated_lines)}; 
 
         auto add_line {[&, _1 = lines](cpp2::in s) mutable -> void{
-            static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(_1)), s, source_line::category::cpp2));
+            static_cast(CPP2_UFCS(emplace_back)((*_1), s, source_line::category::cpp2));
         }}; 
 {
 auto newline_pos{CPP2_UFCS(find)(source, '\n')};
@@ -871,11 +766,10 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         //  First split this string into source_lines
         //
 
-#line 102 "reflect.h2"
-        if ( cpp2::cmp_greater(CPP2_UFCS(ssize)(source),1) 
-            && newline_pos != source.npos) 
+        if ( CPP2_UFCS(ssize)(source)>1 
+            && newline_pos!=source.npos) 
         {
-            while( newline_pos != std::string_view::npos ) 
+            while( newline_pos!=std::string_view::npos ) 
             {
                 add_line(CPP2_UFCS(substr)(source, 0, newline_pos));
                 CPP2_UFCS(remove_prefix)(source, newline_pos + 1);
@@ -884,7 +778,6 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         }
 }
 
-#line 113 "reflect.h2"
         if (!(CPP2_UFCS(empty)(source))) {
             std::move(add_line)(std::move(source));
         }
@@ -892,31 +785,29 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         //  Now lex this source fragment to generate
         //  a single grammar_map entry, whose .second
         //  is the vector of tokens
-        static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *cpp2::assert_not_null(errors)));
+        static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *errors));
         auto tokens {&CPP2_UFCS(back)(generated_lexers)}; 
-        CPP2_UFCS(lex)((*cpp2::assert_not_null(tokens)), *cpp2::assert_not_null(std::move(lines)), true);
+        CPP2_UFCS(lex)((*tokens), *std::move(lines), true);
 
-        if (cpp2::Default.has_handler() && !(std::ssize(CPP2_UFCS(get_map)((*cpp2::assert_not_null(tokens)))) == 1) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(std::ssize(CPP2_UFCS(get_map)((*tokens)))==1) ) { cpp2::Default.report_violation(""); }
 
         //  Now parse this single declaration from
         //  the lexed tokens
         ret.construct(CPP2_UFCS(parse_one_declaration)(parser, 
-                (*cpp2::assert_not_null(CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*cpp2::assert_not_null(std::move(tokens)))))).second, 
-                *cpp2::assert_not_null(generated_tokens)
+                (*CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*std::move(tokens)))).second, 
+                *generated_tokens
               ));
         if (!(ret.value())) {
             error(("parse failed - the source string is not a valid statement:\n" + cpp2::to_string(std::move(original_source))));
         }return std::move(ret.value()); 
     }
 
-#line 137 "reflect.h2"
     [[nodiscard]] auto compiler_services::position() const -> source_position
 
     {
         return {  }; 
     }
 
-#line 146 "reflect.h2"
     auto compiler_services::require(
 
         cpp2::in b, 
@@ -928,23 +819,20 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         }
     }
 
-#line 157 "reflect.h2"
     auto compiler_services::error(cpp2::in msg) const& -> void
     {
         auto message {cpp2::as_(msg)}; 
         if (!(CPP2_UFCS(empty)(metafunction_name))) {
             message = { "while applying @" + cpp2::to_string(metafunction_name) + " - " + cpp2::to_string(message) };
         }
-        static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(errors)), position(), std::move(message)));
+        static_cast(CPP2_UFCS(emplace_back)((*errors), position(), std::move(message)));
     }
 
-#line 169 "reflect.h2"
     auto compiler_services::report_violation(auto const& msg) const& -> void{
         error(msg);
         throw(std::runtime_error(("  ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " - contract violation - see previous errors")));
     }
 
-#line 174 "reflect.h2"
     [[nodiscard]] auto compiler_services::has_handler() const& -> auto { return true;  }
 
     compiler_services::~compiler_services() noexcept{}
@@ -957,7 +845,6 @@ compiler_services::compiler_services(compiler_services const& that)
                                 , metafunction_args{ that.metafunction_args }
                                 , metafunctions_used{ that.metafunctions_used }{}
 
-#line 230 "reflect.h2"
     declaration_base::declaration_base(
 
         declaration_node* n_, 
@@ -965,140 +852,92 @@ compiler_services::compiler_services(compiler_services const& that)
     )
         : compiler_services{ s }
         , n{ n_ }
-#line 235 "reflect.h2"
     {
 
-#line 238 "reflect.h2"
         if (cpp2::Default.has_handler() && !(n) ) { cpp2::Default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); }
     }
 
-#line 241 "reflect.h2"
-    [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*cpp2::assert_not_null(n)));  }
+    [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*n));  }
 
-#line 243 "reflect.h2"
-    [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*cpp2::assert_not_null(n)), 0);  }
+    [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*n), 0);  }
 
     declaration_base::~declaration_base() noexcept{}
 declaration_base::declaration_base(declaration_base const& that)
                                 : compiler_services{ static_cast(that) }
                                 , n{ that.n }{}
 
-#line 254 "reflect.h2"
     declaration::declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration_base{ n_, s }
-#line 259 "reflect.h2"
     {
 
     }
 
-#line 263 "reflect.h2"
-    [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::assert_not_null(n))); }
-#line 264 "reflect.h2"
-    [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::assert_not_null(n))); }
-#line 265 "reflect.h2"
-    [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::assert_not_null(n))); }
-#line 266 "reflect.h2"
-    [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*cpp2::assert_not_null(n)));  }
-
-#line 268 "reflect.h2"
-    auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*cpp2::assert_not_null(n)))); }
-#line 269 "reflect.h2"
-    auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n))));  }
-#line 270 "reflect.h2"
-    auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*cpp2::assert_not_null(n)))); }
-
-#line 272 "reflect.h2"
-    [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::assert_not_null(n))); }
-#line 273 "reflect.h2"
-    [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n))); }
-#line 274 "reflect.h2"
-    [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*cpp2::assert_not_null(n))); }
-
-#line 276 "reflect.h2"
-    [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n))); }
-#line 277 "reflect.h2"
-    [[nodiscard]] auto declaration::has_name(cpp2::in s) const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n)), s); }
-
-#line 279 "reflect.h2"
+    [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*n)); }
+    [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*n)); }
+    [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*n)); }
+    [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*n));  }
+
+    auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*n))); }
+    auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*n)));  }
+    auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*n))); }
+
+    [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*n)); }
+    [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*n)); }
+    [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*n)); }
+
+    [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*n)); }
+    [[nodiscard]] auto declaration::has_name(cpp2::in s) const& -> bool { return CPP2_UFCS(has_name)((*n), s); }
+
     [[nodiscard]] auto declaration::name() const& -> std::string_view{
-        if (has_name()) {return CPP2_UFCS(as_string_view)((*cpp2::assert_not_null(CPP2_UFCS(name)(*cpp2::assert_not_null(n))))); }
+        if (has_name()) {return CPP2_UFCS(as_string_view)((*CPP2_UFCS(name)(*n))); }
         else          { return ""; }
     }
 
-#line 284 "reflect.h2"
-    [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*cpp2::assert_not_null(n)));  }
-
-#line 286 "reflect.h2"
-    [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::assert_not_null(n))); }
-#line 287 "reflect.h2"
-    [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::assert_not_null(n))); }
-#line 288 "reflect.h2"
-    [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::assert_not_null(n))); }
-#line 289 "reflect.h2"
-    [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::assert_not_null(n))); }
-#line 290 "reflect.h2"
-    [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::assert_not_null(n)));  }
-#line 291 "reflect.h2"
-    [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::assert_not_null(n))); }
-#line 292 "reflect.h2"
-    [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::assert_not_null(n))); }
-#line 293 "reflect.h2"
-    [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n))); }
-
-#line 295 "reflect.h2"
-    [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::assert_not_null(n))); }
-#line 296 "reflect.h2"
-    [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::assert_not_null(n)));  }
-#line 297 "reflect.h2"
-    [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*cpp2::assert_not_null(n))); }
-
-#line 299 "reflect.h2"
-    [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*cpp2::assert_not_null(n)));  }
-
-#line 301 "reflect.h2"
+    [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*n));  }
+
+    [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*n)); }
+    [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*n)); }
+    [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*n)); }
+    [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*n)); }
+    [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*n));  }
+    [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*n)); }
+    [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*n)); }
+    [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*n)); }
+
+    [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*n)); }
+    [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*n));  }
+    [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*n)); }
+
+    [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*n));  }
+
     [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this));  }
-#line 302 "reflect.h2"
     [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); }
-#line 303 "reflect.h2"
     [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); }
-#line 304 "reflect.h2"
     [[nodiscard]] auto declaration::as_alias() const& -> alias_declaration { return alias_declaration(n, (*this)); }
 
-#line 306 "reflect.h2"
-    [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*cpp2::assert_not_null(n)).parent_declaration, (*this)); }
-
-#line 308 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::assert_not_null(n))); }
-#line 309 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::assert_not_null(n))); }
-#line 310 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::assert_not_null(n))); }
-#line 311 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::assert_not_null(n))); }
-#line 312 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*cpp2::assert_not_null(n))); }
-
-#line 314 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::assert_not_null(n))); }
-#line 315 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::assert_not_null(n)));  }
-#line 316 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*cpp2::assert_not_null(n))); }
-
-#line 318 "reflect.h2"
-    [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*cpp2::assert_not_null(n)));  }
-
-#line 320 "reflect.h2"
+    [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*n).parent_declaration, (*this)); }
+
+    [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*n)); }
+    [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*n)); }
+    [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*n)); }
+    [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*n)); }
+    [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*n)); }
+
+    [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*n)); }
+    [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*n));  }
+    [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*n)); }
+
+    [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*n));  }
+
     auto declaration::mark_for_removal_from_enclosing_type() & -> void
 
     {
         if (cpp2::Type.has_handler() && !(parent_is_type()) ) { cpp2::Type.report_violation(""); }
-#line 323 "reflect.h2"
-        auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::assert_not_null(n)))}; 
+        auto test {CPP2_UFCS(type_member_mark_for_removal)((*n))}; 
         if (cpp2::Default.has_handler() && !(std::move(test)) ) { cpp2::Default.report_violation(""); }// ... to ensure this assert is true
     }
 
@@ -1106,105 +945,69 @@ declaration_base::declaration_base(declaration_base const& that)
 declaration::declaration(declaration const& that)
                                 : declaration_base{ static_cast(that) }{}
 
-#line 336 "reflect.h2"
     function_declaration::function_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
-#line 341 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*n))) ) { cpp2::Default.report_violation(""); }
     }
 
-#line 346 "reflect.h2"
-    [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::assert_not_null(n)), s); }
-#line 347 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::assert_not_null(n)), s); }
-#line 348 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::assert_not_null(n)), s); }
-#line 349 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::assert_not_null(n)), s); }
-#line 350 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::assert_not_null(n)), s); }
-#line 351 "reflect.h2"
-    [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::assert_not_null(n))); }
-
-#line 353 "reflect.h2"
+    [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*n), s); }
+    [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*n), s); }
+    [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*n), s); }
+    [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*n), s); }
+    [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*n), s); }
+    [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*n)); }
+
     [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::in s, cpp2::in pass) const& -> bool { 
-                                                  return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::assert_not_null(n)), s, pass);  }
-#line 355 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::assert_not_null(n))); }
-#line 356 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(n))); }
-#line 357 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(n))); }
-#line 358 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::assert_not_null(n))); }
-#line 359 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::assert_not_null(n))); }
-#line 360 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::assert_not_null(n))); }
-#line 361 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::assert_not_null(n))); }
-#line 362 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::assert_not_null(n))); }
-#line 363 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::assert_not_null(n))); }
-#line 364 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::assert_not_null(n)));  }
-#line 365 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::assert_not_null(n))); }
-#line 366 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::assert_not_null(n))); }
-#line 367 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::assert_not_null(n))); }
-#line 368 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::assert_not_null(n)));  }
-#line 369 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*cpp2::assert_not_null(n))); }
-
-#line 371 "reflect.h2"
+                                                  return CPP2_UFCS(has_parameter_with_name_and_pass)((*n), s, pass);  }
+    [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*n)); }
+    [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*n)); }
+    [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*n)); }
+    [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*n)); }
+    [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*n)); }
+    [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*n)); }
+    [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*n)); }
+    [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*n)); }
+    [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*n)); }
+    [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*n));  }
+    [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*n)); }
+    [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*n)); }
+    [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*n)); }
+    [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*n));  }
+    [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*n)); }
+
     [[nodiscard]] auto function_declaration::is_copy_or_move() const& -> bool { return is_constructor_with_that() || is_assignment_with_that(); }
 
-#line 373 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::assert_not_null(n))); }
-#line 374 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::assert_not_null(n))); }
-#line 375 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::assert_not_null(n))); }
-#line 376 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*cpp2::assert_not_null(n))); }
+    [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*n)); }
+    [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*n)); }
+    [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*n)); }
+    [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*n)); }
 
-#line 378 "reflect.h2"
-    [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*cpp2::assert_not_null(n))); }
+    [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*n)); }
 
-#line 380 "reflect.h2"
     [[nodiscard]] auto function_declaration::get_parameters() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& param : CPP2_UFCS(get_function_parameters)((*cpp2::assert_not_null(n))) ) {
-            static_cast(CPP2_UFCS(emplace_back)(ret, &*cpp2::assert_not_null((*cpp2::assert_not_null(param)).declaration), (*this)));
+        for ( auto const& param : CPP2_UFCS(get_function_parameters)((*n)) ) {
+            static_cast(CPP2_UFCS(emplace_back)(ret, &*(*param).declaration, (*this)));
         }
         return ret; 
     }
 
-#line 390 "reflect.h2"
-    [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*cpp2::assert_not_null(n)));  }
+    [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*n));  }
 
-#line 392 "reflect.h2"
-    auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n)))); }
+    auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*n))); }
 
-#line 394 "reflect.h2"
-    [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n))); }
+    [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*n)); }
 
-#line 396 "reflect.h2"
     auto function_declaration::add_initializer(cpp2::in source) & -> void
 
-#line 399 "reflect.h2"
     {
         if ((*this).has_handler() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); }
         if ((*this).has_handler() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); }
@@ -1213,48 +1016,41 @@ declaration::declaration(declaration const& that)
         //require( parent_is_type(),
         //         "cannot add an initializer to a function that isn't in a type scope");
 
-#line 405 "reflect.h2"
         auto stmt {parse_statement(source)}; 
         if (!((cpp2::as_(stmt)))) {
             error("cannot add an initializer that is not a valid statement");
             return ; 
         }
-        require(CPP2_UFCS(add_function_initializer)((*cpp2::assert_not_null(n)), std::move(stmt)), 
+        require(CPP2_UFCS(add_function_initializer)((*n), std::move(stmt)), 
                  std::string("unexpected error while attempting to add initializer"));
     }
 
     function_declaration::function_declaration(function_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
-#line 423 "reflect.h2"
     object_declaration::object_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
-#line 428 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*n))) ) { cpp2::Default.report_violation(""); }
     }
 
-#line 433 "reflect.h2"
-    [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::assert_not_null(n))); }
-#line 434 "reflect.h2"
-    [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*cpp2::assert_not_null(n)));  }
+    [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*n)); }
+    [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*n));  }
 
-#line 436 "reflect.h2"
     [[nodiscard]] auto object_declaration::type() const& -> std::string{
-        auto ret {CPP2_UFCS(object_type)((*cpp2::assert_not_null(n)))}; 
+        auto ret {CPP2_UFCS(object_type)((*n))}; 
         require(!(contains(ret, "(*ERROR*)")), 
                  "cannot to_string this type: " + ret);
         return ret; 
     }
 
-#line 443 "reflect.h2"
     [[nodiscard]] auto object_declaration::initializer() const& -> std::string{
-        auto ret {CPP2_UFCS(object_initializer)((*cpp2::assert_not_null(n)))}; 
+        auto ret {CPP2_UFCS(object_initializer)((*n))}; 
         require(!(contains(ret, "(*ERROR*)")), 
                  "cannot to_string this initializer: " + ret);
         return ret; 
@@ -1263,20 +1059,17 @@ declaration::declaration(declaration const& that)
     object_declaration::object_declaration(object_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
-#line 459 "reflect.h2"
     type_declaration::type_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
-#line 464 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*n))) ) { cpp2::Default.report_violation(""); }
     }
 
-#line 469 "reflect.h2"
     auto type_declaration::reserve_names(cpp2::in name, auto&& ...etc) const& -> void
     {                           // etc is not declared ':string_view' for compatibility with GCC 10.x
         for ( 
@@ -1289,103 +1082,90 @@ declaration::declaration(declaration const& that)
         }
     }
 
-#line 481 "reflect.h2"
-    [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::assert_not_null(n))); }
-#line 482 "reflect.h2"
-    [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::assert_not_null(n))); }
-#line 483 "reflect.h2"
-    [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*cpp2::assert_not_null(n))); }
+    [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*n)); }
+    [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*n)); }
+    [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*n)); }
 
-#line 485 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_functions() const& -> std::vector
 
     {
         std::vector ret {}; 
         for ( 
-             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::functions) ) {
+             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::functions) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
-#line 496 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_functions_needing_initializer() const& -> std::vector
 
     {
         std::vector ret {}; 
         for ( 
-             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::functions) ) 
-        if ( !(CPP2_UFCS(has_initializer)((*cpp2::assert_not_null(d)))) 
-            && !(CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(d)))) 
-            && !(CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(d))))) 
+             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::functions) ) 
+        if ( !(CPP2_UFCS(has_initializer)((*d))) 
+            && !(CPP2_UFCS(is_virtual_function)((*d))) 
+            && !(CPP2_UFCS(is_defaultable_function)((*d)))) 
         {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
-#line 511 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_objects() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::objects) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::objects) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
-#line 521 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_types() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::types) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::types) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
-#line 531 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_aliases() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::aliases) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::aliases) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
-#line 541 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_members() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::all) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::all) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
-#line 551 "reflect.h2"
     [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret
 
-#line 558 "reflect.h2"
     {
             cpp2::deferred_init out_this_in_that;
             cpp2::deferred_init out_this_move_that;
             cpp2::deferred_init inout_this_in_that;
             cpp2::deferred_init inout_this_move_that;
-#line 559 "reflect.h2"
-        auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::assert_not_null(n)))}; 
+        auto declared {CPP2_UFCS(find_declared_value_set_functions)((*n))}; 
         out_this_in_that.construct(declared.out_this_in_that != nullptr);
-        out_this_move_that.construct(declared.out_this_move_that != nullptr);
-        inout_this_in_that.construct(declared.inout_this_in_that != nullptr);
-        inout_this_move_that.construct(std::move(declared).inout_this_move_that != nullptr);
+        out_this_move_that.construct(declared.out_this_move_that!=nullptr);
+        inout_this_in_that.construct(declared.inout_this_in_that!=nullptr);
+        inout_this_move_that.construct(std::move(declared).inout_this_move_that!=nullptr);
     return  { std::move(out_this_in_that.value()), std::move(out_this_move_that.value()), std::move(inout_this_in_that.value()), std::move(inout_this_move_that.value()) }; }
 
-#line 566 "reflect.h2"
     auto type_declaration::add_member(cpp2::in source) & -> void
     {
         auto decl {parse_statement(source)}; 
@@ -1393,47 +1173,40 @@ declaration::declaration(declaration const& that)
             error("the provided source string is not a valid statement");
             return ; 
         }
-        if (!(CPP2_UFCS(is_declaration)((*cpp2::assert_not_null(decl))))) {
+        if (!(CPP2_UFCS(is_declaration)((*decl)))) {
             error("cannot add a member that is not a declaration");
         }
-        require(CPP2_UFCS(add_type_member)((*cpp2::assert_not_null(n)), std::move(decl)), 
+        require(CPP2_UFCS(add_type_member)((*n), std::move(decl)), 
                  std::string("unexpected error while attempting to add member:\n") + source);
     }
 
-#line 580 "reflect.h2"
-    auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*cpp2::assert_not_null(n)));  }
-#line 581 "reflect.h2"
-    auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*cpp2::assert_not_null(n))); }
+    auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*n));  }
+    auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*n)); }
 
-#line 583 "reflect.h2"
-    auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*cpp2::assert_not_null(n)));  }
+    auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*n));  }
 
     type_declaration::type_declaration(type_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
-#line 594 "reflect.h2"
     alias_declaration::alias_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
-#line 599 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*n))) ) { cpp2::Default.report_violation(""); }
     }
 
     alias_declaration::alias_declaration(alias_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
-#line 618 "reflect.h2"
 auto add_virtual_destructor(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }");
 }
 
-#line 636 "reflect.h2"
 auto interface(meta::type_declaration& t) -> void
 {
     auto has_dtor {false}; 
@@ -1460,7 +1233,6 @@ auto interface(meta::type_declaration& t) -> void
     }
 }
 
-#line 682 "reflect.h2"
 auto polymorphic_base(meta::type_declaration& t) -> void
 {
     auto has_dtor {false}; 
@@ -1485,7 +1257,6 @@ auto polymorphic_base(meta::type_declaration& t) -> void
     }
 }
 
-#line 727 "reflect.h2"
 auto ordered_impl(
     meta::type_declaration& t, 
     cpp2::in ordering
@@ -1498,7 +1269,7 @@ auto ordered_impl(
         if (CPP2_UFCS(has_name)(mf, "operator<=>")) {
             has_spaceship = true;
             auto return_name {CPP2_UFCS(unnamed_return_type)(mf)}; 
-            if (CPP2_UFCS(find)(return_name, ordering) == return_name.npos) 
+            if (CPP2_UFCS(find)(return_name, ordering)==return_name.npos) 
             {
                 CPP2_UFCS(error)(mf, "operator<=> must return std::" + cpp2::as_(ordering));
             }
@@ -1510,25 +1281,21 @@ auto ordered_impl(
     }
 }
 
-#line 756 "reflect.h2"
 auto ordered(meta::type_declaration& t) -> void
 {
     ordered_impl(t, "strong_ordering");
 }
 
-#line 764 "reflect.h2"
 auto weakly_ordered(meta::type_declaration& t) -> void
 {
     ordered_impl(t, "weak_ordering");
 }
 
-#line 772 "reflect.h2"
 auto partially_ordered(meta::type_declaration& t) -> void
 {
     ordered_impl(t, "partial_ordering");
 }
 
-#line 794 "reflect.h2"
 auto copyable(meta::type_declaration& t) -> void
 {
     //  If the user explicitly wrote any of the copy/move functions,
@@ -1550,7 +1317,6 @@ auto copyable(meta::type_declaration& t) -> void
     }}
 }
 
-#line 822 "reflect.h2"
 auto basic_value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(copyable)(t);
@@ -1569,28 +1335,24 @@ auto basic_value(meta::type_declaration& t) -> void
     }
 }
 
-#line 850 "reflect.h2"
 auto value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(ordered)(t);
     CPP2_UFCS(basic_value)(t);
 }
 
-#line 856 "reflect.h2"
 auto weakly_ordered_value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(weakly_ordered)(t);
     CPP2_UFCS(basic_value)(t);
 }
 
-#line 862 "reflect.h2"
 auto partially_ordered_value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(partially_ordered)(t);
     CPP2_UFCS(basic_value)(t);
 }
 
-#line 891 "reflect.h2"
 auto cpp1_rule_of_zero(meta::type_declaration& t) -> void
 {
     for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) 
@@ -1603,7 +1365,6 @@ auto cpp1_rule_of_zero(meta::type_declaration& t) -> void
     CPP2_UFCS(disable_member_function_generation)(t);
 }
 
-#line 928 "reflect.h2"
 auto cpp2_struct(meta::type_declaration& t) -> void
 {
     for ( auto& m : CPP2_UFCS(get_members)(t) ) 
@@ -1621,7 +1382,6 @@ auto cpp2_struct(meta::type_declaration& t) -> void
     CPP2_UFCS(cpp1_rule_of_zero)(t);
 }
 
-#line 969 "reflect.h2"
 auto basic_enum(
     meta::type_declaration& t, 
     auto const& nextval, 
@@ -1646,7 +1406,6 @@ auto basic_enum(
 {
 std::string value{"-1"};
 
-#line 992 "reflect.h2"
     for ( 
           auto const& m : CPP2_UFCS(get_members)(t) ) 
     if (  CPP2_UFCS(is_member_object)(m)) 
@@ -1668,11 +1427,11 @@ std::string value{"-1"};
 
         nextval(value, init);
 
-        auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now
-        if (cpp2::cmp_less(v,min_value)) {
+        auto v {std::strtoll(&value[0], nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now
+        if (vmax_value) {
             max_value = v;
         }
 
@@ -1684,29 +1443,28 @@ std::string value{"-1"};
     }
 }
 
-#line 1028 "reflect.h2"
     if ((CPP2_UFCS(empty)(enumerators))) {
         CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value");
         return ; 
     }
 
     //  Compute the default underlying type, if it wasn't explicitly specified
-    if (underlying_type.value() == "") 
+    if (underlying_type.value()=="") 
     {
         CPP2_UFCS(require)(t, !(std::move(found_non_numeric)), 
             "if you write an enumerator with a non-numeric-literal value, you must specify the enumeration's underlying type");
 
         if (!(bitwise)) {
-            if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
+            if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
                 underlying_type.value() = "i8";
             }
-            else {if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
+            else {if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
                 underlying_type.value() = "i16";
             }
-            else {if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
+            else {if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
                 underlying_type.value() = "i32";
             }
-            else {if (cpp2::cmp_greater_eq(std::move(min_value),std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
+            else {if (std::move(min_value)>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
                 underlying_type.value() = "i64";
             }
             else {
@@ -1715,13 +1473,13 @@ std::string value{"-1"};
         }
         else {
             auto umax {std::move(max_value) * cpp2::as_()}; 
-            if (cpp2::cmp_less_eq(umax,std::numeric_limits::max())) {
+            if (umax<=std::numeric_limits::max()) {
                 underlying_type.value() = "u8";
             }
-            else {if (cpp2::cmp_less_eq(umax,std::numeric_limits::max())) {
+            else {if (umax<=std::numeric_limits::max()) {
                 underlying_type.value() = "u16";
             }
-            else {if (cpp2::cmp_less_eq(std::move(umax),std::numeric_limits::max())) {
+            else {if (std::move(umax)<=std::numeric_limits::max()) {
                 underlying_type.value() = "u32";
             }
             else {
@@ -1730,7 +1488,6 @@ std::string value{"-1"};
         }
     }
 
-#line 1074 "reflect.h2"
     //  2. Replace: Erase the contents and replace with modified contents
     //
     //  Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr'
@@ -1739,7 +1496,7 @@ std::string value{"-1"};
 
     //  Generate the 'none' value if appropriate, and use that or
     //  else the first enumerator as the default-constructed value
-    auto default_value {CPP2_ASSERT_IN_BOUNDS_LITERAL(enumerators, 0).name}; 
+    auto default_value {enumerators[0].name}; 
     if (bitwise) {
         default_value = "none";
         value_member_info e {"none", "", "0"}; 
@@ -1778,7 +1535,6 @@ std::string to_string{"    to_string: (this) -> std::string = { \n"};
 
     //  Provide a 'to_string' function to print enumerator name(s)
 
-#line 1119 "reflect.h2"
     {
         if (bitwise) {
             to_string += "    _ret   : std::string = \"(\";\n";
@@ -1788,9 +1544,9 @@ std::string to_string{"    to_string: (this) -> std::string = { \n"};
 
         for ( 
               auto const& e : enumerators ) {
-            if (e.name != "_") {// ignore unnamed values
+            if (e.name!="_") {  // ignore unnamed values
                 if (bitwise) {
-                    if (e.name != "none") {
+                    if (e.name!="none") {
                         to_string += ("    if (this & " + cpp2::to_string(e.name) + ") == " + cpp2::to_string(e.name) + " { _ret += _comma + \"" + cpp2::to_string(e.name) + "\"; _comma = \", \"; }\n");
                     }
                 }
@@ -1810,10 +1566,8 @@ std::string to_string{"    to_string: (this) -> std::string = { \n"};
         CPP2_UFCS(add_member)(t, std::move(to_string));
     }
 }
-#line 1149 "reflect.h2"
 }
 
-#line 1161 "reflect.h2"
 auto cpp2_enum(meta::type_declaration& t) -> void
 {
     //  Let basic_enum do its thing, with an incrementing value generator
@@ -1822,7 +1576,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void
             if (!(CPP2_UFCS(empty)(specified_value))) {
                 value = specified_value;
             }else {
-                auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; 
+                auto v {std::strtoll(&value[0], nullptr, 10)}; 
                 value = cpp2::as_((std::move(v) + 1));
             }
         }, 
@@ -1830,7 +1584,6 @@ auto cpp2_enum(meta::type_declaration& t) -> void
     );
 }
 
-#line 1188 "reflect.h2"
 auto flag_enum(meta::type_declaration& t) -> void
 {
     //  Let basic_enum do its thing, with a power-of-two value generator
@@ -1839,8 +1592,8 @@ auto flag_enum(meta::type_declaration& t) -> void
             if (!(CPP2_UFCS(empty)(specified_value))) {
                 value = specified_value;
             }else {
-                auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; 
-                if (cpp2::cmp_less(v,1)) {
+                auto v {std::strtoll(&value[0], nullptr, 10)}; 
+                if (v<1) {
                     value = "1";
                 }
                 else {
@@ -1852,7 +1605,6 @@ auto flag_enum(meta::type_declaration& t) -> void
     );
 }
 
-#line 1234 "reflect.h2"
 auto cpp2_union(meta::type_declaration& t) -> void
 {
     std::vector alternatives {}; 
@@ -1861,7 +1613,6 @@ auto value{0};
 
     //  1. Gather: All the user-written members, and find/compute the max size
 
-#line 1241 "reflect.h2"
     for ( 
 
            auto const& m : CPP2_UFCS(get_members)(t) )  { do 
@@ -1886,22 +1637,20 @@ auto value{0};
     } while (false); ++value; }
 }
 
-#line 1264 "reflect.h2"
     std::string discriminator_type {}; 
-    if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) {
+    if (CPP2_UFCS(ssize)(alternatives)::max()) {
         discriminator_type = "i8";
     }
-    else {if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) {
+    else {if (CPP2_UFCS(ssize)(alternatives)::max()) {
         discriminator_type = "i16";
     }
-    else {if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) {
+    else {if (CPP2_UFCS(ssize)(alternatives)::max()) {
         discriminator_type = "i32";
     }
     else {
         discriminator_type = "i64";
     }}}
 
-#line 1279 "reflect.h2"
     //  2. Replace: Erase the contents and replace with modified contents
 
     CPP2_UFCS(remove_marked_members)(t);
@@ -1910,12 +1659,10 @@ std::string storage{"    _storage: cpp2::aligned_storage t) -> void
 {
     std::cout << CPP2_UFCS(print)(t) << "\n";
 }
 
-#line 1389 "reflect.h2"
 auto regex_gen(meta::type_declaration& t) -> void
 {
     auto has_default {false}; 
@@ -2037,7 +1774,7 @@ auto regex_gen(meta::type_declaration& t) -> void
             }
             CPP2_UFCS(mark_for_removal_from_enclosing_type)(m);
 
-            if (name == prefix) {
+            if (name==prefix) {
                 if (has_default) {
                     CPP2_UFCS(error)(t, "Type can only contain one default named regular expression.");
                 }
@@ -2050,7 +1787,7 @@ auto regex_gen(meta::type_declaration& t) -> void
             }
             expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2);
 
-            CPP2_ASSERT_IN_BOUNDS(expressions, name) = expr;
+            expressions[name] = expr;
         }
     }
 
@@ -2063,7 +1800,6 @@ auto regex_gen(meta::type_declaration& t) -> void
     }
 }
 
-#line 1438 "reflect.h2"
 [[nodiscard]] auto apply_metafunctions(
     declaration_node& n, 
     type_declaration& rtype, 
@@ -2077,7 +1813,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     for ( 
           auto const& m : CPP2_UFCS(get_members)(rtype) ) 
     {
-        CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "_")) || CPP2_UFCS(ssize)(CPP2_UFCS(name)(m)) == 1, 
+        CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "_")) || CPP2_UFCS(ssize)(CPP2_UFCS(name)(m))==1, 
                     "a type that applies a metafunction cannot have a body that declares a name that starts with '_' - those names are reserved for the metafunction implementation");
     }
 
@@ -2087,67 +1823,67 @@ auto regex_gen(meta::type_declaration& t) -> void
     {
         //  Convert the name and any template arguments to strings
         //  and record that in rtype
-        auto name {CPP2_UFCS(to_string)((*cpp2::assert_not_null(meta)))}; 
+        auto name {CPP2_UFCS(to_string)((*meta))}; 
         name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(find)(name, '<'));
 
         std::vector args {}; 
         for ( 
-             auto const& arg : CPP2_UFCS(template_arguments)((*cpp2::assert_not_null(meta))) ) 
+             auto const& arg : CPP2_UFCS(template_arguments)((*meta)) ) 
             CPP2_UFCS(push_back)(args, CPP2_UFCS(to_string)(arg));
 
         CPP2_UFCS(set_metafunction_name)(rtype, name, args);
 
         //  Dispatch
         //
-        if (name == "interface") {
+        if (name=="interface") {
             interface(rtype);
         }
-        else {if (name == "polymorphic_base") {
+        else {if (name=="polymorphic_base") {
             polymorphic_base(rtype);
         }
-        else {if (name == "ordered") {
+        else {if (name=="ordered") {
             ordered(rtype);
         }
-        else {if (name == "weakly_ordered") {
+        else {if (name=="weakly_ordered") {
             weakly_ordered(rtype);
         }
-        else {if (name == "partially_ordered") {
+        else {if (name=="partially_ordered") {
             partially_ordered(rtype);
         }
-        else {if (name == "copyable") {
+        else {if (name=="copyable") {
             copyable(rtype);
         }
-        else {if (name == "basic_value") {
+        else {if (name=="basic_value") {
             basic_value(rtype);
         }
-        else {if (name == "value") {
+        else {if (name=="value") {
             value(rtype);
         }
-        else {if (name == "weakly_ordered_value") {
+        else {if (name=="weakly_ordered_value") {
             weakly_ordered_value(rtype);
         }
-        else {if (name == "partially_ordered_value") {
+        else {if (name=="partially_ordered_value") {
             partially_ordered_value(rtype);
         }
-        else {if (name == "cpp1_rule_of_zero") {
+        else {if (name=="cpp1_rule_of_zero") {
             cpp1_rule_of_zero(rtype);
         }
-        else {if (name == "struct") {
+        else {if (name=="struct") {
             cpp2_struct(rtype);
         }
-        else {if (name == "enum") {
+        else {if (name=="enum") {
             cpp2_enum(rtype);
         }
-        else {if (name == "flag_enum") {
+        else {if (name=="flag_enum") {
             flag_enum(rtype);
         }
-        else {if (name == "union") {
+        else {if (name=="union") {
             cpp2_union(rtype);
         }
-        else {if (name == "print") {
+        else {if (name=="print") {
             print(rtype);
         }
-        else {if (name == "regex") {
+        else {if (name=="regex") {
             regex_gen(rtype);
         }
         else {
@@ -2161,7 +1897,7 @@ auto regex_gen(meta::type_declaration& t) -> void
             && !(CPP2_UFCS(arguments_were_used)(rtype)))) 
 
         {
-            error(name + " did not use its template arguments - did you mean to write '" + name + " <" + CPP2_ASSERT_IN_BOUNDS_LITERAL(args, 0) + "> type' (with the spaces)?");
+            error(name + " did not use its template arguments - did you mean to write '" + name + " <" + args[0] + "> type' (with the spaces)?");
             return false; 
         }
     }
@@ -2169,7 +1905,6 @@ auto regex_gen(meta::type_declaration& t) -> void
     return true; 
 }
 
-#line 1544 "reflect.h2"
 }
 
 }
diff --git a/source/regex.h2 b/source/regex.h2
index 88dbe533a5..571365e4a2 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -28,6 +28,10 @@ bstring:  type == std::basic_string;
 //-----------------------------------------------------------------------
 //
 
+expression_flags: type = {
+    case_insensitive : int == 1;
+}
+
 match_group: @struct  type = {
     start: Iter = ();
     end: Iter = ();
@@ -40,7 +44,7 @@ match_return: @struct  type = {
     pos: Iter = ();
 }
 
-match_context:  type =
+match_context:  type =
 {
     public begin: Iter;
     public end: Iter;
@@ -106,6 +110,13 @@ match_context:  type =
 
         return r;
     }
+
+    // Flag management
+    //
+
+    has_flag: (f: int) -> bool = {
+        return  0 != (f & flags);
+    }
 }
 
 //  Represents the remainder of the regular expression.
@@ -345,14 +356,26 @@ any_matcher_logic:  type =
 
 // Regex syntax:   Example: a
 //
-char_matcher_logic:  type =
+char_matcher_logic:  type =
 {
     match:  (cur, inout ctx, _ : Other) -> _ = {
-        if cur != ctx.end && cur* == C {
-            return Other::match(cur + 1, ctx);
-        } else {
-            return match_return(false, ctx.end);
+        if ctx.has_flag(expression_flags::case_insensitive) {
+            if cur != ctx.end && (cur* == L || cur* == U) {
+                return Other::match(cur + 1, ctx);
+            }
+            else {
+                return match_return(false, ctx.end);
+            }
         }
+        else {
+            if cur != ctx.end && cur* == C {
+                return Other::match(cur + 1, ctx);
+            }
+            else {
+                return match_return(false, ctx.end);
+            }
+        }
+
     }
     reset_ranges: (inout ctx) = {}
     to_string: ()               bstring(1, C);
@@ -364,10 +387,18 @@ char_matcher_logic:  type =
 class_matcher_logic:  type =
 {
     match:  (cur, inout ctx, _ : Other) -> _ = {
-        if cur != ctx.end && negate != match_any(cur*) {
-            return Other::match(cur + 1, ctx);
-        } else {
-            return match_return(false, ctx.end);
+        if ctx.has_flag(expression_flags::case_insensitive) {
+            if cur != ctx.end && (negate != match_any(safe_tolower(cur*)) || negate != match_any(safe_toupper(cur*))) {
+                return Other::match(cur + 1, ctx);
+            }
+            else {
+                return match_return(false, ctx.end);
+            }
+        }
+        else {
+            if cur != ctx.end && negate != match_any(cur*) {
+                return Other::match(cur + 1, ctx);
+            }
         }
     }
 
@@ -399,9 +430,9 @@ class_matcher_logic:  type =
 
 // Regex syntax: \  Example: \.
 //
-escaped_char_matcher_logic:  type =
+escaped_char_matcher_logic:  type =
 {
-    this : char_matcher_logic = ();
+    this : char_matcher_logic = ();
 
     to_string: () "\\(C)$";
 }
@@ -462,8 +493,15 @@ group_ref_matcher_logic:  type = {
 
         pos := cur;
         while g.start != g.end && pos != ctx.end next (g.start++, pos++) {
-            if g.start* != pos* {
-                return match_return(false, ctx.end);
+            if ctx.has_flag(expression_flags::case_insensitive) {
+                if safe_tolower(g.start*) != safe_tolower(pos*) {
+                    return match_return(false, ctx.end);
+                }
+            }
+            else {
+                if g.start* != pos* {
+                    return match_return(false, ctx.end);
+                }
             }
         }
 
@@ -692,9 +730,9 @@ group_name_list_end: type = {
 }
 
 // Regular expression implementation
-regular_expression:  type = {
+regular_expression:  type = {
 
-    context:  type == match_context;
+    context:  type == match_context;
 
     private get_iter: (str: view, pos) -> _ = {
         if pos < str.size() {
@@ -1142,11 +1180,11 @@ regex_parser:  type = {
                 cur_state.add(create_matcher("line_end_matcher_logic", "true, false"));
             }
             else {
-                cur_state.add(create_matcher("escaped_char_matcher_logic", "'(c_next)$'"));
+                cur_state.add(create_matcher("escaped_char_matcher_logic", "'(c_next)$', '(safe_tolower(c_next))$', '(safe_toupper(c_next))$'"));
             }
         }
         else if '\\' == c_next {
-            cur_state.add(create_matcher("escaped_char_matcher_logic", "'\\\\'"));
+            cur_state.add(create_matcher("escaped_char_matcher_logic", "'\\\\', '\\\\', '\\\\'"));
         }
         else if 'g' == c_next {
             if !next(out c_next) {error("Group escape without a following char."); return false; }
@@ -1238,7 +1276,7 @@ regex_parser:  type = {
 
     is_handle_special: (inout this, c: char) -> bool = {
         if c == '\'' {
-            cur_state.add(create_matcher("char_matcher_logic", "'\\(c)$'"));
+            cur_state.add(create_matcher("char_matcher_logic", "'\\(c)$', '\\(c)$', '\\(c)$'"));
             return true;
         }
 
@@ -1353,7 +1391,7 @@ regex_parser:  type = {
             if has_error { return; }
 
             // No special char, push a character match
-            cur_state.add(create_matcher("char_matcher_logic", "'(c)$'"));
+            cur_state.add(create_matcher("char_matcher_logic", "'(c)$', '(safe_tolower(c))$', '(safe_toupper(c))$'"));
         }
     }
 
@@ -1367,7 +1405,7 @@ regex_parser:  type = {
         start := create_matcher("group_matcher_start_logic", "0, \"\"");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-        return   create_matcher("regular_expression", "(next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
+        return   create_matcher("regular_expression", "0, (next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
     }
 
 }

From 0ba219476ba6320f28fb545cd2d318e73f6fc8ec Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 19 Feb 2024 11:31:16 +0100
Subject: [PATCH 053/161] Added modifiers to regular expressions.

---
 include/cpp2regex.h | 593 +++++++++++++++++++++++++++++++----------
 source/reflect.h    | 631 ++++++++++++++++++++++++++++++++------------
 source/reflect.h2   |  22 +-
 source/regex.h2     |  30 ++-
 4 files changed, 953 insertions(+), 323 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 90385600b3..ec83008015 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -3,100 +3,143 @@
 #define ___INCLUDE_CPP2REGEX_H_CPP2
 
 
+//=== Cpp2 type declarations ====================================================
+
+
 #include "cpp2util.h"
 
+#line 1 "regex.h2"
 
+#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
+#line 31 "regex.h2"
 class expression_flags;
     
 
+#line 35 "regex.h2"
 template class match_group;
     
 
+#line 42 "regex.h2"
 template class match_return;
     
 
+#line 47 "regex.h2"
 template class match_context;
 
+#line 127 "regex.h2"
 template class matcher_list;
     
 
+#line 154 "regex.h2"
 template class single_class_entry;
 
+#line 162 "regex.h2"
 template class range_class_entry;
 
+#line 170 "regex.h2"
 template class combined_class_entry;
     
 
+#line 177 "regex.h2"
 template class list_class_entry;
     
 
+#line 184 "regex.h2"
 template class named_class_entry;
     
 
+#line 189 "regex.h2"
 template class negated_class_entry;
     
 
+#line 196 "regex.h2"
 template class shorthand_class_entry;
     
 
+#line 242 "regex.h2"
 template class extract_position_helper;
     
 
+#line 259 "regex.h2"
 template class alternative_matcher_logic;
 
+#line 343 "regex.h2"
 template class any_matcher_logic;
 
+#line 359 "regex.h2"
 template class char_matcher_logic;
 
+#line 387 "regex.h2"
 template class class_matcher_logic;
 
+#line 433 "regex.h2"
 template class escaped_char_matcher_logic;
 
+#line 442 "regex.h2"
 template class group_matcher_start_logic;
     
 
+#line 466 "regex.h2"
 template class group_matcher_end_logic;
     
 
+#line 490 "regex.h2"
 template class group_ref_matcher_logic;
     
 
+#line 518 "regex.h2"
 template class line_end_matcher_logic;
 
+#line 540 "regex.h2"
 template class line_start_matcher_logic;
 
+#line 558 "regex.h2"
 template class named_matcher_logic;
     
 
+#line 562 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
+#line 584 "regex.h2"
 template class range_matcher_logic;
 
+#line 656 "regex.h2"
 template class special_range_matcher_logic;
     
 
+#line 665 "regex.h2"
 template class word_boundary_matcher_logic;
 
+#line 716 "regex.h2"
 template class group_name_list;
 
+#line 728 "regex.h2"
 class group_name_list_end;
     
 
+#line 733 "regex.h2"
 template class regular_expression;
 
+#line 816 "regex.h2"
 class regex_parser_state;
 
+#line 848 "regex.h2"
 template class regex_parser;
 
+#line 1442 "regex.h2"
 }
 }
 
 
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "regex.h2"
+
 //  Copyright (c) Herb Sutter
 //  SPDX-License-Identifier: CC-BY-NC-ND-4.0
 
@@ -110,6 +153,7 @@ template class regex_parser;
 
 #include 
 
+#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -133,6 +177,7 @@ class expression_flags {
     public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(expression_flags const&) -> void = delete;
 };
+#line 34 "regex.h2"
 
 template class match_group {
     public: Iter start {}; 
@@ -156,9 +201,13 @@ template match_context& ;
+#line 60 "regex.h2"
     public: match_context(match_context&& that) noexcept;
+#line 60 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -167,15 +216,19 @@ template std::string;
 
+#line 72 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
 
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
+#line 80 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
+#line 84 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
+#line 88 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -184,15 +237,18 @@ template void;
 
+#line 98 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
+#line 114 "regex.h2"
     // Flag management
     //
 
     public: [[nodiscard]] static auto has_flag(cpp2::in f) -> bool;
 
+#line 120 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -205,6 +261,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto;
 
+#line 133 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
@@ -217,6 +274,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
+#line 141 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -238,6 +296,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
+#line 158 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -250,6 +309,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
+#line 166 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -261,6 +321,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
+#line 173 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -272,6 +333,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
+#line 180 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
+#line 187 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -292,6 +355,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
+#line 192 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -303,8 +367,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
+#line 199 "regex.h2"
 };
 
+#line 202 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -342,17 +408,20 @@ template                  using short_not_space_class = negated_
 //-----------------------------------------------------------------------
 //
 
+#line 240 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 251 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
+#line 253 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -363,17 +432,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
 
+#line 273 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
 
+#line 291 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
+#line 339 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -382,12 +454,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 353 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
+#line 355 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -396,22 +470,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 380 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
+#line 382 "regex.h2"
 };
 
+#line 385 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 405 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
+#line 417 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -420,6 +499,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
+#line 429 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -427,11 +507,13 @@ template class class_matcher_logi
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
+#line 437 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
+#line 438 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -439,6 +521,7 @@ template class escaped_char_matcher_l
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 449 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -447,11 +530,13 @@ template class group_matcher_start
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
+#line 464 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 476 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -460,6 +545,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
+#line 486 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -467,12 +553,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 510 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
+#line 512 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -483,12 +571,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 532 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
+#line 534 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -499,12 +589,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 551 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
+#line 553 "regex.h2"
 };
 
 // Named character classes
@@ -517,6 +609,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
+#line 561 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -524,6 +617,7 @@ template                    void = delete;
 
 
+#line 564 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -531,6 +625,7 @@ template using named_class_white_space = named_class_matcher_log
 template using named_class_word = named_class_matcher_logic>;
 template using named_class_digits = named_class_matcher_logic>;
 
+#line 572 "regex.h2"
 template using named_class_not_white_space = named_class_matcher_logic>;
 template using named_class_not_word = named_class_matcher_logic>;
 template using named_class_not_digits = named_class_matcher_logic>;
@@ -540,6 +635,7 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
+#line 583 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
@@ -548,18 +644,23 @@ template class range_m
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
+#line 608 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
+#line 613 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
+#line 618 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
+#line 624 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
+#line 652 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -571,6 +672,7 @@ template
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
+#line 659 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -581,6 +683,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
+#line 696 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -588,8 +691,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
+#line 704 "regex.h2"
 };
 
+#line 707 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -607,6 +712,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
+#line 726 "regex.h2"
 };
 
 class group_name_list_end {
@@ -615,6 +721,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
+#line 730 "regex.h2"
 };
 
 // Regular expression implementation
@@ -624,6 +731,7 @@ template> str, auto const& pos) -> auto;
 
+#line 746 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -631,6 +739,7 @@ template matched_, context const& ctx_);
 
+#line 756 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -645,6 +754,7 @@ template void = delete;
 
 
+#line 772 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -652,16 +762,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
+#line 784 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
+#line 806 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
+#line 807 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -681,18 +794,23 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
+#line 830 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
+#line 835 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
+#line 844 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
+#line 848 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
+    private: std::string_view modifier; 
     private: regex_parser_state cur_state {}; 
     private: size_t pos {0}; 
 
@@ -707,100 +825,139 @@ template class regex_parser {
     private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
 
-    public: explicit regex_parser(cpp2::in r, Error_out const& e);
+    public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
+#line 872 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
+#line 880 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
+#line 884 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
+#line 899 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
 
+#line 914 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
+#line 934 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
+#line 941 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
+#line 948 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
+#line 970 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
+#line 980 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
+#line 992 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
+#line 1002 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
+#line 1015 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
+#line 1023 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
+#line 1139 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
+#line 1238 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
+#line 1279 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
+#line 1288 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
+#line 1351 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
+#line 1377 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
+#line 1400 "regex.h2"
+    public: [[nodiscard]] auto parse_modifier() & -> std::string;
+
+#line 1419 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
+#line 1433 "regex.h2"
 };
 
-template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string;
+template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
+#line 1442 "regex.h2"
 }
 }
 
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "regex.h2"
+
+#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
+#line 32 "regex.h2"
     inline CPP2_CONSTEXPR int expression_flags::case_insensitive = 1;
 
+#line 55 "regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
+#line 58 "regex.h2"
     }
 
+#line 60 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
+#line 60 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
+#line 60 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
+#line 60 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -808,38 +965,49 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return groups[group];  }
+#line 64 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
+#line 66 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
-        if (group>=max_groups) {
+        if (cpp2::cmp_greater_eq(group,max_groups)) {
             return ""; 
         }
-        return std::string(groups[group].start, groups[group].end); 
+        return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, groups[group].start); }
-    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, groups[group].end); }
+#line 72 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
+#line 73 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
 
+#line 75 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
-        groups[group].end = pos;
-        groups[group].matched = true;
+        CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
+        CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
+#line 80 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
-        groups[group].matched = false;
+        CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
+#line 84 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
-        groups[group].start = pos;
+        CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
+#line 88 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return alternatives_pos[alternative];  }
+#line 92 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
+#line 94 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
-        alternatives_pos[alternative] = pos;
+        CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
+#line 100 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -854,44 +1022,66 @@ namespace regex {
         return r; 
     }
 
+#line 117 "regex.h2"
     template  [[nodiscard]] auto match_context::has_flag(cpp2::in f) -> bool{
         return  0 != (f & flags); 
     }
 
+#line 128 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx);  }
 
+#line 130 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { 
         return match_select(cur, ctx);  }
 
+#line 133 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { 
         return First::match(cur, ctx, matcher_list());  }
+#line 135 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur);  }
 
+#line 137 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 138 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
+#line 140 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c==C;  }
+#line 156 "regex.h2"
+    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
+#line 157 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return _0<=_1 && _1<=_2; }();  }
+#line 164 "regex.h2"
+    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
+#line 165 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
+#line 171 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
+#line 172 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List==c));  }
+#line 178 "regex.h2"
+    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
+#line 179 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
+#line 185 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 186 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
+#line 191 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
+#line 197 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 198 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
+#line 243 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -900,9 +1090,12 @@ namespace regex {
         return r; 
     }
 
+#line 251 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
+#line 252 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
+#line 261 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -915,9 +1108,12 @@ namespace regex {
             return match_first(cur, ctx, tail); 
         }
     }
+#line 273 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
+#line 274 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
+#line 276 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, tail)}; 
         if (r.matched) {
@@ -925,7 +1121,7 @@ namespace regex {
         }else {
             First::reset_ranges(ctx);
 
-            if constexpr (0!=sizeof...(Next)) {
+            if constexpr (0 != sizeof...(Next)) {
                 return match_first(cur, ctx, tail); 
             }else {
                 return match_return(false, ctx.end); 
@@ -933,6 +1129,7 @@ namespace regex {
         }
     }
 
+#line 291 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
         auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
 
@@ -948,20 +1145,22 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
+#line 307 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
-        if constexpr (0!=sizeof...(Next)) {
+        if constexpr (0 != sizeof...(Next)) {
             o = match_greedy(cur, max_overall_length, max_current_length, ctx, Tail());
         }
 
         auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; 
-        if (max_overall_length==my_overall_length) {
+        if (max_overall_length == my_overall_length) {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-        if (std::move(r).matched && std::move(my_overall_length)==max_overall_length) {
+#line 319 "regex.h2"
+        if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
-            if (std::move(my_current_length)==max_current_length) {
+            if (std::move(my_current_length) == max_current_length) {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx), ...);  // Reset all other ranges.
                 return First::match(cur, ctx, Tail::prepend(extract_position_helper())); 
@@ -980,20 +1179,24 @@ namespace regex {
         }
     }
 
+#line 345 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur!=ctx.end) {
+        if (cur != ctx.end) {
             return Other::match(cur + 1, ctx); 
         }else {
             return match_return(false, ctx.end); 
         }
     }
 
+#line 353 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 354 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
+#line 361 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
-            if (cur!=ctx.end && (*cur==L || *cur==U)) {
+            if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
                 return Other::match(cur + 1, ctx); 
             }
             else {
@@ -1001,7 +1204,7 @@ namespace regex {
             }
         }
         else {
-            if (cur!=ctx.end && *cur==C) {
+            if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
                 return Other::match(cur + 1, ctx); 
             }
             else {
@@ -1010,12 +1213,15 @@ namespace regex {
         }
 
     }
+#line 380 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 381 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
+#line 389 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
-            if (cur!=ctx.end && (negate!=match_any(safe_tolower(*cur)) || negate!=match_any(safe_toupper(*cur)))) {
+            if (cur != ctx.end && (negate != match_any(safe_tolower(*cpp2::assert_not_null(cur))) || negate != match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
                 return Other::match(cur + 1, ctx); 
             }
             else {
@@ -1023,17 +1229,18 @@ namespace regex {
             }
         }
         else {
-            if (cur!=ctx.end && negate!=match_any(*cur)) {
+            if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
                 return Other::match(cur + 1, ctx); 
             }
         }
     }
 
+#line 405 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
         if (!(r)) {
-            if constexpr (0!=sizeof...(Other)) {
+            if constexpr (0 != sizeof...(Other)) {
                 r = match_any(c);
             }
         }
@@ -1041,8 +1248,10 @@ namespace regex {
         return r; 
     }
 
+#line 417 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
+#line 419 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1054,19 +1263,23 @@ namespace regex {
         return r; 
     }
 
+#line 437 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
+#line 443 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_start)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
         return r; 
     }
 
+#line 449 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
+#line 451 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
-        if (group!=0) {
-            if (0!=CPP2_UFCS(size)(name)) {
+        if (group != 0) {
+            if (0 != CPP2_UFCS(size)(name)) {
                 return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
             }
             else {
@@ -1078,6 +1291,7 @@ namespace regex {
         }
     }
 
+#line 467 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_end)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
@@ -1087,10 +1301,12 @@ namespace regex {
         return r; 
     }
 
+#line 476 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
+#line 478 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
-        if (group!=0) {
+        if (group != 0) {
             return ")"; 
         }
         else {
@@ -1098,18 +1314,19 @@ namespace regex {
         }
     }
 
+#line 491 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
         auto pos {cur}; 
-        for( ; g.start!=g.end && pos!=ctx.end; (++g.start, ++pos) ) {
+        for( ; g.start != g.end && pos != ctx.end; (++g.start, ++pos) ) {
             if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
-                if (safe_tolower(*g.start)!=safe_tolower(*pos)) {
+                if (safe_tolower(*cpp2::assert_not_null(g.start)) != safe_tolower(*cpp2::assert_not_null(pos))) {
                     return match_return(false, ctx.end); 
                 }
             }
             else {
-                if (*g.start!=*pos) {
+                if (*cpp2::assert_not_null(g.start) != *cpp2::assert_not_null(pos)) {
                     return match_return(false, ctx.end); 
                 }
             }
@@ -1117,14 +1334,17 @@ namespace regex {
 
         return Other::match(std::move(pos), ctx); 
     }
+#line 510 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 511 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
+#line 520 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur==ctx.end || (match_new_line && *cur=='\n')) {
+        if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx); 
         }
-        else {if (!(match_new_line_before_end) && (*cur=='\n' && (cur + 1)==ctx.end)) {// Special cas for new line at end.
+        else {if (!(match_new_line_before_end) && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special cas for new line at end.
             return Other::match(cur, ctx); 
         }
         else {
@@ -1132,11 +1352,14 @@ namespace regex {
         }}
     }
 
+#line 532 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 533 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
+#line 542 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (cur==ctx.begin || (match_new_line && *(cur - 1)=='\n')) {
+        if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx); 
         }
         else {
@@ -1144,24 +1367,30 @@ namespace regex {
         }
 
     }
+#line 551 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 552 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
+#line 560 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
+#line 586 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); }
+#line 587 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
+#line 589 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
-      if (min_count==max_count) {
+      if (min_count == max_count) {
         r += ("{" + cpp2::to_string(min_count) + "}");
       }
-      else {if (min_count==-1) {
+      else {if (min_count == -1) {
         r += ("{," + cpp2::to_string(max_count) + "}");
       }
-      else {if (max_count==-1) {
+      else {if (max_count == -1) {
         r += ("{" + cpp2::to_string(min_count) + ",}");
       }
       else {
@@ -1171,26 +1400,30 @@ namespace regex {
       return r; 
     }
 
+#line 608 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
-        if (-1==max_count) {return true; }
-        else {return count [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
-        if (-1==min_count) {return false; }
-        else {return count [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
-        if (-1!=min_count && countmax_count) {return false; }
+        if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
+        if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
+#line 624 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto r {M::match(cur, ctx, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
-            (is_below_lower_bound(count) || r.pos!=cur)) 
+            (is_below_lower_bound(count) || r.pos != cur)) 
         {
             auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, Other())}; 
 
@@ -1216,23 +1449,25 @@ namespace regex {
         }
     }
 
+#line 658 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol;  }
 
+#line 667 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         word_class words {}; 
         auto is_match {false}; 
-        if (cur==ctx.begin) { // String start
-            if (cur!=ctx.end) { // No empty string
-                is_match = CPP2_UFCS(includes)(std::move(words), *cur);
+        if (cur == ctx.begin) {// String start
+            if (cur != ctx.end) {// No empty string
+                is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur));
             }
         }
-        else {if (cur==ctx.end) {// String end
-            is_match = CPP2_UFCS(includes)(words, *(cur - 1));
+        else {if (cur == ctx.end) {// String end
+            is_match = CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)));
         }
         else { // Middle of string
             is_match = 
-                   (CPP2_UFCS(includes)(words, *(cur - 1)) && !(CPP2_UFCS(includes)(words, *cur))) // End of word: \w\W
-                || (!(CPP2_UFCS(includes)(words, *(cur - 1))) && CPP2_UFCS(includes)(std::move(words), *cur));// Start of word: \W\w
+                   (CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)))) // End of word: \w\W
+                || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur)));// Start of word: \W\w
 
         }}
         if (negate) {
@@ -1247,7 +1482,9 @@ namespace regex {
         }
 
     }
+#line 696 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 697 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1256,8 +1493,9 @@ namespace regex {
         }
     }
 
+#line 718 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
-        if (name==CPP2_UFCS(data)(Name)) {
+        if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
         }
         else {
@@ -1265,10 +1503,12 @@ namespace regex {
         }
     }
 
+#line 729 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
+#line 737 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
-        if (pos template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
+#line 754 "regex.h2"
         }
 
+#line 756 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 757 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+#line 758 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 759 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
+#line 761 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
+#line 762 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+#line 763 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
+#line 765 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
-            if (-1==group_id) {
+            if (-1 == group_id) {
                 // TODO: Throw error.
             }
             return group_id; 
         }
 
+#line 774 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 775 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 776 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 777 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
         auto r {Matcher::match(start, ctx)}; 
-        return search_return(r.matched && std::move(r).pos==end, std::move(ctx)); 
+        return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
+#line 784 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 785 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 786 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 787 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1323,7 +1581,7 @@ namespace regex {
                 break;
             }
 
-            if (cur==ctx.end) {
+            if (cur == ctx.end) {
                 break;
             }
         }
@@ -1331,21 +1589,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
+#line 806 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
+#line 824 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
+#line 830 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
+#line 835 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
+#line 837 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1353,28 +1616,35 @@ namespace regex {
         static_cast(std::move(last));
     }
 
+#line 844 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-    template  regex_parser::regex_parser(cpp2::in r, Error_out const& e)
+#line 866 "regex.h2"
+    template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
+        , modifier{ m }
         , error_out{ e }{
 
+#line 870 "regex.h2"
     }
 
+#line 874 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
+#line 880 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
+#line 887 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
-        if ((pos + 1) [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find)(regex, e, pos)}; 
 
-        if (end!=std::string_view::npos) {
+        if (end != std::string_view::npos) {
             r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
             pos = std::move(end);
             return true; 
@@ -1398,16 +1669,17 @@ namespace regex {
         }
     }
 
+#line 914 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
-        if (regex[start_search]=='-') {
+        if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
             start_search += 1;
         }
         auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", std::move(start_search))}; 
 
         cpp2::deferred_init r; 
-        if (end!=std::string_view::npos) {
+        if (end != std::string_view::npos) {
             r.construct(CPP2_UFCS(substr)(regex, start, end - std::move(start)));
             pos = std::move(end) - 1;
         }
@@ -1418,11 +1690,13 @@ namespace regex {
         return r.value(); 
     }
 
+#line 936 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
+#line 941 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1430,12 +1704,14 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
+#line 948 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
+#line 950 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
-        if (0==CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
+        if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
-        if (0!=CPP2_UFCS(size)(cur_state.cur_match_list)) {
+        if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {
             CPP2_UFCS(next_alternative)(cur_state);
         }
 
@@ -1452,6 +1728,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
+#line 970 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -1462,6 +1739,7 @@ namespace regex {
         return r; 
     }
 
+#line 980 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1474,19 +1752,21 @@ namespace regex {
         return r; 
     }
 
+#line 995 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
-        if (c!='|') {return false; }
+        if (c != '|') {return false; }
 
         CPP2_UFCS(next_alternative)(cur_state);
         return true; 
     }
 
+#line 1002 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
-        if (c=='^') {
+        if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
             return true; 
         }
-        else {if (c=='$') {
+        else {if (c == '$') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
             return true; 
         }}
@@ -1494,52 +1774,54 @@ namespace regex {
         return false; 
     }
 
+#line 1015 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
-        if (c=='.') {
+        if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
             return true; 
         }
         return false; 
     }
 
+#line 1023 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
-        if (c!='[') {return false; }
+        if (c != '[') {return false; }
 
         std::vector classes {}; 
 
-        char c_cur {regex[pos]}; 
+        char c_cur {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
         auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{
-            *_1 += 1;
-            if (*_1>=CPP2_UFCS(size)(_3)) {return false; }
+            *cpp2::assert_not_null(_1) += 1;
+            if (cpp2::cmp_greater_eq(*cpp2::assert_not_null(_1),CPP2_UFCS(size)(_3))) {return false; }
 
-            *_4 = _3[*_1];
+            *cpp2::assert_not_null(_4) = CPP2_ASSERT_IN_BOUNDS(_3, *cpp2::assert_not_null(_1));
             return true; 
 
         }}; 
 
         auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{
-            if ((_1 + 1)>=CPP2_UFCS(size)(_2)) {return '\0'; }
-            else {return regex[pos + 1]; }
+            if (cpp2::cmp_greater_eq((_1 + 1),CPP2_UFCS(size)(_2))) {return '\0'; }
+            else {return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); }
         }}; 
 
         // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
         auto negate {false}; 
         auto first {true}; 
         auto range {false}; 
-        while( next_item() & (c_cur!=']' || first) ) {
-            if (c_cur=='^') {
+        while( next_item() & (c_cur != ']' || first) ) {
+            if (c_cur == '^') {
                 negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if (c_cur=='[' && peek_item()==':') {
+            if (c_cur == '[' && peek_item() == ':') {
                 // We have a character class.
                 pos += 2; // Skip ':]'
 
                 auto end {CPP2_UFCS(find)(regex, ":]", pos)}; 
-                if (end==std::string::npos) {error("Could not find end of character class."); return false; }
+                if (end == std::string::npos) {error("Could not find end of character class."); return false; }
 
                 auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; 
-                if (CPP2_UFCS(end)(supported_classes)==std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
+                if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
                     error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))));
                     return false; 
                 }
@@ -1549,15 +1831,15 @@ namespace regex {
                 end += 1; // Skip ':' pointing to the ending ']'.
                 pos = end;
             }
-            else {if (c_cur=='\\') {
+            else {if (c_cur == '\\') {
                 if (next_item()  && (c_cur != ']')) {
                     auto name {""}; 
                     if (     's' == c_cur) { name = "short_space"; }
-                    else {if ('S'==c_cur) {name = "short_not_space"; }
-                    else {if ('w'==c_cur) {name = "short_word"; }
-                    else {if ('W'==c_cur) {name = "short_not_word"; }
-                    else {if ('d'==c_cur) {name = "short_digits"; }
-                    else {if ('D'==c_cur) {name = "short_not_digits"; }
+                    else {if ('S' == c_cur) {name = "short_not_space"; }
+                    else {if ('w' == c_cur) {name = "short_word"; }
+                    else {if ('W' == c_cur) {name = "short_not_word"; }
+                    else {if ('d' == c_cur) {name = "short_digits"; }
+                    else {if ('D' == c_cur) {name = "short_not_digits"; }
                     else {
                         error("Unknown group escape.");
                         return false; 
@@ -1568,7 +1850,7 @@ namespace regex {
                     return false; 
                 }
             }
-            else {if (c_cur=='-') {
+            else {if (c_cur == '-') {
                 if (first) {// Literal if first entry.
                     CPP2_UFCS(push_back)(classes, (cpp2::to_string(c_cur)));
                 }else {
@@ -1590,7 +1872,7 @@ namespace regex {
 
         static_cast(std::move(next_item));// TODO: Use in while is not recognized.
 
-        if (std::move(c_cur)!=']') {
+        if (std::move(c_cur) != ']') {
             error("Error end of character class definition before terminating ']'.");
             return false; 
         }
@@ -1605,8 +1887,8 @@ namespace regex {
                 auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; 
                 cur = create_matcher((cpp2::to_string(name) + "_class"), "");
             }
-            else {if (1!=CPP2_UFCS(size)(cur)) {
-                cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(cur[0]) + "', '" + cpp2::to_string(cur[2]) + "'"));
+            else {if (1 != CPP2_UFCS(size)(cur)) {
+                cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"));
             }
             else {
                 cur = create_matcher("single_class_entry", ("'" + cpp2::to_string(cur) + "'"));
@@ -1618,8 +1900,9 @@ namespace regex {
         return true; 
     }
 
+#line 1139 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
-        if (c!='\\') {return false; }
+        if (c != '\\') {return false; }
 
         auto start {pos}; // Keep start for group matchers.
         pos += 1;
@@ -1628,38 +1911,38 @@ namespace regex {
 
             int group_id {0}; 
             if (string_to_int(name, group_id)) {
-                if (group_id<0) {
+                if (cpp2::cmp_less(group_id,0)) {
                     group_id = next_group_id + group_id;
 
-                    if (group_id<1) { // Negative and zero are no valid groups.
+                    if (cpp2::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
                         error(("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)"));
                         return false; 
                     }
                 }
 
-                if (group_id>=next_group_id) {error("Group reference is used before the group is declared."); return false; }
+                if (cpp2::cmp_greater_eq(group_id,next_group_id)) {error("Group reference is used before the group is declared."); return false; }
             }
             else {
                 // Named group
                 auto iter {CPP2_UFCS(find)(named_groups, name)}; 
-                if (iter==CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
+                if (iter == CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
 
-                group_id = (*std::move(iter)).second;
+                group_id = (*cpp2::assert_not_null(std::move(iter))).second;
             }
-            CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *_2 - _1 + 1)) + "\"")));
+            CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *cpp2::assert_not_null(_2) - _1 + 1)) + "\"")));
 
             return true; 
         }}; 
 
-        if (pos>=CPP2_UFCS(size)(regex)) {error("Escape without a following character."); return false; }
+        if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); return false; }
 
-        char c_next {regex[pos]}; 
+        char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
 
-        if ([_0 = '1', _1 = c_next, _2 = '9']{ return _0<=_1 && _1<=_2; }()) {
+        if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
             if (!(add_group_matcher(std::string(1, c_next)))) {return false; }
         }
-        else {if (std::string::npos!=CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
-            if (c_next=='$') {
+        else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
+            if (c_next == '$') {
                 // TODO: Provide proper escape for cppfront capture
                 CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
             }
@@ -1667,14 +1950,14 @@ namespace regex {
                 CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "', '" + cpp2::to_string(safe_tolower(c_next)) + "', '" + cpp2::to_string(safe_toupper(c_next)) + "'")));
             }
         }
-        else {if ('\\'==c_next) {
+        else {if ('\\' == c_next) {
             CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\', '\\\\', '\\\\'"));
         }
-        else {if ('g'==c_next) {
+        else {if ('g' == c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
 
             std::string group {""}; 
-            if (c_next=='{') {
+            if (c_next == '{') {
                 if (!((next(cpp2::out(&c_next)) && grab_until('}', cpp2::out(&group))))) {error("No ending bracket."); return false; }
             }
             else {
@@ -1682,13 +1965,13 @@ namespace regex {
             }
             if (!(add_group_matcher(std::move(group)))) {return false; }
         }
-        else {if ('k'==c_next) {
+        else {if ('k' == c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
 
             auto term_char {'\0'}; 
-            if (c_next=='{') {term_char = '}'; }
-            else {if (c_next=='<') {term_char = '>'; }
-            else {if (c_next=='\'') {term_char = '\''; }
+            if (c_next == '{') {term_char = '}'; }
+            else {if (c_next == '<') {term_char = '>'; }
+            else {if (c_next == '\'') {term_char = '\''; }
             else {
                 error("Group escape has wrong operator."); return false; 
             }}}
@@ -1697,18 +1980,18 @@ namespace regex {
             if (!((next(cpp2::out(&c_next)) && grab_until(std::move(term_char), cpp2::out(&group))))) {error("No ending bracket."); return false; }
             if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
         }
-        else {if ('N'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
-        else {if ('s'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_white_space", "")); }
-        else {if ('S'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_white_space", "")); }
-        else {if ('w'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_word", "")); }
-        else {if ('W'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_word", "")); }
-        else {if ('d'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
-        else {if ('D'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
-        else {if ('Z'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
-        else {if ('z'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
-        else {if ('A'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
-        else {if ('b'==c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
-        else {if ('B'==std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
+        else {if ('N' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
+        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_white_space", "")); }
+        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_white_space", "")); }
+        else {if ('w' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_word", "")); }
+        else {if ('W' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_word", "")); }
+        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
+        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
+        else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
+        else {if ('z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
+        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
+        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
+        else {if ('B' == std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
         else {
             error("Unknown escape.");
             return false; 
@@ -1717,8 +2000,9 @@ namespace regex {
         return true; 
     }
 
+#line 1238 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
-        if (c!='(') {return false; }
+        if (c != '(') {return false; }
 
         auto group_number {next_group_id}; 
         next_group_id += 1;
@@ -1730,16 +2014,16 @@ namespace regex {
         char c_next {'\0'}; 
         // Skip the '('
         if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
-        if (c_next=='?') {
+        if (c_next == '?') {
             // Named group
-            if (!((next(cpp2::out(&c_next)) && c_next=='<'))) {error("Missing opening bracket for named group."); return false; }
+            if (!((next(cpp2::out(&c_next)) && c_next == '<'))) {error("Missing opening bracket for named group."); return false; }
             if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
             std::string name {""}; 
             if (!(grab_until('>', cpp2::out(&name)))) {error("Missing ending bracket for named group."); return false; }
             if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
 
             if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
-                named_groups[name] = group_number;
+                CPP2_ASSERT_IN_BOUNDS(named_groups, name) = group_number;
             }
             start_matcher = create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"" + cpp2::to_string(std::move(name)) + "\""));
         }
@@ -1758,8 +2042,9 @@ namespace regex {
         return true; 
     }
 
+#line 1279 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
-        if (c=='\'') {
+        if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
             return true; 
         }
@@ -1767,6 +2052,7 @@ namespace regex {
         return false; 
     }
 
+#line 1288 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -1779,11 +2065,11 @@ namespace regex {
             // return 0;
         }}; 
 
-        if (c!='{') {return false; }
+        if (c != '{') {return false; }
         if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element.");return false; }
 
         size_t end {CPP2_UFCS(find)(regex, "}", pos)}; 
-        if (end==std::string::npos) {error("Missing closing bracket."); return false; }
+        if (end == std::string::npos) {error("Missing closing bracket."); return false; }
 
         std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; 
         if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
@@ -1794,7 +2080,7 @@ namespace regex {
         int max_count_number {std::numeric_limits::max()}; 
 
         size_t sep {CPP2_UFCS(find)(inner, ",")}; 
-        if (sep==std::string::npos) {
+        if (sep == std::string::npos) {
             min_count = inner;
             max_count = inner;
             min_count_number = std::move(to_int)(inner);
@@ -1819,7 +2105,7 @@ namespace regex {
             }
         }
 
-        if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return _0<=_1 && _1<=_2; }()))) {
+        if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) {
             error(("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string(std::move(min_count_number)) + " <= " + cpp2::to_string(std::move(max_count_number))));
             return false; 
         }
@@ -1830,16 +2116,17 @@ namespace regex {
         return true; 
     }
 
+#line 1351 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
-        if (c=='*') {
+        if (c == '*') {
             min_range = "0";
         }
-        else {if (c=='+') {
+        else {if (c == '+') {
             min_range = "1";
         }
-        else {if (c=='?') {
+        else {if (c == '?') {
             min_range = "0";
             max_range = "1";
         }
@@ -1856,11 +2143,12 @@ namespace regex {
         return true; 
     }
 
+#line 1377 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
-        for( ; pos!=CPP2_UFCS(size)(regex); pos += 1 ) {
-            char c {regex[pos]}; 
+        for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
+            char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
 
-            if (c==term) {return ; }
+            if (c == term) {return ; }
 
             if (!(has_error) && is_alternative(c)) {continue; }
             if (!(has_error) && is_any(c)) {continue; }
@@ -1879,21 +2167,44 @@ namespace regex {
         }
     }
 
+#line 1400 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
+        std::string r {"0"}; 
+        std::string sep {" | "}; 
+
+        auto add {[&, _1 = std::move(sep)](auto const& name, auto& r) mutable -> void{
+            r += (cpp2::to_string(_1) + cpp2::to_string(name));
+        }}; 
+
+        auto mod_pos {0}; 
+        for( ; mod_pos != CPP2_UFCS(size)(modifier); mod_pos += 1 ) {
+            char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
+
+            if (c == 'i') {add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }
+        }
+
+        return r; 
+    }
+
+#line 1419 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
         if (has_error) {return "Error"; }
 
+        auto mod {parse_modifier()}; 
         auto named_groups_arg {create_named_groups_arg()}; 
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0, \"\"")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
-        return   create_matcher("regular_expression", ("cpp2::regex::expression_flags::case_insensitive, " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
+        return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-template [[nodiscard]] auto generate_template(cpp2::in regex, Err const& err) -> std::string{
-    regex_parser parser {regex, err}; 
+#line 1435 "regex.h2"
+template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
+    regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
     static_cast(std::move(parser));
     return r; 
diff --git a/source/reflect.h b/source/reflect.h
index 964813e8f1..b3b6c77227 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -3,34 +3,52 @@
 #define REFLECT_H_CPP2
 
 
+//=== Cpp2 type declarations ====================================================
+
+
 #include "cpp2util.h"
 
+#line 1 "reflect.h2"
 
+#line 21 "reflect.h2"
 namespace cpp2 {
 
 namespace meta {
 
+#line 33 "reflect.h2"
 class compiler_services;
 
+#line 224 "reflect.h2"
 class declaration_base;
 
+#line 250 "reflect.h2"
 class declaration;
 
+#line 332 "reflect.h2"
 class function_declaration;
 
+#line 419 "reflect.h2"
 class object_declaration;
 
+#line 455 "reflect.h2"
 class type_declaration;
 
+#line 590 "reflect.h2"
 class alias_declaration;
 
+#line 963 "reflect.h2"
 class value_member_info;
 
+#line 1560 "reflect.h2"
 }
 
 }
 
 
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "reflect.h2"
+
 //  Copyright (c) Herb Sutter
 //  SPDX-License-Identifier: CC-BY-NC-ND-4.0
 
@@ -50,10 +68,12 @@ class value_member_info;
 #include "parse.h"
 #include "cpp2regex.h"
 
+#line 21 "reflect.h2"
 namespace cpp2 {
 
 namespace meta {
 
+#line 26 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  Compiler services
@@ -81,27 +101,34 @@ class compiler_services
         std::deque* generated_tokens_
     );
 
+#line 59 "reflect.h2"
     //  Common API
     //
     public: auto set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void;
 
+#line 67 "reflect.h2"
     public: [[nodiscard]] auto get_metafunction_name() const& -> std::string_view;
 
     public: [[nodiscard]] auto get_argument(cpp2::in index) & -> std::string;
 
+#line 77 "reflect.h2"
     public: [[nodiscard]] auto get_arguments() & -> std::vector;
 
+#line 82 "reflect.h2"
     public: [[nodiscard]] auto arguments_were_used() const& -> bool;
 using parse_statement_ret = std::unique_ptr;
 
 
+#line 84 "reflect.h2"
     protected: [[nodiscard]] auto parse_statement(
 
         std::string_view source
     ) & -> parse_statement_ret;
 
+#line 137 "reflect.h2"
     public: [[nodiscard]] virtual auto position() const -> source_position;
 
+#line 143 "reflect.h2"
     //  Error diagnosis and handling, integrated with compiler output
     //  Unlike a contract violation, .requires continues further processing
     //
@@ -111,19 +138,24 @@ using parse_statement_ret = std::unique_ptr;
         cpp2::in msg
     ) const& -> void;
 
+#line 157 "reflect.h2"
     public: auto error(cpp2::in msg) const& -> void;
 
+#line 166 "reflect.h2"
     //  Enable custom contracts on this object, integrated with compiler output
     //  Unlike .requires, a contract violation stops further processing
     //
     public: auto report_violation(auto const& msg) const& -> void;
 
+#line 174 "reflect.h2"
     public: [[nodiscard]] auto has_handler() const& -> auto;
     public: virtual ~compiler_services() noexcept;
 public: compiler_services(compiler_services const& that);
 
+#line 175 "reflect.h2"
 };
 
+#line 178 "reflect.h2"
 /*
 //-----------------------------------------------------------------------
 //
@@ -160,6 +192,7 @@ type_id: @polymorphic_base @copyable type =
 }
 */
 
+#line 215 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  Declarations
@@ -172,6 +205,7 @@ type_id: @polymorphic_base @copyable type =
 class declaration_base
 : public compiler_services {
 
+#line 228 "reflect.h2"
     protected: declaration_node* n; 
 
     protected: explicit declaration_base(
@@ -180,26 +214,31 @@ class declaration_base
         cpp2::in s
     );
 
+#line 241 "reflect.h2"
     public: [[nodiscard]] auto position() const -> source_position override;
 
     public: [[nodiscard]] auto print() const& -> std::string;
     public: virtual ~declaration_base() noexcept;
 public: declaration_base(declaration_base const& that);
 
+#line 244 "reflect.h2"
 };
 
+#line 247 "reflect.h2"
 //-----------------------------------------------------------------------
 //  All declarations
 //
 class declaration
 : public declaration_base {
 
+#line 254 "reflect.h2"
     public: explicit declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
+#line 263 "reflect.h2"
     public: [[nodiscard]] auto is_public() const& -> bool;
     public: [[nodiscard]] auto is_protected() const& -> bool;
     public: [[nodiscard]] auto is_private() const& -> bool;
@@ -218,6 +257,7 @@ class declaration
 
     public: [[nodiscard]] auto name() const& -> std::string_view;
 
+#line 284 "reflect.h2"
     public: [[nodiscard]] auto has_initializer() const& -> bool;
 
     public: [[nodiscard]] auto is_global() const& -> bool;
@@ -260,20 +300,24 @@ public: declaration(declaration const& that);
 
                                                     // this precondition should be sufficient ...
 
+#line 326 "reflect.h2"
 };
 
+#line 329 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Function declarations
 //
 class function_declaration
 : public declaration {
 
+#line 336 "reflect.h2"
     public: explicit function_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
+#line 346 "reflect.h2"
     public: [[nodiscard]] auto index_of_parameter_named(cpp2::in s) const& -> int;
     public: [[nodiscard]] auto has_parameter_named(cpp2::in s) const& -> bool;
     public: [[nodiscard]] auto has_in_parameter_named(cpp2::in s) const& -> bool;
@@ -310,6 +354,7 @@ class function_declaration
 
     public: [[nodiscard]] auto get_parameters() const& -> std::vector;
 
+#line 390 "reflect.h2"
     public: [[nodiscard]] auto is_binary_comparison_function() const& -> bool;
 
     public: auto default_to_virtual() & -> void;
@@ -320,82 +365,103 @@ class function_declaration
     public: function_declaration(function_declaration const& that);
 
 
+#line 413 "reflect.h2"
 };
 
+#line 416 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Object declarations
 //
 class object_declaration
 : public declaration {
 
+#line 423 "reflect.h2"
     public: explicit object_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
+#line 433 "reflect.h2"
     public: [[nodiscard]] auto is_const() const& -> bool;
     public: [[nodiscard]] auto has_wildcard_type() const& -> bool;
 
     public: [[nodiscard]] auto type() const& -> std::string;
 
+#line 443 "reflect.h2"
     public: [[nodiscard]] auto initializer() const& -> std::string;
     public: object_declaration(object_declaration const& that);
 
 
+#line 449 "reflect.h2"
 };
 
+#line 452 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Type declarations
 //
 class type_declaration
 : public declaration {
 
+#line 459 "reflect.h2"
     public: explicit type_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     );
 
+#line 469 "reflect.h2"
     public: auto reserve_names(cpp2::in name, auto&& ...etc) const& -> void;
 
+#line 481 "reflect.h2"
     public: [[nodiscard]] auto is_polymorphic() const& -> bool;
     public: [[nodiscard]] auto is_final() const& -> bool;
     public: [[nodiscard]] auto make_final() & -> bool;
 
     public: [[nodiscard]] auto get_member_functions() const& -> std::vector;
 
+#line 496 "reflect.h2"
     public: [[nodiscard]] auto get_member_functions_needing_initializer() const& -> std::vector;
 
+#line 511 "reflect.h2"
     public: [[nodiscard]] auto get_member_objects() const& -> std::vector;
 
+#line 521 "reflect.h2"
     public: [[nodiscard]] auto get_member_types() const& -> std::vector;
 
+#line 531 "reflect.h2"
     public: [[nodiscard]] auto get_member_aliases() const& -> std::vector;
 
+#line 541 "reflect.h2"
     public: [[nodiscard]] auto get_members() const& -> std::vector;
 struct query_declared_value_set_functions_ret { bool out_this_in_that; bool out_this_move_that; bool inout_this_in_that; bool inout_this_move_that; };
 
 
 
+#line 551 "reflect.h2"
     public: [[nodiscard]] auto query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret;
 
+#line 566 "reflect.h2"
     public: auto add_member(cpp2::in source) & -> void;
 
+#line 580 "reflect.h2"
     public: auto remove_marked_members() & -> void;
     public: auto remove_all_members() & -> void;
 
     public: auto disable_member_function_generation() & -> void;
     public: type_declaration(type_declaration const& that);
 
+#line 584 "reflect.h2"
 };
 
+#line 587 "reflect.h2"
 //-----------------------------------------------------------------------
 //  Alias declarations
 //
 class alias_declaration
 : public declaration {
 
+#line 594 "reflect.h2"
     public: explicit alias_declaration(
 
         declaration_node* n_, 
@@ -404,8 +470,10 @@ class alias_declaration
     public: alias_declaration(alias_declaration const& that);
 
 
+#line 603 "reflect.h2"
 };
 
+#line 606 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  Metafunctions - these are hardwired for now until we get to the
@@ -420,6 +488,7 @@ class alias_declaration
 //
 auto add_virtual_destructor(meta::type_declaration& t) -> void;
 
+#line 624 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //      "... an abstract base class defines an interface ..."
@@ -434,6 +503,7 @@ auto add_virtual_destructor(meta::type_declaration& t) -> void;
 //
 auto interface(meta::type_declaration& t) -> void;
 
+#line 663 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "C.35: A base class destructor should be either public and
@@ -455,6 +525,7 @@ auto interface(meta::type_declaration& t) -> void;
 //
 auto polymorphic_base(meta::type_declaration& t) -> void;
 
+#line 707 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "... A totally ordered type ... requires operator<=> that
@@ -480,6 +551,7 @@ auto ordered_impl(
     cpp2::in ordering// must be "strong_ordering" etc.
 ) -> void;
 
+#line 751 "reflect.h2"
 //-----------------------------------------------------------------------
 //  ordered - a totally ordered type
 //
@@ -487,16 +559,19 @@ auto ordered_impl(
 //
 auto ordered(meta::type_declaration& t) -> void;
 
+#line 761 "reflect.h2"
 //-----------------------------------------------------------------------
 //  weakly_ordered - a weakly ordered type
 //
 auto weakly_ordered(meta::type_declaration& t) -> void;
 
+#line 769 "reflect.h2"
 //-----------------------------------------------------------------------
 //  partially_ordered - a partially ordered type
 //
 auto partially_ordered(meta::type_declaration& t) -> void;
 
+#line 778 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "A value is ... a regular type. It must have all public
@@ -515,6 +590,7 @@ auto partially_ordered(meta::type_declaration& t) -> void;
 //
 auto copyable(meta::type_declaration& t) -> void;
 
+#line 815 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  basic_value
@@ -524,6 +600,7 @@ auto copyable(meta::type_declaration& t) -> void;
 //
 auto basic_value(meta::type_declaration& t) -> void;
 
+#line 840 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "A 'value' is a totally ordered basic_value..."
@@ -536,10 +613,13 @@ auto basic_value(meta::type_declaration& t) -> void;
 //
 auto value(meta::type_declaration& t) -> void;
 
+#line 856 "reflect.h2"
 auto weakly_ordered_value(meta::type_declaration& t) -> void;
 
+#line 862 "reflect.h2"
 auto partially_ordered_value(meta::type_declaration& t) -> void;
 
+#line 869 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     C.20: If you can avoid defining default operations, do
@@ -564,6 +644,7 @@ auto partially_ordered_value(meta::type_declaration& t) -> void;
 //
 auto cpp1_rule_of_zero(meta::type_declaration& t) -> void;
 
+#line 903 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "By definition, a `struct` is a `class` in which members
@@ -591,6 +672,7 @@ auto cpp1_rule_of_zero(meta::type_declaration& t) -> void;
 //
 auto cpp2_struct(meta::type_declaration& t) -> void;
 
+#line 946 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "C enumerations constitute a curiously half-baked concept. ...
@@ -620,6 +702,7 @@ auto basic_enum(
     cpp2::in bitwise
     ) -> void;
 
+#line 1152 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //    "An enum[...] is a totally ordered value type that stores a
@@ -631,6 +714,7 @@ auto basic_enum(
 //
 auto cpp2_enum(meta::type_declaration& t) -> void;
 
+#line 1178 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "flag_enum expresses an enumeration that stores values
@@ -643,6 +727,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void;
 //
 auto flag_enum(meta::type_declaration& t) -> void;
 
+#line 1210 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //     "As with void*, programmers should know that unions [...] are
@@ -669,12 +754,14 @@ auto flag_enum(meta::type_declaration& t) -> void;
 
 auto cpp2_union(meta::type_declaration& t) -> void;
 
+#line 1366 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  print - output a pretty-printed visualization of t
 //
 auto print(cpp2::in t) -> void;
 
+#line 1375 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  regex - creates regular expressions from members
@@ -691,6 +778,7 @@ auto print(cpp2::in t) -> void;
 //
 auto regex_gen(meta::type_declaration& t) -> void;
 
+#line 1450 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  apply_metafunctions
@@ -701,50 +789,66 @@ auto regex_gen(meta::type_declaration& t) -> void;
     auto const& error
     ) -> bool;
 
+#line 1560 "reflect.h2"
 }
 
 }
 
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "reflect.h2"
+
+#line 21 "reflect.h2"
 namespace cpp2 {
 
 namespace meta {
 
+#line 47 "reflect.h2"
     compiler_services::compiler_services(
 
         std::vector* errors_, 
         std::deque* generated_tokens_
     )
         : errors{ errors_ }
-        , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*errors)) }
+        , errors_original_size{ cpp2::unsafe_narrow(std::ssize(*cpp2::assert_not_null(errors))) }
         , generated_tokens{ generated_tokens_ }
-        , parser{ *errors }
+        , parser{ *cpp2::assert_not_null(errors) }
+#line 52 "reflect.h2"
     {
 
+#line 57 "reflect.h2"
     }
 
+#line 61 "reflect.h2"
     auto compiler_services::set_metafunction_name(cpp2::in name, cpp2::in> args) & -> void{
         metafunction_name  = name;
         metafunction_args  = args;
         metafunctions_used = CPP2_UFCS(empty)(args);
     }
 
+#line 67 "reflect.h2"
     [[nodiscard]] auto compiler_services::get_metafunction_name() const& -> std::string_view { return metafunction_name;  }
 
+#line 69 "reflect.h2"
     [[nodiscard]] auto compiler_services::get_argument(cpp2::in index) & -> std::string{
         metafunctions_used = true;
-        if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return _0<=_1 && _1<_2; }())) {
-            return metafunction_args[index]; 
+        if (([_0 = 0, _1 = index, _2 = CPP2_UFCS(ssize)(metafunction_args)]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less(_1,_2); }())) {
+            return CPP2_ASSERT_IN_BOUNDS(metafunction_args, index); 
         }
         return ""; 
     }
 
+#line 77 "reflect.h2"
     [[nodiscard]] auto compiler_services::get_arguments() & -> std::vector{
         metafunctions_used = true;
         return metafunction_args; 
     }
 
+#line 82 "reflect.h2"
     [[nodiscard]] auto compiler_services::arguments_were_used() const& -> bool { return metafunctions_used;  }
 
+#line 84 "reflect.h2"
     [[nodiscard]] auto compiler_services::parse_statement(
 
         std::string_view source
@@ -752,13 +856,14 @@ namespace meta {
 
     {
             cpp2::deferred_init> ret;
+#line 90 "reflect.h2"
         auto original_source {source}; 
 
         CPP2_UFCS(push_back)(generated_lines, std::vector());
         auto lines {&CPP2_UFCS(back)(generated_lines)}; 
 
         auto add_line {[&, _1 = lines](cpp2::in s) mutable -> void{
-            static_cast(CPP2_UFCS(emplace_back)((*_1), s, source_line::category::cpp2));
+            static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(_1)), s, source_line::category::cpp2));
         }}; 
 {
 auto newline_pos{CPP2_UFCS(find)(source, '\n')};
@@ -766,10 +871,11 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         //  First split this string into source_lines
         //
 
-        if ( CPP2_UFCS(ssize)(source)>1 
-            && newline_pos!=source.npos) 
+#line 102 "reflect.h2"
+        if ( cpp2::cmp_greater(CPP2_UFCS(ssize)(source),1) 
+            && newline_pos != source.npos) 
         {
-            while( newline_pos!=std::string_view::npos ) 
+            while( newline_pos != std::string_view::npos ) 
             {
                 add_line(CPP2_UFCS(substr)(source, 0, newline_pos));
                 CPP2_UFCS(remove_prefix)(source, newline_pos + 1);
@@ -778,6 +884,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         }
 }
 
+#line 113 "reflect.h2"
         if (!(CPP2_UFCS(empty)(source))) {
             std::move(add_line)(std::move(source));
         }
@@ -785,29 +892,31 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         //  Now lex this source fragment to generate
         //  a single grammar_map entry, whose .second
         //  is the vector of tokens
-        static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *errors));
+        static_cast(CPP2_UFCS(emplace_back)(generated_lexers, *cpp2::assert_not_null(errors)));
         auto tokens {&CPP2_UFCS(back)(generated_lexers)}; 
-        CPP2_UFCS(lex)((*tokens), *std::move(lines), true);
+        CPP2_UFCS(lex)((*cpp2::assert_not_null(tokens)), *cpp2::assert_not_null(std::move(lines)), true);
 
-        if (cpp2::Default.has_handler() && !(std::ssize(CPP2_UFCS(get_map)((*tokens)))==1) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(std::ssize(CPP2_UFCS(get_map)((*cpp2::assert_not_null(tokens)))) == 1) ) { cpp2::Default.report_violation(""); }
 
         //  Now parse this single declaration from
         //  the lexed tokens
         ret.construct(CPP2_UFCS(parse_one_declaration)(parser, 
-                (*CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*std::move(tokens)))).second, 
-                *generated_tokens
+                (*cpp2::assert_not_null(CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*cpp2::assert_not_null(std::move(tokens)))))).second, 
+                *cpp2::assert_not_null(generated_tokens)
               ));
         if (!(ret.value())) {
             error(("parse failed - the source string is not a valid statement:\n" + cpp2::to_string(std::move(original_source))));
         }return std::move(ret.value()); 
     }
 
+#line 137 "reflect.h2"
     [[nodiscard]] auto compiler_services::position() const -> source_position
 
     {
         return {  }; 
     }
 
+#line 146 "reflect.h2"
     auto compiler_services::require(
 
         cpp2::in b, 
@@ -819,20 +928,23 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         }
     }
 
+#line 157 "reflect.h2"
     auto compiler_services::error(cpp2::in msg) const& -> void
     {
         auto message {cpp2::as_(msg)}; 
         if (!(CPP2_UFCS(empty)(metafunction_name))) {
             message = { "while applying @" + cpp2::to_string(metafunction_name) + " - " + cpp2::to_string(message) };
         }
-        static_cast(CPP2_UFCS(emplace_back)((*errors), position(), std::move(message)));
+        static_cast(CPP2_UFCS(emplace_back)((*cpp2::assert_not_null(errors)), position(), std::move(message)));
     }
 
+#line 169 "reflect.h2"
     auto compiler_services::report_violation(auto const& msg) const& -> void{
         error(msg);
         throw(std::runtime_error(("  ==> programming bug found in metafunction @" + cpp2::to_string(metafunction_name) + " - contract violation - see previous errors")));
     }
 
+#line 174 "reflect.h2"
     [[nodiscard]] auto compiler_services::has_handler() const& -> auto { return true;  }
 
     compiler_services::~compiler_services() noexcept{}
@@ -845,6 +957,7 @@ compiler_services::compiler_services(compiler_services const& that)
                                 , metafunction_args{ that.metafunction_args }
                                 , metafunctions_used{ that.metafunctions_used }{}
 
+#line 230 "reflect.h2"
     declaration_base::declaration_base(
 
         declaration_node* n_, 
@@ -852,92 +965,140 @@ compiler_services::compiler_services(compiler_services const& that)
     )
         : compiler_services{ s }
         , n{ n_ }
+#line 235 "reflect.h2"
     {
 
+#line 238 "reflect.h2"
         if (cpp2::Default.has_handler() && !(n) ) { cpp2::Default.report_violation(CPP2_CONTRACT_MSG("a meta::declaration must point to a valid declaration_node, not null")); }
     }
 
-    [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*n));  }
+#line 241 "reflect.h2"
+    [[nodiscard]] auto declaration_base::position() const -> source_position { return CPP2_UFCS(position)((*cpp2::assert_not_null(n)));  }
 
-    [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*n), 0);  }
+#line 243 "reflect.h2"
+    [[nodiscard]] auto declaration_base::print() const& -> std::string { return CPP2_UFCS(pretty_print_visualize)((*cpp2::assert_not_null(n)), 0);  }
 
     declaration_base::~declaration_base() noexcept{}
 declaration_base::declaration_base(declaration_base const& that)
                                 : compiler_services{ static_cast(that) }
                                 , n{ that.n }{}
 
+#line 254 "reflect.h2"
     declaration::declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration_base{ n_, s }
+#line 259 "reflect.h2"
     {
 
     }
 
-    [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*n)); }
-    [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*n)); }
-    [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*n)); }
-    [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*n));  }
-
-    auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*n))); }
-    auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*n)));  }
-    auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*n))); }
-
-    [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*n)); }
-    [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*n)); }
-    [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*n)); }
-
-    [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*n)); }
-    [[nodiscard]] auto declaration::has_name(cpp2::in s) const& -> bool { return CPP2_UFCS(has_name)((*n), s); }
-
+#line 263 "reflect.h2"
+    [[nodiscard]] auto declaration::is_public() const& -> bool { return CPP2_UFCS(is_public)((*cpp2::assert_not_null(n))); }
+#line 264 "reflect.h2"
+    [[nodiscard]] auto declaration::is_protected() const& -> bool { return CPP2_UFCS(is_protected)((*cpp2::assert_not_null(n))); }
+#line 265 "reflect.h2"
+    [[nodiscard]] auto declaration::is_private() const& -> bool { return CPP2_UFCS(is_private)((*cpp2::assert_not_null(n))); }
+#line 266 "reflect.h2"
+    [[nodiscard]] auto declaration::is_default_access() const& -> bool { return CPP2_UFCS(is_default_access)((*cpp2::assert_not_null(n)));  }
+
+#line 268 "reflect.h2"
+    auto declaration::default_to_public() & -> void { static_cast(CPP2_UFCS(make_public)((*cpp2::assert_not_null(n)))); }
+#line 269 "reflect.h2"
+    auto declaration::default_to_protected() & -> void { static_cast(CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n))));  }
+#line 270 "reflect.h2"
+    auto declaration::default_to_private() & -> void { static_cast(CPP2_UFCS(make_private)((*cpp2::assert_not_null(n)))); }
+
+#line 272 "reflect.h2"
+    [[nodiscard]] auto declaration::make_public() & -> bool { return CPP2_UFCS(make_public)((*cpp2::assert_not_null(n))); }
+#line 273 "reflect.h2"
+    [[nodiscard]] auto declaration::make_protected() & -> bool { return CPP2_UFCS(make_protected)((*cpp2::assert_not_null(n))); }
+#line 274 "reflect.h2"
+    [[nodiscard]] auto declaration::make_private() & -> bool { return CPP2_UFCS(make_private)((*cpp2::assert_not_null(n))); }
+
+#line 276 "reflect.h2"
+    [[nodiscard]] auto declaration::has_name() const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n))); }
+#line 277 "reflect.h2"
+    [[nodiscard]] auto declaration::has_name(cpp2::in s) const& -> bool { return CPP2_UFCS(has_name)((*cpp2::assert_not_null(n)), s); }
+
+#line 279 "reflect.h2"
     [[nodiscard]] auto declaration::name() const& -> std::string_view{
-        if (has_name()) {return CPP2_UFCS(as_string_view)((*CPP2_UFCS(name)(*n))); }
+        if (has_name()) {return CPP2_UFCS(as_string_view)((*cpp2::assert_not_null(CPP2_UFCS(name)(*cpp2::assert_not_null(n))))); }
         else          { return ""; }
     }
 
-    [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*n));  }
-
-    [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*n)); }
-    [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*n)); }
-    [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*n)); }
-    [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*n)); }
-    [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*n));  }
-    [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*n)); }
-    [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*n)); }
-    [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*n)); }
-
-    [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*n)); }
-    [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*n));  }
-    [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*n)); }
-
-    [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*n));  }
-
+#line 284 "reflect.h2"
+    [[nodiscard]] auto declaration::has_initializer() const& -> bool { return CPP2_UFCS(has_initializer)((*cpp2::assert_not_null(n)));  }
+
+#line 286 "reflect.h2"
+    [[nodiscard]] auto declaration::is_global() const& -> bool { return CPP2_UFCS(is_global)((*cpp2::assert_not_null(n))); }
+#line 287 "reflect.h2"
+    [[nodiscard]] auto declaration::is_function() const& -> bool { return CPP2_UFCS(is_function)((*cpp2::assert_not_null(n))); }
+#line 288 "reflect.h2"
+    [[nodiscard]] auto declaration::is_object() const& -> bool { return CPP2_UFCS(is_object)((*cpp2::assert_not_null(n))); }
+#line 289 "reflect.h2"
+    [[nodiscard]] auto declaration::is_base_object() const& -> bool { return CPP2_UFCS(is_base_object)((*cpp2::assert_not_null(n))); }
+#line 290 "reflect.h2"
+    [[nodiscard]] auto declaration::is_member_object() const& -> bool { return CPP2_UFCS(is_member_object)((*cpp2::assert_not_null(n)));  }
+#line 291 "reflect.h2"
+    [[nodiscard]] auto declaration::is_type() const& -> bool { return CPP2_UFCS(is_type)((*cpp2::assert_not_null(n))); }
+#line 292 "reflect.h2"
+    [[nodiscard]] auto declaration::is_namespace() const& -> bool { return CPP2_UFCS(is_namespace)((*cpp2::assert_not_null(n))); }
+#line 293 "reflect.h2"
+    [[nodiscard]] auto declaration::is_alias() const& -> bool { return CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n))); }
+
+#line 295 "reflect.h2"
+    [[nodiscard]] auto declaration::is_type_alias() const& -> bool { return CPP2_UFCS(is_type_alias)((*cpp2::assert_not_null(n))); }
+#line 296 "reflect.h2"
+    [[nodiscard]] auto declaration::is_namespace_alias() const& -> bool { return CPP2_UFCS(is_namespace_alias)((*cpp2::assert_not_null(n)));  }
+#line 297 "reflect.h2"
+    [[nodiscard]] auto declaration::is_object_alias() const& -> bool { return CPP2_UFCS(is_object_alias)((*cpp2::assert_not_null(n))); }
+
+#line 299 "reflect.h2"
+    [[nodiscard]] auto declaration::is_function_expression() const& -> bool { return CPP2_UFCS(is_function_expression)((*cpp2::assert_not_null(n)));  }
+
+#line 301 "reflect.h2"
     [[nodiscard]] auto declaration::as_function() const& -> function_declaration { return function_declaration(n, (*this));  }
+#line 302 "reflect.h2"
     [[nodiscard]] auto declaration::as_object() const& -> object_declaration { return object_declaration(n, (*this)); }
+#line 303 "reflect.h2"
     [[nodiscard]] auto declaration::as_type() const& -> type_declaration { return type_declaration(n, (*this)); }
+#line 304 "reflect.h2"
     [[nodiscard]] auto declaration::as_alias() const& -> alias_declaration { return alias_declaration(n, (*this)); }
 
-    [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*n).parent_declaration, (*this)); }
-
-    [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*n)); }
-    [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*n)); }
-    [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*n)); }
-    [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*n)); }
-    [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*n)); }
-
-    [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*n)); }
-    [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*n));  }
-    [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*n)); }
-
-    [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*n));  }
-
+#line 306 "reflect.h2"
+    [[nodiscard]] auto declaration::get_parent() const& -> declaration { return declaration((*cpp2::assert_not_null(n)).parent_declaration, (*this)); }
+
+#line 308 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_function() const& -> bool { return CPP2_UFCS(parent_is_function)((*cpp2::assert_not_null(n))); }
+#line 309 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_object() const& -> bool { return CPP2_UFCS(parent_is_object)((*cpp2::assert_not_null(n))); }
+#line 310 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_type() const& -> bool { return CPP2_UFCS(parent_is_type)((*cpp2::assert_not_null(n))); }
+#line 311 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_namespace() const& -> bool { return CPP2_UFCS(parent_is_namespace)((*cpp2::assert_not_null(n))); }
+#line 312 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_alias() const& -> bool { return CPP2_UFCS(parent_is_alias)((*cpp2::assert_not_null(n))); }
+
+#line 314 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_type_alias() const& -> bool { return CPP2_UFCS(parent_is_type_alias)((*cpp2::assert_not_null(n))); }
+#line 315 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_namespace_alias() const& -> bool { return CPP2_UFCS(parent_is_namespace_alias)((*cpp2::assert_not_null(n)));  }
+#line 316 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_object_alias() const& -> bool { return CPP2_UFCS(parent_is_object_alias)((*cpp2::assert_not_null(n))); }
+
+#line 318 "reflect.h2"
+    [[nodiscard]] auto declaration::parent_is_polymorphic() const& -> bool { return CPP2_UFCS(parent_is_polymorphic)((*cpp2::assert_not_null(n)));  }
+
+#line 320 "reflect.h2"
     auto declaration::mark_for_removal_from_enclosing_type() & -> void
 
     {
         if (cpp2::Type.has_handler() && !(parent_is_type()) ) { cpp2::Type.report_violation(""); }
-        auto test {CPP2_UFCS(type_member_mark_for_removal)((*n))}; 
+#line 323 "reflect.h2"
+        auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::assert_not_null(n)))}; 
         if (cpp2::Default.has_handler() && !(std::move(test)) ) { cpp2::Default.report_violation(""); }// ... to ensure this assert is true
     }
 
@@ -945,69 +1106,105 @@ declaration_base::declaration_base(declaration_base const& that)
 declaration::declaration(declaration const& that)
                                 : declaration_base{ static_cast(that) }{}
 
+#line 336 "reflect.h2"
     function_declaration::function_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
+#line 341 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*n))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_function)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
     }
 
-    [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*n), s); }
-    [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*n), s); }
-    [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*n), s); }
-    [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*n), s); }
-    [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*n), s); }
-    [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*n)); }
-
+#line 346 "reflect.h2"
+    [[nodiscard]] auto function_declaration::index_of_parameter_named(cpp2::in s) const& -> int { return CPP2_UFCS(index_of_parameter_named)((*cpp2::assert_not_null(n)), s); }
+#line 347 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_parameter_named)((*cpp2::assert_not_null(n)), s); }
+#line 348 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_in_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_in_parameter_named)((*cpp2::assert_not_null(n)), s); }
+#line 349 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_out_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_out_parameter_named)((*cpp2::assert_not_null(n)), s); }
+#line 350 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_move_parameter_named(cpp2::in s) const& -> bool { return CPP2_UFCS(has_move_parameter_named)((*cpp2::assert_not_null(n)), s); }
+#line 351 "reflect.h2"
+    [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::assert_not_null(n))); }
+
+#line 353 "reflect.h2"
     [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::in s, cpp2::in pass) const& -> bool { 
-                                                  return CPP2_UFCS(has_parameter_with_name_and_pass)((*n), s, pass);  }
-    [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*n)); }
-    [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*n)); }
-    [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*n)); }
-    [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*n)); }
-    [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*n)); }
-    [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*n)); }
-    [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*n)); }
-    [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*n)); }
-    [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*n)); }
-    [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*n));  }
-    [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*n)); }
-    [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*n)); }
-    [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*n)); }
-    [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*n));  }
-    [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*n)); }
-
+                                                  return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::assert_not_null(n)), s, pass);  }
+#line 355 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::assert_not_null(n))); }
+#line 356 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_virtual() const& -> bool { return CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(n))); }
+#line 357 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_defaultable() const& -> bool { return CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(n))); }
+#line 358 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_constructor() const& -> bool { return CPP2_UFCS(is_constructor)((*cpp2::assert_not_null(n))); }
+#line 359 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_default_constructor() const& -> bool { return CPP2_UFCS(is_default_constructor)((*cpp2::assert_not_null(n))); }
+#line 360 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_move() const& -> bool { return CPP2_UFCS(is_move)((*cpp2::assert_not_null(n))); }
+#line 361 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_swap() const& -> bool { return CPP2_UFCS(is_swap)((*cpp2::assert_not_null(n))); }
+#line 362 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_constructor_with_that() const& -> bool { return CPP2_UFCS(is_constructor_with_that)((*cpp2::assert_not_null(n))); }
+#line 363 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_constructor_with_in_that() const& -> bool { return CPP2_UFCS(is_constructor_with_in_that)((*cpp2::assert_not_null(n))); }
+#line 364 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_constructor_with_move_that() const& -> bool { return CPP2_UFCS(is_constructor_with_move_that)((*cpp2::assert_not_null(n)));  }
+#line 365 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_assignment() const& -> bool { return CPP2_UFCS(is_assignment)((*cpp2::assert_not_null(n))); }
+#line 366 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_assignment_with_that() const& -> bool { return CPP2_UFCS(is_assignment_with_that)((*cpp2::assert_not_null(n))); }
+#line 367 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_assignment_with_in_that() const& -> bool { return CPP2_UFCS(is_assignment_with_in_that)((*cpp2::assert_not_null(n))); }
+#line 368 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_assignment_with_move_that() const& -> bool { return CPP2_UFCS(is_assignment_with_move_that)((*cpp2::assert_not_null(n)));  }
+#line 369 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_destructor() const& -> bool { return CPP2_UFCS(is_destructor)((*cpp2::assert_not_null(n))); }
+
+#line 371 "reflect.h2"
     [[nodiscard]] auto function_declaration::is_copy_or_move() const& -> bool { return is_constructor_with_that() || is_assignment_with_that(); }
 
-    [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*n)); }
-    [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*n)); }
-    [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*n)); }
-    [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*n)); }
+#line 373 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_declared_return_type() const& -> bool { return CPP2_UFCS(has_declared_return_type)((*cpp2::assert_not_null(n))); }
+#line 374 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_deduced_return_type() const& -> bool { return CPP2_UFCS(has_deduced_return_type)((*cpp2::assert_not_null(n))); }
+#line 375 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_bool_return_type() const& -> bool { return CPP2_UFCS(has_bool_return_type)((*cpp2::assert_not_null(n))); }
+#line 376 "reflect.h2"
+    [[nodiscard]] auto function_declaration::has_non_void_return_type() const& -> bool { return CPP2_UFCS(has_non_void_return_type)((*cpp2::assert_not_null(n))); }
 
-    [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*n)); }
+#line 378 "reflect.h2"
+    [[nodiscard]] auto function_declaration::unnamed_return_type() const& -> std::string { return CPP2_UFCS(unnamed_return_type_to_string)((*cpp2::assert_not_null(n))); }
 
+#line 380 "reflect.h2"
     [[nodiscard]] auto function_declaration::get_parameters() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& param : CPP2_UFCS(get_function_parameters)((*n)) ) {
-            static_cast(CPP2_UFCS(emplace_back)(ret, &*(*param).declaration, (*this)));
+        for ( auto const& param : CPP2_UFCS(get_function_parameters)((*cpp2::assert_not_null(n))) ) {
+            static_cast(CPP2_UFCS(emplace_back)(ret, &*cpp2::assert_not_null((*cpp2::assert_not_null(param)).declaration), (*this)));
         }
         return ret; 
     }
 
-    [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*n));  }
+#line 390 "reflect.h2"
+    [[nodiscard]] auto function_declaration::is_binary_comparison_function() const& -> bool { return CPP2_UFCS(is_binary_comparison_function)((*cpp2::assert_not_null(n)));  }
 
-    auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*n))); }
+#line 392 "reflect.h2"
+    auto function_declaration::default_to_virtual() & -> void { static_cast(CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n)))); }
 
-    [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*n)); }
+#line 394 "reflect.h2"
+    [[nodiscard]] auto function_declaration::make_virtual() & -> bool { return CPP2_UFCS(make_function_virtual)((*cpp2::assert_not_null(n))); }
 
+#line 396 "reflect.h2"
     auto function_declaration::add_initializer(cpp2::in source) & -> void
 
+#line 399 "reflect.h2"
     {
         if ((*this).has_handler() && !(!(has_initializer())) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that already has one")); }
         if ((*this).has_handler() && !(parent_is_type()) ) { (*this).report_violation(CPP2_CONTRACT_MSG("cannot add an initializer to a function that isn't in a type scope")); }
@@ -1016,41 +1213,48 @@ declaration::declaration(declaration const& that)
         //require( parent_is_type(),
         //         "cannot add an initializer to a function that isn't in a type scope");
 
+#line 405 "reflect.h2"
         auto stmt {parse_statement(source)}; 
         if (!((cpp2::as_(stmt)))) {
             error("cannot add an initializer that is not a valid statement");
             return ; 
         }
-        require(CPP2_UFCS(add_function_initializer)((*n), std::move(stmt)), 
+        require(CPP2_UFCS(add_function_initializer)((*cpp2::assert_not_null(n)), std::move(stmt)), 
                  std::string("unexpected error while attempting to add initializer"));
     }
 
     function_declaration::function_declaration(function_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
+#line 423 "reflect.h2"
     object_declaration::object_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
+#line 428 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*n))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_object)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
     }
 
-    [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*n)); }
-    [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*n));  }
+#line 433 "reflect.h2"
+    [[nodiscard]] auto object_declaration::is_const() const& -> bool { return CPP2_UFCS(is_const)((*cpp2::assert_not_null(n))); }
+#line 434 "reflect.h2"
+    [[nodiscard]] auto object_declaration::has_wildcard_type() const& -> bool { return CPP2_UFCS(has_wildcard_type)((*cpp2::assert_not_null(n)));  }
 
+#line 436 "reflect.h2"
     [[nodiscard]] auto object_declaration::type() const& -> std::string{
-        auto ret {CPP2_UFCS(object_type)((*n))}; 
+        auto ret {CPP2_UFCS(object_type)((*cpp2::assert_not_null(n)))}; 
         require(!(contains(ret, "(*ERROR*)")), 
                  "cannot to_string this type: " + ret);
         return ret; 
     }
 
+#line 443 "reflect.h2"
     [[nodiscard]] auto object_declaration::initializer() const& -> std::string{
-        auto ret {CPP2_UFCS(object_initializer)((*n))}; 
+        auto ret {CPP2_UFCS(object_initializer)((*cpp2::assert_not_null(n)))}; 
         require(!(contains(ret, "(*ERROR*)")), 
                  "cannot to_string this initializer: " + ret);
         return ret; 
@@ -1059,17 +1263,20 @@ declaration::declaration(declaration const& that)
     object_declaration::object_declaration(object_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
+#line 459 "reflect.h2"
     type_declaration::type_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
+#line 464 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*n))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_type)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
     }
 
+#line 469 "reflect.h2"
     auto type_declaration::reserve_names(cpp2::in name, auto&& ...etc) const& -> void
     {                           // etc is not declared ':string_view' for compatibility with GCC 10.x
         for ( 
@@ -1082,90 +1289,103 @@ declaration::declaration(declaration const& that)
         }
     }
 
-    [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*n)); }
-    [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*n)); }
-    [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*n)); }
+#line 481 "reflect.h2"
+    [[nodiscard]] auto type_declaration::is_polymorphic() const& -> bool { return CPP2_UFCS(is_polymorphic)((*cpp2::assert_not_null(n))); }
+#line 482 "reflect.h2"
+    [[nodiscard]] auto type_declaration::is_final() const& -> bool { return CPP2_UFCS(is_type_final)((*cpp2::assert_not_null(n))); }
+#line 483 "reflect.h2"
+    [[nodiscard]] auto type_declaration::make_final() & -> bool { return CPP2_UFCS(make_type_final)((*cpp2::assert_not_null(n))); }
 
+#line 485 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_functions() const& -> std::vector
 
     {
         std::vector ret {}; 
         for ( 
-             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::functions) ) {
+             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::functions) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
+#line 496 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_functions_needing_initializer() const& -> std::vector
 
     {
         std::vector ret {}; 
         for ( 
-             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::functions) ) 
-        if ( !(CPP2_UFCS(has_initializer)((*d))) 
-            && !(CPP2_UFCS(is_virtual_function)((*d))) 
-            && !(CPP2_UFCS(is_defaultable_function)((*d)))) 
+             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::functions) ) 
+        if ( !(CPP2_UFCS(has_initializer)((*cpp2::assert_not_null(d)))) 
+            && !(CPP2_UFCS(is_virtual_function)((*cpp2::assert_not_null(d)))) 
+            && !(CPP2_UFCS(is_defaultable_function)((*cpp2::assert_not_null(d))))) 
         {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
+#line 511 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_objects() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::objects) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::objects) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
+#line 521 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_types() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::types) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::types) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
+#line 531 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_member_aliases() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::aliases) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::aliases) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
+#line 541 "reflect.h2"
     [[nodiscard]] auto type_declaration::get_members() const& -> std::vector
 
     {
         std::vector ret {}; 
-        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*n), declaration_node::all) ) {
+        for ( auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::assert_not_null(n)), declaration_node::all) ) {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
         return ret; 
     }
 
+#line 551 "reflect.h2"
     [[nodiscard]] auto type_declaration::query_declared_value_set_functions() const& -> query_declared_value_set_functions_ret
 
+#line 558 "reflect.h2"
     {
             cpp2::deferred_init out_this_in_that;
             cpp2::deferred_init out_this_move_that;
             cpp2::deferred_init inout_this_in_that;
             cpp2::deferred_init inout_this_move_that;
-        auto declared {CPP2_UFCS(find_declared_value_set_functions)((*n))}; 
+#line 559 "reflect.h2"
+        auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::assert_not_null(n)))}; 
         out_this_in_that.construct(declared.out_this_in_that != nullptr);
-        out_this_move_that.construct(declared.out_this_move_that!=nullptr);
-        inout_this_in_that.construct(declared.inout_this_in_that!=nullptr);
-        inout_this_move_that.construct(std::move(declared).inout_this_move_that!=nullptr);
+        out_this_move_that.construct(declared.out_this_move_that != nullptr);
+        inout_this_in_that.construct(declared.inout_this_in_that != nullptr);
+        inout_this_move_that.construct(std::move(declared).inout_this_move_that != nullptr);
     return  { std::move(out_this_in_that.value()), std::move(out_this_move_that.value()), std::move(inout_this_in_that.value()), std::move(inout_this_move_that.value()) }; }
 
+#line 566 "reflect.h2"
     auto type_declaration::add_member(cpp2::in source) & -> void
     {
         auto decl {parse_statement(source)}; 
@@ -1173,40 +1393,47 @@ declaration::declaration(declaration const& that)
             error("the provided source string is not a valid statement");
             return ; 
         }
-        if (!(CPP2_UFCS(is_declaration)((*decl)))) {
+        if (!(CPP2_UFCS(is_declaration)((*cpp2::assert_not_null(decl))))) {
             error("cannot add a member that is not a declaration");
         }
-        require(CPP2_UFCS(add_type_member)((*n), std::move(decl)), 
+        require(CPP2_UFCS(add_type_member)((*cpp2::assert_not_null(n)), std::move(decl)), 
                  std::string("unexpected error while attempting to add member:\n") + source);
     }
 
-    auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*n));  }
-    auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*n)); }
+#line 580 "reflect.h2"
+    auto type_declaration::remove_marked_members() & -> void { CPP2_UFCS(type_remove_marked_members)((*cpp2::assert_not_null(n)));  }
+#line 581 "reflect.h2"
+    auto type_declaration::remove_all_members() & -> void { CPP2_UFCS(type_remove_all_members)((*cpp2::assert_not_null(n))); }
 
-    auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*n));  }
+#line 583 "reflect.h2"
+    auto type_declaration::disable_member_function_generation() & -> void { CPP2_UFCS(type_disable_member_function_generation)((*cpp2::assert_not_null(n)));  }
 
     type_declaration::type_declaration(type_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
+#line 594 "reflect.h2"
     alias_declaration::alias_declaration(
 
         declaration_node* n_, 
         cpp2::in s
     )
         : declaration{ n_, s }
+#line 599 "reflect.h2"
     {
 
-        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*n))) ) { cpp2::Default.report_violation(""); }
+        if (cpp2::Default.has_handler() && !(CPP2_UFCS(is_alias)((*cpp2::assert_not_null(n)))) ) { cpp2::Default.report_violation(""); }
     }
 
     alias_declaration::alias_declaration(alias_declaration const& that)
                                 : declaration{ static_cast(that) }{}
 
+#line 618 "reflect.h2"
 auto add_virtual_destructor(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(add_member)(t, "operator=: (virtual move this) = { }");
 }
 
+#line 636 "reflect.h2"
 auto interface(meta::type_declaration& t) -> void
 {
     auto has_dtor {false}; 
@@ -1233,6 +1460,7 @@ auto interface(meta::type_declaration& t) -> void
     }
 }
 
+#line 682 "reflect.h2"
 auto polymorphic_base(meta::type_declaration& t) -> void
 {
     auto has_dtor {false}; 
@@ -1257,6 +1485,7 @@ auto polymorphic_base(meta::type_declaration& t) -> void
     }
 }
 
+#line 727 "reflect.h2"
 auto ordered_impl(
     meta::type_declaration& t, 
     cpp2::in ordering
@@ -1269,7 +1498,7 @@ auto ordered_impl(
         if (CPP2_UFCS(has_name)(mf, "operator<=>")) {
             has_spaceship = true;
             auto return_name {CPP2_UFCS(unnamed_return_type)(mf)}; 
-            if (CPP2_UFCS(find)(return_name, ordering)==return_name.npos) 
+            if (CPP2_UFCS(find)(return_name, ordering) == return_name.npos) 
             {
                 CPP2_UFCS(error)(mf, "operator<=> must return std::" + cpp2::as_(ordering));
             }
@@ -1281,21 +1510,25 @@ auto ordered_impl(
     }
 }
 
+#line 756 "reflect.h2"
 auto ordered(meta::type_declaration& t) -> void
 {
     ordered_impl(t, "strong_ordering");
 }
 
+#line 764 "reflect.h2"
 auto weakly_ordered(meta::type_declaration& t) -> void
 {
     ordered_impl(t, "weak_ordering");
 }
 
+#line 772 "reflect.h2"
 auto partially_ordered(meta::type_declaration& t) -> void
 {
     ordered_impl(t, "partial_ordering");
 }
 
+#line 794 "reflect.h2"
 auto copyable(meta::type_declaration& t) -> void
 {
     //  If the user explicitly wrote any of the copy/move functions,
@@ -1317,6 +1550,7 @@ auto copyable(meta::type_declaration& t) -> void
     }}
 }
 
+#line 822 "reflect.h2"
 auto basic_value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(copyable)(t);
@@ -1335,24 +1569,28 @@ auto basic_value(meta::type_declaration& t) -> void
     }
 }
 
+#line 850 "reflect.h2"
 auto value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(ordered)(t);
     CPP2_UFCS(basic_value)(t);
 }
 
+#line 856 "reflect.h2"
 auto weakly_ordered_value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(weakly_ordered)(t);
     CPP2_UFCS(basic_value)(t);
 }
 
+#line 862 "reflect.h2"
 auto partially_ordered_value(meta::type_declaration& t) -> void
 {
     CPP2_UFCS(partially_ordered)(t);
     CPP2_UFCS(basic_value)(t);
 }
 
+#line 891 "reflect.h2"
 auto cpp1_rule_of_zero(meta::type_declaration& t) -> void
 {
     for ( auto& mf : CPP2_UFCS(get_member_functions)(t) ) 
@@ -1365,6 +1603,7 @@ auto cpp1_rule_of_zero(meta::type_declaration& t) -> void
     CPP2_UFCS(disable_member_function_generation)(t);
 }
 
+#line 928 "reflect.h2"
 auto cpp2_struct(meta::type_declaration& t) -> void
 {
     for ( auto& m : CPP2_UFCS(get_members)(t) ) 
@@ -1382,6 +1621,7 @@ auto cpp2_struct(meta::type_declaration& t) -> void
     CPP2_UFCS(cpp1_rule_of_zero)(t);
 }
 
+#line 969 "reflect.h2"
 auto basic_enum(
     meta::type_declaration& t, 
     auto const& nextval, 
@@ -1406,6 +1646,7 @@ auto basic_enum(
 {
 std::string value{"-1"};
 
+#line 992 "reflect.h2"
     for ( 
           auto const& m : CPP2_UFCS(get_members)(t) ) 
     if (  CPP2_UFCS(is_member_object)(m)) 
@@ -1427,11 +1668,11 @@ std::string value{"-1"};
 
         nextval(value, init);
 
-        auto v {std::strtoll(&value[0], nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now
-        if (vmax_value) {
+        if (cpp2::cmp_greater(v,max_value)) {
             max_value = v;
         }
 
@@ -1443,28 +1684,29 @@ std::string value{"-1"};
     }
 }
 
+#line 1028 "reflect.h2"
     if ((CPP2_UFCS(empty)(enumerators))) {
         CPP2_UFCS(error)(t, "an enumeration must contain at least one enumerator value");
         return ; 
     }
 
     //  Compute the default underlying type, if it wasn't explicitly specified
-    if (underlying_type.value()=="") 
+    if (underlying_type.value() == "") 
     {
         CPP2_UFCS(require)(t, !(std::move(found_non_numeric)), 
             "if you write an enumerator with a non-numeric-literal value, you must specify the enumeration's underlying type");
 
         if (!(bitwise)) {
-            if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
+            if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
                 underlying_type.value() = "i8";
             }
-            else {if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
+            else {if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
                 underlying_type.value() = "i16";
             }
-            else {if (min_value>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
+            else {if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
                 underlying_type.value() = "i32";
             }
-            else {if (std::move(min_value)>=std::numeric_limits::min() && max_value<=std::numeric_limits::max()) {
+            else {if (cpp2::cmp_greater_eq(std::move(min_value),std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
                 underlying_type.value() = "i64";
             }
             else {
@@ -1473,13 +1715,13 @@ std::string value{"-1"};
         }
         else {
             auto umax {std::move(max_value) * cpp2::as_()}; 
-            if (umax<=std::numeric_limits::max()) {
+            if (cpp2::cmp_less_eq(umax,std::numeric_limits::max())) {
                 underlying_type.value() = "u8";
             }
-            else {if (umax<=std::numeric_limits::max()) {
+            else {if (cpp2::cmp_less_eq(umax,std::numeric_limits::max())) {
                 underlying_type.value() = "u16";
             }
-            else {if (std::move(umax)<=std::numeric_limits::max()) {
+            else {if (cpp2::cmp_less_eq(std::move(umax),std::numeric_limits::max())) {
                 underlying_type.value() = "u32";
             }
             else {
@@ -1488,6 +1730,7 @@ std::string value{"-1"};
         }
     }
 
+#line 1074 "reflect.h2"
     //  2. Replace: Erase the contents and replace with modified contents
     //
     //  Note that most values and functions are declared as '==' compile-time values, i.e. Cpp1 'constexpr'
@@ -1496,7 +1739,7 @@ std::string value{"-1"};
 
     //  Generate the 'none' value if appropriate, and use that or
     //  else the first enumerator as the default-constructed value
-    auto default_value {enumerators[0].name}; 
+    auto default_value {CPP2_ASSERT_IN_BOUNDS_LITERAL(enumerators, 0).name}; 
     if (bitwise) {
         default_value = "none";
         value_member_info e {"none", "", "0"}; 
@@ -1535,6 +1778,7 @@ std::string to_string{"    to_string: (this) -> std::string = { \n"};
 
     //  Provide a 'to_string' function to print enumerator name(s)
 
+#line 1119 "reflect.h2"
     {
         if (bitwise) {
             to_string += "    _ret   : std::string = \"(\";\n";
@@ -1544,9 +1788,9 @@ std::string to_string{"    to_string: (this) -> std::string = { \n"};
 
         for ( 
               auto const& e : enumerators ) {
-            if (e.name!="_") {  // ignore unnamed values
+            if (e.name != "_") {// ignore unnamed values
                 if (bitwise) {
-                    if (e.name!="none") {
+                    if (e.name != "none") {
                         to_string += ("    if (this & " + cpp2::to_string(e.name) + ") == " + cpp2::to_string(e.name) + " { _ret += _comma + \"" + cpp2::to_string(e.name) + "\"; _comma = \", \"; }\n");
                     }
                 }
@@ -1566,8 +1810,10 @@ std::string to_string{"    to_string: (this) -> std::string = { \n"};
         CPP2_UFCS(add_member)(t, std::move(to_string));
     }
 }
+#line 1149 "reflect.h2"
 }
 
+#line 1161 "reflect.h2"
 auto cpp2_enum(meta::type_declaration& t) -> void
 {
     //  Let basic_enum do its thing, with an incrementing value generator
@@ -1576,7 +1822,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void
             if (!(CPP2_UFCS(empty)(specified_value))) {
                 value = specified_value;
             }else {
-                auto v {std::strtoll(&value[0], nullptr, 10)}; 
+                auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; 
                 value = cpp2::as_((std::move(v) + 1));
             }
         }, 
@@ -1584,6 +1830,7 @@ auto cpp2_enum(meta::type_declaration& t) -> void
     );
 }
 
+#line 1188 "reflect.h2"
 auto flag_enum(meta::type_declaration& t) -> void
 {
     //  Let basic_enum do its thing, with a power-of-two value generator
@@ -1592,8 +1839,8 @@ auto flag_enum(meta::type_declaration& t) -> void
             if (!(CPP2_UFCS(empty)(specified_value))) {
                 value = specified_value;
             }else {
-                auto v {std::strtoll(&value[0], nullptr, 10)}; 
-                if (v<1) {
+                auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; 
+                if (cpp2::cmp_less(v,1)) {
                     value = "1";
                 }
                 else {
@@ -1605,6 +1852,7 @@ auto flag_enum(meta::type_declaration& t) -> void
     );
 }
 
+#line 1234 "reflect.h2"
 auto cpp2_union(meta::type_declaration& t) -> void
 {
     std::vector alternatives {}; 
@@ -1613,6 +1861,7 @@ auto value{0};
 
     //  1. Gather: All the user-written members, and find/compute the max size
 
+#line 1241 "reflect.h2"
     for ( 
 
            auto const& m : CPP2_UFCS(get_members)(t) )  { do 
@@ -1637,20 +1886,22 @@ auto value{0};
     } while (false); ++value; }
 }
 
+#line 1264 "reflect.h2"
     std::string discriminator_type {}; 
-    if (CPP2_UFCS(ssize)(alternatives)::max()) {
+    if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) {
         discriminator_type = "i8";
     }
-    else {if (CPP2_UFCS(ssize)(alternatives)::max()) {
+    else {if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) {
         discriminator_type = "i16";
     }
-    else {if (CPP2_UFCS(ssize)(alternatives)::max()) {
+    else {if (cpp2::cmp_less(CPP2_UFCS(ssize)(alternatives),std::numeric_limits::max())) {
         discriminator_type = "i32";
     }
     else {
         discriminator_type = "i64";
     }}}
 
+#line 1279 "reflect.h2"
     //  2. Replace: Erase the contents and replace with modified contents
 
     CPP2_UFCS(remove_marked_members)(t);
@@ -1659,10 +1910,12 @@ std::string storage{"    _storage: cpp2::aligned_storage t) -> void
 {
     std::cout << CPP2_UFCS(print)(t) << "\n";
 }
 
+#line 1389 "reflect.h2"
 auto regex_gen(meta::type_declaration& t) -> void
 {
     auto has_default {false}; 
     auto prefix {"regex"}; 
+    std::string postfix {"_mod"};   // TODO: Remove mod syntax when 'm.initializer()' can be '("pat", "mod")'.
 
-    std::map expressions {}; 
+    std::map> expressions {}; 
 
     for ( auto& m : CPP2_UFCS(get_member_objects)(t) ) 
     {
@@ -1774,7 +2038,7 @@ auto regex_gen(meta::type_declaration& t) -> void
             }
             CPP2_UFCS(mark_for_removal_from_enclosing_type)(m);
 
-            if (name==prefix) {
+            if (name == prefix) {
                 if (has_default) {
                     CPP2_UFCS(error)(t, "Type can only contain one default named regular expression.");
                 }
@@ -1787,19 +2051,35 @@ auto regex_gen(meta::type_declaration& t) -> void
             }
             expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2);
 
-            expressions[name] = expr;
+            if (CPP2_UFCS(ends_with)(name, postfix)) {
+                name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(size)(name) - CPP2_UFCS(size)(postfix));
+
+                if (CPP2_UFCS(contains)(expressions, name)) {
+                    CPP2_ASSERT_IN_BOUNDS(expressions, name).second = expr;
+                }
+                else {
+                    CPP2_UFCS(error)(t, "Expression modifier defined without expression.");
+                }
+
+            }
+            else {
+                CPP2_ASSERT_IN_BOUNDS(expressions, name) = std::make_pair(expr, "");
+            }
+
+#line 1437 "reflect.h2"
         }
     }
 
     CPP2_UFCS(remove_marked_members)(t);
 
     for ( auto const& expr : expressions ) {
-        auto regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
+        auto regular_expression {::cpp2::regex::generate_template(expr.second.first, expr.second.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
 
         CPP2_UFCS(add_member)(t, (cpp2::to_string(expr.first) + ": " + cpp2::to_string(regular_expression) + " = ();"));
     }
 }
 
+#line 1454 "reflect.h2"
 [[nodiscard]] auto apply_metafunctions(
     declaration_node& n, 
     type_declaration& rtype, 
@@ -1813,7 +2093,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     for ( 
           auto const& m : CPP2_UFCS(get_members)(rtype) ) 
     {
-        CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "_")) || CPP2_UFCS(ssize)(CPP2_UFCS(name)(m))==1, 
+        CPP2_UFCS(require)(m, !(CPP2_UFCS(starts_with)(CPP2_UFCS(name)(m), "_")) || CPP2_UFCS(ssize)(CPP2_UFCS(name)(m)) == 1, 
                     "a type that applies a metafunction cannot have a body that declares a name that starts with '_' - those names are reserved for the metafunction implementation");
     }
 
@@ -1823,67 +2103,67 @@ auto regex_gen(meta::type_declaration& t) -> void
     {
         //  Convert the name and any template arguments to strings
         //  and record that in rtype
-        auto name {CPP2_UFCS(to_string)((*meta))}; 
+        auto name {CPP2_UFCS(to_string)((*cpp2::assert_not_null(meta)))}; 
         name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(find)(name, '<'));
 
         std::vector args {}; 
         for ( 
-             auto const& arg : CPP2_UFCS(template_arguments)((*meta)) ) 
+             auto const& arg : CPP2_UFCS(template_arguments)((*cpp2::assert_not_null(meta))) ) 
             CPP2_UFCS(push_back)(args, CPP2_UFCS(to_string)(arg));
 
         CPP2_UFCS(set_metafunction_name)(rtype, name, args);
 
         //  Dispatch
         //
-        if (name=="interface") {
+        if (name == "interface") {
             interface(rtype);
         }
-        else {if (name=="polymorphic_base") {
+        else {if (name == "polymorphic_base") {
             polymorphic_base(rtype);
         }
-        else {if (name=="ordered") {
+        else {if (name == "ordered") {
             ordered(rtype);
         }
-        else {if (name=="weakly_ordered") {
+        else {if (name == "weakly_ordered") {
             weakly_ordered(rtype);
         }
-        else {if (name=="partially_ordered") {
+        else {if (name == "partially_ordered") {
             partially_ordered(rtype);
         }
-        else {if (name=="copyable") {
+        else {if (name == "copyable") {
             copyable(rtype);
         }
-        else {if (name=="basic_value") {
+        else {if (name == "basic_value") {
             basic_value(rtype);
         }
-        else {if (name=="value") {
+        else {if (name == "value") {
             value(rtype);
         }
-        else {if (name=="weakly_ordered_value") {
+        else {if (name == "weakly_ordered_value") {
             weakly_ordered_value(rtype);
         }
-        else {if (name=="partially_ordered_value") {
+        else {if (name == "partially_ordered_value") {
             partially_ordered_value(rtype);
         }
-        else {if (name=="cpp1_rule_of_zero") {
+        else {if (name == "cpp1_rule_of_zero") {
             cpp1_rule_of_zero(rtype);
         }
-        else {if (name=="struct") {
+        else {if (name == "struct") {
             cpp2_struct(rtype);
         }
-        else {if (name=="enum") {
+        else {if (name == "enum") {
             cpp2_enum(rtype);
         }
-        else {if (name=="flag_enum") {
+        else {if (name == "flag_enum") {
             flag_enum(rtype);
         }
-        else {if (name=="union") {
+        else {if (name == "union") {
             cpp2_union(rtype);
         }
-        else {if (name=="print") {
+        else {if (name == "print") {
             print(rtype);
         }
-        else {if (name=="regex") {
+        else {if (name == "regex") {
             regex_gen(rtype);
         }
         else {
@@ -1897,7 +2177,7 @@ auto regex_gen(meta::type_declaration& t) -> void
             && !(CPP2_UFCS(arguments_were_used)(rtype)))) 
 
         {
-            error(name + " did not use its template arguments - did you mean to write '" + name + " <" + args[0] + "> type' (with the spaces)?");
+            error(name + " did not use its template arguments - did you mean to write '" + name + " <" + CPP2_ASSERT_IN_BOUNDS_LITERAL(args, 0) + "> type' (with the spaces)?");
             return false; 
         }
     }
@@ -1905,6 +2185,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     return true; 
 }
 
+#line 1560 "reflect.h2"
 }
 
 }
diff --git a/source/reflect.h2 b/source/reflect.h2
index fc552ad0ea..8323ab7610 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1390,8 +1390,9 @@ regex_gen: (inout t: meta::type_declaration) =
 {
     has_default: = false;
     prefix:= "regex";
+    postfix: std::string = "_mod";  // TODO: Remove mod syntax when 'm.initializer()' can be '("pat", "mod")'.
 
-    expressions: std::map = ();
+    expressions: std::map> = ();
 
     for t.get_member_objects() do (inout m)
     {
@@ -1417,14 +1418,29 @@ regex_gen: (inout t: meta::type_declaration) =
             }
             expr = expr.substr(1, expr.size() - 2);
 
-            expressions[name] = expr;
+            if name.ends_with(postfix) {
+                name = name.substr(0, name.size() - postfix.size());
+
+                if expressions.contains(name) {
+                    expressions[name].second = expr;
+                }
+                else {
+                    t.error("Expression modifier defined without expression.");
+                }
+
+            }
+            else {
+                expressions[name] = std::make_pair(expr, "");
+            }
+
+
         }
     }
 
     t.remove_marked_members();
 
     for expressions do (expr) {
-        regular_expression:= ::cpp2::regex::generate_template(expr.second, :(message: _) = t$.error(message););
+        regular_expression:= ::cpp2::regex::generate_template(expr.second.first, expr.second.second, :(message: _) = t$.error(message););
 
         t.add_member("(expr.first)$: (regular_expression)$ = ();");
     }
diff --git a/source/regex.h2 b/source/regex.h2
index 571365e4a2..f574702d2f 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -848,6 +848,7 @@ regex_parser_state: @struct type = {
 regex_parser:  type = {
 
     regex: std::string_view;
+    modifier: std::string_view;
     cur_state: regex_parser_state = ();
     pos: size_t = 0;
 
@@ -862,8 +863,9 @@ regex_parser:  type = {
     supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit");
 
-    operator=: (out this, r: std::string_view, e: Error_out) = {
+    operator=: (out this, r: std::string_view, m: std::string_view, e: Error_out) = {
         this.regex = r;
+        this.modifier = m;
         this.error_out = e;
     }
 
@@ -1395,23 +1397,43 @@ regex_parser:  type = {
         }
     }
 
+    parse_modifier: (inout this) -> std::string = {
+        r: std::string = "0";
+        sep: std::string = " | ";
+
+        add := :(name, inout r) = {
+            r += "(sep$)$(name)$";
+        };
+
+        mod_pos := 0;
+        while mod_pos != modifier.size() next mod_pos += 1 {
+            c: char = modifier[mod_pos];
+
+            if c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            else { error("Unknown modifier: '(c)$'"); }
+        }
+
+        return r;
+    }
+
     parse:(inout this) -> std::string = {
         parse_until('\0');
 
         if has_error { return "Error"; }
 
+        mod   := parse_modifier();
         named_groups_arg := create_named_groups_arg();
         inner := create_matcher_from_state();
         start := create_matcher("group_matcher_start_logic", "0, \"\"");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-        return   create_matcher("regular_expression", "0, (next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
+        return   create_matcher("regular_expression", "(mod)$, (next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
     }
 
 }
 
-generate_template:  (regex: std::string_view, err: Err) -> std::string = {
-    parser: regex_parser = (regex, err);
+generate_template:  (regex: std::string_view, modifier: std::string_view, err: Err) -> std::string = {
+    parser: regex_parser = (regex, modifier, err);
     r := parser.parse();
     _ = parser;
     return r;

From b5cd31ee283d7f0f324a6c6fd0298fede8301ca3 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 19 Feb 2024 12:41:45 +0100
Subject: [PATCH 054/161] Fixing bugs in implementation.

---
 source/regex.h2 | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index f574702d2f..750a92f46f 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -388,7 +388,7 @@ class_matcher_logic:  type =
 {
     match:  (cur, inout ctx, _ : Other) -> _ = {
         if ctx.has_flag(expression_flags::case_insensitive) {
-            if cur != ctx.end && (negate != match_any(safe_tolower(cur*)) || negate != match_any(safe_toupper(cur*))) {
+            if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
                 return Other::match(cur + 1, ctx);
             }
             else {
@@ -399,6 +399,9 @@ class_matcher_logic:  type =
             if cur != ctx.end && negate != match_any(cur*) {
                 return Other::match(cur + 1, ctx);
             }
+            else {
+                return match_return(false, ctx.end);
+            }
         }
     }
 
@@ -428,6 +431,14 @@ class_matcher_logic:  type =
     }
 }
 
+// Regex syntax: none Example: -
+//
+empty_matcher_logic:  type = {
+    match:  (cur, inout ctx, _ : Other) Other::match(cur, ctx);
+    reset_ranges: (inout ctx) = {}
+    to_string: () bstring();
+}
+
 // Regex syntax: \  Example: \.
 //
 escaped_char_matcher_logic:  type =
@@ -492,20 +503,27 @@ group_ref_matcher_logic:  type = {
         g := ctx.get_group(group);
 
         pos := cur;
-        while g.start != g.end && pos != ctx.end next (g.start++, pos++) {
+        group_pos := g.start;
+        while group_pos != g.end && pos != ctx.end next (group_pos++, pos++) {
             if ctx.has_flag(expression_flags::case_insensitive) {
-                if safe_tolower(g.start*) != safe_tolower(pos*) {
+                if safe_tolower(group_pos*) != safe_tolower(pos*) {
                     return match_return(false, ctx.end);
                 }
             }
             else {
-                if g.start* != pos* {
+                if group_pos* != pos* {
                     return match_return(false, ctx.end);
                 }
             }
         }
 
-        return Other::match(pos, ctx);
+        if group_pos == g.end {
+            return Other::match(pos, ctx);
+        }
+        else {
+            return match_return(false, ctx.end);
+        }
+
     }
     reset_ranges: (inout ctx) = {}
     to_string: ()               bstring(symbol.data());
@@ -950,9 +968,10 @@ regex_parser:  type = {
     create_matcher_from_state: (inout this) -> std::string = {
         if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); }
 
-        if 0 != cur_state.cur_match_list.size() {
-            cur_state.next_alternative();
+        if 0 == cur_state.cur_match_list.size() {
+            cur_state.add(create_matcher("empty_matcher_logic", ""));
         }
+        cur_state.next_alternative();
 
         list: std::string = "";
         separator: std::string = "";
@@ -1174,7 +1193,8 @@ regex_parser:  type = {
         c_next: char = regex[pos];
 
         if '1' <= c_next <= '9' {
-            if !add_group_matcher(std::string(1, c_next)) { return false; }
+            group := grab_number();
+            if !add_group_matcher(group) { return false; }
         }
         else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {

From 3c132762639cea59b219fb89dc3621226e8d531a Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 19 Feb 2024 14:36:30 +0100
Subject: [PATCH 055/161] Non-greedy and possessive matching.

---
 include/cpp2regex.h | 532 ++++++++++++++++++++++++++++----------------
 source/regex.h2     | 123 +++++++++-
 2 files changed, 454 insertions(+), 201 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index ec83008015..228738ee93 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -76,62 +76,66 @@ template class char_matcher_logic;
 #line 387 "regex.h2"
 template class class_matcher_logic;
 
-#line 433 "regex.h2"
+#line 436 "regex.h2"
+template class empty_matcher_logic;
+    
+
+#line 444 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 442 "regex.h2"
+#line 453 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 466 "regex.h2"
+#line 477 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 490 "regex.h2"
+#line 501 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 518 "regex.h2"
+#line 536 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 540 "regex.h2"
+#line 558 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 558 "regex.h2"
+#line 576 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 562 "regex.h2"
+#line 580 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 584 "regex.h2"
-template class range_matcher_logic;
+#line 602 "regex.h2"
+template class range_matcher_logic;
 
-#line 656 "regex.h2"
-template class special_range_matcher_logic;
+#line 734 "regex.h2"
+template class special_range_matcher_logic;
     
 
-#line 665 "regex.h2"
+#line 753 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 716 "regex.h2"
+#line 804 "regex.h2"
 template class group_name_list;
 
-#line 728 "regex.h2"
+#line 816 "regex.h2"
 class group_name_list_end;
     
 
-#line 733 "regex.h2"
+#line 821 "regex.h2"
 template class regular_expression;
 
-#line 816 "regex.h2"
+#line 904 "regex.h2"
 class regex_parser_state;
 
-#line 848 "regex.h2"
+#line 936 "regex.h2"
 template class regex_parser;
 
-#line 1442 "regex.h2"
+#line 1563 "regex.h2"
 }
 }
 
@@ -487,10 +491,10 @@ template class class_matcher_logi
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 405 "regex.h2"
+#line 408 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 417 "regex.h2"
+#line 420 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -499,7 +503,20 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 429 "regex.h2"
+#line 432 "regex.h2"
+};
+
+// Regex syntax: none Example: -
+//
+template class empty_matcher_logic {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: empty_matcher_logic() = default;
+    public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(empty_matcher_logic const&) -> void = delete;
+
+#line 440 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -507,13 +524,13 @@ template class class_matcher_logi
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 437 "regex.h2"
+#line 448 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 438 "regex.h2"
+#line 449 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -521,7 +538,7 @@ template class escaped_char_matcher_l
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 449 "regex.h2"
+#line 460 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -530,13 +547,13 @@ template class group_matcher_start
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 464 "regex.h2"
+#line 475 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 476 "regex.h2"
+#line 487 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -545,7 +562,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 486 "regex.h2"
+#line 497 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -553,14 +570,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 510 "regex.h2"
+#line 528 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 512 "regex.h2"
+#line 530 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -571,14 +588,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 532 "regex.h2"
+#line 550 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 534 "regex.h2"
+#line 552 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -589,14 +606,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 551 "regex.h2"
+#line 569 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 553 "regex.h2"
+#line 571 "regex.h2"
 };
 
 // Named character classes
@@ -609,7 +626,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 561 "regex.h2"
+#line 579 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -617,7 +634,7 @@ template                    void = delete;
 
 
-#line 564 "regex.h2"
+#line 582 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -625,7 +642,7 @@ template using named_class_white_space = named_class_matcher_log
 template using named_class_word = named_class_matcher_logic>;
 template using named_class_digits = named_class_matcher_logic>;
 
-#line 572 "regex.h2"
+#line 590 "regex.h2"
 template using named_class_not_white_space = named_class_matcher_logic>;
 template using named_class_not_word = named_class_matcher_logic>;
 template using named_class_not_digits = named_class_matcher_logic>;
@@ -635,44 +652,53 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 583 "regex.h2"
+#line 601 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
-template class range_matcher_logic {
+template class range_matcher_logic {
 
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& tail) -> auto;
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& tail) -> auto;
+
+#line 620 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 608 "regex.h2"
+#line 648 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 613 "regex.h2"
+#line 653 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 618 "regex.h2"
+#line 658 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 624 "regex.h2"
+#line 664 "regex.h2"
+    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, cpp2::out count_r) -> auto;
+
+#line 679 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
+
+#line 710 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(cpp2::in c, Iter const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 652 "regex.h2"
+#line 730 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
-template class special_range_matcher_logic: public range_matcher_logic {
+template class special_range_matcher_logic: public range_matcher_logic {
 
     public: [[nodiscard]] static auto to_string() -> auto;
     public: special_range_matcher_logic() = default;
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
-#line 659 "regex.h2"
+
+#line 747 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -683,7 +709,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 696 "regex.h2"
+#line 784 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -691,10 +717,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 704 "regex.h2"
+#line 792 "regex.h2"
 };
 
-#line 707 "regex.h2"
+#line 795 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -712,7 +738,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 726 "regex.h2"
+#line 814 "regex.h2"
 };
 
 class group_name_list_end {
@@ -721,7 +747,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 730 "regex.h2"
+#line 818 "regex.h2"
 };
 
 // Regular expression implementation
@@ -731,7 +757,7 @@ template> str, auto const& pos) -> auto;
 
-#line 746 "regex.h2"
+#line 834 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -739,7 +765,7 @@ template matched_, context const& ctx_);
 
-#line 756 "regex.h2"
+#line 844 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -754,7 +780,7 @@ template void = delete;
 
 
-#line 772 "regex.h2"
+#line 860 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -762,19 +788,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 784 "regex.h2"
+#line 872 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 806 "regex.h2"
+#line 894 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 807 "regex.h2"
+#line 895 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -794,19 +820,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 830 "regex.h2"
+#line 918 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 835 "regex.h2"
+#line 923 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 844 "regex.h2"
+#line 932 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 848 "regex.h2"
+#line 936 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -827,93 +853,96 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 872 "regex.h2"
+#line 960 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 880 "regex.h2"
+#line 968 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 884 "regex.h2"
+#line 972 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 899 "regex.h2"
+#line 987 "regex.h2"
+    public: [[nodiscard]] auto peek() & -> char;
+
+#line 996 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 914 "regex.h2"
+#line 1011 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 934 "regex.h2"
+#line 1031 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 941 "regex.h2"
+#line 1038 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 948 "regex.h2"
+#line 1045 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 970 "regex.h2"
+#line 1068 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 980 "regex.h2"
+#line 1078 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 992 "regex.h2"
+#line 1090 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1002 "regex.h2"
+#line 1100 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1015 "regex.h2"
+#line 1113 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1023 "regex.h2"
+#line 1121 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1139 "regex.h2"
+#line 1237 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1238 "regex.h2"
+#line 1337 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1279 "regex.h2"
+#line 1378 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1288 "regex.h2"
+#line 1387 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1351 "regex.h2"
+#line 1461 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1377 "regex.h2"
+#line 1498 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1400 "regex.h2"
+#line 1521 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1419 "regex.h2"
+#line 1540 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1433 "regex.h2"
+#line 1554 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1442 "regex.h2"
+#line 1563 "regex.h2"
 }
 }
 
@@ -1221,7 +1250,7 @@ namespace regex {
 #line 389 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
-            if (cur != ctx.end && (negate != match_any(safe_tolower(*cpp2::assert_not_null(cur))) || negate != match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
+            if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
                 return Other::match(cur + 1, ctx); 
             }
             else {
@@ -1232,10 +1261,13 @@ namespace regex {
             if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
                 return Other::match(cur + 1, ctx); 
             }
+            else {
+                return match_return(false, ctx.end); 
+            }
         }
     }
 
-#line 405 "regex.h2"
+#line 408 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1248,10 +1280,10 @@ namespace regex {
         return r; 
     }
 
-#line 417 "regex.h2"
+#line 420 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 419 "regex.h2"
+#line 422 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1264,19 +1296,26 @@ namespace regex {
     }
 
 #line 437 "regex.h2"
+    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto { return Other::match(cur, ctx);  }
+#line 438 "regex.h2"
+    template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 439 "regex.h2"
+    template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
+
+#line 448 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 443 "regex.h2"
+#line 454 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_start)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
         return r; 
     }
 
-#line 449 "regex.h2"
+#line 460 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 451 "regex.h2"
+#line 462 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1291,7 +1330,7 @@ namespace regex {
         }
     }
 
-#line 467 "regex.h2"
+#line 478 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_end)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
@@ -1301,10 +1340,10 @@ namespace regex {
         return r; 
     }
 
-#line 476 "regex.h2"
+#line 487 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 478 "regex.h2"
+#line 489 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1314,32 +1353,39 @@ namespace regex {
         }
     }
 
-#line 491 "regex.h2"
+#line 502 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
         auto pos {cur}; 
-        for( ; g.start != g.end && pos != ctx.end; (++g.start, ++pos) ) {
+        auto group_pos {g.start}; 
+        for( ; group_pos != g.end && pos != ctx.end; (++group_pos, ++pos) ) {
             if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
-                if (safe_tolower(*cpp2::assert_not_null(g.start)) != safe_tolower(*cpp2::assert_not_null(pos))) {
+                if (safe_tolower(*cpp2::assert_not_null(group_pos)) != safe_tolower(*cpp2::assert_not_null(pos))) {
                     return match_return(false, ctx.end); 
                 }
             }
             else {
-                if (*cpp2::assert_not_null(g.start) != *cpp2::assert_not_null(pos)) {
+                if (*cpp2::assert_not_null(group_pos) != *cpp2::assert_not_null(pos)) {
                     return match_return(false, ctx.end); 
                 }
             }
         }
 
-        return Other::match(std::move(pos), ctx); 
+        if (std::move(group_pos) == std::move(g).end) {
+            return Other::match(std::move(pos), ctx); 
+        }
+        else {
+            return match_return(false, ctx.end); 
+        }
+
     }
-#line 510 "regex.h2"
+#line 528 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 511 "regex.h2"
+#line 529 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 520 "regex.h2"
+#line 538 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx); 
@@ -1352,12 +1398,12 @@ namespace regex {
         }}
     }
 
-#line 532 "regex.h2"
+#line 550 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 533 "regex.h2"
+#line 551 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 542 "regex.h2"
+#line 560 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx); 
@@ -1367,21 +1413,36 @@ namespace regex {
         }
 
     }
-#line 551 "regex.h2"
+#line 569 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 552 "regex.h2"
+#line 570 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 560 "regex.h2"
+#line 578 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 586 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::match(auto const& cur, auto& ctx, auto const& tail) -> auto { return match_greedy(0, cur, cur, ctx, tail); }
-#line 587 "regex.h2"
-    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
+#line 604 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& tail) -> auto{
+        cpp2::deferred_init count; 
+        auto r {match_min_count(cur, ctx, cpp2::out(&count))}; 
+        if (r.matched) {
+            if (greedy) {
+                return match_greedy(std::move(count.value()), r.pos, r.pos, ctx, tail); 
+            }
+            else {
+                return match_not_greedy(std::move(count.value()), std::move(r).pos, ctx, tail); 
+            }
+        }
+        else {
+            return r; 
+        }
+    }
+
+#line 620 "regex.h2"
+    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 589 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
+#line 622 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
       if (min_count == max_count) {
@@ -1397,37 +1458,62 @@ namespace regex {
         r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}");
       }}}
 
+      if (!(greedy)) {
+        r += "?";
+      }
+      else {if (possessive) {
+        r += "+";
+      }}
+
       return r; 
     }
 
-#line 608 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
+#line 648 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 613 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
+#line 653 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 618 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
+#line 658 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 624 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
+#line 664 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, cpp2::out count_r) -> auto{
+        auto res {match_return(true, cur)}; 
+        auto count {0}; 
+
+        while( is_below_lower_bound(count) && res.matched ) {
+            res = M::match(res.pos, ctx, no_tail());
+            if (res.matched) {
+                count += 1;
+            }
+        }
+
+        count_r.construct(std::move(count));
+        return res; 
+    }
+
+#line 679 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
+
         auto r {M::match(cur, ctx, no_tail())}; 
-        if ( is_below_upper_bound(count) && r.matched && 
-            (is_below_lower_bound(count) || r.pos != cur)) 
+
+        if (is_below_upper_bound(count) && r.matched && r.pos != cur) 
         {
             auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, Other())}; 
 
-            if (inner.matched) {
+            if (possessive || // Do not backtrack if possessive.
+               inner.matched) {
                 return inner; 
             }
         }
@@ -1449,10 +1535,42 @@ namespace regex {
         }
     }
 
-#line 658 "regex.h2"
-    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto { return M::to_string() + symbol;  }
+#line 710 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(cpp2::in c, Iter const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
+        auto count {c}; 
+        auto pos {cur}; 
+
+        while( is_below_upper_bound(count) ) {
+            auto o {Other::match(pos, ctx)}; 
+            if (o.matched) {
+                return o; 
+            }
+
+            auto r {M::match(pos, ctx, no_tail())}; 
+            if (!(r.matched)) {
+                return match_return(false, ctx.end); 
+            }
+            count += 1;
+            pos = r.pos;
+        }
+
+        return Other::match(std::move(pos), ctx); // Upper bound reached.
+    }
+
+#line 736 "regex.h2"
+    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
+        auto r {M::to_string() + symbol}; 
+        if (!(greedy)) {
+            r += "?";
+        }
+        else {if (possessive) {
+            r += "+";
+        }}
+
+        return r; 
+    }
 
-#line 667 "regex.h2"
+#line 755 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1482,9 +1600,9 @@ namespace regex {
         }
 
     }
-#line 696 "regex.h2"
+#line 784 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 697 "regex.h2"
+#line 785 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1493,7 +1611,7 @@ namespace regex {
         }
     }
 
-#line 718 "regex.h2"
+#line 806 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1503,10 +1621,10 @@ namespace regex {
         }
     }
 
-#line 729 "regex.h2"
+#line 817 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 737 "regex.h2"
+#line 825 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1516,31 +1634,31 @@ namespace regex {
         }
     }
 
-#line 751 "regex.h2"
+#line 839 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 754 "regex.h2"
+#line 842 "regex.h2"
         }
 
-#line 756 "regex.h2"
+#line 844 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 757 "regex.h2"
+#line 845 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 758 "regex.h2"
+#line 846 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 759 "regex.h2"
+#line 847 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 761 "regex.h2"
+#line 849 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 762 "regex.h2"
+#line 850 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 763 "regex.h2"
+#line 851 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 765 "regex.h2"
+#line 853 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1549,13 +1667,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 774 "regex.h2"
+#line 862 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 775 "regex.h2"
+#line 863 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 776 "regex.h2"
+#line 864 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 777 "regex.h2"
+#line 865 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1563,13 +1681,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 784 "regex.h2"
+#line 872 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 785 "regex.h2"
+#line 873 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 786 "regex.h2"
+#line 874 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 787 "regex.h2"
+#line 875 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1589,26 +1707,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 806 "regex.h2"
+#line 894 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 824 "regex.h2"
+#line 912 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 830 "regex.h2"
+#line 918 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 835 "regex.h2"
+#line 923 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 837 "regex.h2"
+#line 925 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1616,31 +1734,31 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 844 "regex.h2"
+#line 932 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 866 "regex.h2"
+#line 954 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 870 "regex.h2"
+#line 958 "regex.h2"
     }
 
-#line 874 "regex.h2"
+#line 962 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 880 "regex.h2"
+#line 968 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 887 "regex.h2"
+#line 975 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1653,7 +1771,17 @@ namespace regex {
         }
     }
 
-#line 899 "regex.h2"
+#line 987 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::peek() & -> char{
+        if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
+            return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
+        }
+        else {
+            return '\0'; 
+        }
+    }
+
+#line 996 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find)(regex, e, pos)}; 
@@ -1669,7 +1797,7 @@ namespace regex {
         }
     }
 
-#line 914 "regex.h2"
+#line 1011 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -1690,13 +1818,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 936 "regex.h2"
+#line 1033 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 941 "regex.h2"
+#line 1038 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1704,16 +1832,17 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 948 "regex.h2"
+#line 1045 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 950 "regex.h2"
+#line 1047 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
-        if (0 != CPP2_UFCS(size)(cur_state.cur_match_list)) {
-            CPP2_UFCS(next_alternative)(cur_state);
+        if (0 == CPP2_UFCS(size)(cur_state.cur_match_list)) {
+            CPP2_UFCS(add)(cur_state, create_matcher("empty_matcher_logic", ""));
         }
+        CPP2_UFCS(next_alternative)(cur_state);
 
         std::string list {""}; 
         std::string separator {""}; 
@@ -1728,7 +1857,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 970 "regex.h2"
+#line 1068 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -1739,7 +1868,7 @@ namespace regex {
         return r; 
     }
 
-#line 980 "regex.h2"
+#line 1078 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1752,7 +1881,7 @@ namespace regex {
         return r; 
     }
 
-#line 995 "regex.h2"
+#line 1093 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1760,7 +1889,7 @@ namespace regex {
         return true; 
     }
 
-#line 1002 "regex.h2"
+#line 1100 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -1774,7 +1903,7 @@ namespace regex {
         return false; 
     }
 
-#line 1015 "regex.h2"
+#line 1113 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1783,7 +1912,7 @@ namespace regex {
         return false; 
     }
 
-#line 1023 "regex.h2"
+#line 1121 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -1900,7 +2029,7 @@ namespace regex {
         return true; 
     }
 
-#line 1139 "regex.h2"
+#line 1237 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -1939,7 +2068,8 @@ namespace regex {
         char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
 
         if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
-            if (!(add_group_matcher(std::string(1, c_next)))) {return false; }
+            auto group {grab_number()}; 
+            if (!(add_group_matcher(std::move(group)))) {return false; }
         }
         else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
             if (c_next == '$') {
@@ -2000,7 +2130,7 @@ namespace regex {
         return true; 
     }
 
-#line 1238 "regex.h2"
+#line 1337 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -2042,7 +2172,7 @@ namespace regex {
         return true; 
     }
 
-#line 1279 "regex.h2"
+#line 1378 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2052,7 +2182,7 @@ namespace regex {
         return false; 
     }
 
-#line 1288 "regex.h2"
+#line 1387 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2074,6 +2204,17 @@ namespace regex {
         std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; 
         if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
+        auto greedy {true}; 
+        auto possessive {false}; 
+        if (peek() == '?') {
+            greedy = false;
+            pos += 1;
+        }
+        else {if (peek() == '+') {
+            possessive = true;
+            pos += 1;
+        }}
+
         std::string min_count {"-1"}; 
         int min_count_number {0}; 
         std::string max_count {"-1"}; 
@@ -2110,13 +2251,13 @@ namespace regex {
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2)));  });
+        CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive))));  });
         pos = std::move(end);
 
         return true; 
     }
 
-#line 1351 "regex.h2"
+#line 1461 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2134,16 +2275,27 @@ namespace regex {
             return false; 
         }}}
 
+        auto greedy {true}; 
+        auto possessive {false}; 
+        if (peek() == '?') {
+            greedy = false;
+            pos += 1;
+        }
+        else {if (peek() == '+') {
+            possessive = true;
+            pos += 1;
+        }}
+
         if (CPP2_UFCS(empty)(cur_state)) {
             error(("'" + cpp2::to_string(c) + "' without previous element."));
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", '" + cpp2::to_string(_3) + "'"));  });
+        CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive)) + ", '" + cpp2::to_string(_3) + "'"));  });
         return true; 
     }
 
-#line 1377 "regex.h2"
+#line 1498 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2167,7 +2319,7 @@ namespace regex {
         }
     }
 
-#line 1400 "regex.h2"
+#line 1521 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2187,7 +2339,7 @@ namespace regex {
         return r; 
     }
 
-#line 1419 "regex.h2"
+#line 1540 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -2202,7 +2354,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1435 "regex.h2"
+#line 1556 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 750a92f46f..7987b2e830 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -599,9 +599,24 @@ named_string_start:  type == named_matcher_logic{min, max}  Example: a{2,4}
-range_matcher_logic:  type = {
+range_matcher_logic:  type = {
+
+    match:  (cur: Iter, inout ctx, tail) -> _ = {
+        count: int;
+        r := match_min_count(cur, ctx, out count);
+        if r.matched {
+            if greedy {
+                return match_greedy(count, r.pos, r.pos, ctx, tail);
+            }
+            else {
+                return match_not_greedy(count, r.pos, ctx, tail);
+            }
+        }
+        else {
+            return r;
+        }
+    }
 
-    match: (cur, inout ctx, tail)   match_greedy(0, cur, cur, ctx, tail);
     reset_ranges: (inout ctx)     = M::reset_ranges(ctx);
 
     to_string: () -> bstring = {
@@ -620,6 +635,13 @@ range_matcher_logic:  type = {
         r += "{(min_count)$,(max_count)$}";
       }
 
+      if !greedy {
+        r += "?";
+      }
+      else if possessive {
+        r += "+";
+      }
+
       return r;
     }
 
@@ -639,14 +661,31 @@ range_matcher_logic:  type = {
         return true;
     }
 
+    private match_min_count:  (cur: Iter, inout ctx, out count_r: int) -> _ = {
+        res := match_return(true, cur);
+        count := 0;
+
+        while is_below_lower_bound(count) && res.matched {
+            res = M::match(res.pos, ctx, no_tail());
+            if res.matched {
+                count += 1;
+            }
+        }
+
+        count_r = count;
+        return res;
+    }
+
     private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, _ : Other) -> match_return = {
-        r:= M::match(cur, ctx, no_tail());
-        if  is_below_upper_bound(count) && r.matched &&
-            (is_below_lower_bound(count) || r.pos != cur)
+
+        r := M::match(cur, ctx, no_tail());
+
+        if is_below_upper_bound(count) && r.matched && r.pos != cur
         {
             inner := match_greedy(count + 1, r.pos, cur, ctx, Other());
 
-            if inner.matched {
+            if possessive ||  // Do not backtrack if possessive.
+               inner.matched {
                 return inner;
             }
         }
@@ -667,13 +706,44 @@ range_matcher_logic:  type = {
             return match_return(false, ctx.end);
         }
     }
+
+    private match_not_greedy:  (c: int, cur: Iter, inout ctx, _ : Other) -> match_return = {
+        count := c;
+        pos := cur;
+
+        while is_below_upper_bound(count) {
+            o:= Other::match(pos, ctx);
+            if o.matched {
+                return o;
+            }
+
+            r:= M::match(pos, ctx, no_tail());
+            if !r.matched {
+                return match_return(false, ctx.end);
+            }
+            count += 1;
+            pos = r.pos;
+        }
+
+        return Other::match(pos, ctx); // Upper bound reached.
+    }
 }
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
-special_range_matcher_logic:  type = {
-    this: range_matcher_logic = ();
-    to_string: () M::to_string() + symbol;
+special_range_matcher_logic:  type = {
+    this: range_matcher_logic = ();
+    to_string: () -> _ = {
+        r := M::to_string() + symbol;
+        if !greedy {
+            r += "?";
+        }
+        else if possessive {
+            r += "+";
+        }
+
+        return r;
+    }
 }
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -914,6 +984,15 @@ regex_parser:  type = {
         }
     }
 
+    peek: (inout this) -> char = {
+        if (pos + 1) < regex.size() {
+            return regex[pos + 1];
+        }
+        else {
+            return '\0';
+        }
+    }
+
     grab_until: (inout this, in e: char, out r: std::string) -> bool = {
         start := pos;
         end: = regex.find(e, pos);
@@ -1326,6 +1405,17 @@ regex_parser:  type = {
         inner: std::string = trim_copy(regex.substr(pos + 1, end - pos - 1));
         if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
+        greedy := true;
+        possessive := false;
+        if peek() == '?' {
+            greedy = false;
+            pos += 1;
+        }
+        else if peek() == '+' {
+            possessive = true;
+            pos += 1;
+        }
+
         min_count: std::string = "-1";
         min_count_number: int  = 0;
         max_count: std::string = "-1";
@@ -1362,7 +1452,7 @@ regex_parser:  type = {
             return false;
         }
 
-        cur_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$"));
+        cur_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$, (greedy)$, (possessive)$"));
         pos = end;
 
         return true;
@@ -1385,12 +1475,23 @@ regex_parser:  type = {
             return false;
         }
 
+        greedy := true;
+        possessive := false;
+        if peek() == '?' {
+            greedy = false;
+            pos += 1;
+        }
+        else if peek() == '+' {
+            possessive = true;
+            pos += 1;
+        }
+
         if cur_state.empty() {
             error("'(c)$' without previous element.");
             return false;
         }
 
-        cur_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, '(c$)$'"));
+        cur_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, (greedy)$, (possessive)$, '(c$)$'"));
         return true;
     }
 

From f45e7ed2e8179e72a229df3c77b9189dc60e389a Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 19 Feb 2024 15:39:58 +0100
Subject: [PATCH 056/161] Added horizontal and vertical white spaces.

---
 source/regex.h2 | 85 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 52 insertions(+), 33 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 7987b2e830..6a780d2046 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -207,27 +207,34 @@ upper_class   :  type == named_class_entry type == named_class_entry, upper_class, digits_class>>;
-alpha_class   :  type == named_class_entry, upper_class>>;
-ascii_class   :  type == named_class_entry>;
-blank_class   :  type == named_class_entry>;
-cntrl_class   :  type == named_class_entry, single_class_entry>>;
-graph_class   :  type == named_class_entry>;
-print_class   :  type == named_class_entry>;
-punct_class   :  type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>;
-space_class   :  type == named_class_entry>;
-word_class    :  type == named_class_entry, single_class_entry>>;
-xdigit_class  :  type == named_class_entry, range_class_entry, digits_class>>;
+alnum_class     :  type == named_class_entry, upper_class, digits_class>>;
+alpha_class     :  type == named_class_entry, upper_class>>;
+ascii_class     :  type == named_class_entry>;
+blank_class     :  type == named_class_entry>;
+cntrl_class     :  type == named_class_entry, single_class_entry>>;
+graph_class     :  type == named_class_entry>;
+hor_space_class :  type == named_class_entry>;
+print_class     :  type == named_class_entry>;
+punct_class     :  type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>;
+space_class     :  type == named_class_entry>;
+ver_space_class :  type == named_class_entry>;
+word_class      :  type == named_class_entry, single_class_entry>>;
+xdigit_class    :  type == named_class_entry, range_class_entry, digits_class>>;
 
 // Shorthand class entries
 //
-short_digits_class :  type == shorthand_class_entry>;
-short_word_class :    type == shorthand_class_entry>;
-short_space_class :   type == shorthand_class_entry>;
+short_digits_class     :  type == shorthand_class_entry>;
+short_hor_space_class  :  type == shorthand_class_entry>;
+short_space_class      :  type == shorthand_class_entry>;
+short_vert_space_class :  type == shorthand_class_entry>;
+short_word_class       :  type == shorthand_class_entry>;
 
-short_not_digits_class :  type == negated_class_entry>>;
-short_not_word_class :    type == negated_class_entry>>;
-short_not_space_class :   type == negated_class_entry>>;
+
+short_not_digits_class     :  type == negated_class_entry>>;
+short_not_hor_space_class  :  type == negated_class_entry>>;
+short_not_space_class      :  type == negated_class_entry>>;
+short_not_vert_space_class :  type == negated_class_entry>>;
+short_not_word_class       :  type == negated_class_entry>>;
 
 //-----------------------------------------------------------------------
 //
@@ -582,14 +589,18 @@ named_class_matcher_logic:  t
 }
 
 named_class_no_new_line:  type == named_class_matcher_logic>; // TODO: Remove second \, switch to raw strings.
-named_class_white_space:  type == named_class_matcher_logic>;
-named_class_word:  type == named_class_matcher_logic>;
-named_class_digits:  type == named_class_matcher_logic>;
+named_class_digits     :  type == named_class_matcher_logic>;
+named_class_hor_space  :  type == named_class_matcher_logic>;
+named_class_space      :  type == named_class_matcher_logic>;
+named_class_ver_space  :  type == named_class_matcher_logic>;
+named_class_word       :  type == named_class_matcher_logic>;
 
 
-named_class_not_white_space:  type == named_class_matcher_logic>;
-named_class_not_word:  type == named_class_matcher_logic>;
-named_class_not_digits:  type == named_class_matcher_logic>;
+named_class_not_digits    :  type == named_class_matcher_logic>;
+named_class_not_hor_space :  type == named_class_matcher_logic>;
+named_class_not_space     :  type == named_class_matcher_logic>;
+named_class_not_ver_space :  type == named_class_matcher_logic>;
+named_class_not_word      :  type == named_class_matcher_logic>;
 
 // Other named matchers
 named_string_end_or_before_new_line_at_end:  type == named_matcher_logic>;
@@ -1168,12 +1179,16 @@ regex_parser:  type = {
             else if c_cur == '\\' {
                 if next_item()  && (c_cur != ']') {
                     name := "";
-                    if      's' == c_cur { name = "short_space"; }
+                         if 'd' == c_cur { name = "short_digits"; }
+                    else if 'D' == c_cur { name = "short_not_digits"; }
+                    else if 'h' == c_cur { name = "short_hor_space"; }
+                    else if 'H' == c_cur { name = "short_not_hor_space"; }
+                    else if 's' == c_cur { name = "short_space"; }
                     else if 'S' == c_cur { name = "short_not_space"; }
+                    else if 'v' == c_cur { name = "short_ver_space"; }
+                    else if 'V' == c_cur { name = "short_not_ver_space"; }
                     else if 'w' == c_cur { name = "short_word"; }
                     else if 'W' == c_cur { name = "short_not_word"; }
-                    else if 'd' == c_cur { name = "short_digits"; }
-                    else if 'D' == c_cur { name = "short_not_digits"; }
                     else {
                         error("Unknown group escape.");
                         return false;
@@ -1314,18 +1329,22 @@ regex_parser:  type = {
             if !(next(out c_next) && grab_until(term_char, out group)) { error("No ending bracket."); return false; }
             if !add_group_matcher(group) { return false; }
         }
+        else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
+        else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
+        else if 'B' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "true")); }
+        else if 'd' == c_next { cur_state.add(create_matcher("named_class_digits", "")); }
+        else if 'D' == c_next { cur_state.add(create_matcher("named_class_not_digits", "")); }
+        else if 'h' == c_next { cur_state.add(create_matcher("named_class_hor_space", "")); }
+        else if 'H' == c_next { cur_state.add(create_matcher("named_class_not_hor_space", "")); }
         else if 'N' == c_next { cur_state.add(create_matcher("named_class_no_new_line", "")); }
-        else if 's' == c_next { cur_state.add(create_matcher("named_class_white_space", "")); }
-        else if 'S' == c_next { cur_state.add(create_matcher("named_class_not_white_space", "")); }
+        else if 's' == c_next { cur_state.add(create_matcher("named_class_space", "")); }
+        else if 'S' == c_next { cur_state.add(create_matcher("named_class_not_space", "")); }
+        else if 'v' == c_next { cur_state.add(create_matcher("named_class_ver_space", "")); }
+        else if 'V' == c_next { cur_state.add(create_matcher("named_class_not_ver_space", "")); }
         else if 'w' == c_next { cur_state.add(create_matcher("named_class_word", "")); }
         else if 'W' == c_next { cur_state.add(create_matcher("named_class_not_word", "")); }
-        else if 'd' == c_next { cur_state.add(create_matcher("named_class_digits", "")); }
-        else if 'D' == c_next { cur_state.add(create_matcher("named_class_not_digits", "")); }
         else if 'Z' == c_next { cur_state.add(create_matcher("named_string_end_or_before_new_line_at_end", "")); }
         else if 'z' == c_next { cur_state.add(create_matcher("named_string_end", "")); }
-        else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
-        else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
-        else if 'B' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "true")); }
         else {
             error("Unknown escape.");
             return false;

From e8d745d0268177f561232a8a9948f7cea7e6a4b2 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 20 Feb 2024 15:01:10 +0100
Subject: [PATCH 057/161] Additional handling of excapes.

---
 include/cpp2regex.h | 555 ++++++++++++++++++++++++--------------------
 source/regex.h2     |  22 +-
 2 files changed, 325 insertions(+), 252 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 228738ee93..2da37f624a 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -60,82 +60,86 @@ template class negated_class_entry;
 template class shorthand_class_entry;
     
 
-#line 242 "regex.h2"
+#line 249 "regex.h2"
 template class extract_position_helper;
     
 
-#line 259 "regex.h2"
+#line 266 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 343 "regex.h2"
+#line 350 "regex.h2"
 template class any_matcher_logic;
 
-#line 359 "regex.h2"
+#line 366 "regex.h2"
 template class char_matcher_logic;
 
-#line 387 "regex.h2"
+#line 394 "regex.h2"
 template class class_matcher_logic;
 
-#line 436 "regex.h2"
+#line 443 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 444 "regex.h2"
+#line 451 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 453 "regex.h2"
+#line 460 "regex.h2"
+template class global_group_reset;
+    
+
+#line 472 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 477 "regex.h2"
+#line 495 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 501 "regex.h2"
+#line 519 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 536 "regex.h2"
+#line 554 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 558 "regex.h2"
+#line 576 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 576 "regex.h2"
+#line 594 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 580 "regex.h2"
+#line 598 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 602 "regex.h2"
+#line 624 "regex.h2"
 template class range_matcher_logic;
 
-#line 734 "regex.h2"
+#line 756 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 753 "regex.h2"
+#line 775 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 804 "regex.h2"
+#line 826 "regex.h2"
 template class group_name_list;
 
-#line 816 "regex.h2"
+#line 838 "regex.h2"
 class group_name_list_end;
     
 
-#line 821 "regex.h2"
+#line 843 "regex.h2"
 template class regular_expression;
 
-#line 904 "regex.h2"
+#line 926 "regex.h2"
 class regex_parser_state;
 
-#line 936 "regex.h2"
+#line 958 "regex.h2"
 template class regex_parser;
 
-#line 1563 "regex.h2"
+#line 1600 "regex.h2"
 }
 }
 
@@ -383,27 +387,34 @@ template         using upper_class = named_class_entry using alnum_class = named_class_entry,upper_class,digits_class>>;
-template         using alpha_class = named_class_entry,upper_class>>;
-template         using ascii_class = named_class_entry>;
-template         using blank_class = named_class_entry>;
-template         using cntrl_class = named_class_entry,single_class_entry>>;
-template         using graph_class = named_class_entry>;
-template         using print_class = named_class_entry>;
-template         using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>;
-template         using space_class = named_class_entry>;
-template         using word_class = named_class_entry,single_class_entry>>;
-template         using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
+template           using alnum_class = named_class_entry,upper_class,digits_class>>;
+template           using alpha_class = named_class_entry,upper_class>>;
+template           using ascii_class = named_class_entry>;
+template           using blank_class = named_class_entry>;
+template           using cntrl_class = named_class_entry,single_class_entry>>;
+template           using graph_class = named_class_entry>;
+template using hor_space_class = named_class_entry>;
+template           using print_class = named_class_entry>;
+template           using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>;
+template           using space_class = named_class_entry>;
+template using ver_space_class = named_class_entry>;
+template           using word_class = named_class_entry,single_class_entry>>;
+template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
 // Shorthand class entries
 //
-template using short_digits_class = shorthand_class_entry>;
-template              using short_word_class = shorthand_class_entry>;
-template              using short_space_class = shorthand_class_entry>;
-
-template using short_not_digits_class = negated_class_entry>>;
-template                  using short_not_word_class = negated_class_entry>>;
-template                  using short_not_space_class = negated_class_entry>>;
+template                  using short_digits_class = shorthand_class_entry>;
+template                  using short_hor_space_class = shorthand_class_entry>;
+template                  using short_space_class = shorthand_class_entry>;
+template using short_vert_space_class = shorthand_class_entry>;
+template                  using short_word_class = shorthand_class_entry>;
+
+#line 233 "regex.h2"
+template                      using short_not_digits_class = negated_class_entry>>;
+template                      using short_not_hor_space_class = negated_class_entry>>;
+template                      using short_not_space_class = negated_class_entry>>;
+template using short_not_vert_space_class = negated_class_entry>>;
+template                      using short_not_word_class = negated_class_entry>>;
 
 //-----------------------------------------------------------------------
 //
@@ -412,20 +423,20 @@ template                  using short_not_space_class = negated_
 //-----------------------------------------------------------------------
 //
 
-#line 240 "regex.h2"
+#line 247 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 251 "regex.h2"
+#line 258 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 253 "regex.h2"
+#line 260 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -436,20 +447,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
 
-#line 273 "regex.h2"
+#line 280 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
 
-#line 291 "regex.h2"
+#line 298 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 339 "regex.h2"
+#line 346 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -458,14 +469,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 353 "regex.h2"
+#line 360 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 355 "regex.h2"
+#line 362 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -474,27 +485,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 380 "regex.h2"
+#line 387 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 382 "regex.h2"
+#line 389 "regex.h2"
 };
 
-#line 385 "regex.h2"
+#line 392 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 408 "regex.h2"
+#line 415 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 420 "regex.h2"
+#line 427 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -503,7 +514,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 432 "regex.h2"
+#line 439 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -516,7 +527,7 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 440 "regex.h2"
+#line 447 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -524,13 +535,28 @@ template class empty_matcher_logic {
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 448 "regex.h2"
+#line 455 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 449 "regex.h2"
+#line 456 "regex.h2"
+};
+
+// Regex syntax: \K Example: \K
+//
+template class global_group_reset {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+
+#line 466 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: global_group_reset() = default;
+    public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(global_group_reset const&) -> void = delete;
+
+#line 468 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -538,7 +564,7 @@ template class escaped_char_matcher_l
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 460 "regex.h2"
+#line 478 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -547,13 +573,13 @@ template class group_matcher_start
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 475 "regex.h2"
+#line 493 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 487 "regex.h2"
+#line 505 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -562,7 +588,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 497 "regex.h2"
+#line 515 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -570,14 +596,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 528 "regex.h2"
+#line 546 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 530 "regex.h2"
+#line 548 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -588,14 +614,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 550 "regex.h2"
+#line 568 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 552 "regex.h2"
+#line 570 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -606,14 +632,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 569 "regex.h2"
+#line 587 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 571 "regex.h2"
+#line 589 "regex.h2"
 };
 
 // Named character classes
@@ -626,7 +652,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 579 "regex.h2"
+#line 597 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -634,58 +660,62 @@ template                    void = delete;
 
 
-#line 582 "regex.h2"
+#line 600 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
-template using named_class_white_space = named_class_matcher_logic>;
-template using named_class_word = named_class_matcher_logic>;
-template using named_class_digits = named_class_matcher_logic>;
-
-#line 590 "regex.h2"
-template using named_class_not_white_space = named_class_matcher_logic>;
-template using named_class_not_word = named_class_matcher_logic>;
-template using named_class_not_digits = named_class_matcher_logic>;
+template                  using named_class_digits = named_class_matcher_logic>;
+template                  using named_class_hor_space = named_class_matcher_logic>;
+template                  using named_class_space = named_class_matcher_logic>;
+template                  using named_class_ver_space = named_class_matcher_logic>;
+template                  using named_class_word = named_class_matcher_logic>;
+
+#line 610 "regex.h2"
+template                     using named_class_not_digits = named_class_matcher_logic>;
+template using named_class_not_hor_space = named_class_matcher_logic>;
+template                     using named_class_not_space = named_class_matcher_logic>;
+template using named_class_not_ver_space = named_class_matcher_logic>;
+template                     using named_class_not_word = named_class_matcher_logic>;
 
 // Other named matchers
 template using named_string_end_or_before_new_line_at_end = named_matcher_logic>;
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 601 "regex.h2"
+#line 623 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& tail) -> auto;
 
-#line 620 "regex.h2"
+#line 642 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 648 "regex.h2"
+#line 670 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 653 "regex.h2"
+#line 675 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 658 "regex.h2"
+#line 680 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 664 "regex.h2"
+#line 686 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, cpp2::out count_r) -> auto;
 
-#line 679 "regex.h2"
+#line 701 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
 
-#line 710 "regex.h2"
+#line 732 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(cpp2::in c, Iter const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 730 "regex.h2"
+#line 752 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -698,7 +728,7 @@ template void = delete;
 
 
-#line 747 "regex.h2"
+#line 769 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -709,7 +739,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
 
-#line 784 "regex.h2"
+#line 806 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -717,10 +747,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 792 "regex.h2"
+#line 814 "regex.h2"
 };
 
-#line 795 "regex.h2"
+#line 817 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -738,7 +768,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 814 "regex.h2"
+#line 836 "regex.h2"
 };
 
 class group_name_list_end {
@@ -747,7 +777,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 818 "regex.h2"
+#line 840 "regex.h2"
 };
 
 // Regular expression implementation
@@ -757,7 +787,7 @@ template> str, auto const& pos) -> auto;
 
-#line 834 "regex.h2"
+#line 856 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -765,7 +795,7 @@ template matched_, context const& ctx_);
 
-#line 844 "regex.h2"
+#line 866 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -780,7 +810,7 @@ template void = delete;
 
 
-#line 860 "regex.h2"
+#line 882 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -788,19 +818,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 872 "regex.h2"
+#line 894 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 894 "regex.h2"
+#line 916 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 895 "regex.h2"
+#line 917 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -820,19 +850,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 918 "regex.h2"
+#line 940 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 923 "regex.h2"
+#line 945 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 932 "regex.h2"
+#line 954 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 936 "regex.h2"
+#line 958 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -853,96 +883,96 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 960 "regex.h2"
+#line 982 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 968 "regex.h2"
+#line 990 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 972 "regex.h2"
+#line 994 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 987 "regex.h2"
+#line 1009 "regex.h2"
     public: [[nodiscard]] auto peek() & -> char;
 
-#line 996 "regex.h2"
+#line 1018 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 1011 "regex.h2"
+#line 1033 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1031 "regex.h2"
+#line 1053 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1038 "regex.h2"
+#line 1060 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1045 "regex.h2"
+#line 1067 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1068 "regex.h2"
+#line 1090 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 1078 "regex.h2"
+#line 1100 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 1090 "regex.h2"
+#line 1112 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1100 "regex.h2"
+#line 1122 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1113 "regex.h2"
+#line 1135 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1121 "regex.h2"
+#line 1143 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1237 "regex.h2"
+#line 1263 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1337 "regex.h2"
+#line 1374 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1378 "regex.h2"
+#line 1415 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1387 "regex.h2"
+#line 1424 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1461 "regex.h2"
+#line 1498 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1498 "regex.h2"
+#line 1535 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1521 "regex.h2"
+#line 1558 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1540 "regex.h2"
+#line 1577 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1554 "regex.h2"
+#line 1591 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1563 "regex.h2"
+#line 1600 "regex.h2"
 }
 }
 
@@ -1110,7 +1140,7 @@ namespace regex {
 #line 198 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 243 "regex.h2"
+#line 250 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto r {Other::match(cur, ctx)}; 
         if (r.matched) {
@@ -1119,12 +1149,12 @@ namespace regex {
         return r; 
     }
 
-#line 251 "regex.h2"
+#line 258 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 252 "regex.h2"
+#line 259 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 261 "regex.h2"
+#line 268 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1137,12 +1167,12 @@ namespace regex {
             return match_first(cur, ctx, tail); 
         }
     }
-#line 273 "regex.h2"
+#line 280 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 274 "regex.h2"
+#line 281 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 276 "regex.h2"
+#line 283 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, tail)}; 
         if (r.matched) {
@@ -1158,7 +1188,7 @@ namespace regex {
         }
     }
 
-#line 291 "regex.h2"
+#line 298 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
         auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
 
@@ -1174,7 +1204,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 307 "regex.h2"
+#line 314 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1186,7 +1216,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 319 "regex.h2"
+#line 326 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1208,7 +1238,7 @@ namespace regex {
         }
     }
 
-#line 345 "regex.h2"
+#line 352 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur != ctx.end) {
             return Other::match(cur + 1, ctx); 
@@ -1217,12 +1247,12 @@ namespace regex {
         }
     }
 
-#line 353 "regex.h2"
+#line 360 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 354 "regex.h2"
+#line 361 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 361 "regex.h2"
+#line 368 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1242,12 +1272,12 @@ namespace regex {
         }
 
     }
-#line 380 "regex.h2"
+#line 387 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 381 "regex.h2"
+#line 388 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 389 "regex.h2"
+#line 396 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1267,7 +1297,7 @@ namespace regex {
         }
     }
 
-#line 408 "regex.h2"
+#line 415 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1280,10 +1310,10 @@ namespace regex {
         return r; 
     }
 
-#line 420 "regex.h2"
+#line 427 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 422 "regex.h2"
+#line 429 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1295,27 +1325,37 @@ namespace regex {
         return r; 
     }
 
-#line 437 "regex.h2"
+#line 444 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto { return Other::match(cur, ctx);  }
-#line 438 "regex.h2"
+#line 445 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 439 "regex.h2"
+#line 446 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
 
-#line 448 "regex.h2"
+#line 455 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 454 "regex.h2"
+#line 461 "regex.h2"
+    template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+        CPP2_UFCS(set_group_start)(ctx, 0, cur);
+        return Other::match(cur, ctx); 
+    }
+
+#line 466 "regex.h2"
+    template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
+#line 467 "regex.h2"
+    template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
+
+#line 473 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_start)(ctx, group, cur);
-        auto r {Other::match(cur, ctx)}; 
-        return r; 
+        return Other::match(cur, ctx); 
     }
 
-#line 460 "regex.h2"
+#line 478 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 462 "regex.h2"
+#line 480 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1330,7 +1370,7 @@ namespace regex {
         }
     }
 
-#line 478 "regex.h2"
+#line 496 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         CPP2_UFCS(set_group_end)(ctx, group, cur);
         auto r {Other::match(cur, ctx)}; 
@@ -1340,10 +1380,10 @@ namespace regex {
         return r; 
     }
 
-#line 487 "regex.h2"
+#line 505 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 489 "regex.h2"
+#line 507 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1353,7 +1393,7 @@ namespace regex {
         }
     }
 
-#line 502 "regex.h2"
+#line 520 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1380,12 +1420,12 @@ namespace regex {
         }
 
     }
-#line 528 "regex.h2"
+#line 546 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 529 "regex.h2"
+#line 547 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 538 "regex.h2"
+#line 556 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx); 
@@ -1398,12 +1438,12 @@ namespace regex {
         }}
     }
 
-#line 550 "regex.h2"
+#line 568 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 551 "regex.h2"
+#line 569 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 560 "regex.h2"
+#line 578 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx); 
@@ -1413,15 +1453,15 @@ namespace regex {
         }
 
     }
-#line 569 "regex.h2"
+#line 587 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 570 "regex.h2"
+#line 588 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 578 "regex.h2"
+#line 596 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 604 "regex.h2"
+#line 626 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& tail) -> auto{
         cpp2::deferred_init count; 
         auto r {match_min_count(cur, ctx, cpp2::out(&count))}; 
@@ -1438,10 +1478,10 @@ namespace regex {
         }
     }
 
-#line 620 "regex.h2"
+#line 642 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 622 "regex.h2"
+#line 644 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1468,26 +1508,26 @@ namespace regex {
       return r; 
     }
 
-#line 648 "regex.h2"
+#line 670 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 653 "regex.h2"
+#line 675 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 658 "regex.h2"
+#line 680 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 664 "regex.h2"
+#line 686 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, cpp2::out count_r) -> auto{
         auto res {match_return(true, cur)}; 
         auto count {0}; 
@@ -1503,7 +1543,7 @@ namespace regex {
         return res; 
     }
 
-#line 679 "regex.h2"
+#line 701 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
 
         auto r {M::match(cur, ctx, no_tail())}; 
@@ -1535,7 +1575,7 @@ namespace regex {
         }
     }
 
-#line 710 "regex.h2"
+#line 732 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(cpp2::in c, Iter const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
         auto count {c}; 
         auto pos {cur}; 
@@ -1557,7 +1597,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx); // Upper bound reached.
     }
 
-#line 736 "regex.h2"
+#line 758 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -1570,7 +1610,7 @@ namespace regex {
         return r; 
     }
 
-#line 755 "regex.h2"
+#line 777 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1600,9 +1640,9 @@ namespace regex {
         }
 
     }
-#line 784 "regex.h2"
+#line 806 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 785 "regex.h2"
+#line 807 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1611,7 +1651,7 @@ namespace regex {
         }
     }
 
-#line 806 "regex.h2"
+#line 828 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1621,10 +1661,10 @@ namespace regex {
         }
     }
 
-#line 817 "regex.h2"
+#line 839 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 825 "regex.h2"
+#line 847 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1634,31 +1674,31 @@ namespace regex {
         }
     }
 
-#line 839 "regex.h2"
+#line 861 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 842 "regex.h2"
+#line 864 "regex.h2"
         }
 
-#line 844 "regex.h2"
+#line 866 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 845 "regex.h2"
+#line 867 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 846 "regex.h2"
+#line 868 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 847 "regex.h2"
+#line 869 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 849 "regex.h2"
+#line 871 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 850 "regex.h2"
+#line 872 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 851 "regex.h2"
+#line 873 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 853 "regex.h2"
+#line 875 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1667,13 +1707,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 862 "regex.h2"
+#line 884 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 863 "regex.h2"
+#line 885 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 864 "regex.h2"
+#line 886 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 865 "regex.h2"
+#line 887 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1681,13 +1721,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 872 "regex.h2"
+#line 894 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 873 "regex.h2"
+#line 895 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 874 "regex.h2"
+#line 896 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 875 "regex.h2"
+#line 897 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1707,26 +1747,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 894 "regex.h2"
+#line 916 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 912 "regex.h2"
+#line 934 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 918 "regex.h2"
+#line 940 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 923 "regex.h2"
+#line 945 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 925 "regex.h2"
+#line 947 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1734,31 +1774,31 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 932 "regex.h2"
+#line 954 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 954 "regex.h2"
+#line 976 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 958 "regex.h2"
+#line 980 "regex.h2"
     }
 
-#line 962 "regex.h2"
+#line 984 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 968 "regex.h2"
+#line 990 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 975 "regex.h2"
+#line 997 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1771,7 +1811,7 @@ namespace regex {
         }
     }
 
-#line 987 "regex.h2"
+#line 1009 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() & -> char{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
@@ -1781,7 +1821,7 @@ namespace regex {
         }
     }
 
-#line 996 "regex.h2"
+#line 1018 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find)(regex, e, pos)}; 
@@ -1797,7 +1837,7 @@ namespace regex {
         }
     }
 
-#line 1011 "regex.h2"
+#line 1033 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -1818,13 +1858,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1033 "regex.h2"
+#line 1055 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1038 "regex.h2"
+#line 1060 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1832,10 +1872,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1045 "regex.h2"
+#line 1067 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1047 "regex.h2"
+#line 1069 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1857,7 +1897,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1068 "regex.h2"
+#line 1090 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -1868,7 +1908,7 @@ namespace regex {
         return r; 
     }
 
-#line 1078 "regex.h2"
+#line 1100 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1881,7 +1921,7 @@ namespace regex {
         return r; 
     }
 
-#line 1093 "regex.h2"
+#line 1115 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1889,7 +1929,7 @@ namespace regex {
         return true; 
     }
 
-#line 1100 "regex.h2"
+#line 1122 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -1903,7 +1943,7 @@ namespace regex {
         return false; 
     }
 
-#line 1113 "regex.h2"
+#line 1135 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1912,7 +1952,7 @@ namespace regex {
         return false; 
     }
 
-#line 1121 "regex.h2"
+#line 1143 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -1963,16 +2003,20 @@ namespace regex {
             else {if (c_cur == '\\') {
                 if (next_item()  && (c_cur != ']')) {
                     auto name {""}; 
-                    if (     's' == c_cur) { name = "short_space"; }
+                         if ('d' == c_cur) {name = "short_digits"; }
+                    else {if ('D' == c_cur) {name = "short_not_digits"; }
+                    else {if ('h' == c_cur) {name = "short_hor_space"; }
+                    else {if ('H' == c_cur) {name = "short_not_hor_space"; }
+                    else {if ('s' == c_cur) {name = "short_space"; }
                     else {if ('S' == c_cur) {name = "short_not_space"; }
+                    else {if ('v' == c_cur) {name = "short_ver_space"; }
+                    else {if ('V' == c_cur) {name = "short_not_ver_space"; }
                     else {if ('w' == c_cur) {name = "short_word"; }
                     else {if ('W' == c_cur) {name = "short_not_word"; }
-                    else {if ('d' == c_cur) {name = "short_digits"; }
-                    else {if ('D' == c_cur) {name = "short_not_digits"; }
                     else {
                         error("Unknown group escape.");
                         return false; 
-                    }}}}}}
+                    }}}}}}}}}}
                     CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
                 }else {
                     error("Escape without a following character.");
@@ -2029,7 +2073,7 @@ namespace regex {
         return true; 
     }
 
-#line 1237 "regex.h2"
+#line 1263 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2071,6 +2115,10 @@ namespace regex {
             auto group {grab_number()}; 
             if (!(add_group_matcher(std::move(group)))) {return false; }
         }
+        else {if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae"), c_next)) {
+            auto inner {create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "'"))}; 
+            CPP2_UFCS(add)(cur_state, create_matcher("named_matcher_logic", ("\"\\\\" + cpp2::to_string(c_next) + "\", " + cpp2::to_string(std::move(inner)))));
+        }
         else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
             if (c_next == '$') {
                 // TODO: Provide proper escape for cppfront capture
@@ -2110,27 +2158,34 @@ namespace regex {
             if (!((next(cpp2::out(&c_next)) && grab_until(std::move(term_char), cpp2::out(&group))))) {error("No ending bracket."); return false; }
             if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
         }
+        else {if ('K' == c_next) {
+            CPP2_UFCS(add)(cur_state, create_matcher("global_group_reset", ""));
+        }
+        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
+        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
+        else {if ('B' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
+        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
+        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
+        else {if ('h' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_hor_space", "")); }
+        else {if ('H' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_hor_space", "")); }
         else {if ('N' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
-        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_white_space", "")); }
-        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_white_space", "")); }
+        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_space", "")); }
+        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_space", "")); }
+        else {if ('v' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_ver_space", "")); }
+        else {if ('V' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_ver_space", "")); }
         else {if ('w' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_word", "")); }
         else {if ('W' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_word", "")); }
-        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
-        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
         else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
-        else {if ('z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
-        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
-        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
-        else {if ('B' == std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
+        else {if ('z' == std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}}}}
+        }}}}}}}}}}}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 1337 "regex.h2"
+#line 1374 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -2172,7 +2227,7 @@ namespace regex {
         return true; 
     }
 
-#line 1378 "regex.h2"
+#line 1415 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2182,7 +2237,7 @@ namespace regex {
         return false; 
     }
 
-#line 1387 "regex.h2"
+#line 1424 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2257,7 +2312,7 @@ namespace regex {
         return true; 
     }
 
-#line 1461 "regex.h2"
+#line 1498 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2295,7 +2350,7 @@ namespace regex {
         return true; 
     }
 
-#line 1498 "regex.h2"
+#line 1535 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2319,7 +2374,7 @@ namespace regex {
         }
     }
 
-#line 1521 "regex.h2"
+#line 1558 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2339,7 +2394,7 @@ namespace regex {
         return r; 
     }
 
-#line 1540 "regex.h2"
+#line 1577 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -2354,7 +2409,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1556 "regex.h2"
+#line 1593 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 6a780d2046..1b8bc0aa27 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -455,13 +455,24 @@ escaped_char_matcher_logic:  type =
     to_string: () "\\(C)$";
 }
 
+// Regex syntax: \K Example: \K
+//
+global_group_reset:  type = {
+    match:  (cur, inout ctx, _ : Other) -> _ = {
+        ctx.set_group_start(0, cur);
+        return Other::match(cur, ctx);
+    }
+
+    reset_ranges: (inout ctx) = {}
+    to_string: () "\\K";
+}
+
 // Regex syntax: () Example: (.*)
 //
 group_matcher_start_logic:  type = {
     match:  (cur, inout ctx, _ : Other) -> _ = {
         ctx.set_group_start(group, cur);
-        r := Other::match(cur, ctx);
-        return r;
+        return Other::match(cur, ctx);
     }
 
     reset_ranges: (inout ctx) = ctx.set_group_invalid(group);
@@ -1290,6 +1301,10 @@ regex_parser:  type = {
             group := grab_number();
             if !add_group_matcher(group) { return false; }
         }
+        else if std::string::npos != std::string("tnrfae").find(c_next) {
+            inner := create_matcher("char_matcher_logic", "'\\(c_next)$', '\\(c_next)$', '\\(c_next)$'");
+            cur_state.add(create_matcher("named_matcher_logic", "\"\\\\(c_next)$\", (inner)$"));
+        }
         else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {
                 // TODO: Provide proper escape for cppfront capture
@@ -1329,6 +1344,9 @@ regex_parser:  type = {
             if !(next(out c_next) && grab_until(term_char, out group)) { error("No ending bracket."); return false; }
             if !add_group_matcher(group) { return false; }
         }
+        else if 'K' == c_next {
+            cur_state.add(create_matcher("global_group_reset", ""));
+        }
         else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
         else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
         else if 'B' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "true")); }

From 0b8d69123305cecece07e4ea0d0cba2f26d15c60 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 20 Feb 2024 15:33:05 +0100
Subject: [PATCH 058/161] Update of tests.

---
 regression-tests/pure2-regex.cpp2             | 2195 ++++++++++-------
 .../gcc-13/pure2-regex.cpp.execution          |  787 +++---
 .../gcc-13/pure2-regex.cpp.output             |   81 +
 regression-tests/test-results/pure2-regex.cpp | 1794 +++++++++-----
 4 files changed, 2845 insertions(+), 2012 deletions(-)

diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2
index bc7fd02680..bb8639a35b 100644
--- a/regression-tests/pure2-regex.cpp2
+++ b/regression-tests/pure2-regex.cpp2
@@ -1,968 +1,1281 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
 
-test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, result: std::string) = {
-  str_mod := str;
-  if str_mod == "NULL" {
-    str_mod = "";
-  }
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
 
-  ranges_result: std::string = "NOMATCH";
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
 
-  status: std::string = "OK";
-  if regex.to_string() != regex_str {
-    status = "Failure: Parsed regex does not match.";
-  } else {
-    r := regex.search(str_mod);
-    is_pass := !result.starts_with("NOMATCH");
+    while std::isdigit(iter*) next iter++ {}
 
-    // Check if we expect a match.
-    if is_pass != r.matched {
-      if is_pass {
-        status = "Failure: Regex should apply.";
-      }
-      else {
-        status = "Failure: Regex should not apply.";
-      }
+    return std::stoi(std::string(start, iter));
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
     }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
 
-    // If we have a match. Check the ranges.
-    if r.matched {
-      ranges_result = r.ctx.print_ranges();
-      ranges_match := result == ranges_result;
-      should_ranges_match := !id.starts_with("M");
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          next++; // Skip [
+          group := extract_group_and_advance(next);
+          next++; // Skip ]
 
-      if ranges_match != should_ranges_match {
-        if ranges_match {
-          status = "Failure: Ranges should be wrong.";
+          if is_start {
+            result += std::to_string(r.group_start(group));
+          }
+          else {
+            result += std::to_string(r.group_end(group));
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
         }
         else {
-          status = "Failure: Ranges are wrong.";
+          std::cerr << "Not implemented";
         }
       }
+      else {
+        std::cerr << "Not implemented.";
+      }
     }
+    iter = next;
   }
 
-  std::cout << "(id)$: (status)$ regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result: (ranges_result)$ expected_results (result)$" << std::endl;
+  return result;
 }
 
-
-test_basic3: @regex type = {
-  regex_1 := "\)";
-  regex_2 := "\}";
-  regex_3 := "]";
-  regex_4 := "\$^";
-  regex_5 := "a(\$)";
-  regex_6 := "a*(^a)";
-  regex_7 := "(..)*(...)*";
-  regex_8 := "(..)*(...)*";
-  regex_9 := "(ab|a)(bc|c)";
-  regex_10 := "(ab)c|abc";
-  regex_11 := "a{0}b";
-  regex_12 := "(a*)(b?)(b+)b{3}";
-  regex_13 := "(a*)(b{0,1})(b{1,})b{3}";
-  regex_15 := "((a|a)|a)";
-  regex_16 := "(a*)(a|aa)";
-  regex_17 := "a*(a.|aa)";
-  regex_18 := "a(b)|c(d)|a(e)f";
-  regex_19 := "(a|b)?.*";
-  regex_20 := "(a|b)c|a(b|c)";
-  regex_21 := "(a|b)c|a(b|c)";
-  regex_22 := "(a|b)*c|(a|ab)*c";
-  regex_23 := "(a|b)*c|(a|ab)*c";
-  regex_24 := "(.a|.b).*|.*(.a|.b)";
-  regex_25 := "a?(ab|ba)ab";
-  regex_26 := "a?(ac{0}b|ba)ab";
-  regex_27 := "ab|abab";
-  regex_28 := "aba|bab|bba";
-  regex_29 := "aba|bab";
-  regex_30 := "(aa|aaa)*|(a|aaaaa)";
-  regex_31 := "(a.|.a.)*|(a|.a...)";
-  regex_32 := "ab|a";
-  regex_33 := "ab|a";
-  regex_M34 := "(Ab|cD)*";
-  regex_35 := ":::1:::0:|:::1:1:0:";
-  regex_36 := ":::1:::0:|:::1:1:1:";
-  regex_37 := "[[:lower:]]+";
-  regex_38 := "[[:upper:]]+";
-  regex_39 := "(a)(b)(c)";
-  regex_43   := "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))";
-  regex_44   := "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*";
-  regex_45 := "a?(ab|ba)*";
-  regex_46 := "abaa|abbaa|abbbaa|abbbbaa";
-  regex_47 := "abaa|abbaa|abbbaa|abbbbaa";
-  regex_48 := "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc";
-  regex_49 := "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll";
-  regex_50 := "a*a*a*a*a*b";
-  regex_51 := "ab+bc";
-  regex_52 := "ab+bc";
-  regex_53 := "ab?bc";
-  regex_54 := "ab?bc";
-  regex_55 := "ab?c";
-  regex_56 := "ab|cd";
-  regex_57 := "ab|cd";
-  regex_58 := "a\(b";
-  regex_59 := "a\(*b";
-  regex_60 := "a\(*b";
-  regex_61 := "((a))";
-  regex_62 := "(a)b(c)";
-  regex_63 := "a+b+c";
-  regex_64 := "a*";
-  regex_65 := "(a*)*";
-  regex_66 := "(a*)+";
-  regex_67 := "(a*|b)*";
-  regex_68 := "(a+|b)*";
-  regex_69 := "(a+|b)+";
-  regex_70 := "(a+|b)?";
-  regex_71 := "(^)*";
-  regex_72 := "([abc])*d";
-  regex_73 := "([abc])*bcd";
-  regex_74 := "a|b|c|d|e";
-  regex_75 := "(a|b|c|d|e)f";
-  regex_76 := "((a*|b))*";
-  regex_77 := "(ab|cd)e";
-  regex_78 := "(a|b)c*d";
-  regex_79 := "(ab|ab*)bc";
-  regex_80 := "a([bc]*)c*";
-  regex_81 := "a([bc]*)(c*d)";
-  regex_82 := "a([bc]+)(c*d)";
-  regex_83 := "a([bc]*)(c+d)";
-  regex_84 := "a[bcd]*dcdcde";
-  regex_85 := "(ab|a)b*c";
-  regex_86 := "((a)(b)c)(d)";
-  regex_87 := "^a(bc+|b[eh])g|.h\$";
-  regex_88 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_89 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_90 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_91 := "(((((((((a)))))))))";
-  regex_92 := "(.*)c(.*)";
-  regex_93 := "a(bc)d";
-  regex_94 := "a[-]?c";
-  regex_95 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_96 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_97 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_98 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_99 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_100 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_101 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_102 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_103 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_104 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_105 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_106 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_107 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_108 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_109 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_110 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_111 := "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]";
-  regex_112 := "a+(b|c)*d+";
-  regex_113 := "^.+\$";
-  regex_114 := "^(.+)\$";
-  regex_115 := "^([^!.]+).att.com!(.+)\$";
-  regex_116 := "^([^!]+!)?([^!]+)\$";
-  regex_117 := "^([^!]+!)?([^!]+)\$";
-  regex_118 := "^([^!]+!)?([^!]+)\$";
-  regex_119 := "^.+!([^!]+!)([^!]+)\$";
-  regex_120 := "((foo)|(bar))!bas";
-  regex_121 := "((foo)|(bar))!bas";
-  regex_122 := "((foo)|(bar))!bas";
-  regex_123 := "((foo)|bar)!bas";
-  regex_124 := "((foo)|bar)!bas";
-  regex_125 := "((foo)|bar)!bas";
-  regex_126 := "(foo|(bar))!bas";
-  regex_127 := "(foo|(bar))!bas";
-  regex_128 := "(foo|(bar))!bas";
-  regex_129 := "(foo|bar)!bas";
-  regex_130 := "(foo|bar)!bas";
-  regex_131 := "(foo|bar)!bas";
-  regex_132 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$";
-  regex_133 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$";
-  regex_134 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$";
-  regex_135 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$";
-  regex_136 := "^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$";
-  regex_137 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$";
-  regex_138 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$";
-  regex_139 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$";
-  regex_140 := "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$";
-  regex_141 := ".*(/XXX).*";
-  regex_142 := ".*(\\XXX).*";
-  regex_143 := "\\XXX";
-  regex_144 := ".*(/000).*";
-  regex_145 := ".*(\\000).*";
-  regex_146 := "\\000";
-  run: (this) = {
-    std::cout << "Running basic3:"<< std::endl;
-    test(regex_1, "1", "\\)", "()", "(1,2)");
-    test(regex_2, "2", "\\}", "}", "(0,1)");
-    test(regex_3, "3", "]", "]", "(0,1)");
-    test(regex_4, "4", "\\$^", "NULL", "(0,0)");
-    test(regex_5, "5", "a(\\$)", "aa", "(1,2)(2,2)");
-    test(regex_6, "6", "a*(^a)", "aa", "(0,1)(0,1)");
-    test(regex_7, "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)");
-    test(regex_8, "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)");
-    test(regex_9, "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)");
-    test(regex_10, "10", "(ab)c|abc", "abc", "(0,3)(0,2)");
-    test(regex_11, "11", "a{0}b", "ab", "(1,2)");
-    test(regex_12, "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)");
-    test(regex_13, "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)");
-    test(regex_15, "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)");
-    test(regex_16, "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)");
-    test(regex_17, "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)");
-    test(regex_18, "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)");
-    test(regex_19, "19", "(a|b)?.*", "b", "(0,1)(0,1)");
-    test(regex_20, "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)");
-    test(regex_21, "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)");
-    test(regex_22, "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)");
-    test(regex_23, "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)");
-    test(regex_24, "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)");
-    test(regex_25, "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)");
-    test(regex_26, "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)");
-    test(regex_27, "27", "ab|abab", "abbabab", "(0,2)");
-    test(regex_28, "28", "aba|bab|bba", "baaabbbaba", "(5,8)");
-    test(regex_29, "29", "aba|bab", "baaabbbaba", "(6,9)");
-    test(regex_30, "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)");
-    test(regex_31, "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)");
-    test(regex_32, "32", "ab|a", "xabc", "(1,3)");
-    test(regex_33, "33", "ab|a", "xxabc", "(2,4)");
-    test(regex_M34, "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)");
-    test(regex_35, "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)");
-    test(regex_36, "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)");
-    test(regex_37, "37", "[[:lower:]]+", "`az{", "(1,3)");
-    test(regex_38, "38", "[[:upper:]]+", "@AZ[", "(1,3)");
-    test(regex_39, "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_43  , "43  ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)");
-    test(regex_44  , "44  ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)");
-    test(regex_45, "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)");
-    test(regex_46, "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)");
-    test(regex_47, "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)");
-    test(regex_48, "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)");
-    test(regex_49, "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)");
-    test(regex_50, "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)");
-    test(regex_51, "51", "ab+bc", "abbc", "(0,4)");
-    test(regex_52, "52", "ab+bc", "abbbbc", "(0,6)");
-    test(regex_53, "53", "ab?bc", "abbc", "(0,4)");
-    test(regex_54, "54", "ab?bc", "abc", "(0,3)");
-    test(regex_55, "55", "ab?c", "abc", "(0,3)");
-    test(regex_56, "56", "ab|cd", "abc", "(0,2)");
-    test(regex_57, "57", "ab|cd", "abcd", "(0,2)");
-    test(regex_58, "58", "a\\(b", "a(b", "(0,3)");
-    test(regex_59, "59", "a\\(*b", "ab", "(0,2)");
-    test(regex_60, "60", "a\\(*b", "a((b", "(0,4)");
-    test(regex_61, "61", "((a))", "abc", "(0,1)(0,1)(0,1)");
-    test(regex_62, "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)");
-    test(regex_63, "63", "a+b+c", "aabbabc", "(4,7)");
-    test(regex_64, "64", "a*", "aaa", "(0,3)");
-    test(regex_65, "65", "(a*)*", "-", "(0,0)(0,0)");
-    test(regex_66, "66", "(a*)+", "-", "(0,0)(0,0)");
-    test(regex_67, "67", "(a*|b)*", "-", "(0,0)(0,0)");
-    test(regex_68, "68", "(a+|b)*", "ab", "(0,2)(1,2)");
-    test(regex_69, "69", "(a+|b)+", "ab", "(0,2)(1,2)");
-    test(regex_70, "70", "(a+|b)?", "ab", "(0,1)(0,1)");
-    test(regex_71, "71", "(^)*", "-", "(0,0)(0,0)");
-    test(regex_72, "72", "([abc])*d", "abbbcd", "(0,6)(4,5)");
-    test(regex_73, "73", "([abc])*bcd", "abcd", "(0,4)(0,1)");
-    test(regex_74, "74", "a|b|c|d|e", "e", "(0,1)");
-    test(regex_75, "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)");
-    test(regex_76, "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)");
-    test(regex_77, "77", "(ab|cd)e", "abcde", "(2,5)(2,4)");
-    test(regex_78, "78", "(a|b)c*d", "abcd", "(1,4)(1,2)");
-    test(regex_79, "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)");
-    test(regex_80, "80", "a([bc]*)c*", "abc", "(0,3)(1,3)");
-    test(regex_81, "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)");
-    test(regex_82, "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)");
-    test(regex_83, "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)");
-    test(regex_84, "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)");
-    test(regex_85, "85", "(ab|a)b*c", "abc", "(0,3)(0,2)");
-    test(regex_86, "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)");
-    test(regex_87, "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)");
-    test(regex_88, "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)");
-    test(regex_89, "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)");
-    test(regex_90, "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)");
-    test(regex_91, "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)");
-    test(regex_92, "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)");
-    test(regex_93, "93", "a(bc)d", "abcd", "(0,4)(1,3)");
-    test(regex_94, "94", "a[-]?c", "ac", "(0,3)");
-    test(regex_95, "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)");
-    test(regex_96, "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)");
-    test(regex_97, "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)");
-    test(regex_98, "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)");
-    test(regex_99, "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)");
-    test(regex_100, "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)");
-    test(regex_101, "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)");
-    test(regex_102, "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)");
-    test(regex_103, "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)");
-    test(regex_104, "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)");
-    test(regex_105, "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)");
-    test(regex_106, "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)");
-    test(regex_107, "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)");
-    test(regex_108, "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)");
-    test(regex_109, "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)");
-    test(regex_110, "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)");
-    test(regex_111, "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)");
-    test(regex_112, "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)");
-    test(regex_113, "113", "^.+\\$", "vivi", "(0,4)");
-    test(regex_114, "114", "^(.+)\\$", "vivi", "(0,4)(0,4)");
-    test(regex_115, "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)");
-    test(regex_116, "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)");
-    test(regex_117, "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)");
-    test(regex_118, "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)");
-    test(regex_119, "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)");
-    test(regex_120, "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)");
-    test(regex_121, "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)");
-    test(regex_122, "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)");
-    test(regex_123, "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)");
-    test(regex_124, "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)");
-    test(regex_125, "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)");
-    test(regex_126, "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)");
-    test(regex_127, "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)");
-    test(regex_128, "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)");
-    test(regex_129, "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)");
-    test(regex_130, "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)");
-    test(regex_131, "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)");
-    test(regex_132, "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)");
-    test(regex_133, "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)");
-    test(regex_134, "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_135, "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)");
-    test(regex_136, "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_137, "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)");
-    test(regex_138, "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_139, "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)");
-    test(regex_140, "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_141, "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)");
-    test(regex_142, "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)");
-    test(regex_143, "143", "\\\\XXX", "\\XXX", "(0,4)");
-    test(regex_144, "144", ".*(/000).*", "/000", "(0,4)(0,4)");
-    test(regex_145, "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)");
-    test(regex_146, "146", "\\\\000", "\\000", "(0,4)");
-    std::cout << std::endl;
-  }
-}
-test_class: @regex type = {
-  regex_1 := "aa*";
-  regex_2 := "(a*)(ab)*(b*)";
-  regex_M2 := "(a*)(ab)*(b*)";
-  regex_3 := "((a*)(ab)*)((b*)(a*))";
-  regex_4 := "(...?.?)*";
-  regex_5 := "(a|ab)(bc|c)";
-  regex_6 := "(aba|a*b)(aba|a*b)";
-  regex_7 := "(a*){2}";
-  regex_8 := "(a*)*";
-  regex_9 := "(aba|a*b)*";
-  regex_10 := "(a(b)?)+";
-  regex_11 := ".*(.*)";
-  regex_12 := "(a?)((ab)?)(b?)a?(ab)?b?";
-  regex_M12 := "(a?)((ab)?)(b?)a?(ab)?b?";
-  run: (this) = {
-    std::cout << "Running class:"<< std::endl;
-    test(regex_1, "1", "aa*", "xaxaax", "(1,2)");
-    test(regex_2, "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_M2, "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)");
-    test(regex_3, "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)");
-    test(regex_4, "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)");
-    test(regex_5, "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)");
-    test(regex_6, "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)");
-    test(regex_7, "7", "(a*){2}", "xxxxx", "(0,0)(0,0)");
-    test(regex_8, "8", "(a*)*", "a", "(0,1)(0,1)");
-    test(regex_9, "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)");
-    test(regex_10, "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)");
-    test(regex_11, "11", ".*(.*)", "ab", "(0,2)(2,2)");
-    test(regex_12, "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)");
-    test(regex_M12, "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)");
-    std::cout << std::endl;
-  }
-}
-test_left_assoc: @regex type = {
-  regex_M1 := "(a|ab)(c|bcd)(d*)";
-  regex_M2 := "(a|ab)(bcd|c)(d*)";
-  regex_M3 := "(ab|a)(c|bcd)(d*)";
-  regex_M4 := "(ab|a)(bcd|c)(d*)";
-  regex_M5 := "(a*)(b|abc)(c*)";
-  regex_M6 := "(a*)(abc|b)(c*)";
-  regex_M7 := "(a*)(b|abc)(c*)";
-  regex_M8 := "(a*)(abc|b)(c*)";
-  regex_M9 := "(a|ab)(c|bcd)(d|.*)";
-  regex_M10 := "(a|ab)(bcd|c)(d|.*)";
-  regex_M11 := "(ab|a)(c|bcd)(d|.*)";
-  regex_M12 := "(ab|a)(bcd|c)(d|.*)";
-  run: (this) = {
-    std::cout << "Running left_assoc:"<< std::endl;
-    test(regex_M1, "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M2, "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M3, "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M4, "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M5, "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M6, "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M7, "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M8, "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M9, "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M10, "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M11, "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M12, "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    std::cout << std::endl;
-  }
-}
-test_right_assoc: @regex type = {
-  regex_1 := "(a|ab)(c|bcd)(d*)";
-  regex_2 := "(a|ab)(bcd|c)(d*)";
-  regex_3 := "(ab|a)(c|bcd)(d*)";
-  regex_4 := "(ab|a)(bcd|c)(d*)";
-  regex_5 := "(a*)(b|abc)(c*)";
-  regex_6 := "(a*)(abc|b)(c*)";
-  regex_7 := "(a*)(b|abc)(c*)";
-  regex_8 := "(a*)(abc|b)(c*)";
-  regex_9 := "(a|ab)(c|bcd)(d|.*)";
-  regex_10 := "(a|ab)(bcd|c)(d|.*)";
-  regex_11 := "(ab|a)(c|bcd)(d|.*)";
-  regex_12 := "(ab|a)(bcd|c)(d|.*)";
-  run: (this) = {
-    std::cout << "Running right_assoc:"<< std::endl;
-    test(regex_1, "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_2, "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_3, "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_4, "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_5, "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_6, "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_7, "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_8, "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_9, "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_10, "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_11, "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_12, "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    std::cout << std::endl;
-  }
-}
-test_forced_assoc: @regex type = {
-  regex_1 := "(a|ab)(c|bcd)";
-  regex_2 := "(a|ab)(bcd|c)";
-  regex_3 := "(ab|a)(c|bcd)";
-  regex_4 := "(ab|a)(bcd|c)";
-  regex_5 := "((a|ab)(c|bcd))(d*)";
-  regex_6 := "((a|ab)(bcd|c))(d*)";
-  regex_7 := "((ab|a)(c|bcd))(d*)";
-  regex_8 := "((ab|a)(bcd|c))(d*)";
-  regex_9 := "(a|ab)((c|bcd)(d*))";
-  regex_10 := "(a|ab)((bcd|c)(d*))";
-  regex_11 := "(ab|a)((c|bcd)(d*))";
-  regex_12 := "(ab|a)((bcd|c)(d*))";
-  regex_13 := "(a*)(b|abc)";
-  regex_14 := "(a*)(abc|b)";
-  regex_15 := "((a*)(b|abc))(c*)";
-  regex_16 := "((a*)(abc|b))(c*)";
-  regex_17 := "(a*)((b|abc)(c*))";
-  regex_18 := "(a*)((abc|b)(c*))";
-  regex_19 := "(a*)(b|abc)";
-  regex_20 := "(a*)(abc|b)";
-  regex_21 := "((a*)(b|abc))(c*)";
-  regex_22 := "((a*)(abc|b))(c*)";
-  regex_23 := "(a*)((b|abc)(c*))";
-  regex_24 := "(a*)((abc|b)(c*))";
-  regex_25 := "(a|ab)";
-  regex_26 := "(ab|a)";
-  regex_27 := "(a|ab)(b*)";
-  regex_28 := "(ab|a)(b*)";
-  run: (this) = {
-    std::cout << "Running forced_assoc:"<< std::endl;
-    test(regex_1, "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_2, "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_3, "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_4, "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_5, "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_6, "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_7, "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_8, "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_9, "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_10, "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_11, "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_12, "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_13, "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_14, "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_15, "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_16, "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_17, "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_18, "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_19, "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_20, "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_21, "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_22, "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_23, "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_24, "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_25, "25", "(a|ab)", "ab", "(0,2)(0,2)");
-    test(regex_26, "26", "(ab|a)", "ab", "(0,2)(0,2)");
-    test(regex_27, "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)");
-    test(regex_28, "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)");
-    std::cout << std::endl;
+test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
   }
-}
-test_nullsub3: @regex type = {
-  regex_1 := "(a*)*";
-  regex_2 := "(a*)*";
-  regex_3 := "(a*)*";
-  regex_4 := "(a*)*";
-  regex_5 := "(a*)+";
-  regex_6 := "(a*)+";
-  regex_7 := "(a*)+";
-  regex_8 := "(a*)+";
-  regex_9 := "(a+)*";
-  regex_10 := "(a+)*";
-  regex_11 := "(a+)*";
-  regex_12 := "(a+)*";
-  regex_13 := "(a+)+";
-  regex_14 := "(a+)+";
-  regex_15 := "(a+)+";
-  regex_16 := "(a+)+";
-  regex_17 := "([a]*)*";
-  regex_18 := "([a]*)*";
-  regex_19 := "([a]*)*";
-  regex_20 := "([a]*)*";
-  regex_21 := "([a]*)+";
-  regex_22 := "([a]*)+";
-  regex_23 := "([a]*)+";
-  regex_24 := "([a]*)+";
-  regex_25 := "([^b]*)*";
-  regex_26 := "([^b]*)*";
-  regex_27 := "([^b]*)*";
-  regex_28 := "([^b]*)*";
-  regex_29 := "([ab]*)*";
-  regex_30 := "([ab]*)*";
-  regex_31 := "([ab]*)*";
-  regex_32 := "([ab]*)*";
-  regex_33 := "([ab]*)*";
-  regex_34 := "([ab]*)*";
-  regex_35 := "([ab]*)*";
-  regex_36 := "([^a]*)*";
-  regex_37 := "([^a]*)*";
-  regex_38 := "([^a]*)*";
-  regex_39 := "([^ab]*)*";
-  regex_40 := "([^ab]*)*";
-  regex_41 := "((z)+|a)*";
-  regex_42 := "(a)";
-  regex_46 := "(a*)*(x)";
-  regex_47 := "(a*)*(x)";
-  regex_48 := "(a*)*(x)";
-  regex_49 := "(a*)+(x)";
-  regex_50 := "(a*)+(x)";
-  regex_51 := "(a*)+(x)";
-  regex_52 := "(a*){2}(x)";
-  regex_53 := "(a*){2}(x)";
-  regex_54 := "(a*){2}(x)";
-  run: (this) = {
-    std::cout << "Running nullsub3:"<< std::endl;
-    test(regex_1, "1", "(a*)*", "a", "(0,1)(0,1)");
-    test(regex_2, "2", "(a*)*", "x", "(0,0)(0,0)");
-    test(regex_3, "3", "(a*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_4, "4", "(a*)*", "aaaaaax", "(0,6)(0,6)");
-    test(regex_5, "5", "(a*)+", "a", "(0,1)(0,1)");
-    test(regex_6, "6", "(a*)+", "x", "(0,0)(0,0)");
-    test(regex_7, "7", "(a*)+", "aaaaaa", "(0,6)(0,6)");
-    test(regex_8, "8", "(a*)+", "aaaaaax", "(0,6)(0,6)");
-    test(regex_9, "9", "(a+)*", "a", "(0,1)(0,1)");
-    test(regex_10, "10", "(a+)*", "x", "(0,0)(?,?)");
-    test(regex_11, "11", "(a+)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_12, "12", "(a+)*", "aaaaaax", "(0,6)(0,6)");
-    test(regex_13, "13", "(a+)+", "a", "(0,1)(0,1)");
-    test(regex_14, "14", "(a+)+", "x", "NOMATCH");
-    test(regex_15, "15", "(a+)+", "aaaaaa", "(0,6)(0,6)");
-    test(regex_16, "16", "(a+)+", "aaaaaax", "(0,6)(0,6)");
-    test(regex_17, "17", "([a]*)*", "a", "(0,1)(0,1)");
-    test(regex_18, "18", "([a]*)*", "x", "(0,0)(0,0)");
-    test(regex_19, "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_20, "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)");
-    test(regex_21, "21", "([a]*)+", "a", "(0,1)(0,1)");
-    test(regex_22, "22", "([a]*)+", "x", "(0,0)(0,0)");
-    test(regex_23, "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)");
-    test(regex_24, "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)");
-    test(regex_25, "25", "([^b]*)*", "a", "(0,1)(0,1)");
-    test(regex_26, "26", "([^b]*)*", "b", "(0,0)(0,0)");
-    test(regex_27, "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_28, "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)");
-    test(regex_29, "29", "([ab]*)*", "a", "(0,1)(0,1)");
-    test(regex_30, "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_31, "31", "([ab]*)*", "ababab", "(0,6)(0,6)");
-    test(regex_32, "32", "([ab]*)*", "bababa", "(0,6)(0,6)");
-    test(regex_33, "33", "([ab]*)*", "b", "(0,1)(0,1)");
-    test(regex_34, "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)");
-    test(regex_35, "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)");
-    test(regex_36, "36", "([^a]*)*", "b", "(0,1)(0,1)");
-    test(regex_37, "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)");
-    test(regex_38, "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)");
-    test(regex_39, "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)");
-    test(regex_40, "40", "([^ab]*)*", "ababab", "(0,0)(0,0)");
-    test(regex_41, "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)");
-    test(regex_42, "42", "(a)", "aaa", "(0,1)(0,1)");
-    test(regex_46, "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)");
-    test(regex_47, "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)");
-    test(regex_48, "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)");
-    test(regex_49, "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)");
-    test(regex_50, "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)");
-    test(regex_51, "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)");
-    test(regex_52, "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)");
-    test(regex_53, "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)");
-    test(regex_54, "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)");
-    std::cout << std::endl;
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
   }
-}
-test_repetition2: @regex type = {
-  regex_1 := "((..)|(.))";
-  regex_2 := "((..)|(.))((..)|(.))";
-  regex_3 := "((..)|(.))((..)|(.))((..)|(.))";
-  regex_4 := "((..)|(.)){1}";
-  regex_5 := "((..)|(.)){2}";
-  regex_6 := "((..)|(.)){3}";
-  regex_7 := "((..)|(.))*";
-  regex_8 := "((..)|(.))";
-  regex_9 := "((..)|(.))((..)|(.))";
-  regex_10 := "((..)|(.))((..)|(.))((..)|(.))";
-  regex_11 := "((..)|(.)){1}";
-  regex_12 := "((..)|(.)){2}";
-  regex_13 := "((..)|(.)){3}";
-  regex_14 := "((..)|(.))*";
-  regex_15 := "((..)|(.))";
-  regex_16 := "((..)|(.))((..)|(.))";
-  regex_17 := "((..)|(.))((..)|(.))((..)|(.))";
-  regex_18 := "((..)|(.)){1}";
-  regex_19 := "((..)|(.)){2}";
-  regex_20 := "((..)|(.)){3}";
-  regex_21 := "((..)|(.))*";
-  regex_22 := "((..)|(.))";
-  regex_23 := "((..)|(.))((..)|(.))";
-  regex_24 := "((..)|(.))((..)|(.))((..)|(.))";
-  regex_25 := "((..)|(.)){1}";
-  regex_26 := "((..)|(.)){2}";
-  regex_27 := "((..)|(.)){3}";
-  regex_28 := "((..)|(.))*";
-  regex_29 := "((..)|(.))";
-  regex_30 := "((..)|(.))((..)|(.))";
-  regex_31 := "((..)|(.))((..)|(.))((..)|(.))";
-  regex_32 := "((..)|(.)){1}";
-  regex_33 := "((..)|(.)){2}";
-  regex_34 := "((..)|(.)){3}";
-  regex_35 := "((..)|(.))*";
-  regex_36 := "((..)|(.))";
-  regex_37 := "((..)|(.))((..)|(.))";
-  regex_38 := "((..)|(.))((..)|(.))((..)|(.))";
-  regex_39 := "((..)|(.)){1}";
-  regex_40 := "((..)|(.)){2}";
-  regex_41 := "((..)|(.)){3}";
-  regex_42 := "((..)|(.))*";
-  regex_43 := "((..)|(.))";
-  regex_44 := "((..)|(.))((..)|(.))";
-  regex_45 := "((..)|(.))((..)|(.))((..)|(.))";
-  regex_46 := "((..)|(.)){1}";
-  regex_47 := "((..)|(.)){2}";
-  regex_48 := "((..)|(.)){3}";
-  regex_49 := "((..)|(.))*";
-  regex_100 := "X(.?){0,}Y";
-  regex_101 := "X(.?){1,}Y";
-  regex_102 := "X(.?){2,}Y";
-  regex_103 := "X(.?){3,}Y";
-  regex_104 := "X(.?){4,}Y";
-  regex_105 := "X(.?){5,}Y";
-  regex_106 := "X(.?){6,}Y";
-  regex_107 := "X(.?){7,}Y";
-  regex_108 := "X(.?){8,}Y";
-  regex_110 := "X(.?){0,8}Y";
-  regex_111 := "X(.?){1,8}Y";
-  regex_112 := "X(.?){2,8}Y";
-  regex_113 := "X(.?){3,8}Y";
-  regex_114 := "X(.?){4,8}Y";
-  regex_115 := "X(.?){5,8}Y";
-  regex_116 := "X(.?){6,8}Y";
-  regex_117 := "X(.?){7,8}Y";
-  regex_118 := "X(.?){8,8}Y";
-  regex_260 := "(a|ab|c|bcd){0,}(d*)";
-  regex_261 := "(a|ab|c|bcd){1,}(d*)";
-  regex_262 := "(a|ab|c|bcd){2,}(d*)";
-  regex_263 := "(a|ab|c|bcd){3,}(d*)";
-  regex_264 := "(a|ab|c|bcd){4,}(d*)";
-  regex_265 := "(a|ab|c|bcd){0,10}(d*)";
-  regex_266 := "(a|ab|c|bcd){1,10}(d*)";
-  regex_267 := "(a|ab|c|bcd){2,10}(d*)";
-  regex_268 := "(a|ab|c|bcd){3,10}(d*)";
-  regex_269 := "(a|ab|c|bcd){4,10}(d*)";
-  regex_270 := "(a|ab|c|bcd)*(d*)";
-  regex_271 := "(a|ab|c|bcd)+(d*)";
-  run: (this) = {
-    std::cout << "Running repetition2:"<< std::endl;
-    test(regex_1, "1", "((..)|(.))", "NULL", "NOMATCH");
-    test(regex_2, "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH");
-    test(regex_3, "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH");
-    test(regex_4, "4", "((..)|(.)){1}", "NULL", "NOMATCH");
-    test(regex_5, "5", "((..)|(.)){2}", "NULL", "NOMATCH");
-    test(regex_6, "6", "((..)|(.)){3}", "NULL", "NOMATCH");
-    test(regex_7, "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)");
-    test(regex_8, "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)");
-    test(regex_9, "9", "((..)|(.))((..)|(.))", "a", "NOMATCH");
-    test(regex_10, "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH");
-    test(regex_11, "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)");
-    test(regex_12, "12", "((..)|(.)){2}", "a", "NOMATCH");
-    test(regex_13, "13", "((..)|(.)){3}", "a", "NOMATCH");
-    test(regex_14, "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)");
-    test(regex_15, "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_16, "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)");
-    test(regex_17, "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH");
-    test(regex_18, "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_19, "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)");
-    test(regex_20, "20", "((..)|(.)){3}", "aa", "NOMATCH");
-    test(regex_21, "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_22, "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_23, "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)");
-    test(regex_24, "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)");
-    test(regex_25, "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_26, "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)");
-    test(regex_27, "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)");
-    test(regex_28, "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)");
-    test(regex_29, "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_30, "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)");
-    test(regex_31, "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)");
-    test(regex_32, "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_33, "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_34, "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)");
-    test(regex_35, "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_36, "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_37, "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)");
-    test(regex_38, "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)");
-    test(regex_39, "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_40, "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_41, "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)");
-    test(regex_42, "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)");
-    test(regex_43, "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_44, "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)");
-    test(regex_45, "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)");
-    test(regex_46, "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_47, "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_48, "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)");
-    test(regex_49, "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)");
-    test(regex_100, "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_101, "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_102, "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_103, "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_104, "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_105, "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_106, "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_107, "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_108, "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)");
-    test(regex_110, "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_111, "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_112, "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_113, "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_114, "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_115, "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_116, "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_117, "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_118, "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)");
-    test(regex_260, "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_261, "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_262, "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_263, "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_264, "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH");
-    test(regex_265, "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_266, "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_267, "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_268, "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_269, "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH");
-    test(regex_270, "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_271, "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    std::cout << std::endl;
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply.";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
   }
-}
-test_totest: @regex type = {
-  regex_01 := "a+";
-  regex_03 := "(a?)((ab)?)";
-  regex_04 := "(a?)((ab)?)(b?)";
-  regex_05 := "((a?)((ab)?))(b?)";
-  regex_06 := "(a?)(((ab)?)(b?))";
-  regex_07 := "(.?)";
-  regex_08 := "(.?){1}";
-  regex_09 := "(.?)(.?)";
-  regex_10 := "(.?){2}";
-  regex_11 := "(.?)*";
-  regex_12 := "(.?.?)";
-  regex_13 := "(.?.?){1}";
-  regex_14 := "(.?.?)(.?.?)";
-  regex_15 := "(.?.?){2}";
-  regex_16 := "(.?.?)(.?.?)(.?.?)";
-  regex_17 := "(.?.?){3}";
-  regex_18 := "(.?.?)*";
-  regex_19 := "a?((ab)?)(b?)";
-  regex_20 := "(a?)((ab)?)b?";
-  regex_21 := "a?((ab)?)b?";
-  regex_22 := "(a*){2}";
-  regex_23 := "(ab?)(b?a)";
-  regex_24 := "(a|ab)(ba|a)";
-  regex_25 := "(a|ab|ba)";
-  regex_26 := "(a|ab|ba)(a|ab|ba)";
-  regex_27 := "(a|ab|ba)*";
-  regex_28 := "(aba|a*b)";
-  regex_29 := "(aba|a*b)(aba|a*b)";
-  regex_1029 := "(aba|a*b)(aba|a*b)(aba|a*b)";
-  regex_30 := "(aba|a*b)*";
-  regex_31 := "(aba|ab|a)";
-  regex_32 := "(aba|ab|a)(aba|ab|a)";
-  regex_1032 := "(aba|ab|a)(aba|ab|a)(aba|ab|a)";
-  regex_33 := "(aba|ab|a)*";
-  regex_34 := "(a(b)?)";
-  regex_35 := "(a(b)?)(a(b)?)";
-  regex_36 := "(a(b)?)+";
-  regex_37 := "(.*)(.*)";
-  regex_38 := ".*(.*)";
-  regex_39 := "(a.*z|b.*y)";
-  regex_40 := "(a.*z|b.*y)(a.*z|b.*y)";
-  regex_41 := "(a.*z|b.*y)*";
-  regex_42 := "(.|..)(.*)";
-  regex_43 := "((..)*(...)*)";
-  regex_44 := "((..)*(...)*)((..)*(...)*)";
-  regex_45 := "((..)*(...)*)*";
-  regex_83 := "(aa(b(b))?)+";
-  regex_84 := "(a(b)?)+";
-  regex_85 := "([ab]+)([bc]+)([cd]*)";
-  regex_90 := "^(A([^B]*))?(B(.*))?";
-  regex_91 := "^(A([^B]*))?(B(.*))?";
-  regex_110 := "(^){0,3}";
-  regex_111 := "(\$){0,3}";
-  regex_112 := "(^){1,3}";
-  regex_113 := "(\$){1,3}";
-  regex_200 := "((s^)|(s)|(^)|(\$)|(^.))*";
-  regex_201 := "s(()|^)e";
-  regex_202 := "s(^|())e";
-  regex_203 := "s(^|())e";
-  regex_204 := "s()?e";
-  regex_205 := "s(^)?e";
-  regex_206 := "((s)|(e)|(a))*";
-  regex_207 := "((s)|(e)|())*";
-  regex_208 := "((b*)|c(c*))*";
-  regex_209 := "(yyy|(x?)){2,4}";
-  regex_210 := "(\$)|()";
-  regex_211 := "\$()|^()";
-  regex_212 := "^()|\$()";
-  regex_213 := "(\$)?(.)";
-  regex_214 := "(.|()|())*";
-  regex_215 := "((a)|(b)){2,}";
-  regex_216 := ".()|((.)?)";
-  regex_217 := "(.|\$){2,}";
-  regex_218 := "(.|\$){2,2}";
-  regex_219 := "(.){2,}";
-  regex_220 := "(a|())(b|())(c|())";
-  regex_230 := "ab()c|ab()c()";
-  regex_250 := "(b(c)|d(e))*";
-  regex_251 := "(a(b)*)*";
-  run: (this) = {
-    std::cout << "Running totest:"<< std::endl;
-    test(regex_01, "01", "a+", "xaax", "(1,3)");
-    test(regex_03, "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)");
-    test(regex_04, "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)");
-    test(regex_05, "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)");
-    test(regex_06, "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)");
-    test(regex_07, "07", "(.?)", "x", "(0,1)(0,1)");
-    test(regex_08, "08", "(.?){1}", "x", "(0,1)(0,1)");
-    test(regex_09, "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)");
-    test(regex_10, "10", "(.?){2}", "x", "(0,1)(1,1)");
-    test(regex_11, "11", "(.?)*", "x", "(0,1)(0,1)");
-    test(regex_12, "12", "(.?.?)", "xxx", "(0,2)(0,2)");
-    test(regex_13, "13", "(.?.?){1}", "xxx", "(0,2)(0,2)");
-    test(regex_14, "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)");
-    test(regex_15, "15", "(.?.?){2}", "xxx", "(0,3)(2,3)");
-    test(regex_16, "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)");
-    test(regex_17, "17", "(.?.?){3}", "xxx", "(0,3)(3,3)");
-    test(regex_18, "18", "(.?.?)*", "xxx", "(0,3)(2,3)");
-    test(regex_19, "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)");
-    test(regex_20, "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)");
-    test(regex_21, "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)");
-    test(regex_22, "22", "(a*){2}", "xxxxx", "(0,0)(0,0)");
-    test(regex_23, "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)");
-    test(regex_24, "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)");
-    test(regex_25, "25", "(a|ab|ba)", "aba", "(0,2)(0,2)");
-    test(regex_26, "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)");
-    test(regex_27, "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)");
-    test(regex_28, "28", "(aba|a*b)", "ababa", "(0,3)(0,3)");
-    test(regex_29, "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)");
-    test(regex_1029, "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH");
-    test(regex_30, "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)");
-    test(regex_31, "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)");
-    test(regex_32, "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)");
-    test(regex_1032, "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)");
-    test(regex_33, "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)");
-    test(regex_34, "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)");
-    test(regex_35, "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)");
-    test(regex_36, "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)");
-    test(regex_37, "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)");
-    test(regex_38, "38", ".*(.*)", "xx", "(0,2)(2,2)");
-    test(regex_39, "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)");
-    test(regex_40, "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)");
-    test(regex_41, "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)");
-    test(regex_42, "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)");
-    test(regex_43, "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)");
-    test(regex_44, "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)");
-    test(regex_45, "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)");
-    test(regex_83, "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)");
-    test(regex_84, "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)");
-    test(regex_85, "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_90, "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)");
-    test(regex_91, "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)");
-    test(regex_110, "110", "(^){0,3}", "a", "(0,0)(0,0)");
-    test(regex_111, "111", "(\\$){0,3}", "a", "(0,0)(?,?)");
-    test(regex_112, "112", "(^){1,3}", "a", "(0,0)(0,0)");
-    test(regex_113, "113", "(\\$){1,3}", "a", "(1,1)(1,1)");
-    test(regex_200, "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)");
-    test(regex_201, "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)");
-    test(regex_202, "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)");
-    test(regex_203, "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)");
-    test(regex_204, "204", "s()?e", "searchme", "(0,2)(1,1)");
-    test(regex_205, "205", "s(^)?e", "searchme", "(0,2)(?,?)");
-    test(regex_206, "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)");
-    test(regex_207, "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)");
-    test(regex_208, "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)");
-    test(regex_209, "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)");
-    test(regex_210, "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)");
-    test(regex_211, "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)");
-    test(regex_212, "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)");
-    test(regex_213, "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)");
-    test(regex_214, "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)");
-    test(regex_215, "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)");
-    test(regex_216, "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)");
-    test(regex_217, "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)");
-    test(regex_218, "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)");
-    test(regex_219, "219", "(.){2,}", "xx", "(0,2)(1,2)");
-    test(regex_220, "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)");
-    test(regex_230, "230", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)");
-    test(regex_250, "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)");
-    test(regex_251, "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)");
-    std::cout << std::endl;
+
+  if !warning.empty() {
+    warning += " ";
   }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
 }
-test_osx_bsd_critical: @regex type = {
-  regex_1 := "(()|.)(b)";
-  regex_M1 := "(()|.)(b)";
-  regex_2 := "(()|[ab])(b)";
-  regex_M2 := "(()|[ab])(b)";
-  regex_3 := "(()|[ab])+b";
-  regex_M3 := "(()|[ab])+b";
-  regex_11 := "(.|())(b)";
-  regex_12 := "([ab]|())(b)";
-  regex_14 := "([ab]|())+b";
-  regex_M14 := "([ab]|())+b";
-  regex_20 := "(.?)(b)";
+
+
+test_perl_tests: @regex type = {
+  regex_0 := "abc";
+  var_regex_0 : std::string = "abc";
+  regex_1 := "abc";
+  var_regex_1 : std::string = "abc";
+  regex_2 := "abc";
+  var_regex_2 : std::string = "abc";
+  regex_3 := "abc";
+  var_regex_3 : std::string = "abc";
+  regex_4 := "abc";
+  var_regex_4 : std::string = "abc";
+  regex_5 := "abc";
+  var_regex_5 : std::string = "abc";
+  regex_6 := "abc";
+  var_regex_6 : std::string = "abc";
+  regex_7 := "abc";
+  var_regex_7 : std::string = "abc";
+  regex_8 := "abc";
+  var_regex_8 : std::string = "abc";
+  regex_9 := "abc";
+  var_regex_9 : std::string = "abc";
+  regex_10 := "abc";
+  var_regex_10 : std::string = "abc";
+  regex_11 := "abc";
+  var_regex_11 : std::string = "abc";
+  regex_12 := "ab*c";
+  var_regex_12 : std::string = "ab*c";
+  regex_13 := "ab*c";
+  var_regex_13 : std::string = "ab*c";
+  regex_14 := "ab*c";
+  var_regex_14 : std::string = "ab*c";
+  regex_15 := "ab*bc";
+  var_regex_15 : std::string = "ab*bc";
+  regex_16 := "ab*bc";
+  var_regex_16 : std::string = "ab*bc";
+  regex_17 := "ab*bc";
+  var_regex_17 : std::string = "ab*bc";
+  regex_18 := "ab*bc";
+  var_regex_18 : std::string = "ab*bc";
+  regex_19 := "ab*bc";
+  var_regex_19 : std::string = "ab*bc";
+  regex_20 := "ab*bc";
+  var_regex_20 : std::string = "ab*bc";
+  regex_21 := "ab*bc";
+  var_regex_21 : std::string = "ab*bc";
+  regex_22 := "ab*bc";
+  var_regex_22 : std::string = "ab*bc";
+  regex_23 := "ab*bc";
+  var_regex_23 : std::string = "ab*bc";
+  regex_24 := ".{1}";
+  var_regex_24 : std::string = ".{1}";
+  regex_25 := ".{1}";
+  var_regex_25 : std::string = ".{1}";
+  regex_26 := ".{1}";
+  var_regex_26 : std::string = ".{1}";
+  regex_27 := ".{3,4}";
+  var_regex_27 : std::string = ".{3,4}";
+  regex_28 := ".{3,4}";
+  var_regex_28 : std::string = ".{3,4}";
+  regex_29 := ".{3,4}";
+  var_regex_29 : std::string = ".{3,4}";
+  regex_30 := "\N{1}";
+  var_regex_30 : std::string = "\\N{1}";
+  regex_31 := "\N{1}";
+  var_regex_31 : std::string = "\\N{1}";
+  regex_32 := "\N{1}";
+  var_regex_32 : std::string = "\\N{1}";
+  regex_33 := "\N{3,4}";
+  var_regex_33 : std::string = "\\N{3,4}";
+  regex_34 := "\N{3,4}";
+  var_regex_34 : std::string = "\\N{3,4}";
+  regex_35 := "\N{3,4}";
+  var_regex_35 : std::string = "\\N{3,4}";
+  regex_36 := "\N{ 3 , 4 }";
+  var_regex_36 : std::string = "\\N{ 3 , 4 }";
+  regex_37 := "ab{0,}bc";
+  var_regex_37 : std::string = "ab{0,}bc";
+  regex_38 := "ab{0,}bc";
+  var_regex_38 : std::string = "ab{0,}bc";
+  regex_39 := "ab{0,}bc";
+  var_regex_39 : std::string = "ab{0,}bc";
+  regex_40 := "ab+bc";
+  var_regex_40 : std::string = "ab+bc";
+  regex_41 := "ab+bc";
+  var_regex_41 : std::string = "ab+bc";
+  regex_42 := "ab+bc";
+  var_regex_42 : std::string = "ab+bc";
+  regex_43 := "ab+bc";
+  var_regex_43 : std::string = "ab+bc";
+  regex_44 := "ab+bc";
+  var_regex_44 : std::string = "ab+bc";
+  regex_45 := "ab{1,}bc";
+  var_regex_45 : std::string = "ab{1,}bc";
+  regex_46 := "ab+bc";
+  var_regex_46 : std::string = "ab+bc";
+  regex_47 := "ab+bc";
+  var_regex_47 : std::string = "ab+bc";
+  regex_48 := "ab+bc";
+  var_regex_48 : std::string = "ab+bc";
+  regex_49 := "ab{1,}bc";
+  var_regex_49 : std::string = "ab{1,}bc";
+  regex_50 := "ab{1,}bc";
+  var_regex_50 : std::string = "ab{1,}bc";
+  regex_51 := "ab{1,}bc";
+  var_regex_51 : std::string = "ab{1,}bc";
+  regex_52 := "ab{1,3}bc";
+  var_regex_52 : std::string = "ab{1,3}bc";
+  regex_53 := "ab{1,3}bc";
+  var_regex_53 : std::string = "ab{1,3}bc";
+  regex_54 := "ab{1,3}bc";
+  var_regex_54 : std::string = "ab{1,3}bc";
+  regex_55 := "ab{3,4}bc";
+  var_regex_55 : std::string = "ab{3,4}bc";
+  regex_56 := "ab{3,4}bc";
+  var_regex_56 : std::string = "ab{3,4}bc";
+  regex_57 := "ab{3,4}bc";
+  var_regex_57 : std::string = "ab{3,4}bc";
+  regex_58 := "ab{4,5}bc";
+  var_regex_58 : std::string = "ab{4,5}bc";
+  regex_59 := "ab?bc";
+  var_regex_59 : std::string = "ab?bc";
+  regex_60 := "ab?bc";
+  var_regex_60 : std::string = "ab?bc";
+  regex_61 := "ab{0,1}bc";
+  var_regex_61 : std::string = "ab{0,1}bc";
+  regex_62 := "ab?bc";
+  var_regex_62 : std::string = "ab?bc";
+  regex_63 := "ab?c";
+  var_regex_63 : std::string = "ab?c";
+  regex_64 := "ab{0,1}c";
+  var_regex_64 : std::string = "ab{0,1}c";
+  regex_65 := "^abc\$";
+  var_regex_65 : std::string = "^abc\$";
+  regex_66 := "^abc\$";
+  var_regex_66 : std::string = "^abc\$";
+  regex_67 := "^abc";
+  var_regex_67 : std::string = "^abc";
+  regex_68 := "^abc\$";
+  var_regex_68 : std::string = "^abc\$";
+  regex_69 := "abc\$";
+  var_regex_69 : std::string = "abc\$";
+  regex_70 := "abc\$";
+  var_regex_70 : std::string = "abc\$";
+  regex_71 := "^";
+  var_regex_71 : std::string = "^";
+  regex_72 := "\$";
+  var_regex_72 : std::string = "\$";
+  regex_73 := "a.c";
+  var_regex_73 : std::string = "a.c";
+  regex_74 := "a.c";
+  var_regex_74 : std::string = "a.c";
+  regex_75 := "a\Nc";
+  var_regex_75 : std::string = "a\\Nc";
+  regex_76 := "a.*c";
+  var_regex_76 : std::string = "a.*c";
+  regex_77 := "a\N*c";
+  var_regex_77 : std::string = "a\\N*c";
+  regex_78 := "a.*c";
+  var_regex_78 : std::string = "a.*c";
+  regex_79 := "a\N*c";
+  var_regex_79 : std::string = "a\\N*c";
+  regex_80 := "a[bc]d";
+  var_regex_80 : std::string = "a[bc]d";
+  regex_81 := "a[bc]d";
+  var_regex_81 : std::string = "a[bc]d";
+  regex_82 := "a[b]d";
+  var_regex_82 : std::string = "a[b]d";
+  regex_83 := "[a][b][d]";
+  var_regex_83 : std::string = "[a][b][d]";
+  regex_84 := ".[b].";
+  var_regex_84 : std::string = ".[b].";
+  regex_85 := ".[b].";
+  var_regex_85 : std::string = ".[b].";
+  regex_86 := "a[b-d]e";
+  var_regex_86 : std::string = "a[b-d]e";
+  regex_87 := "a[b-d]e";
+  var_regex_87 : std::string = "a[b-d]e";
+  regex_88 := "a[b-d]";
+  var_regex_88 : std::string = "a[b-d]";
+  regex_89 := "a[-b]";
+  var_regex_89 : std::string = "a[-b]";
+  regex_90 := "a[b-]";
+  var_regex_90 : std::string = "a[b-]";
+  regex_91 := "a]";
+  var_regex_91 : std::string = "a]";
+  regex_92 := "a[]]b";
+  var_regex_92 : std::string = "a[]]b";
+  regex_93 := "a[^bc]d";
+  var_regex_93 : std::string = "a[^bc]d";
+  regex_94 := "a[^bc]d";
+  var_regex_94 : std::string = "a[^bc]d";
+  regex_95 := "a[^-b]c";
+  var_regex_95 : std::string = "a[^-b]c";
+  regex_96 := "a[^-b]c";
+  var_regex_96 : std::string = "a[^-b]c";
+  regex_97 := "a[^]b]c";
+  var_regex_97 : std::string = "a[^]b]c";
+  regex_98 := "a[^]b]c";
+  var_regex_98 : std::string = "a[^]b]c";
+  regex_99 := "\ba\b";
+  var_regex_99 : std::string = "\ba\b";
+  regex_100 := "\ba\b";
+  var_regex_100 : std::string = "\ba\b";
+  regex_101 := "\ba\b";
+  var_regex_101 : std::string = "\ba\b";
+  regex_102 := "\by\b";
+  var_regex_102 : std::string = "\by\b";
+  regex_103 := "\by\b";
+  var_regex_103 : std::string = "\by\b";
+  regex_104 := "\by\b";
+  var_regex_104 : std::string = "\by\b";
+  regex_105 := "\Ba\B";
+  var_regex_105 : std::string = "\Ba\B";
+  regex_106 := "\Ba\B";
+  var_regex_106 : std::string = "\Ba\B";
+  regex_107 := "\Ba\B";
+  var_regex_107 : std::string = "\Ba\B";
+  regex_108 := "\By\b";
+  var_regex_108 : std::string = "\By\b";
+  regex_109 := "\By\b";
+  var_regex_109 : std::string = "\By\b";
+  regex_110 := "\By\b";
+  var_regex_110 : std::string = "\By\b";
+  regex_111 := "\By\b";
+  var_regex_111 : std::string = "\By\b";
+  regex_112 := "\by\B";
+  var_regex_112 : std::string = "\by\B";
+  regex_113 := "\By\B";
+  var_regex_113 : std::string = "\By\B";
+  regex_114 := "\b";
+  var_regex_114 : std::string = "\b";
+  regex_115 := "\B";
+  var_regex_115 : std::string = "\B";
+  regex_116 := "\w";
+  var_regex_116 : std::string = "\w";
+  regex_117 := "\w";
+  var_regex_117 : std::string = "\w";
+  regex_118 := "\W";
+  var_regex_118 : std::string = "\W";
+  regex_119 := "\W";
+  var_regex_119 : std::string = "\W";
+  regex_120 := "a\sb";
+  var_regex_120 : std::string = "a\sb";
+  regex_121 := "a\sb";
+  var_regex_121 : std::string = "a\sb";
+  regex_122 := "a\Sb";
+  var_regex_122 : std::string = "a\Sb";
+  regex_123 := "a\Sb";
+  var_regex_123 : std::string = "a\Sb";
+  regex_124 := "\d";
+  var_regex_124 : std::string = "\d";
+  regex_125 := "\d";
+  var_regex_125 : std::string = "\d";
+  regex_126 := "\D";
+  var_regex_126 : std::string = "\D";
+  regex_127 := "\D";
+  var_regex_127 : std::string = "\D";
+  regex_128 := "[\w]";
+  var_regex_128 : std::string = "[\w]";
+  regex_129 := "[\w]";
+  var_regex_129 : std::string = "[\w]";
+  regex_130 := "[\W]";
+  var_regex_130 : std::string = "[\W]";
+  regex_131 := "[\W]";
+  var_regex_131 : std::string = "[\W]";
+  regex_132 := "a[\s]b";
+  var_regex_132 : std::string = "a[\s]b";
+  regex_133 := "a[\s]b";
+  var_regex_133 : std::string = "a[\s]b";
+  regex_134 := "a[\S]b";
+  var_regex_134 : std::string = "a[\S]b";
+  regex_135 := "a[\S]b";
+  var_regex_135 : std::string = "a[\S]b";
+  regex_136 := "[\d]";
+  var_regex_136 : std::string = "[\d]";
+  regex_137 := "[\d]";
+  var_regex_137 : std::string = "[\d]";
+  regex_138 := "[\D]";
+  var_regex_138 : std::string = "[\D]";
+  regex_139 := "[\D]";
+  var_regex_139 : std::string = "[\D]";
+  regex_140 := "ab|cd";
+  var_regex_140 : std::string = "ab|cd";
+  regex_141 := "ab|cd";
+  var_regex_141 : std::string = "ab|cd";
+  regex_142 := "()ef";
+  var_regex_142 : std::string = "()ef";
+  regex_143 := "()ef";
+  var_regex_143 : std::string = "()ef";
+  regex_144 := "()ef";
+  var_regex_144 : std::string = "()ef";
+  regex_145 := "()ef";
+  var_regex_145 : std::string = "()ef";
+  regex_146 := "()ef";
+  var_regex_146 : std::string = "()ef";
+  regex_147 := "\$b";
+  var_regex_147 : std::string = "\$b";
+  regex_148 := "a\(b";
+  var_regex_148 : std::string = "a\(b";
+  regex_149 := "a\(*b";
+  var_regex_149 : std::string = "a\(*b";
+  regex_150 := "a\(*b";
+  var_regex_150 : std::string = "a\(*b";
+  regex_151 := "a\\b";
+  var_regex_151 : std::string = "a\\b";
+  regex_152 := "((a))";
+  var_regex_152 : std::string = "((a))";
+  regex_153 := "((a))";
+  var_regex_153 : std::string = "((a))";
+  regex_154 := "((a))";
+  var_regex_154 : std::string = "((a))";
+  regex_155 := "(foo)(\g-2)";
+  var_regex_155 : std::string = "(foo)(\g-2)";
+  regex_156 := "(foo)(\g-2)(foo)(\g-2)";
+  var_regex_156 : std::string = "(foo)(\g-2)(foo)(\g-2)";
+  regex_157 := "(([abc]+) \g-1)(([abc]+) \g{-1})";
+  var_regex_157 : std::string = "(([abc]+) \g-1)(([abc]+) \g{-1})";
+  regex_158 := "(a)(b)(c)\g1\g2\g3";
+  var_regex_158 : std::string = "(a)(b)(c)\g1\g2\g3";
+  regex_159 := "abc";
+  regex_159_mod := "i";
+  var_regex_159 : std::string = "abc";
+  regex_160 := "abc";
+  regex_160_mod := "i";
+  var_regex_160 : std::string = "abc";
+  regex_161 := "abc";
+  regex_161_mod := "i";
+  var_regex_161 : std::string = "abc";
+  regex_162 := "abc";
+  regex_162_mod := "i";
+  var_regex_162 : std::string = "abc";
+  regex_163 := "abc";
+  regex_163_mod := "i";
+  var_regex_163 : std::string = "abc";
+  regex_164 := "abc";
+  regex_164_mod := "i";
+  var_regex_164 : std::string = "abc";
+  regex_165 := "ab*c";
+  regex_165_mod := "i";
+  var_regex_165 : std::string = "ab*c";
+  regex_166 := "ab*bc";
+  regex_166_mod := "i";
+  var_regex_166 : std::string = "ab*bc";
+  regex_167 := "ab*bc";
+  regex_167_mod := "i";
+  var_regex_167 : std::string = "ab*bc";
+  regex_168 := "ab*?bc";
+  regex_168_mod := "i";
+  var_regex_168 : std::string = "ab*?bc";
+  regex_169 := "ab{0,}?bc";
+  regex_169_mod := "i";
+  var_regex_169 : std::string = "ab{0,}?bc";
+  regex_170 := "ab+?bc";
+  regex_170_mod := "i";
+  var_regex_170 : std::string = "ab+?bc";
+  regex_171 := "ab+bc";
+  regex_171_mod := "i";
+  var_regex_171 : std::string = "ab+bc";
+  regex_172 := "ab+bc";
+  regex_172_mod := "i";
+  var_regex_172 : std::string = "ab+bc";
+  regex_173 := "ab{1,}bc";
+  regex_173_mod := "i";
+  var_regex_173 : std::string = "ab{1,}bc";
+  regex_174 := "ab+bc";
+  regex_174_mod := "i";
+  var_regex_174 : std::string = "ab+bc";
+  regex_175 := "ab{1,}?bc";
+  regex_175_mod := "i";
+  var_regex_175 : std::string = "ab{1,}?bc";
+  regex_176 := "ab{1,3}?bc";
+  regex_176_mod := "i";
+  var_regex_176 : std::string = "ab{1,3}?bc";
+  regex_177 := "ab{3,4}?bc";
+  regex_177_mod := "i";
+  var_regex_177 : std::string = "ab{3,4}?bc";
+  regex_178 := "ab{4,5}?bc";
+  regex_178_mod := "i";
+  var_regex_178 : std::string = "ab{4,5}?bc";
+  regex_179 := "ab??bc";
+  regex_179_mod := "i";
+  var_regex_179 : std::string = "ab??bc";
+  regex_180 := "ab??bc";
+  regex_180_mod := "i";
+  var_regex_180 : std::string = "ab??bc";
+  regex_181 := "ab{0,1}?bc";
+  regex_181_mod := "i";
+  var_regex_181 : std::string = "ab{0,1}?bc";
+  regex_182 := "ab??bc";
+  regex_182_mod := "i";
+  var_regex_182 : std::string = "ab??bc";
+  regex_183 := "ab??c";
+  regex_183_mod := "i";
+  var_regex_183 : std::string = "ab??c";
+  regex_184 := "ab{0,1}?c";
+  regex_184_mod := "i";
+  var_regex_184 : std::string = "ab{0,1}?c";
+  regex_185 := "^abc\$";
+  regex_185_mod := "i";
+  var_regex_185 : std::string = "^abc\$";
+  regex_186 := "^abc\$";
+  regex_186_mod := "i";
+  var_regex_186 : std::string = "^abc\$";
+  regex_187 := "^abc";
+  regex_187_mod := "i";
+  var_regex_187 : std::string = "^abc";
+  regex_188 := "^abc\$";
+  regex_188_mod := "i";
+  var_regex_188 : std::string = "^abc\$";
+  regex_189 := "abc\$";
+  regex_189_mod := "i";
+  var_regex_189 : std::string = "abc\$";
+  regex_190 := "^";
+  regex_190_mod := "i";
+  var_regex_190 : std::string = "^";
+  regex_191 := "\$";
+  regex_191_mod := "i";
+  var_regex_191 : std::string = "\$";
+  regex_192 := "a.c";
+  regex_192_mod := "i";
+  var_regex_192 : std::string = "a.c";
+  regex_193 := "a.c";
+  regex_193_mod := "i";
+  var_regex_193 : std::string = "a.c";
+  regex_194 := "a\Nc";
+  regex_194_mod := "i";
+  var_regex_194 : std::string = "a\\Nc";
+  regex_195 := "a.*?c";
+  regex_195_mod := "i";
+  var_regex_195 : std::string = "a.*?c";
+  regex_196 := "a.*c";
+  regex_196_mod := "i";
+  var_regex_196 : std::string = "a.*c";
+  regex_197 := "a[bc]d";
+  regex_197_mod := "i";
+  var_regex_197 : std::string = "a[bc]d";
+  regex_198 := "a[bc]d";
+  regex_198_mod := "i";
+  var_regex_198 : std::string = "a[bc]d";
+  regex_199 := "a[b-d]e";
+  regex_199_mod := "i";
+  var_regex_199 : std::string = "a[b-d]e";
+  regex_200 := "a[b-d]e";
+  regex_200_mod := "i";
+  var_regex_200 : std::string = "a[b-d]e";
+  regex_201 := "a[b-d]";
+  regex_201_mod := "i";
+  var_regex_201 : std::string = "a[b-d]";
+  regex_202 := "a[-b]";
+  regex_202_mod := "i";
+  var_regex_202 : std::string = "a[-b]";
+  regex_203 := "a[b-]";
+  regex_203_mod := "i";
+  var_regex_203 : std::string = "a[b-]";
+  regex_204 := "a]";
+  regex_204_mod := "i";
+  var_regex_204 : std::string = "a]";
+  regex_205 := "a[]]b";
+  regex_205_mod := "i";
+  var_regex_205 : std::string = "a[]]b";
+  regex_206 := "a[^bc]d";
+  regex_206_mod := "i";
+  var_regex_206 : std::string = "a[^bc]d";
+  regex_207 := "a[^bc]d";
+  regex_207_mod := "i";
+  var_regex_207 : std::string = "a[^bc]d";
+  regex_208 := "a[^-b]c";
+  regex_208_mod := "i";
+  var_regex_208 : std::string = "a[^-b]c";
+  regex_209 := "a[^-b]c";
+  regex_209_mod := "i";
+  var_regex_209 : std::string = "a[^-b]c";
+  regex_210 := "a[^]b]c";
+  regex_210_mod := "i";
+  var_regex_210 : std::string = "a[^]b]c";
+  regex_211 := "a[^]b]c";
+  regex_211_mod := "i";
+  var_regex_211 : std::string = "a[^]b]c";
+  regex_212 := "ab|cd";
+  regex_212_mod := "i";
+  var_regex_212 : std::string = "ab|cd";
+  regex_213 := "ab|cd";
+  regex_213_mod := "i";
+  var_regex_213 : std::string = "ab|cd";
+  regex_214 := "()ef";
+  regex_214_mod := "i";
+  var_regex_214 : std::string = "()ef";
+  regex_215 := "\$b";
+  regex_215_mod := "i";
+  var_regex_215 : std::string = "\$b";
+  regex_216 := "a\(b";
+  regex_216_mod := "i";
+  var_regex_216 : std::string = "a\(b";
+  regex_217 := "a\(*b";
+  regex_217_mod := "i";
+  var_regex_217 : std::string = "a\(*b";
+  regex_218 := "a\(*b";
+  regex_218_mod := "i";
+  var_regex_218 : std::string = "a\(*b";
+  regex_219 := "a\\b";
+  regex_219_mod := "i";
+  var_regex_219 : std::string = "a\\b";
+  regex_220 := "((a))";
+  regex_220_mod := "i";
+  var_regex_220 : std::string = "((a))";
+  regex_221 := "(a)b(c)";
+  regex_221_mod := "i";
+  var_regex_221 : std::string = "(a)b(c)";
+  regex_222 := "a+b+c";
+  regex_222_mod := "i";
+  var_regex_222 : std::string = "a+b+c";
+  regex_223 := "a{1,}b{1,}c";
+  regex_223_mod := "i";
+  var_regex_223 : std::string = "a{1,}b{1,}c";
+  regex_224 := "a.+?c";
+  regex_224_mod := "i";
+  var_regex_224 : std::string = "a.+?c";
+  regex_225 := "a.*?c";
+  regex_225_mod := "i";
+  var_regex_225 : std::string = "a.*?c";
+  regex_226 := "a.{0,5}?c";
+  regex_226_mod := "i";
+  var_regex_226 : std::string = "a.{0,5}?c";
+  regex_227 := "(a+|b)*";
+  regex_227_mod := "i";
+  var_regex_227 : std::string = "(a+|b)*";
+  regex_228 := "(a+|b){0,}";
+  regex_228_mod := "i";
+  var_regex_228 : std::string = "(a+|b){0,}";
+  regex_229 := "(a+|b)+";
+  regex_229_mod := "i";
+  var_regex_229 : std::string = "(a+|b)+";
+  regex_230 := "(a+|b){1,}";
+  regex_230_mod := "i";
+  var_regex_230 : std::string = "(a+|b){1,}";
+  regex_231 := "(a+|b)?";
+  regex_231_mod := "i";
+  var_regex_231 : std::string = "(a+|b)?";
+  regex_232 := "(a+|b){0,1}";
+  regex_232_mod := "i";
+  var_regex_232 : std::string = "(a+|b){0,1}";
+  regex_233 := "(a+|b){0,1}?";
+  regex_233_mod := "i";
+  var_regex_233 : std::string = "(a+|b){0,1}?";
+  regex_234 := "[^ab]*";
+  regex_234_mod := "i";
+  var_regex_234 : std::string = "[^ab]*";
+  regex_235 := "abc";
+  regex_235_mod := "i";
+  var_regex_235 : std::string = "abc";
+  regex_236 := "a*";
+  regex_236_mod := "i";
+  var_regex_236 : std::string = "a*";
+  regex_237 := "([abc])*d";
+  regex_237_mod := "i";
+  var_regex_237 : std::string = "([abc])*d";
+  regex_238 := "([abc])*bcd";
+  regex_238_mod := "i";
+  var_regex_238 : std::string = "([abc])*bcd";
+  regex_239 := "a|b|c|d|e";
+  regex_239_mod := "i";
+  var_regex_239 : std::string = "a|b|c|d|e";
+  regex_240 := "(a|b|c|d|e)f";
+  regex_240_mod := "i";
+  var_regex_240 : std::string = "(a|b|c|d|e)f";
+  regex_241 := "abcd*efg";
+  regex_241_mod := "i";
+  var_regex_241 : std::string = "abcd*efg";
+  regex_242 := "ab*";
+  regex_242_mod := "i";
+  var_regex_242 : std::string = "ab*";
+  regex_243 := "ab*";
+  regex_243_mod := "i";
+  var_regex_243 : std::string = "ab*";
+  regex_244 := "(ab|cd)e";
+  regex_244_mod := "i";
+  var_regex_244 : std::string = "(ab|cd)e";
+  regex_245 := "[abhgefdc]ij";
+  regex_245_mod := "i";
+  var_regex_245 : std::string = "[abhgefdc]ij";
+  regex_246 := "^(ab|cd)e";
+  regex_246_mod := "i";
+  var_regex_246 : std::string = "^(ab|cd)e";
+  regex_247 := "(abc|)ef";
+  regex_247_mod := "i";
+  var_regex_247 : std::string = "(abc|)ef";
+  regex_248 := "(a|b)c*d";
+  regex_248_mod := "i";
+  var_regex_248 : std::string = "(a|b)c*d";
+  regex_249 := "(ab|ab*)bc";
+  regex_249_mod := "i";
+  var_regex_249 : std::string = "(ab|ab*)bc";
+  regex_250 := "a([bc]*)c*";
+  regex_250_mod := "i";
+  var_regex_250 : std::string = "a([bc]*)c*";
+  regex_251 := "a([bc]*)(c*d)";
+  regex_251_mod := "i";
+  var_regex_251 : std::string = "a([bc]*)(c*d)";
+  regex_252 := "a([bc]+)(c*d)";
+  regex_252_mod := "i";
+  var_regex_252 : std::string = "a([bc]+)(c*d)";
+  regex_253 := "a([bc]*)(c+d)";
+  regex_253_mod := "i";
+  var_regex_253 : std::string = "a([bc]*)(c+d)";
+  regex_254 := "a[bcd]*dcdcde";
+  regex_254_mod := "i";
+  var_regex_254 : std::string = "a[bcd]*dcdcde";
+  regex_255 := "a[bcd]+dcdcde";
+  regex_255_mod := "i";
+  var_regex_255 : std::string = "a[bcd]+dcdcde";
+  regex_256 := "(ab|a)b*c";
+  regex_256_mod := "i";
+  var_regex_256 : std::string = "(ab|a)b*c";
+  regex_257 := "((a)(b)c)(d)";
+  regex_257_mod := "i";
+  var_regex_257 : std::string = "((a)(b)c)(d)";
+  regex_258 := "[a-zA-Z_][a-zA-Z0-9_]*";
+  regex_258_mod := "i";
+  var_regex_258 : std::string = "[a-zA-Z_][a-zA-Z0-9_]*";
+  regex_259 := "^a(bc+|b[eh])g|.h\$";
+  regex_259_mod := "i";
+  var_regex_259 : std::string = "^a(bc+|b[eh])g|.h\$";
+  regex_260 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_260_mod := "i";
+  var_regex_260 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_261 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_261_mod := "i";
+  var_regex_261 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_262 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_262_mod := "i";
+  var_regex_262 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_263 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_263_mod := "i";
+  var_regex_263 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_264 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_264_mod := "i";
+  var_regex_264 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_265 := "((((((((((a))))))))))";
+  regex_265_mod := "i";
+  var_regex_265 : std::string = "((((((((((a))))))))))";
+  regex_266 := "((((((((((a))))))))))\10";
+  regex_266_mod := "i";
+  var_regex_266 : std::string = "((((((((((a))))))))))\10";
+  regex_267 := "(((((((((a)))))))))";
+  regex_267_mod := "i";
+  var_regex_267 : std::string = "(((((((((a)))))))))";
+  regex_268 := "multiple words of text";
+  regex_268_mod := "i";
+  var_regex_268 : std::string = "multiple words of text";
+  regex_269 := "multiple words";
+  regex_269_mod := "i";
+  var_regex_269 : std::string = "multiple words";
+  regex_270 := "(.*)c(.*)";
+  regex_270_mod := "i";
+  var_regex_270 : std::string = "(.*)c(.*)";
+  regex_271 := "\((.*), (.*)\)";
+  regex_271_mod := "i";
+  var_regex_271 : std::string = "\((.*), (.*)\)";
+  regex_272 := "[k]";
+  regex_272_mod := "i";
+  var_regex_272 : std::string = "[k]";
+  regex_273 := "abcd";
+  regex_273_mod := "i";
+  var_regex_273 : std::string = "abcd";
+  regex_274 := "a(bc)d";
+  regex_274_mod := "i";
+  var_regex_274 : std::string = "a(bc)d";
+  regex_275 := "a[-]?c";
+  regex_275_mod := "i";
+  var_regex_275 : std::string = "a[-]?c";
+  regex_276 := "(abc)\1";
+  regex_276_mod := "i";
+  var_regex_276 : std::string = "(abc)\1";
+  regex_277 := "([a-c]*)\1";
+  regex_277_mod := "i";
+  var_regex_277 : std::string = "([a-c]*)\1";
+  regex_278 := "a++a";
+  var_regex_278 : std::string = "a++a";
+  regex_279 := "a*+a";
+  var_regex_279 : std::string = "a*+a";
+  regex_280 := "a{1,5}+a";
+  var_regex_280 : std::string = "a{1,5}+a";
+  regex_281 := "a?+a";
+  var_regex_281 : std::string = "a?+a";
+  regex_282 := "a++b";
+  var_regex_282 : std::string = "a++b";
+  regex_283 := "a*+b";
+  var_regex_283 : std::string = "a*+b";
+  regex_284 := "a{1,5}+b";
+  var_regex_284 : std::string = "a{1,5}+b";
+  regex_285 := "a?+b";
+  var_regex_285 : std::string = "a?+b";
+  regex_286 := "fooa++a";
+  var_regex_286 : std::string = "fooa++a";
+  regex_287 := "fooa*+a";
+  var_regex_287 : std::string = "fooa*+a";
+  regex_288 := "fooa{1,5}+a";
+  var_regex_288 : std::string = "fooa{1,5}+a";
+  regex_289 := "fooa?+a";
+  var_regex_289 : std::string = "fooa?+a";
+  regex_290 := "fooa++b";
+  var_regex_290 : std::string = "fooa++b";
+  regex_291 := "fooa*+b";
+  var_regex_291 : std::string = "fooa*+b";
+  regex_292 := "fooa{1,5}+b";
+  var_regex_292 : std::string = "fooa{1,5}+b";
+  regex_293 := "fooa?+b";
+  var_regex_293 : std::string = "fooa?+b";
+  regex_294 := "(aA)++(aA)";
+  var_regex_294 : std::string = "(aA)++(aA)";
+  regex_295 := "(aA|bB)++(aA|bB)";
+  var_regex_295 : std::string = "(aA|bB)++(aA|bB)";
+  regex_296 := "(aA)*+(aA)";
+  var_regex_296 : std::string = "(aA)*+(aA)";
+  regex_297 := "(aA|bB)*+(aA|bB)";
+  var_regex_297 : std::string = "(aA|bB)*+(aA|bB)";
+  regex_298 := "(aA){1,5}+(aA)";
+  var_regex_298 : std::string = "(aA){1,5}+(aA)";
+  regex_299 := "(aA|bB){1,5}+(aA|bB)";
+  var_regex_299 : std::string = "(aA|bB){1,5}+(aA|bB)";
+  regex_300 := "(aA)?+(aA)";
+  var_regex_300 : std::string = "(aA)?+(aA)";
+  regex_301 := "(aA|bB)?+(aA|bB)";
+  var_regex_301 : std::string = "(aA|bB)?+(aA|bB)";
+  regex_302 := "(aA)++b";
+  var_regex_302 : std::string = "(aA)++b";
+  regex_303 := "(aA|bB)++b";
+  var_regex_303 : std::string = "(aA|bB)++b";
+  regex_304 := "(aA)*+b";
+  var_regex_304 : std::string = "(aA)*+b";
+  regex_305 := "(aA|bB)*+b";
+  var_regex_305 : std::string = "(aA|bB)*+b";
+  regex_306 := "(aA){1,5}+b";
+  var_regex_306 : std::string = "(aA){1,5}+b";
+  regex_307 := "(aA|bB){1,5}+b";
+  var_regex_307 : std::string = "(aA|bB){1,5}+b";
+  regex_308 := "(aA)?+b";
+  var_regex_308 : std::string = "(aA)?+b";
+  regex_309 := "(aA|bB)?+b";
+  var_regex_309 : std::string = "(aA|bB)?+b";
+  regex_310 := "foo(aA)++(aA)";
+  var_regex_310 : std::string = "foo(aA)++(aA)";
+  regex_311 := "foo(aA|bB)++(aA|bB)";
+  var_regex_311 : std::string = "foo(aA|bB)++(aA|bB)";
+  regex_312 := "foo(aA)*+(aA)";
+  var_regex_312 : std::string = "foo(aA)*+(aA)";
+  regex_313 := "foo(aA|bB)*+(aA|bB)";
+  var_regex_313 : std::string = "foo(aA|bB)*+(aA|bB)";
+  regex_314 := "foo(aA){1,5}+(aA)";
+  var_regex_314 : std::string = "foo(aA){1,5}+(aA)";
+  regex_315 := "foo(aA|bB){1,5}+(aA|bB)";
+  var_regex_315 : std::string = "foo(aA|bB){1,5}+(aA|bB)";
+  regex_316 := "foo(aA)?+(aA)";
+  var_regex_316 : std::string = "foo(aA)?+(aA)";
+  regex_317 := "foo(aA|bB)?+(aA|bB)";
+  var_regex_317 : std::string = "foo(aA|bB)?+(aA|bB)";
+  regex_318 := "foo(aA)++b";
+  var_regex_318 : std::string = "foo(aA)++b";
+  regex_319 := "foo(aA|bB)++b";
+  var_regex_319 : std::string = "foo(aA|bB)++b";
+  regex_320 := "foo(aA)*+b";
+  var_regex_320 : std::string = "foo(aA)*+b";
+  regex_321 := "foo(aA|bB)*+b";
+  var_regex_321 : std::string = "foo(aA|bB)*+b";
+  regex_322 := "foo(aA){1,5}+b";
+  var_regex_322 : std::string = "foo(aA){1,5}+b";
+  regex_323 := "foo(aA|bB){1,5}+b";
+  var_regex_323 : std::string = "foo(aA|bB){1,5}+b";
+  regex_324 := "foo(aA)?+b";
+  var_regex_324 : std::string = "foo(aA)?+b";
+  regex_325 := "foo(aA|bB)?+b";
+  var_regex_325 : std::string = "foo(aA|bB)?+b";
+  regex_326 := "foo(\h+)bar";
+  var_regex_326 : std::string = "foo(\h+)bar";
+  regex_327 := "(\H+)(\h)";
+  var_regex_327 : std::string = "(\H+)(\h)";
+  regex_328 := "(\h+)(\H)";
+  var_regex_328 : std::string = "(\h+)(\H)";
+  regex_329 := "foo(\h)bar";
+  var_regex_329 : std::string = "foo(\h)bar";
+  regex_330 := "(\H)(\h)";
+  var_regex_330 : std::string = "(\H)(\h)";
+  regex_331 := "(\h)(\H)";
+  var_regex_331 : std::string = "(\h)(\H)";
+  regex_332 := "foo(\v+)bar";
+  var_regex_332 : std::string = "foo(\v+)bar";
+  regex_333 := "(\V+)(\v)";
+  var_regex_333 : std::string = "(\V+)(\v)";
+  regex_334 := "(\v+)(\V)";
+  var_regex_334 : std::string = "(\v+)(\V)";
+  regex_335 := "foo(\v)bar";
+  var_regex_335 : std::string = "foo(\v)bar";
+  regex_336 := "(\V)(\v)";
+  var_regex_336 : std::string = "(\V)(\v)";
+  regex_337 := "(\v)(\V)";
+  var_regex_337 : std::string = "(\v)(\V)";
+  regex_338 := "foo\Kbar";
+  var_regex_338 : std::string = "foo\Kbar";
+  regex_339 := "foo\t\n\r\f\a\ebar";
+  var_regex_339 : std::string = "foo\t\n\r\f\a\ebar";
   run: (this) = {
-    std::cout << "Running osx_bsd_critical:"<< std::endl;
-    test(regex_1, "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_M1, "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)");
-    test(regex_2, "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_M2, "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)");
-    test(regex_3, "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)");
-    test(regex_M3, "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)");
-    test(regex_11, "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_12, "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_14, "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)");
-    test(regex_M14, "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)");
-    test(regex_20, "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)");
+    std::cout << "Running perl_tests:"<< std::endl;
+    test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
+    test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
+    test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
+    test(regex_3, 3, "abc", "xbc", "n", "-", "-");
+    test(regex_4, 4, "abc", "axc", "n", "-", "-");
+    test(regex_5, 5, "abc", "abx", "n", "-", "-");
+    test(regex_6, 6, "abc", "xabcy", "y", "$&", "abc");
+    test(regex_7, 7, "abc", "xabcy", "y", "$-[0]", "1");
+    test(regex_8, 8, "abc", "xabcy", "y", "$+[0]", "4");
+    test(regex_9, 9, "abc", "ababc", "y", "$&", "abc");
+    test(regex_10, 10, "abc", "ababc", "y", "$-[0]", "2");
+    test(regex_11, 11, "abc", "ababc", "y", "$+[0]", "5");
+    test(regex_12, 12, "ab*c", "abc", "y", "$&", "abc");
+    test(regex_13, 13, "ab*c", "abc", "y", "$-[0]", "0");
+    test(regex_14, 14, "ab*c", "abc", "y", "$+[0]", "3");
+    test(regex_15, 15, "ab*bc", "abc", "y", "$&", "abc");
+    test(regex_16, 16, "ab*bc", "abc", "y", "$-[0]", "0");
+    test(regex_17, 17, "ab*bc", "abc", "y", "$+[0]", "3");
+    test(regex_18, 18, "ab*bc", "abbc", "y", "$&", "abbc");
+    test(regex_19, 19, "ab*bc", "abbc", "y", "$-[0]", "0");
+    test(regex_20, 20, "ab*bc", "abbc", "y", "$+[0]", "4");
+    test(regex_21, 21, "ab*bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_22, 22, "ab*bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_23, 23, "ab*bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_24, 24, ".{1}", "abbbbc", "y", "$&", "a");
+    test(regex_25, 25, ".{1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_26, 26, ".{1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_27, 27, ".{3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_28, 28, ".{3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_29, 29, ".{3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_30, 30, "\\\\N{1}", "abbbbc", "y", "$&", "a");
+    test(regex_31, 31, "\\\\N{1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_32, 32, "\\\\N{1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_33, 33, "\\\\N{3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_34, 34, "\\\\N{3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_35, 35, "\\\\N{3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_36, 36, "\\\\N{ 3 , 4 }", "abbbbc", "y", "$+[0]", "4");
+    test(regex_37, 37, "ab{0,}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_38, 38, "ab{0,}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_39, 39, "ab{0,}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_40, 40, "ab+bc", "abbc", "y", "$&", "abbc");
+    test(regex_41, 41, "ab+bc", "abbc", "y", "$-[0]", "0");
+    test(regex_42, 42, "ab+bc", "abbc", "y", "$+[0]", "4");
+    test(regex_43, 43, "ab+bc", "abc", "n", "-", "-");
+    test(regex_44, 44, "ab+bc", "abq", "n", "-", "-");
+    test(regex_45, 45, "ab{1,}bc", "abq", "n", "-", "-");
+    test(regex_46, 46, "ab+bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_47, 47, "ab+bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_48, 48, "ab+bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_49, 49, "ab{1,}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_50, 50, "ab{1,}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_51, 51, "ab{1,}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_52, 52, "ab{1,3}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_53, 53, "ab{1,3}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_54, 54, "ab{1,3}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_55, 55, "ab{3,4}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_56, 56, "ab{3,4}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_57, 57, "ab{3,4}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_58, 58, "ab{4,5}bc", "abbbbc", "n", "-", "-");
+    test(regex_59, 59, "ab?bc", "abbc", "y", "$&", "abbc");
+    test(regex_60, 60, "ab?bc", "abc", "y", "$&", "abc");
+    test(regex_61, 61, "ab{0,1}bc", "abc", "y", "$&", "abc");
+    test(regex_62, 62, "ab?bc", "abbbbc", "n", "-", "-");
+    test(regex_63, 63, "ab?c", "abc", "y", "$&", "abc");
+    test(regex_64, 64, "ab{0,1}c", "abc", "y", "$&", "abc");
+    test(regex_65, 65, "^abc\\$", "abc", "y", "$&", "abc");
+    test(regex_66, 66, "^abc\\$", "abcc", "n", "-", "-");
+    test(regex_67, 67, "^abc", "abcc", "y", "$&", "abc");
+    test(regex_68, 68, "^abc\\$", "aabc", "n", "-", "-");
+    test(regex_69, 69, "abc\\$", "aabc", "y", "$&", "abc");
+    test(regex_70, 70, "abc\\$", "aabcd", "n", "-", "-");
+    test(regex_71, 71, "^", "abc", "y", "$&", "");
+    test(regex_72, 72, "\\$", "abc", "y", "$&", "");
+    test(regex_73, 73, "a.c", "abc", "y", "$&", "abc");
+    test(regex_74, 74, "a.c", "axc", "y", "$&", "axc");
+    test(regex_75, 75, "a\\\\Nc", "abc", "y", "$&", "abc");
+    test(regex_76, 76, "a.*c", "axyzc", "y", "$&", "axyzc");
+    test(regex_77, 77, "a\\\\N*c", "axyzc", "y", "$&", "axyzc");
+    test(regex_78, 78, "a.*c", "axyzd", "n", "-", "-");
+    test(regex_79, 79, "a\\\\N*c", "axyzd", "n", "-", "-");
+    test(regex_80, 80, "a[bc]d", "abc", "n", "-", "-");
+    test(regex_81, 81, "a[bc]d", "abd", "y", "$&", "abd");
+    test(regex_82, 82, "a[b]d", "abd", "y", "$&", "abd");
+    test(regex_83, 83, "[a][b][d]", "abd", "y", "$&", "abd");
+    test(regex_84, 84, ".[b].", "abd", "y", "$&", "abd");
+    test(regex_85, 85, ".[b].", "aBd", "n", "-", "-");
+    test(regex_86, 86, "a[b-d]e", "abd", "n", "-", "-");
+    test(regex_87, 87, "a[b-d]e", "ace", "y", "$&", "ace");
+    test(regex_88, 88, "a[b-d]", "aac", "y", "$&", "ac");
+    test(regex_89, 89, "a[-b]", "a-", "y", "$&", "a-");
+    test(regex_90, 90, "a[b-]", "a-", "y", "$&", "a-");
+    test(regex_91, 91, "a]", "a]", "y", "$&", "a]");
+    test(regex_92, 92, "a[]]b", "a]b", "y", "$&", "a]b");
+    test(regex_93, 93, "a[^bc]d", "aed", "y", "$&", "aed");
+    test(regex_94, 94, "a[^bc]d", "abd", "n", "-", "-");
+    test(regex_95, 95, "a[^-b]c", "adc", "y", "$&", "adc");
+    test(regex_96, 96, "a[^-b]c", "a-c", "n", "-", "-");
+    test(regex_97, 97, "a[^]b]c", "a]c", "n", "-", "-");
+    test(regex_98, 98, "a[^]b]c", "adc", "y", "$&", "adc");
+    test(regex_99, 99, "\\ba\\b", "a-", "y", "-", "-");
+    test(regex_100, 100, "\\ba\\b", "-a", "y", "-", "-");
+    test(regex_101, 101, "\\ba\\b", "-a-", "y", "-", "-");
+    test(regex_102, 102, "\\by\\b", "xy", "n", "-", "-");
+    test(regex_103, 103, "\\by\\b", "yz", "n", "-", "-");
+    test(regex_104, 104, "\\by\\b", "xyz", "n", "-", "-");
+    test(regex_105, 105, "\\Ba\\B", "a-", "n", "-", "-");
+    test(regex_106, 106, "\\Ba\\B", "-a", "n", "-", "-");
+    test(regex_107, 107, "\\Ba\\B", "-a-", "n", "-", "-");
+    test(regex_108, 108, "\\By\\b", "xy", "y", "-", "-");
+    test(regex_109, 109, "\\By\\b", "xy", "y", "$-[0]", "1");
+    test(regex_110, 110, "\\By\\b", "xy", "y", "$+[0]", "2");
+    test(regex_111, 111, "\\By\\b", "xy", "y", "-", "-");
+    test(regex_112, 112, "\\by\\B", "yz", "y", "-", "-");
+    test(regex_113, 113, "\\By\\B", "xyz", "y", "-", "-");
+    test(regex_114, 114, "\\b", "", "n", "-", "-");
+    test(regex_115, 115, "\\B", "", "y", "-", "-");
+    test(regex_116, 116, "\\w", "a", "y", "-", "-");
+    test(regex_117, 117, "\\w", "-", "n", "-", "-");
+    test(regex_118, 118, "\\W", "a", "n", "-", "-");
+    test(regex_119, 119, "\\W", "-", "y", "-", "-");
+    test(regex_120, 120, "a\\sb", "a b", "y", "-", "-");
+    test(regex_121, 121, "a\\sb", "a-b", "n", "-", "-");
+    test(regex_122, 122, "a\\Sb", "a b", "n", "-", "-");
+    test(regex_123, 123, "a\\Sb", "a-b", "y", "-", "-");
+    test(regex_124, 124, "\\d", "1", "y", "-", "-");
+    test(regex_125, 125, "\\d", "-", "n", "-", "-");
+    test(regex_126, 126, "\\D", "1", "n", "-", "-");
+    test(regex_127, 127, "\\D", "-", "y", "-", "-");
+    test(regex_128, 128, "[\\w]", "a", "y", "-", "-");
+    test(regex_129, 129, "[\\w]", "-", "n", "-", "-");
+    test(regex_130, 130, "[\\W]", "a", "n", "-", "-");
+    test(regex_131, 131, "[\\W]", "-", "y", "-", "-");
+    test(regex_132, 132, "a[\\s]b", "a b", "y", "-", "-");
+    test(regex_133, 133, "a[\\s]b", "a-b", "n", "-", "-");
+    test(regex_134, 134, "a[\\S]b", "a b", "n", "-", "-");
+    test(regex_135, 135, "a[\\S]b", "a-b", "y", "-", "-");
+    test(regex_136, 136, "[\\d]", "1", "y", "-", "-");
+    test(regex_137, 137, "[\\d]", "-", "n", "-", "-");
+    test(regex_138, 138, "[\\D]", "1", "n", "-", "-");
+    test(regex_139, 139, "[\\D]", "-", "y", "-", "-");
+    test(regex_140, 140, "ab|cd", "abc", "y", "$&", "ab");
+    test(regex_141, 141, "ab|cd", "abcd", "y", "$&", "ab");
+    test(regex_142, 142, "()ef", "def", "y", "$&-$1", "ef-");
+    test(regex_143, 143, "()ef", "def", "y", "$-[0]", "1");
+    test(regex_144, 144, "()ef", "def", "y", "$+[0]", "3");
+    test(regex_145, 145, "()ef", "def", "y", "$-[1]", "1");
+    test(regex_146, 146, "()ef", "def", "y", "$+[1]", "1");
+    test(regex_147, 147, "\\$b", "b", "n", "-", "-");
+    test(regex_148, 148, "a\\(b", "a(b", "y", "$&-$1", "a(b-");
+    test(regex_149, 149, "a\\(*b", "ab", "y", "$&", "ab");
+    test(regex_150, 150, "a\\(*b", "a((b", "y", "$&", "a((b");
+    test(regex_151, 151, "a\\\\b", "a\\b", "y", "$&", "a\\b");
+    test(regex_152, 152, "((a))", "abc", "y", "$&-$1-$2", "a-a-a");
+    test(regex_153, 153, "((a))", "abc", "y", "$-[0]-$-[1]-$-[2]", "0-0-0");
+    test(regex_154, 154, "((a))", "abc", "y", "$+[0]-$+[1]-$+[2]", "1-1-1");
+    test(regex_155, 155, "(foo)(\\g-2)", "foofoo", "y", "$1-$2", "foo-foo");
+    test(regex_156, 156, "(foo)(\\g-2)(foo)(\\g-2)", "foofoofoofoo", "y", "$1-$2-$3-$4", "foo-foo-foo-foo");
+    test(regex_157, 157, "(([abc]+) \\g-1)(([abc]+) \\g{-1})", "abc abccba cba", "y", "$2-$4", "abc-cba");
+    test(regex_158, 158, "(a)(b)(c)\\g1\\g2\\g3", "abcabc", "y", "$1$2$3", "abc");
+    test(regex_159, 159, "abc", "ABC", "y", "$&", "ABC");
+    test(regex_160, 160, "abc", "XBC", "n", "-", "-");
+    test(regex_161, 161, "abc", "AXC", "n", "-", "-");
+    test(regex_162, 162, "abc", "ABX", "n", "-", "-");
+    test(regex_163, 163, "abc", "XABCY", "y", "$&", "ABC");
+    test(regex_164, 164, "abc", "ABABC", "y", "$&", "ABC");
+    test(regex_165, 165, "ab*c", "ABC", "y", "$&", "ABC");
+    test(regex_166, 166, "ab*bc", "ABC", "y", "$&", "ABC");
+    test(regex_167, 167, "ab*bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_168, 168, "ab*?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_169, 169, "ab{0,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_170, 170, "ab+?bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_171, 171, "ab+bc", "ABC", "n", "-", "-");
+    test(regex_172, 172, "ab+bc", "ABQ", "n", "-", "-");
+    test(regex_173, 173, "ab{1,}bc", "ABQ", "n", "-", "-");
+    test(regex_174, 174, "ab+bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_175, 175, "ab{1,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_176, 176, "ab{1,3}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_177, 177, "ab{3,4}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_178, 178, "ab{4,5}?bc", "ABBBBC", "n", "-", "-");
+    test(regex_179, 179, "ab??bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_180, 180, "ab??bc", "ABC", "y", "$&", "ABC");
+    test(regex_181, 181, "ab{0,1}?bc", "ABC", "y", "$&", "ABC");
+    test(regex_182, 182, "ab??bc", "ABBBBC", "n", "-", "-");
+    test(regex_183, 183, "ab??c", "ABC", "y", "$&", "ABC");
+    test(regex_184, 184, "ab{0,1}?c", "ABC", "y", "$&", "ABC");
+    test(regex_185, 185, "^abc\\$", "ABC", "y", "$&", "ABC");
+    test(regex_186, 186, "^abc\\$", "ABCC", "n", "-", "-");
+    test(regex_187, 187, "^abc", "ABCC", "y", "$&", "ABC");
+    test(regex_188, 188, "^abc\\$", "AABC", "n", "-", "-");
+    test(regex_189, 189, "abc\\$", "AABC", "y", "$&", "ABC");
+    test(regex_190, 190, "^", "ABC", "y", "$&", "");
+    test(regex_191, 191, "\\$", "ABC", "y", "$&", "");
+    test(regex_192, 192, "a.c", "ABC", "y", "$&", "ABC");
+    test(regex_193, 193, "a.c", "AXC", "y", "$&", "AXC");
+    test(regex_194, 194, "a\\\\Nc", "ABC", "y", "$&", "ABC");
+    test(regex_195, 195, "a.*?c", "AXYZC", "y", "$&", "AXYZC");
+    test(regex_196, 196, "a.*c", "AXYZD", "n", "-", "-");
+    test(regex_197, 197, "a[bc]d", "ABC", "n", "-", "-");
+    test(regex_198, 198, "a[bc]d", "ABD", "y", "$&", "ABD");
+    test(regex_199, 199, "a[b-d]e", "ABD", "n", "-", "-");
+    test(regex_200, 200, "a[b-d]e", "ACE", "y", "$&", "ACE");
+    test(regex_201, 201, "a[b-d]", "AAC", "y", "$&", "AC");
+    test(regex_202, 202, "a[-b]", "A-", "y", "$&", "A-");
+    test(regex_203, 203, "a[b-]", "A-", "y", "$&", "A-");
+    test(regex_204, 204, "a]", "A]", "y", "$&", "A]");
+    test(regex_205, 205, "a[]]b", "A]B", "y", "$&", "A]B");
+    test(regex_206, 206, "a[^bc]d", "AED", "y", "$&", "AED");
+    test(regex_207, 207, "a[^bc]d", "ABD", "n", "-", "-");
+    test(regex_208, 208, "a[^-b]c", "ADC", "y", "$&", "ADC");
+    test(regex_209, 209, "a[^-b]c", "A-C", "n", "-", "-");
+    test(regex_210, 210, "a[^]b]c", "A]C", "n", "-", "-");
+    test(regex_211, 211, "a[^]b]c", "ADC", "y", "$&", "ADC");
+    test(regex_212, 212, "ab|cd", "ABC", "y", "$&", "AB");
+    test(regex_213, 213, "ab|cd", "ABCD", "y", "$&", "AB");
+    test(regex_214, 214, "()ef", "DEF", "y", "$&-$1", "EF-");
+    test(regex_215, 215, "\\$b", "B", "n", "-", "-");
+    test(regex_216, 216, "a\\(b", "A(B", "y", "$&-$1", "A(B-");
+    test(regex_217, 217, "a\\(*b", "AB", "y", "$&", "AB");
+    test(regex_218, 218, "a\\(*b", "A((B", "y", "$&", "A((B");
+    test(regex_219, 219, "a\\\\b", "A\\B", "y", "$&", "A\\B");
+    test(regex_220, 220, "((a))", "ABC", "y", "$&-$1-$2", "A-A-A");
+    test(regex_221, 221, "(a)b(c)", "ABC", "y", "$&-$1-$2", "ABC-A-C");
+    test(regex_222, 222, "a+b+c", "AABBABC", "y", "$&", "ABC");
+    test(regex_223, 223, "a{1,}b{1,}c", "AABBABC", "y", "$&", "ABC");
+    test(regex_224, 224, "a.+?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_225, 225, "a.*?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_226, 226, "a.{0,5}?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_227, 227, "(a+|b)*", "AB", "y", "$&-$1", "AB-B");
+    test(regex_228, 228, "(a+|b){0,}", "AB", "y", "$&-$1", "AB-B");
+    test(regex_229, 229, "(a+|b)+", "AB", "y", "$&-$1", "AB-B");
+    test(regex_230, 230, "(a+|b){1,}", "AB", "y", "$&-$1", "AB-B");
+    test(regex_231, 231, "(a+|b)?", "AB", "y", "$&-$1", "A-A");
+    test(regex_232, 232, "(a+|b){0,1}", "AB", "y", "$&-$1", "A-A");
+    test(regex_233, 233, "(a+|b){0,1}?", "AB", "y", "$&-$1", "-");
+    test(regex_234, 234, "[^ab]*", "CDE", "y", "$&", "CDE");
+    test(regex_235, 235, "abc", "", "n", "-", "-");
+    test(regex_236, 236, "a*", "", "y", "$&", "");
+    test(regex_237, 237, "([abc])*d", "ABBBCD", "y", "$&-$1", "ABBBCD-C");
+    test(regex_238, 238, "([abc])*bcd", "ABCD", "y", "$&-$1", "ABCD-A");
+    test(regex_239, 239, "a|b|c|d|e", "E", "y", "$&", "E");
+    test(regex_240, 240, "(a|b|c|d|e)f", "EF", "y", "$&-$1", "EF-E");
+    test(regex_241, 241, "abcd*efg", "ABCDEFG", "y", "$&", "ABCDEFG");
+    test(regex_242, 242, "ab*", "XABYABBBZ", "y", "$&", "AB");
+    test(regex_243, 243, "ab*", "XAYABBBZ", "y", "$&", "A");
+    test(regex_244, 244, "(ab|cd)e", "ABCDE", "y", "$&-$1", "CDE-CD");
+    test(regex_245, 245, "[abhgefdc]ij", "HIJ", "y", "$&", "HIJ");
+    test(regex_246, 246, "^(ab|cd)e", "ABCDE", "n", "x$1y", "XY");
+    test(regex_247, 247, "(abc|)ef", "ABCDEF", "y", "$&-$1", "EF-");
+    test(regex_248, 248, "(a|b)c*d", "ABCD", "y", "$&-$1", "BCD-B");
+    test(regex_249, 249, "(ab|ab*)bc", "ABC", "y", "$&-$1", "ABC-A");
+    test(regex_250, 250, "a([bc]*)c*", "ABC", "y", "$&-$1", "ABC-BC");
+    test(regex_251, 251, "a([bc]*)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
+    test(regex_252, 252, "a([bc]+)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
+    test(regex_253, 253, "a([bc]*)(c+d)", "ABCD", "y", "$&-$1-$2", "ABCD-B-CD");
+    test(regex_254, 254, "a[bcd]*dcdcde", "ADCDCDE", "y", "$&", "ADCDCDE");
+    test(regex_255, 255, "a[bcd]+dcdcde", "ADCDCDE", "n", "-", "-");
+    test(regex_256, 256, "(ab|a)b*c", "ABC", "y", "$&-$1", "ABC-AB");
+    test(regex_257, 257, "((a)(b)c)(d)", "ABCD", "y", "$1-$2-$3-$4", "ABC-A-B-D");
+    test(regex_258, 258, "[a-zA-Z_][a-zA-Z0-9_]*", "ALPHA", "y", "$&", "ALPHA");
+    test(regex_259, 259, "^a(bc+|b[eh])g|.h\\$", "ABH", "y", "$&-$1", "BH-");
+    test(regex_260, 260, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
+    test(regex_261, 261, "(bc+d\\$|ef*g.|h?i(j|k))", "IJ", "y", "$&-$1-$2", "IJ-IJ-J");
+    test(regex_262, 262, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFG", "n", "-", "-");
+    test(regex_263, 263, "(bc+d\\$|ef*g.|h?i(j|k))", "BCDD", "n", "-", "-");
+    test(regex_264, 264, "(bc+d\\$|ef*g.|h?i(j|k))", "REFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
+    test(regex_265, 265, "((((((((((a))))))))))", "A", "y", "$10", "A");
+    test(regex_266, 266, "((((((((((a))))))))))\\10", "AA", "y", "$&", "AA");
+    test(regex_267, 267, "(((((((((a)))))))))", "A", "y", "$&", "A");
+    test(regex_268, 268, "multiple words of text", "UH-UH", "n", "-", "-");
+    test(regex_269, 269, "multiple words", "MULTIPLE WORDS, YEAH", "y", "$&", "MULTIPLE WORDS");
+    test(regex_270, 270, "(.*)c(.*)", "ABCDE", "y", "$&-$1-$2", "ABCDE-AB-DE");
+    test(regex_271, 271, "\\((.*), (.*)\\)", "(A, B)", "y", "($2, $1)", "(B, A)");
+    test(regex_272, 272, "[k]", "AB", "n", "-", "-");
+    test(regex_273, 273, "abcd", "ABCD", "y", "$&", "ABCD");
+    test(regex_274, 274, "a(bc)d", "ABCD", "y", "$1", "BC");
+    test(regex_275, 275, "a[-]?c", "AC", "y", "$&", "AC");
+    test(regex_276, 276, "(abc)\\1", "ABCABC", "y", "$1", "ABC");
+    test(regex_277, 277, "([a-c]*)\\1", "ABCABC", "y", "$1", "ABC");
+    test(regex_278, 278, "a++a", "aaaaa", "n", "-", "-");
+    test(regex_279, 279, "a*+a", "aaaaa", "n", "-", "-");
+    test(regex_280, 280, "a{1,5}+a", "aaaaa", "n", "-", "-");
+    test(regex_281, 281, "a?+a", "ab", "n", "-", "-");
+    test(regex_282, 282, "a++b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_283, 283, "a*+b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_284, 284, "a{1,5}+b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_285, 285, "a?+b", "ab", "y", "$&", "ab");
+    test(regex_286, 286, "fooa++a", "fooaaaaa", "n", "-", "-");
+    test(regex_287, 287, "fooa*+a", "fooaaaaa", "n", "-", "-");
+    test(regex_288, 288, "fooa{1,5}+a", "fooaaaaa", "n", "-", "-");
+    test(regex_289, 289, "fooa?+a", "fooab", "n", "-", "-");
+    test(regex_290, 290, "fooa++b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_291, 291, "fooa*+b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_292, 292, "fooa{1,5}+b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_293, 293, "fooa?+b", "fooab", "y", "$&", "fooab");
+    test(regex_294, 294, "(aA)++(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_295, 295, "(aA|bB)++(aA|bB)", "aAaAbBaAbB", "n", "-", "aAaAbBaAbB");
+    test(regex_296, 296, "(aA)*+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_297, 297, "(aA|bB)*+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
+    test(regex_298, 298, "(aA){1,5}+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_299, 299, "(aA|bB){1,5}+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
+    test(regex_300, 300, "(aA)?+(aA)", "aAb", "n", "-", "aAb");
+    test(regex_301, 301, "(aA|bB)?+(aA|bB)", "bBb", "n", "-", "bBb");
+    test(regex_302, 302, "(aA)++b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_303, 303, "(aA|bB)++b", "aAbBaAaAbBb", "y", "$&", "aAbBaAaAbBb");
+    test(regex_304, 304, "(aA)*+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_305, 305, "(aA|bB)*+b", "bBbBbBbBbBb", "y", "$&", "bBbBbBbBbBb");
+    test(regex_306, 306, "(aA){1,5}+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_307, 307, "(aA|bB){1,5}+b", "bBaAbBaAbBb", "y", "$&", "bBaAbBaAbBb");
+    test(regex_308, 308, "(aA)?+b", "aAb", "y", "$&", "aAb");
+    test(regex_309, 309, "(aA|bB)?+b", "bBb", "y", "$&", "bBb");
+    test(regex_310, 310, "foo(aA)++(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_311, 311, "foo(aA|bB)++(aA|bB)", "foobBbBbBaAaA", "n", "-", "foobBbBbBaAaA");
+    test(regex_312, 312, "foo(aA)*+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_313, 313, "foo(aA|bB)*+(aA|bB)", "foobBaAbBaAaA", "n", "-", "foobBaAbBaAaA");
+    test(regex_314, 314, "foo(aA){1,5}+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_315, 315, "foo(aA|bB){1,5}+(aA|bB)", "fooaAbBbBaAaA", "n", "-", "fooaAbBbBaAaA");
+    test(regex_316, 316, "foo(aA)?+(aA)", "fooaAb", "n", "-", "fooaAb");
+    test(regex_317, 317, "foo(aA|bB)?+(aA|bB)", "foobBb", "n", "-", "foobBb");
+    test(regex_318, 318, "foo(aA)++b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_319, 319, "foo(aA|bB)++b", "foobBaAbBaAbBb", "y", "$&", "foobBaAbBaAbBb");
+    test(regex_320, 320, "foo(aA)*+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_321, 321, "foo(aA|bB)*+b", "foobBbBaAaAaAb", "y", "$&", "foobBbBaAaAaAb");
+    test(regex_322, 322, "foo(aA){1,5}+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_323, 323, "foo(aA|bB){1,5}+b", "foobBaAaAaAaAb", "y", "$&", "foobBaAaAaAaAb");
+    test(regex_324, 324, "foo(aA)?+b", "fooaAb", "y", "$&", "fooaAb");
+    test(regex_325, 325, "foo(aA|bB)?+b", "foobBb", "y", "$&", "foobBb");
+    test(regex_326, 326, "foo(\\h+)bar", "foo\tbar", "y", "$1", "\t");
+    test(regex_327, 327, "(\\H+)(\\h)", "foo\tbar", "y", "$1-$2", "foo-\t");
+    test(regex_328, 328, "(\\h+)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
+    test(regex_329, 329, "foo(\\h)bar", "foo\tbar", "y", "$1", "\t");
+    test(regex_330, 330, "(\\H)(\\h)", "foo\tbar", "y", "$1-$2", "o-\t");
+    test(regex_331, 331, "(\\h)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
+    test(regex_332, 332, "foo(\\v+)bar", "foo\r\n\r\n\nbar", "y", "$1", "\r\n\r\n\n");
+    test(regex_333, 333, "(\\V+)(\\v)", "foo\r\n\r\n\nbar", "y", "$1-$2", "foo-\r");
+    test(regex_334, 334, "(\\v+)(\\V)", "foo\r\n\r\n\nbar", "y", "$1-$2", "\r\n\r\n\n-b");
+    test(regex_335, 335, "foo(\\v)bar", "foo\rbar", "y", "$1", "\r");
+    test(regex_336, 336, "(\\V)(\\v)", "foo\rbar", "y", "$1-$2", "o-\r");
+    test(regex_337, 337, "(\\v)(\\V)", "foo\rbar", "y", "$1-$2", "\r-b");
+    test(regex_338, 338, "foo\\Kbar", "foobar", "y", "$&", "bar");
+    test(regex_339, 339, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
     std::cout << std::endl;
   }
 }
 main: (args) = {
-    test_basic3().run();
-    test_class().run();
-    test_left_assoc().run();
-    test_right_assoc().run();
-    test_forced_assoc().run();
-    test_nullsub3().run();
-    test_repetition2().run();
-    test_totest().run();
-    test_osx_bsd_critical().run();
+    test_perl_tests().run();
 }
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
index 585f616d3f..66be180111 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
@@ -1,446 +1,359 @@
-Running basic3:
-1: OK regex: \) parsed_regex: \) str: () result: (1,2) expected_results (1,2)
-2: OK regex: \} parsed_regex: \} str: } result: (0,1) expected_results (0,1)
-3: OK regex: ] parsed_regex: ] str: ] result: (0,1) expected_results (0,1)
-4: OK regex: \$^ parsed_regex: \$^ str: NULL result: (0,0) expected_results (0,0)
-5: OK regex: a(\$) parsed_regex: a(\$) str: aa result: (1,2)(2,2) expected_results (1,2)(2,2)
-6: OK regex: a*(^a) parsed_regex: a*(^a) str: aa result: (0,1)(0,1) expected_results (0,1)(0,1)
-7: OK regex: (..)*(...)* parsed_regex: (..)*(...)* str: a result: (0,0)(?,?)(?,?) expected_results (0,0)(?,?)(?,?)
-8: OK regex: (..)*(...)* parsed_regex: (..)*(...)* str: abcd result: (0,4)(2,4)(?,?) expected_results (0,4)(2,4)(?,?)
-9: OK regex: (ab|a)(bc|c) parsed_regex: (ab|a)(bc|c) str: abc result: (0,3)(0,2)(2,3) expected_results (0,3)(0,2)(2,3)
-10: OK regex: (ab)c|abc parsed_regex: (ab)c|abc str: abc result: (0,3)(0,2) expected_results (0,3)(0,2)
-11: OK regex: a{0}b parsed_regex: a{0}b str: ab result: (1,2) expected_results (1,2)
-12: OK regex: (a*)(b?)(b+)b{3} parsed_regex: (a*)(b?)(b+)b{3} str: aaabbbbbbb result: (0,10)(0,3)(3,4)(4,7) expected_results (0,10)(0,3)(3,4)(4,7)
-13: OK regex: (a*)(b{0,1})(b{1,})b{3} parsed_regex: (a*)(b{0,1})(b{1,})b{3} str: aaabbbbbbb result: (0,10)(0,3)(3,4)(4,7) expected_results (0,10)(0,3)(3,4)(4,7)
-15: OK regex: ((a|a)|a) parsed_regex: ((a|a)|a) str: a result: (0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1)
-16: OK regex: (a*)(a|aa) parsed_regex: (a*)(a|aa) str: aaaa result: (0,4)(0,3)(3,4) expected_results (0,4)(0,3)(3,4)
-17: OK regex: a*(a.|aa) parsed_regex: a*(a.|aa) str: aaaa result: (0,4)(2,4) expected_results (0,4)(2,4)
-18: OK regex: a(b)|c(d)|a(e)f parsed_regex: a(b)|c(d)|a(e)f str: aef result: (0,3)(?,?)(?,?)(1,2) expected_results (0,3)(?,?)(?,?)(1,2)
-19: OK regex: (a|b)?.* parsed_regex: (a|b)?.* str: b result: (0,1)(0,1) expected_results (0,1)(0,1)
-20: OK regex: (a|b)c|a(b|c) parsed_regex: (a|b)c|a(b|c) str: ac result: (0,2)(0,1)(?,?) expected_results (0,2)(0,1)(?,?)
-21: OK regex: (a|b)c|a(b|c) parsed_regex: (a|b)c|a(b|c) str: ab result: (0,2)(?,?)(1,2) expected_results (0,2)(?,?)(1,2)
-22: OK regex: (a|b)*c|(a|ab)*c parsed_regex: (a|b)*c|(a|ab)*c str: abc result: (0,3)(1,2)(?,?) expected_results (0,3)(1,2)(?,?)
-23: OK regex: (a|b)*c|(a|ab)*c parsed_regex: (a|b)*c|(a|ab)*c str: xc result: (1,2)(?,?)(?,?) expected_results (1,2)(?,?)(?,?)
-24: OK regex: (.a|.b).*|.*(.a|.b) parsed_regex: (.a|.b).*|.*(.a|.b) str: xa result: (0,2)(0,2)(?,?) expected_results (0,2)(0,2)(?,?)
-25: OK regex: a?(ab|ba)ab parsed_regex: a?(ab|ba)ab str: abab result: (0,4)(0,2) expected_results (0,4)(0,2)
-26: OK regex: a?(ac{0}b|ba)ab parsed_regex: a?(ac{0}b|ba)ab str: abab result: (0,4)(0,2) expected_results (0,4)(0,2)
-27: OK regex: ab|abab parsed_regex: ab|abab str: abbabab result: (0,2) expected_results (0,2)
-28: OK regex: aba|bab|bba parsed_regex: aba|bab|bba str: baaabbbaba result: (5,8) expected_results (5,8)
-29: OK regex: aba|bab parsed_regex: aba|bab str: baaabbbaba result: (6,9) expected_results (6,9)
-30: OK regex: (aa|aaa)*|(a|aaaaa) parsed_regex: (aa|aaa)*|(a|aaaaa) str: aa result: (0,2)(0,2)(?,?) expected_results (0,2)(0,2)(?,?)
-31: OK regex: (a.|.a.)*|(a|.a...) parsed_regex: (a.|.a.)*|(a|.a...) str: aa result: (0,2)(0,2)(?,?) expected_results (0,2)(0,2)(?,?)
-32: OK regex: ab|a parsed_regex: ab|a str: xabc result: (1,3) expected_results (1,3)
-33: OK regex: ab|a parsed_regex: ab|a str: xxabc result: (2,4) expected_results (2,4)
-M34: OK regex: (Ab|cD)* parsed_regex: (Ab|cD)* str: aBcD result: (0,0)(?,?) expected_results (0,4)(2,4)
-35: OK regex: :::1:::0:|:::1:1:0: parsed_regex: :::1:::0:|:::1:1:0: str: :::0:::1:::1:::0: result: (8,17) expected_results (8,17)
-36: OK regex: :::1:::0:|:::1:1:1: parsed_regex: :::1:::0:|:::1:1:1: str: :::0:::1:::1:::0: result: (8,17) expected_results (8,17)
-37: OK regex: [[:lower:]]+ parsed_regex: [[:lower:]]+ str: `az{ result: (1,3) expected_results (1,3)
-38: OK regex: [[:upper:]]+ parsed_regex: [[:upper:]]+ str: @AZ[ result: (1,3) expected_results (1,3)
-39: OK regex: (a)(b)(c) parsed_regex: (a)(b)(c) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3)
-43  : OK regex: ((((((((((((((((((((((((((((((x)))))))))))))))))))))))))))))) parsed_regex: ((((((((((((((((((((((((((((((x)))))))))))))))))))))))))))))) str: x result: (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)
-44  : OK regex: ((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))* parsed_regex: ((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))* str: xx result: (0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2) expected_results (0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)
-45: OK regex: a?(ab|ba)* parsed_regex: a?(ab|ba)* str: ababababababababababababababababababababababababababababababababababababababababa result: (0,81)(79,81) expected_results (0,81)(79,81)
-46: OK regex: abaa|abbaa|abbbaa|abbbbaa parsed_regex: abaa|abbaa|abbbaa|abbbbaa str: ababbabbbabbbabbbbabbbbaa result: (18,25) expected_results (18,25)
-47: OK regex: abaa|abbaa|abbbaa|abbbbaa parsed_regex: abaa|abbaa|abbbaa|abbbbaa str: ababbabbbabbbabbbbabaa result: (18,22) expected_results (18,22)
-48: OK regex: aaac|aabc|abac|abbc|baac|babc|bbac|bbbc parsed_regex: aaac|aabc|abac|abbc|baac|babc|bbac|bbbc str: baaabbbabac result: (7,11) expected_results (7,11)
-49: OK regex: aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll parsed_regex: aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll str: XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa result: (53,57) expected_results (53,57)
-50: OK regex: a*a*a*a*a*b parsed_regex: a*a*a*a*a*b str: aaaaaaaaab result: (0,10) expected_results (0,10)
-51: OK regex: ab+bc parsed_regex: ab+bc str: abbc result: (0,4) expected_results (0,4)
-52: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result: (0,6) expected_results (0,6)
-53: OK regex: ab?bc parsed_regex: ab?bc str: abbc result: (0,4) expected_results (0,4)
-54: OK regex: ab?bc parsed_regex: ab?bc str: abc result: (0,3) expected_results (0,3)
-55: OK regex: ab?c parsed_regex: ab?c str: abc result: (0,3) expected_results (0,3)
-56: OK regex: ab|cd parsed_regex: ab|cd str: abc result: (0,2) expected_results (0,2)
-57: OK regex: ab|cd parsed_regex: ab|cd str: abcd result: (0,2) expected_results (0,2)
-58: OK regex: a\(b parsed_regex: a\(b str: a(b result: (0,3) expected_results (0,3)
-59: OK regex: a\(*b parsed_regex: a\(*b str: ab result: (0,2) expected_results (0,2)
-60: OK regex: a\(*b parsed_regex: a\(*b str: a((b result: (0,4) expected_results (0,4)
-61: OK regex: ((a)) parsed_regex: ((a)) str: abc result: (0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1)
-62: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result: (0,3)(0,1)(2,3) expected_results (0,3)(0,1)(2,3)
-63: OK regex: a+b+c parsed_regex: a+b+c str: aabbabc result: (4,7) expected_results (4,7)
-64: OK regex: a* parsed_regex: a* str: aaa result: (0,3) expected_results (0,3)
-65: OK regex: (a*)* parsed_regex: (a*)* str: - result: (0,0)(0,0) expected_results (0,0)(0,0)
-66: OK regex: (a*)+ parsed_regex: (a*)+ str: - result: (0,0)(0,0) expected_results (0,0)(0,0)
-67: OK regex: (a*|b)* parsed_regex: (a*|b)* str: - result: (0,0)(0,0) expected_results (0,0)(0,0)
-68: OK regex: (a+|b)* parsed_regex: (a+|b)* str: ab result: (0,2)(1,2) expected_results (0,2)(1,2)
-69: OK regex: (a+|b)+ parsed_regex: (a+|b)+ str: ab result: (0,2)(1,2) expected_results (0,2)(1,2)
-70: OK regex: (a+|b)? parsed_regex: (a+|b)? str: ab result: (0,1)(0,1) expected_results (0,1)(0,1)
-71: OK regex: (^)* parsed_regex: (^)* str: - result: (0,0)(0,0) expected_results (0,0)(0,0)
-72: OK regex: ([abc])*d parsed_regex: ([abc])*d str: abbbcd result: (0,6)(4,5) expected_results (0,6)(4,5)
-73: OK regex: ([abc])*bcd parsed_regex: ([abc])*bcd str: abcd result: (0,4)(0,1) expected_results (0,4)(0,1)
-74: OK regex: a|b|c|d|e parsed_regex: a|b|c|d|e str: e result: (0,1) expected_results (0,1)
-75: OK regex: (a|b|c|d|e)f parsed_regex: (a|b|c|d|e)f str: ef result: (0,2)(0,1) expected_results (0,2)(0,1)
-76: OK regex: ((a*|b))* parsed_regex: ((a*|b))* str: - result: (0,0)(0,0)(0,0) expected_results (0,0)(0,0)(0,0)
-77: OK regex: (ab|cd)e parsed_regex: (ab|cd)e str: abcde result: (2,5)(2,4) expected_results (2,5)(2,4)
-78: OK regex: (a|b)c*d parsed_regex: (a|b)c*d str: abcd result: (1,4)(1,2) expected_results (1,4)(1,2)
-79: OK regex: (ab|ab*)bc parsed_regex: (ab|ab*)bc str: abc result: (0,3)(0,1) expected_results (0,3)(0,1)
-80: OK regex: a([bc]*)c* parsed_regex: a([bc]*)c* str: abc result: (0,3)(1,3) expected_results (0,3)(1,3)
-81: OK regex: a([bc]*)(c*d) parsed_regex: a([bc]*)(c*d) str: abcd result: (0,4)(1,3)(3,4) expected_results (0,4)(1,3)(3,4)
-82: OK regex: a([bc]+)(c*d) parsed_regex: a([bc]+)(c*d) str: abcd result: (0,4)(1,3)(3,4) expected_results (0,4)(1,3)(3,4)
-83: OK regex: a([bc]*)(c+d) parsed_regex: a([bc]*)(c+d) str: abcd result: (0,4)(1,2)(2,4) expected_results (0,4)(1,2)(2,4)
-84: OK regex: a[bcd]*dcdcde parsed_regex: a[bcd]*dcdcde str: adcdcde result: (0,7) expected_results (0,7)
-85: OK regex: (ab|a)b*c parsed_regex: (ab|a)b*c str: abc result: (0,3)(0,2) expected_results (0,3)(0,2)
-86: OK regex: ((a)(b)c)(d) parsed_regex: ((a)(b)c)(d) str: abcd result: (0,4)(0,3)(0,1)(1,2)(3,4) expected_results (0,4)(0,3)(0,1)(1,2)(3,4)
-87: OK regex: ^a(bc+|b[eh])g|.h\$ parsed_regex: ^a(bc+|b[eh])g|.h\$ str: abh result: (1,3)(?,?) expected_results (1,3)(?,?)
-88: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: effgz result: (0,5)(0,5)(?,?) expected_results (0,5)(0,5)(?,?)
-89: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: ij result: (0,2)(0,2)(1,2) expected_results (0,2)(0,2)(1,2)
-90: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: reffgz result: (1,6)(1,6)(?,?) expected_results (1,6)(1,6)(?,?)
-91: OK regex: (((((((((a))))))))) parsed_regex: (((((((((a))))))))) str: a result: (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1) expected_results (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)
-92: OK regex: (.*)c(.*) parsed_regex: (.*)c(.*) str: abcde result: (0,5)(0,2)(3,5) expected_results (0,5)(0,2)(3,5)
-93: OK regex: a(bc)d parsed_regex: a(bc)d str: abcd result: (0,4)(1,3) expected_results (0,4)(1,3)
-94: OK regex: a[-]?c parsed_regex: a[-]?c str: ac result: (0,3) expected_results (0,3)
-95: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Qaddafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12)
-96: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Mo'ammar_Gadhafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13)
-97: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Kaddafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12)
-98: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Qadhafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12)
-99: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Gadafi result: (0,14)(?,?)(10,11) expected_results (0,14)(?,?)(10,11)
-100: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Mu'ammar_Qadafi result: (0,15)(?,?)(11,12) expected_results (0,15)(?,?)(11,12)
-101: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Moamar_Gaddafi result: (0,14)(?,?)(9,11) expected_results (0,14)(?,?)(9,11)
-102: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Mu'ammar_Qadhdhafi result: (0,18)(?,?)(13,15) expected_results (0,18)(?,?)(13,15)
-103: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Khaddafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13)
-104: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Ghaddafy result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13)
-105: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Ghadafi result: (0,15)(?,?)(11,12) expected_results (0,15)(?,?)(11,12)
-106: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Ghaddafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13)
-107: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muamar_Kaddafi result: (0,14)(?,?)(9,11) expected_results (0,14)(?,?)(9,11)
-108: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Quathafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13)
-109: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Muammar_Gheddafi result: (0,16)(?,?)(11,13) expected_results (0,16)(?,?)(11,13)
-110: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Moammar_Khadafy result: (0,15)(?,?)(11,12) expected_results (0,15)(?,?)(11,12)
-111: OK regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] parsed_regex: M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] str: Moammar_Qudhafi result: (0,15)(?,?)(10,12) expected_results (0,15)(?,?)(10,12)
-112: OK regex: a+(b|c)*d+ parsed_regex: a+(b|c)*d+ str: aabcdd result: (0,6)(3,4) expected_results (0,6)(3,4)
-113: OK regex: ^.+\$ parsed_regex: ^.+\$ str: vivi result: (0,4) expected_results (0,4)
-114: OK regex: ^(.+)\$ parsed_regex: ^(.+)\$ str: vivi result: (0,4)(0,4) expected_results (0,4)(0,4)
-115: OK regex: ^([^!.]+).att.com!(.+)\$ parsed_regex: ^([^!.]+).att.com!(.+)\$ str: gryphon.att.com!eby result: (0,19)(0,7)(16,19) expected_results (0,19)(0,7)(16,19)
-116: OK regex: ^([^!]+!)?([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$ str: bas result: (0,3)(?,?)(0,3) expected_results (0,3)(?,?)(0,3)
-117: OK regex: ^([^!]+!)?([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$ str: bar!bas result: (0,7)(0,4)(4,7) expected_results (0,7)(0,4)(4,7)
-118: OK regex: ^([^!]+!)?([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$ str: foo!bas result: (0,7)(0,4)(4,7) expected_results (0,7)(0,4)(4,7)
-119: OK regex: ^.+!([^!]+!)([^!]+)\$ parsed_regex: ^.+!([^!]+!)([^!]+)\$ str: foo!bar!bas result: (0,11)(4,8)(8,11) expected_results (0,11)(4,8)(8,11)
-120: OK regex: ((foo)|(bar))!bas parsed_regex: ((foo)|(bar))!bas str: bar!bas result: (0,7)(0,3)(?,?)(0,3) expected_results (0,7)(0,3)(?,?)(0,3)
-121: OK regex: ((foo)|(bar))!bas parsed_regex: ((foo)|(bar))!bas str: foo!bar!bas result: (4,11)(4,7)(?,?)(4,7) expected_results (4,11)(4,7)(?,?)(4,7)
-122: OK regex: ((foo)|(bar))!bas parsed_regex: ((foo)|(bar))!bas str: foo!bas result: (0,7)(0,3)(0,3)(?,?) expected_results (0,7)(0,3)(0,3)(?,?)
-123: OK regex: ((foo)|bar)!bas parsed_regex: ((foo)|bar)!bas str: bar!bas result: (0,7)(0,3)(?,?) expected_results (0,7)(0,3)(?,?)
-124: OK regex: ((foo)|bar)!bas parsed_regex: ((foo)|bar)!bas str: foo!bar!bas result: (4,11)(4,7)(?,?) expected_results (4,11)(4,7)(?,?)
-125: OK regex: ((foo)|bar)!bas parsed_regex: ((foo)|bar)!bas str: foo!bas result: (0,7)(0,3)(0,3) expected_results (0,7)(0,3)(0,3)
-126: OK regex: (foo|(bar))!bas parsed_regex: (foo|(bar))!bas str: bar!bas result: (0,7)(0,3)(0,3) expected_results (0,7)(0,3)(0,3)
-127: OK regex: (foo|(bar))!bas parsed_regex: (foo|(bar))!bas str: foo!bar!bas result: (4,11)(4,7)(4,7) expected_results (4,11)(4,7)(4,7)
-128: OK regex: (foo|(bar))!bas parsed_regex: (foo|(bar))!bas str: foo!bas result: (0,7)(0,3)(?,?) expected_results (0,7)(0,3)(?,?)
-129: OK regex: (foo|bar)!bas parsed_regex: (foo|bar)!bas str: bar!bas result: (0,7)(0,3) expected_results (0,7)(0,3)
-130: OK regex: (foo|bar)!bas parsed_regex: (foo|bar)!bas str: foo!bar!bas result: (4,11)(4,7) expected_results (4,11)(4,7)
-131: OK regex: (foo|bar)!bas parsed_regex: (foo|bar)!bas str: foo!bas result: (0,7)(0,3) expected_results (0,7)(0,3)
-132: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: foo!bar!bas result: (0,11)(0,11)(?,?)(?,?)(4,8)(8,11) expected_results (0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
-133: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: bas result: (0,3)(?,?)(0,3)(?,?)(?,?) expected_results (0,3)(?,?)(0,3)(?,?)(?,?)
-134: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: bar!bas result: (0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,4)(4,7)(?,?)(?,?)
-135: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: foo!bar!bas result: (0,11)(?,?)(?,?)(4,8)(8,11) expected_results (0,11)(?,?)(?,?)(4,8)(8,11)
-136: OK regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ parsed_regex: ^([^!]+!)?([^!]+)\$|^.+!([^!]+!)([^!]+)\$ str: foo!bas result: (0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,4)(4,7)(?,?)(?,?)
-137: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: bas result: (0,3)(0,3)(?,?)(0,3)(?,?)(?,?) expected_results (0,3)(0,3)(?,?)(0,3)(?,?)(?,?)
-138: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: bar!bas result: (0,7)(0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,7)(0,4)(4,7)(?,?)(?,?)
-139: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: foo!bar!bas result: (0,11)(0,11)(?,?)(?,?)(4,8)(8,11) expected_results (0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
-140: OK regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ parsed_regex: ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\$ str: foo!bas result: (0,7)(0,7)(0,4)(4,7)(?,?)(?,?) expected_results (0,7)(0,7)(0,4)(4,7)(?,?)(?,?)
-141: OK regex: .*(/XXX).* parsed_regex: .*(/XXX).* str: /XXX result: (0,4)(0,4) expected_results (0,4)(0,4)
-142: OK regex: .*(\\XXX).* parsed_regex: .*(\\XXX).* str: \XXX result: (0,4)(0,4) expected_results (0,4)(0,4)
-143: OK regex: \\XXX parsed_regex: \\XXX str: \XXX result: (0,4) expected_results (0,4)
-144: OK regex: .*(/000).* parsed_regex: .*(/000).* str: /000 result: (0,4)(0,4) expected_results (0,4)(0,4)
-145: OK regex: .*(\\000).* parsed_regex: .*(\\000).* str: \000 result: (0,4)(0,4) expected_results (0,4)(0,4)
-146: OK regex: \\000 parsed_regex: \\000 str: \000 result: (0,4) expected_results (0,4)
+Running perl_tests:
+0_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+1_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+2_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+3_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+4_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+5_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+6_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+7_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+8_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+9_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+12_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+13_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+14_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+15_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+16_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+17_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+18_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+19_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+20_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+21_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+22_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+24_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+25_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+27_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+28_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+29_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+30_y: OK regex: \\N{1} parsed_regex: \\N{1} str: abbbbc result_expr: $& expected_results a
+31_y: OK regex: \\N{1} parsed_regex: \\N{1} str: abbbbc result_expr: $-[0] expected_results 0
+32_y: OK regex: \\N{1} parsed_regex: \\N{1} str: abbbbc result_expr: $+[0] expected_results 1
+33_y: OK regex: \\N{3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $& expected_results abbb
+34_y: OK regex: \\N{3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+35_y: OK regex: \\N{3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+36_y: OK Warning: Parsed regex does not match. regex: \\N{ 3 , 4 } parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+37_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+38_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+39_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+40_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+41_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+42_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+43_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+44_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+45_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+46_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+47_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+48_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+49_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+50_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+51_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+52_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+53_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+54_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+55_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+56_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+57_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+58_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+59_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+60_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+61_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+62_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+63_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+64_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+65_y: OK regex: ^abc\$ parsed_regex: ^abc\$ str: abc result_expr: $& expected_results abc
+66_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: abcc result_expr: - expected_results -
+67_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+68_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: aabc result_expr: - expected_results -
+69_y: OK regex: abc\$ parsed_regex: abc\$ str: aabc result_expr: $& expected_results abc
+70_n: OK regex: abc\$ parsed_regex: abc\$ str: aabcd result_expr: - expected_results -
+71_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+72_y: OK regex: \$ parsed_regex: \$ str: abc result_expr: $& expected_results 
+73_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+74_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+75_y: OK regex: a\\Nc parsed_regex: a\\Nc str: abc result_expr: $& expected_results abc
+76_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+77_y: OK regex: a\\N*c parsed_regex: a\\N*c str: axyzc result_expr: $& expected_results axyzc
+78_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+79_n: OK regex: a\\N*c parsed_regex: a\\N*c str: axyzd result_expr: - expected_results -
+80_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+81_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+82_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+83_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+84_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+85_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+86_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+87_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+88_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+89_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+90_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+91_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+92_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+93_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+94_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+95_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+96_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+97_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+98_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+99_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+100_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+101_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+102_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+103_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+104_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+105_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+106_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+107_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+108_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+109_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+110_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+111_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+112_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+113_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+114_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+115_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+116_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+117_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+118_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+119_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+120_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+121_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+122_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+123_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+124_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+125_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+126_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+127_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+128_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+129_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+130_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+131_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+132_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+133_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+134_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+135_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+136_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+137_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+138_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+139_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+140_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+141_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+142_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+143_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+144_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+145_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+146_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+147_n: OK regex: \$b parsed_regex: \$b str: b result_expr: - expected_results -
+148_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+149_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+150_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+151_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+152_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+153_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+154_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+155_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+156_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+157_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+158_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+159_y: OK regex: abc parsed_regex: abc str: ABC result_expr: $& expected_results ABC
+160_n: OK regex: abc parsed_regex: abc str: XBC result_expr: - expected_results -
+161_n: OK regex: abc parsed_regex: abc str: AXC result_expr: - expected_results -
+162_n: OK regex: abc parsed_regex: abc str: ABX result_expr: - expected_results -
+163_y: OK regex: abc parsed_regex: abc str: XABCY result_expr: $& expected_results ABC
+164_y: OK regex: abc parsed_regex: abc str: ABABC result_expr: $& expected_results ABC
+165_y: OK regex: ab*c parsed_regex: ab*c str: ABC result_expr: $& expected_results ABC
+166_y: OK regex: ab*bc parsed_regex: ab*bc str: ABC result_expr: $& expected_results ABC
+167_y: OK regex: ab*bc parsed_regex: ab*bc str: ABBC result_expr: $& expected_results ABBC
+168_y: OK regex: ab*?bc parsed_regex: ab*?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+169_y: Failure: Regex should apply. regex: ab{0,}?bc parsed_regex: ab{0,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+170_y: OK regex: ab+?bc parsed_regex: ab+?bc str: ABBC result_expr: $& expected_results ABBC
+171_n: OK regex: ab+bc parsed_regex: ab+bc str: ABC result_expr: - expected_results -
+172_n: OK regex: ab+bc parsed_regex: ab+bc str: ABQ result_expr: - expected_results -
+173_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: ABQ result_expr: - expected_results -
+174_y: OK regex: ab+bc parsed_regex: ab+bc str: ABBBBC result_expr: $& expected_results ABBBBC
+175_y: Failure: Regex should apply. regex: ab{1,}?bc parsed_regex: ab{1,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+176_y: OK regex: ab{1,3}?bc parsed_regex: ab{1,3}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+177_y: Failure: Regex should apply. regex: ab{3,4}?bc parsed_regex: ab{3,4}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+178_n: OK regex: ab{4,5}?bc parsed_regex: ab{4,5}?bc str: ABBBBC result_expr: - expected_results -
+179_y: OK regex: ab??bc parsed_regex: ab??bc str: ABBC result_expr: $& expected_results ABBC
+180_y: OK regex: ab??bc parsed_regex: ab??bc str: ABC result_expr: $& expected_results ABC
+181_y: OK regex: ab{0,1}?bc parsed_regex: ab{0,1}?bc str: ABC result_expr: $& expected_results ABC
+182_n: OK regex: ab??bc parsed_regex: ab??bc str: ABBBBC result_expr: - expected_results -
+183_y: OK regex: ab??c parsed_regex: ab??c str: ABC result_expr: $& expected_results ABC
+184_y: OK regex: ab{0,1}?c parsed_regex: ab{0,1}?c str: ABC result_expr: $& expected_results ABC
+185_y: OK regex: ^abc\$ parsed_regex: ^abc\$ str: ABC result_expr: $& expected_results ABC
+186_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: ABCC result_expr: - expected_results -
+187_y: OK regex: ^abc parsed_regex: ^abc str: ABCC result_expr: $& expected_results ABC
+188_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: AABC result_expr: - expected_results -
+189_y: OK regex: abc\$ parsed_regex: abc\$ str: AABC result_expr: $& expected_results ABC
+190_y: OK regex: ^ parsed_regex: ^ str: ABC result_expr: $& expected_results 
+191_y: OK regex: \$ parsed_regex: \$ str: ABC result_expr: $& expected_results 
+192_y: OK regex: a.c parsed_regex: a.c str: ABC result_expr: $& expected_results ABC
+193_y: OK regex: a.c parsed_regex: a.c str: AXC result_expr: $& expected_results AXC
+194_y: OK regex: a\\Nc parsed_regex: a\\Nc str: ABC result_expr: $& expected_results ABC
+195_y: OK regex: a.*?c parsed_regex: a.*?c str: AXYZC result_expr: $& expected_results AXYZC
+196_n: OK regex: a.*c parsed_regex: a.*c str: AXYZD result_expr: - expected_results -
+197_n: OK regex: a[bc]d parsed_regex: a[bc]d str: ABC result_expr: - expected_results -
+198_y: OK regex: a[bc]d parsed_regex: a[bc]d str: ABD result_expr: $& expected_results ABD
+199_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ABD result_expr: - expected_results -
+200_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ACE result_expr: $& expected_results ACE
+201_y: OK regex: a[b-d] parsed_regex: a[b-d] str: AAC result_expr: $& expected_results AC
+202_y: OK regex: a[-b] parsed_regex: a[-b] str: A- result_expr: $& expected_results A-
+203_y: OK regex: a[b-] parsed_regex: a[b-] str: A- result_expr: $& expected_results A-
+204_y: OK regex: a] parsed_regex: a] str: A] result_expr: $& expected_results A]
+205_y: OK regex: a[]]b parsed_regex: a[]]b str: A]B result_expr: $& expected_results A]B
+206_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: AED result_expr: $& expected_results AED
+207_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: ABD result_expr: - expected_results -
+208_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: ADC result_expr: $& expected_results ADC
+209_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: A-C result_expr: - expected_results -
+210_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: A]C result_expr: - expected_results -
+211_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: ADC result_expr: $& expected_results ADC
+212_y: OK regex: ab|cd parsed_regex: ab|cd str: ABC result_expr: $& expected_results AB
+213_y: OK regex: ab|cd parsed_regex: ab|cd str: ABCD result_expr: $& expected_results AB
+214_y: OK regex: ()ef parsed_regex: ()ef str: DEF result_expr: $&-$1 expected_results EF-
+215_n: OK regex: \$b parsed_regex: \$b str: B result_expr: - expected_results -
+216_y: OK regex: a\(b parsed_regex: a\(b str: A(B result_expr: $&-$1 expected_results A(B-
+217_y: OK regex: a\(*b parsed_regex: a\(*b str: AB result_expr: $& expected_results AB
+218_y: OK regex: a\(*b parsed_regex: a\(*b str: A((B result_expr: $& expected_results A((B
+219_y: OK regex: a\\b parsed_regex: a\\b str: A\B result_expr: $& expected_results A\B
+220_y: OK regex: ((a)) parsed_regex: ((a)) str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+221_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+222_y: OK regex: a+b+c parsed_regex: a+b+c str: AABBABC result_expr: $& expected_results ABC
+223_y: OK regex: a{1,}b{1,}c parsed_regex: a{1,}b{1,}c str: AABBABC result_expr: $& expected_results ABC
+224_y: OK regex: a.+?c parsed_regex: a.+?c str: ABCABC result_expr: $& expected_results ABC
+225_y: OK regex: a.*?c parsed_regex: a.*?c str: ABCABC result_expr: $& expected_results ABC
+226_y: Failure: Regex should apply. regex: a.{0,5}?c parsed_regex: a.{0,5}?c str: ABCABC result_expr: $& expected_results ABC
+227_y: OK regex: (a+|b)* parsed_regex: (a+|b)* str: AB result_expr: $&-$1 expected_results AB-B
+228_y: OK regex: (a+|b){0,} parsed_regex: (a+|b){0,} str: AB result_expr: $&-$1 expected_results AB-B
+229_y: OK regex: (a+|b)+ parsed_regex: (a+|b)+ str: AB result_expr: $&-$1 expected_results AB-B
+230_y: OK regex: (a+|b){1,} parsed_regex: (a+|b){1,} str: AB result_expr: $&-$1 expected_results AB-B
+231_y: OK regex: (a+|b)? parsed_regex: (a+|b)? str: AB result_expr: $&-$1 expected_results A-A
+232_y: OK regex: (a+|b){0,1} parsed_regex: (a+|b){0,1} str: AB result_expr: $&-$1 expected_results A-A
+233_y: Failure: Result is wrong. (is: A-A) regex: (a+|b){0,1}? parsed_regex: (a+|b){0,1}? str: AB result_expr: $&-$1 expected_results -
+234_y: OK regex: [^ab]* parsed_regex: [^ab]* str: CDE result_expr: $& expected_results CDE
+235_n: OK regex: abc parsed_regex: abc str:  result_expr: - expected_results -
+236_y: OK regex: a* parsed_regex: a* str:  result_expr: $& expected_results 
+237_y: OK regex: ([abc])*d parsed_regex: ([abc])*d str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+238_y: OK regex: ([abc])*bcd parsed_regex: ([abc])*bcd str: ABCD result_expr: $&-$1 expected_results ABCD-A
+239_y: OK regex: a|b|c|d|e parsed_regex: a|b|c|d|e str: E result_expr: $& expected_results E
+240_y: OK regex: (a|b|c|d|e)f parsed_regex: (a|b|c|d|e)f str: EF result_expr: $&-$1 expected_results EF-E
+241_y: OK regex: abcd*efg parsed_regex: abcd*efg str: ABCDEFG result_expr: $& expected_results ABCDEFG
+242_y: OK regex: ab* parsed_regex: ab* str: XABYABBBZ result_expr: $& expected_results AB
+243_y: OK regex: ab* parsed_regex: ab* str: XAYABBBZ result_expr: $& expected_results A
+244_y: OK regex: (ab|cd)e parsed_regex: (ab|cd)e str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+245_y: OK regex: [abhgefdc]ij parsed_regex: [abhgefdc]ij str: HIJ result_expr: $& expected_results HIJ
+246_n: OK regex: ^(ab|cd)e parsed_regex: ^(ab|cd)e str: ABCDE result_expr: x$1y expected_results XY
+247_y: OK regex: (abc|)ef parsed_regex: (abc|)ef str: ABCDEF result_expr: $&-$1 expected_results EF-
+248_y: OK regex: (a|b)c*d parsed_regex: (a|b)c*d str: ABCD result_expr: $&-$1 expected_results BCD-B
+249_y: OK regex: (ab|ab*)bc parsed_regex: (ab|ab*)bc str: ABC result_expr: $&-$1 expected_results ABC-A
+250_y: OK regex: a([bc]*)c* parsed_regex: a([bc]*)c* str: ABC result_expr: $&-$1 expected_results ABC-BC
+251_y: OK regex: a([bc]*)(c*d) parsed_regex: a([bc]*)(c*d) str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+252_y: OK regex: a([bc]+)(c*d) parsed_regex: a([bc]+)(c*d) str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+253_y: OK regex: a([bc]*)(c+d) parsed_regex: a([bc]*)(c+d) str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+254_y: OK regex: a[bcd]*dcdcde parsed_regex: a[bcd]*dcdcde str: ADCDCDE result_expr: $& expected_results ADCDCDE
+255_n: OK regex: a[bcd]+dcdcde parsed_regex: a[bcd]+dcdcde str: ADCDCDE result_expr: - expected_results -
+256_y: OK regex: (ab|a)b*c parsed_regex: (ab|a)b*c str: ABC result_expr: $&-$1 expected_results ABC-AB
+257_y: OK regex: ((a)(b)c)(d) parsed_regex: ((a)(b)c)(d) str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+258_y: OK regex: [a-zA-Z_][a-zA-Z0-9_]* parsed_regex: [a-zA-Z_][a-zA-Z0-9_]* str: ALPHA result_expr: $& expected_results ALPHA
+259_y: Failure: Result is wrong. (is: BH-BH) regex: ^a(bc+|b[eh])g|.h\$ parsed_regex: ^a(bc+|b[eh])g|.h\$ str: ABH result_expr: $&-$1 expected_results BH-
+260_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+261_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+262_n: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: EFFG result_expr: - expected_results -
+263_n: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: BCDD result_expr: - expected_results -
+264_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+265_y: OK regex: ((((((((((a)))))))))) parsed_regex: ((((((((((a)))))))))) str: A result_expr: $10 expected_results A
+266_y: OK regex: ((((((((((a))))))))))\10 parsed_regex: ((((((((((a))))))))))\10 str: AA result_expr: $& expected_results AA
+267_y: OK regex: (((((((((a))))))))) parsed_regex: (((((((((a))))))))) str: A result_expr: $& expected_results A
+268_n: OK regex: multiple words of text parsed_regex: multiple words of text str: UH-UH result_expr: - expected_results -
+269_y: OK regex: multiple words parsed_regex: multiple words str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+270_y: OK regex: (.*)c(.*) parsed_regex: (.*)c(.*) str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+271_y: OK regex: \((.*), (.*)\) parsed_regex: \((.*), (.*)\) str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+272_n: OK regex: [k] parsed_regex: [k] str: AB result_expr: - expected_results -
+273_y: OK regex: abcd parsed_regex: abcd str: ABCD result_expr: $& expected_results ABCD
+274_y: OK regex: a(bc)d parsed_regex: a(bc)d str: ABCD result_expr: $1 expected_results BC
+275_y: OK regex: a[-]?c parsed_regex: a[-]?c str: AC result_expr: $& expected_results AC
+276_y: OK regex: (abc)\1 parsed_regex: (abc)\1 str: ABCABC result_expr: $1 expected_results ABC
+277_y: OK regex: ([a-c]*)\1 parsed_regex: ([a-c]*)\1 str: ABCABC result_expr: $1 expected_results ABC
+278_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+279_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+280_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+281_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+282_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+283_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+284_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+285_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+286_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+287_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+288_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+289_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+290_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+291_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+292_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+293_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+294_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+295_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+296_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+297_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+298_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+299_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+300_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+301_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+302_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+303_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+304_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+305_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+306_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+307_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+308_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+309_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+310_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+311_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+312_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+313_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+314_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+315_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+316_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+317_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+318_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+319_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+320_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+321_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+322_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+323_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+324_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+325_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+326_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+327_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+328_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+329_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+330_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+331_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+332_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
 
-Running class:
-1: OK regex: aa* parsed_regex: aa* str: xaxaax result: (1,2) expected_results (1,2)
-2: OK regex: (a*)(ab)*(b*) parsed_regex: (a*)(ab)*(b*) str: abc result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2)
-M2: OK regex: (a*)(ab)*(b*) parsed_regex: (a*)(ab)*(b*) str: abc result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,0)(0,2)(2,2)
-3: Failure: Ranges are wrong. regex: ((a*)(ab)*)((b*)(a*)) parsed_regex: ((a*)(ab)*)((b*)(a*)) str: aba result: (0,3)(0,1)(0,1)(?,?)(1,3)(1,2)(2,3) expected_results (0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)
-4: OK regex: (...?.?)* parsed_regex: (...?.?)* str: xxxxxx result: (0,6)(4,6) expected_results (0,6)(4,6)
-5: Failure: Ranges are wrong. regex: (a|ab)(bc|c) parsed_regex: (a|ab)(bc|c) str: abcabc result: (0,3)(0,1)(1,3) expected_results (0,3)(0,2)(2,3)
-6: Failure: Ranges are wrong. regex: (aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b) str: ababa result: (0,4)(0,3)(3,4) expected_results (0,5)(0,2)(2,5)
-7: OK regex: (a*){2} parsed_regex: (a*){2} str: xxxxx result: (0,0)(0,0) expected_results (0,0)(0,0)
-8: OK regex: (a*)* parsed_regex: (a*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-9: Failure: Ranges are wrong. regex: (aba|a*b)* parsed_regex: (aba|a*b)* str: ababa result: (0,4)(3,4) expected_results (0,5)(2,5)
-10: OK regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(?,?)
-11: OK regex: .*(.*) parsed_regex: .*(.*) str: ab result: (0,2)(2,2) expected_results (0,2)(2,2)
-12: OK regex: (a?)((ab)?)(b?)a?(ab)?b? parsed_regex: (a?)((ab)?)(b?)a?(ab)?b? str: abab result: (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) expected_results (0,4)(0,1)(1,1)(?,?)(1,2)(?,?)
-M12: OK regex: (a?)((ab)?)(b?)a?(ab)?b? parsed_regex: (a?)((ab)?)(b?)a?(ab)?b? str: abab result: (0,4)(0,1)(1,1)(?,?)(1,2)(?,?) expected_results (0,4)(0,1)(1,1)(?,?)(1,2)(2,4)
 
-Running left_assoc:
-M1: Failure: Ranges should be wrong. regex: (a|ab)(c|bcd)(d*) parsed_regex: (a|ab)(c|bcd)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4)
-M2: Failure: Ranges should be wrong. regex: (a|ab)(bcd|c)(d*) parsed_regex: (a|ab)(bcd|c)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4)
-M3: OK regex: (ab|a)(c|bcd)(d*) parsed_regex: (ab|a)(c|bcd)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4)
-M4: OK regex: (ab|a)(bcd|c)(d*) parsed_regex: (ab|a)(bcd|c)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4)
-M5: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3)
-M6: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3)
-M7: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3)
-M8: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,0)(0,3)(3,3)
-M9: Failure: Ranges should be wrong. regex: (a|ab)(c|bcd)(d|.*) parsed_regex: (a|ab)(c|bcd)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4)
-M10: Failure: Ranges should be wrong. regex: (a|ab)(bcd|c)(d|.*) parsed_regex: (a|ab)(bcd|c)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,1)(1,4)(4,4)
-M11: OK regex: (ab|a)(c|bcd)(d|.*) parsed_regex: (ab|a)(c|bcd)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4)
-M12: OK regex: (ab|a)(bcd|c)(d|.*) parsed_regex: (ab|a)(bcd|c)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,1)(1,4)(4,4)
+bar result_expr: $1 expected_results 
 
-Running right_assoc:
-1: Failure: Ranges are wrong. regex: (a|ab)(c|bcd)(d*) parsed_regex: (a|ab)(c|bcd)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4)
-2: Failure: Ranges are wrong. regex: (a|ab)(bcd|c)(d*) parsed_regex: (a|ab)(bcd|c)(d*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4)
-3: OK regex: (ab|a)(c|bcd)(d*) parsed_regex: (ab|a)(c|bcd)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4)
-4: OK regex: (ab|a)(bcd|c)(d*) parsed_regex: (ab|a)(bcd|c)(d*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4)
-5: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3)
-6: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3)
-7: OK regex: (a*)(b|abc)(c*) parsed_regex: (a*)(b|abc)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3)
-8: OK regex: (a*)(abc|b)(c*) parsed_regex: (a*)(abc|b)(c*) str: abc result: (0,3)(0,1)(1,2)(2,3) expected_results (0,3)(0,1)(1,2)(2,3)
-9: Failure: Ranges are wrong. regex: (a|ab)(c|bcd)(d|.*) parsed_regex: (a|ab)(c|bcd)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4)
-10: Failure: Ranges are wrong. regex: (a|ab)(bcd|c)(d|.*) parsed_regex: (a|ab)(bcd|c)(d|.*) str: abcd result: (0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,2)(2,3)(3,4)
-11: OK regex: (ab|a)(c|bcd)(d|.*) parsed_regex: (ab|a)(c|bcd)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4)
-12: OK regex: (ab|a)(bcd|c)(d|.*) parsed_regex: (ab|a)(bcd|c)(d|.*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4)
 
-Running forced_assoc:
-1: OK regex: (a|ab)(c|bcd) parsed_regex: (a|ab)(c|bcd) str: abcd result: (0,4)(0,1)(1,4) expected_results (0,4)(0,1)(1,4)
-2: OK regex: (a|ab)(bcd|c) parsed_regex: (a|ab)(bcd|c) str: abcd result: (0,4)(0,1)(1,4) expected_results (0,4)(0,1)(1,4)
-3: Failure: Ranges are wrong. regex: (ab|a)(c|bcd) parsed_regex: (ab|a)(c|bcd) str: abcd result: (0,3)(0,2)(2,3) expected_results (0,4)(0,1)(1,4)
-4: Failure: Ranges are wrong. regex: (ab|a)(bcd|c) parsed_regex: (ab|a)(bcd|c) str: abcd result: (0,3)(0,2)(2,3) expected_results (0,4)(0,1)(1,4)
-5: OK regex: ((a|ab)(c|bcd))(d*) parsed_regex: ((a|ab)(c|bcd))(d*) str: abcd result: (0,4)(0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4)
-6: OK regex: ((a|ab)(bcd|c))(d*) parsed_regex: ((a|ab)(bcd|c))(d*) str: abcd result: (0,4)(0,4)(0,1)(1,4)(4,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4)
-7: Failure: Ranges are wrong. regex: ((ab|a)(c|bcd))(d*) parsed_regex: ((ab|a)(c|bcd))(d*) str: abcd result: (0,4)(0,3)(0,2)(2,3)(3,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4)
-8: Failure: Ranges are wrong. regex: ((ab|a)(bcd|c))(d*) parsed_regex: ((ab|a)(bcd|c))(d*) str: abcd result: (0,4)(0,3)(0,2)(2,3)(3,4) expected_results (0,4)(0,4)(0,1)(1,4)(4,4)
-9: Failure: Ranges are wrong. regex: (a|ab)((c|bcd)(d*)) parsed_regex: (a|ab)((c|bcd)(d*)) str: abcd result: (0,4)(0,1)(1,4)(1,4)(4,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4)
-10: Failure: Ranges are wrong. regex: (a|ab)((bcd|c)(d*)) parsed_regex: (a|ab)((bcd|c)(d*)) str: abcd result: (0,4)(0,1)(1,4)(1,4)(4,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4)
-11: OK regex: (ab|a)((c|bcd)(d*)) parsed_regex: (ab|a)((c|bcd)(d*)) str: abcd result: (0,4)(0,2)(2,4)(2,3)(3,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4)
-12: OK regex: (ab|a)((bcd|c)(d*)) parsed_regex: (ab|a)((bcd|c)(d*)) str: abcd result: (0,4)(0,2)(2,4)(2,3)(3,4) expected_results (0,4)(0,2)(2,4)(2,3)(3,4)
-13: Failure: Ranges are wrong. regex: (a*)(b|abc) parsed_regex: (a*)(b|abc) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3)
-14: Failure: Ranges are wrong. regex: (a*)(abc|b) parsed_regex: (a*)(abc|b) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3)
-15: Failure: Ranges are wrong. regex: ((a*)(b|abc))(c*) parsed_regex: ((a*)(b|abc))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3)
-16: Failure: Ranges are wrong. regex: ((a*)(abc|b))(c*) parsed_regex: ((a*)(abc|b))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3)
-17: OK regex: (a*)((b|abc)(c*)) parsed_regex: (a*)((b|abc)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3)
-18: OK regex: (a*)((abc|b)(c*)) parsed_regex: (a*)((abc|b)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3)
-19: Failure: Ranges are wrong. regex: (a*)(b|abc) parsed_regex: (a*)(b|abc) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3)
-20: Failure: Ranges are wrong. regex: (a*)(abc|b) parsed_regex: (a*)(abc|b) str: abc result: (0,2)(0,1)(1,2) expected_results (0,3)(0,0)(0,3)
-21: Failure: Ranges are wrong. regex: ((a*)(b|abc))(c*) parsed_regex: ((a*)(b|abc))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3)
-22: Failure: Ranges are wrong. regex: ((a*)(abc|b))(c*) parsed_regex: ((a*)(abc|b))(c*) str: abc result: (0,3)(0,2)(0,1)(1,2)(2,3) expected_results (0,3)(0,3)(0,0)(0,3)(3,3)
-23: OK regex: (a*)((b|abc)(c*)) parsed_regex: (a*)((b|abc)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3)
-24: OK regex: (a*)((abc|b)(c*)) parsed_regex: (a*)((abc|b)(c*)) str: abc result: (0,3)(0,1)(1,3)(1,2)(2,3) expected_results (0,3)(0,1)(1,3)(1,2)(2,3)
-25: Failure: Ranges are wrong. regex: (a|ab) parsed_regex: (a|ab) str: ab result: (0,1)(0,1) expected_results (0,2)(0,2)
-26: OK regex: (ab|a) parsed_regex: (ab|a) str: ab result: (0,2)(0,2) expected_results (0,2)(0,2)
-27: Failure: Ranges are wrong. regex: (a|ab)(b*) parsed_regex: (a|ab)(b*) str: ab result: (0,2)(0,1)(1,2) expected_results (0,2)(0,2)(2,2)
-28: OK regex: (ab|a)(b*) parsed_regex: (ab|a)(b*) str: ab result: (0,2)(0,2)(2,2) expected_results (0,2)(0,2)(2,2)
 
-Running nullsub3:
-1: OK regex: (a*)* parsed_regex: (a*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-2: OK regex: (a*)* parsed_regex: (a*)* str: x result: (0,0)(0,0) expected_results (0,0)(0,0)
-3: OK regex: (a*)* parsed_regex: (a*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-4: OK regex: (a*)* parsed_regex: (a*)* str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6)
-5: OK regex: (a*)+ parsed_regex: (a*)+ str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-6: OK regex: (a*)+ parsed_regex: (a*)+ str: x result: (0,0)(0,0) expected_results (0,0)(0,0)
-7: OK regex: (a*)+ parsed_regex: (a*)+ str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-8: OK regex: (a*)+ parsed_regex: (a*)+ str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6)
-9: OK regex: (a+)* parsed_regex: (a+)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-10: OK regex: (a+)* parsed_regex: (a+)* str: x result: (0,0)(?,?) expected_results (0,0)(?,?)
-11: OK regex: (a+)* parsed_regex: (a+)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-12: OK regex: (a+)* parsed_regex: (a+)* str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6)
-13: OK regex: (a+)+ parsed_regex: (a+)+ str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-14: OK regex: (a+)+ parsed_regex: (a+)+ str: x result: NOMATCH expected_results NOMATCH
-15: OK regex: (a+)+ parsed_regex: (a+)+ str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-16: OK regex: (a+)+ parsed_regex: (a+)+ str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6)
-17: OK regex: ([a]*)* parsed_regex: ([a]*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-18: OK regex: ([a]*)* parsed_regex: ([a]*)* str: x result: (0,0)(0,0) expected_results (0,0)(0,0)
-19: OK regex: ([a]*)* parsed_regex: ([a]*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-20: OK regex: ([a]*)* parsed_regex: ([a]*)* str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6)
-21: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-22: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: x result: (0,0)(0,0) expected_results (0,0)(0,0)
-23: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-24: OK regex: ([a]*)+ parsed_regex: ([a]*)+ str: aaaaaax result: (0,6)(0,6) expected_results (0,6)(0,6)
-25: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-26: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: b result: (0,0)(0,0) expected_results (0,0)(0,0)
-27: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-28: OK regex: ([^b]*)* parsed_regex: ([^b]*)* str: aaaaaab result: (0,6)(0,6) expected_results (0,6)(0,6)
-29: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: a result: (0,1)(0,1) expected_results (0,1)(0,1)
-30: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: aaaaaa result: (0,6)(0,6) expected_results (0,6)(0,6)
-31: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: ababab result: (0,6)(0,6) expected_results (0,6)(0,6)
-32: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: bababa result: (0,6)(0,6) expected_results (0,6)(0,6)
-33: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: b result: (0,1)(0,1) expected_results (0,1)(0,1)
-34: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: bbbbbb result: (0,6)(0,6) expected_results (0,6)(0,6)
-35: OK regex: ([ab]*)* parsed_regex: ([ab]*)* str: aaaabcde result: (0,5)(0,5) expected_results (0,5)(0,5)
-36: OK regex: ([^a]*)* parsed_regex: ([^a]*)* str: b result: (0,1)(0,1) expected_results (0,1)(0,1)
-37: OK regex: ([^a]*)* parsed_regex: ([^a]*)* str: bbbbbb result: (0,6)(0,6) expected_results (0,6)(0,6)
-38: OK regex: ([^a]*)* parsed_regex: ([^a]*)* str: aaaaaa result: (0,0)(0,0) expected_results (0,0)(0,0)
-39: OK regex: ([^ab]*)* parsed_regex: ([^ab]*)* str: ccccxx result: (0,6)(0,6) expected_results (0,6)(0,6)
-40: OK regex: ([^ab]*)* parsed_regex: ([^ab]*)* str: ababab result: (0,0)(0,0) expected_results (0,0)(0,0)
-41: OK regex: ((z)+|a)* parsed_regex: ((z)+|a)* str: zabcde result: (0,2)(1,2)(?,?) expected_results (0,2)(1,2)(?,?)
-42: OK regex: (a) parsed_regex: (a) str: aaa result: (0,1)(0,1) expected_results (0,1)(0,1)
-46: OK regex: (a*)*(x) parsed_regex: (a*)*(x) str: x result: (0,1)(0,0)(0,1) expected_results (0,1)(0,0)(0,1)
-47: OK regex: (a*)*(x) parsed_regex: (a*)*(x) str: ax result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2)
-48: OK regex: (a*)*(x) parsed_regex: (a*)*(x) str: axa result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2)
-49: OK regex: (a*)+(x) parsed_regex: (a*)+(x) str: x result: (0,1)(0,0)(0,1) expected_results (0,1)(0,0)(0,1)
-50: OK regex: (a*)+(x) parsed_regex: (a*)+(x) str: ax result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2)
-51: OK regex: (a*)+(x) parsed_regex: (a*)+(x) str: axa result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2)
-52: OK regex: (a*){2}(x) parsed_regex: (a*){2}(x) str: x result: (0,1)(0,0)(0,1) expected_results (0,1)(0,0)(0,1)
-53: OK regex: (a*){2}(x) parsed_regex: (a*){2}(x) str: ax result: (0,2)(1,1)(1,2) expected_results (0,2)(1,1)(1,2)
-54: OK regex: (a*){2}(x) parsed_regex: (a*){2}(x) str: axa result: (0,2)(1,1)(1,2) expected_results (0,2)(1,1)(1,2)
+333_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
 
-Running repetition2:
-1: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: NULL result: NOMATCH expected_results NOMATCH
-2: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: NULL result: NOMATCH expected_results NOMATCH
-3: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: NULL result: NOMATCH expected_results NOMATCH
-4: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: NULL result: NOMATCH expected_results NOMATCH
-5: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: NULL result: NOMATCH expected_results NOMATCH
-6: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: NULL result: NOMATCH expected_results NOMATCH
-7: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: NULL result: (0,0)(?,?)(?,?)(?,?) expected_results (0,0)(?,?)(?,?)(?,?)
-8: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1)
-9: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: a result: NOMATCH expected_results NOMATCH
-10: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: a result: NOMATCH expected_results NOMATCH
-11: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1)
-12: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: a result: NOMATCH expected_results NOMATCH
-13: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: a result: NOMATCH expected_results NOMATCH
-14: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: a result: (0,1)(0,1)(?,?)(0,1) expected_results (0,1)(0,1)(?,?)(0,1)
-15: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-16: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aa result: (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)
-17: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aa result: NOMATCH expected_results NOMATCH
-18: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-19: Failure: Regex should apply. regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aa result: NOMATCH expected_results (0,2)(1,2)(?,?)(1,2)
-20: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aa result: NOMATCH expected_results NOMATCH
-21: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-22: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-23: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaa result: (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3) expected_results (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)
-24: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaa result: (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3) expected_results (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)
-25: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-26: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaa result: (0,3)(2,3)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(2,3)
-27: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaa result: NOMATCH expected_results (0,3)(2,3)(?,?)(2,3)
-28: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaa result: (0,3)(2,3)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(2,3)
-29: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-30: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-31: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaaa result: (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4) expected_results (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)
-32: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-33: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?)
-34: Failure: Regex should apply. regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaa result: NOMATCH expected_results (0,4)(3,4)(?,?)(3,4)
-35: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?)
-36: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-37: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-38: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaaaa result: (0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5) expected_results (0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)
-39: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-40: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?)
-41: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaaa result: (0,5)(4,5)(?,?)(4,5) expected_results (0,5)(4,5)(?,?)(4,5)
-42: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaaaa result: (0,5)(4,5)(?,?)(4,5) expected_results (0,5)(4,5)(?,?)(4,5)
-43: OK regex: ((..)|(.)) parsed_regex: ((..)|(.)) str: aaaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-44: OK regex: ((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.)) str: aaaaaa result: (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?) expected_results (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-45: OK regex: ((..)|(.))((..)|(.))((..)|(.)) parsed_regex: ((..)|(.))((..)|(.))((..)|(.)) str: aaaaaa result: (0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?) expected_results (0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)
-46: OK regex: ((..)|(.)){1} parsed_regex: ((..)|(.)){1} str: aaaaaa result: (0,2)(0,2)(0,2)(?,?) expected_results (0,2)(0,2)(0,2)(?,?)
-47: OK regex: ((..)|(.)){2} parsed_regex: ((..)|(.)){2} str: aaaaaa result: (0,4)(2,4)(2,4)(?,?) expected_results (0,4)(2,4)(2,4)(?,?)
-48: OK regex: ((..)|(.)){3} parsed_regex: ((..)|(.)){3} str: aaaaaa result: (0,6)(4,6)(4,6)(?,?) expected_results (0,6)(4,6)(4,6)(?,?)
-49: OK regex: ((..)|(.))* parsed_regex: ((..)|(.))* str: aaaaaa result: (0,6)(4,6)(4,6)(?,?) expected_results (0,6)(4,6)(4,6)(?,?)
-100: OK regex: X(.?){0,}Y parsed_regex: X(.?){0,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-101: OK regex: X(.?){1,}Y parsed_regex: X(.?){1,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-102: OK regex: X(.?){2,}Y parsed_regex: X(.?){2,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-103: OK regex: X(.?){3,}Y parsed_regex: X(.?){3,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-104: OK regex: X(.?){4,}Y parsed_regex: X(.?){4,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-105: OK regex: X(.?){5,}Y parsed_regex: X(.?){5,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-106: OK regex: X(.?){6,}Y parsed_regex: X(.?){6,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-107: OK regex: X(.?){7,}Y parsed_regex: X(.?){7,}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-108: Failure: Regex should apply. regex: X(.?){8,}Y parsed_regex: X(.?){8,}Y str: X1234567Y result: NOMATCH expected_results (0,9)(8,8)
-110: OK regex: X(.?){0,8}Y parsed_regex: X(.?){0,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-111: OK regex: X(.?){1,8}Y parsed_regex: X(.?){1,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-112: OK regex: X(.?){2,8}Y parsed_regex: X(.?){2,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-113: OK regex: X(.?){3,8}Y parsed_regex: X(.?){3,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-114: OK regex: X(.?){4,8}Y parsed_regex: X(.?){4,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-115: OK regex: X(.?){5,8}Y parsed_regex: X(.?){5,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-116: OK regex: X(.?){6,8}Y parsed_regex: X(.?){6,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-117: OK regex: X(.?){7,8}Y parsed_regex: X(.?){7,8}Y str: X1234567Y result: (0,9)(7,8) expected_results (0,9)(7,8)
-118: Failure: Parsed regex does not match. regex: X(.?){8,8}Y parsed_regex: X(.?){8}Y str: X1234567Y result: NOMATCH expected_results (0,9)(8,8)
-260: Failure: Ranges are wrong. regex: (a|ab|c|bcd){0,}(d*) parsed_regex: (a|ab|c|bcd){0,}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6)
-261: Failure: Ranges are wrong. regex: (a|ab|c|bcd){1,}(d*) parsed_regex: (a|ab|c|bcd){1,}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6)
-262: Failure: Ranges are wrong. regex: (a|ab|c|bcd){2,}(d*) parsed_regex: (a|ab|c|bcd){2,}(d*) str: ababcd result: (2,6)(3,6)(6,6) expected_results (0,6)(3,6)(6,6)
-263: Failure: Regex should apply. regex: (a|ab|c|bcd){3,}(d*) parsed_regex: (a|ab|c|bcd){3,}(d*) str: ababcd result: NOMATCH expected_results (0,6)(3,6)(6,6)
-264: OK regex: (a|ab|c|bcd){4,}(d*) parsed_regex: (a|ab|c|bcd){4,}(d*) str: ababcd result: NOMATCH expected_results NOMATCH
-265: Failure: Ranges are wrong. regex: (a|ab|c|bcd){0,10}(d*) parsed_regex: (a|ab|c|bcd){0,10}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6)
-266: Failure: Ranges are wrong. regex: (a|ab|c|bcd){1,10}(d*) parsed_regex: (a|ab|c|bcd){1,10}(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6)
-267: Failure: Ranges are wrong. regex: (a|ab|c|bcd){2,10}(d*) parsed_regex: (a|ab|c|bcd){2,10}(d*) str: ababcd result: (2,6)(3,6)(6,6) expected_results (0,6)(3,6)(6,6)
-268: Failure: Regex should apply. regex: (a|ab|c|bcd){3,10}(d*) parsed_regex: (a|ab|c|bcd){3,10}(d*) str: ababcd result: NOMATCH expected_results (0,6)(3,6)(6,6)
-269: OK regex: (a|ab|c|bcd){4,10}(d*) parsed_regex: (a|ab|c|bcd){4,10}(d*) str: ababcd result: NOMATCH expected_results NOMATCH
-270: Failure: Ranges are wrong. regex: (a|ab|c|bcd)*(d*) parsed_regex: (a|ab|c|bcd)*(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6)
-271: Failure: Ranges are wrong. regex: (a|ab|c|bcd)+(d*) parsed_regex: (a|ab|c|bcd)+(d*) str: ababcd result: (0,1)(0,1)(1,1) expected_results (0,6)(3,6)(6,6)
 
-Running totest:
-01: OK regex: a+ parsed_regex: a+ str: xaax result: (1,3) expected_results (1,3)
-03: Failure: Ranges are wrong. regex: (a?)((ab)?) parsed_regex: (a?)((ab)?) str: ab result: (0,1)(0,1)(1,1)(?,?) expected_results (0,2)(0,0)(0,2)(0,2)
-04: OK regex: (a?)((ab)?)(b?) parsed_regex: (a?)((ab)?)(b?) str: ab result: (0,2)(0,1)(1,1)(?,?)(1,2) expected_results (0,2)(0,1)(1,1)(?,?)(1,2)
-05: Failure: Ranges are wrong. regex: ((a?)((ab)?))(b?) parsed_regex: ((a?)((ab)?))(b?) str: ab result: (0,2)(0,1)(0,1)(1,1)(?,?)(1,2) expected_results (0,2)(0,2)(0,0)(0,2)(0,2)(2,2)
-06: OK regex: (a?)(((ab)?)(b?)) parsed_regex: (a?)(((ab)?)(b?)) str: ab result: (0,2)(0,1)(1,2)(1,1)(?,?)(1,2) expected_results (0,2)(0,1)(1,2)(1,1)(?,?)(1,2)
-07: OK regex: (.?) parsed_regex: (.?) str: x result: (0,1)(0,1) expected_results (0,1)(0,1)
-08: OK regex: (.?){1} parsed_regex: (.?){1} str: x result: (0,1)(0,1) expected_results (0,1)(0,1)
-09: OK regex: (.?)(.?) parsed_regex: (.?)(.?) str: x result: (0,1)(0,1)(1,1) expected_results (0,1)(0,1)(1,1)
-10: OK regex: (.?){2} parsed_regex: (.?){2} str: x result: (0,1)(1,1) expected_results (0,1)(1,1)
-11: OK regex: (.?)* parsed_regex: (.?)* str: x result: (0,1)(0,1) expected_results (0,1)(0,1)
-12: OK regex: (.?.?) parsed_regex: (.?.?) str: xxx result: (0,2)(0,2) expected_results (0,2)(0,2)
-13: OK regex: (.?.?){1} parsed_regex: (.?.?){1} str: xxx result: (0,2)(0,2) expected_results (0,2)(0,2)
-14: OK regex: (.?.?)(.?.?) parsed_regex: (.?.?)(.?.?) str: xxx result: (0,3)(0,2)(2,3) expected_results (0,3)(0,2)(2,3)
-15: OK regex: (.?.?){2} parsed_regex: (.?.?){2} str: xxx result: (0,3)(2,3) expected_results (0,3)(2,3)
-16: OK regex: (.?.?)(.?.?)(.?.?) parsed_regex: (.?.?)(.?.?)(.?.?) str: xxx result: (0,3)(0,2)(2,3)(3,3) expected_results (0,3)(0,2)(2,3)(3,3)
-17: OK regex: (.?.?){3} parsed_regex: (.?.?){3} str: xxx result: (0,3)(3,3) expected_results (0,3)(3,3)
-18: OK regex: (.?.?)* parsed_regex: (.?.?)* str: xxx result: (0,3)(2,3) expected_results (0,3)(2,3)
-19: OK regex: a?((ab)?)(b?) parsed_regex: a?((ab)?)(b?) str: ab result: (0,2)(1,1)(?,?)(1,2) expected_results (0,2)(1,1)(?,?)(1,2)
-20: OK regex: (a?)((ab)?)b? parsed_regex: (a?)((ab)?)b? str: ab result: (0,2)(0,1)(1,1)(?,?) expected_results (0,2)(0,1)(1,1)(?,?)
-21: OK regex: a?((ab)?)b? parsed_regex: a?((ab)?)b? str: ab result: (0,2)(1,1)(?,?) expected_results (0,2)(1,1)(?,?)
-22: OK regex: (a*){2} parsed_regex: (a*){2} str: xxxxx result: (0,0)(0,0) expected_results (0,0)(0,0)
-23: OK regex: (ab?)(b?a) parsed_regex: (ab?)(b?a) str: aba result: (0,3)(0,2)(2,3) expected_results (0,3)(0,2)(2,3)
-24: Failure: Ranges are wrong. regex: (a|ab)(ba|a) parsed_regex: (a|ab)(ba|a) str: aba result: (0,3)(0,1)(1,3) expected_results (0,3)(0,2)(2,3)
-25: Failure: Ranges are wrong. regex: (a|ab|ba) parsed_regex: (a|ab|ba) str: aba result: (0,1)(0,1) expected_results (0,2)(0,2)
-26: Failure: Ranges are wrong. regex: (a|ab|ba)(a|ab|ba) parsed_regex: (a|ab|ba)(a|ab|ba) str: aba result: (0,3)(0,1)(1,3) expected_results (0,3)(0,2)(2,3)
-27: Failure: Ranges are wrong. regex: (a|ab|ba)* parsed_regex: (a|ab|ba)* str: aba result: (0,3)(1,3) expected_results (0,3)(2,3)
-28: OK regex: (aba|a*b) parsed_regex: (aba|a*b) str: ababa result: (0,3)(0,3) expected_results (0,3)(0,3)
-29: Failure: Ranges are wrong. regex: (aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b) str: ababa result: (0,4)(0,3)(3,4) expected_results (0,5)(0,2)(2,5)
-1029: OK regex: (aba|a*b)(aba|a*b)(aba|a*b) parsed_regex: (aba|a*b)(aba|a*b)(aba|a*b) str: ababa result: NOMATCH expected_results NOMATCH
-30: Failure: Ranges are wrong. regex: (aba|a*b)* parsed_regex: (aba|a*b)* str: ababa result: (0,4)(3,4) expected_results (0,5)(2,5)
-31: OK regex: (aba|ab|a) parsed_regex: (aba|ab|a) str: ababa result: (0,3)(0,3) expected_results (0,3)(0,3)
-32: OK regex: (aba|ab|a)(aba|ab|a) parsed_regex: (aba|ab|a)(aba|ab|a) str: ababa result: (0,5)(0,2)(2,5) expected_results (0,5)(0,2)(2,5)
-1032: OK regex: (aba|ab|a)(aba|ab|a)(aba|ab|a) parsed_regex: (aba|ab|a)(aba|ab|a)(aba|ab|a) str: ababa result: (0,5)(0,2)(2,4)(4,5) expected_results (0,5)(0,2)(2,4)(4,5)
-33: Failure: Ranges are wrong. regex: (aba|ab|a)* parsed_regex: (aba|ab|a)* str: ababa result: (0,3)(0,3) expected_results (0,5)(2,5)
-34: OK regex: (a(b)?) parsed_regex: (a(b)?) str: aba result: (0,2)(0,2)(1,2) expected_results (0,2)(0,2)(1,2)
-35: OK regex: (a(b)?)(a(b)?) parsed_regex: (a(b)?)(a(b)?) str: aba result: (0,3)(0,2)(1,2)(2,3)(?,?) expected_results (0,3)(0,2)(1,2)(2,3)(?,?)
-36: OK regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(?,?)
-37: OK regex: (.*)(.*) parsed_regex: (.*)(.*) str: xx result: (0,2)(0,2)(2,2) expected_results (0,2)(0,2)(2,2)
-38: OK regex: .*(.*) parsed_regex: .*(.*) str: xx result: (0,2)(2,2) expected_results (0,2)(2,2)
-39: OK regex: (a.*z|b.*y) parsed_regex: (a.*z|b.*y) str: azbazby result: (0,5)(0,5) expected_results (0,5)(0,5)
-40: OK regex: (a.*z|b.*y)(a.*z|b.*y) parsed_regex: (a.*z|b.*y)(a.*z|b.*y) str: azbazby result: (0,7)(0,5)(5,7) expected_results (0,7)(0,5)(5,7)
-41: OK regex: (a.*z|b.*y)* parsed_regex: (a.*z|b.*y)* str: azbazby result: (0,7)(5,7) expected_results (0,7)(5,7)
-42: Failure: Ranges are wrong. regex: (.|..)(.*) parsed_regex: (.|..)(.*) str: ab result: (0,2)(0,1)(1,2) expected_results (0,2)(0,2)(2,2)
-43: Failure: Ranges are wrong. regex: ((..)*(...)*) parsed_regex: ((..)*(...)*) str: xxx result: (0,2)(0,2)(0,2)(?,?) expected_results (0,3)(0,3)(?,?)(0,3)
-44: Failure: Ranges are wrong. regex: ((..)*(...)*)((..)*(...)*) parsed_regex: ((..)*(...)*)((..)*(...)*) str: xxx result: (0,2)(0,2)(0,2)(?,?)(2,2)(?,?)(?,?) expected_results (0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)
-45: Failure: Ranges are wrong. regex: ((..)*(...)*)* parsed_regex: ((..)*(...)*)* str: xxx result: (0,2)(0,2)(0,2)(?,?) expected_results (0,3)(0,3)(?,?)(0,3)
-83: OK regex: (aa(b(b))?)+ parsed_regex: (aa(b(b))?)+ str: aabbaa result: (0,6)(4,6)(?,?)(?,?) expected_results (0,6)(4,6)(?,?)(?,?)
-84: OK regex: (a(b)?)+ parsed_regex: (a(b)?)+ str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(?,?)
-85: OK regex: ([ab]+)([bc]+)([cd]*) parsed_regex: ([ab]+)([bc]+)([cd]*) str: abcd result: (0,4)(0,2)(2,3)(3,4) expected_results (0,4)(0,2)(2,3)(3,4)
-90: OK regex: ^(A([^B]*))?(B(.*))? parsed_regex: ^(A([^B]*))?(B(.*))? str: Aa result: (0,2)(0,2)(1,2)(?,?)(?,?) expected_results (0,2)(0,2)(1,2)(?,?)(?,?)
-91: OK regex: ^(A([^B]*))?(B(.*))? parsed_regex: ^(A([^B]*))?(B(.*))? str: Bb result: (0,2)(?,?)(?,?)(0,2)(1,2) expected_results (0,2)(?,?)(?,?)(0,2)(1,2)
-110: OK regex: (^){0,3} parsed_regex: (^){0,3} str: a result: (0,0)(0,0) expected_results (0,0)(0,0)
-111: OK regex: (\$){0,3} parsed_regex: (\$){0,3} str: a result: (0,0)(?,?) expected_results (0,0)(?,?)
-112: OK regex: (^){1,3} parsed_regex: (^){1,3} str: a result: (0,0)(0,0) expected_results (0,0)(0,0)
-113: OK regex: (\$){1,3} parsed_regex: (\$){1,3} str: a result: (1,1)(1,1) expected_results (1,1)(1,1)
-200: OK regex: ((s^)|(s)|(^)|(\$)|(^.))* parsed_regex: ((s^)|(s)|(^)|(\$)|(^.))* str: searchme result: (0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?) expected_results (0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)
-201: OK regex: s(()|^)e parsed_regex: s(()|^)e str: searchme result: (0,2)(1,1)(1,1) expected_results (0,2)(1,1)(1,1)
-202: OK regex: s(^|())e parsed_regex: s(^|())e str: searchme result: (0,2)(1,1)(1,1) expected_results (0,2)(1,1)(1,1)
-203: OK regex: s(^|())e parsed_regex: s(^|())e str: searchme result: (0,2)(1,1)(1,1) expected_results (0,2)(1,1)(1,1)
-204: OK regex: s()?e parsed_regex: s()?e str: searchme result: (0,2)(1,1) expected_results (0,2)(1,1)
-205: OK regex: s(^)?e parsed_regex: s(^)?e str: searchme result: (0,2)(?,?) expected_results (0,2)(?,?)
-206: OK regex: ((s)|(e)|(a))* parsed_regex: ((s)|(e)|(a))* str: searchme result: (0,3)(2,3)(?,?)(?,?)(2,3) expected_results (0,3)(2,3)(?,?)(?,?)(2,3)
-207: OK regex: ((s)|(e)|())* parsed_regex: ((s)|(e)|())* str: searchme result: (0,2)(1,2)(?,?)(1,2)(?,?) expected_results (0,2)(1,2)(?,?)(1,2)(?,?)
-208: Failure: Ranges are wrong. regex: ((b*)|c(c*))* parsed_regex: ((b*)|c(c*))* str: cbb result: (0,0)(0,0)(0,0)(?,?) expected_results (0,3)(1,3)(1,3)(?,?)
-209: OK regex: (yyy|(x?)){2,4} parsed_regex: (yyy|(x?)){2,4} str: yyyyyy result: (0,6)(3,6)(?,?) expected_results (0,6)(3,6)(?,?)
-210: OK regex: (\$)|() parsed_regex: (\$)|() str: xxx result: (0,0)(?,?)(0,0) expected_results (0,0)(?,?)(0,0)
-211: OK regex: \$()|^() parsed_regex: \$()|^() str: ac\n result: (0,0)(?,?)(0,0) expected_results (0,0)(?,?)(0,0)
-212: OK regex: ^()|\$() parsed_regex: ^()|\$() str: ac\n result: (0,0)(0,0)(?,?) expected_results (0,0)(0,0)(?,?)
-213: OK regex: (\$)?(.) parsed_regex: (\$)?(.) str: __ result: (0,1)(?,?)(0,1) expected_results (0,1)(?,?)(0,1)
-214: OK regex: (.|()|())* parsed_regex: (.|()|())* str: c result: (0,1)(0,1)(?,?)(?,?) expected_results (0,1)(0,1)(?,?)(?,?)
-215: OK regex: ((a)|(b)){2,} parsed_regex: ((a)|(b)){2,} str: ab result: (0,2)(1,2)(?,?)(1,2) expected_results (0,2)(1,2)(?,?)(1,2)
-216: OK regex: .()|((.)?) parsed_regex: .()|((.)?) str: NULL result: (0,0)(?,?)(0,0)(?,?) expected_results (0,0)(?,?)(0,0)(?,?)
-217: OK regex: (.|\$){2,} parsed_regex: (.|\$){2,} str: xx result: (0,2)(1,2) expected_results (0,2)(1,2)
-218: Failure: Parsed regex does not match. regex: (.|\$){2,2} parsed_regex: (.|\$){2} str: xx result: NOMATCH expected_results (0,2)(1,2)
-219: OK regex: (.){2,} parsed_regex: (.){2,} str: xx result: (0,2)(1,2) expected_results (0,2)(1,2)
-220: OK regex: (a|())(b|())(c|()) parsed_regex: (a|())(b|())(c|()) str: abc result: (0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?) expected_results (0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)
-230: Failure: Ranges are wrong. regex: ab()c|ab()c() parsed_regex: ab()c|ab()c() str: abc result: (0,3)(2,2)(?,?)(?,?) expected_results (0,3)(2,2)(-1,-1)(-1,-1)
-250: Failure: Ranges are wrong. regex: (b(c)|d(e))* parsed_regex: (b(c)|d(e))* str: bcde result: (0,4)(2,4)(?,?)(3,4) expected_results (0,4)(2,4)(-1,-1)(3,4)
-251: Failure: Ranges are wrong. regex: (a(b)*)* parsed_regex: (a(b)*)* str: aba result: (0,3)(2,3)(?,?) expected_results (0,3)(2,3)(-1,-1)
+bar result_expr: $1-$2 expected_results foo-
+334_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
 
-Running osx_bsd_critical:
-1: OK regex: (()|.)(b) parsed_regex: (()|.)(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2)
-M1: OK regex: (()|.)(b) parsed_regex: (()|.)(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (1,2)(1,1)(1,1)(1,2)
-2: OK regex: (()|[ab])(b) parsed_regex: (()|[ab])(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2)
-M2: OK regex: (()|[ab])(b) parsed_regex: (()|[ab])(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (1,2)(1,1)(1,1)(1,2)
-3: Failure: Ranges are wrong. regex: (()|[ab])+b parsed_regex: (()|[ab])+b str: aaab result: (3,4)(3,3)(3,3) expected_results (0,4)(2,3)(?,?)
-M3: Failure: Ranges should be wrong. regex: (()|[ab])+b parsed_regex: (()|[ab])+b str: aaab result: (3,4)(3,3)(3,3) expected_results (3,4)(3,3)(3,3)
-11: OK regex: (.|())(b) parsed_regex: (.|())(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2)
-12: OK regex: ([ab]|())(b) parsed_regex: ([ab]|())(b) str: ab result: (0,2)(0,1)(?,?)(1,2) expected_results (0,2)(0,1)(?,?)(1,2)
-14: OK regex: ([ab]|())+b parsed_regex: ([ab]|())+b str: aaab result: (0,4)(2,3)(?,?) expected_results (0,4)(2,3)(?,?)
-M14: OK regex: ([ab]|())+b parsed_regex: ([ab]|())+b str: aaab result: (0,4)(2,3)(?,?) expected_results (0,4)(3,3)(3,3)
-20: OK regex: (.?)(b) parsed_regex: (.?)(b) str: ab result: (0,2)(0,1)(1,2) expected_results (0,2)(0,1)(1,2)
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+335_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+336_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+337_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+338_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+339_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
 
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
index e69de29bb2..b5e02ec91c 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
@@ -0,0 +1,81 @@
+pure2-regex.cpp2:266:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:268:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:272:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:274:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:276:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:280:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:346:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:346:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:348:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:348:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:350:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:350:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:352:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:354:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:356:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:358:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:360:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:362:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:362:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:366:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:368:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:370:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:372:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:374:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:376:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:378:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:380:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:382:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:384:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:386:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:388:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:390:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:392:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:394:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:396:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:398:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:400:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:402:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:404:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:406:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:408:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:410:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:412:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:414:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:430:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:446:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:448:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:448:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:450:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:450:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:452:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:452:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:452:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:533:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:536:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:542:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:545:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:551:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:623:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:755:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:758:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:761:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:764:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:767:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:770:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:791:39: warning: unknown escape sequence: '\)'
+pure2-regex.cpp2:907:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:909:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:909:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:911:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:911:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:913:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:915:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:915:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:917:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:917:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:921:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:923:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:927:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:929:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:931:39: warning: unknown escape sequence: '\K'
diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp
index 8304178f2e..f8eb3577eb 100644
--- a/regression-tests/test-results/pure2-regex.cpp
+++ b/regression-tests/test-results/pure2-regex.cpp
@@ -8,579 +8,1311 @@
 
 #line 1 "pure2-regex.cpp2"
 
-#line 48 "pure2-regex.cpp2"
-class test_basic3;
+#line 134 "pure2-regex.cpp2"
+class test_perl_tests;
   
 
-#line 338 "pure2-regex.cpp2"
-class test_class;
-  
+//=== Cpp2 type definitions and function declarations ===========================
 
-#line 372 "pure2-regex.cpp2"
-class test_left_assoc;
-  
+#line 1 "pure2-regex.cpp2"
+[[nodiscard]] auto create_result(cpp2::in resultExpr, auto const& r) -> std::string;
 
-#line 402 "pure2-regex.cpp2"
-class test_right_assoc;
-  
+#line 93 "pure2-regex.cpp2"
+template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in kind, cpp2::in resultExpr, 
+           cpp2::in resultExpected) -> void;
 
-#line 432 "pure2-regex.cpp2"
-class test_forced_assoc;
-  
+#line 134 "pure2-regex.cpp2"
+class test_perl_tests {
 
-#line 494 "pure2-regex.cpp2"
-class test_nullsub3;
-  
+  private: std::string var_regex_0 {"abc"}; 
 
-#line 602 "pure2-regex.cpp2"
-class test_repetition2;
-  
+  private: std::string var_regex_1 {"abc"}; 
 
-#line 766 "pure2-regex.cpp2"
-class test_totest;
-  
+  private: std::string var_regex_2 {"abc"}; 
 
-#line 930 "pure2-regex.cpp2"
-class test_osx_bsd_critical;
-  
+  private: std::string var_regex_3 {"abc"}; 
 
-//=== Cpp2 type definitions and function declarations ===========================
+  private: std::string var_regex_4 {"abc"}; 
 
-#line 1 "pure2-regex.cpp2"
+  private: std::string var_regex_5 {"abc"}; 
 
-#line 2 "pure2-regex.cpp2"
-template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in result) -> void;
+  private: std::string var_regex_6 {"abc"}; 
 
-#line 48 "pure2-regex.cpp2"
-class test_basic3 {
+  private: std::string var_regex_7 {"abc"}; 
 
-#line 191 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::range_matcher_logic,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::range_matcher_logic,0,0>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,0,-1,'*'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,'+'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,'+'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_M34 {}; 
-  public: test_basic3() = default;
-  public: test_basic3(test_basic3 const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_basic3 const&) -> void = delete;
+  private: std::string var_regex_8 {"abc"}; 
 
+  private: std::string var_regex_9 {"abc"}; 
 
-#line 337 "pure2-regex.cpp2"
-};
-class test_class {
+  private: std::string var_regex_10 {"abc"}; 
 
-#line 353 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; 
-  public: test_class() = default;
-  public: test_class(test_class const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_class const&) -> void = delete;
+  private: std::string var_regex_11 {"abc"}; 
 
+  private: std::string var_regex_12 {"ab*c"}; 
 
-#line 371 "pure2-regex.cpp2"
-};
-class test_left_assoc {
+  private: std::string var_regex_13 {"ab*c"}; 
 
-#line 385 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M9 {}; 
-  public: test_left_assoc() = default;
-  public: test_left_assoc(test_left_assoc const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_left_assoc const&) -> void = delete;
+  private: std::string var_regex_14 {"ab*c"}; 
 
+  private: std::string var_regex_15 {"ab*bc"}; 
 
-#line 401 "pure2-regex.cpp2"
-};
-class test_right_assoc {
+  private: std::string var_regex_16 {"ab*bc"}; 
 
-#line 415 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
-  public: test_right_assoc() = default;
-  public: test_right_assoc(test_right_assoc const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_right_assoc const&) -> void = delete;
+  private: std::string var_regex_17 {"ab*bc"}; 
 
+  private: std::string var_regex_18 {"ab*bc"}; 
 
-#line 431 "pure2-regex.cpp2"
-};
-class test_forced_assoc {
+  private: std::string var_regex_19 {"ab*bc"}; 
+
+  private: std::string var_regex_20 {"ab*bc"}; 
+
+  private: std::string var_regex_21 {"ab*bc"}; 
+
+  private: std::string var_regex_22 {"ab*bc"}; 
+
+  private: std::string var_regex_23 {"ab*bc"}; 
+
+  private: std::string var_regex_24 {".{1}"}; 
+
+  private: std::string var_regex_25 {".{1}"}; 
+
+  private: std::string var_regex_26 {".{1}"}; 
+
+  private: std::string var_regex_27 {".{3,4}"}; 
+
+  private: std::string var_regex_28 {".{3,4}"}; 
+
+  private: std::string var_regex_29 {".{3,4}"}; 
+
+  private: std::string var_regex_30 {"\\N{1}"}; 
+
+  private: std::string var_regex_31 {"\\N{1}"}; 
+
+  private: std::string var_regex_32 {"\\N{1}"}; 
+
+  private: std::string var_regex_33 {"\\N{3,4}"}; 
+
+  private: std::string var_regex_34 {"\\N{3,4}"}; 
+
+  private: std::string var_regex_35 {"\\N{3,4}"}; 
+
+  private: std::string var_regex_36 {"\\N{ 3 , 4 }"}; 
+
+  private: std::string var_regex_37 {"ab{0,}bc"}; 
+
+  private: std::string var_regex_38 {"ab{0,}bc"}; 
+
+  private: std::string var_regex_39 {"ab{0,}bc"}; 
+
+  private: std::string var_regex_40 {"ab+bc"}; 
+
+  private: std::string var_regex_41 {"ab+bc"}; 
+
+  private: std::string var_regex_42 {"ab+bc"}; 
+
+  private: std::string var_regex_43 {"ab+bc"}; 
+
+  private: std::string var_regex_44 {"ab+bc"}; 
+
+  private: std::string var_regex_45 {"ab{1,}bc"}; 
+
+  private: std::string var_regex_46 {"ab+bc"}; 
+
+  private: std::string var_regex_47 {"ab+bc"}; 
+
+  private: std::string var_regex_48 {"ab+bc"}; 
+
+  private: std::string var_regex_49 {"ab{1,}bc"}; 
+
+  private: std::string var_regex_50 {"ab{1,}bc"}; 
+
+  private: std::string var_regex_51 {"ab{1,}bc"}; 
+
+  private: std::string var_regex_52 {"ab{1,3}bc"}; 
+
+  private: std::string var_regex_53 {"ab{1,3}bc"}; 
+
+  private: std::string var_regex_54 {"ab{1,3}bc"}; 
+
+  private: std::string var_regex_55 {"ab{3,4}bc"}; 
+
+  private: std::string var_regex_56 {"ab{3,4}bc"}; 
+
+  private: std::string var_regex_57 {"ab{3,4}bc"}; 
+
+  private: std::string var_regex_58 {"ab{4,5}bc"}; 
+
+  private: std::string var_regex_59 {"ab?bc"}; 
+
+  private: std::string var_regex_60 {"ab?bc"}; 
+
+  private: std::string var_regex_61 {"ab{0,1}bc"}; 
+
+  private: std::string var_regex_62 {"ab?bc"}; 
+
+  private: std::string var_regex_63 {"ab?c"}; 
+
+  private: std::string var_regex_64 {"ab{0,1}c"}; 
+
+  private: std::string var_regex_65 {"^abc\$"}; 
+
+  private: std::string var_regex_66 {"^abc\$"}; 
+
+  private: std::string var_regex_67 {"^abc"}; 
+
+  private: std::string var_regex_68 {"^abc\$"}; 
+
+  private: std::string var_regex_69 {"abc\$"}; 
+
+  private: std::string var_regex_70 {"abc\$"}; 
+
+  private: std::string var_regex_71 {"^"}; 
+
+  private: std::string var_regex_72 {"\$"}; 
+
+  private: std::string var_regex_73 {"a.c"}; 
+
+  private: std::string var_regex_74 {"a.c"}; 
+
+  private: std::string var_regex_75 {"a\\Nc"}; 
+
+  private: std::string var_regex_76 {"a.*c"}; 
+
+  private: std::string var_regex_77 {"a\\N*c"}; 
+
+  private: std::string var_regex_78 {"a.*c"}; 
+
+  private: std::string var_regex_79 {"a\\N*c"}; 
+
+  private: std::string var_regex_80 {"a[bc]d"}; 
+
+  private: std::string var_regex_81 {"a[bc]d"}; 
+
+  private: std::string var_regex_82 {"a[b]d"}; 
+
+  private: std::string var_regex_83 {"[a][b][d]"}; 
+
+  private: std::string var_regex_84 {".[b]."}; 
+
+  private: std::string var_regex_85 {".[b]."}; 
+
+  private: std::string var_regex_86 {"a[b-d]e"}; 
+
+  private: std::string var_regex_87 {"a[b-d]e"}; 
+
+  private: std::string var_regex_88 {"a[b-d]"}; 
+
+  private: std::string var_regex_89 {"a[-b]"}; 
+
+  private: std::string var_regex_90 {"a[b-]"}; 
+
+  private: std::string var_regex_91 {"a]"}; 
+
+  private: std::string var_regex_92 {"a[]]b"}; 
+
+  private: std::string var_regex_93 {"a[^bc]d"}; 
+
+  private: std::string var_regex_94 {"a[^bc]d"}; 
+
+  private: std::string var_regex_95 {"a[^-b]c"}; 
+
+  private: std::string var_regex_96 {"a[^-b]c"}; 
+
+  private: std::string var_regex_97 {"a[^]b]c"}; 
+
+  private: std::string var_regex_98 {"a[^]b]c"}; 
+
+  private: std::string var_regex_99 {"\ba\b"}; 
+
+  private: std::string var_regex_100 {"\ba\b"}; 
+
+  private: std::string var_regex_101 {"\ba\b"}; 
+
+  private: std::string var_regex_102 {"\by\b"}; 
+
+  private: std::string var_regex_103 {"\by\b"}; 
+
+  private: std::string var_regex_104 {"\by\b"}; 
+
+  private: std::string var_regex_105 {"\Ba\B"}; 
+
+  private: std::string var_regex_106 {"\Ba\B"}; 
+
+  private: std::string var_regex_107 {"\Ba\B"}; 
+
+  private: std::string var_regex_108 {"\By\b"}; 
+
+  private: std::string var_regex_109 {"\By\b"}; 
+
+  private: std::string var_regex_110 {"\By\b"}; 
+
+  private: std::string var_regex_111 {"\By\b"}; 
+
+  private: std::string var_regex_112 {"\by\B"}; 
+
+  private: std::string var_regex_113 {"\By\B"}; 
+
+  private: std::string var_regex_114 {"\b"}; 
+
+  private: std::string var_regex_115 {"\B"}; 
+
+  private: std::string var_regex_116 {"\w"}; 
+
+  private: std::string var_regex_117 {"\w"}; 
+
+  private: std::string var_regex_118 {"\W"}; 
+
+  private: std::string var_regex_119 {"\W"}; 
+
+  private: std::string var_regex_120 {"a\sb"}; 
+
+  private: std::string var_regex_121 {"a\sb"}; 
+
+  private: std::string var_regex_122 {"a\Sb"}; 
+
+  private: std::string var_regex_123 {"a\Sb"}; 
+
+  private: std::string var_regex_124 {"\d"}; 
+
+  private: std::string var_regex_125 {"\d"}; 
+
+  private: std::string var_regex_126 {"\D"}; 
+
+  private: std::string var_regex_127 {"\D"}; 
+
+  private: std::string var_regex_128 {"[\w]"}; 
+
+  private: std::string var_regex_129 {"[\w]"}; 
+
+  private: std::string var_regex_130 {"[\W]"}; 
+
+  private: std::string var_regex_131 {"[\W]"}; 
+
+  private: std::string var_regex_132 {"a[\s]b"}; 
+
+  private: std::string var_regex_133 {"a[\s]b"}; 
+
+  private: std::string var_regex_134 {"a[\S]b"}; 
+
+  private: std::string var_regex_135 {"a[\S]b"}; 
+
+  private: std::string var_regex_136 {"[\d]"}; 
+
+  private: std::string var_regex_137 {"[\d]"}; 
+
+  private: std::string var_regex_138 {"[\D]"}; 
+
+  private: std::string var_regex_139 {"[\D]"}; 
+
+  private: std::string var_regex_140 {"ab|cd"}; 
+
+  private: std::string var_regex_141 {"ab|cd"}; 
+
+  private: std::string var_regex_142 {"()ef"}; 
+
+  private: std::string var_regex_143 {"()ef"}; 
+
+  private: std::string var_regex_144 {"()ef"}; 
+
+  private: std::string var_regex_145 {"()ef"}; 
+
+  private: std::string var_regex_146 {"()ef"}; 
+
+  private: std::string var_regex_147 {"\$b"}; 
+
+  private: std::string var_regex_148 {"a\(b"}; 
+
+  private: std::string var_regex_149 {"a\(*b"}; 
+
+  private: std::string var_regex_150 {"a\(*b"}; 
+
+  private: std::string var_regex_151 {"a\\b"}; 
+
+  private: std::string var_regex_152 {"((a))"}; 
+
+  private: std::string var_regex_153 {"((a))"}; 
+
+  private: std::string var_regex_154 {"((a))"}; 
+
+  private: std::string var_regex_155 {"(foo)(\g-2)"}; 
+
+  private: std::string var_regex_156 {"(foo)(\g-2)(foo)(\g-2)"}; 
+
+  private: std::string var_regex_157 {"(([abc]+) \g-1)(([abc]+) \g{-1})"}; 
+
+  private: std::string var_regex_158 {"(a)(b)(c)\g1\g2\g3"}; 
+
+#line 455 "pure2-regex.cpp2"
+  private: std::string var_regex_159 {"abc"}; 
+
+#line 458 "pure2-regex.cpp2"
+  private: std::string var_regex_160 {"abc"}; 
 
 #line 461 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
-  public: test_forced_assoc() = default;
-  public: test_forced_assoc(test_forced_assoc const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_forced_assoc const&) -> void = delete;
+  private: std::string var_regex_161 {"abc"}; 
 
+#line 464 "pure2-regex.cpp2"
+  private: std::string var_regex_162 {"abc"}; 
 
-#line 493 "pure2-regex.cpp2"
-};
-class test_nullsub3 {
+#line 467 "pure2-regex.cpp2"
+  private: std::string var_regex_163 {"abc"}; 
 
-#line 546 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
-  public: test_nullsub3() = default;
-  public: test_nullsub3(test_nullsub3 const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_nullsub3 const&) -> void = delete;
+#line 470 "pure2-regex.cpp2"
+  private: std::string var_regex_164 {"abc"}; 
 
+#line 473 "pure2-regex.cpp2"
+  private: std::string var_regex_165 {"ab*c"}; 
 
-#line 601 "pure2-regex.cpp2"
-};
-class test_repetition2 {
+#line 476 "pure2-regex.cpp2"
+  private: std::string var_regex_166 {"ab*bc"}; 
 
-#line 682 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,-1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,4,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,5,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,6,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,7,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,8,8>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,-1>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,2,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,3,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,4,10>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
-  public: test_repetition2() = default;
-  public: test_repetition2(test_repetition2 const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_repetition2 const&) -> void = delete;
+#line 479 "pure2-regex.cpp2"
+  private: std::string var_regex_167 {"ab*bc"}; 
 
+#line 482 "pure2-regex.cpp2"
+  private: std::string var_regex_168 {"ab*?bc"}; 
 
-#line 765 "pure2-regex.cpp2"
-};
-class test_totest {
+#line 485 "pure2-regex.cpp2"
+  private: std::string var_regex_169 {"ab{0,}?bc"}; 
 
-#line 846 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_01 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_03 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_04 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_05 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_06 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_07 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_08 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_09 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1029 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1032 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,3>>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,1,3>>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,3,3>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::line_start_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,4>>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,2,-1>>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,2,2>>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; 
-  public: test_totest() = default;
-  public: test_totest(test_totest const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_totest const&) -> void = delete;
+#line 488 "pure2-regex.cpp2"
+  private: std::string var_regex_170 {"ab+?bc"}; 
 
+#line 491 "pure2-regex.cpp2"
+  private: std::string var_regex_171 {"ab+bc"}; 
 
-#line 929 "pure2-regex.cpp2"
-};
-class test_osx_bsd_critical {
+#line 494 "pure2-regex.cpp2"
+  private: std::string var_regex_172 {"ab+bc"}; 
 
-#line 942 "pure2-regex.cpp2"
-  public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,1,'?'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_M2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,1,-1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_M3 {}; 
-  public: test_osx_bsd_critical() = default;
-  public: test_osx_bsd_critical(test_osx_bsd_critical const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_osx_bsd_critical const&) -> void = delete;
+#line 497 "pure2-regex.cpp2"
+  private: std::string var_regex_173 {"ab{1,}bc"}; 
 
+#line 500 "pure2-regex.cpp2"
+  private: std::string var_regex_174 {"ab+bc"}; 
 
-#line 957 "pure2-regex.cpp2"
-};
-auto main(int const argc_, char** argv_) -> int;
+#line 503 "pure2-regex.cpp2"
+  private: std::string var_regex_175 {"ab{1,}?bc"}; 
 
-//=== Cpp2 function definitions =================================================
+#line 506 "pure2-regex.cpp2"
+  private: std::string var_regex_176 {"ab{1,3}?bc"}; 
 
-#line 1 "pure2-regex.cpp2"
+#line 509 "pure2-regex.cpp2"
+  private: std::string var_regex_177 {"ab{3,4}?bc"}; 
 
-#line 2 "pure2-regex.cpp2"
-template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in result) -> void{
-  auto str_mod {str}; 
-  if (str_mod == "NULL") {
-    str_mod = "";
-  }
+#line 512 "pure2-regex.cpp2"
+  private: std::string var_regex_178 {"ab{4,5}?bc"}; 
 
-  std::string ranges_result {"NOMATCH"}; 
+#line 515 "pure2-regex.cpp2"
+  private: std::string var_regex_179 {"ab??bc"}; 
 
-  std::string status {"OK"}; 
-  if (CPP2_UFCS(to_string)(regex) != regex_str) {
-    status = "Failure: Parsed regex does not match.";
-  }else {
-    auto r {CPP2_UFCS(search)(regex, std::move(str_mod))}; 
-    auto is_pass {!(CPP2_UFCS(starts_with)(result, "NOMATCH"))}; 
+#line 518 "pure2-regex.cpp2"
+  private: std::string var_regex_180 {"ab??bc"}; 
 
-    // Check if we expect a match.
-    if (is_pass != r.matched) {
-      if (std::move(is_pass)) {
-        status = "Failure: Regex should apply.";
-      }
-      else {
-        status = "Failure: Regex should not apply.";
-      }
-    }
+#line 521 "pure2-regex.cpp2"
+  private: std::string var_regex_181 {"ab{0,1}?bc"}; 
 
-    // If we have a match. Check the ranges.
-    if (r.matched) {
-      ranges_result = CPP2_UFCS(print_ranges)(std::move(r).ctx);
-      auto ranges_match {result == ranges_result}; 
-      auto should_ranges_match {!(CPP2_UFCS(starts_with)(id, "M"))}; 
+#line 524 "pure2-regex.cpp2"
+  private: std::string var_regex_182 {"ab??bc"}; 
 
-      if (ranges_match != std::move(should_ranges_match)) {
-        if (std::move(ranges_match)) {
-          status = "Failure: Ranges should be wrong.";
-        }
-        else {
-          status = "Failure: Ranges are wrong.";
-        }
-      }
-    }
-  }
+#line 527 "pure2-regex.cpp2"
+  private: std::string var_regex_183 {"ab??c"}; 
 
-  std::cout << (cpp2::to_string(id) + ": " + cpp2::to_string(std::move(status)) + " regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result: " + cpp2::to_string(std::move(ranges_result)) + " expected_results " + cpp2::to_string(result)) << std::endl;
-}
+#line 530 "pure2-regex.cpp2"
+  private: std::string var_regex_184 {"ab{0,1}?c"}; 
 
-#line 191 "pure2-regex.cpp2"
-  auto test_basic3::run() const& -> void{
-    std::cout << "Running basic3:" << std::endl;
-    test(regex_1, "1", "\\)", "()", "(1,2)");
-    test(regex_2, "2", "\\}", "}", "(0,1)");
-    test(regex_3, "3", "]", "]", "(0,1)");
-    test(regex_4, "4", "\\$^", "NULL", "(0,0)");
-    test(regex_5, "5", "a(\\$)", "aa", "(1,2)(2,2)");
-    test(regex_6, "6", "a*(^a)", "aa", "(0,1)(0,1)");
-    test(regex_7, "7", "(..)*(...)*", "a", "(0,0)(?,?)(?,?)");
-    test(regex_8, "8", "(..)*(...)*", "abcd", "(0,4)(2,4)(?,?)");
-    test(regex_9, "9", "(ab|a)(bc|c)", "abc", "(0,3)(0,2)(2,3)");
-    test(regex_10, "10", "(ab)c|abc", "abc", "(0,3)(0,2)");
-    test(regex_11, "11", "a{0}b", "ab", "(1,2)");
-    test(regex_12, "12", "(a*)(b?)(b+)b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)");
-    test(regex_13, "13", "(a*)(b{0,1})(b{1,})b{3}", "aaabbbbbbb", "(0,10)(0,3)(3,4)(4,7)");
-    test(regex_15, "15", "((a|a)|a)", "a", "(0,1)(0,1)(0,1)");
-    test(regex_16, "16", "(a*)(a|aa)", "aaaa", "(0,4)(0,3)(3,4)");
-    test(regex_17, "17", "a*(a.|aa)", "aaaa", "(0,4)(2,4)");
-    test(regex_18, "18", "a(b)|c(d)|a(e)f", "aef", "(0,3)(?,?)(?,?)(1,2)");
-    test(regex_19, "19", "(a|b)?.*", "b", "(0,1)(0,1)");
-    test(regex_20, "20", "(a|b)c|a(b|c)", "ac", "(0,2)(0,1)(?,?)");
-    test(regex_21, "21", "(a|b)c|a(b|c)", "ab", "(0,2)(?,?)(1,2)");
-    test(regex_22, "22", "(a|b)*c|(a|ab)*c", "abc", "(0,3)(1,2)(?,?)");
-    test(regex_23, "23", "(a|b)*c|(a|ab)*c", "xc", "(1,2)(?,?)(?,?)");
-    test(regex_24, "24", "(.a|.b).*|.*(.a|.b)", "xa", "(0,2)(0,2)(?,?)");
-    test(regex_25, "25", "a?(ab|ba)ab", "abab", "(0,4)(0,2)");
-    test(regex_26, "26", "a?(ac{0}b|ba)ab", "abab", "(0,4)(0,2)");
-    test(regex_27, "27", "ab|abab", "abbabab", "(0,2)");
-    test(regex_28, "28", "aba|bab|bba", "baaabbbaba", "(5,8)");
-    test(regex_29, "29", "aba|bab", "baaabbbaba", "(6,9)");
-    test(regex_30, "30", "(aa|aaa)*|(a|aaaaa)", "aa", "(0,2)(0,2)(?,?)");
-    test(regex_31, "31", "(a.|.a.)*|(a|.a...)", "aa", "(0,2)(0,2)(?,?)");
-    test(regex_32, "32", "ab|a", "xabc", "(1,3)");
-    test(regex_33, "33", "ab|a", "xxabc", "(2,4)");
-    test(regex_M34, "M34", "(Ab|cD)*", "aBcD", "(0,4)(2,4)");
-    test(regex_35, "35", ":::1:::0:|:::1:1:0:", ":::0:::1:::1:::0:", "(8,17)");
-    test(regex_36, "36", ":::1:::0:|:::1:1:1:", ":::0:::1:::1:::0:", "(8,17)");
-    test(regex_37, "37", "[[:lower:]]+", "`az{", "(1,3)");
-    test(regex_38, "38", "[[:upper:]]+", "@AZ[", "(1,3)");
-    test(regex_39, "39", "(a)(b)(c)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_43,   "43  ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))", "x", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)");
-    test(regex_44,   "44  ", "((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))*", "xx", "(0,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)(1,2)");
-    test(regex_45, "45", "a?(ab|ba)*", "ababababababababababababababababababababababababababababababababababababababababa", "(0,81)(79,81)");
-    test(regex_46, "46", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabbbbaa", "(18,25)");
-    test(regex_47, "47", "abaa|abbaa|abbbaa|abbbbaa", "ababbabbbabbbabbbbabaa", "(18,22)");
-    test(regex_48, "48", "aaac|aabc|abac|abbc|baac|babc|bbac|bbbc", "baaabbbabac", "(7,11)");
-    test(regex_49, "49", "aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll", "XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa", "(53,57)");
-    test(regex_50, "50", "a*a*a*a*a*b", "aaaaaaaaab", "(0,10)");
-    test(regex_51, "51", "ab+bc", "abbc", "(0,4)");
-    test(regex_52, "52", "ab+bc", "abbbbc", "(0,6)");
-    test(regex_53, "53", "ab?bc", "abbc", "(0,4)");
-    test(regex_54, "54", "ab?bc", "abc", "(0,3)");
-    test(regex_55, "55", "ab?c", "abc", "(0,3)");
-    test(regex_56, "56", "ab|cd", "abc", "(0,2)");
-    test(regex_57, "57", "ab|cd", "abcd", "(0,2)");
-    test(regex_58, "58", "a\\(b", "a(b", "(0,3)");
-    test(regex_59, "59", "a\\(*b", "ab", "(0,2)");
-    test(regex_60, "60", "a\\(*b", "a((b", "(0,4)");
-    test(regex_61, "61", "((a))", "abc", "(0,1)(0,1)(0,1)");
-    test(regex_62, "62", "(a)b(c)", "abc", "(0,3)(0,1)(2,3)");
-    test(regex_63, "63", "a+b+c", "aabbabc", "(4,7)");
-    test(regex_64, "64", "a*", "aaa", "(0,3)");
-    test(regex_65, "65", "(a*)*", "-", "(0,0)(0,0)");
-    test(regex_66, "66", "(a*)+", "-", "(0,0)(0,0)");
-    test(regex_67, "67", "(a*|b)*", "-", "(0,0)(0,0)");
-    test(regex_68, "68", "(a+|b)*", "ab", "(0,2)(1,2)");
-    test(regex_69, "69", "(a+|b)+", "ab", "(0,2)(1,2)");
-    test(regex_70, "70", "(a+|b)?", "ab", "(0,1)(0,1)");
-    test(regex_71, "71", "(^)*", "-", "(0,0)(0,0)");
-    test(regex_72, "72", "([abc])*d", "abbbcd", "(0,6)(4,5)");
-    test(regex_73, "73", "([abc])*bcd", "abcd", "(0,4)(0,1)");
-    test(regex_74, "74", "a|b|c|d|e", "e", "(0,1)");
-    test(regex_75, "75", "(a|b|c|d|e)f", "ef", "(0,2)(0,1)");
-    test(regex_76, "76", "((a*|b))*", "-", "(0,0)(0,0)(0,0)");
-    test(regex_77, "77", "(ab|cd)e", "abcde", "(2,5)(2,4)");
-    test(regex_78, "78", "(a|b)c*d", "abcd", "(1,4)(1,2)");
-    test(regex_79, "79", "(ab|ab*)bc", "abc", "(0,3)(0,1)");
-    test(regex_80, "80", "a([bc]*)c*", "abc", "(0,3)(1,3)");
-    test(regex_81, "81", "a([bc]*)(c*d)", "abcd", "(0,4)(1,3)(3,4)");
-    test(regex_82, "82", "a([bc]+)(c*d)", "abcd", "(0,4)(1,3)(3,4)");
-    test(regex_83, "83", "a([bc]*)(c+d)", "abcd", "(0,4)(1,2)(2,4)");
-    test(regex_84, "84", "a[bcd]*dcdcde", "adcdcde", "(0,7)");
-    test(regex_85, "85", "(ab|a)b*c", "abc", "(0,3)(0,2)");
-    test(regex_86, "86", "((a)(b)c)(d)", "abcd", "(0,4)(0,3)(0,1)(1,2)(3,4)");
-    test(regex_87, "87", "^a(bc+|b[eh])g|.h\\$", "abh", "(1,3)(?,?)");
-    test(regex_88, "88", "(bc+d\\$|ef*g.|h?i(j|k))", "effgz", "(0,5)(0,5)(?,?)");
-    test(regex_89, "89", "(bc+d\\$|ef*g.|h?i(j|k))", "ij", "(0,2)(0,2)(1,2)");
-    test(regex_90, "90", "(bc+d\\$|ef*g.|h?i(j|k))", "reffgz", "(1,6)(1,6)(?,?)");
-    test(regex_91, "91", "(((((((((a)))))))))", "a", "(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)");
-    test(regex_92, "92", "(.*)c(.*)", "abcde", "(0,5)(0,2)(3,5)");
-    test(regex_93, "93", "a(bc)d", "abcd", "(0,4)(1,3)");
-    test(regex_94, "94", "a[-]?c", "ac", "(0,3)");
-    test(regex_95, "95", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qaddafi", "(0,15)(?,?)(10,12)");
-    test(regex_96, "96", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mo'ammar_Gadhafi", "(0,16)(?,?)(11,13)");
-    test(regex_97, "97", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Kaddafi", "(0,15)(?,?)(10,12)");
-    test(regex_98, "98", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Qadhafi", "(0,15)(?,?)(10,12)");
-    test(regex_99, "99", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gadafi", "(0,14)(?,?)(10,11)");
-    test(regex_100, "100", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadafi", "(0,15)(?,?)(11,12)");
-    test(regex_101, "101", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moamar_Gaddafi", "(0,14)(?,?)(9,11)");
-    test(regex_102, "102", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Mu'ammar_Qadhdhafi", "(0,18)(?,?)(13,15)");
-    test(regex_103, "103", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Khaddafi", "(0,16)(?,?)(11,13)");
-    test(regex_104, "104", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafy", "(0,16)(?,?)(11,13)");
-    test(regex_105, "105", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghadafi", "(0,15)(?,?)(11,12)");
-    test(regex_106, "106", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Ghaddafi", "(0,16)(?,?)(11,13)");
-    test(regex_107, "107", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muamar_Kaddafi", "(0,14)(?,?)(9,11)");
-    test(regex_108, "108", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Quathafi", "(0,16)(?,?)(11,13)");
-    test(regex_109, "109", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Muammar_Gheddafi", "(0,16)(?,?)(11,13)");
-    test(regex_110, "110", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Khadafy", "(0,15)(?,?)(11,12)");
-    test(regex_111, "111", "M[ou]'?am+[ae]r_.*([AEae]l[-_])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy]", "Moammar_Qudhafi", "(0,15)(?,?)(10,12)");
-    test(regex_112, "112", "a+(b|c)*d+", "aabcdd", "(0,6)(3,4)");
-    test(regex_113, "113", "^.+\\$", "vivi", "(0,4)");
-    test(regex_114, "114", "^(.+)\\$", "vivi", "(0,4)(0,4)");
-    test(regex_115, "115", "^([^!.]+).att.com!(.+)\\$", "gryphon.att.com!eby", "(0,19)(0,7)(16,19)");
-    test(regex_116, "116", "^([^!]+!)?([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)");
-    test(regex_117, "117", "^([^!]+!)?([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)");
-    test(regex_118, "118", "^([^!]+!)?([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)");
-    test(regex_119, "119", "^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(4,8)(8,11)");
-    test(regex_120, "120", "((foo)|(bar))!bas", "bar!bas", "(0,7)(0,3)(?,?)(0,3)");
-    test(regex_121, "121", "((foo)|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)(4,7)");
-    test(regex_122, "122", "((foo)|(bar))!bas", "foo!bas", "(0,7)(0,3)(0,3)(?,?)");
-    test(regex_123, "123", "((foo)|bar)!bas", "bar!bas", "(0,7)(0,3)(?,?)");
-    test(regex_124, "124", "((foo)|bar)!bas", "foo!bar!bas", "(4,11)(4,7)(?,?)");
-    test(regex_125, "125", "((foo)|bar)!bas", "foo!bas", "(0,7)(0,3)(0,3)");
-    test(regex_126, "126", "(foo|(bar))!bas", "bar!bas", "(0,7)(0,3)(0,3)");
-    test(regex_127, "127", "(foo|(bar))!bas", "foo!bar!bas", "(4,11)(4,7)(4,7)");
-    test(regex_128, "128", "(foo|(bar))!bas", "foo!bas", "(0,7)(0,3)(?,?)");
-    test(regex_129, "129", "(foo|bar)!bas", "bar!bas", "(0,7)(0,3)");
-    test(regex_130, "130", "(foo|bar)!bas", "foo!bar!bas", "(4,11)(4,7)");
-    test(regex_131, "131", "(foo|bar)!bas", "foo!bas", "(0,7)(0,3)");
-    test(regex_132, "132", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)");
-    test(regex_133, "133", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bas", "(0,3)(?,?)(0,3)(?,?)(?,?)");
-    test(regex_134, "134", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "bar!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_135, "135", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bar!bas", "(0,11)(?,?)(?,?)(4,8)(8,11)");
-    test(regex_136, "136", "^([^!]+!)?([^!]+)\\$|^.+!([^!]+!)([^!]+)\\$", "foo!bas", "(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_137, "137", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bas", "(0,3)(0,3)(?,?)(0,3)(?,?)(?,?)");
-    test(regex_138, "138", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "bar!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_139, "139", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bar!bas", "(0,11)(0,11)(?,?)(?,?)(4,8)(8,11)");
-    test(regex_140, "140", "^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))\\$", "foo!bas", "(0,7)(0,7)(0,4)(4,7)(?,?)(?,?)");
-    test(regex_141, "141", ".*(/XXX).*", "/XXX", "(0,4)(0,4)");
-    test(regex_142, "142", ".*(\\\\XXX).*", "\\XXX", "(0,4)(0,4)");
-    test(regex_143, "143", "\\\\XXX", "\\XXX", "(0,4)");
-    test(regex_144, "144", ".*(/000).*", "/000", "(0,4)(0,4)");
-    test(regex_145, "145", ".*(\\\\000).*", "\\000", "(0,4)(0,4)");
-    test(regex_146, "146", "\\\\000", "\\000", "(0,4)");
-    std::cout << std::endl;
-  }
+#line 533 "pure2-regex.cpp2"
+  private: std::string var_regex_185 {"^abc\$"}; 
 
+#line 536 "pure2-regex.cpp2"
+  private: std::string var_regex_186 {"^abc\$"}; 
 
+#line 539 "pure2-regex.cpp2"
+  private: std::string var_regex_187 {"^abc"}; 
 
+#line 542 "pure2-regex.cpp2"
+  private: std::string var_regex_188 {"^abc\$"}; 
 
+#line 545 "pure2-regex.cpp2"
+  private: std::string var_regex_189 {"abc\$"}; 
 
+#line 548 "pure2-regex.cpp2"
+  private: std::string var_regex_190 {"^"}; 
 
+#line 551 "pure2-regex.cpp2"
+  private: std::string var_regex_191 {"\$"}; 
 
+#line 554 "pure2-regex.cpp2"
+  private: std::string var_regex_192 {"a.c"}; 
 
+#line 557 "pure2-regex.cpp2"
+  private: std::string var_regex_193 {"a.c"}; 
 
+#line 560 "pure2-regex.cpp2"
+  private: std::string var_regex_194 {"a\\Nc"}; 
 
+#line 563 "pure2-regex.cpp2"
+  private: std::string var_regex_195 {"a.*?c"}; 
 
+#line 566 "pure2-regex.cpp2"
+  private: std::string var_regex_196 {"a.*c"}; 
 
+#line 569 "pure2-regex.cpp2"
+  private: std::string var_regex_197 {"a[bc]d"}; 
 
+#line 572 "pure2-regex.cpp2"
+  private: std::string var_regex_198 {"a[bc]d"}; 
 
+#line 575 "pure2-regex.cpp2"
+  private: std::string var_regex_199 {"a[b-d]e"}; 
 
+#line 578 "pure2-regex.cpp2"
+  private: std::string var_regex_200 {"a[b-d]e"}; 
 
+#line 581 "pure2-regex.cpp2"
+  private: std::string var_regex_201 {"a[b-d]"}; 
 
+#line 584 "pure2-regex.cpp2"
+  private: std::string var_regex_202 {"a[-b]"}; 
 
+#line 587 "pure2-regex.cpp2"
+  private: std::string var_regex_203 {"a[b-]"}; 
 
+#line 590 "pure2-regex.cpp2"
+  private: std::string var_regex_204 {"a]"}; 
 
+#line 593 "pure2-regex.cpp2"
+  private: std::string var_regex_205 {"a[]]b"}; 
 
+#line 596 "pure2-regex.cpp2"
+  private: std::string var_regex_206 {"a[^bc]d"}; 
 
+#line 599 "pure2-regex.cpp2"
+  private: std::string var_regex_207 {"a[^bc]d"}; 
 
+#line 602 "pure2-regex.cpp2"
+  private: std::string var_regex_208 {"a[^-b]c"}; 
 
+#line 605 "pure2-regex.cpp2"
+  private: std::string var_regex_209 {"a[^-b]c"}; 
 
+#line 608 "pure2-regex.cpp2"
+  private: std::string var_regex_210 {"a[^]b]c"}; 
 
+#line 611 "pure2-regex.cpp2"
+  private: std::string var_regex_211 {"a[^]b]c"}; 
 
+#line 614 "pure2-regex.cpp2"
+  private: std::string var_regex_212 {"ab|cd"}; 
 
+#line 617 "pure2-regex.cpp2"
+  private: std::string var_regex_213 {"ab|cd"}; 
 
+#line 620 "pure2-regex.cpp2"
+  private: std::string var_regex_214 {"()ef"}; 
 
+#line 623 "pure2-regex.cpp2"
+  private: std::string var_regex_215 {"\$b"}; 
 
+#line 626 "pure2-regex.cpp2"
+  private: std::string var_regex_216 {"a\(b"}; 
 
+#line 629 "pure2-regex.cpp2"
+  private: std::string var_regex_217 {"a\(*b"}; 
 
+#line 632 "pure2-regex.cpp2"
+  private: std::string var_regex_218 {"a\(*b"}; 
 
+#line 635 "pure2-regex.cpp2"
+  private: std::string var_regex_219 {"a\\b"}; 
 
+#line 638 "pure2-regex.cpp2"
+  private: std::string var_regex_220 {"((a))"}; 
 
+#line 641 "pure2-regex.cpp2"
+  private: std::string var_regex_221 {"(a)b(c)"}; 
 
+#line 644 "pure2-regex.cpp2"
+  private: std::string var_regex_222 {"a+b+c"}; 
 
+#line 647 "pure2-regex.cpp2"
+  private: std::string var_regex_223 {"a{1,}b{1,}c"}; 
 
+#line 650 "pure2-regex.cpp2"
+  private: std::string var_regex_224 {"a.+?c"}; 
 
+#line 653 "pure2-regex.cpp2"
+  private: std::string var_regex_225 {"a.*?c"}; 
 
+#line 656 "pure2-regex.cpp2"
+  private: std::string var_regex_226 {"a.{0,5}?c"}; 
 
+#line 659 "pure2-regex.cpp2"
+  private: std::string var_regex_227 {"(a+|b)*"}; 
 
+#line 662 "pure2-regex.cpp2"
+  private: std::string var_regex_228 {"(a+|b){0,}"}; 
 
+#line 665 "pure2-regex.cpp2"
+  private: std::string var_regex_229 {"(a+|b)+"}; 
 
+#line 668 "pure2-regex.cpp2"
+  private: std::string var_regex_230 {"(a+|b){1,}"}; 
 
+#line 671 "pure2-regex.cpp2"
+  private: std::string var_regex_231 {"(a+|b)?"}; 
 
+#line 674 "pure2-regex.cpp2"
+  private: std::string var_regex_232 {"(a+|b){0,1}"}; 
 
+#line 677 "pure2-regex.cpp2"
+  private: std::string var_regex_233 {"(a+|b){0,1}?"}; 
 
+#line 680 "pure2-regex.cpp2"
+  private: std::string var_regex_234 {"[^ab]*"}; 
 
+#line 683 "pure2-regex.cpp2"
+  private: std::string var_regex_235 {"abc"}; 
 
+#line 686 "pure2-regex.cpp2"
+  private: std::string var_regex_236 {"a*"}; 
 
+#line 689 "pure2-regex.cpp2"
+  private: std::string var_regex_237 {"([abc])*d"}; 
 
+#line 692 "pure2-regex.cpp2"
+  private: std::string var_regex_238 {"([abc])*bcd"}; 
 
+#line 695 "pure2-regex.cpp2"
+  private: std::string var_regex_239 {"a|b|c|d|e"}; 
 
+#line 698 "pure2-regex.cpp2"
+  private: std::string var_regex_240 {"(a|b|c|d|e)f"}; 
 
+#line 701 "pure2-regex.cpp2"
+  private: std::string var_regex_241 {"abcd*efg"}; 
 
+#line 704 "pure2-regex.cpp2"
+  private: std::string var_regex_242 {"ab*"}; 
 
+#line 707 "pure2-regex.cpp2"
+  private: std::string var_regex_243 {"ab*"}; 
 
+#line 710 "pure2-regex.cpp2"
+  private: std::string var_regex_244 {"(ab|cd)e"}; 
 
+#line 713 "pure2-regex.cpp2"
+  private: std::string var_regex_245 {"[abhgefdc]ij"}; 
 
+#line 716 "pure2-regex.cpp2"
+  private: std::string var_regex_246 {"^(ab|cd)e"}; 
 
+#line 719 "pure2-regex.cpp2"
+  private: std::string var_regex_247 {"(abc|)ef"}; 
 
+#line 722 "pure2-regex.cpp2"
+  private: std::string var_regex_248 {"(a|b)c*d"}; 
 
+#line 725 "pure2-regex.cpp2"
+  private: std::string var_regex_249 {"(ab|ab*)bc"}; 
 
+#line 728 "pure2-regex.cpp2"
+  private: std::string var_regex_250 {"a([bc]*)c*"}; 
 
+#line 731 "pure2-regex.cpp2"
+  private: std::string var_regex_251 {"a([bc]*)(c*d)"}; 
 
+#line 734 "pure2-regex.cpp2"
+  private: std::string var_regex_252 {"a([bc]+)(c*d)"}; 
 
+#line 737 "pure2-regex.cpp2"
+  private: std::string var_regex_253 {"a([bc]*)(c+d)"}; 
 
+#line 740 "pure2-regex.cpp2"
+  private: std::string var_regex_254 {"a[bcd]*dcdcde"}; 
 
+#line 743 "pure2-regex.cpp2"
+  private: std::string var_regex_255 {"a[bcd]+dcdcde"}; 
 
+#line 746 "pure2-regex.cpp2"
+  private: std::string var_regex_256 {"(ab|a)b*c"}; 
 
+#line 749 "pure2-regex.cpp2"
+  private: std::string var_regex_257 {"((a)(b)c)(d)"}; 
 
+#line 752 "pure2-regex.cpp2"
+  private: std::string var_regex_258 {"[a-zA-Z_][a-zA-Z0-9_]*"}; 
 
+#line 755 "pure2-regex.cpp2"
+  private: std::string var_regex_259 {"^a(bc+|b[eh])g|.h\$"}; 
 
+#line 758 "pure2-regex.cpp2"
+  private: std::string var_regex_260 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
+#line 761 "pure2-regex.cpp2"
+  private: std::string var_regex_261 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
+#line 764 "pure2-regex.cpp2"
+  private: std::string var_regex_262 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
+#line 767 "pure2-regex.cpp2"
+  private: std::string var_regex_263 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
+#line 770 "pure2-regex.cpp2"
+  private: std::string var_regex_264 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
+#line 773 "pure2-regex.cpp2"
+  private: std::string var_regex_265 {"((((((((((a))))))))))"}; 
 
+#line 776 "pure2-regex.cpp2"
+  private: std::string var_regex_266 {"((((((((((a))))))))))\10"}; 
 
+#line 779 "pure2-regex.cpp2"
+  private: std::string var_regex_267 {"(((((((((a)))))))))"}; 
 
+#line 782 "pure2-regex.cpp2"
+  private: std::string var_regex_268 {"multiple words of text"}; 
 
+#line 785 "pure2-regex.cpp2"
+  private: std::string var_regex_269 {"multiple words"}; 
 
+#line 788 "pure2-regex.cpp2"
+  private: std::string var_regex_270 {"(.*)c(.*)"}; 
 
+#line 791 "pure2-regex.cpp2"
+  private: std::string var_regex_271 {"\((.*), (.*)\)"}; 
 
+#line 794 "pure2-regex.cpp2"
+  private: std::string var_regex_272 {"[k]"}; 
 
+#line 797 "pure2-regex.cpp2"
+  private: std::string var_regex_273 {"abcd"}; 
 
+#line 800 "pure2-regex.cpp2"
+  private: std::string var_regex_274 {"a(bc)d"}; 
 
+#line 803 "pure2-regex.cpp2"
+  private: std::string var_regex_275 {"a[-]?c"}; 
 
+#line 806 "pure2-regex.cpp2"
+  private: std::string var_regex_276 {"(abc)\1"}; 
 
+#line 809 "pure2-regex.cpp2"
+  private: std::string var_regex_277 {"([a-c]*)\1"}; 
 
+  private: std::string var_regex_278 {"a++a"}; 
 
+  private: std::string var_regex_279 {"a*+a"}; 
 
+  private: std::string var_regex_280 {"a{1,5}+a"}; 
 
+  private: std::string var_regex_281 {"a?+a"}; 
 
+  private: std::string var_regex_282 {"a++b"}; 
 
+  private: std::string var_regex_283 {"a*+b"}; 
 
+  private: std::string var_regex_284 {"a{1,5}+b"}; 
 
+  private: std::string var_regex_285 {"a?+b"}; 
 
+  private: std::string var_regex_286 {"fooa++a"}; 
 
+  private: std::string var_regex_287 {"fooa*+a"}; 
 
+  private: std::string var_regex_288 {"fooa{1,5}+a"}; 
 
+  private: std::string var_regex_289 {"fooa?+a"}; 
 
+  private: std::string var_regex_290 {"fooa++b"}; 
 
+  private: std::string var_regex_291 {"fooa*+b"}; 
 
+  private: std::string var_regex_292 {"fooa{1,5}+b"}; 
 
+  private: std::string var_regex_293 {"fooa?+b"}; 
 
+  private: std::string var_regex_294 {"(aA)++(aA)"}; 
 
+  private: std::string var_regex_295 {"(aA|bB)++(aA|bB)"}; 
 
+  private: std::string var_regex_296 {"(aA)*+(aA)"}; 
 
+  private: std::string var_regex_297 {"(aA|bB)*+(aA|bB)"}; 
 
+  private: std::string var_regex_298 {"(aA){1,5}+(aA)"}; 
 
+  private: std::string var_regex_299 {"(aA|bB){1,5}+(aA|bB)"}; 
 
+  private: std::string var_regex_300 {"(aA)?+(aA)"}; 
 
+  private: std::string var_regex_301 {"(aA|bB)?+(aA|bB)"}; 
 
+  private: std::string var_regex_302 {"(aA)++b"}; 
 
+  private: std::string var_regex_303 {"(aA|bB)++b"}; 
 
+  private: std::string var_regex_304 {"(aA)*+b"}; 
 
+  private: std::string var_regex_305 {"(aA|bB)*+b"}; 
 
+  private: std::string var_regex_306 {"(aA){1,5}+b"}; 
 
+  private: std::string var_regex_307 {"(aA|bB){1,5}+b"}; 
 
+  private: std::string var_regex_308 {"(aA)?+b"}; 
 
+  private: std::string var_regex_309 {"(aA|bB)?+b"}; 
 
+  private: std::string var_regex_310 {"foo(aA)++(aA)"}; 
 
+  private: std::string var_regex_311 {"foo(aA|bB)++(aA|bB)"}; 
 
+  private: std::string var_regex_312 {"foo(aA)*+(aA)"}; 
 
+  private: std::string var_regex_313 {"foo(aA|bB)*+(aA|bB)"}; 
 
+  private: std::string var_regex_314 {"foo(aA){1,5}+(aA)"}; 
 
+  private: std::string var_regex_315 {"foo(aA|bB){1,5}+(aA|bB)"}; 
 
+  private: std::string var_regex_316 {"foo(aA)?+(aA)"}; 
 
+  private: std::string var_regex_317 {"foo(aA|bB)?+(aA|bB)"}; 
 
+  private: std::string var_regex_318 {"foo(aA)++b"}; 
 
+  private: std::string var_regex_319 {"foo(aA|bB)++b"}; 
 
+  private: std::string var_regex_320 {"foo(aA)*+b"}; 
 
+  private: std::string var_regex_321 {"foo(aA|bB)*+b"}; 
 
+  private: std::string var_regex_322 {"foo(aA){1,5}+b"}; 
 
+  private: std::string var_regex_323 {"foo(aA|bB){1,5}+b"}; 
 
+  private: std::string var_regex_324 {"foo(aA)?+b"}; 
 
+  private: std::string var_regex_325 {"foo(aA|bB)?+b"}; 
 
+  private: std::string var_regex_326 {"foo(\h+)bar"}; 
 
+  private: std::string var_regex_327 {"(\H+)(\h)"}; 
 
-#line 353 "pure2-regex.cpp2"
-  auto test_class::run() const& -> void{
-    std::cout << "Running class:" << std::endl;
-    test(regex_1, "1", "aa*", "xaxaax", "(1,2)");
-    test(regex_2, "2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_M2, "M2", "(a*)(ab)*(b*)", "abc", "(0,2)(0,0)(0,2)(2,2)");
-    test(regex_3, "3", "((a*)(ab)*)((b*)(a*))", "aba", "(0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3)");
-    test(regex_4, "4", "(...?.?)*", "xxxxxx", "(0,6)(4,6)");
-    test(regex_5, "5", "(a|ab)(bc|c)", "abcabc", "(0,3)(0,2)(2,3)");
-    test(regex_6, "6", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)");
-    test(regex_7, "7", "(a*){2}", "xxxxx", "(0,0)(0,0)");
-    test(regex_8, "8", "(a*)*", "a", "(0,1)(0,1)");
-    test(regex_9, "9", "(aba|a*b)*", "ababa", "(0,5)(2,5)");
-    test(regex_10, "10", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)");
-    test(regex_11, "11", ".*(.*)", "ab", "(0,2)(2,2)");
-    test(regex_12, "12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(?,?)");
-    test(regex_M12, "M12", "(a?)((ab)?)(b?)a?(ab)?b?", "abab", "(0,4)(0,1)(1,1)(?,?)(1,2)(2,4)");
-    std::cout << std::endl;
-  }
+  private: std::string var_regex_328 {"(\h+)(\H)"}; 
 
+  private: std::string var_regex_329 {"foo(\h)bar"}; 
 
+  private: std::string var_regex_330 {"(\H)(\h)"}; 
 
+  private: std::string var_regex_331 {"(\h)(\H)"}; 
 
+  private: std::string var_regex_332 {"foo(\v+)bar"}; 
 
+  private: std::string var_regex_333 {"(\V+)(\v)"}; 
 
+  private: std::string var_regex_334 {"(\v+)(\V)"}; 
 
+  private: std::string var_regex_335 {"foo(\v)bar"}; 
 
+  private: std::string var_regex_336 {"(\V)(\v)"}; 
 
+  private: std::string var_regex_337 {"(\v)(\V)"}; 
 
+  private: std::string var_regex_338 {"foo\Kbar"}; 
 
+  private: std::string var_regex_339 {"foo\t\n\r\f\a\ebar"}; 
+  public: auto run() const& -> void;
+  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,3,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,3,4,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,4,5,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,5,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::escaped_char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
+  public: test_perl_tests() = default;
+  public: test_perl_tests(test_perl_tests const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_perl_tests const&) -> void = delete;
 
 
+#line 1278 "pure2-regex.cpp2"
+};
+auto main(int const argc_, char** argv_) -> int;
 
+//=== Cpp2 function definitions =================================================
 
-#line 385 "pure2-regex.cpp2"
-  auto test_left_assoc::run() const& -> void{
-    std::cout << "Running left_assoc:" << std::endl;
-    test(regex_M1, "M1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M2, "M2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M3, "M3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M4, "M4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M5, "M5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M6, "M6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M7, "M7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M8, "M8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,0)(0,3)(3,3)");
-    test(regex_M9, "M9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M10, "M10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M11, "M11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    test(regex_M12, "M12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,1)(1,4)(4,4)");
-    std::cout << std::endl;
+#line 1 "pure2-regex.cpp2"
+[[nodiscard]] auto create_result(cpp2::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::assert_not_null(_0)), "@", std::move(start))}; 
+
+  auto end {std::min(std::move(firstDollar), std::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::assert_not_null(_0))) + std::move(end); 
   }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(std::move(start), iter)); 
+  }}; 
 
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
 
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::assert_not_null(next) == '$') {
+        ++next;
 
+        if (*cpp2::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::assert_not_null(next) == '-' || *cpp2::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::assert_not_null(next) == '-'}; 
+          ++next;
+          ++next; // Skip [
+          auto group {extract_group_and_advance(next)}; 
+          ++next; // Skip ]
+
+          if (is_start) {
+            result += std::to_string(CPP2_UFCS(group_start)(r, group));
+          }
+          else {
+            result += std::to_string(CPP2_UFCS(group_end)(r, group));
+          }
+        }
+        else {if (std::isdigit(*cpp2::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::assert_not_null(next) == '-' || *cpp2::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = next;
+  }
 
+  return result; 
+}
 
+#line 93 "pure2-regex.cpp2"
+template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in kind, cpp2::in resultExpr, 
+           cpp2::in resultExpected) -> void{
 
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
 
+  std::string status {"OK"}; 
 
+  auto r {CPP2_UFCS(search)(regex, str)}; 
 
+  if ("y" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
 
+      auto result {create_result(resultExpr, std::move(r))}; 
 
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(std::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (std::move(r).matched) {
+      status = "Failure: Regex should not apply.";
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
 
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(std::move(status)) + " " + cpp2::to_string(std::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
 
-#line 415 "pure2-regex.cpp2"
-  auto test_right_assoc::run() const& -> void{
-    std::cout << "Running right_assoc:" << std::endl;
-    test(regex_1, "1", "(a|ab)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_2, "2", "(a|ab)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_3, "3", "(ab|a)(c|bcd)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_4, "4", "(ab|a)(bcd|c)(d*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_5, "5", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_6, "6", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_7, "7", "(a*)(b|abc)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_8, "8", "(a*)(abc|b)(c*)", "abc", "(0,3)(0,1)(1,2)(2,3)");
-    test(regex_9, "9", "(a|ab)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_10, "10", "(a|ab)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_11, "11", "(ab|a)(c|bcd)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_12, "12", "(ab|a)(bcd|c)(d|.*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
+#line 934 "pure2-regex.cpp2"
+  auto test_perl_tests::run() const& -> void{
+    std::cout << "Running perl_tests:" << std::endl;
+    test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
+    test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
+    test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
+    test(regex_3, 3, "abc", "xbc", "n", "-", "-");
+    test(regex_4, 4, "abc", "axc", "n", "-", "-");
+    test(regex_5, 5, "abc", "abx", "n", "-", "-");
+    test(regex_6, 6, "abc", "xabcy", "y", "$&", "abc");
+    test(regex_7, 7, "abc", "xabcy", "y", "$-[0]", "1");
+    test(regex_8, 8, "abc", "xabcy", "y", "$+[0]", "4");
+    test(regex_9, 9, "abc", "ababc", "y", "$&", "abc");
+    test(regex_10, 10, "abc", "ababc", "y", "$-[0]", "2");
+    test(regex_11, 11, "abc", "ababc", "y", "$+[0]", "5");
+    test(regex_12, 12, "ab*c", "abc", "y", "$&", "abc");
+    test(regex_13, 13, "ab*c", "abc", "y", "$-[0]", "0");
+    test(regex_14, 14, "ab*c", "abc", "y", "$+[0]", "3");
+    test(regex_15, 15, "ab*bc", "abc", "y", "$&", "abc");
+    test(regex_16, 16, "ab*bc", "abc", "y", "$-[0]", "0");
+    test(regex_17, 17, "ab*bc", "abc", "y", "$+[0]", "3");
+    test(regex_18, 18, "ab*bc", "abbc", "y", "$&", "abbc");
+    test(regex_19, 19, "ab*bc", "abbc", "y", "$-[0]", "0");
+    test(regex_20, 20, "ab*bc", "abbc", "y", "$+[0]", "4");
+    test(regex_21, 21, "ab*bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_22, 22, "ab*bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_23, 23, "ab*bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_24, 24, ".{1}", "abbbbc", "y", "$&", "a");
+    test(regex_25, 25, ".{1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_26, 26, ".{1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_27, 27, ".{3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_28, 28, ".{3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_29, 29, ".{3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_30, 30, "\\\\N{1}", "abbbbc", "y", "$&", "a");
+    test(regex_31, 31, "\\\\N{1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_32, 32, "\\\\N{1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_33, 33, "\\\\N{3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_34, 34, "\\\\N{3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_35, 35, "\\\\N{3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_36, 36, "\\\\N{ 3 , 4 }", "abbbbc", "y", "$+[0]", "4");
+    test(regex_37, 37, "ab{0,}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_38, 38, "ab{0,}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_39, 39, "ab{0,}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_40, 40, "ab+bc", "abbc", "y", "$&", "abbc");
+    test(regex_41, 41, "ab+bc", "abbc", "y", "$-[0]", "0");
+    test(regex_42, 42, "ab+bc", "abbc", "y", "$+[0]", "4");
+    test(regex_43, 43, "ab+bc", "abc", "n", "-", "-");
+    test(regex_44, 44, "ab+bc", "abq", "n", "-", "-");
+    test(regex_45, 45, "ab{1,}bc", "abq", "n", "-", "-");
+    test(regex_46, 46, "ab+bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_47, 47, "ab+bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_48, 48, "ab+bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_49, 49, "ab{1,}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_50, 50, "ab{1,}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_51, 51, "ab{1,}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_52, 52, "ab{1,3}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_53, 53, "ab{1,3}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_54, 54, "ab{1,3}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_55, 55, "ab{3,4}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_56, 56, "ab{3,4}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_57, 57, "ab{3,4}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_58, 58, "ab{4,5}bc", "abbbbc", "n", "-", "-");
+    test(regex_59, 59, "ab?bc", "abbc", "y", "$&", "abbc");
+    test(regex_60, 60, "ab?bc", "abc", "y", "$&", "abc");
+    test(regex_61, 61, "ab{0,1}bc", "abc", "y", "$&", "abc");
+    test(regex_62, 62, "ab?bc", "abbbbc", "n", "-", "-");
+    test(regex_63, 63, "ab?c", "abc", "y", "$&", "abc");
+    test(regex_64, 64, "ab{0,1}c", "abc", "y", "$&", "abc");
+    test(regex_65, 65, "^abc\\$", "abc", "y", "$&", "abc");
+    test(regex_66, 66, "^abc\\$", "abcc", "n", "-", "-");
+    test(regex_67, 67, "^abc", "abcc", "y", "$&", "abc");
+    test(regex_68, 68, "^abc\\$", "aabc", "n", "-", "-");
+    test(regex_69, 69, "abc\\$", "aabc", "y", "$&", "abc");
+    test(regex_70, 70, "abc\\$", "aabcd", "n", "-", "-");
+    test(regex_71, 71, "^", "abc", "y", "$&", "");
+    test(regex_72, 72, "\\$", "abc", "y", "$&", "");
+    test(regex_73, 73, "a.c", "abc", "y", "$&", "abc");
+    test(regex_74, 74, "a.c", "axc", "y", "$&", "axc");
+    test(regex_75, 75, "a\\\\Nc", "abc", "y", "$&", "abc");
+    test(regex_76, 76, "a.*c", "axyzc", "y", "$&", "axyzc");
+    test(regex_77, 77, "a\\\\N*c", "axyzc", "y", "$&", "axyzc");
+    test(regex_78, 78, "a.*c", "axyzd", "n", "-", "-");
+    test(regex_79, 79, "a\\\\N*c", "axyzd", "n", "-", "-");
+    test(regex_80, 80, "a[bc]d", "abc", "n", "-", "-");
+    test(regex_81, 81, "a[bc]d", "abd", "y", "$&", "abd");
+    test(regex_82, 82, "a[b]d", "abd", "y", "$&", "abd");
+    test(regex_83, 83, "[a][b][d]", "abd", "y", "$&", "abd");
+    test(regex_84, 84, ".[b].", "abd", "y", "$&", "abd");
+    test(regex_85, 85, ".[b].", "aBd", "n", "-", "-");
+    test(regex_86, 86, "a[b-d]e", "abd", "n", "-", "-");
+    test(regex_87, 87, "a[b-d]e", "ace", "y", "$&", "ace");
+    test(regex_88, 88, "a[b-d]", "aac", "y", "$&", "ac");
+    test(regex_89, 89, "a[-b]", "a-", "y", "$&", "a-");
+    test(regex_90, 90, "a[b-]", "a-", "y", "$&", "a-");
+    test(regex_91, 91, "a]", "a]", "y", "$&", "a]");
+    test(regex_92, 92, "a[]]b", "a]b", "y", "$&", "a]b");
+    test(regex_93, 93, "a[^bc]d", "aed", "y", "$&", "aed");
+    test(regex_94, 94, "a[^bc]d", "abd", "n", "-", "-");
+    test(regex_95, 95, "a[^-b]c", "adc", "y", "$&", "adc");
+    test(regex_96, 96, "a[^-b]c", "a-c", "n", "-", "-");
+    test(regex_97, 97, "a[^]b]c", "a]c", "n", "-", "-");
+    test(regex_98, 98, "a[^]b]c", "adc", "y", "$&", "adc");
+    test(regex_99, 99, "\\ba\\b", "a-", "y", "-", "-");
+    test(regex_100, 100, "\\ba\\b", "-a", "y", "-", "-");
+    test(regex_101, 101, "\\ba\\b", "-a-", "y", "-", "-");
+    test(regex_102, 102, "\\by\\b", "xy", "n", "-", "-");
+    test(regex_103, 103, "\\by\\b", "yz", "n", "-", "-");
+    test(regex_104, 104, "\\by\\b", "xyz", "n", "-", "-");
+    test(regex_105, 105, "\\Ba\\B", "a-", "n", "-", "-");
+    test(regex_106, 106, "\\Ba\\B", "-a", "n", "-", "-");
+    test(regex_107, 107, "\\Ba\\B", "-a-", "n", "-", "-");
+    test(regex_108, 108, "\\By\\b", "xy", "y", "-", "-");
+    test(regex_109, 109, "\\By\\b", "xy", "y", "$-[0]", "1");
+    test(regex_110, 110, "\\By\\b", "xy", "y", "$+[0]", "2");
+    test(regex_111, 111, "\\By\\b", "xy", "y", "-", "-");
+    test(regex_112, 112, "\\by\\B", "yz", "y", "-", "-");
+    test(regex_113, 113, "\\By\\B", "xyz", "y", "-", "-");
+    test(regex_114, 114, "\\b", "", "n", "-", "-");
+    test(regex_115, 115, "\\B", "", "y", "-", "-");
+    test(regex_116, 116, "\\w", "a", "y", "-", "-");
+    test(regex_117, 117, "\\w", "-", "n", "-", "-");
+    test(regex_118, 118, "\\W", "a", "n", "-", "-");
+    test(regex_119, 119, "\\W", "-", "y", "-", "-");
+    test(regex_120, 120, "a\\sb", "a b", "y", "-", "-");
+    test(regex_121, 121, "a\\sb", "a-b", "n", "-", "-");
+    test(regex_122, 122, "a\\Sb", "a b", "n", "-", "-");
+    test(regex_123, 123, "a\\Sb", "a-b", "y", "-", "-");
+    test(regex_124, 124, "\\d", "1", "y", "-", "-");
+    test(regex_125, 125, "\\d", "-", "n", "-", "-");
+    test(regex_126, 126, "\\D", "1", "n", "-", "-");
+    test(regex_127, 127, "\\D", "-", "y", "-", "-");
+    test(regex_128, 128, "[\\w]", "a", "y", "-", "-");
+    test(regex_129, 129, "[\\w]", "-", "n", "-", "-");
+    test(regex_130, 130, "[\\W]", "a", "n", "-", "-");
+    test(regex_131, 131, "[\\W]", "-", "y", "-", "-");
+    test(regex_132, 132, "a[\\s]b", "a b", "y", "-", "-");
+    test(regex_133, 133, "a[\\s]b", "a-b", "n", "-", "-");
+    test(regex_134, 134, "a[\\S]b", "a b", "n", "-", "-");
+    test(regex_135, 135, "a[\\S]b", "a-b", "y", "-", "-");
+    test(regex_136, 136, "[\\d]", "1", "y", "-", "-");
+    test(regex_137, 137, "[\\d]", "-", "n", "-", "-");
+    test(regex_138, 138, "[\\D]", "1", "n", "-", "-");
+    test(regex_139, 139, "[\\D]", "-", "y", "-", "-");
+    test(regex_140, 140, "ab|cd", "abc", "y", "$&", "ab");
+    test(regex_141, 141, "ab|cd", "abcd", "y", "$&", "ab");
+    test(regex_142, 142, "()ef", "def", "y", "$&-$1", "ef-");
+    test(regex_143, 143, "()ef", "def", "y", "$-[0]", "1");
+    test(regex_144, 144, "()ef", "def", "y", "$+[0]", "3");
+    test(regex_145, 145, "()ef", "def", "y", "$-[1]", "1");
+    test(regex_146, 146, "()ef", "def", "y", "$+[1]", "1");
+    test(regex_147, 147, "\\$b", "b", "n", "-", "-");
+    test(regex_148, 148, "a\\(b", "a(b", "y", "$&-$1", "a(b-");
+    test(regex_149, 149, "a\\(*b", "ab", "y", "$&", "ab");
+    test(regex_150, 150, "a\\(*b", "a((b", "y", "$&", "a((b");
+    test(regex_151, 151, "a\\\\b", "a\\b", "y", "$&", "a\\b");
+    test(regex_152, 152, "((a))", "abc", "y", "$&-$1-$2", "a-a-a");
+    test(regex_153, 153, "((a))", "abc", "y", "$-[0]-$-[1]-$-[2]", "0-0-0");
+    test(regex_154, 154, "((a))", "abc", "y", "$+[0]-$+[1]-$+[2]", "1-1-1");
+    test(regex_155, 155, "(foo)(\\g-2)", "foofoo", "y", "$1-$2", "foo-foo");
+    test(regex_156, 156, "(foo)(\\g-2)(foo)(\\g-2)", "foofoofoofoo", "y", "$1-$2-$3-$4", "foo-foo-foo-foo");
+    test(regex_157, 157, "(([abc]+) \\g-1)(([abc]+) \\g{-1})", "abc abccba cba", "y", "$2-$4", "abc-cba");
+    test(regex_158, 158, "(a)(b)(c)\\g1\\g2\\g3", "abcabc", "y", "$1$2$3", "abc");
+    test(regex_159, 159, "abc", "ABC", "y", "$&", "ABC");
+    test(regex_160, 160, "abc", "XBC", "n", "-", "-");
+    test(regex_161, 161, "abc", "AXC", "n", "-", "-");
+    test(regex_162, 162, "abc", "ABX", "n", "-", "-");
+    test(regex_163, 163, "abc", "XABCY", "y", "$&", "ABC");
+    test(regex_164, 164, "abc", "ABABC", "y", "$&", "ABC");
+    test(regex_165, 165, "ab*c", "ABC", "y", "$&", "ABC");
+    test(regex_166, 166, "ab*bc", "ABC", "y", "$&", "ABC");
+    test(regex_167, 167, "ab*bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_168, 168, "ab*?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_169, 169, "ab{0,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_170, 170, "ab+?bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_171, 171, "ab+bc", "ABC", "n", "-", "-");
+    test(regex_172, 172, "ab+bc", "ABQ", "n", "-", "-");
+    test(regex_173, 173, "ab{1,}bc", "ABQ", "n", "-", "-");
+    test(regex_174, 174, "ab+bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_175, 175, "ab{1,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_176, 176, "ab{1,3}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_177, 177, "ab{3,4}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_178, 178, "ab{4,5}?bc", "ABBBBC", "n", "-", "-");
+    test(regex_179, 179, "ab??bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_180, 180, "ab??bc", "ABC", "y", "$&", "ABC");
+    test(regex_181, 181, "ab{0,1}?bc", "ABC", "y", "$&", "ABC");
+    test(regex_182, 182, "ab??bc", "ABBBBC", "n", "-", "-");
+    test(regex_183, 183, "ab??c", "ABC", "y", "$&", "ABC");
+    test(regex_184, 184, "ab{0,1}?c", "ABC", "y", "$&", "ABC");
+    test(regex_185, 185, "^abc\\$", "ABC", "y", "$&", "ABC");
+    test(regex_186, 186, "^abc\\$", "ABCC", "n", "-", "-");
+    test(regex_187, 187, "^abc", "ABCC", "y", "$&", "ABC");
+    test(regex_188, 188, "^abc\\$", "AABC", "n", "-", "-");
+    test(regex_189, 189, "abc\\$", "AABC", "y", "$&", "ABC");
+    test(regex_190, 190, "^", "ABC", "y", "$&", "");
+    test(regex_191, 191, "\\$", "ABC", "y", "$&", "");
+    test(regex_192, 192, "a.c", "ABC", "y", "$&", "ABC");
+    test(regex_193, 193, "a.c", "AXC", "y", "$&", "AXC");
+    test(regex_194, 194, "a\\\\Nc", "ABC", "y", "$&", "ABC");
+    test(regex_195, 195, "a.*?c", "AXYZC", "y", "$&", "AXYZC");
+    test(regex_196, 196, "a.*c", "AXYZD", "n", "-", "-");
+    test(regex_197, 197, "a[bc]d", "ABC", "n", "-", "-");
+    test(regex_198, 198, "a[bc]d", "ABD", "y", "$&", "ABD");
+    test(regex_199, 199, "a[b-d]e", "ABD", "n", "-", "-");
+    test(regex_200, 200, "a[b-d]e", "ACE", "y", "$&", "ACE");
+    test(regex_201, 201, "a[b-d]", "AAC", "y", "$&", "AC");
+    test(regex_202, 202, "a[-b]", "A-", "y", "$&", "A-");
+    test(regex_203, 203, "a[b-]", "A-", "y", "$&", "A-");
+    test(regex_204, 204, "a]", "A]", "y", "$&", "A]");
+    test(regex_205, 205, "a[]]b", "A]B", "y", "$&", "A]B");
+    test(regex_206, 206, "a[^bc]d", "AED", "y", "$&", "AED");
+    test(regex_207, 207, "a[^bc]d", "ABD", "n", "-", "-");
+    test(regex_208, 208, "a[^-b]c", "ADC", "y", "$&", "ADC");
+    test(regex_209, 209, "a[^-b]c", "A-C", "n", "-", "-");
+    test(regex_210, 210, "a[^]b]c", "A]C", "n", "-", "-");
+    test(regex_211, 211, "a[^]b]c", "ADC", "y", "$&", "ADC");
+    test(regex_212, 212, "ab|cd", "ABC", "y", "$&", "AB");
+    test(regex_213, 213, "ab|cd", "ABCD", "y", "$&", "AB");
+    test(regex_214, 214, "()ef", "DEF", "y", "$&-$1", "EF-");
+    test(regex_215, 215, "\\$b", "B", "n", "-", "-");
+    test(regex_216, 216, "a\\(b", "A(B", "y", "$&-$1", "A(B-");
+    test(regex_217, 217, "a\\(*b", "AB", "y", "$&", "AB");
+    test(regex_218, 218, "a\\(*b", "A((B", "y", "$&", "A((B");
+    test(regex_219, 219, "a\\\\b", "A\\B", "y", "$&", "A\\B");
+    test(regex_220, 220, "((a))", "ABC", "y", "$&-$1-$2", "A-A-A");
+    test(regex_221, 221, "(a)b(c)", "ABC", "y", "$&-$1-$2", "ABC-A-C");
+    test(regex_222, 222, "a+b+c", "AABBABC", "y", "$&", "ABC");
+    test(regex_223, 223, "a{1,}b{1,}c", "AABBABC", "y", "$&", "ABC");
+    test(regex_224, 224, "a.+?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_225, 225, "a.*?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_226, 226, "a.{0,5}?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_227, 227, "(a+|b)*", "AB", "y", "$&-$1", "AB-B");
+    test(regex_228, 228, "(a+|b){0,}", "AB", "y", "$&-$1", "AB-B");
+    test(regex_229, 229, "(a+|b)+", "AB", "y", "$&-$1", "AB-B");
+    test(regex_230, 230, "(a+|b){1,}", "AB", "y", "$&-$1", "AB-B");
+    test(regex_231, 231, "(a+|b)?", "AB", "y", "$&-$1", "A-A");
+    test(regex_232, 232, "(a+|b){0,1}", "AB", "y", "$&-$1", "A-A");
+    test(regex_233, 233, "(a+|b){0,1}?", "AB", "y", "$&-$1", "-");
+    test(regex_234, 234, "[^ab]*", "CDE", "y", "$&", "CDE");
+    test(regex_235, 235, "abc", "", "n", "-", "-");
+    test(regex_236, 236, "a*", "", "y", "$&", "");
+    test(regex_237, 237, "([abc])*d", "ABBBCD", "y", "$&-$1", "ABBBCD-C");
+    test(regex_238, 238, "([abc])*bcd", "ABCD", "y", "$&-$1", "ABCD-A");
+    test(regex_239, 239, "a|b|c|d|e", "E", "y", "$&", "E");
+    test(regex_240, 240, "(a|b|c|d|e)f", "EF", "y", "$&-$1", "EF-E");
+    test(regex_241, 241, "abcd*efg", "ABCDEFG", "y", "$&", "ABCDEFG");
+    test(regex_242, 242, "ab*", "XABYABBBZ", "y", "$&", "AB");
+    test(regex_243, 243, "ab*", "XAYABBBZ", "y", "$&", "A");
+    test(regex_244, 244, "(ab|cd)e", "ABCDE", "y", "$&-$1", "CDE-CD");
+    test(regex_245, 245, "[abhgefdc]ij", "HIJ", "y", "$&", "HIJ");
+    test(regex_246, 246, "^(ab|cd)e", "ABCDE", "n", "x$1y", "XY");
+    test(regex_247, 247, "(abc|)ef", "ABCDEF", "y", "$&-$1", "EF-");
+    test(regex_248, 248, "(a|b)c*d", "ABCD", "y", "$&-$1", "BCD-B");
+    test(regex_249, 249, "(ab|ab*)bc", "ABC", "y", "$&-$1", "ABC-A");
+    test(regex_250, 250, "a([bc]*)c*", "ABC", "y", "$&-$1", "ABC-BC");
+    test(regex_251, 251, "a([bc]*)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
+    test(regex_252, 252, "a([bc]+)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
+    test(regex_253, 253, "a([bc]*)(c+d)", "ABCD", "y", "$&-$1-$2", "ABCD-B-CD");
+    test(regex_254, 254, "a[bcd]*dcdcde", "ADCDCDE", "y", "$&", "ADCDCDE");
+    test(regex_255, 255, "a[bcd]+dcdcde", "ADCDCDE", "n", "-", "-");
+    test(regex_256, 256, "(ab|a)b*c", "ABC", "y", "$&-$1", "ABC-AB");
+    test(regex_257, 257, "((a)(b)c)(d)", "ABCD", "y", "$1-$2-$3-$4", "ABC-A-B-D");
+    test(regex_258, 258, "[a-zA-Z_][a-zA-Z0-9_]*", "ALPHA", "y", "$&", "ALPHA");
+    test(regex_259, 259, "^a(bc+|b[eh])g|.h\\$", "ABH", "y", "$&-$1", "BH-");
+    test(regex_260, 260, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
+    test(regex_261, 261, "(bc+d\\$|ef*g.|h?i(j|k))", "IJ", "y", "$&-$1-$2", "IJ-IJ-J");
+    test(regex_262, 262, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFG", "n", "-", "-");
+    test(regex_263, 263, "(bc+d\\$|ef*g.|h?i(j|k))", "BCDD", "n", "-", "-");
+    test(regex_264, 264, "(bc+d\\$|ef*g.|h?i(j|k))", "REFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
+    test(regex_265, 265, "((((((((((a))))))))))", "A", "y", "$10", "A");
+    test(regex_266, 266, "((((((((((a))))))))))\\10", "AA", "y", "$&", "AA");
+    test(regex_267, 267, "(((((((((a)))))))))", "A", "y", "$&", "A");
+    test(regex_268, 268, "multiple words of text", "UH-UH", "n", "-", "-");
+    test(regex_269, 269, "multiple words", "MULTIPLE WORDS, YEAH", "y", "$&", "MULTIPLE WORDS");
+    test(regex_270, 270, "(.*)c(.*)", "ABCDE", "y", "$&-$1-$2", "ABCDE-AB-DE");
+    test(regex_271, 271, "\\((.*), (.*)\\)", "(A, B)", "y", "($2, $1)", "(B, A)");
+    test(regex_272, 272, "[k]", "AB", "n", "-", "-");
+    test(regex_273, 273, "abcd", "ABCD", "y", "$&", "ABCD");
+    test(regex_274, 274, "a(bc)d", "ABCD", "y", "$1", "BC");
+    test(regex_275, 275, "a[-]?c", "AC", "y", "$&", "AC");
+    test(regex_276, 276, "(abc)\\1", "ABCABC", "y", "$1", "ABC");
+    test(regex_277, 277, "([a-c]*)\\1", "ABCABC", "y", "$1", "ABC");
+    test(regex_278, 278, "a++a", "aaaaa", "n", "-", "-");
+    test(regex_279, 279, "a*+a", "aaaaa", "n", "-", "-");
+    test(regex_280, 280, "a{1,5}+a", "aaaaa", "n", "-", "-");
+    test(regex_281, 281, "a?+a", "ab", "n", "-", "-");
+    test(regex_282, 282, "a++b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_283, 283, "a*+b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_284, 284, "a{1,5}+b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_285, 285, "a?+b", "ab", "y", "$&", "ab");
+    test(regex_286, 286, "fooa++a", "fooaaaaa", "n", "-", "-");
+    test(regex_287, 287, "fooa*+a", "fooaaaaa", "n", "-", "-");
+    test(regex_288, 288, "fooa{1,5}+a", "fooaaaaa", "n", "-", "-");
+    test(regex_289, 289, "fooa?+a", "fooab", "n", "-", "-");
+    test(regex_290, 290, "fooa++b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_291, 291, "fooa*+b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_292, 292, "fooa{1,5}+b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_293, 293, "fooa?+b", "fooab", "y", "$&", "fooab");
+    test(regex_294, 294, "(aA)++(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_295, 295, "(aA|bB)++(aA|bB)", "aAaAbBaAbB", "n", "-", "aAaAbBaAbB");
+    test(regex_296, 296, "(aA)*+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_297, 297, "(aA|bB)*+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
+    test(regex_298, 298, "(aA){1,5}+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_299, 299, "(aA|bB){1,5}+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
+    test(regex_300, 300, "(aA)?+(aA)", "aAb", "n", "-", "aAb");
+    test(regex_301, 301, "(aA|bB)?+(aA|bB)", "bBb", "n", "-", "bBb");
+    test(regex_302, 302, "(aA)++b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_303, 303, "(aA|bB)++b", "aAbBaAaAbBb", "y", "$&", "aAbBaAaAbBb");
+    test(regex_304, 304, "(aA)*+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_305, 305, "(aA|bB)*+b", "bBbBbBbBbBb", "y", "$&", "bBbBbBbBbBb");
+    test(regex_306, 306, "(aA){1,5}+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_307, 307, "(aA|bB){1,5}+b", "bBaAbBaAbBb", "y", "$&", "bBaAbBaAbBb");
+    test(regex_308, 308, "(aA)?+b", "aAb", "y", "$&", "aAb");
+    test(regex_309, 309, "(aA|bB)?+b", "bBb", "y", "$&", "bBb");
+    test(regex_310, 310, "foo(aA)++(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_311, 311, "foo(aA|bB)++(aA|bB)", "foobBbBbBaAaA", "n", "-", "foobBbBbBaAaA");
+    test(regex_312, 312, "foo(aA)*+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_313, 313, "foo(aA|bB)*+(aA|bB)", "foobBaAbBaAaA", "n", "-", "foobBaAbBaAaA");
+    test(regex_314, 314, "foo(aA){1,5}+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_315, 315, "foo(aA|bB){1,5}+(aA|bB)", "fooaAbBbBaAaA", "n", "-", "fooaAbBbBaAaA");
+    test(regex_316, 316, "foo(aA)?+(aA)", "fooaAb", "n", "-", "fooaAb");
+    test(regex_317, 317, "foo(aA|bB)?+(aA|bB)", "foobBb", "n", "-", "foobBb");
+    test(regex_318, 318, "foo(aA)++b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_319, 319, "foo(aA|bB)++b", "foobBaAbBaAbBb", "y", "$&", "foobBaAbBaAbBb");
+    test(regex_320, 320, "foo(aA)*+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_321, 321, "foo(aA|bB)*+b", "foobBbBaAaAaAb", "y", "$&", "foobBbBaAaAaAb");
+    test(regex_322, 322, "foo(aA){1,5}+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_323, 323, "foo(aA|bB){1,5}+b", "foobBaAaAaAaAb", "y", "$&", "foobBaAaAaAaAb");
+    test(regex_324, 324, "foo(aA)?+b", "fooaAb", "y", "$&", "fooaAb");
+    test(regex_325, 325, "foo(aA|bB)?+b", "foobBb", "y", "$&", "foobBb");
+    test(regex_326, 326, "foo(\\h+)bar", "foo\tbar", "y", "$1", "\t");
+    test(regex_327, 327, "(\\H+)(\\h)", "foo\tbar", "y", "$1-$2", "foo-\t");
+    test(regex_328, 328, "(\\h+)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
+    test(regex_329, 329, "foo(\\h)bar", "foo\tbar", "y", "$1", "\t");
+    test(regex_330, 330, "(\\H)(\\h)", "foo\tbar", "y", "$1-$2", "o-\t");
+    test(regex_331, 331, "(\\h)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
+    test(regex_332, 332, "foo(\\v+)bar", "foo\r\n\r\n\nbar", "y", "$1", "\r\n\r\n\n");
+    test(regex_333, 333, "(\\V+)(\\v)", "foo\r\n\r\n\nbar", "y", "$1-$2", "foo-\r");
+    test(regex_334, 334, "(\\v+)(\\V)", "foo\r\n\r\n\nbar", "y", "$1-$2", "\r\n\r\n\n-b");
+    test(regex_335, 335, "foo(\\v)bar", "foo\rbar", "y", "$1", "\r");
+    test(regex_336, 336, "(\\V)(\\v)", "foo\rbar", "y", "$1-$2", "o-\r");
+    test(regex_337, 337, "(\\v)(\\V)", "foo\rbar", "y", "$1-$2", "\r-b");
+    test(regex_338, 338, "foo\\Kbar", "foobar", "y", "$&", "bar");
+    test(regex_339, 339, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
     std::cout << std::endl;
   }
 
@@ -596,39 +1328,6 @@ template auto test(M const& regex, cpp2::in id, cpp2::i
 
 
 
-#line 461 "pure2-regex.cpp2"
-  auto test_forced_assoc::run() const& -> void{
-    std::cout << "Running forced_assoc:" << std::endl;
-    test(regex_1, "1", "(a|ab)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_2, "2", "(a|ab)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_3, "3", "(ab|a)(c|bcd)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_4, "4", "(ab|a)(bcd|c)", "abcd", "(0,4)(0,1)(1,4)");
-    test(regex_5, "5", "((a|ab)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_6, "6", "((a|ab)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_7, "7", "((ab|a)(c|bcd))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_8, "8", "((ab|a)(bcd|c))(d*)", "abcd", "(0,4)(0,4)(0,1)(1,4)(4,4)");
-    test(regex_9, "9", "(a|ab)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_10, "10", "(a|ab)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_11, "11", "(ab|a)((c|bcd)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_12, "12", "(ab|a)((bcd|c)(d*))", "abcd", "(0,4)(0,2)(2,4)(2,3)(3,4)");
-    test(regex_13, "13", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_14, "14", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_15, "15", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_16, "16", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_17, "17", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_18, "18", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_19, "19", "(a*)(b|abc)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_20, "20", "(a*)(abc|b)", "abc", "(0,3)(0,0)(0,3)");
-    test(regex_21, "21", "((a*)(b|abc))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_22, "22", "((a*)(abc|b))(c*)", "abc", "(0,3)(0,3)(0,0)(0,3)(3,3)");
-    test(regex_23, "23", "(a*)((b|abc)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_24, "24", "(a*)((abc|b)(c*))", "abc", "(0,3)(0,1)(1,3)(1,2)(2,3)");
-    test(regex_25, "25", "(a|ab)", "ab", "(0,2)(0,2)");
-    test(regex_26, "26", "(ab|a)", "ab", "(0,2)(0,2)");
-    test(regex_27, "27", "(a|ab)(b*)", "ab", "(0,2)(0,2)(2,2)");
-    test(regex_28, "28", "(ab|a)(b*)", "ab", "(0,2)(0,2)(2,2)");
-    std::cout << std::endl;
-  }
 
 
 
@@ -658,62 +1357,6 @@ template auto test(M const& regex, cpp2::in id, cpp2::i
 
 
 
-#line 546 "pure2-regex.cpp2"
-  auto test_nullsub3::run() const& -> void{
-    std::cout << "Running nullsub3:" << std::endl;
-    test(regex_1, "1", "(a*)*", "a", "(0,1)(0,1)");
-    test(regex_2, "2", "(a*)*", "x", "(0,0)(0,0)");
-    test(regex_3, "3", "(a*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_4, "4", "(a*)*", "aaaaaax", "(0,6)(0,6)");
-    test(regex_5, "5", "(a*)+", "a", "(0,1)(0,1)");
-    test(regex_6, "6", "(a*)+", "x", "(0,0)(0,0)");
-    test(regex_7, "7", "(a*)+", "aaaaaa", "(0,6)(0,6)");
-    test(regex_8, "8", "(a*)+", "aaaaaax", "(0,6)(0,6)");
-    test(regex_9, "9", "(a+)*", "a", "(0,1)(0,1)");
-    test(regex_10, "10", "(a+)*", "x", "(0,0)(?,?)");
-    test(regex_11, "11", "(a+)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_12, "12", "(a+)*", "aaaaaax", "(0,6)(0,6)");
-    test(regex_13, "13", "(a+)+", "a", "(0,1)(0,1)");
-    test(regex_14, "14", "(a+)+", "x", "NOMATCH");
-    test(regex_15, "15", "(a+)+", "aaaaaa", "(0,6)(0,6)");
-    test(regex_16, "16", "(a+)+", "aaaaaax", "(0,6)(0,6)");
-    test(regex_17, "17", "([a]*)*", "a", "(0,1)(0,1)");
-    test(regex_18, "18", "([a]*)*", "x", "(0,0)(0,0)");
-    test(regex_19, "19", "([a]*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_20, "20", "([a]*)*", "aaaaaax", "(0,6)(0,6)");
-    test(regex_21, "21", "([a]*)+", "a", "(0,1)(0,1)");
-    test(regex_22, "22", "([a]*)+", "x", "(0,0)(0,0)");
-    test(regex_23, "23", "([a]*)+", "aaaaaa", "(0,6)(0,6)");
-    test(regex_24, "24", "([a]*)+", "aaaaaax", "(0,6)(0,6)");
-    test(regex_25, "25", "([^b]*)*", "a", "(0,1)(0,1)");
-    test(regex_26, "26", "([^b]*)*", "b", "(0,0)(0,0)");
-    test(regex_27, "27", "([^b]*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_28, "28", "([^b]*)*", "aaaaaab", "(0,6)(0,6)");
-    test(regex_29, "29", "([ab]*)*", "a", "(0,1)(0,1)");
-    test(regex_30, "30", "([ab]*)*", "aaaaaa", "(0,6)(0,6)");
-    test(regex_31, "31", "([ab]*)*", "ababab", "(0,6)(0,6)");
-    test(regex_32, "32", "([ab]*)*", "bababa", "(0,6)(0,6)");
-    test(regex_33, "33", "([ab]*)*", "b", "(0,1)(0,1)");
-    test(regex_34, "34", "([ab]*)*", "bbbbbb", "(0,6)(0,6)");
-    test(regex_35, "35", "([ab]*)*", "aaaabcde", "(0,5)(0,5)");
-    test(regex_36, "36", "([^a]*)*", "b", "(0,1)(0,1)");
-    test(regex_37, "37", "([^a]*)*", "bbbbbb", "(0,6)(0,6)");
-    test(regex_38, "38", "([^a]*)*", "aaaaaa", "(0,0)(0,0)");
-    test(regex_39, "39", "([^ab]*)*", "ccccxx", "(0,6)(0,6)");
-    test(regex_40, "40", "([^ab]*)*", "ababab", "(0,0)(0,0)");
-    test(regex_41, "41", "((z)+|a)*", "zabcde", "(0,2)(1,2)(?,?)");
-    test(regex_42, "42", "(a)", "aaa", "(0,1)(0,1)");
-    test(regex_46, "46", "(a*)*(x)", "x", "(0,1)(0,0)(0,1)");
-    test(regex_47, "47", "(a*)*(x)", "ax", "(0,2)(0,1)(1,2)");
-    test(regex_48, "48", "(a*)*(x)", "axa", "(0,2)(0,1)(1,2)");
-    test(regex_49, "49", "(a*)+(x)", "x", "(0,1)(0,0)(0,1)");
-    test(regex_50, "50", "(a*)+(x)", "ax", "(0,2)(0,1)(1,2)");
-    test(regex_51, "51", "(a*)+(x)", "axa", "(0,2)(0,1)(1,2)");
-    test(regex_52, "52", "(a*){2}(x)", "x", "(0,1)(0,0)(0,1)");
-    test(regex_53, "53", "(a*){2}(x)", "ax", "(0,2)(1,1)(1,2)");
-    test(regex_54, "54", "(a*){2}(x)", "axa", "(0,2)(1,1)(1,2)");
-    std::cout << std::endl;
-  }
 
 
 
@@ -766,90 +1409,6 @@ template auto test(M const& regex, cpp2::in id, cpp2::i
 
 
 
-#line 682 "pure2-regex.cpp2"
-  auto test_repetition2::run() const& -> void{
-    std::cout << "Running repetition2:" << std::endl;
-    test(regex_1, "1", "((..)|(.))", "NULL", "NOMATCH");
-    test(regex_2, "2", "((..)|(.))((..)|(.))", "NULL", "NOMATCH");
-    test(regex_3, "3", "((..)|(.))((..)|(.))((..)|(.))", "NULL", "NOMATCH");
-    test(regex_4, "4", "((..)|(.)){1}", "NULL", "NOMATCH");
-    test(regex_5, "5", "((..)|(.)){2}", "NULL", "NOMATCH");
-    test(regex_6, "6", "((..)|(.)){3}", "NULL", "NOMATCH");
-    test(regex_7, "7", "((..)|(.))*", "NULL", "(0,0)(?,?)(?,?)(?,?)");
-    test(regex_8, "8", "((..)|(.))", "a", "(0,1)(0,1)(?,?)(0,1)");
-    test(regex_9, "9", "((..)|(.))((..)|(.))", "a", "NOMATCH");
-    test(regex_10, "10", "((..)|(.))((..)|(.))((..)|(.))", "a", "NOMATCH");
-    test(regex_11, "11", "((..)|(.)){1}", "a", "(0,1)(0,1)(?,?)(0,1)");
-    test(regex_12, "12", "((..)|(.)){2}", "a", "NOMATCH");
-    test(regex_13, "13", "((..)|(.)){3}", "a", "NOMATCH");
-    test(regex_14, "14", "((..)|(.))*", "a", "(0,1)(0,1)(?,?)(0,1)");
-    test(regex_15, "15", "((..)|(.))", "aa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_16, "16", "((..)|(.))((..)|(.))", "aa", "(0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)");
-    test(regex_17, "17", "((..)|(.))((..)|(.))((..)|(.))", "aa", "NOMATCH");
-    test(regex_18, "18", "((..)|(.)){1}", "aa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_19, "19", "((..)|(.)){2}", "aa", "(0,2)(1,2)(?,?)(1,2)");
-    test(regex_20, "20", "((..)|(.)){3}", "aa", "NOMATCH");
-    test(regex_21, "21", "((..)|(.))*", "aa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_22, "22", "((..)|(.))", "aaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_23, "23", "((..)|(.))((..)|(.))", "aaa", "(0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)");
-    test(regex_24, "24", "((..)|(.))((..)|(.))((..)|(.))", "aaa", "(0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)");
-    test(regex_25, "25", "((..)|(.)){1}", "aaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_26, "26", "((..)|(.)){2}", "aaa", "(0,3)(2,3)(?,?)(2,3)");
-    test(regex_27, "27", "((..)|(.)){3}", "aaa", "(0,3)(2,3)(?,?)(2,3)");
-    test(regex_28, "28", "((..)|(.))*", "aaa", "(0,3)(2,3)(?,?)(2,3)");
-    test(regex_29, "29", "((..)|(.))", "aaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_30, "30", "((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)");
-    test(regex_31, "31", "((..)|(.))((..)|(.))((..)|(.))", "aaaa", "(0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)");
-    test(regex_32, "32", "((..)|(.)){1}", "aaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_33, "33", "((..)|(.)){2}", "aaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_34, "34", "((..)|(.)){3}", "aaaa", "(0,4)(3,4)(?,?)(3,4)");
-    test(regex_35, "35", "((..)|(.))*", "aaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_36, "36", "((..)|(.))", "aaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_37, "37", "((..)|(.))((..)|(.))", "aaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)");
-    test(regex_38, "38", "((..)|(.))((..)|(.))((..)|(.))", "aaaaa", "(0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)");
-    test(regex_39, "39", "((..)|(.)){1}", "aaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_40, "40", "((..)|(.)){2}", "aaaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_41, "41", "((..)|(.)){3}", "aaaaa", "(0,5)(4,5)(?,?)(4,5)");
-    test(regex_42, "42", "((..)|(.))*", "aaaaa", "(0,5)(4,5)(?,?)(4,5)");
-    test(regex_43, "43", "((..)|(.))", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_44, "44", "((..)|(.))((..)|(.))", "aaaaaa", "(0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)");
-    test(regex_45, "45", "((..)|(.))((..)|(.))((..)|(.))", "aaaaaa", "(0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)");
-    test(regex_46, "46", "((..)|(.)){1}", "aaaaaa", "(0,2)(0,2)(0,2)(?,?)");
-    test(regex_47, "47", "((..)|(.)){2}", "aaaaaa", "(0,4)(2,4)(2,4)(?,?)");
-    test(regex_48, "48", "((..)|(.)){3}", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)");
-    test(regex_49, "49", "((..)|(.))*", "aaaaaa", "(0,6)(4,6)(4,6)(?,?)");
-    test(regex_100, "100", "X(.?){0,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_101, "101", "X(.?){1,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_102, "102", "X(.?){2,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_103, "103", "X(.?){3,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_104, "104", "X(.?){4,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_105, "105", "X(.?){5,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_106, "106", "X(.?){6,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_107, "107", "X(.?){7,}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_108, "108", "X(.?){8,}Y", "X1234567Y", "(0,9)(8,8)");
-    test(regex_110, "110", "X(.?){0,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_111, "111", "X(.?){1,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_112, "112", "X(.?){2,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_113, "113", "X(.?){3,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_114, "114", "X(.?){4,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_115, "115", "X(.?){5,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_116, "116", "X(.?){6,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_117, "117", "X(.?){7,8}Y", "X1234567Y", "(0,9)(7,8)");
-    test(regex_118, "118", "X(.?){8,8}Y", "X1234567Y", "(0,9)(8,8)");
-    test(regex_260, "260", "(a|ab|c|bcd){0,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_261, "261", "(a|ab|c|bcd){1,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_262, "262", "(a|ab|c|bcd){2,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_263, "263", "(a|ab|c|bcd){3,}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_264, "264", "(a|ab|c|bcd){4,}(d*)", "ababcd", "NOMATCH");
-    test(regex_265, "265", "(a|ab|c|bcd){0,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_266, "266", "(a|ab|c|bcd){1,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_267, "267", "(a|ab|c|bcd){2,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_268, "268", "(a|ab|c|bcd){3,10}(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_269, "269", "(a|ab|c|bcd){4,10}(d*)", "ababcd", "NOMATCH");
-    test(regex_270, "270", "(a|ab|c|bcd)*(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    test(regex_271, "271", "(a|ab|c|bcd)+(d*)", "ababcd", "(0,6)(3,6)(6,6)");
-    std::cout << std::endl;
-  }
 
 
 
@@ -930,90 +1489,6 @@ template auto test(M const& regex, cpp2::in id, cpp2::i
 
 
 
-#line 846 "pure2-regex.cpp2"
-  auto test_totest::run() const& -> void{
-    std::cout << "Running totest:" << std::endl;
-    test(regex_01, "01", "a+", "xaax", "(1,3)");
-    test(regex_03, "03", "(a?)((ab)?)", "ab", "(0,2)(0,0)(0,2)(0,2)");
-    test(regex_04, "04", "(a?)((ab)?)(b?)", "ab", "(0,2)(0,1)(1,1)(?,?)(1,2)");
-    test(regex_05, "05", "((a?)((ab)?))(b?)", "ab", "(0,2)(0,2)(0,0)(0,2)(0,2)(2,2)");
-    test(regex_06, "06", "(a?)(((ab)?)(b?))", "ab", "(0,2)(0,1)(1,2)(1,1)(?,?)(1,2)");
-    test(regex_07, "07", "(.?)", "x", "(0,1)(0,1)");
-    test(regex_08, "08", "(.?){1}", "x", "(0,1)(0,1)");
-    test(regex_09, "09", "(.?)(.?)", "x", "(0,1)(0,1)(1,1)");
-    test(regex_10, "10", "(.?){2}", "x", "(0,1)(1,1)");
-    test(regex_11, "11", "(.?)*", "x", "(0,1)(0,1)");
-    test(regex_12, "12", "(.?.?)", "xxx", "(0,2)(0,2)");
-    test(regex_13, "13", "(.?.?){1}", "xxx", "(0,2)(0,2)");
-    test(regex_14, "14", "(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)");
-    test(regex_15, "15", "(.?.?){2}", "xxx", "(0,3)(2,3)");
-    test(regex_16, "16", "(.?.?)(.?.?)(.?.?)", "xxx", "(0,3)(0,2)(2,3)(3,3)");
-    test(regex_17, "17", "(.?.?){3}", "xxx", "(0,3)(3,3)");
-    test(regex_18, "18", "(.?.?)*", "xxx", "(0,3)(2,3)");
-    test(regex_19, "19", "a?((ab)?)(b?)", "ab", "(0,2)(1,1)(?,?)(1,2)");
-    test(regex_20, "20", "(a?)((ab)?)b?", "ab", "(0,2)(0,1)(1,1)(?,?)");
-    test(regex_21, "21", "a?((ab)?)b?", "ab", "(0,2)(1,1)(?,?)");
-    test(regex_22, "22", "(a*){2}", "xxxxx", "(0,0)(0,0)");
-    test(regex_23, "23", "(ab?)(b?a)", "aba", "(0,3)(0,2)(2,3)");
-    test(regex_24, "24", "(a|ab)(ba|a)", "aba", "(0,3)(0,2)(2,3)");
-    test(regex_25, "25", "(a|ab|ba)", "aba", "(0,2)(0,2)");
-    test(regex_26, "26", "(a|ab|ba)(a|ab|ba)", "aba", "(0,3)(0,2)(2,3)");
-    test(regex_27, "27", "(a|ab|ba)*", "aba", "(0,3)(2,3)");
-    test(regex_28, "28", "(aba|a*b)", "ababa", "(0,3)(0,3)");
-    test(regex_29, "29", "(aba|a*b)(aba|a*b)", "ababa", "(0,5)(0,2)(2,5)");
-    test(regex_1029, "1029", "(aba|a*b)(aba|a*b)(aba|a*b)", "ababa", "NOMATCH");
-    test(regex_30, "30", "(aba|a*b)*", "ababa", "(0,5)(2,5)");
-    test(regex_31, "31", "(aba|ab|a)", "ababa", "(0,3)(0,3)");
-    test(regex_32, "32", "(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,5)");
-    test(regex_1032, "1032", "(aba|ab|a)(aba|ab|a)(aba|ab|a)", "ababa", "(0,5)(0,2)(2,4)(4,5)");
-    test(regex_33, "33", "(aba|ab|a)*", "ababa", "(0,5)(2,5)");
-    test(regex_34, "34", "(a(b)?)", "aba", "(0,2)(0,2)(1,2)");
-    test(regex_35, "35", "(a(b)?)(a(b)?)", "aba", "(0,3)(0,2)(1,2)(2,3)(?,?)");
-    test(regex_36, "36", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)");
-    test(regex_37, "37", "(.*)(.*)", "xx", "(0,2)(0,2)(2,2)");
-    test(regex_38, "38", ".*(.*)", "xx", "(0,2)(2,2)");
-    test(regex_39, "39", "(a.*z|b.*y)", "azbazby", "(0,5)(0,5)");
-    test(regex_40, "40", "(a.*z|b.*y)(a.*z|b.*y)", "azbazby", "(0,7)(0,5)(5,7)");
-    test(regex_41, "41", "(a.*z|b.*y)*", "azbazby", "(0,7)(5,7)");
-    test(regex_42, "42", "(.|..)(.*)", "ab", "(0,2)(0,2)(2,2)");
-    test(regex_43, "43", "((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)");
-    test(regex_44, "44", "((..)*(...)*)((..)*(...)*)", "xxx", "(0,3)(0,3)(?,?)(0,3)(3,3)(?,?)(?,?)");
-    test(regex_45, "45", "((..)*(...)*)*", "xxx", "(0,3)(0,3)(?,?)(0,3)");
-    test(regex_83, "83", "(aa(b(b))?)+", "aabbaa", "(0,6)(4,6)(?,?)(?,?)");
-    test(regex_84, "84", "(a(b)?)+", "aba", "(0,3)(2,3)(?,?)");
-    test(regex_85, "85", "([ab]+)([bc]+)([cd]*)", "abcd", "(0,4)(0,2)(2,3)(3,4)");
-    test(regex_90, "90", "^(A([^B]*))?(B(.*))?", "Aa", "(0,2)(0,2)(1,2)(?,?)(?,?)");
-    test(regex_91, "91", "^(A([^B]*))?(B(.*))?", "Bb", "(0,2)(?,?)(?,?)(0,2)(1,2)");
-    test(regex_110, "110", "(^){0,3}", "a", "(0,0)(0,0)");
-    test(regex_111, "111", "(\\$){0,3}", "a", "(0,0)(?,?)");
-    test(regex_112, "112", "(^){1,3}", "a", "(0,0)(0,0)");
-    test(regex_113, "113", "(\\$){1,3}", "a", "(1,1)(1,1)");
-    test(regex_200, "200", "((s^)|(s)|(^)|(\\$)|(^.))*", "searchme", "(0,1)(0,1)(?,?)(0,1)(?,?)(?,?)(?,?)");
-    test(regex_201, "201", "s(()|^)e", "searchme", "(0,2)(1,1)(1,1)");
-    test(regex_202, "202", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)");
-    test(regex_203, "203", "s(^|())e", "searchme", "(0,2)(1,1)(1,1)");
-    test(regex_204, "204", "s()?e", "searchme", "(0,2)(1,1)");
-    test(regex_205, "205", "s(^)?e", "searchme", "(0,2)(?,?)");
-    test(regex_206, "206", "((s)|(e)|(a))*", "searchme", "(0,3)(2,3)(?,?)(?,?)(2,3)");
-    test(regex_207, "207", "((s)|(e)|())*", "searchme", "(0,2)(1,2)(?,?)(1,2)(?,?)");
-    test(regex_208, "208", "((b*)|c(c*))*", "cbb", "(0,3)(1,3)(1,3)(?,?)");
-    test(regex_209, "209", "(yyy|(x?)){2,4}", "yyyyyy", "(0,6)(3,6)(?,?)");
-    test(regex_210, "210", "(\\$)|()", "xxx", "(0,0)(?,?)(0,0)");
-    test(regex_211, "211", "\\$()|^()", "ac\\n", "(0,0)(?,?)(0,0)");
-    test(regex_212, "212", "^()|\\$()", "ac\\n", "(0,0)(0,0)(?,?)");
-    test(regex_213, "213", "(\\$)?(.)", "__", "(0,1)(?,?)(0,1)");
-    test(regex_214, "214", "(.|()|())*", "c", "(0,1)(0,1)(?,?)(?,?)");
-    test(regex_215, "215", "((a)|(b)){2,}", "ab", "(0,2)(1,2)(?,?)(1,2)");
-    test(regex_216, "216", ".()|((.)?)", "NULL", "(0,0)(?,?)(0,0)(?,?)");
-    test(regex_217, "217", "(.|\\$){2,}", "xx", "(0,2)(1,2)");
-    test(regex_218, "218", "(.|\\$){2,2}", "xx", "(0,2)(1,2)");
-    test(regex_219, "219", "(.){2,}", "xx", "(0,2)(1,2)");
-    test(regex_220, "220", "(a|())(b|())(c|())", "abc", "(0,3)(0,1)(?,?)(1,2)(?,?)(2,3)(?,?)");
-    test(regex_230, "230", "ab()c|ab()c()", "abc", "(0,3)(2,2)(-1,-1)(-1,-1)");
-    test(regex_250, "250", "(b(c)|d(e))*", "bcde", "(0,4)(2,4)(-1,-1)(3,4)");
-    test(regex_251, "251", "(a(b)*)*", "aba", "(0,3)(2,3)(-1,-1)");
-    std::cout << std::endl;
-  }
 
 
 
@@ -1094,22 +1569,6 @@ template auto test(M const& regex, cpp2::in id, cpp2::i
 
 
 
-#line 942 "pure2-regex.cpp2"
-  auto test_osx_bsd_critical::run() const& -> void{
-    std::cout << "Running osx_bsd_critical:" << std::endl;
-    test(regex_1, "1", "(()|.)(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_M1, "M1", "(()|.)(b)", "ab", "(1,2)(1,1)(1,1)(1,2)");
-    test(regex_2, "2", "(()|[ab])(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_M2, "M2", "(()|[ab])(b)", "ab", "(1,2)(1,1)(1,1)(1,2)");
-    test(regex_3, "3", "(()|[ab])+b", "aaab", "(0,4)(2,3)(?,?)");
-    test(regex_M3, "M3", "(()|[ab])+b", "aaab", "(3,4)(3,3)(3,3)");
-    test(regex_11, "11", "(.|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_12, "12", "([ab]|())(b)", "ab", "(0,2)(0,1)(?,?)(1,2)");
-    test(regex_14, "14", "([ab]|())+b", "aaab", "(0,4)(2,3)(?,?)");
-    test(regex_M14, "M14", "([ab]|())+b", "aaab", "(0,4)(3,3)(3,3)");
-    test(regex_20, "20", "(.?)(b)", "ab", "(0,2)(0,1)(1,2)");
-    std::cout << std::endl;
-  }
 
 
 
@@ -1122,18 +1581,85 @@ template auto test(M const& regex, cpp2::in id, cpp2::i
 
 
 
-#line 958 "pure2-regex.cpp2"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 1279 "pure2-regex.cpp2"
 auto main(int const argc_, char** argv_) -> int{
     auto const args = cpp2::make_args(argc_, argv_); 
-#line 959 "pure2-regex.cpp2"
-    CPP2_UFCS(run)(test_basic3());
-    CPP2_UFCS(run)(test_class());
-    CPP2_UFCS(run)(test_left_assoc());
-    CPP2_UFCS(run)(test_right_assoc());
-    CPP2_UFCS(run)(test_forced_assoc());
-    CPP2_UFCS(run)(test_nullsub3());
-    CPP2_UFCS(run)(test_repetition2());
-    CPP2_UFCS(run)(test_totest());
-    CPP2_UFCS(run)(test_osx_bsd_critical());
+#line 1280 "pure2-regex.cpp2"
+    CPP2_UFCS(run)(test_perl_tests());
 }
 

From 4b463a6f7058702dbbb76ab9de42428313a42bd7 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 21 Feb 2024 09:19:49 +0100
Subject: [PATCH 059/161] Make regex generation public.

---
 source/reflect.h  | 2 +-
 source/reflect.h2 | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/reflect.h b/source/reflect.h
index b3b6c77227..42a15cf992 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -2075,7 +2075,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     for ( auto const& expr : expressions ) {
         auto regular_expression {::cpp2::regex::generate_template(expr.second.first, expr.second.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
 
-        CPP2_UFCS(add_member)(t, (cpp2::to_string(expr.first) + ": " + cpp2::to_string(regular_expression) + " = ();"));
+        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": " + cpp2::to_string(regular_expression) + " = ();"));
     }
 }
 
diff --git a/source/reflect.h2 b/source/reflect.h2
index 8323ab7610..0eead6d31e 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1442,7 +1442,7 @@ regex_gen: (inout t: meta::type_declaration) =
     for expressions do (expr) {
         regular_expression:= ::cpp2::regex::generate_template(expr.second.first, expr.second.second, :(message: _) = t$.error(message););
 
-        t.add_member("(expr.first)$: (regular_expression)$ = ();");
+        t.add_member("public (expr.first)$: (regular_expression)$ = ();");
     }
 }
 

From ab39d546dfdeff1029a1dae45a0638cdc96a73b9 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 1 Mar 2024 10:41:58 +0100
Subject: [PATCH 060/161] Performance fixes for greedy matching.

---
 source/regex.h2 | 32 ++++++++++++++------------------
 1 file changed, 14 insertions(+), 18 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 1b8bc0aa27..d4fab607e6 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -624,18 +624,11 @@ named_string_start:  type == named_matcher_logic type = {
 
     match:  (cur: Iter, inout ctx, tail) -> _ = {
-        count: int;
-        r := match_min_count(cur, ctx, out count);
-        if r.matched {
-            if greedy {
-                return match_greedy(count, r.pos, r.pos, ctx, tail);
-            }
-            else {
-                return match_not_greedy(count, r.pos, ctx, tail);
-            }
+        if greedy {
+            return match_greedy(0, cur, cur, ctx, tail);
         }
         else {
-            return r;
+            return match_not_greedy(cur, ctx, tail);
         }
     }
 
@@ -683,7 +676,7 @@ range_matcher_logic:  (cur: Iter, inout ctx, out count_r: int) -> _ = {
+    private match_min_count:  (cur: Iter, inout ctx, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
         res := match_return(true, cur);
         count := 0;
 
@@ -699,10 +692,9 @@ range_matcher_logic:  (count: int, cur: Iter, last_valid: Iter, inout ctx, _ : Other) -> match_return = {
-
-        r := M::match(cur, ctx, no_tail());
-
-        if is_below_upper_bound(count) && r.matched && r.pos != cur
+        r:= M::match(cur, ctx, no_tail());
+        if  is_below_upper_bound(count) && r.matched &&
+            (is_below_lower_bound(count) || r.pos != cur)
         {
             inner := match_greedy(count + 1, r.pos, cur, ctx, Other());
 
@@ -729,10 +721,14 @@ range_matcher_logic:  (c: int, cur: Iter, inout ctx, _ : Other) -> match_return = {
-        count := c;
-        pos := cur;
+    private match_not_greedy:  (cur: Iter, inout ctx, _ : Other) -> match_return = {
+        count := 0;
+        start := match_min_count(cur, ctx, count);
+        if !start.matched {
+          return start;
+        }
 
+        pos := start.pos;
         while is_below_upper_bound(count) {
             o:= Other::match(pos, ctx);
             if o.matched {

From 77c36d05f5cc41dc143f27faa8d7696ad1f79f10 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 1 Mar 2024 10:46:36 +0100
Subject: [PATCH 061/161] Added modifiers to matching logic.

---
 source/regex.h2 | 134 +++++++++++++++++++++++++-----------------------
 1 file changed, 70 insertions(+), 64 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index d4fab607e6..4b3c38202d 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -44,7 +44,7 @@ match_return: @struct  type = {
     pos: Iter = ();
 }
 
-match_context:  type =
+match_context:  type =
 {
     public begin: Iter;
     public end: Iter;
@@ -110,6 +110,11 @@ match_context: 
 
         return r;
     }
+}
+
+match_modifiers:  type = {
+
+    flags : int == flags_;
 
     // Flag management
     //
@@ -125,14 +130,14 @@ match_context: 
 //  Otherwise the matcher can try a different alternative.
 //
 matcher_list:  type = {
-    match: (cur, inout ctx) match_select(cur, ctx);
+    match: (cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
 
-    match:  (cur, inout ctx, _: matcher_list)
-        match_select(cur, ctx);
+    match:  (cur, inout ctx, modifiers, _: matcher_list)
+        match_select(cur, ctx, modifiers);
 
-    private match_select:  (cur, inout ctx)
-        First::match(cur, ctx, matcher_list());
-    private match_select: (cur, inout ctx) match_return(true, cur);
+    private match_select:  (cur, inout ctx, modifiers)
+        First::match(cur, ctx, modifiers, matcher_list());
+    private match_select: (cur, inout ctx, modifiers) match_return(true, cur);
 
     reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
     to_string: () (bstring() + ... + List::to_string());
@@ -247,8 +252,8 @@ short_not_word_class       :  type == negated_class_entry type = {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
-        r := Other::match(cur, ctx);
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+        r := Other::match(cur, ctx, modifiers);
         if r.matched {
             ctx.set_alternative_pos(alternative, cur);
         }
@@ -265,38 +270,38 @@ extract_position_helper:  type = {
 //
 alternative_matcher_logic:  type = {
 
-    match:  (cur, inout ctx, tail: Tail) -> _ = {
+    match:  (cur, inout ctx, modifiers, tail: Tail) -> _ = {
         if constexpr greedy_alternative {
             max_overall_length: = 0;
             max_current_length: = 0;
-            r := match_greedy(cur, max_overall_length, max_current_length, ctx, tail);
+            r := match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
             _ = max_overall_length;
             _ = max_current_length;
             return r;
         } else {
-            return match_first(cur, ctx, tail);
+            return match_first(cur, ctx, modifiers, tail);
         }
     }
     reset_ranges: (inout ctx)     = (List::reset_ranges(ctx) , ...);
     to_string: ()                   (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'.
 
-    private match_first:  (cur, inout ctx, tail) -> _ = {
-        r := First::match(cur, ctx, tail);
+    private match_first:  (cur, inout ctx, modifiers, tail) -> _ = {
+        r := First::match(cur, ctx, modifiers, tail);
         if r.matched {
             return r;
         } else {
             First::reset_ranges(ctx);
 
             if constexpr 0 != sizeof...(Next) {
-                return match_first(cur, ctx, tail);
+                return match_first(cur, ctx, modifiers, tail);
             } else {
                 return match_return(false, ctx.end);
             }
         }
     }
 
-    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, _: Tail) -> _ = {
-        r := First::match(cur, ctx, Tail::prepend(extract_position_helper()));
+    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, modifiers, _: Tail) -> _ = {
+        r := First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()));
 
         // Get the end position of First.
         end_overall_pos := cur;
@@ -314,7 +319,7 @@ alternative_matcher_logic:  type = {
         // Check if someone other has something larker
         o := match_return(false, ctx.end);
         if constexpr 0 != sizeof...(Next) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, Tail());
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, Tail());
         }
 
         my_current_length := unsafe_narrow(std::distance(cur, end_current_pos));
@@ -328,7 +333,7 @@ alternative_matcher_logic:  type = {
             if my_current_length == max_current_length {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx) , ...); // Reset all other ranges.
-                return First::match(cur, ctx, Tail::prepend(extract_position_helper()));
+                return First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()));
             }
             else {
                 // We are not, so there was an other match.
@@ -349,9 +354,9 @@ alternative_matcher_logic:  type = {
 //
 any_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
         if cur != ctx.end {
-            return Other::match(cur + 1, ctx);
+            return Other::match(cur + 1, ctx, modifiers);
         } else {
             return match_return(false, ctx.end);
         }
@@ -365,10 +370,10 @@ any_matcher_logic:  type =
 //
 char_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
-        if ctx.has_flag(expression_flags::case_insensitive) {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+        if modifiers.has_flag(expression_flags::case_insensitive) {
             if cur != ctx.end && (cur* == L || cur* == U) {
-                return Other::match(cur + 1, ctx);
+                return Other::match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -376,7 +381,7 @@ char_matcher_logic:  type =
         }
         else {
             if cur != ctx.end && cur* == C {
-                return Other::match(cur + 1, ctx);
+                return Other::match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -393,10 +398,10 @@ char_matcher_logic:  type =
 //
 class_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
-        if ctx.has_flag(expression_flags::case_insensitive) {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+        if modifiers.has_flag(expression_flags::case_insensitive) {
             if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
-                return Other::match(cur + 1, ctx);
+                return Other::match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -404,7 +409,7 @@ class_matcher_logic:  type =
         }
         else {
             if cur != ctx.end && negate != match_any(cur*) {
-                return Other::match(cur + 1, ctx);
+                return Other::match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -441,7 +446,7 @@ class_matcher_logic:  type =
 // Regex syntax: none Example: -
 //
 empty_matcher_logic:  type = {
-    match:  (cur, inout ctx, _ : Other) Other::match(cur, ctx);
+    match:  (cur, inout ctx, modifiers, _ : Other) Other::match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
     to_string: () bstring();
 }
@@ -458,9 +463,9 @@ escaped_char_matcher_logic:  type =
 // Regex syntax: \K Example: \K
 //
 global_group_reset:  type = {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
         ctx.set_group_start(0, cur);
-        return Other::match(cur, ctx);
+        return Other::match(cur, ctx, modifiers);
     }
 
     reset_ranges: (inout ctx) = {}
@@ -470,9 +475,9 @@ global_group_reset:  type = {
 // Regex syntax: () Example: (.*)
 //
 group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
         ctx.set_group_start(group, cur);
-        return Other::match(cur, ctx);
+        return Other::match(cur, ctx, modifiers);
     }
 
     reset_ranges: (inout ctx) = ctx.set_group_invalid(group);
@@ -493,9 +498,9 @@ group_matcher_start_logic:  type = {
 }
 
 group_matcher_end_logic:  type = {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
         ctx.set_group_end(group, cur);
-        r := Other::match(cur, ctx);
+        r := Other::match(cur, ctx, modifiers);
         if !r.matched {
             ctx.set_group_invalid(group);
         }
@@ -517,13 +522,13 @@ group_matcher_end_logic:  type = {
 // Regex syntax: \  Example: \1
 //
 group_ref_matcher_logic:  type = {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
         g := ctx.get_group(group);
 
         pos := cur;
         group_pos := g.start;
         while group_pos != g.end && pos != ctx.end next (group_pos++, pos++) {
-            if ctx.has_flag(expression_flags::case_insensitive) {
+            if modifiers.has_flag(expression_flags::case_insensitive) {
                 if safe_tolower(group_pos*) != safe_tolower(pos*) {
                     return match_return(false, ctx.end);
                 }
@@ -536,7 +541,7 @@ group_ref_matcher_logic:  type = {
         }
 
         if group_pos == g.end {
-            return Other::match(pos, ctx);
+            return Other::match(pos, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -553,12 +558,12 @@ group_ref_matcher_logic:  type = {
 //
 line_end_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
         if cur == ctx.end || (match_new_line && cur* == '\n') {
-            return Other::match(cur, ctx);
+            return Other::match(cur, ctx, modifiers);
         }
         else if !match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special cas for new line at end.
-            return Other::match(cur, ctx);
+            return Other::match(cur, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -575,9 +580,9 @@ line_end_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
         if cur == ctx.begin || (match_new_line && (cur - 1)* == '\n') {
-            return Other::match(cur, ctx);
+            return Other::match(cur, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -623,12 +628,12 @@ named_string_start:  type == named_matcher_logic{min, max}  Example: a{2,4}
 range_matcher_logic:  type = {
 
-    match:  (cur: Iter, inout ctx, tail) -> _ = {
+    match:  (cur: Iter, inout ctx, modifiers, tail) -> _ = {
         if greedy {
-            return match_greedy(0, cur, cur, ctx, tail);
+            return match_greedy(0, cur, cur, ctx, modifiers, tail);
         }
         else {
-            return match_not_greedy(cur, ctx, tail);
+            return match_not_greedy(cur, ctx, modifiers, tail);
         }
     }
 
@@ -676,12 +681,12 @@ range_matcher_logic:  (cur: Iter, inout ctx, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
+    private match_min_count:  (cur: Iter, inout ctx, modifiers, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
         res := match_return(true, cur);
         count := 0;
 
         while is_below_lower_bound(count) && res.matched {
-            res = M::match(res.pos, ctx, no_tail());
+            res = M::match(res.pos, ctx, modifiers, no_tail());
             if res.matched {
                 count += 1;
             }
@@ -691,12 +696,12 @@ range_matcher_logic:  (count: int, cur: Iter, last_valid: Iter, inout ctx, _ : Other) -> match_return = {
-        r:= M::match(cur, ctx, no_tail());
+    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, _ : Other) -> match_return = {
+        r:= M::match(cur, ctx, modifiers, no_tail());
         if  is_below_upper_bound(count) && r.matched &&
             (is_below_lower_bound(count) || r.pos != cur)
         {
-            inner := match_greedy(count + 1, r.pos, cur, ctx, Other());
+            inner := match_greedy(count + 1, r.pos, cur, ctx, modifiers, Other());
 
             if possessive ||  // Do not backtrack if possessive.
                inner.matched {
@@ -706,12 +711,12 @@ range_matcher_logic: ());
+                _ = M::match(last_valid, ctx, modifiers, no_tail());
             }
 
             return o;
@@ -721,21 +726,21 @@ range_matcher_logic:  (cur: Iter, inout ctx, _ : Other) -> match_return = {
+    private match_not_greedy:  (cur: Iter, inout ctx, modifiers, _ : Other) -> match_return = {
         count := 0;
-        start := match_min_count(cur, ctx, count);
+        start := match_min_count(cur, ctx, modifiers, count);
         if !start.matched {
           return start;
         }
 
         pos := start.pos;
         while is_below_upper_bound(count) {
-            o:= Other::match(pos, ctx);
+            o:= Other::match(pos, ctx, modifiers);
             if o.matched {
                 return o;
             }
 
-            r:= M::match(pos, ctx, no_tail());
+            r:= M::match(pos, ctx, modifiers, no_tail());
             if !r.matched {
                 return match_return(false, ctx.end);
             }
@@ -743,7 +748,7 @@ range_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _: Other) -> _ = {
+    match:  (cur, inout ctx, modifiers, _: Other) -> _ = {
         words : word_class = ();
         is_match := false;
         if cur == ctx.begin { // String start
@@ -792,7 +797,7 @@ word_boundary_matcher_logic:  type =
         }
 
         if is_match{
-            return Other::match(cur, ctx);
+            return Other::match(cur, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -838,7 +843,8 @@ group_name_list_end: type = {
 // Regular expression implementation
 regular_expression:  type = {
 
-    context:  type == match_context;
+    context:  type == match_context;
+    modifiers: type == match_modifiers;
 
     private get_iter: (str: view, pos) -> _ = {
         if pos < str.size() {
@@ -883,7 +889,7 @@ regular_expression:  (in this, start: Iter, end: Iter) -> search_return = {
         ctx: context = (start, end);
 
-        r := Matcher::match(start, ctx);
+        r := Matcher::match(start, ctx, modifiers());
         return search_return(r.matched && r.pos == end, ctx);
     }
 
@@ -896,7 +902,7 @@ regular_expression: 
Date: Fri, 1 Mar 2024 12:47:01 +0100
Subject: [PATCH 062/161] Added (?) notation.

---
 include/cpp2regex.h | 1036 +++++++++++++++++++++++++------------------
 source/regex.h2     |  165 +++++--
 2 files changed, 729 insertions(+), 472 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 2da37f624a..f3f9996380 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,136 +10,142 @@
 
 #line 1 "regex.h2"
 
-#line 15 "regex.h2"
+#line 25 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 31 "regex.h2"
+#line 41 "regex.h2"
 class expression_flags;
     
 
-#line 35 "regex.h2"
+#line 45 "regex.h2"
 template class match_group;
     
 
-#line 42 "regex.h2"
+#line 52 "regex.h2"
 template class match_return;
     
 
-#line 47 "regex.h2"
-template class match_context;
+#line 57 "regex.h2"
+template class match_context;
 
-#line 127 "regex.h2"
+#line 125 "regex.h2"
+template class match_modifiers;
+
+#line 164 "regex.h2"
 template class matcher_list;
     
 
-#line 154 "regex.h2"
+#line 191 "regex.h2"
 template class single_class_entry;
 
-#line 162 "regex.h2"
+#line 199 "regex.h2"
 template class range_class_entry;
 
-#line 170 "regex.h2"
+#line 207 "regex.h2"
 template class combined_class_entry;
     
 
-#line 177 "regex.h2"
+#line 214 "regex.h2"
 template class list_class_entry;
     
 
-#line 184 "regex.h2"
+#line 221 "regex.h2"
 template class named_class_entry;
     
 
-#line 189 "regex.h2"
+#line 226 "regex.h2"
 template class negated_class_entry;
     
 
-#line 196 "regex.h2"
+#line 233 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 249 "regex.h2"
+#line 286 "regex.h2"
 template class extract_position_helper;
     
 
-#line 266 "regex.h2"
+#line 303 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 350 "regex.h2"
+#line 387 "regex.h2"
 template class any_matcher_logic;
 
-#line 366 "regex.h2"
+#line 403 "regex.h2"
 template class char_matcher_logic;
 
-#line 394 "regex.h2"
+#line 431 "regex.h2"
 template class class_matcher_logic;
 
-#line 443 "regex.h2"
+#line 480 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 451 "regex.h2"
+#line 488 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 460 "regex.h2"
+#line 497 "regex.h2"
 template class global_group_reset;
     
 
-#line 472 "regex.h2"
+#line 509 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 495 "regex.h2"
-template class group_matcher_end_logic;
+#line 532 "regex.h2"
+template class group_matcher_end_logic;
     
 
-#line 519 "regex.h2"
+#line 556 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 554 "regex.h2"
+#line 591 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 576 "regex.h2"
+#line 613 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 594 "regex.h2"
+#line 630 "regex.h2"
+template class modifier_matcher_logic;
+
+#line 645 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 598 "regex.h2"
+#line 649 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 624 "regex.h2"
+#line 675 "regex.h2"
 template class range_matcher_logic;
 
-#line 756 "regex.h2"
+#line 803 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 775 "regex.h2"
+#line 822 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 826 "regex.h2"
+#line 873 "regex.h2"
 template class group_name_list;
 
-#line 838 "regex.h2"
+#line 885 "regex.h2"
 class group_name_list_end;
     
 
-#line 843 "regex.h2"
+#line 890 "regex.h2"
 template class regular_expression;
 
-#line 926 "regex.h2"
+#line 974 "regex.h2"
 class regex_parser_state;
 
-#line 958 "regex.h2"
+#line 1008 "regex.h2"
 template class regex_parser;
 
-#line 1600 "regex.h2"
+#line 1708 "regex.h2"
 }
 }
 
@@ -161,7 +167,17 @@ template class regex_parser;
 
 #include 
 
-#line 15 "regex.h2"
+template
+inline decltype(auto) pop_mod (Modifier& modifier) {
+    if constexpr (do_pop) {
+        return Modifier::pop();
+    }
+    else {
+        return modifier;
+    }
+}
+
+#line 25 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -185,7 +201,7 @@ class expression_flags {
     public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(expression_flags const&) -> void = delete;
 };
-#line 34 "regex.h2"
+#line 44 "regex.h2"
 
 template class match_group {
     public: Iter start {}; 
@@ -199,7 +215,7 @@ template class match_return {
     public: Iter pos {}; 
 };
 
-template class match_context
+template class match_context
  {
     public: Iter begin; 
     public: Iter end; 
@@ -209,13 +225,13 @@ template match_context& ;
-#line 60 "regex.h2"
+#line 70 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 60 "regex.h2"
+#line 70 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -224,19 +240,19 @@ template std::string;
 
-#line 72 "regex.h2"
+#line 82 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
 
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 80 "regex.h2"
+#line 90 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 84 "regex.h2"
+#line 94 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 88 "regex.h2"
+#line 98 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -245,18 +261,41 @@ template void;
 
-#line 98 "regex.h2"
+#line 108 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 114 "regex.h2"
+#line 123 "regex.h2"
+};
+
+template class match_modifiers {
+
+    public: static const int flags;
+
+    // Push/pop management
+
+    private: [[nodiscard]] constexpr static auto combine_inner(cpp2::in reset, cpp2::in add, cpp2::in remove) -> auto;
+
+#line 142 "regex.h2"
+    public: template [[nodiscard]] static auto combine(
+            [[maybe_unused]] Reset const& unnamed_param_1, 
+            [[maybe_unused]] Add const& unnamed_param_2, 
+            [[maybe_unused]] Remove const& unnamed_param_3) -> auto;
+
+#line 149 "regex.h2"
+    public: [[nodiscard]] static auto pop() -> auto;
+
     // Flag management
     //
 
-    public: [[nodiscard]] static auto has_flag(cpp2::in f) -> bool;
+    public: [[nodiscard]] auto has_flag(cpp2::in f) const& -> bool;
+    public: match_modifiers() = default;
+    public: match_modifiers(match_modifiers const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(match_modifiers const&) -> void = delete;
 
-#line 120 "regex.h2"
+
+#line 157 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -265,14 +304,14 @@ template class matcher_list {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto;
 
-#line 133 "regex.h2"
-    private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
+#line 170 "regex.h2"
+    private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
-    private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx) -> auto;
+    private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -282,7 +321,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 141 "regex.h2"
+#line 178 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -304,7 +343,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 158 "regex.h2"
+#line 195 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -317,7 +356,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 166 "regex.h2"
+#line 203 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -329,7 +368,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 173 "regex.h2"
+#line 210 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -341,7 +380,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 180 "regex.h2"
+#line 217 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 187 "regex.h2"
+#line 224 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -363,7 +402,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 192 "regex.h2"
+#line 229 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -375,10 +414,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 199 "regex.h2"
+#line 236 "regex.h2"
 };
 
-#line 202 "regex.h2"
+#line 239 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -409,7 +448,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 233 "regex.h2"
+#line 270 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -423,20 +462,20 @@ template                      using short_not_word_class = negat
 //-----------------------------------------------------------------------
 //
 
-#line 247 "regex.h2"
+#line 284 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 258 "regex.h2"
+#line 295 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 260 "regex.h2"
+#line 297 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -445,67 +484,67 @@ template class extract_position_helper {
 //
 template class alternative_matcher_logic {
 
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Tail const& tail) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto;
 
-#line 280 "regex.h2"
+#line 317 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
-    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& tail) -> auto;
+    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 298 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto;
+#line 335 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 346 "regex.h2"
+#line 383 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 template class any_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 360 "regex.h2"
+#line 397 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 362 "regex.h2"
+#line 399 "regex.h2"
 };
 
 // Regex syntax:   Example: a
 //
 template class char_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 387 "regex.h2"
+#line 424 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 389 "regex.h2"
+#line 426 "regex.h2"
 };
 
-#line 392 "regex.h2"
+#line 429 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 415 "regex.h2"
+#line 452 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 427 "regex.h2"
+#line 464 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -514,20 +553,20 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 439 "regex.h2"
+#line 476 "regex.h2"
 };
 
 // Regex syntax: none Example: -
 //
 template class empty_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: empty_matcher_logic() = default;
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 447 "regex.h2"
+#line 484 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -535,36 +574,36 @@ template class empty_matcher_logic {
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 455 "regex.h2"
+#line 492 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 456 "regex.h2"
+#line 493 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
 //
 template class global_group_reset {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 466 "regex.h2"
+#line 503 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 468 "regex.h2"
+#line 505 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
 //
 template class group_matcher_start_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 478 "regex.h2"
+#line 515 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -573,13 +612,13 @@ template class group_matcher_start
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 493 "regex.h2"
+#line 530 "regex.h2"
 };
 
-template class group_matcher_end_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+template class group_matcher_end_logic {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 505 "regex.h2"
+#line 542 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -588,22 +627,22 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 515 "regex.h2"
+#line 552 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
 //
 template class group_ref_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 546 "regex.h2"
+#line 583 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 548 "regex.h2"
+#line 585 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -612,16 +651,16 @@ template class group_ref_matcher
 //
 template class line_end_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 568 "regex.h2"
+#line 605 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 570 "regex.h2"
+#line 607 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -630,16 +669,32 @@ template cl
 //
 template class line_start_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 587 "regex.h2"
+#line 624 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 589 "regex.h2"
+#line 626 "regex.h2"
+};
+
+// Regex syntax: (?)  Example: (?i)
+//
+template class modifier_matcher_logic
+ {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+
+#line 638 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: modifier_matcher_logic() = default;
+    public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(modifier_matcher_logic const&) -> void = delete;
+
+#line 640 "regex.h2"
 };
 
 // Named character classes
@@ -652,7 +707,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 597 "regex.h2"
+#line 648 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -660,7 +715,7 @@ template                    void = delete;
 
 
-#line 600 "regex.h2"
+#line 651 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -670,7 +725,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 610 "regex.h2"
+#line 661 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -682,40 +737,40 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 623 "regex.h2"
+#line 674 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
-    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& tail) -> auto;
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 642 "regex.h2"
+#line 686 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 670 "regex.h2"
+#line 714 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 675 "regex.h2"
+#line 719 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 680 "regex.h2"
+#line 724 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 686 "regex.h2"
-    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, cpp2::out count_r) -> auto;
+#line 730 "regex.h2"
+    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 701 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
+#line 745 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return;
 
-#line 732 "regex.h2"
-    private: template [[nodiscard]] static auto match_not_greedy(cpp2::in c, Iter const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
+#line 775 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 752 "regex.h2"
+#line 799 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -728,7 +783,7 @@ template void = delete;
 
 
-#line 769 "regex.h2"
+#line 816 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -737,9 +792,9 @@ template class word_boundary_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 806 "regex.h2"
+#line 853 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -747,10 +802,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 814 "regex.h2"
+#line 861 "regex.h2"
 };
 
-#line 817 "regex.h2"
+#line 864 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -768,7 +823,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 836 "regex.h2"
+#line 883 "regex.h2"
 };
 
 class group_name_list_end {
@@ -777,17 +832,18 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 840 "regex.h2"
+#line 887 "regex.h2"
 };
 
 // Regular expression implementation
 template class regular_expression {
 
-    public: template using context = match_context;
+    public: template using context = match_context;
+    public: using modifiers = match_modifiers;
 
     private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
 
-#line 856 "regex.h2"
+#line 904 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -795,7 +851,7 @@ template matched_, context const& ctx_);
 
-#line 866 "regex.h2"
+#line 914 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -810,7 +866,7 @@ template void = delete;
 
 
-#line 882 "regex.h2"
+#line 930 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -818,19 +874,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 894 "regex.h2"
+#line 942 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 916 "regex.h2"
+#line 964 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 917 "regex.h2"
+#line 965 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -848,21 +904,23 @@ class regex_parser_state {
     /// List of alternate matcher lists. E.g. ab|cd|xy
     public: std::vector> alternate_match_lists {}; 
 
+    public: bool has_modifiers {false}; 
+
     public: auto next_alternative() & -> void;
 
-#line 940 "regex.h2"
+#line 990 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 945 "regex.h2"
+#line 995 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 954 "regex.h2"
+#line 1004 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 958 "regex.h2"
+#line 1008 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -883,96 +941,99 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 982 "regex.h2"
+#line 1032 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 990 "regex.h2"
+#line 1040 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 994 "regex.h2"
+#line 1044 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 1009 "regex.h2"
+#line 1059 "regex.h2"
     public: [[nodiscard]] auto peek() & -> char;
 
-#line 1018 "regex.h2"
+#line 1068 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 1033 "regex.h2"
+#line 1083 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1053 "regex.h2"
+#line 1103 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1060 "regex.h2"
+#line 1110 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1067 "regex.h2"
+#line 1117 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1090 "regex.h2"
+#line 1140 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 1100 "regex.h2"
+#line 1150 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 1112 "regex.h2"
+#line 1162 "regex.h2"
+    public: [[nodiscard]] auto parse_modifiers(cpp2::in modifier_change, cpp2::out modifier_reset, cpp2::out modifier_add, cpp2::out modifier_remove) & -> bool;
+
+#line 1194 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1122 "regex.h2"
+#line 1204 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1135 "regex.h2"
+#line 1217 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1143 "regex.h2"
+#line 1225 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1263 "regex.h2"
+#line 1345 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1374 "regex.h2"
+#line 1456 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1415 "regex.h2"
+#line 1523 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1424 "regex.h2"
+#line 1532 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1498 "regex.h2"
+#line 1606 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1535 "regex.h2"
+#line 1643 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1558 "regex.h2"
+#line 1666 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1577 "regex.h2"
+#line 1685 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1591 "regex.h2"
+#line 1699 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1600 "regex.h2"
+#line 1708 "regex.h2"
 }
 }
 
@@ -981,93 +1042,93 @@ template [[nodiscard]] auto generate_template(cpp2::in match_context::match_context(Iter const& begin_, Iter const& end_)
+#line 65 "regex.h2"
+    template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 58 "regex.h2"
+#line 68 "regex.h2"
     }
 
-#line 60 "regex.h2"
-    template  match_context::match_context(match_context const& that)
+#line 70 "regex.h2"
+    template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 60 "regex.h2"
-    template  auto match_context::operator=(match_context const& that) -> match_context& {
+#line 70 "regex.h2"
+    template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 60 "regex.h2"
-    template  match_context::match_context(match_context&& that) noexcept
+#line 70 "regex.h2"
+    template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 60 "regex.h2"
-    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
+#line 70 "regex.h2"
+    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
                                    groups = std::move(that).groups;
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 64 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
+#line 74 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 66 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
+#line 76 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::cmp_greater_eq(group,max_groups)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 72 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
-#line 73 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
+#line 82 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
+#line 83 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
 
-#line 75 "regex.h2"
-    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
+#line 85 "regex.h2"
+    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 80 "regex.h2"
-    template  auto match_context::set_group_invalid(auto const& group) & -> void{
+#line 90 "regex.h2"
+    template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 84 "regex.h2"
-    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
+#line 94 "regex.h2"
+    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 88 "regex.h2"
-    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
+#line 98 "regex.h2"
+    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 92 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
+#line 102 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 94 "regex.h2"
-    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
+#line 104 "regex.h2"
+    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 100 "regex.h2"
-    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
+#line 110 "regex.h2"
+    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
             if (cur.matched) {
@@ -1081,116 +1142,142 @@ namespace regex {
         return r; 
     }
 
-#line 117 "regex.h2"
-    template  [[nodiscard]] auto match_context::has_flag(cpp2::in f) -> bool{
+#line 127 "regex.h2"
+    template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
+
+#line 131 "regex.h2"
+    template  [[nodiscard]] constexpr auto match_modifiers::combine_inner(cpp2::in reset, cpp2::in add, cpp2::in remove) -> auto{
+        auto new_flags {flags}; 
+        if (reset) {
+            new_flags = 0;
+        }
+        new_flags = new_flags | add;
+        new_flags = new_flags & (~remove);
+
+        return new_flags; 
+    }
+
+#line 142 "regex.h2"
+    template  template [[nodiscard]] auto match_modifiers::combine(
+            [[maybe_unused]] Reset const& unnamed_param_1, 
+            [[maybe_unused]] Add const& unnamed_param_2, 
+            [[maybe_unused]] Remove const& unnamed_param_3) -> auto{
+        return match_modifiers>(); 
+    }
+
+#line 149 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner();  }
+
+#line 154 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 128 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx) -> auto { return match_select(cur, ctx);  }
+#line 165 "regex.h2"
+    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 130 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, [[maybe_unused]] matcher_list const& unnamed_param_3) -> auto { 
-        return match_select(cur, ctx);  }
+#line 167 "regex.h2"
+    template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto { 
+        return match_select(cur, ctx, modifiers);  }
 
-#line 133 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { 
-        return First::match(cur, ctx, matcher_list());  }
-#line 135 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx) -> auto { return match_return(true, cur);  }
+#line 170 "regex.h2"
+    template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { 
+        return First::match(cur, ctx, modifiers, matcher_list());  }
+#line 172 "regex.h2"
+    template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_return(true, cur);  }
 
-#line 137 "regex.h2"
+#line 174 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 138 "regex.h2"
+#line 175 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 140 "regex.h2"
+#line 177 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 156 "regex.h2"
+#line 193 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 157 "regex.h2"
+#line 194 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 164 "regex.h2"
+#line 201 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 165 "regex.h2"
+#line 202 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 171 "regex.h2"
+#line 208 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 172 "regex.h2"
+#line 209 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 178 "regex.h2"
+#line 215 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 179 "regex.h2"
+#line 216 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 185 "regex.h2"
+#line 222 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 186 "regex.h2"
+#line 223 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 191 "regex.h2"
+#line 228 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 197 "regex.h2"
+#line 234 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 198 "regex.h2"
+#line 235 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 250 "regex.h2"
-    template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        auto r {Other::match(cur, ctx)}; 
+#line 287 "regex.h2"
+    template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+        auto r {Other::match(cur, ctx, modifiers)}; 
         if (r.matched) {
             CPP2_UFCS(set_alternative_pos)(ctx, alternative, cur);
         }
         return r; 
     }
 
-#line 258 "regex.h2"
+#line 295 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 259 "regex.h2"
+#line 296 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 268 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, Tail const& tail) -> auto{
+#line 305 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
             auto max_current_length {0}; 
-            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, tail)}; 
+            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail)}; 
             static_cast(std::move(max_overall_length));
             static_cast(std::move(max_current_length));
             return r; 
         }else {
-            return match_first(cur, ctx, tail); 
+            return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 280 "regex.h2"
+#line 317 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 281 "regex.h2"
+#line 318 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 283 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& tail) -> auto{
-        auto r {First::match(cur, ctx, tail)}; 
+#line 320 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        auto r {First::match(cur, ctx, modifiers, tail)}; 
         if (r.matched) {
             return r; 
         }else {
             First::reset_ranges(ctx);
 
             if constexpr (0 != sizeof...(Next)) {
-                return match_first(cur, ctx, tail); 
+                return match_first(cur, ctx, modifiers, tail); 
             }else {
                 return match_return(false, ctx.end); 
             }
         }
     }
 
-#line 298 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, [[maybe_unused]] Tail const& unnamed_param_5) -> auto{
-        auto r {First::match(cur, ctx, Tail::prepend(extract_position_helper()))}; 
+#line 335 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto{
+        auto r {First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()))}; 
 
         // Get the end position of First.
         auto end_overall_pos {cur}; 
@@ -1204,11 +1291,11 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 314 "regex.h2"
+#line 351 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, Tail());
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, Tail());
         }
 
         auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; 
@@ -1216,13 +1303,13 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 326 "regex.h2"
+#line 363 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx), ...);  // Reset all other ranges.
-                return First::match(cur, ctx, Tail::prepend(extract_position_helper())); 
+                return First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper())); 
             }
             else {
                 // We are not, so there was an other match.
@@ -1238,25 +1325,25 @@ namespace regex {
         }
     }
 
-#line 352 "regex.h2"
-    template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 389 "regex.h2"
+    template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur != ctx.end) {
-            return Other::match(cur + 1, ctx); 
+            return Other::match(cur + 1, ctx, modifiers); 
         }else {
             return match_return(false, ctx.end); 
         }
     }
 
-#line 360 "regex.h2"
+#line 397 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 361 "regex.h2"
+#line 398 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 368 "regex.h2"
-    template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
+#line 405 "regex.h2"
+    template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
-                return Other::match(cur + 1, ctx); 
+                return Other::match(cur + 1, ctx, modifiers); 
             }
             else {
                 return match_return(false, ctx.end); 
@@ -1264,7 +1351,7 @@ namespace regex {
         }
         else {
             if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
-                return Other::match(cur + 1, ctx); 
+                return Other::match(cur + 1, ctx, modifiers); 
             }
             else {
                 return match_return(false, ctx.end); 
@@ -1272,16 +1359,16 @@ namespace regex {
         }
 
     }
-#line 387 "regex.h2"
+#line 424 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 388 "regex.h2"
+#line 425 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 396 "regex.h2"
-    template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
-        if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
+#line 433 "regex.h2"
+    template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
-                return Other::match(cur + 1, ctx); 
+                return Other::match(cur + 1, ctx, modifiers); 
             }
             else {
                 return match_return(false, ctx.end); 
@@ -1289,7 +1376,7 @@ namespace regex {
         }
         else {
             if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
-                return Other::match(cur + 1, ctx); 
+                return Other::match(cur + 1, ctx, modifiers); 
             }
             else {
                 return match_return(false, ctx.end); 
@@ -1297,7 +1384,7 @@ namespace regex {
         }
     }
 
-#line 415 "regex.h2"
+#line 452 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1310,10 +1397,10 @@ namespace regex {
         return r; 
     }
 
-#line 427 "regex.h2"
+#line 464 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 429 "regex.h2"
+#line 466 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1325,37 +1412,37 @@ namespace regex {
         return r; 
     }
 
-#line 444 "regex.h2"
-    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto { return Other::match(cur, ctx);  }
-#line 445 "regex.h2"
+#line 481 "regex.h2"
+    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
+#line 482 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 446 "regex.h2"
+#line 483 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
 
-#line 455 "regex.h2"
+#line 492 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 461 "regex.h2"
-    template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 498 "regex.h2"
+    template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
-        return Other::match(cur, ctx); 
+        return Other::match(cur, ctx, modifiers); 
     }
 
-#line 466 "regex.h2"
+#line 503 "regex.h2"
     template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
-#line 467 "regex.h2"
+#line 504 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
 
-#line 473 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 510 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_start)(ctx, group, cur);
-        return Other::match(cur, ctx); 
+        return Other::match(cur, ctx, modifiers); 
     }
 
-#line 478 "regex.h2"
+#line 515 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 480 "regex.h2"
+#line 517 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1370,21 +1457,21 @@ namespace regex {
         }
     }
 
-#line 496 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 533 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_end)(ctx, group, cur);
-        auto r {Other::match(cur, ctx)}; 
+        auto r {Other::match(cur, ctx, pop_mod(modifiers))}; 
         if (!(r.matched)) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
         return r; 
     }
 
-#line 505 "regex.h2"
-    template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
+#line 542 "regex.h2"
+    template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 507 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
+#line 544 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
         }
@@ -1393,14 +1480,14 @@ namespace regex {
         }
     }
 
-#line 520 "regex.h2"
-    template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 557 "regex.h2"
+    template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
         auto pos {cur}; 
         auto group_pos {g.start}; 
         for( ; group_pos != g.end && pos != ctx.end; (++group_pos, ++pos) ) {
-            if (CPP2_UFCS(has_flag)(ctx, expression_flags::case_insensitive)) {
+            if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
                 if (safe_tolower(*cpp2::assert_not_null(group_pos)) != safe_tolower(*cpp2::assert_not_null(pos))) {
                     return match_return(false, ctx.end); 
                 }
@@ -1413,75 +1500,80 @@ namespace regex {
         }
 
         if (std::move(group_pos) == std::move(g).end) {
-            return Other::match(std::move(pos), ctx); 
+            return Other::match(std::move(pos), ctx, modifiers); 
         }
         else {
             return match_return(false, ctx.end); 
         }
 
     }
-#line 546 "regex.h2"
+#line 583 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 547 "regex.h2"
+#line 584 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 556 "regex.h2"
-    template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 593 "regex.h2"
+    template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
-            return Other::match(cur, ctx); 
+            return Other::match(cur, ctx, modifiers); 
         }
         else {if (!(match_new_line_before_end) && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special cas for new line at end.
-            return Other::match(cur, ctx); 
+            return Other::match(cur, ctx, modifiers); 
         }
         else {
             return match_return(false, ctx.end); 
         }}
     }
 
-#line 568 "regex.h2"
+#line 605 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 569 "regex.h2"
+#line 606 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 578 "regex.h2"
-    template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 615 "regex.h2"
+    template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
-            return Other::match(cur, ctx); 
+            return Other::match(cur, ctx, modifiers); 
         }
         else {
             return match_return(false, ctx.end); 
         }
 
     }
-#line 587 "regex.h2"
+#line 624 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 588 "regex.h2"
+#line 625 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 596 "regex.h2"
+#line 632 "regex.h2"
+    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+        return Other::match(cur, ctx, Modifier::combine(
+            std::bool_constant(), 
+            std::integral_constant(), 
+            std::integral_constant())); 
+    }
+#line 638 "regex.h2"
+    template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 639 "regex.h2"
+    template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(CPP2_UFCS(data)(str_mod)) + ")"; }
+
+#line 647 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 626 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& tail) -> auto{
-        cpp2::deferred_init count; 
-        auto r {match_min_count(cur, ctx, cpp2::out(&count))}; 
-        if (r.matched) {
-            if (greedy) {
-                return match_greedy(std::move(count.value()), r.pos, r.pos, ctx, tail); 
-            }
-            else {
-                return match_not_greedy(std::move(count.value()), std::move(r).pos, ctx, tail); 
-            }
+#line 677 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        if (greedy) {
+            return match_greedy(0, cur, cur, ctx, modifiers, tail); 
         }
         else {
-            return r; 
+            return match_not_greedy(cur, ctx, modifiers, tail); 
         }
     }
 
-#line 642 "regex.h2"
+#line 686 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 644 "regex.h2"
+#line 688 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1508,49 +1600,48 @@ namespace regex {
       return r; 
     }
 
-#line 670 "regex.h2"
+#line 714 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 675 "regex.h2"
+#line 719 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 680 "regex.h2"
+#line 724 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 686 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, cpp2::out count_r) -> auto{
+#line 730 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {match_return(true, cur)}; 
         auto count {0}; 
 
         while( is_below_lower_bound(count) && res.matched ) {
-            res = M::match(res.pos, ctx, no_tail());
+            res = M::match(res.pos, ctx, modifiers, no_tail());
             if (res.matched) {
                 count += 1;
             }
         }
 
-        count_r.construct(std::move(count));
+        count_r = std::move(count);
         return res; 
     }
 
-#line 701 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
-
-        auto r {M::match(cur, ctx, no_tail())}; 
-
-        if (is_below_upper_bound(count) && r.matched && r.pos != cur) 
+#line 745 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{
+        auto r {M::match(cur, ctx, modifiers, no_tail())}; 
+        if ( is_below_upper_bound(count) && r.matched && 
+            (is_below_lower_bound(count) || r.pos != cur)) 
         {
-            auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, Other())}; 
+            auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, modifiers, Other())}; 
 
             if (possessive || // Do not backtrack if possessive.
                inner.matched) {
@@ -1560,12 +1651,12 @@ namespace regex {
 
         // No match from the recursion. Try to match our tail.
         if (is_in_range(count)) {
-            auto o {Other::match(cur, ctx)}; 
+            auto o {Other::match(cur, ctx, modifiers)}; 
 
             if (o.matched) {
                 // Rematch M to set the groups.
                 M::reset_ranges(ctx);
-                static_cast(M::match(last_valid, ctx, no_tail()));
+                static_cast(M::match(last_valid, ctx, modifiers, no_tail()));
             }
 
             return o; 
@@ -1575,18 +1666,22 @@ namespace regex {
         }
     }
 
-#line 732 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(cpp2::in c, Iter const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
-        auto count {c}; 
-        auto pos {cur}; 
+#line 775 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
+        auto count {0}; 
+        auto start {match_min_count(cur, ctx, modifiers, count)}; 
+        if (!(start.matched)) {
+          return start; 
+        }
 
+        auto pos {std::move(start).pos}; 
         while( is_below_upper_bound(count) ) {
-            auto o {Other::match(pos, ctx)}; 
+            auto o {Other::match(pos, ctx, modifiers)}; 
             if (o.matched) {
                 return o; 
             }
 
-            auto r {M::match(pos, ctx, no_tail())}; 
+            auto r {M::match(pos, ctx, modifiers, no_tail())}; 
             if (!(r.matched)) {
                 return match_return(false, ctx.end); 
             }
@@ -1594,10 +1689,10 @@ namespace regex {
             pos = r.pos;
         }
 
-        return Other::match(std::move(pos), ctx); // Upper bound reached.
+        return Other::match(std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 758 "regex.h2"
+#line 805 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -1610,8 +1705,8 @@ namespace regex {
         return r; 
     }
 
-#line 777 "regex.h2"
-    template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Other const& unnamed_param_3) -> auto{
+#line 824 "regex.h2"
+    template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         word_class words {}; 
         auto is_match {false}; 
         if (cur == ctx.begin) {// String start
@@ -1633,16 +1728,16 @@ namespace regex {
         }
 
         if (std::move(is_match)) {
-            return Other::match(cur, ctx); 
+            return Other::match(cur, ctx, modifiers); 
         }
         else {
             return match_return(false, ctx.end); 
         }
 
     }
-#line 806 "regex.h2"
+#line 853 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 807 "regex.h2"
+#line 854 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1651,7 +1746,7 @@ namespace regex {
         }
     }
 
-#line 828 "regex.h2"
+#line 875 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1661,10 +1756,10 @@ namespace regex {
         }
     }
 
-#line 839 "regex.h2"
+#line 886 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 847 "regex.h2"
+#line 895 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1674,31 +1769,31 @@ namespace regex {
         }
     }
 
-#line 861 "regex.h2"
+#line 909 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 864 "regex.h2"
+#line 912 "regex.h2"
         }
 
-#line 866 "regex.h2"
+#line 914 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 867 "regex.h2"
+#line 915 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 868 "regex.h2"
+#line 916 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 869 "regex.h2"
+#line 917 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 871 "regex.h2"
+#line 919 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 872 "regex.h2"
+#line 920 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 873 "regex.h2"
+#line 921 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 875 "regex.h2"
+#line 923 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1707,34 +1802,34 @@ namespace regex {
             return group_id; 
         }
 
-#line 884 "regex.h2"
+#line 932 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 885 "regex.h2"
+#line 933 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 886 "regex.h2"
+#line 934 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 887 "regex.h2"
+#line 935 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
-        auto r {Matcher::match(start, ctx)}; 
+        auto r {Matcher::match(start, ctx, modifiers())}; 
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 894 "regex.h2"
+#line 942 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 895 "regex.h2"
+#line 943 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 896 "regex.h2"
+#line 944 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 897 "regex.h2"
+#line 945 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
 
         auto cur {start}; 
         for( ; true; (++cur) ) {
-            if (Matcher::match(cur, ctx).matched) {
+            if (Matcher::match(cur, ctx, modifiers()).matched) {
                 matched = true;
                 break;
             }
@@ -1747,26 +1842,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 916 "regex.h2"
+#line 964 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 934 "regex.h2"
+#line 984 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 940 "regex.h2"
+#line 990 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 945 "regex.h2"
+#line 995 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 947 "regex.h2"
+#line 997 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1774,31 +1869,31 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 954 "regex.h2"
+#line 1004 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 976 "regex.h2"
+#line 1026 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 980 "regex.h2"
+#line 1030 "regex.h2"
     }
 
-#line 984 "regex.h2"
+#line 1034 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 990 "regex.h2"
+#line 1040 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 997 "regex.h2"
+#line 1047 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1811,7 +1906,7 @@ namespace regex {
         }
     }
 
-#line 1009 "regex.h2"
+#line 1059 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() & -> char{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
@@ -1821,7 +1916,7 @@ namespace regex {
         }
     }
 
-#line 1018 "regex.h2"
+#line 1068 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find)(regex, e, pos)}; 
@@ -1837,7 +1932,7 @@ namespace regex {
         }
     }
 
-#line 1033 "regex.h2"
+#line 1083 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -1858,13 +1953,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1055 "regex.h2"
+#line 1105 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1060 "regex.h2"
+#line 1110 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1872,10 +1967,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1067 "regex.h2"
+#line 1117 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1069 "regex.h2"
+#line 1119 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1897,7 +1992,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1090 "regex.h2"
+#line 1140 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -1908,7 +2003,7 @@ namespace regex {
         return r; 
     }
 
-#line 1100 "regex.h2"
+#line 1150 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -1921,7 +2016,40 @@ namespace regex {
         return r; 
     }
 
-#line 1115 "regex.h2"
+#line 1162 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in modifier_change, cpp2::out modifier_reset, cpp2::out modifier_add, cpp2::out modifier_remove) & -> bool{
+        auto is_negative {false}; 
+        auto is_reset {false}; 
+
+        auto add {0}; 
+        auto remove {0}; 
+
+        for ( auto const& cur : modifier_change ) {
+            if (cur == '^') {
+                is_reset = true;
+            }
+            else {if (cur == '-') {
+                if (is_reset) {error("No negative modifier allowed."); return false; }
+                is_negative = true;
+            }
+            else {if (cur == 'i') {
+                if (is_negative) {
+                    remove += expression_flags::case_insensitive;
+                }
+                else {
+                    add += expression_flags::case_insensitive;
+                }
+            }}}
+        }
+
+        modifier_reset.construct(std::move(is_reset));
+        modifier_add.construct(std::move(add));
+        modifier_remove.construct(std::move(remove));
+
+        return true; 
+    }
+
+#line 1197 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -1929,7 +2057,7 @@ namespace regex {
         return true; 
     }
 
-#line 1122 "regex.h2"
+#line 1204 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -1943,7 +2071,7 @@ namespace regex {
         return false; 
     }
 
-#line 1135 "regex.h2"
+#line 1217 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -1952,7 +2080,7 @@ namespace regex {
         return false; 
     }
 
-#line 1143 "regex.h2"
+#line 1225 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2073,7 +2201,7 @@ namespace regex {
         return true; 
     }
 
-#line 1263 "regex.h2"
+#line 1345 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2185,49 +2313,75 @@ namespace regex {
         return true; 
     }
 
-#line 1374 "regex.h2"
+#line 1456 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
-        auto group_number {next_group_id}; 
-        next_group_id += 1;
-
-        auto old_state {new_state()}; 
-
-        auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"\""))}; 
+        auto has_id {true}; 
+        std::string group_name {""}; 
+        std::string modifier_change {""}; 
+        auto modifier_reset {false}; 
+        auto modifier_add {0}; 
+        auto modifier_remove {0}; 
 
         char c_next {'\0'}; 
         // Skip the '('
         if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
         if (c_next == '?') {
-            // Named group
-            if (!((next(cpp2::out(&c_next)) && c_next == '<'))) {error("Missing opening bracket for named group."); return false; }
-            if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
-            std::string name {""}; 
-            if (!(grab_until('>', cpp2::out(&name)))) {error("Missing ending bracket for named group."); return false; }
-            if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
-
-            if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
-                CPP2_ASSERT_IN_BOUNDS(named_groups, name) = group_number;
+            // Special group
+            if (!(next(cpp2::out(&c_next)))) {error("Missing character after group opening."); return false; }
+
+            if (c_next == '<') {
+                // named group
+                if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
+                if (!(grab_until('>', cpp2::out(&group_name)))) {error("Missing ending bracket for named group."); return false; }
+                if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
+            }
+            else {
+                // Simple modifier
+                has_id = false;
+                if (!(grab_until(')', cpp2::out(&modifier_change)))) {error("Missing ending bracket for group."); return false; }
+                if (!(parse_modifiers(modifier_change, cpp2::out(&modifier_reset), cpp2::out(&modifier_add), cpp2::out(&modifier_remove)))) {
+                     return false; 
+                }
             }
-            start_matcher = create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"" + cpp2::to_string(std::move(name)) + "\""));
         }
 
-        parse_until(')');
+        if (std::move(has_id)) {
+            // regular group
 
-        auto inner {create_matcher_from_state()}; 
-        restore_state(std::move(old_state));
+            auto group_number {next_group_id}; 
+            next_group_id += 1;
 
-        std::vector v {
-            std::move(start_matcher), 
-            std::move(inner), 
-            create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number))))}; 
-        CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v)));
+            auto old_state {new_state()}; 
+            parse_until(')');
+            auto inner {create_matcher_from_state()}; 
+            auto inner_has_modifiers {cur_state.has_modifiers}; 
+            restore_state(std::move(old_state));
+
+            auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"\""))}; 
+            if (0 != CPP2_UFCS(size)(group_name)) {
+                start_matcher = create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"" + cpp2::to_string(group_name) + "\""));
+
+                 if (!(CPP2_UFCS(contains)(named_groups, group_name))) {// Redefinition of group name is not an error. The left most one is retained.
+                    CPP2_ASSERT_IN_BOUNDS(named_groups, group_name) = group_number;
+                }
+            }
+            auto end_matcher {create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number)) + ", " + cpp2::to_string(std::move(inner_has_modifiers))))}; 
+
+            std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
+            CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v)));
+        }
+        else {
+            // Only a modifier
+            cur_state.has_modifiers = true;
+            CPP2_UFCS(add)(cur_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_reset)) + ", " + cpp2::to_string(std::move(modifier_add)) + ", " + cpp2::to_string(std::move(modifier_remove)) + ", \"" + cpp2::to_string(std::move(modifier_change)) + "\"")));
+        }
 
         return true; 
     }
 
-#line 1415 "regex.h2"
+#line 1523 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2237,7 +2391,7 @@ namespace regex {
         return false; 
     }
 
-#line 1424 "regex.h2"
+#line 1532 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2312,7 +2466,7 @@ namespace regex {
         return true; 
     }
 
-#line 1498 "regex.h2"
+#line 1606 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2350,7 +2504,7 @@ namespace regex {
         return true; 
     }
 
-#line 1535 "regex.h2"
+#line 1643 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2374,7 +2528,7 @@ namespace regex {
         }
     }
 
-#line 1558 "regex.h2"
+#line 1666 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2394,7 +2548,7 @@ namespace regex {
         return r; 
     }
 
-#line 1577 "regex.h2"
+#line 1685 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -2404,12 +2558,12 @@ namespace regex {
         auto named_groups_arg {create_named_groups_arg()}; 
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0, \"\"")}; 
-        auto end {create_matcher("group_matcher_end_logic", "0")}; 
+        auto end {create_matcher("group_matcher_end_logic", "0, false")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1593 "regex.h2"
+#line 1701 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 4b3c38202d..8e5230d840 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -12,6 +12,16 @@
 
 #include 
 
+template
+inline decltype(auto) pop_mod (Modifier& modifier) {
+    if constexpr (do_pop) {
+        return Modifier::pop();
+    }
+    else {
+        return modifier;
+    }
+}
+
 cpp2: namespace = {
 
 regex: namespace = {
@@ -112,14 +122,33 @@ match_context:  type =
     }
 }
 
-match_modifiers:  type = {
+match_modifiers:  type = {
 
     flags : int == flags_;
 
+    // Push/pop management
+
+    private combine_inner: (reset: bool, add: int, remove: int) -> _ == {
+        new_flags := flags;
+        if reset {
+            new_flags = 0;
+        }
+        new_flags = new_flags | add;
+        new_flags = new_flags & (remove~);
+
+        return new_flags;
+    }
+
+    combine:  (_ : Reset, _ : Add, _ : Remove) -> _ = {
+        return match_modifiers>();
+    }
+
+    pop: () Inner();
+
     // Flag management
     //
 
-    has_flag: (f: int) -> bool = {
+    has_flag: (this, f: int) -> bool = {
         return  0 != (f & flags);
     }
 }
@@ -497,10 +526,10 @@ group_matcher_start_logic:  type = {
     }
 }
 
-group_matcher_end_logic:  type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+group_matcher_end_logic:  type = {
+    match:  (cur, inout ctx, modifiers: Modifier, _ : Other) -> _ = {
         ctx.set_group_end(group, cur);
-        r := Other::match(cur, ctx, modifiers);
+        r := Other::match(cur, ctx, pop_mod(modifiers));
         if !r.matched {
             ctx.set_group_invalid(group);
         }
@@ -593,6 +622,20 @@ line_start_matcher_logic:  type =
     to_string: ()               bstring(1, '^');
 }
 
+// Regex syntax: (?)  Example: (?i)
+//
+modifier_matcher_logic:  type =
+{
+    match:  (cur, inout ctx, _: Modifier, _ : Other) -> _ = {
+        return Other::match(cur, ctx, Modifier::combine(
+            std::bool_constant(),
+            std::integral_constant(),
+            std::integral_constant()));
+    }
+    reset_ranges: (inout ctx) = {}
+    to_string: ()               "(?(str_mod.data())$)";
+}
+
 // Named character classes
 //
 
@@ -844,7 +887,7 @@ group_name_list_end: type = {
 regular_expression:  type = {
 
     context:  type == match_context;
-    modifiers: type == match_modifiers;
+    modifiers: type == match_modifiers;
 
     private get_iter: (str: view, pos) -> _ = {
         if pos < str.size() {
@@ -933,6 +976,8 @@ regex_parser_state: @struct type = {
     /// List of alternate matcher lists. E.g. ab|cd|xy
     alternate_match_lists: std::vector> = ();
 
+    has_modifiers: bool = false;
+
     next_alternative: (inout this) = {
         new_list: std::vector = ();
         std::swap(new_list, cur_match_list);
@@ -1111,6 +1156,38 @@ regex_parser:  type = {
         return r;
     }
 
+    parse_modifiers: (inout this, modifier_change: std::string, out modifier_reset: bool, out modifier_add: int, out modifier_remove: int) -> bool = {
+        is_negative := false;
+        is_reset    := false;
+
+        add    := 0;
+        remove := 0;
+
+        for modifier_change do (cur) {
+            if cur == '^' {
+                is_reset = true;
+            }
+            else if cur == '-' {
+                if is_reset { error("No negative modifier allowed."); return false; }
+                is_negative = true;
+            }
+            else if cur == 'i' {
+                if is_negative {
+                    remove += expression_flags::case_insensitive;
+                }
+                else {
+                    add += expression_flags::case_insensitive;
+                }
+            }
+        }
+
+        modifier_reset  = is_reset;
+        modifier_add    = add;
+        modifier_remove = remove;
+
+        return true;
+    }
+
     // Parsing functions
     //
 
@@ -1376,40 +1453,66 @@ regex_parser:  type = {
     is_group: (inout this, c: char) -> bool = {
         if c != '(' { return false; }
 
-        group_number := next_group_id;
-        next_group_id += 1;
-
-        old_state: _ = new_state();
-
-        start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, \"\"");
+        has_id := true;
+        group_name : std::string = "";
+        modifier_change: std::string = "";
+        modifier_reset  := false;
+        modifier_add    := 0;
+        modifier_remove := 0;
 
         c_next : char = '\0';
         // Skip the '('
         if !next(out c_next) { error("Group without closing bracket."); return false;}
         if c_next == '?' {
-            // Named group
-            if !(next(out c_next) && c_next == '<') { error("Missing opening bracket for named group."); return false; }
-            if !next(out c_next) /* skip '<' */ { error("Missing ending bracket for named group."); return false; }
-            name : std::string = "";
-            if !grab_until('>', out name) { error("Missing ending bracket for named group."); return false; }
-            if !next(out c_next) { error("Group without closing bracket."); return false;}
-
-            if !named_groups.contains(name) { // Redefinition of group name is not an error. The left most one is retained.
-                named_groups[name] = group_number;
+            // Special group
+            if !next(out c_next) { error("Missing character after group opening."); return false; }
+
+            if c_next == '<' {
+                // named group
+                if !next(out c_next) /* skip '<' */ { error("Missing ending bracket for named group."); return false; }
+                if !grab_until('>', out group_name) { error("Missing ending bracket for named group."); return false; }
+                if !next(out c_next) { error("Group without closing bracket."); return false;}
+            }
+            else {
+                // Simple modifier
+                has_id = false;
+                if !grab_until(')', out modifier_change) { error("Missing ending bracket for group."); return false; }
+                if !parse_modifiers(modifier_change, out modifier_reset, out modifier_add, out modifier_remove) {
+                     return false;
+                }
             }
-            start_matcher = create_matcher("group_matcher_start_logic", "(group_number)$, \"(name)$\"");
         }
 
-        parse_until(')');
+        if has_id {
+            // regular group
+
+            group_number := next_group_id;
+            next_group_id += 1;
+
+            old_state: _ = new_state();
+            parse_until(')');
+            inner:= create_matcher_from_state();
+            inner_has_modifiers := cur_state.has_modifiers;
+            restore_state(old_state);
 
-        inner:= create_matcher_from_state();
-        restore_state(old_state);
+            start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, \"\"");
+            if 0 != group_name.size() {
+                start_matcher = create_matcher("group_matcher_start_logic", "(group_number)$, \"(group_name)$\"");
 
-        v: std::vector = (
-            start_matcher,
-            inner,
-            create_matcher("group_matcher_end_logic", "(group_number)$"));
-        cur_state.add(create_matcher_from_list(v));
+                 if !named_groups.contains(group_name) { // Redefinition of group name is not an error. The left most one is retained.
+                    named_groups[group_name] = group_number;
+                }
+            }
+            end_matcher := create_matcher("group_matcher_end_logic", "(group_number)$, (inner_has_modifiers)$");
+
+            v: std::vector = (start_matcher, inner, end_matcher);
+            cur_state.add(create_matcher_from_list(v));
+        }
+        else {
+            // Only a modifier
+            cur_state.has_modifiers = true;
+            cur_state.add(create_matcher("modifier_matcher_logic", "(modifier_reset)$, (modifier_add)$, (modifier_remove)$, \"(modifier_change)$\""));
+        }
 
         return true;
     }
@@ -1585,7 +1688,7 @@ regex_parser:  type = {
         named_groups_arg := create_named_groups_arg();
         inner := create_matcher_from_state();
         start := create_matcher("group_matcher_start_logic", "0, \"\"");
-        end   := create_matcher("group_matcher_end_logic", "0");
+        end   := create_matcher("group_matcher_end_logic", "0, false");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
         return   create_matcher("regular_expression", "(mod)$, (next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
     }

From 90bb000a187e643c2649564630da710b5288d82b Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 1 Mar 2024 14:29:11 +0100
Subject: [PATCH 063/161] Added (?:) notation.

---
 include/cpp2regex.h | 729 +++++++++++++++++++++++---------------------
 source/regex.h2     | 129 ++++----
 2 files changed, 463 insertions(+), 395 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index f3f9996380..10a8ab2b0a 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -31,121 +31,124 @@ template class match_return;
 template class match_context;
 
 #line 125 "regex.h2"
+template class match_modifiers_state_change;
+
+#line 148 "regex.h2"
 template class match_modifiers;
 
-#line 164 "regex.h2"
+#line 171 "regex.h2"
 template class matcher_list;
     
 
-#line 191 "regex.h2"
+#line 198 "regex.h2"
 template class single_class_entry;
 
-#line 199 "regex.h2"
+#line 206 "regex.h2"
 template class range_class_entry;
 
-#line 207 "regex.h2"
+#line 214 "regex.h2"
 template class combined_class_entry;
     
 
-#line 214 "regex.h2"
+#line 221 "regex.h2"
 template class list_class_entry;
     
 
-#line 221 "regex.h2"
+#line 228 "regex.h2"
 template class named_class_entry;
     
 
-#line 226 "regex.h2"
+#line 233 "regex.h2"
 template class negated_class_entry;
     
 
-#line 233 "regex.h2"
+#line 240 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 286 "regex.h2"
+#line 293 "regex.h2"
 template class extract_position_helper;
     
 
-#line 303 "regex.h2"
+#line 310 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 387 "regex.h2"
+#line 394 "regex.h2"
 template class any_matcher_logic;
 
-#line 403 "regex.h2"
+#line 410 "regex.h2"
 template class char_matcher_logic;
 
-#line 431 "regex.h2"
+#line 438 "regex.h2"
 template class class_matcher_logic;
 
-#line 480 "regex.h2"
+#line 487 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 488 "regex.h2"
+#line 495 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 497 "regex.h2"
+#line 504 "regex.h2"
 template class global_group_reset;
     
 
-#line 509 "regex.h2"
-template class group_matcher_start_logic;
+#line 516 "regex.h2"
+template class group_matcher_start_logic;
     
 
-#line 532 "regex.h2"
-template class group_matcher_end_logic;
+#line 544 "regex.h2"
+template class group_matcher_end_logic;
     
 
-#line 556 "regex.h2"
+#line 570 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 591 "regex.h2"
+#line 605 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 613 "regex.h2"
+#line 627 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 630 "regex.h2"
-template class modifier_matcher_logic;
+#line 644 "regex.h2"
+template class modifier_matcher_logic;
 
-#line 645 "regex.h2"
+#line 656 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 649 "regex.h2"
+#line 660 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 675 "regex.h2"
+#line 686 "regex.h2"
 template class range_matcher_logic;
 
-#line 803 "regex.h2"
+#line 814 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 822 "regex.h2"
+#line 833 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 873 "regex.h2"
+#line 884 "regex.h2"
 template class group_name_list;
 
-#line 885 "regex.h2"
+#line 896 "regex.h2"
 class group_name_list_end;
     
 
-#line 890 "regex.h2"
+#line 901 "regex.h2"
 template class regular_expression;
 
-#line 974 "regex.h2"
+#line 985 "regex.h2"
 class regex_parser_state;
 
-#line 1008 "regex.h2"
+#line 1017 "regex.h2"
 template class regex_parser;
 
-#line 1708 "regex.h2"
+#line 1730 "regex.h2"
 }
 }
 
@@ -269,22 +272,35 @@ template cl
 #line 123 "regex.h2"
 };
 
+template class match_modifiers_state_change {
+
+    public: static const bool reset;
+    public: static const bool add;
+    public: static const int remove;
+    public: static const bool has_change;
+
+    public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
+
+#line 143 "regex.h2"
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: match_modifiers_state_change() = default;
+    public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(match_modifiers_state_change const&) -> void = delete;
+
+#line 144 "regex.h2"
+};
+
+using match_modifiers_no_change = match_modifiers_state_change;
+
 template class match_modifiers {
 
     public: static const int flags;
 
     // Push/pop management
 
-    private: [[nodiscard]] constexpr static auto combine_inner(cpp2::in reset, cpp2::in add, cpp2::in remove) -> auto;
-
-#line 142 "regex.h2"
-    public: template [[nodiscard]] static auto combine(
-            [[maybe_unused]] Reset const& unnamed_param_1, 
-            [[maybe_unused]] Add const& unnamed_param_2, 
-            [[maybe_unused]] Remove const& unnamed_param_3) -> auto;
-
-#line 149 "regex.h2"
+    public: template [[nodiscard]] static auto push([[maybe_unused]] Change const& unnamed_param_1) -> auto;
     public: [[nodiscard]] static auto pop() -> auto;
+    public: template [[nodiscard]] static auto replace([[maybe_unused]] Change const& unnamed_param_1) -> auto;
 
     // Flag management
     //
@@ -295,7 +311,7 @@ template class match_modifiers {
     public: auto operator=(match_modifiers const&) -> void = delete;
 
 
-#line 157 "regex.h2"
+#line 164 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -308,7 +324,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto;
 
-#line 170 "regex.h2"
+#line 177 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
@@ -321,7 +337,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 178 "regex.h2"
+#line 185 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -343,7 +359,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 195 "regex.h2"
+#line 202 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -356,7 +372,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 203 "regex.h2"
+#line 210 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -368,7 +384,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 210 "regex.h2"
+#line 217 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -380,7 +396,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 217 "regex.h2"
+#line 224 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 224 "regex.h2"
+#line 231 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -402,7 +418,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 229 "regex.h2"
+#line 236 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -414,10 +430,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 236 "regex.h2"
+#line 243 "regex.h2"
 };
 
-#line 239 "regex.h2"
+#line 246 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -448,7 +464,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 270 "regex.h2"
+#line 277 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -462,20 +478,20 @@ template                      using short_not_word_class = negat
 //-----------------------------------------------------------------------
 //
 
-#line 284 "regex.h2"
+#line 291 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 295 "regex.h2"
+#line 302 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 297 "regex.h2"
+#line 304 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -486,20 +502,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto;
 
-#line 317 "regex.h2"
+#line 324 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 335 "regex.h2"
+#line 342 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 383 "regex.h2"
+#line 390 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -508,14 +524,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 397 "regex.h2"
+#line 404 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 399 "regex.h2"
+#line 406 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -524,27 +540,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 424 "regex.h2"
+#line 431 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 426 "regex.h2"
+#line 433 "regex.h2"
 };
 
-#line 429 "regex.h2"
+#line 436 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 452 "regex.h2"
+#line 459 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 464 "regex.h2"
+#line 471 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -553,7 +569,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 476 "regex.h2"
+#line 483 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -566,7 +582,7 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 484 "regex.h2"
+#line 491 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -574,13 +590,13 @@ template class empty_matcher_logic {
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 492 "regex.h2"
+#line 499 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 493 "regex.h2"
+#line 500 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -588,22 +604,22 @@ template class escaped_char_matcher_l
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 503 "regex.h2"
+#line 510 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 505 "regex.h2"
+#line 512 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
 //
-template class group_matcher_start_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+template class group_matcher_start_logic {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 515 "regex.h2"
+#line 524 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -612,13 +628,13 @@ template class group_matcher_start
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 530 "regex.h2"
+#line 542 "regex.h2"
 };
 
-template class group_matcher_end_logic {
+template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 542 "regex.h2"
+#line 556 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -627,7 +643,7 @@ template class group_matcher_end_l
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 552 "regex.h2"
+#line 566 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -635,14 +651,14 @@ template class group_matcher_end_l
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 583 "regex.h2"
+#line 597 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 585 "regex.h2"
+#line 599 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -653,14 +669,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 605 "regex.h2"
+#line 619 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 607 "regex.h2"
+#line 621 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -671,30 +687,30 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 624 "regex.h2"
+#line 638 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 626 "regex.h2"
+#line 640 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
 //
-template class modifier_matcher_logic
+template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 638 "regex.h2"
+#line 649 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 640 "regex.h2"
+#line 651 "regex.h2"
 };
 
 // Named character classes
@@ -707,7 +723,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 648 "regex.h2"
+#line 659 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -715,7 +731,7 @@ template                    void = delete;
 
 
-#line 651 "regex.h2"
+#line 662 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -725,7 +741,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 661 "regex.h2"
+#line 672 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -737,40 +753,40 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 674 "regex.h2"
+#line 685 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 686 "regex.h2"
+#line 697 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 714 "regex.h2"
+#line 725 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 719 "regex.h2"
+#line 730 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 724 "regex.h2"
+#line 735 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 730 "regex.h2"
+#line 741 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 745 "regex.h2"
+#line 756 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return;
 
-#line 775 "regex.h2"
+#line 786 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 799 "regex.h2"
+#line 810 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -783,7 +799,7 @@ template void = delete;
 
 
-#line 816 "regex.h2"
+#line 827 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -794,7 +810,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 853 "regex.h2"
+#line 864 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -802,10 +818,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 861 "regex.h2"
+#line 872 "regex.h2"
 };
 
-#line 864 "regex.h2"
+#line 875 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -823,7 +839,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 883 "regex.h2"
+#line 894 "regex.h2"
 };
 
 class group_name_list_end {
@@ -832,7 +848,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 887 "regex.h2"
+#line 898 "regex.h2"
 };
 
 // Regular expression implementation
@@ -843,7 +859,7 @@ template> str, auto const& pos) -> auto;
 
-#line 904 "regex.h2"
+#line 915 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -851,7 +867,7 @@ template matched_, context const& ctx_);
 
-#line 914 "regex.h2"
+#line 925 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -866,7 +882,7 @@ template void = delete;
 
 
-#line 930 "regex.h2"
+#line 941 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -874,19 +890,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 942 "regex.h2"
+#line 953 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 964 "regex.h2"
+#line 975 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 965 "regex.h2"
+#line 976 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -904,23 +920,21 @@ class regex_parser_state {
     /// List of alternate matcher lists. E.g. ab|cd|xy
     public: std::vector> alternate_match_lists {}; 
 
-    public: bool has_modifiers {false}; 
-
     public: auto next_alternative() & -> void;
 
-#line 990 "regex.h2"
+#line 999 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 995 "regex.h2"
+#line 1004 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1004 "regex.h2"
+#line 1013 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 1008 "regex.h2"
+#line 1017 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -941,99 +955,104 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1032 "regex.h2"
+#line 1041 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 1040 "regex.h2"
+#line 1049 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 1044 "regex.h2"
+#line 1053 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 1059 "regex.h2"
+#line 1068 "regex.h2"
+    public: [[nodiscard]] auto current() const& -> char;
+
+#line 1076 "regex.h2"
     public: [[nodiscard]] auto peek() & -> char;
 
-#line 1068 "regex.h2"
-    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> bool;
+#line 1085 "regex.h2"
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+
+    public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 1083 "regex.h2"
+#line 1102 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1103 "regex.h2"
+#line 1122 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1110 "regex.h2"
+#line 1129 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1117 "regex.h2"
+#line 1136 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1140 "regex.h2"
+#line 1159 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 1150 "regex.h2"
+#line 1169 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 1162 "regex.h2"
-    public: [[nodiscard]] auto parse_modifiers(cpp2::in modifier_change, cpp2::out modifier_reset, cpp2::out modifier_add, cpp2::out modifier_remove) & -> bool;
+#line 1181 "regex.h2"
+    public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool;
 
-#line 1194 "regex.h2"
+#line 1211 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1204 "regex.h2"
+#line 1221 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1217 "regex.h2"
+#line 1234 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1225 "regex.h2"
+#line 1242 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1345 "regex.h2"
+#line 1362 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1456 "regex.h2"
+#line 1473 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1523 "regex.h2"
+#line 1545 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1532 "regex.h2"
+#line 1554 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1606 "regex.h2"
+#line 1628 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1643 "regex.h2"
+#line 1665 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1666 "regex.h2"
+#line 1688 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1685 "regex.h2"
+#line 1707 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1699 "regex.h2"
+#line 1721 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1708 "regex.h2"
+#line 1730 "regex.h2"
 }
 }
 
@@ -1143,11 +1162,14 @@ namespace regex {
     }
 
 #line 127 "regex.h2"
-    template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
-
-#line 131 "regex.h2"
-    template  [[nodiscard]] constexpr auto match_modifiers::combine_inner(cpp2::in reset, cpp2::in add, cpp2::in remove) -> auto{
-        auto new_flags {flags}; 
+    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
+    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::add = add_;
+    template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
+    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
+
+#line 132 "regex.h2"
+    template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
+        auto new_flags {old_flags}; 
         if (reset) {
             new_flags = 0;
         }
@@ -1157,77 +1179,79 @@ namespace regex {
         return new_flags; 
     }
 
-#line 142 "regex.h2"
-    template  template [[nodiscard]] auto match_modifiers::combine(
-            [[maybe_unused]] Reset const& unnamed_param_1, 
-            [[maybe_unused]] Add const& unnamed_param_2, 
-            [[maybe_unused]] Remove const& unnamed_param_3) -> auto{
-        return match_modifiers>(); 
-    }
+#line 143 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 149 "regex.h2"
-    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner();  }
+#line 150 "regex.h2"
+    template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
 #line 154 "regex.h2"
+    template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
+#line 155 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
+#line 156 "regex.h2"
+    template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
+
+#line 161 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 165 "regex.h2"
+#line 172 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 167 "regex.h2"
+#line 174 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto { 
         return match_select(cur, ctx, modifiers);  }
 
-#line 170 "regex.h2"
+#line 177 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { 
         return First::match(cur, ctx, modifiers, matcher_list());  }
-#line 172 "regex.h2"
+#line 179 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_return(true, cur);  }
 
-#line 174 "regex.h2"
+#line 181 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 175 "regex.h2"
+#line 182 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 177 "regex.h2"
+#line 184 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 193 "regex.h2"
+#line 200 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 194 "regex.h2"
+#line 201 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 201 "regex.h2"
+#line 208 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 202 "regex.h2"
+#line 209 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 208 "regex.h2"
+#line 215 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 209 "regex.h2"
+#line 216 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 215 "regex.h2"
+#line 222 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 216 "regex.h2"
+#line 223 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 222 "regex.h2"
+#line 229 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 223 "regex.h2"
+#line 230 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 228 "regex.h2"
+#line 235 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 234 "regex.h2"
+#line 241 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 235 "regex.h2"
+#line 242 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 287 "regex.h2"
+#line 294 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto r {Other::match(cur, ctx, modifiers)}; 
         if (r.matched) {
@@ -1236,12 +1260,12 @@ namespace regex {
         return r; 
     }
 
-#line 295 "regex.h2"
+#line 302 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 296 "regex.h2"
+#line 303 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 305 "regex.h2"
+#line 312 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1254,12 +1278,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 317 "regex.h2"
+#line 324 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 318 "regex.h2"
+#line 325 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 320 "regex.h2"
+#line 327 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, tail)}; 
         if (r.matched) {
@@ -1275,7 +1299,7 @@ namespace regex {
         }
     }
 
-#line 335 "regex.h2"
+#line 342 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto{
         auto r {First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()))}; 
 
@@ -1291,7 +1315,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 351 "regex.h2"
+#line 358 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1303,7 +1327,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 363 "regex.h2"
+#line 370 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1325,7 +1349,7 @@ namespace regex {
         }
     }
 
-#line 389 "regex.h2"
+#line 396 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur != ctx.end) {
             return Other::match(cur + 1, ctx, modifiers); 
@@ -1334,12 +1358,12 @@ namespace regex {
         }
     }
 
-#line 397 "regex.h2"
+#line 404 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 398 "regex.h2"
+#line 405 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 405 "regex.h2"
+#line 412 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1359,12 +1383,12 @@ namespace regex {
         }
 
     }
-#line 424 "regex.h2"
+#line 431 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 425 "regex.h2"
+#line 432 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 433 "regex.h2"
+#line 440 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1384,7 +1408,7 @@ namespace regex {
         }
     }
 
-#line 452 "regex.h2"
+#line 459 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1397,10 +1421,10 @@ namespace regex {
         return r; 
     }
 
-#line 464 "regex.h2"
+#line 471 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 466 "regex.h2"
+#line 473 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1412,66 +1436,73 @@ namespace regex {
         return r; 
     }
 
-#line 481 "regex.h2"
+#line 488 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
-#line 482 "regex.h2"
+#line 489 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 483 "regex.h2"
+#line 490 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
 
-#line 492 "regex.h2"
+#line 499 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 498 "regex.h2"
+#line 505 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers); 
     }
 
-#line 503 "regex.h2"
+#line 510 "regex.h2"
     template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
-#line 504 "regex.h2"
+#line 511 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
 
-#line 510 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        CPP2_UFCS(set_group_start)(ctx, group, cur);
-        return Other::match(cur, ctx, modifiers); 
+#line 517 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+        if (-1 != group) {
+            CPP2_UFCS(set_group_start)(ctx, group, cur);
+        }
+        return Other::match(cur, ctx, Modifiers::push(ModifierChange())); 
     }
 
-#line 515 "regex.h2"
-    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
+#line 524 "regex.h2"
+    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 517 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
+#line 526 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
                 return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
             }
+            else {if (ModifierChange::has_change) {
+                return { "(?" + cpp2::to_string(ModifierChange::to_string()) + ":" }; 
+            }
             else {
                 return "("; 
-            }
+            }}
         }
         else {
             return ""; 
         }
     }
 
-#line 533 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        CPP2_UFCS(set_group_end)(ctx, group, cur);
-        auto r {Other::match(cur, ctx, pop_mod(modifiers))}; 
-        if (!(r.matched)) {
+#line 545 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+        if (-1 != group) {
+            CPP2_UFCS(set_group_end)(ctx, group, cur);
+        }
+        auto r {Other::match(cur, ctx, Modifier::pop())}; 
+        if (!(r.matched) && -1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
         return r; 
     }
 
-#line 542 "regex.h2"
-    template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
+#line 556 "regex.h2"
+    template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 544 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
+#line 558 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
         }
@@ -1480,7 +1511,7 @@ namespace regex {
         }
     }
 
-#line 557 "regex.h2"
+#line 571 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1507,12 +1538,12 @@ namespace regex {
         }
 
     }
-#line 583 "regex.h2"
+#line 597 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 584 "regex.h2"
+#line 598 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 593 "regex.h2"
+#line 607 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1525,12 +1556,12 @@ namespace regex {
         }}
     }
 
-#line 605 "regex.h2"
+#line 619 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 606 "regex.h2"
+#line 620 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 615 "regex.h2"
+#line 629 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1540,27 +1571,24 @@ namespace regex {
         }
 
     }
-#line 624 "regex.h2"
+#line 638 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 625 "regex.h2"
+#line 639 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 632 "regex.h2"
-    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        return Other::match(cur, ctx, Modifier::combine(
-            std::bool_constant(), 
-            std::integral_constant(), 
-            std::integral_constant())); 
+#line 646 "regex.h2"
+    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+        return Other::match(cur, ctx, Modifier::replace(ModifierChange())); 
     }
-#line 638 "regex.h2"
-    template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 639 "regex.h2"
-    template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(CPP2_UFCS(data)(str_mod)) + ")"; }
+#line 649 "regex.h2"
+    template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 650 "regex.h2"
+    template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 647 "regex.h2"
+#line 658 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 677 "regex.h2"
+#line 688 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if (greedy) {
             return match_greedy(0, cur, cur, ctx, modifiers, tail); 
@@ -1570,10 +1598,10 @@ namespace regex {
         }
     }
 
-#line 686 "regex.h2"
+#line 697 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 688 "regex.h2"
+#line 699 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1600,26 +1628,26 @@ namespace regex {
       return r; 
     }
 
-#line 714 "regex.h2"
+#line 725 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 719 "regex.h2"
+#line 730 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 724 "regex.h2"
+#line 735 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 730 "regex.h2"
+#line 741 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {match_return(true, cur)}; 
         auto count {0}; 
@@ -1635,7 +1663,7 @@ namespace regex {
         return res; 
     }
 
-#line 745 "regex.h2"
+#line 756 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{
         auto r {M::match(cur, ctx, modifiers, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1666,7 +1694,7 @@ namespace regex {
         }
     }
 
-#line 775 "regex.h2"
+#line 786 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
@@ -1692,7 +1720,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 805 "regex.h2"
+#line 816 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -1705,7 +1733,7 @@ namespace regex {
         return r; 
     }
 
-#line 824 "regex.h2"
+#line 835 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1735,9 +1763,9 @@ namespace regex {
         }
 
     }
-#line 853 "regex.h2"
+#line 864 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 854 "regex.h2"
+#line 865 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1746,7 +1774,7 @@ namespace regex {
         }
     }
 
-#line 875 "regex.h2"
+#line 886 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1756,10 +1784,10 @@ namespace regex {
         }
     }
 
-#line 886 "regex.h2"
+#line 897 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 895 "regex.h2"
+#line 906 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1769,31 +1797,31 @@ namespace regex {
         }
     }
 
-#line 909 "regex.h2"
+#line 920 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 912 "regex.h2"
+#line 923 "regex.h2"
         }
 
-#line 914 "regex.h2"
+#line 925 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 915 "regex.h2"
+#line 926 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 916 "regex.h2"
+#line 927 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 917 "regex.h2"
+#line 928 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 919 "regex.h2"
+#line 930 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 920 "regex.h2"
+#line 931 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 921 "regex.h2"
+#line 932 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 923 "regex.h2"
+#line 934 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1802,13 +1830,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 932 "regex.h2"
+#line 943 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 933 "regex.h2"
+#line 944 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 934 "regex.h2"
+#line 945 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 935 "regex.h2"
+#line 946 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1816,13 +1844,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 942 "regex.h2"
+#line 953 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 943 "regex.h2"
+#line 954 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 944 "regex.h2"
+#line 955 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 945 "regex.h2"
+#line 956 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1842,26 +1870,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 964 "regex.h2"
+#line 975 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 984 "regex.h2"
+#line 993 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 990 "regex.h2"
+#line 999 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 995 "regex.h2"
+#line 1004 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 997 "regex.h2"
+#line 1006 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1869,31 +1897,31 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1004 "regex.h2"
+#line 1013 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1026 "regex.h2"
+#line 1035 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1030 "regex.h2"
+#line 1039 "regex.h2"
     }
 
-#line 1034 "regex.h2"
+#line 1043 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 1040 "regex.h2"
+#line 1049 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 1047 "regex.h2"
+#line 1056 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1906,7 +1934,16 @@ namespace regex {
         }
     }
 
-#line 1059 "regex.h2"
+#line 1068 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::current() const& -> char{
+        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
+            return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
+        }else {
+            return '\0'; 
+        }
+    }
+
+#line 1076 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() & -> char{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
@@ -1916,10 +1953,13 @@ namespace regex {
         }
     }
 
-#line 1068 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> bool{
+#line 1085 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_one_of(std::string(1, e), cpp2::out(&r));  }
+
+#line 1087 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
-        auto end {CPP2_UFCS(find)(regex, e, pos)}; 
+        auto end {CPP2_UFCS(find_first_of)(regex, e, pos)}; 
 
         if (end != std::string_view::npos) {
             r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
@@ -1932,7 +1972,7 @@ namespace regex {
         }
     }
 
-#line 1083 "regex.h2"
+#line 1102 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -1953,13 +1993,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1105 "regex.h2"
+#line 1124 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1110 "regex.h2"
+#line 1129 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -1967,10 +2007,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1117 "regex.h2"
+#line 1136 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1119 "regex.h2"
+#line 1138 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -1992,7 +2032,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1140 "regex.h2"
+#line 1159 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2003,7 +2043,7 @@ namespace regex {
         return r; 
     }
 
-#line 1150 "regex.h2"
+#line 1169 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -2016,15 +2056,15 @@ namespace regex {
         return r; 
     }
 
-#line 1162 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in modifier_change, cpp2::out modifier_reset, cpp2::out modifier_add, cpp2::out modifier_remove) & -> bool{
+#line 1181 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
 
         auto add {0}; 
         auto remove {0}; 
 
-        for ( auto const& cur : modifier_change ) {
+        for ( auto const& cur : change_str ) {
             if (cur == '^') {
                 is_reset = true;
             }
@@ -2042,14 +2082,12 @@ namespace regex {
             }}}
         }
 
-        modifier_reset.construct(std::move(is_reset));
-        modifier_add.construct(std::move(add));
-        modifier_remove.construct(std::move(remove));
+        modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
 
         return true; 
     }
 
-#line 1197 "regex.h2"
+#line 1214 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2057,7 +2095,7 @@ namespace regex {
         return true; 
     }
 
-#line 1204 "regex.h2"
+#line 1221 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2071,7 +2109,7 @@ namespace regex {
         return false; 
     }
 
-#line 1217 "regex.h2"
+#line 1234 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -2080,7 +2118,7 @@ namespace regex {
         return false; 
     }
 
-#line 1225 "regex.h2"
+#line 1242 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2201,7 +2239,7 @@ namespace regex {
         return true; 
     }
 
-#line 1345 "regex.h2"
+#line 1362 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2313,16 +2351,14 @@ namespace regex {
         return true; 
     }
 
-#line 1456 "regex.h2"
+#line 1473 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
         auto has_id {true}; 
+        auto has_pattern {true}; 
         std::string group_name {""}; 
-        std::string modifier_change {""}; 
-        auto modifier_reset {false}; 
-        auto modifier_add {0}; 
-        auto modifier_remove {0}; 
+        std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
 
         char c_next {'\0'}; 
         // Skip the '('
@@ -2340,48 +2376,55 @@ namespace regex {
             else {
                 // Simple modifier
                 has_id = false;
-                if (!(grab_until(')', cpp2::out(&modifier_change)))) {error("Missing ending bracket for group."); return false; }
-                if (!(parse_modifiers(modifier_change, cpp2::out(&modifier_reset), cpp2::out(&modifier_add), cpp2::out(&modifier_remove)))) {
+                std::string change_str {""}; 
+                if (!(grab_until_one_of("):", cpp2::out(&change_str)))) {error("Missing ending bracket for group."); return false; }
+                if (!(parse_modifiers(std::move(change_str), cpp2::out(&modifier_change)))) {
                      return false; 
                 }
+
+                if (')' == current()) {
+                    has_pattern = false;
+                }
+                else {
+                    if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for group."); return false; }/* skip ':' */
+                }
             }
         }
 
-        if (std::move(has_id)) {
+        if (std::move(has_pattern)) {
             // regular group
 
-            auto group_number {next_group_id}; 
-            next_group_id += 1;
+            auto group_number {-1}; 
+            if (std::move(has_id)) {
+                group_number = next_group_id;
+                next_group_id += 1;
+            }
 
             auto old_state {new_state()}; 
             parse_until(')');
             auto inner {create_matcher_from_state()}; 
-            auto inner_has_modifiers {cur_state.has_modifiers}; 
             restore_state(std::move(old_state));
 
-            auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"\""))}; 
+            auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", " + cpp2::to_string(std::move(modifier_change)) + ", \"" + cpp2::to_string(group_name) + "\""))}; 
             if (0 != CPP2_UFCS(size)(group_name)) {
-                start_matcher = create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", \"" + cpp2::to_string(group_name) + "\""));
-
-                 if (!(CPP2_UFCS(contains)(named_groups, group_name))) {// Redefinition of group name is not an error. The left most one is retained.
+                if (!(CPP2_UFCS(contains)(named_groups, group_name))) {// Redefinition of group name is not an error. The left most one is retained.
                     CPP2_ASSERT_IN_BOUNDS(named_groups, group_name) = group_number;
                 }
             }
-            auto end_matcher {create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number)) + ", " + cpp2::to_string(std::move(inner_has_modifiers))))}; 
+            auto end_matcher {create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number))))}; 
 
             std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
             CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v)));
         }
         else {
             // Only a modifier
-            cur_state.has_modifiers = true;
-            CPP2_UFCS(add)(cur_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_reset)) + ", " + cpp2::to_string(std::move(modifier_add)) + ", " + cpp2::to_string(std::move(modifier_remove)) + ", \"" + cpp2::to_string(std::move(modifier_change)) + "\"")));
+            CPP2_UFCS(add)(cur_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_change)))));
         }
 
         return true; 
     }
 
-#line 1523 "regex.h2"
+#line 1545 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2391,7 +2434,7 @@ namespace regex {
         return false; 
     }
 
-#line 1532 "regex.h2"
+#line 1554 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2466,7 +2509,7 @@ namespace regex {
         return true; 
     }
 
-#line 1606 "regex.h2"
+#line 1628 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2504,7 +2547,7 @@ namespace regex {
         return true; 
     }
 
-#line 1643 "regex.h2"
+#line 1665 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2528,7 +2571,7 @@ namespace regex {
         }
     }
 
-#line 1666 "regex.h2"
+#line 1688 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2548,7 +2591,7 @@ namespace regex {
         return r; 
     }
 
-#line 1685 "regex.h2"
+#line 1707 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -2557,13 +2600,13 @@ namespace regex {
         auto mod {parse_modifier()}; 
         auto named_groups_arg {create_named_groups_arg()}; 
         auto inner {create_matcher_from_state()}; 
-        auto start {create_matcher("group_matcher_start_logic", "0, \"\"")}; 
-        auto end {create_matcher("group_matcher_end_logic", "0, false")}; 
+        auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\"")}; 
+        auto end {create_matcher("group_matcher_end_logic", "0")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1701 "regex.h2"
+#line 1723 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 8e5230d840..e98e7f9e88 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -122,14 +122,15 @@ match_context:  type =
     }
 }
 
-match_modifiers:  type = {
-
-    flags : int == flags_;
+match_modifiers_state_change:  type = {
 
-    // Push/pop management
+    reset: bool == reset_;
+    add: bool == add_;
+    remove: int == remove_;
+    has_change: bool == has_change_;
 
-    private combine_inner: (reset: bool, add: int, remove: int) -> _ == {
-        new_flags := flags;
+    combine_inner: (old_flags: int) -> _ == {
+        new_flags := old_flags;
         if reset {
             new_flags = 0;
         }
@@ -139,11 +140,20 @@ match_modifiers:  type = {
         return new_flags;
     }
 
-    combine:  (_ : Reset, _ : Add, _ : Remove) -> _ = {
-        return match_modifiers>();
-    }
+    to_string: () str.data();
+}
+
+match_modifiers_no_change : type == match_modifiers_state_change;
+
+match_modifiers:  type = {
+
+    flags : int == flags_;
+
+    // Push/pop management
 
-    pop: () Inner();
+    push:    (_ : Change) match_modifiers>();
+    pop:             ()           Inner();
+    replace: (_ : Change) match_modifiers();
 
     // Flag management
     //
@@ -503,10 +513,12 @@ global_group_reset:  type = {
 
 // Regex syntax: () Example: (.*)
 //
-group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
-        ctx.set_group_start(group, cur);
-        return Other::match(cur, ctx, modifiers);
+group_matcher_start_logic:  type = {
+    match:  (cur, inout ctx, _ : Modifiers, _ : Other) -> _ = {
+        if -1 != group {
+            ctx.set_group_start(group, cur);
+        }
+        return Other::match(cur, ctx, Modifiers::push(ModifierChange()));
     }
 
     reset_ranges: (inout ctx) = ctx.set_group_invalid(group);
@@ -516,6 +528,9 @@ group_matcher_start_logic:  type = {
             if 0 != name.size() {
                 return "(?<(name.data())$>";
             }
+            else if ModifierChange::has_change {
+                return "(?(ModifierChange::to_string())$:";
+            }
             else {
                 return "(";
             }
@@ -526,11 +541,13 @@ group_matcher_start_logic:  type = {
     }
 }
 
-group_matcher_end_logic:  type = {
+group_matcher_end_logic:  type = {
     match:  (cur, inout ctx, modifiers: Modifier, _ : Other) -> _ = {
-        ctx.set_group_end(group, cur);
-        r := Other::match(cur, ctx, pop_mod(modifiers));
-        if !r.matched {
+        if -1 != group {
+            ctx.set_group_end(group, cur);
+        }
+        r := Other::match(cur, ctx, Modifier::pop());
+        if !r.matched && -1 != group {
             ctx.set_group_invalid(group);
         }
         return r;
@@ -624,16 +641,13 @@ line_start_matcher_logic:  type =
 
 // Regex syntax: (?)  Example: (?i)
 //
-modifier_matcher_logic:  type =
+modifier_matcher_logic:  type =
 {
     match:  (cur, inout ctx, _: Modifier, _ : Other) -> _ = {
-        return Other::match(cur, ctx, Modifier::combine(
-            std::bool_constant(),
-            std::integral_constant(),
-            std::integral_constant()));
+        return Other::match(cur, ctx, Modifier::replace(ModifierChange()));
     }
     reset_ranges: (inout ctx) = {}
-    to_string: ()               "(?(str_mod.data())$)";
+    to_string: ()               "(?(ModifierChange::to_string())$)";
 }
 
 // Named character classes
@@ -976,8 +990,6 @@ regex_parser_state: @struct type = {
     /// List of alternate matcher lists. E.g. ab|cd|xy
     alternate_match_lists: std::vector> = ();
 
-    has_modifiers: bool = false;
-
     next_alternative: (inout this) = {
         new_list: std::vector = ();
         std::swap(new_list, cur_match_list);
@@ -1053,6 +1065,14 @@ regex_parser:  type = {
         }
     }
 
+    current: (in this) -> char = {
+        if pos < regex.size() {
+            return regex[pos];
+        } else {
+            return '\0';
+        }
+    }
+
     peek: (inout this) -> char = {
         if (pos + 1) < regex.size() {
             return regex[pos + 1];
@@ -1062,9 +1082,11 @@ regex_parser:  type = {
         }
     }
 
-    grab_until: (inout this, in e: char, out r: std::string) -> bool = {
+    grab_until: (inout this, in e: char, out r: std::string) grab_until_one_of(std::string(1, e), out r);
+
+    grab_until_one_of: (inout this, in e: std::string, out r: std::string) -> bool = {
         start := pos;
-        end: = regex.find(e, pos);
+        end: = regex.find_first_of(e, pos);
 
         if end != std::string_view::npos {
             r = regex.substr(start, end - pos);
@@ -1156,14 +1178,14 @@ regex_parser:  type = {
         return r;
     }
 
-    parse_modifiers: (inout this, modifier_change: std::string, out modifier_reset: bool, out modifier_add: int, out modifier_remove: int) -> bool = {
+    parse_modifiers: (inout this, change_str: std::string, out modifier_change: std::string) -> bool = {
         is_negative := false;
         is_reset    := false;
 
         add    := 0;
         remove := 0;
 
-        for modifier_change do (cur) {
+        for change_str do (cur) {
             if cur == '^' {
                 is_reset = true;
             }
@@ -1181,9 +1203,7 @@ regex_parser:  type = {
             }
         }
 
-        modifier_reset  = is_reset;
-        modifier_add    = add;
-        modifier_remove = remove;
+        modifier_change = "::cpp2::regex::match_modifiers_state_change";
 
         return true;
     }
@@ -1454,11 +1474,9 @@ regex_parser:  type = {
         if c != '(' { return false; }
 
         has_id := true;
+        has_pattern := true;
         group_name : std::string = "";
-        modifier_change: std::string = "";
-        modifier_reset  := false;
-        modifier_add    := 0;
-        modifier_remove := 0;
+        modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
 
         c_next : char = '\0';
         // Skip the '('
@@ -1476,42 +1494,49 @@ regex_parser:  type = {
             else {
                 // Simple modifier
                 has_id = false;
-                if !grab_until(')', out modifier_change) { error("Missing ending bracket for group."); return false; }
-                if !parse_modifiers(modifier_change, out modifier_reset, out modifier_add, out modifier_remove) {
+                change_str : std::string = "";
+                if !grab_until_one_of("):", out change_str) { error("Missing ending bracket for group."); return false; }
+                if !parse_modifiers(change_str, out modifier_change) {
                      return false;
                 }
+
+                if ')' == current() {
+                    has_pattern = false;
+                }
+                else {
+                    if !next(out c_next) /* skip ':' */ { error("Missing ending bracket for group."); return false; }
+                }
             }
         }
 
-        if has_id {
+        if has_pattern {
             // regular group
 
-            group_number := next_group_id;
-            next_group_id += 1;
+            group_number := -1;
+            if has_id {
+                group_number = next_group_id;
+                next_group_id += 1;
+            }
 
             old_state: _ = new_state();
             parse_until(')');
             inner:= create_matcher_from_state();
-            inner_has_modifiers := cur_state.has_modifiers;
             restore_state(old_state);
 
-            start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, \"\"");
+            start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, (modifier_change)$, \"(group_name)$\"");
             if 0 != group_name.size() {
-                start_matcher = create_matcher("group_matcher_start_logic", "(group_number)$, \"(group_name)$\"");
-
-                 if !named_groups.contains(group_name) { // Redefinition of group name is not an error. The left most one is retained.
+                if !named_groups.contains(group_name) { // Redefinition of group name is not an error. The left most one is retained.
                     named_groups[group_name] = group_number;
                 }
             }
-            end_matcher := create_matcher("group_matcher_end_logic", "(group_number)$, (inner_has_modifiers)$");
+            end_matcher := create_matcher("group_matcher_end_logic", "(group_number)$");
 
             v: std::vector = (start_matcher, inner, end_matcher);
             cur_state.add(create_matcher_from_list(v));
         }
         else {
             // Only a modifier
-            cur_state.has_modifiers = true;
-            cur_state.add(create_matcher("modifier_matcher_logic", "(modifier_reset)$, (modifier_add)$, (modifier_remove)$, \"(modifier_change)$\""));
+            cur_state.add(create_matcher("modifier_matcher_logic", "(modifier_change)$"));
         }
 
         return true;
@@ -1687,8 +1712,8 @@ regex_parser:  type = {
         mod   := parse_modifier();
         named_groups_arg := create_named_groups_arg();
         inner := create_matcher_from_state();
-        start := create_matcher("group_matcher_start_logic", "0, \"\"");
-        end   := create_matcher("group_matcher_end_logic", "0, false");
+        start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\"");
+        end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
         return   create_matcher("regular_expression", "(mod)$, (next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
     }

From 6d0544538b7bbb05852419abf6cc4be5c9298730 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 1 Mar 2024 15:45:29 +0100
Subject: [PATCH 064/161] Added m and s modifiers.

---
 source/regex.h2 | 62 ++++++++++++++++++++++++-------------------------
 1 file changed, 31 insertions(+), 31 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index e98e7f9e88..1ea291317b 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -12,16 +12,6 @@
 
 #include 
 
-template
-inline decltype(auto) pop_mod (Modifier& modifier) {
-    if constexpr (do_pop) {
-        return Modifier::pop();
-    }
-    else {
-        return modifier;
-    }
-}
-
 cpp2: namespace = {
 
 regex: namespace = {
@@ -39,7 +29,9 @@ bstring:  type == std::basic_string;
 //
 
 expression_flags: type = {
-    case_insensitive : int == 1;
+    case_insensitive : int == 1;  // mod: i
+    multiple_lines: int    == 2;  // mod: m
+    single_line: int       == 4;  // mod: s
 }
 
 match_group: @struct  type = {
@@ -125,7 +117,7 @@ match_context:  type =
 match_modifiers_state_change:  type = {
 
     reset: bool == reset_;
-    add: bool == add_;
+    add: int == add_;
     remove: int == remove_;
     has_change: bool == has_change_;
 
@@ -394,9 +386,12 @@ alternative_matcher_logic:  type = {
 any_matcher_logic:  type =
 {
     match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
-        if cur != ctx.end {
+        if cur != ctx.end &&
+          (modifiers.has_flag(expression_flags::single_line) ||
+           cur* != '\n') {
             return Other::match(cur + 1, ctx, modifiers);
-        } else {
+        }
+        else {
             return match_return(false, ctx.end);
         }
     }
@@ -600,15 +595,13 @@ group_ref_matcher_logic:  type = {
 
 // Regex syntax: $  Example: aa$
 //
-// Also matches new lines endings.
-//
 line_end_matcher_logic:  type =
 {
     match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
-        if cur == ctx.end || (match_new_line && cur* == '\n') {
+        if cur == ctx.end || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines) && cur* == '\n') {
             return Other::match(cur, ctx, modifiers);
         }
-        else if !match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special cas for new line at end.
+        else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end.
             return Other::match(cur, ctx, modifiers);
         }
         else {
@@ -622,12 +615,10 @@ line_end_matcher_logic:  type =
 {
     match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
-        if cur == ctx.begin || (match_new_line && (cur - 1)* == '\n') {
+        if cur == ctx.begin || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n') {
             return Other::match(cur, ctx, modifiers);
         }
         else {
@@ -1185,6 +1176,15 @@ regex_parser:  type = {
         add    := 0;
         remove := 0;
 
+        apply := :(flag: int) = {
+            if is_negative&$* {
+                remove&$* += flag;
+            }
+            else {
+                add&$* += flag;
+            }
+        };
+
         for change_str do (cur) {
             if cur == '^' {
                 is_reset = true;
@@ -1193,13 +1193,11 @@ regex_parser:  type = {
                 if is_reset { error("No negative modifier allowed."); return false; }
                 is_negative = true;
             }
-            else if cur == 'i' {
-                if is_negative {
-                    remove += expression_flags::case_insensitive;
-                }
-                else {
-                    add += expression_flags::case_insensitive;
-                }
+            else if cur == 'i' { apply(expression_flags::case_insensitive); }
+            else if cur == 'm' { apply(expression_flags::multiple_lines); }
+            else if cur == 's' { apply(expression_flags::single_line); }
+            else {
+                error("Unknown modifier: (cur)$"); return false;
             }
         }
 
@@ -1224,7 +1222,7 @@ regex_parser:  type = {
             return true;
         }
         else if c == '$' {
-            cur_state.add(create_matcher("line_end_matcher_logic", "true, false"));
+            cur_state.add(create_matcher("line_end_matcher_logic", "true, true"));
             return true;
         }
 
@@ -1407,7 +1405,7 @@ regex_parser:  type = {
         else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {
                 // TODO: Provide proper escape for cppfront capture
-                cur_state.add(create_matcher("line_end_matcher_logic", "true, false"));
+                cur_state.add(create_matcher("line_end_matcher_logic", "true, true"));
             }
             else {
                 cur_state.add(create_matcher("escaped_char_matcher_logic", "'(c_next)$', '(safe_tolower(c_next))$', '(safe_toupper(c_next))$'"));
@@ -1697,7 +1695,9 @@ regex_parser:  type = {
         while mod_pos != modifier.size() next mod_pos += 1 {
             c: char = modifier[mod_pos];
 
-            if c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            if      c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            else if c == 'm' { add("::cpp2::regex::expression_flags::multiple_lines", r); }
+            else if c == 's' { add("::cpp2::regex::expression_flags::single_line", r); }
             else { error("Unknown modifier: '(c)$'"); }
         }
 

From d0b4c00763791df940530ad0b583c48207b20797 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 3 Mar 2024 15:15:33 +0100
Subject: [PATCH 065/161] Bugfix for wrong none-greedy parsing.

---
 include/cpp2regex.h | 719 ++++++++++++++++++++++----------------------
 source/regex.h2     |  15 +-
 2 files changed, 377 insertions(+), 357 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 10a8ab2b0a..30534d4035 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,145 +10,145 @@
 
 #line 1 "regex.h2"
 
-#line 25 "regex.h2"
+#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 41 "regex.h2"
+#line 31 "regex.h2"
 class expression_flags;
     
 
-#line 45 "regex.h2"
+#line 37 "regex.h2"
 template class match_group;
     
 
-#line 52 "regex.h2"
+#line 44 "regex.h2"
 template class match_return;
     
 
-#line 57 "regex.h2"
+#line 49 "regex.h2"
 template class match_context;
 
-#line 125 "regex.h2"
+#line 117 "regex.h2"
 template class match_modifiers_state_change;
 
-#line 148 "regex.h2"
+#line 140 "regex.h2"
 template class match_modifiers;
 
-#line 171 "regex.h2"
+#line 163 "regex.h2"
 template class matcher_list;
     
 
-#line 198 "regex.h2"
+#line 190 "regex.h2"
 template class single_class_entry;
 
-#line 206 "regex.h2"
+#line 198 "regex.h2"
 template class range_class_entry;
 
-#line 214 "regex.h2"
+#line 206 "regex.h2"
 template class combined_class_entry;
     
 
-#line 221 "regex.h2"
+#line 213 "regex.h2"
 template class list_class_entry;
     
 
-#line 228 "regex.h2"
+#line 220 "regex.h2"
 template class named_class_entry;
     
 
-#line 233 "regex.h2"
+#line 225 "regex.h2"
 template class negated_class_entry;
     
 
-#line 240 "regex.h2"
+#line 232 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 293 "regex.h2"
+#line 285 "regex.h2"
 template class extract_position_helper;
     
 
-#line 310 "regex.h2"
+#line 302 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 394 "regex.h2"
+#line 386 "regex.h2"
 template class any_matcher_logic;
 
-#line 410 "regex.h2"
+#line 405 "regex.h2"
 template class char_matcher_logic;
 
-#line 438 "regex.h2"
+#line 433 "regex.h2"
 template class class_matcher_logic;
 
-#line 487 "regex.h2"
+#line 482 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 495 "regex.h2"
+#line 490 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 504 "regex.h2"
+#line 499 "regex.h2"
 template class global_group_reset;
     
 
-#line 516 "regex.h2"
+#line 511 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 544 "regex.h2"
+#line 539 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 570 "regex.h2"
+#line 565 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 605 "regex.h2"
+#line 598 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 627 "regex.h2"
+#line 618 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 644 "regex.h2"
+#line 635 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 656 "regex.h2"
+#line 647 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 660 "regex.h2"
+#line 651 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 686 "regex.h2"
+#line 677 "regex.h2"
 template class range_matcher_logic;
 
-#line 814 "regex.h2"
+#line 805 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 833 "regex.h2"
+#line 824 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 884 "regex.h2"
+#line 875 "regex.h2"
 template class group_name_list;
 
-#line 896 "regex.h2"
+#line 887 "regex.h2"
 class group_name_list_end;
     
 
-#line 901 "regex.h2"
+#line 892 "regex.h2"
 template class regular_expression;
 
-#line 985 "regex.h2"
+#line 976 "regex.h2"
 class regex_parser_state;
 
-#line 1017 "regex.h2"
+#line 1008 "regex.h2"
 template class regex_parser;
 
-#line 1730 "regex.h2"
+#line 1737 "regex.h2"
 }
 }
 
@@ -170,17 +170,7 @@ template class regex_parser;
 
 #include 
 
-template
-inline decltype(auto) pop_mod (Modifier& modifier) {
-    if constexpr (do_pop) {
-        return Modifier::pop();
-    }
-    else {
-        return modifier;
-    }
-}
-
-#line 25 "regex.h2"
+#line 15 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -198,13 +188,15 @@ template using bstring = std::basic_string;
 //
 
 class expression_flags {
-    public: static const int case_insensitive;
+    public: static const int case_insensitive;// mod: i
+    public: static const int multiple_lines;// mod: m
+    public: static const int single_line;// mod: s
 
     public: expression_flags() = default;
     public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(expression_flags const&) -> void = delete;
 };
-#line 44 "regex.h2"
+#line 36 "regex.h2"
 
 template class match_group {
     public: Iter start {}; 
@@ -228,13 +220,13 @@ template cl
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     public: match_context(match_context const& that);
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -243,19 +235,19 @@ template cl
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 82 "regex.h2"
+#line 74 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
 
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 90 "regex.h2"
+#line 82 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 94 "regex.h2"
+#line 86 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 98 "regex.h2"
+#line 90 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -264,30 +256,30 @@ template cl
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 108 "regex.h2"
+#line 100 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 123 "regex.h2"
+#line 115 "regex.h2"
 };
 
 template class match_modifiers_state_change {
 
     public: static const bool reset;
-    public: static const bool add;
+    public: static const int add;
     public: static const int remove;
     public: static const bool has_change;
 
     public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
 
-#line 143 "regex.h2"
+#line 135 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: match_modifiers_state_change() = default;
     public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_modifiers_state_change const&) -> void = delete;
 
-#line 144 "regex.h2"
+#line 136 "regex.h2"
 };
 
 using match_modifiers_no_change = match_modifiers_state_change;
@@ -311,7 +303,7 @@ template class match_modifiers {
     public: auto operator=(match_modifiers const&) -> void = delete;
 
 
-#line 164 "regex.h2"
+#line 156 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -324,7 +316,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto;
 
-#line 177 "regex.h2"
+#line 169 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
@@ -337,7 +329,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 185 "regex.h2"
+#line 177 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -359,7 +351,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 202 "regex.h2"
+#line 194 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -372,7 +364,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 210 "regex.h2"
+#line 202 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -384,7 +376,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 217 "regex.h2"
+#line 209 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -396,7 +388,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 224 "regex.h2"
+#line 216 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 231 "regex.h2"
+#line 223 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -418,7 +410,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 236 "regex.h2"
+#line 228 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -430,10 +422,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 243 "regex.h2"
+#line 235 "regex.h2"
 };
 
-#line 246 "regex.h2"
+#line 238 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -464,7 +456,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 277 "regex.h2"
+#line 269 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -478,20 +470,20 @@ template                      using short_not_word_class = negat
 //-----------------------------------------------------------------------
 //
 
-#line 291 "regex.h2"
+#line 283 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 302 "regex.h2"
+#line 294 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 304 "regex.h2"
+#line 296 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -502,20 +494,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto;
 
-#line 324 "regex.h2"
+#line 316 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 342 "regex.h2"
+#line 334 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 390 "regex.h2"
+#line 382 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -524,14 +516,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 404 "regex.h2"
+#line 399 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 406 "regex.h2"
+#line 401 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -540,27 +532,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 431 "regex.h2"
+#line 426 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 433 "regex.h2"
+#line 428 "regex.h2"
 };
 
-#line 436 "regex.h2"
+#line 431 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 459 "regex.h2"
+#line 454 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 471 "regex.h2"
+#line 466 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -569,7 +561,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 483 "regex.h2"
+#line 478 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -582,7 +574,7 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 491 "regex.h2"
+#line 486 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -590,13 +582,13 @@ template class empty_matcher_logic {
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 499 "regex.h2"
+#line 494 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 500 "regex.h2"
+#line 495 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -604,14 +596,14 @@ template class escaped_char_matcher_l
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 510 "regex.h2"
+#line 505 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 512 "regex.h2"
+#line 507 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -619,7 +611,7 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 524 "regex.h2"
+#line 519 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -628,13 +620,13 @@ template
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 542 "regex.h2"
+#line 537 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 556 "regex.h2"
+#line 551 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -643,7 +635,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 566 "regex.h2"
+#line 561 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -651,50 +643,46 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 597 "regex.h2"
+#line 592 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 599 "regex.h2"
+#line 594 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
-// Also matches new lines endings.
-//
 template class line_end_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 619 "regex.h2"
+#line 612 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 621 "regex.h2"
+#line 614 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
 //
-// Also matches new line starts.
-//
 template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 638 "regex.h2"
+#line 629 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 640 "regex.h2"
+#line 631 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -703,14 +691,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 649 "regex.h2"
+#line 640 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 651 "regex.h2"
+#line 642 "regex.h2"
 };
 
 // Named character classes
@@ -723,7 +711,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 659 "regex.h2"
+#line 650 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -731,7 +719,7 @@ template                    void = delete;
 
 
-#line 662 "regex.h2"
+#line 653 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -741,7 +729,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 672 "regex.h2"
+#line 663 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -753,40 +741,40 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 685 "regex.h2"
+#line 676 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 697 "regex.h2"
+#line 688 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 725 "regex.h2"
+#line 716 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 730 "regex.h2"
+#line 721 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 735 "regex.h2"
+#line 726 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 741 "regex.h2"
+#line 732 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 756 "regex.h2"
+#line 747 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return;
 
-#line 786 "regex.h2"
+#line 777 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 810 "regex.h2"
+#line 801 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -799,7 +787,7 @@ template void = delete;
 
 
-#line 827 "regex.h2"
+#line 818 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -810,7 +798,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 864 "regex.h2"
+#line 855 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -818,10 +806,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 872 "regex.h2"
+#line 863 "regex.h2"
 };
 
-#line 875 "regex.h2"
+#line 866 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -839,7 +827,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 894 "regex.h2"
+#line 885 "regex.h2"
 };
 
 class group_name_list_end {
@@ -848,7 +836,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 898 "regex.h2"
+#line 889 "regex.h2"
 };
 
 // Regular expression implementation
@@ -859,7 +847,7 @@ template> str, auto const& pos) -> auto;
 
-#line 915 "regex.h2"
+#line 906 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -867,7 +855,7 @@ template matched_, context const& ctx_);
 
-#line 925 "regex.h2"
+#line 916 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -882,7 +870,7 @@ template void = delete;
 
 
-#line 941 "regex.h2"
+#line 932 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -890,19 +878,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 953 "regex.h2"
+#line 944 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 975 "regex.h2"
+#line 966 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 976 "regex.h2"
+#line 967 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -922,19 +910,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 999 "regex.h2"
+#line 990 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 1004 "regex.h2"
+#line 995 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1013 "regex.h2"
+#line 1004 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 1017 "regex.h2"
+#line 1008 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -955,104 +943,107 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1041 "regex.h2"
+#line 1032 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 1049 "regex.h2"
+#line 1040 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 1053 "regex.h2"
+#line 1044 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 1068 "regex.h2"
+#line 1059 "regex.h2"
+    public: [[nodiscard]] auto skip() & -> bool;
+
+#line 1066 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1076 "regex.h2"
+#line 1074 "regex.h2"
     public: [[nodiscard]] auto peek() & -> char;
 
-#line 1085 "regex.h2"
+#line 1083 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 1102 "regex.h2"
+#line 1100 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1122 "regex.h2"
+#line 1120 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1129 "regex.h2"
+#line 1127 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1136 "regex.h2"
+#line 1134 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1159 "regex.h2"
+#line 1157 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 1169 "regex.h2"
+#line 1167 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 1181 "regex.h2"
+#line 1179 "regex.h2"
     public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool;
 
-#line 1211 "regex.h2"
+#line 1216 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1221 "regex.h2"
+#line 1226 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1234 "regex.h2"
+#line 1239 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1242 "regex.h2"
+#line 1247 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1362 "regex.h2"
+#line 1367 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1473 "regex.h2"
+#line 1478 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1545 "regex.h2"
+#line 1550 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1554 "regex.h2"
+#line 1559 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1628 "regex.h2"
+#line 1633 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1665 "regex.h2"
+#line 1670 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1688 "regex.h2"
+#line 1693 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1707 "regex.h2"
+#line 1714 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1721 "regex.h2"
+#line 1728 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1730 "regex.h2"
+#line 1737 "regex.h2"
 }
 }
 
@@ -1061,42 +1052,44 @@ template [[nodiscard]] auto generate_template(cpp2::in match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 68 "regex.h2"
+#line 60 "regex.h2"
     }
 
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 70 "regex.h2"
+#line 62 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1104,49 +1097,49 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 74 "regex.h2"
+#line 66 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 76 "regex.h2"
+#line 68 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::cmp_greater_eq(group,max_groups)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 82 "regex.h2"
+#line 74 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
-#line 83 "regex.h2"
+#line 75 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
 
-#line 85 "regex.h2"
+#line 77 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 90 "regex.h2"
+#line 82 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 94 "regex.h2"
+#line 86 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 98 "regex.h2"
+#line 90 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 102 "regex.h2"
+#line 94 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 104 "regex.h2"
+#line 96 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 110 "regex.h2"
+#line 102 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -1161,13 +1154,13 @@ namespace regex {
         return r; 
     }
 
-#line 127 "regex.h2"
+#line 119 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
-    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::add = add_;
+    template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
 
-#line 132 "regex.h2"
+#line 124 "regex.h2"
     template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
         auto new_flags {old_flags}; 
         if (reset) {
@@ -1179,79 +1172,79 @@ namespace regex {
         return new_flags; 
     }
 
-#line 143 "regex.h2"
+#line 135 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 150 "regex.h2"
+#line 142 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
-#line 154 "regex.h2"
+#line 146 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
-#line 155 "regex.h2"
+#line 147 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
-#line 156 "regex.h2"
+#line 148 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
-#line 161 "regex.h2"
+#line 153 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 172 "regex.h2"
+#line 164 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 174 "regex.h2"
+#line 166 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto { 
         return match_select(cur, ctx, modifiers);  }
 
-#line 177 "regex.h2"
+#line 169 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { 
         return First::match(cur, ctx, modifiers, matcher_list());  }
-#line 179 "regex.h2"
+#line 171 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_return(true, cur);  }
 
-#line 181 "regex.h2"
+#line 173 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 182 "regex.h2"
+#line 174 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 184 "regex.h2"
+#line 176 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 200 "regex.h2"
+#line 192 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 201 "regex.h2"
+#line 193 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 208 "regex.h2"
+#line 200 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 209 "regex.h2"
+#line 201 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 215 "regex.h2"
+#line 207 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 216 "regex.h2"
+#line 208 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 222 "regex.h2"
+#line 214 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 223 "regex.h2"
+#line 215 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 229 "regex.h2"
+#line 221 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 230 "regex.h2"
+#line 222 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 235 "regex.h2"
+#line 227 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 241 "regex.h2"
+#line 233 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 242 "regex.h2"
+#line 234 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 294 "regex.h2"
+#line 286 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto r {Other::match(cur, ctx, modifiers)}; 
         if (r.matched) {
@@ -1260,12 +1253,12 @@ namespace regex {
         return r; 
     }
 
-#line 302 "regex.h2"
+#line 294 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 303 "regex.h2"
+#line 295 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 312 "regex.h2"
+#line 304 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1278,12 +1271,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 324 "regex.h2"
+#line 316 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 325 "regex.h2"
+#line 317 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 327 "regex.h2"
+#line 319 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, tail)}; 
         if (r.matched) {
@@ -1299,7 +1292,7 @@ namespace regex {
         }
     }
 
-#line 342 "regex.h2"
+#line 334 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto{
         auto r {First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()))}; 
 
@@ -1315,7 +1308,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 358 "regex.h2"
+#line 350 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1327,7 +1320,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 370 "regex.h2"
+#line 362 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1349,21 +1342,24 @@ namespace regex {
         }
     }
 
-#line 396 "regex.h2"
+#line 388 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        if (cur != ctx.end) {
+        if (cur != ctx.end && 
+          (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
+           *cpp2::assert_not_null(cur) != '\n')) {
             return Other::match(cur + 1, ctx, modifiers); 
-        }else {
+        }
+        else {
             return match_return(false, ctx.end); 
         }
     }
 
-#line 404 "regex.h2"
+#line 399 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 405 "regex.h2"
+#line 400 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 412 "regex.h2"
+#line 407 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1383,12 +1379,12 @@ namespace regex {
         }
 
     }
-#line 431 "regex.h2"
+#line 426 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 432 "regex.h2"
+#line 427 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 440 "regex.h2"
+#line 435 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1408,7 +1404,7 @@ namespace regex {
         }
     }
 
-#line 459 "regex.h2"
+#line 454 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1421,10 +1417,10 @@ namespace regex {
         return r; 
     }
 
-#line 471 "regex.h2"
+#line 466 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 473 "regex.h2"
+#line 468 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1436,28 +1432,28 @@ namespace regex {
         return r; 
     }
 
-#line 488 "regex.h2"
+#line 483 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
-#line 489 "regex.h2"
+#line 484 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 490 "regex.h2"
+#line 485 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
 
-#line 499 "regex.h2"
+#line 494 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 505 "regex.h2"
+#line 500 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers); 
     }
 
-#line 510 "regex.h2"
+#line 505 "regex.h2"
     template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
-#line 511 "regex.h2"
+#line 506 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
 
-#line 517 "regex.h2"
+#line 512 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -1465,10 +1461,10 @@ namespace regex {
         return Other::match(cur, ctx, Modifiers::push(ModifierChange())); 
     }
 
-#line 524 "regex.h2"
+#line 519 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 526 "regex.h2"
+#line 521 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1486,7 +1482,7 @@ namespace regex {
         }
     }
 
-#line 545 "regex.h2"
+#line 540 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -1498,10 +1494,10 @@ namespace regex {
         return r; 
     }
 
-#line 556 "regex.h2"
+#line 551 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 558 "regex.h2"
+#line 553 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1511,7 +1507,7 @@ namespace regex {
         }
     }
 
-#line 571 "regex.h2"
+#line 566 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1538,17 +1534,17 @@ namespace regex {
         }
 
     }
-#line 597 "regex.h2"
+#line 592 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 598 "regex.h2"
+#line 593 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 607 "regex.h2"
+#line 600 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        if (cur == ctx.end || (match_new_line && *cpp2::assert_not_null(cur) == '\n')) {
+        if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
         }
-        else {if (!(match_new_line_before_end) && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special cas for new line at end.
+        else {if (match_new_line_before_end && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end.
             return Other::match(cur, ctx, modifiers); 
         }
         else {
@@ -1556,14 +1552,14 @@ namespace regex {
         }}
     }
 
-#line 619 "regex.h2"
+#line 612 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 620 "regex.h2"
+#line 613 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 629 "regex.h2"
+#line 620 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        if (cur == ctx.begin || (match_new_line && *cpp2::assert_not_null((cur - 1)) == '\n')) {
+        if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
         }
         else {
@@ -1571,24 +1567,24 @@ namespace regex {
         }
 
     }
-#line 638 "regex.h2"
+#line 629 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 639 "regex.h2"
+#line 630 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 646 "regex.h2"
+#line 637 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange())); 
     }
-#line 649 "regex.h2"
+#line 640 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 650 "regex.h2"
+#line 641 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 658 "regex.h2"
+#line 649 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 688 "regex.h2"
+#line 679 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if (greedy) {
             return match_greedy(0, cur, cur, ctx, modifiers, tail); 
@@ -1598,10 +1594,10 @@ namespace regex {
         }
     }
 
-#line 697 "regex.h2"
+#line 688 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 699 "regex.h2"
+#line 690 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1628,26 +1624,26 @@ namespace regex {
       return r; 
     }
 
-#line 725 "regex.h2"
+#line 716 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 730 "regex.h2"
+#line 721 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 735 "regex.h2"
+#line 726 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 741 "regex.h2"
+#line 732 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {match_return(true, cur)}; 
         auto count {0}; 
@@ -1663,7 +1659,7 @@ namespace regex {
         return res; 
     }
 
-#line 756 "regex.h2"
+#line 747 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{
         auto r {M::match(cur, ctx, modifiers, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1694,7 +1690,7 @@ namespace regex {
         }
     }
 
-#line 786 "regex.h2"
+#line 777 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
@@ -1720,7 +1716,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 816 "regex.h2"
+#line 807 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -1733,7 +1729,7 @@ namespace regex {
         return r; 
     }
 
-#line 835 "regex.h2"
+#line 826 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1763,9 +1759,9 @@ namespace regex {
         }
 
     }
-#line 864 "regex.h2"
+#line 855 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 865 "regex.h2"
+#line 856 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1774,7 +1770,7 @@ namespace regex {
         }
     }
 
-#line 886 "regex.h2"
+#line 877 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1784,10 +1780,10 @@ namespace regex {
         }
     }
 
-#line 897 "regex.h2"
+#line 888 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 906 "regex.h2"
+#line 897 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1797,31 +1793,31 @@ namespace regex {
         }
     }
 
-#line 920 "regex.h2"
+#line 911 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 923 "regex.h2"
+#line 914 "regex.h2"
         }
 
-#line 925 "regex.h2"
+#line 916 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 926 "regex.h2"
+#line 917 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 927 "regex.h2"
+#line 918 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 928 "regex.h2"
+#line 919 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 930 "regex.h2"
+#line 921 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 931 "regex.h2"
+#line 922 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 932 "regex.h2"
+#line 923 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 934 "regex.h2"
+#line 925 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1830,13 +1826,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 943 "regex.h2"
+#line 934 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 944 "regex.h2"
+#line 935 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 945 "regex.h2"
+#line 936 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 946 "regex.h2"
+#line 937 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1844,13 +1840,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 953 "regex.h2"
+#line 944 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 954 "regex.h2"
+#line 945 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 955 "regex.h2"
+#line 946 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 956 "regex.h2"
+#line 947 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1870,26 +1866,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 975 "regex.h2"
+#line 966 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 993 "regex.h2"
+#line 984 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 999 "regex.h2"
+#line 990 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 1004 "regex.h2"
+#line 995 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1006 "regex.h2"
+#line 997 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1897,31 +1893,31 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1013 "regex.h2"
+#line 1004 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1035 "regex.h2"
+#line 1026 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1039 "regex.h2"
+#line 1030 "regex.h2"
     }
 
-#line 1043 "regex.h2"
+#line 1034 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 1049 "regex.h2"
+#line 1040 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 1056 "regex.h2"
+#line 1047 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1934,7 +1930,15 @@ namespace regex {
         }
     }
 
-#line 1068 "regex.h2"
+#line 1059 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::skip() & -> bool{
+        cpp2::deferred_init c; 
+        auto r {next(cpp2::out(&c))}; 
+        static_cast(std::move(c.value()));
+        return r; 
+    }
+
+#line 1066 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -1943,7 +1947,7 @@ namespace regex {
         }
     }
 
-#line 1076 "regex.h2"
+#line 1074 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() & -> char{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
@@ -1953,10 +1957,10 @@ namespace regex {
         }
     }
 
-#line 1085 "regex.h2"
+#line 1083 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_one_of(std::string(1, e), cpp2::out(&r));  }
 
-#line 1087 "regex.h2"
+#line 1085 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find_first_of)(regex, e, pos)}; 
@@ -1972,7 +1976,7 @@ namespace regex {
         }
     }
 
-#line 1102 "regex.h2"
+#line 1100 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -1993,13 +1997,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1124 "regex.h2"
+#line 1122 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1129 "regex.h2"
+#line 1127 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2007,10 +2011,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1136 "regex.h2"
+#line 1134 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1138 "regex.h2"
+#line 1136 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -2032,7 +2036,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1159 "regex.h2"
+#line 1157 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2043,7 +2047,7 @@ namespace regex {
         return r; 
     }
 
-#line 1169 "regex.h2"
+#line 1167 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -2056,7 +2060,7 @@ namespace regex {
         return r; 
     }
 
-#line 1181 "regex.h2"
+#line 1179 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2064,6 +2068,15 @@ namespace regex {
         auto add {0}; 
         auto remove {0}; 
 
+        auto apply {[&, _1 = (&is_negative), _2 = (&remove), _3 = (&add)](cpp2::in flag) mutable -> void{
+            if (*cpp2::assert_not_null(_1)) {
+                *cpp2::assert_not_null(_2) += flag;
+            }
+            else {
+                *cpp2::assert_not_null(_3) += flag;
+            }
+        }}; 
+
         for ( auto const& cur : change_str ) {
             if (cur == '^') {
                 is_reset = true;
@@ -2072,14 +2085,12 @@ namespace regex {
                 if (is_reset) {error("No negative modifier allowed."); return false; }
                 is_negative = true;
             }
-            else {if (cur == 'i') {
-                if (is_negative) {
-                    remove += expression_flags::case_insensitive;
-                }
-                else {
-                    add += expression_flags::case_insensitive;
-                }
-            }}}
+            else {if (cur == 'i') {apply(expression_flags::case_insensitive); }
+            else {if (cur == 'm') {apply(expression_flags::multiple_lines); }
+            else {if (cur == 's') {apply(expression_flags::single_line); }
+            else {
+                error(("Unknown modifier: " + cpp2::to_string(cur))); return false; 
+            }}}}}
         }
 
         modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
@@ -2087,7 +2098,7 @@ namespace regex {
         return true; 
     }
 
-#line 1214 "regex.h2"
+#line 1219 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2095,21 +2106,21 @@ namespace regex {
         return true; 
     }
 
-#line 1221 "regex.h2"
+#line 1226 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
             return true; 
         }
         else {if (c == '$') {
-            CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
+            CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, true"));
             return true; 
         }}
 
         return false; 
     }
 
-#line 1234 "regex.h2"
+#line 1239 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -2118,7 +2129,7 @@ namespace regex {
         return false; 
     }
 
-#line 1242 "regex.h2"
+#line 1247 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2239,7 +2250,7 @@ namespace regex {
         return true; 
     }
 
-#line 1362 "regex.h2"
+#line 1367 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2288,7 +2299,7 @@ namespace regex {
         else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
             if (c_next == '$') {
                 // TODO: Provide proper escape for cppfront capture
-                CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, false"));
+                CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, true"));
             }
             else {
                 CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "', '" + cpp2::to_string(safe_tolower(c_next)) + "', '" + cpp2::to_string(safe_toupper(c_next)) + "'")));
@@ -2351,7 +2362,7 @@ namespace regex {
         return true; 
     }
 
-#line 1473 "regex.h2"
+#line 1478 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -2424,7 +2435,7 @@ namespace regex {
         return true; 
     }
 
-#line 1545 "regex.h2"
+#line 1550 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2434,7 +2445,7 @@ namespace regex {
         return false; 
     }
 
-#line 1554 "regex.h2"
+#line 1559 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2449,11 +2460,12 @@ namespace regex {
 
         if (c != '{') {return false; }
         if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element.");return false; }
+        if (!(skip())) {error("End of regex before closing '}'."); return false; }
 
-        size_t end {CPP2_UFCS(find)(regex, "}", pos)}; 
-        if (end == std::string::npos) {error("Missing closing bracket."); return false; }
+        std::string inner {""}; 
+        if (!(grab_until('}', cpp2::out(&inner)))) {error("Missing closing bracket."); return false; }
 
-        std::string inner {trim_copy(CPP2_UFCS(substr)(regex, pos + 1, end - pos - 1))}; 
+        inner = trim_copy(inner);
         if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
         auto greedy {true}; 
@@ -2504,12 +2516,11 @@ namespace regex {
         }
 
         CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive))));  });
-        pos = std::move(end);
 
         return true; 
     }
 
-#line 1628 "regex.h2"
+#line 1633 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2547,7 +2558,7 @@ namespace regex {
         return true; 
     }
 
-#line 1665 "regex.h2"
+#line 1670 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2571,7 +2582,7 @@ namespace regex {
         }
     }
 
-#line 1688 "regex.h2"
+#line 1693 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2584,14 +2595,16 @@ namespace regex {
         for( ; mod_pos != CPP2_UFCS(size)(modifier); mod_pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
 
-            if (c == 'i') {add("::cpp2::regex::expression_flags::case_insensitive", r); }
-            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }
+            if (     c == 'i') { add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            else {if (c == 'm') {add("::cpp2::regex::expression_flags::multiple_lines", r); }
+            else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
+            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}
         }
 
         return r; 
     }
 
-#line 1707 "regex.h2"
+#line 1714 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -2606,7 +2619,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1723 "regex.h2"
+#line 1730 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 1ea291317b..91396b5e76 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1056,6 +1056,13 @@ regex_parser:  type = {
         }
     }
 
+    skip: (inout this) -> bool = {
+        c: char;
+        r := next(out c);
+        _ = c;
+        return r;
+    }
+
     current: (in this) -> char = {
         if pos < regex.size() {
             return regex[pos];
@@ -1563,11 +1570,12 @@ regex_parser:  type = {
 
         if c != '{' { return false; }
         if cur_state.empty() { error("'{' without previous element.");  return false; }
+        if !skip() { error("End of regex before closing '}'."); return false; }
 
-        end: size_t = regex.find("}", pos);
-        if end == std::string::npos { error("Missing closing bracket."); return false; }
+        inner: std::string = "";
+        if !grab_until('}', out inner) { error("Missing closing bracket."); return false; }
 
-        inner: std::string = trim_copy(regex.substr(pos + 1, end - pos - 1));
+        inner = trim_copy(inner);
         if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
         greedy := true;
@@ -1618,7 +1626,6 @@ regex_parser:  type = {
         }
 
         cur_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$, (greedy)$, (possessive)$"));
-        pos = end;
 
         return true;
     }

From 1022c48769e8e4bbafe26ca0dd6673ece0767f44 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 3 Mar 2024 15:34:01 +0100
Subject: [PATCH 066/161] Fixes for regex results.

---
 include/cpp2regex.h | 611 ++++++++++++++++++++++----------------------
 source/regex.h2     |  16 +-
 2 files changed, 325 insertions(+), 302 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 30534d4035..ba8a8f49f4 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -30,125 +30,125 @@ template class match_return;
 #line 49 "regex.h2"
 template class match_context;
 
-#line 117 "regex.h2"
+#line 127 "regex.h2"
 template class match_modifiers_state_change;
 
-#line 140 "regex.h2"
+#line 150 "regex.h2"
 template class match_modifiers;
 
-#line 163 "regex.h2"
+#line 173 "regex.h2"
 template class matcher_list;
     
 
-#line 190 "regex.h2"
+#line 200 "regex.h2"
 template class single_class_entry;
 
-#line 198 "regex.h2"
+#line 208 "regex.h2"
 template class range_class_entry;
 
-#line 206 "regex.h2"
+#line 216 "regex.h2"
 template class combined_class_entry;
     
 
-#line 213 "regex.h2"
+#line 223 "regex.h2"
 template class list_class_entry;
     
 
-#line 220 "regex.h2"
+#line 230 "regex.h2"
 template class named_class_entry;
     
 
-#line 225 "regex.h2"
+#line 235 "regex.h2"
 template class negated_class_entry;
     
 
-#line 232 "regex.h2"
+#line 242 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 285 "regex.h2"
+#line 295 "regex.h2"
 template class extract_position_helper;
     
 
-#line 302 "regex.h2"
+#line 312 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 386 "regex.h2"
+#line 396 "regex.h2"
 template class any_matcher_logic;
 
-#line 405 "regex.h2"
+#line 415 "regex.h2"
 template class char_matcher_logic;
 
-#line 433 "regex.h2"
+#line 443 "regex.h2"
 template class class_matcher_logic;
 
-#line 482 "regex.h2"
+#line 492 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 490 "regex.h2"
+#line 500 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 499 "regex.h2"
+#line 509 "regex.h2"
 template class global_group_reset;
     
 
-#line 511 "regex.h2"
+#line 521 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 539 "regex.h2"
+#line 549 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 565 "regex.h2"
+#line 575 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 598 "regex.h2"
+#line 608 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 618 "regex.h2"
+#line 628 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 635 "regex.h2"
+#line 645 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 647 "regex.h2"
+#line 657 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 651 "regex.h2"
+#line 661 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 677 "regex.h2"
+#line 687 "regex.h2"
 template class range_matcher_logic;
 
-#line 805 "regex.h2"
+#line 815 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 824 "regex.h2"
+#line 834 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 875 "regex.h2"
+#line 885 "regex.h2"
 template class group_name_list;
 
-#line 887 "regex.h2"
+#line 897 "regex.h2"
 class group_name_list_end;
     
 
-#line 892 "regex.h2"
+#line 902 "regex.h2"
 template class regular_expression;
 
-#line 976 "regex.h2"
+#line 986 "regex.h2"
 class regex_parser_state;
 
-#line 1008 "regex.h2"
+#line 1018 "regex.h2"
 template class regex_parser;
 
-#line 1737 "regex.h2"
+#line 1747 "regex.h2"
 }
 }
 
@@ -236,18 +236,21 @@ template cl
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
 #line 74 "regex.h2"
-    public: [[nodiscard]] auto get_group_start(auto const& group) const& -> auto;
-    public: [[nodiscard]] auto get_group_end(auto const& group) const& -> auto;
+    public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
+
+#line 80 "regex.h2"
+    public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
+#line 87 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 82 "regex.h2"
+#line 92 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 86 "regex.h2"
+#line 96 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 90 "regex.h2"
+#line 100 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -256,12 +259,12 @@ template cl
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 100 "regex.h2"
+#line 110 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 115 "regex.h2"
+#line 125 "regex.h2"
 };
 
 template class match_modifiers_state_change {
@@ -273,13 +276,13 @@ template
 
     public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
 
-#line 135 "regex.h2"
+#line 145 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: match_modifiers_state_change() = default;
     public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_modifiers_state_change const&) -> void = delete;
 
-#line 136 "regex.h2"
+#line 146 "regex.h2"
 };
 
 using match_modifiers_no_change = match_modifiers_state_change;
@@ -303,7 +306,7 @@ template class match_modifiers {
     public: auto operator=(match_modifiers const&) -> void = delete;
 
 
-#line 156 "regex.h2"
+#line 166 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -316,7 +319,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto;
 
-#line 169 "regex.h2"
+#line 179 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
@@ -329,7 +332,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 177 "regex.h2"
+#line 187 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -351,7 +354,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 194 "regex.h2"
+#line 204 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -364,7 +367,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 202 "regex.h2"
+#line 212 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -376,7 +379,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 209 "regex.h2"
+#line 219 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -388,7 +391,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 216 "regex.h2"
+#line 226 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 223 "regex.h2"
+#line 233 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -410,7 +413,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 228 "regex.h2"
+#line 238 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -422,10 +425,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 235 "regex.h2"
+#line 245 "regex.h2"
 };
 
-#line 238 "regex.h2"
+#line 248 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -456,7 +459,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 269 "regex.h2"
+#line 279 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -470,20 +473,20 @@ template                      using short_not_word_class = negat
 //-----------------------------------------------------------------------
 //
 
-#line 283 "regex.h2"
+#line 293 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 294 "regex.h2"
+#line 304 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 296 "regex.h2"
+#line 306 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -494,20 +497,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto;
 
-#line 316 "regex.h2"
+#line 326 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 334 "regex.h2"
+#line 344 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 382 "regex.h2"
+#line 392 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -516,14 +519,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 399 "regex.h2"
+#line 409 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 401 "regex.h2"
+#line 411 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -532,27 +535,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 426 "regex.h2"
+#line 436 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 428 "regex.h2"
+#line 438 "regex.h2"
 };
 
-#line 431 "regex.h2"
+#line 441 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 454 "regex.h2"
+#line 464 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 466 "regex.h2"
+#line 476 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -561,7 +564,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 478 "regex.h2"
+#line 488 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -574,7 +577,7 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 486 "regex.h2"
+#line 496 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -582,13 +585,13 @@ template class empty_matcher_logic {
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 494 "regex.h2"
+#line 504 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 495 "regex.h2"
+#line 505 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -596,14 +599,14 @@ template class escaped_char_matcher_l
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 505 "regex.h2"
+#line 515 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 507 "regex.h2"
+#line 517 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -611,7 +614,7 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 519 "regex.h2"
+#line 529 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -620,13 +623,13 @@ template
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 537 "regex.h2"
+#line 547 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 551 "regex.h2"
+#line 561 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -635,7 +638,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 561 "regex.h2"
+#line 571 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -643,14 +646,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 592 "regex.h2"
+#line 602 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 594 "regex.h2"
+#line 604 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -659,14 +662,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 612 "regex.h2"
+#line 622 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 614 "regex.h2"
+#line 624 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -675,14 +678,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 629 "regex.h2"
+#line 639 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 631 "regex.h2"
+#line 641 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -691,14 +694,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 640 "regex.h2"
+#line 650 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 642 "regex.h2"
+#line 652 "regex.h2"
 };
 
 // Named character classes
@@ -711,7 +714,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 650 "regex.h2"
+#line 660 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -719,7 +722,7 @@ template                    void = delete;
 
 
-#line 653 "regex.h2"
+#line 663 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -729,7 +732,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 663 "regex.h2"
+#line 673 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -741,40 +744,40 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 676 "regex.h2"
+#line 686 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 688 "regex.h2"
+#line 698 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 716 "regex.h2"
+#line 726 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 721 "regex.h2"
+#line 731 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 726 "regex.h2"
+#line 736 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 732 "regex.h2"
+#line 742 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 747 "regex.h2"
+#line 757 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return;
 
-#line 777 "regex.h2"
+#line 787 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 801 "regex.h2"
+#line 811 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -787,7 +790,7 @@ template void = delete;
 
 
-#line 818 "regex.h2"
+#line 828 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -798,7 +801,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 855 "regex.h2"
+#line 865 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -806,10 +809,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 863 "regex.h2"
+#line 873 "regex.h2"
 };
 
-#line 866 "regex.h2"
+#line 876 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -827,7 +830,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 885 "regex.h2"
+#line 895 "regex.h2"
 };
 
 class group_name_list_end {
@@ -836,7 +839,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 889 "regex.h2"
+#line 899 "regex.h2"
 };
 
 // Regular expression implementation
@@ -847,7 +850,7 @@ template> str, auto const& pos) -> auto;
 
-#line 906 "regex.h2"
+#line 916 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -855,7 +858,7 @@ template matched_, context const& ctx_);
 
-#line 916 "regex.h2"
+#line 926 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -870,7 +873,7 @@ template void = delete;
 
 
-#line 932 "regex.h2"
+#line 942 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -878,19 +881,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 944 "regex.h2"
+#line 954 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 966 "regex.h2"
+#line 976 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 967 "regex.h2"
+#line 977 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -910,19 +913,19 @@ class regex_parser_state {
 
     public: auto next_alternative() & -> void;
 
-#line 990 "regex.h2"
+#line 1000 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 995 "regex.h2"
+#line 1005 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1004 "regex.h2"
+#line 1014 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 1008 "regex.h2"
+#line 1018 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -943,107 +946,107 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1032 "regex.h2"
+#line 1042 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 1040 "regex.h2"
+#line 1050 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 1044 "regex.h2"
+#line 1054 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 1059 "regex.h2"
+#line 1069 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1066 "regex.h2"
+#line 1076 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1074 "regex.h2"
+#line 1084 "regex.h2"
     public: [[nodiscard]] auto peek() & -> char;
 
-#line 1083 "regex.h2"
+#line 1093 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 1100 "regex.h2"
+#line 1110 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1120 "regex.h2"
+#line 1130 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1127 "regex.h2"
+#line 1137 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1134 "regex.h2"
+#line 1144 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1157 "regex.h2"
+#line 1167 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 1167 "regex.h2"
+#line 1177 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 1179 "regex.h2"
+#line 1189 "regex.h2"
     public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool;
 
-#line 1216 "regex.h2"
+#line 1226 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1226 "regex.h2"
+#line 1236 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1239 "regex.h2"
+#line 1249 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1247 "regex.h2"
+#line 1257 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1367 "regex.h2"
+#line 1377 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1478 "regex.h2"
+#line 1488 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1550 "regex.h2"
+#line 1560 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1559 "regex.h2"
+#line 1569 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1633 "regex.h2"
+#line 1643 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1670 "regex.h2"
+#line 1680 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1693 "regex.h2"
+#line 1703 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1714 "regex.h2"
+#line 1724 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1728 "regex.h2"
+#line 1738 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1737 "regex.h2"
+#line 1747 "regex.h2"
 }
 }
 
@@ -1102,44 +1105,54 @@ namespace regex {
 
 #line 68 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
-        if (cpp2::cmp_greater_eq(group,max_groups)) {
+        if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 #line 74 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); }
-#line 75 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> auto { return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); }
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
+        if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
+            return 0; 
+        }
+        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
+    }
+#line 80 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
+        if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
+            return 0; 
+        }
+        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+    }
 
-#line 77 "regex.h2"
+#line 87 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 82 "regex.h2"
+#line 92 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 86 "regex.h2"
+#line 96 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 90 "regex.h2"
+#line 100 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 94 "regex.h2"
+#line 104 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 96 "regex.h2"
+#line 106 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 102 "regex.h2"
+#line 112 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -1154,13 +1167,13 @@ namespace regex {
         return r; 
     }
 
-#line 119 "regex.h2"
+#line 129 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
 
-#line 124 "regex.h2"
+#line 134 "regex.h2"
     template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
         auto new_flags {old_flags}; 
         if (reset) {
@@ -1172,79 +1185,79 @@ namespace regex {
         return new_flags; 
     }
 
-#line 135 "regex.h2"
+#line 145 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 142 "regex.h2"
+#line 152 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
-#line 146 "regex.h2"
+#line 156 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
-#line 147 "regex.h2"
+#line 157 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
-#line 148 "regex.h2"
+#line 158 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
-#line 153 "regex.h2"
+#line 163 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 164 "regex.h2"
+#line 174 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 166 "regex.h2"
+#line 176 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto { 
         return match_select(cur, ctx, modifiers);  }
 
-#line 169 "regex.h2"
+#line 179 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { 
         return First::match(cur, ctx, modifiers, matcher_list());  }
-#line 171 "regex.h2"
+#line 181 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_return(true, cur);  }
 
-#line 173 "regex.h2"
+#line 183 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 174 "regex.h2"
+#line 184 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 176 "regex.h2"
+#line 186 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 192 "regex.h2"
+#line 202 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 193 "regex.h2"
+#line 203 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 200 "regex.h2"
+#line 210 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 201 "regex.h2"
+#line 211 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 207 "regex.h2"
+#line 217 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 208 "regex.h2"
+#line 218 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 214 "regex.h2"
+#line 224 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 215 "regex.h2"
+#line 225 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 221 "regex.h2"
+#line 231 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 222 "regex.h2"
+#line 232 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 227 "regex.h2"
+#line 237 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 233 "regex.h2"
+#line 243 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 234 "regex.h2"
+#line 244 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 286 "regex.h2"
+#line 296 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto r {Other::match(cur, ctx, modifiers)}; 
         if (r.matched) {
@@ -1253,12 +1266,12 @@ namespace regex {
         return r; 
     }
 
-#line 294 "regex.h2"
+#line 304 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 295 "regex.h2"
+#line 305 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 304 "regex.h2"
+#line 314 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1271,12 +1284,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 316 "regex.h2"
+#line 326 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 317 "regex.h2"
+#line 327 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 319 "regex.h2"
+#line 329 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, tail)}; 
         if (r.matched) {
@@ -1292,7 +1305,7 @@ namespace regex {
         }
     }
 
-#line 334 "regex.h2"
+#line 344 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto{
         auto r {First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()))}; 
 
@@ -1308,7 +1321,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 350 "regex.h2"
+#line 360 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1320,7 +1333,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 362 "regex.h2"
+#line 372 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1342,7 +1355,7 @@ namespace regex {
         }
     }
 
-#line 388 "regex.h2"
+#line 398 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -1354,12 +1367,12 @@ namespace regex {
         }
     }
 
-#line 399 "regex.h2"
+#line 409 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 400 "regex.h2"
+#line 410 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 407 "regex.h2"
+#line 417 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1379,12 +1392,12 @@ namespace regex {
         }
 
     }
-#line 426 "regex.h2"
+#line 436 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 427 "regex.h2"
+#line 437 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 435 "regex.h2"
+#line 445 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1404,7 +1417,7 @@ namespace regex {
         }
     }
 
-#line 454 "regex.h2"
+#line 464 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1417,10 +1430,10 @@ namespace regex {
         return r; 
     }
 
-#line 466 "regex.h2"
+#line 476 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 468 "regex.h2"
+#line 478 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1432,28 +1445,28 @@ namespace regex {
         return r; 
     }
 
-#line 483 "regex.h2"
+#line 493 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
-#line 484 "regex.h2"
+#line 494 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 485 "regex.h2"
+#line 495 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
 
-#line 494 "regex.h2"
+#line 504 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 500 "regex.h2"
+#line 510 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers); 
     }
 
-#line 505 "regex.h2"
+#line 515 "regex.h2"
     template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
-#line 506 "regex.h2"
+#line 516 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
 
-#line 512 "regex.h2"
+#line 522 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -1461,10 +1474,10 @@ namespace regex {
         return Other::match(cur, ctx, Modifiers::push(ModifierChange())); 
     }
 
-#line 519 "regex.h2"
+#line 529 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 521 "regex.h2"
+#line 531 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1482,7 +1495,7 @@ namespace regex {
         }
     }
 
-#line 540 "regex.h2"
+#line 550 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -1494,10 +1507,10 @@ namespace regex {
         return r; 
     }
 
-#line 551 "regex.h2"
+#line 561 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 553 "regex.h2"
+#line 563 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1507,7 +1520,7 @@ namespace regex {
         }
     }
 
-#line 566 "regex.h2"
+#line 576 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1534,12 +1547,12 @@ namespace regex {
         }
 
     }
-#line 592 "regex.h2"
+#line 602 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 593 "regex.h2"
+#line 603 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 600 "regex.h2"
+#line 610 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1552,12 +1565,12 @@ namespace regex {
         }}
     }
 
-#line 612 "regex.h2"
+#line 622 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 613 "regex.h2"
+#line 623 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 620 "regex.h2"
+#line 630 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1567,24 +1580,24 @@ namespace regex {
         }
 
     }
-#line 629 "regex.h2"
+#line 639 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 630 "regex.h2"
+#line 640 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 637 "regex.h2"
+#line 647 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange())); 
     }
-#line 640 "regex.h2"
+#line 650 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 641 "regex.h2"
+#line 651 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 649 "regex.h2"
+#line 659 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 679 "regex.h2"
+#line 689 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if (greedy) {
             return match_greedy(0, cur, cur, ctx, modifiers, tail); 
@@ -1594,10 +1607,10 @@ namespace regex {
         }
     }
 
-#line 688 "regex.h2"
+#line 698 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 690 "regex.h2"
+#line 700 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1624,26 +1637,26 @@ namespace regex {
       return r; 
     }
 
-#line 716 "regex.h2"
+#line 726 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 721 "regex.h2"
+#line 731 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 726 "regex.h2"
+#line 736 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 732 "regex.h2"
+#line 742 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {match_return(true, cur)}; 
         auto count {0}; 
@@ -1659,7 +1672,7 @@ namespace regex {
         return res; 
     }
 
-#line 747 "regex.h2"
+#line 757 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{
         auto r {M::match(cur, ctx, modifiers, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1690,7 +1703,7 @@ namespace regex {
         }
     }
 
-#line 777 "regex.h2"
+#line 787 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
@@ -1716,7 +1729,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 807 "regex.h2"
+#line 817 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -1729,7 +1742,7 @@ namespace regex {
         return r; 
     }
 
-#line 826 "regex.h2"
+#line 836 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1759,9 +1772,9 @@ namespace regex {
         }
 
     }
-#line 855 "regex.h2"
+#line 865 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 856 "regex.h2"
+#line 866 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1770,7 +1783,7 @@ namespace regex {
         }
     }
 
-#line 877 "regex.h2"
+#line 887 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1780,10 +1793,10 @@ namespace regex {
         }
     }
 
-#line 888 "regex.h2"
+#line 898 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 897 "regex.h2"
+#line 907 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1793,31 +1806,31 @@ namespace regex {
         }
     }
 
-#line 911 "regex.h2"
+#line 921 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 914 "regex.h2"
+#line 924 "regex.h2"
         }
 
-#line 916 "regex.h2"
+#line 926 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 917 "regex.h2"
+#line 927 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 918 "regex.h2"
+#line 928 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 919 "regex.h2"
+#line 929 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 921 "regex.h2"
+#line 931 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 922 "regex.h2"
+#line 932 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 923 "regex.h2"
+#line 933 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 925 "regex.h2"
+#line 935 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1826,13 +1839,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 934 "regex.h2"
+#line 944 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 935 "regex.h2"
+#line 945 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 936 "regex.h2"
+#line 946 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 937 "regex.h2"
+#line 947 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1840,13 +1853,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 944 "regex.h2"
+#line 954 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 945 "regex.h2"
+#line 955 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 946 "regex.h2"
+#line 956 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 947 "regex.h2"
+#line 957 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1866,26 +1879,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 966 "regex.h2"
+#line 976 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 984 "regex.h2"
+#line 994 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 990 "regex.h2"
+#line 1000 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 995 "regex.h2"
+#line 1005 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 997 "regex.h2"
+#line 1007 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1893,31 +1906,31 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1004 "regex.h2"
+#line 1014 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1026 "regex.h2"
+#line 1036 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1030 "regex.h2"
+#line 1040 "regex.h2"
     }
 
-#line 1034 "regex.h2"
+#line 1044 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_state);
         return old_state; 
     }
 
-#line 1040 "regex.h2"
+#line 1050 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 1047 "regex.h2"
+#line 1057 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1930,7 +1943,7 @@ namespace regex {
         }
     }
 
-#line 1059 "regex.h2"
+#line 1069 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -1938,7 +1951,7 @@ namespace regex {
         return r; 
     }
 
-#line 1066 "regex.h2"
+#line 1076 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -1947,7 +1960,7 @@ namespace regex {
         }
     }
 
-#line 1074 "regex.h2"
+#line 1084 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() & -> char{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
@@ -1957,10 +1970,10 @@ namespace regex {
         }
     }
 
-#line 1083 "regex.h2"
+#line 1093 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_one_of(std::string(1, e), cpp2::out(&r));  }
 
-#line 1085 "regex.h2"
+#line 1095 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find_first_of)(regex, e, pos)}; 
@@ -1976,7 +1989,7 @@ namespace regex {
         }
     }
 
-#line 1100 "regex.h2"
+#line 1110 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -1997,13 +2010,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1122 "regex.h2"
+#line 1132 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1127 "regex.h2"
+#line 1137 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2011,10 +2024,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1134 "regex.h2"
+#line 1144 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1136 "regex.h2"
+#line 1146 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -2036,7 +2049,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1157 "regex.h2"
+#line 1167 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2047,7 +2060,7 @@ namespace regex {
         return r; 
     }
 
-#line 1167 "regex.h2"
+#line 1177 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -2060,7 +2073,7 @@ namespace regex {
         return r; 
     }
 
-#line 1179 "regex.h2"
+#line 1189 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2098,7 +2111,7 @@ namespace regex {
         return true; 
     }
 
-#line 1219 "regex.h2"
+#line 1229 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2106,7 +2119,7 @@ namespace regex {
         return true; 
     }
 
-#line 1226 "regex.h2"
+#line 1236 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2120,7 +2133,7 @@ namespace regex {
         return false; 
     }
 
-#line 1239 "regex.h2"
+#line 1249 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -2129,7 +2142,7 @@ namespace regex {
         return false; 
     }
 
-#line 1247 "regex.h2"
+#line 1257 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2250,7 +2263,7 @@ namespace regex {
         return true; 
     }
 
-#line 1367 "regex.h2"
+#line 1377 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2362,7 +2375,7 @@ namespace regex {
         return true; 
     }
 
-#line 1478 "regex.h2"
+#line 1488 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -2435,7 +2448,7 @@ namespace regex {
         return true; 
     }
 
-#line 1550 "regex.h2"
+#line 1560 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2445,7 +2458,7 @@ namespace regex {
         return false; 
     }
 
-#line 1559 "regex.h2"
+#line 1569 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2520,7 +2533,7 @@ namespace regex {
         return true; 
     }
 
-#line 1633 "regex.h2"
+#line 1643 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2558,7 +2571,7 @@ namespace regex {
         return true; 
     }
 
-#line 1670 "regex.h2"
+#line 1680 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2582,7 +2595,7 @@ namespace regex {
         }
     }
 
-#line 1693 "regex.h2"
+#line 1703 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2604,7 +2617,7 @@ namespace regex {
         return r; 
     }
 
-#line 1714 "regex.h2"
+#line 1724 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_until('\0');
 
@@ -2619,7 +2632,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1730 "regex.h2"
+#line 1740 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 91396b5e76..fc829807b2 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -66,13 +66,23 @@ match_context:  type =
     get_group: (in this, group) groups[group];
 
     get_group_string: (in this, group) -> std::string = {
-        if group >= max_groups {
+        if group >= max_groups || !groups[group].matched {
             return "";
         }
         return std::string(groups[group].start, groups[group].end);
     }
-    get_group_start:  (in this, group) std::distance(begin, groups[group].start);
-    get_group_end:    (in this, group) std::distance(begin, groups[group].end);
+    get_group_start:  (in this, group) -> int = {
+        if group >= max_groups || !groups[group].matched {
+            return 0;
+        }
+        return std::distance(begin, groups[group].start);
+    }
+    get_group_end:    (in this, group) -> int = {
+        if group >= max_groups || !groups[group].matched {
+            return 0;
+        }
+        return std::distance(begin, groups[group].end);
+    }
 
     set_group_end: (inout this, group, pos) = {
         groups[group].end = pos;

From cb68faa20aa4b31f823ec0c542cd749c9194319f Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 4 Mar 2024 08:48:09 +0100
Subject: [PATCH 067/161] Update for tests.

---
 regression-tests/pure2-regex.cpp2             |  891 ++++++++++++-
 .../gcc-13/pure2-regex.cpp.execution          |  631 ++++++++-
 .../gcc-13/pure2-regex.cpp.output             |  205 ++-
 regression-tests/test-results/pure2-regex.cpp | 1156 ++++++++++++++++-
 4 files changed, 2847 insertions(+), 36 deletions(-)

diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2
index bb8639a35b..8b0c594183 100644
--- a/regression-tests/pure2-regex.cpp2
+++ b/regression-tests/pure2-regex.cpp2
@@ -131,7 +131,7 @@ test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: st
 }
 
 
-test_perl_tests: @regex type = {
+test_general_tests: @regex type = {
   regex_0 := "abc";
   var_regex_0 : std::string = "abc";
   regex_1 := "abc";
@@ -927,12 +927,636 @@ test_perl_tests: @regex type = {
   var_regex_336 : std::string = "(\V)(\v)";
   regex_337 := "(\v)(\V)";
   var_regex_337 : std::string = "(\v)(\V)";
-  regex_338 := "foo\Kbar";
-  var_regex_338 : std::string = "foo\Kbar";
-  regex_339 := "foo\t\n\r\f\a\ebar";
-  var_regex_339 : std::string = "foo\t\n\r\f\a\ebar";
+  regex_338 := "(?:(?i)a)b";
+  var_regex_338 : std::string = "(?:(?i)a)b";
+  regex_339 := "((?i)a)b";
+  var_regex_339 : std::string = "((?i)a)b";
+  regex_340 := "(?:(?i)a)b";
+  var_regex_340 : std::string = "(?:(?i)a)b";
+  regex_341 := "((?i)a)b";
+  var_regex_341 : std::string = "((?i)a)b";
+  regex_342 := "(?:(?i)a)b";
+  var_regex_342 : std::string = "(?:(?i)a)b";
+  regex_343 := "((?i)a)b";
+  var_regex_343 : std::string = "((?i)a)b";
+  regex_344 := "(?i:a)b";
+  var_regex_344 : std::string = "(?i:a)b";
+  regex_345 := "((?i:a))b";
+  var_regex_345 : std::string = "((?i:a))b";
+  regex_346 := "(?i:a)b";
+  var_regex_346 : std::string = "(?i:a)b";
+  regex_347 := "((?i:a))b";
+  var_regex_347 : std::string = "((?i:a))b";
+  regex_348 := "(?i:a)b";
+  var_regex_348 : std::string = "(?i:a)b";
+  regex_349 := "((?i:a))b";
+  var_regex_349 : std::string = "((?i:a))b";
+  regex_350 := "(?:(?-i)a)b";
+  regex_350_mod := "i";
+  var_regex_350 : std::string = "(?:(?-i)a)b";
+  regex_351 := "((?-i)a)b";
+  regex_351_mod := "i";
+  var_regex_351 : std::string = "((?-i)a)b";
+  regex_352 := "(?:(?-i)a)b";
+  regex_352_mod := "i";
+  var_regex_352 : std::string = "(?:(?-i)a)b";
+  regex_353 := "((?-i)a)b";
+  regex_353_mod := "i";
+  var_regex_353 : std::string = "((?-i)a)b";
+  regex_354 := "(?:(?-i)a)b";
+  regex_354_mod := "i";
+  var_regex_354 : std::string = "(?:(?-i)a)b";
+  regex_355 := "((?-i)a)b";
+  regex_355_mod := "i";
+  var_regex_355 : std::string = "((?-i)a)b";
+  regex_356 := "(?:(?-i)a)b";
+  regex_356_mod := "i";
+  var_regex_356 : std::string = "(?:(?-i)a)b";
+  regex_357 := "((?-i)a)b";
+  regex_357_mod := "i";
+  var_regex_357 : std::string = "((?-i)a)b";
+  regex_358 := "(?:(?-i)a)b";
+  regex_358_mod := "i";
+  var_regex_358 : std::string = "(?:(?-i)a)b";
+  regex_359 := "((?-i)a)b";
+  regex_359_mod := "i";
+  var_regex_359 : std::string = "((?-i)a)b";
+  regex_360 := "(?-i:a)b";
+  regex_360_mod := "i";
+  var_regex_360 : std::string = "(?-i:a)b";
+  regex_361 := "((?-i:a))b";
+  regex_361_mod := "i";
+  var_regex_361 : std::string = "((?-i:a))b";
+  regex_362 := "(?-i:a)b";
+  regex_362_mod := "i";
+  var_regex_362 : std::string = "(?-i:a)b";
+  regex_363 := "((?-i:a))b";
+  regex_363_mod := "i";
+  var_regex_363 : std::string = "((?-i:a))b";
+  regex_364 := "(?-i:a)b";
+  regex_364_mod := "i";
+  var_regex_364 : std::string = "(?-i:a)b";
+  regex_365 := "((?-i:a))b";
+  regex_365_mod := "i";
+  var_regex_365 : std::string = "((?-i:a))b";
+  regex_366 := "(?-i:a)b";
+  regex_366_mod := "i";
+  var_regex_366 : std::string = "(?-i:a)b";
+  regex_367 := "((?-i:a))b";
+  regex_367_mod := "i";
+  var_regex_367 : std::string = "((?-i:a))b";
+  regex_368 := "(?-i:a)b";
+  regex_368_mod := "i";
+  var_regex_368 : std::string = "(?-i:a)b";
+  regex_369 := "((?-i:a))b";
+  regex_369_mod := "i";
+  var_regex_369 : std::string = "((?-i:a))b";
+  regex_370 := "((?-i:a.))b";
+  regex_370_mod := "i";
+  var_regex_370 : std::string = "((?-i:a.))b";
+  regex_371 := "((?-i:a\N))b";
+  regex_371_mod := "i";
+  var_regex_371 : std::string = "((?-i:a\\N))b";
+  regex_372 := "((?s-i:a.))b";
+  regex_372_mod := "i";
+  var_regex_372 : std::string = "((?s-i:a.))b";
+  regex_373 := "((?s-i:a\N))b";
+  regex_373_mod := "i";
+  var_regex_373 : std::string = "((?s-i:a\\N))b";
+  regex_374 := "((?s-i:a.))b";
+  regex_374_mod := "i";
+  var_regex_374 : std::string = "((?s-i:a.))b";
+  regex_375 := "((?s-i:a\N))b";
+  regex_375_mod := "i";
+  var_regex_375 : std::string = "((?s-i:a\\N))b";
+  regex_376 := "^(?:a?b?)*\$";
+  var_regex_376 : std::string = "^(?:a?b?)*\$";
+  regex_377 := "((?s)^a(.))((?m)^b\$)";
+  var_regex_377 : std::string = "((?s)^a(.))((?m)^b\$)";
+  regex_378 := "((?m)^b\$)";
+  var_regex_378 : std::string = "((?m)^b\$)";
+  regex_379 := "(?m)^b";
+  var_regex_379 : std::string = "(?m)^b";
+  regex_380 := "(?m)^(b)";
+  var_regex_380 : std::string = "(?m)^(b)";
+  regex_381 := "((?m)^b)";
+  var_regex_381 : std::string = "((?m)^b)";
+  regex_382 := "\n((?m)^b)";
+  var_regex_382 : std::string = "\n((?m)^b)";
+  regex_383 := "^b";
+  var_regex_383 : std::string = "^b";
+  regex_384 := "()^b";
+  var_regex_384 : std::string = "()^b";
+  regex_385 := "((?m)^b)";
+  var_regex_385 : std::string = "((?m)^b)";
+  regex_386 := "\Z";
+  var_regex_386 : std::string = "\Z";
+  regex_387 := "\z";
+  var_regex_387 : std::string = "\z";
+  regex_388 := "\$";
+  var_regex_388 : std::string = "\$";
+  regex_389 := "\Z";
+  var_regex_389 : std::string = "\Z";
+  regex_390 := "\z";
+  var_regex_390 : std::string = "\z";
+  regex_391 := "\$";
+  var_regex_391 : std::string = "\$";
+  regex_392 := "\Z";
+  var_regex_392 : std::string = "\Z";
+  regex_393 := "\z";
+  var_regex_393 : std::string = "\z";
+  regex_394 := "\$";
+  var_regex_394 : std::string = "\$";
+  regex_395 := "\Z";
+  regex_395_mod := "m";
+  var_regex_395 : std::string = "\Z";
+  regex_396 := "\z";
+  regex_396_mod := "m";
+  var_regex_396 : std::string = "\z";
+  regex_397 := "\$";
+  regex_397_mod := "m";
+  var_regex_397 : std::string = "\$";
+  regex_398 := "\Z";
+  regex_398_mod := "m";
+  var_regex_398 : std::string = "\Z";
+  regex_399 := "\z";
+  regex_399_mod := "m";
+  var_regex_399 : std::string = "\z";
+  regex_400 := "\$";
+  regex_400_mod := "m";
+  var_regex_400 : std::string = "\$";
+  regex_401 := "\Z";
+  regex_401_mod := "m";
+  var_regex_401 : std::string = "\Z";
+  regex_402 := "\z";
+  regex_402_mod := "m";
+  var_regex_402 : std::string = "\z";
+  regex_403 := "\$";
+  regex_403_mod := "m";
+  var_regex_403 : std::string = "\$";
+  regex_404 := "a\Z";
+  var_regex_404 : std::string = "a\Z";
+  regex_405 := "a\z";
+  var_regex_405 : std::string = "a\z";
+  regex_406 := "a\$";
+  var_regex_406 : std::string = "a\$";
+  regex_407 := "a\Z";
+  var_regex_407 : std::string = "a\Z";
+  regex_408 := "a\z";
+  var_regex_408 : std::string = "a\z";
+  regex_409 := "a\$";
+  var_regex_409 : std::string = "a\$";
+  regex_410 := "a\Z";
+  var_regex_410 : std::string = "a\Z";
+  regex_411 := "a\z";
+  var_regex_411 : std::string = "a\z";
+  regex_412 := "a\$";
+  var_regex_412 : std::string = "a\$";
+  regex_413 := "a\Z";
+  regex_413_mod := "m";
+  var_regex_413 : std::string = "a\Z";
+  regex_414 := "a\z";
+  regex_414_mod := "m";
+  var_regex_414 : std::string = "a\z";
+  regex_415 := "a\$";
+  regex_415_mod := "m";
+  var_regex_415 : std::string = "a\$";
+  regex_416 := "a\Z";
+  regex_416_mod := "m";
+  var_regex_416 : std::string = "a\Z";
+  regex_417 := "a\z";
+  regex_417_mod := "m";
+  var_regex_417 : std::string = "a\z";
+  regex_418 := "a\$";
+  regex_418_mod := "m";
+  var_regex_418 : std::string = "a\$";
+  regex_419 := "a\Z";
+  regex_419_mod := "m";
+  var_regex_419 : std::string = "a\Z";
+  regex_420 := "a\z";
+  regex_420_mod := "m";
+  var_regex_420 : std::string = "a\z";
+  regex_421 := "a\$";
+  regex_421_mod := "m";
+  var_regex_421 : std::string = "a\$";
+  regex_422 := "aa\Z";
+  var_regex_422 : std::string = "aa\Z";
+  regex_423 := "aa\z";
+  var_regex_423 : std::string = "aa\z";
+  regex_424 := "aa\$";
+  var_regex_424 : std::string = "aa\$";
+  regex_425 := "aa\Z";
+  var_regex_425 : std::string = "aa\Z";
+  regex_426 := "aa\z";
+  var_regex_426 : std::string = "aa\z";
+  regex_427 := "aa\$";
+  var_regex_427 : std::string = "aa\$";
+  regex_428 := "aa\Z";
+  var_regex_428 : std::string = "aa\Z";
+  regex_429 := "aa\z";
+  var_regex_429 : std::string = "aa\z";
+  regex_430 := "aa\$";
+  var_regex_430 : std::string = "aa\$";
+  regex_431 := "aa\Z";
+  regex_431_mod := "m";
+  var_regex_431 : std::string = "aa\Z";
+  regex_432 := "aa\z";
+  regex_432_mod := "m";
+  var_regex_432 : std::string = "aa\z";
+  regex_433 := "aa\$";
+  regex_433_mod := "m";
+  var_regex_433 : std::string = "aa\$";
+  regex_434 := "aa\Z";
+  regex_434_mod := "m";
+  var_regex_434 : std::string = "aa\Z";
+  regex_435 := "aa\z";
+  regex_435_mod := "m";
+  var_regex_435 : std::string = "aa\z";
+  regex_436 := "aa\$";
+  regex_436_mod := "m";
+  var_regex_436 : std::string = "aa\$";
+  regex_437 := "aa\Z";
+  regex_437_mod := "m";
+  var_regex_437 : std::string = "aa\Z";
+  regex_438 := "aa\z";
+  regex_438_mod := "m";
+  var_regex_438 : std::string = "aa\z";
+  regex_439 := "aa\$";
+  regex_439_mod := "m";
+  var_regex_439 : std::string = "aa\$";
+  regex_440 := "aa\Z";
+  var_regex_440 : std::string = "aa\Z";
+  regex_441 := "aa\z";
+  var_regex_441 : std::string = "aa\z";
+  regex_442 := "aa\$";
+  var_regex_442 : std::string = "aa\$";
+  regex_443 := "aa\Z";
+  var_regex_443 : std::string = "aa\Z";
+  regex_444 := "aa\z";
+  var_regex_444 : std::string = "aa\z";
+  regex_445 := "aa\$";
+  var_regex_445 : std::string = "aa\$";
+  regex_446 := "aa\Z";
+  var_regex_446 : std::string = "aa\Z";
+  regex_447 := "aa\z";
+  var_regex_447 : std::string = "aa\z";
+  regex_448 := "aa\$";
+  var_regex_448 : std::string = "aa\$";
+  regex_449 := "aa\Z";
+  regex_449_mod := "m";
+  var_regex_449 : std::string = "aa\Z";
+  regex_450 := "aa\z";
+  regex_450_mod := "m";
+  var_regex_450 : std::string = "aa\z";
+  regex_451 := "aa\$";
+  regex_451_mod := "m";
+  var_regex_451 : std::string = "aa\$";
+  regex_452 := "aa\Z";
+  regex_452_mod := "m";
+  var_regex_452 : std::string = "aa\Z";
+  regex_453 := "aa\z";
+  regex_453_mod := "m";
+  var_regex_453 : std::string = "aa\z";
+  regex_454 := "aa\$";
+  regex_454_mod := "m";
+  var_regex_454 : std::string = "aa\$";
+  regex_455 := "aa\Z";
+  regex_455_mod := "m";
+  var_regex_455 : std::string = "aa\Z";
+  regex_456 := "aa\z";
+  regex_456_mod := "m";
+  var_regex_456 : std::string = "aa\z";
+  regex_457 := "aa\$";
+  regex_457_mod := "m";
+  var_regex_457 : std::string = "aa\$";
+  regex_458 := "aa\Z";
+  var_regex_458 : std::string = "aa\Z";
+  regex_459 := "aa\z";
+  var_regex_459 : std::string = "aa\z";
+  regex_460 := "aa\$";
+  var_regex_460 : std::string = "aa\$";
+  regex_461 := "aa\Z";
+  var_regex_461 : std::string = "aa\Z";
+  regex_462 := "aa\z";
+  var_regex_462 : std::string = "aa\z";
+  regex_463 := "aa\$";
+  var_regex_463 : std::string = "aa\$";
+  regex_464 := "aa\Z";
+  var_regex_464 : std::string = "aa\Z";
+  regex_465 := "aa\z";
+  var_regex_465 : std::string = "aa\z";
+  regex_466 := "aa\$";
+  var_regex_466 : std::string = "aa\$";
+  regex_467 := "aa\Z";
+  regex_467_mod := "m";
+  var_regex_467 : std::string = "aa\Z";
+  regex_468 := "aa\z";
+  regex_468_mod := "m";
+  var_regex_468 : std::string = "aa\z";
+  regex_469 := "aa\$";
+  regex_469_mod := "m";
+  var_regex_469 : std::string = "aa\$";
+  regex_470 := "aa\Z";
+  regex_470_mod := "m";
+  var_regex_470 : std::string = "aa\Z";
+  regex_471 := "aa\z";
+  regex_471_mod := "m";
+  var_regex_471 : std::string = "aa\z";
+  regex_472 := "aa\$";
+  regex_472_mod := "m";
+  var_regex_472 : std::string = "aa\$";
+  regex_473 := "aa\Z";
+  regex_473_mod := "m";
+  var_regex_473 : std::string = "aa\Z";
+  regex_474 := "aa\z";
+  regex_474_mod := "m";
+  var_regex_474 : std::string = "aa\z";
+  regex_475 := "aa\$";
+  regex_475_mod := "m";
+  var_regex_475 : std::string = "aa\$";
+  regex_476 := "ab\Z";
+  var_regex_476 : std::string = "ab\Z";
+  regex_477 := "ab\z";
+  var_regex_477 : std::string = "ab\z";
+  regex_478 := "ab\$";
+  var_regex_478 : std::string = "ab\$";
+  regex_479 := "ab\Z";
+  var_regex_479 : std::string = "ab\Z";
+  regex_480 := "ab\z";
+  var_regex_480 : std::string = "ab\z";
+  regex_481 := "ab\$";
+  var_regex_481 : std::string = "ab\$";
+  regex_482 := "ab\Z";
+  var_regex_482 : std::string = "ab\Z";
+  regex_483 := "ab\z";
+  var_regex_483 : std::string = "ab\z";
+  regex_484 := "ab\$";
+  var_regex_484 : std::string = "ab\$";
+  regex_485 := "ab\Z";
+  regex_485_mod := "m";
+  var_regex_485 : std::string = "ab\Z";
+  regex_486 := "ab\z";
+  regex_486_mod := "m";
+  var_regex_486 : std::string = "ab\z";
+  regex_487 := "ab\$";
+  regex_487_mod := "m";
+  var_regex_487 : std::string = "ab\$";
+  regex_488 := "ab\Z";
+  regex_488_mod := "m";
+  var_regex_488 : std::string = "ab\Z";
+  regex_489 := "ab\z";
+  regex_489_mod := "m";
+  var_regex_489 : std::string = "ab\z";
+  regex_490 := "ab\$";
+  regex_490_mod := "m";
+  var_regex_490 : std::string = "ab\$";
+  regex_491 := "ab\Z";
+  regex_491_mod := "m";
+  var_regex_491 : std::string = "ab\Z";
+  regex_492 := "ab\z";
+  regex_492_mod := "m";
+  var_regex_492 : std::string = "ab\z";
+  regex_493 := "ab\$";
+  regex_493_mod := "m";
+  var_regex_493 : std::string = "ab\$";
+  regex_494 := "ab\Z";
+  var_regex_494 : std::string = "ab\Z";
+  regex_495 := "ab\z";
+  var_regex_495 : std::string = "ab\z";
+  regex_496 := "ab\$";
+  var_regex_496 : std::string = "ab\$";
+  regex_497 := "ab\Z";
+  var_regex_497 : std::string = "ab\Z";
+  regex_498 := "ab\z";
+  var_regex_498 : std::string = "ab\z";
+  regex_499 := "ab\$";
+  var_regex_499 : std::string = "ab\$";
+  regex_500 := "ab\Z";
+  var_regex_500 : std::string = "ab\Z";
+  regex_501 := "ab\z";
+  var_regex_501 : std::string = "ab\z";
+  regex_502 := "ab\$";
+  var_regex_502 : std::string = "ab\$";
+  regex_503 := "ab\Z";
+  regex_503_mod := "m";
+  var_regex_503 : std::string = "ab\Z";
+  regex_504 := "ab\z";
+  regex_504_mod := "m";
+  var_regex_504 : std::string = "ab\z";
+  regex_505 := "ab\$";
+  regex_505_mod := "m";
+  var_regex_505 : std::string = "ab\$";
+  regex_506 := "ab\Z";
+  regex_506_mod := "m";
+  var_regex_506 : std::string = "ab\Z";
+  regex_507 := "ab\z";
+  regex_507_mod := "m";
+  var_regex_507 : std::string = "ab\z";
+  regex_508 := "ab\$";
+  regex_508_mod := "m";
+  var_regex_508 : std::string = "ab\$";
+  regex_509 := "ab\Z";
+  regex_509_mod := "m";
+  var_regex_509 : std::string = "ab\Z";
+  regex_510 := "ab\z";
+  regex_510_mod := "m";
+  var_regex_510 : std::string = "ab\z";
+  regex_511 := "ab\$";
+  regex_511_mod := "m";
+  var_regex_511 : std::string = "ab\$";
+  regex_512 := "ab\Z";
+  var_regex_512 : std::string = "ab\Z";
+  regex_513 := "ab\z";
+  var_regex_513 : std::string = "ab\z";
+  regex_514 := "ab\$";
+  var_regex_514 : std::string = "ab\$";
+  regex_515 := "ab\Z";
+  var_regex_515 : std::string = "ab\Z";
+  regex_516 := "ab\z";
+  var_regex_516 : std::string = "ab\z";
+  regex_517 := "ab\$";
+  var_regex_517 : std::string = "ab\$";
+  regex_518 := "ab\Z";
+  var_regex_518 : std::string = "ab\Z";
+  regex_519 := "ab\z";
+  var_regex_519 : std::string = "ab\z";
+  regex_520 := "ab\$";
+  var_regex_520 : std::string = "ab\$";
+  regex_521 := "ab\Z";
+  regex_521_mod := "m";
+  var_regex_521 : std::string = "ab\Z";
+  regex_522 := "ab\z";
+  regex_522_mod := "m";
+  var_regex_522 : std::string = "ab\z";
+  regex_523 := "ab\$";
+  regex_523_mod := "m";
+  var_regex_523 : std::string = "ab\$";
+  regex_524 := "ab\Z";
+  regex_524_mod := "m";
+  var_regex_524 : std::string = "ab\Z";
+  regex_525 := "ab\z";
+  regex_525_mod := "m";
+  var_regex_525 : std::string = "ab\z";
+  regex_526 := "ab\$";
+  regex_526_mod := "m";
+  var_regex_526 : std::string = "ab\$";
+  regex_527 := "ab\Z";
+  regex_527_mod := "m";
+  var_regex_527 : std::string = "ab\Z";
+  regex_528 := "ab\z";
+  regex_528_mod := "m";
+  var_regex_528 : std::string = "ab\z";
+  regex_529 := "ab\$";
+  regex_529_mod := "m";
+  var_regex_529 : std::string = "ab\$";
+  regex_530 := "abb\Z";
+  var_regex_530 : std::string = "abb\Z";
+  regex_531 := "abb\z";
+  var_regex_531 : std::string = "abb\z";
+  regex_532 := "abb\$";
+  var_regex_532 : std::string = "abb\$";
+  regex_533 := "abb\Z";
+  var_regex_533 : std::string = "abb\Z";
+  regex_534 := "abb\z";
+  var_regex_534 : std::string = "abb\z";
+  regex_535 := "abb\$";
+  var_regex_535 : std::string = "abb\$";
+  regex_536 := "abb\Z";
+  var_regex_536 : std::string = "abb\Z";
+  regex_537 := "abb\z";
+  var_regex_537 : std::string = "abb\z";
+  regex_538 := "abb\$";
+  var_regex_538 : std::string = "abb\$";
+  regex_539 := "abb\Z";
+  regex_539_mod := "m";
+  var_regex_539 : std::string = "abb\Z";
+  regex_540 := "abb\z";
+  regex_540_mod := "m";
+  var_regex_540 : std::string = "abb\z";
+  regex_541 := "abb\$";
+  regex_541_mod := "m";
+  var_regex_541 : std::string = "abb\$";
+  regex_542 := "abb\Z";
+  regex_542_mod := "m";
+  var_regex_542 : std::string = "abb\Z";
+  regex_543 := "abb\z";
+  regex_543_mod := "m";
+  var_regex_543 : std::string = "abb\z";
+  regex_544 := "abb\$";
+  regex_544_mod := "m";
+  var_regex_544 : std::string = "abb\$";
+  regex_545 := "abb\Z";
+  regex_545_mod := "m";
+  var_regex_545 : std::string = "abb\Z";
+  regex_546 := "abb\z";
+  regex_546_mod := "m";
+  var_regex_546 : std::string = "abb\z";
+  regex_547 := "abb\$";
+  regex_547_mod := "m";
+  var_regex_547 : std::string = "abb\$";
+  regex_548 := "abb\Z";
+  var_regex_548 : std::string = "abb\Z";
+  regex_549 := "abb\z";
+  var_regex_549 : std::string = "abb\z";
+  regex_550 := "abb\$";
+  var_regex_550 : std::string = "abb\$";
+  regex_551 := "abb\Z";
+  var_regex_551 : std::string = "abb\Z";
+  regex_552 := "abb\z";
+  var_regex_552 : std::string = "abb\z";
+  regex_553 := "abb\$";
+  var_regex_553 : std::string = "abb\$";
+  regex_554 := "abb\Z";
+  var_regex_554 : std::string = "abb\Z";
+  regex_555 := "abb\z";
+  var_regex_555 : std::string = "abb\z";
+  regex_556 := "abb\$";
+  var_regex_556 : std::string = "abb\$";
+  regex_557 := "abb\Z";
+  regex_557_mod := "m";
+  var_regex_557 : std::string = "abb\Z";
+  regex_558 := "abb\z";
+  regex_558_mod := "m";
+  var_regex_558 : std::string = "abb\z";
+  regex_559 := "abb\$";
+  regex_559_mod := "m";
+  var_regex_559 : std::string = "abb\$";
+  regex_560 := "abb\Z";
+  regex_560_mod := "m";
+  var_regex_560 : std::string = "abb\Z";
+  regex_561 := "abb\z";
+  regex_561_mod := "m";
+  var_regex_561 : std::string = "abb\z";
+  regex_562 := "abb\$";
+  regex_562_mod := "m";
+  var_regex_562 : std::string = "abb\$";
+  regex_563 := "abb\Z";
+  regex_563_mod := "m";
+  var_regex_563 : std::string = "abb\Z";
+  regex_564 := "abb\z";
+  regex_564_mod := "m";
+  var_regex_564 : std::string = "abb\z";
+  regex_565 := "abb\$";
+  regex_565_mod := "m";
+  var_regex_565 : std::string = "abb\$";
+  regex_566 := "abb\Z";
+  var_regex_566 : std::string = "abb\Z";
+  regex_567 := "abb\z";
+  var_regex_567 : std::string = "abb\z";
+  regex_568 := "abb\$";
+  var_regex_568 : std::string = "abb\$";
+  regex_569 := "abb\Z";
+  var_regex_569 : std::string = "abb\Z";
+  regex_570 := "abb\z";
+  var_regex_570 : std::string = "abb\z";
+  regex_571 := "abb\$";
+  var_regex_571 : std::string = "abb\$";
+  regex_572 := "abb\Z";
+  var_regex_572 : std::string = "abb\Z";
+  regex_573 := "abb\z";
+  var_regex_573 : std::string = "abb\z";
+  regex_574 := "abb\$";
+  var_regex_574 : std::string = "abb\$";
+  regex_575 := "abb\Z";
+  regex_575_mod := "m";
+  var_regex_575 : std::string = "abb\Z";
+  regex_576 := "abb\z";
+  regex_576_mod := "m";
+  var_regex_576 : std::string = "abb\z";
+  regex_577 := "abb\$";
+  regex_577_mod := "m";
+  var_regex_577 : std::string = "abb\$";
+  regex_578 := "abb\Z";
+  regex_578_mod := "m";
+  var_regex_578 : std::string = "abb\Z";
+  regex_579 := "abb\z";
+  regex_579_mod := "m";
+  var_regex_579 : std::string = "abb\z";
+  regex_580 := "abb\$";
+  regex_580_mod := "m";
+  var_regex_580 : std::string = "abb\$";
+  regex_581 := "abb\Z";
+  regex_581_mod := "m";
+  var_regex_581 : std::string = "abb\Z";
+  regex_582 := "abb\z";
+  regex_582_mod := "m";
+  var_regex_582 : std::string = "abb\z";
+  regex_583 := "abb\$";
+  regex_583_mod := "m";
+  var_regex_583 : std::string = "abb\$";
+  regex_584 := "\Aa\$";
+  regex_584_mod := "m";
+  var_regex_584 : std::string = "\Aa\$";
+  regex_585 := "(?i:.[b].)";
+  var_regex_585 : std::string = "(?i:.[b].)";
+  regex_586 := "(?i:\N[b]\N)";
+  var_regex_586 : std::string = "(?i:\\N[b]\\N)";
+  regex_587 := "foo\Kbar";
+  var_regex_587 : std::string = "foo\Kbar";
+  regex_588 := "foo\t\n\r\f\a\ebar";
+  var_regex_588 : std::string = "foo\t\n\r\f\a\ebar";
   run: (this) = {
-    std::cout << "Running perl_tests:"<< std::endl;
+    std::cout << "Running general_tests:"<< std::endl;
     test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
     test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
     test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
@@ -1271,11 +1895,260 @@ test_perl_tests: @regex type = {
     test(regex_335, 335, "foo(\\v)bar", "foo\rbar", "y", "$1", "\r");
     test(regex_336, 336, "(\\V)(\\v)", "foo\rbar", "y", "$1-$2", "o-\r");
     test(regex_337, 337, "(\\v)(\\V)", "foo\rbar", "y", "$1-$2", "\r-b");
-    test(regex_338, 338, "foo\\Kbar", "foobar", "y", "$&", "bar");
-    test(regex_339, 339, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
+    test(regex_338, 338, "(?:(?i)a)b", "ab", "y", "$&", "ab");
+    test(regex_339, 339, "((?i)a)b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_340, 340, "(?:(?i)a)b", "Ab", "y", "$&", "Ab");
+    test(regex_341, 341, "((?i)a)b", "Ab", "y", "$&:$1", "Ab:A");
+    test(regex_342, 342, "(?:(?i)a)b", "aB", "n", "-", "-");
+    test(regex_343, 343, "((?i)a)b", "aB", "n", "-", "-");
+    test(regex_344, 344, "(?i:a)b", "ab", "y", "$&", "ab");
+    test(regex_345, 345, "((?i:a))b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_346, 346, "(?i:a)b", "Ab", "y", "$&", "Ab");
+    test(regex_347, 347, "((?i:a))b", "Ab", "y", "$&:$1", "Ab:A");
+    test(regex_348, 348, "(?i:a)b", "aB", "n", "-", "-");
+    test(regex_349, 349, "((?i:a))b", "aB", "n", "-", "-");
+    test(regex_350, 350, "(?:(?-i)a)b", "ab", "y", "$&", "ab");
+    test(regex_351, 351, "((?-i)a)b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_352, 352, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
+    test(regex_353, 353, "((?-i)a)b", "aB", "y", "$&:$1", "aB:a");
+    test(regex_354, 354, "(?:(?-i)a)b", "Ab", "n", "-", "-");
+    test(regex_355, 355, "((?-i)a)b", "Ab", "n", "-", "-");
+    test(regex_356, 356, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
+    test(regex_357, 357, "((?-i)a)b", "aB", "y", "$1", "a");
+    test(regex_358, 358, "(?:(?-i)a)b", "AB", "n", "-", "-");
+    test(regex_359, 359, "((?-i)a)b", "AB", "n", "-", "-");
+    test(regex_360, 360, "(?-i:a)b", "ab", "y", "$&", "ab");
+    test(regex_361, 361, "((?-i:a))b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_362, 362, "(?-i:a)b", "aB", "y", "$&", "aB");
+    test(regex_363, 363, "((?-i:a))b", "aB", "y", "$&:$1", "aB:a");
+    test(regex_364, 364, "(?-i:a)b", "Ab", "n", "-", "-");
+    test(regex_365, 365, "((?-i:a))b", "Ab", "n", "-", "-");
+    test(regex_366, 366, "(?-i:a)b", "aB", "y", "$&", "aB");
+    test(regex_367, 367, "((?-i:a))b", "aB", "y", "$1", "a");
+    test(regex_368, 368, "(?-i:a)b", "AB", "n", "-", "-");
+    test(regex_369, 369, "((?-i:a))b", "AB", "n", "-", "-");
+    test(regex_370, 370, "((?-i:a.))b", "a\nB", "n", "-", "-");
+    test(regex_371, 371, "((?-i:a\\\\N))b", "a\nB", "n", "-", "-");
+    test(regex_372, 372, "((?s-i:a.))b", "a\nB", "y", "$1", "a\n");
+    test(regex_373, 373, "((?s-i:a\\\\N))b", "a\nB", "n", "-", "-");
+    test(regex_374, 374, "((?s-i:a.))b", "B\nB", "n", "-", "-");
+    test(regex_375, 375, "((?s-i:a\\\\N))b", "B\nB", "n", "-", "-");
+    test(regex_376, 376, "^(?:a?b?)*\\$", "a--", "n", "-", "-");
+    test(regex_377, 377, "((?s)^a(.))((?m)^b\\$)", "a\nb\nc\n", "y", "$1;$2;$3", "a\n;\n;b");
+    test(regex_378, 378, "((?m)^b\\$)", "a\nb\nc\n", "y", "$1", "b");
+    test(regex_379, 379, "(?m)^b", "a\nb\n", "y", "$&", "b");
+    test(regex_380, 380, "(?m)^(b)", "a\nb\n", "y", "$1", "b");
+    test(regex_381, 381, "((?m)^b)", "a\nb\n", "y", "$1", "b");
+    test(regex_382, 382, "\\n((?m)^b)", "a\nb\n", "y", "$1", "b");
+    test(regex_383, 383, "^b", "a\nb\nc\n", "n", "-", "-");
+    test(regex_384, 384, "()^b", "a\nb\nc\n", "n", "-", "-");
+    test(regex_385, 385, "((?m)^b)", "a\nb\nc\n", "y", "$1", "b");
+    test(regex_386, 386, "\\Z", "a\nb\n", "y", "$-[0]", "3");
+    test(regex_387, 387, "\\z", "a\nb\n", "y", "$-[0]", "4");
+    test(regex_388, 388, "\\$", "a\nb\n", "y", "$-[0]", "3");
+    test(regex_389, 389, "\\Z", "b\na\n", "y", "$-[0]", "3");
+    test(regex_390, 390, "\\z", "b\na\n", "y", "$-[0]", "4");
+    test(regex_391, 391, "\\$", "b\na\n", "y", "$-[0]", "3");
+    test(regex_392, 392, "\\Z", "b\na", "y", "$-[0]", "3");
+    test(regex_393, 393, "\\z", "b\na", "y", "$-[0]", "3");
+    test(regex_394, 394, "\\$", "b\na", "y", "$-[0]", "3");
+    test(regex_395, 395, "\\Z", "a\nb\n", "y", "$-[0]", "3");
+    test(regex_396, 396, "\\z", "a\nb\n", "y", "$-[0]", "4");
+    test(regex_397, 397, "\\$", "a\nb\n", "y", "$-[0]", "1");
+    test(regex_398, 398, "\\Z", "b\na\n", "y", "$-[0]", "3");
+    test(regex_399, 399, "\\z", "b\na\n", "y", "$-[0]", "4");
+    test(regex_400, 400, "\\$", "b\na\n", "y", "$-[0]", "1");
+    test(regex_401, 401, "\\Z", "b\na", "y", "$-[0]", "3");
+    test(regex_402, 402, "\\z", "b\na", "y", "$-[0]", "3");
+    test(regex_403, 403, "\\$", "b\na", "y", "$-[0]", "1");
+    test(regex_404, 404, "a\\Z", "a\nb\n", "n", "-", "-");
+    test(regex_405, 405, "a\\z", "a\nb\n", "n", "-", "-");
+    test(regex_406, 406, "a\\$", "a\nb\n", "n", "-", "-");
+    test(regex_407, 407, "a\\Z", "b\na\n", "y", "$-[0]", "2");
+    test(regex_408, 408, "a\\z", "b\na\n", "n", "-", "-");
+    test(regex_409, 409, "a\\$", "b\na\n", "y", "$-[0]", "2");
+    test(regex_410, 410, "a\\Z", "b\na", "y", "$-[0]", "2");
+    test(regex_411, 411, "a\\z", "b\na", "y", "$-[0]", "2");
+    test(regex_412, 412, "a\\$", "b\na", "y", "$-[0]", "2");
+    test(regex_413, 413, "a\\Z", "a\nb\n", "n", "-", "-");
+    test(regex_414, 414, "a\\z", "a\nb\n", "n", "-", "-");
+    test(regex_415, 415, "a\\$", "a\nb\n", "y", "$-[0]", "0");
+    test(regex_416, 416, "a\\Z", "b\na\n", "y", "$-[0]", "2");
+    test(regex_417, 417, "a\\z", "b\na\n", "n", "-", "-");
+    test(regex_418, 418, "a\\$", "b\na\n", "y", "$-[0]", "2");
+    test(regex_419, 419, "a\\Z", "b\na", "y", "$-[0]", "2");
+    test(regex_420, 420, "a\\z", "b\na", "y", "$-[0]", "2");
+    test(regex_421, 421, "a\\$", "b\na", "y", "$-[0]", "2");
+    test(regex_422, 422, "aa\\Z", "aa\nb\n", "n", "-", "-");
+    test(regex_423, 423, "aa\\z", "aa\nb\n", "n", "-", "-");
+    test(regex_424, 424, "aa\\$", "aa\nb\n", "n", "-", "-");
+    test(regex_425, 425, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_426, 426, "aa\\z", "b\naa\n", "n", "-", "-");
+    test(regex_427, 427, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_428, 428, "aa\\Z", "b\naa", "y", "$-[0]", "2");
+    test(regex_429, 429, "aa\\z", "b\naa", "y", "$-[0]", "2");
+    test(regex_430, 430, "aa\\$", "b\naa", "y", "$-[0]", "2");
+    test(regex_431, 431, "aa\\Z", "aa\nb\n", "n", "-", "-");
+    test(regex_432, 432, "aa\\z", "aa\nb\n", "n", "-", "-");
+    test(regex_433, 433, "aa\\$", "aa\nb\n", "y", "$-[0]", "0");
+    test(regex_434, 434, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_435, 435, "aa\\z", "b\naa\n", "n", "-", "-");
+    test(regex_436, 436, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_437, 437, "aa\\Z", "b\naa", "y", "$-[0]", "2");
+    test(regex_438, 438, "aa\\z", "b\naa", "y", "$-[0]", "2");
+    test(regex_439, 439, "aa\\$", "b\naa", "y", "$-[0]", "2");
+    test(regex_440, 440, "aa\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_441, 441, "aa\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_442, 442, "aa\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_443, 443, "aa\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_444, 444, "aa\\z", "b\nac\n", "n", "-", "-");
+    test(regex_445, 445, "aa\\$", "b\nac\n", "n", "-", "-");
+    test(regex_446, 446, "aa\\Z", "b\nac", "n", "-", "-");
+    test(regex_447, 447, "aa\\z", "b\nac", "n", "-", "-");
+    test(regex_448, 448, "aa\\$", "b\nac", "n", "-", "-");
+    test(regex_449, 449, "aa\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_450, 450, "aa\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_451, 451, "aa\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_452, 452, "aa\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_453, 453, "aa\\z", "b\nac\n", "n", "-", "-");
+    test(regex_454, 454, "aa\\$", "b\nac\n", "n", "-", "-");
+    test(regex_455, 455, "aa\\Z", "b\nac", "n", "-", "-");
+    test(regex_456, 456, "aa\\z", "b\nac", "n", "-", "-");
+    test(regex_457, 457, "aa\\$", "b\nac", "n", "-", "-");
+    test(regex_458, 458, "aa\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_459, 459, "aa\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_460, 460, "aa\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_461, 461, "aa\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_462, 462, "aa\\z", "b\nca\n", "n", "-", "-");
+    test(regex_463, 463, "aa\\$", "b\nca\n", "n", "-", "-");
+    test(regex_464, 464, "aa\\Z", "b\nca", "n", "-", "-");
+    test(regex_465, 465, "aa\\z", "b\nca", "n", "-", "-");
+    test(regex_466, 466, "aa\\$", "b\nca", "n", "-", "-");
+    test(regex_467, 467, "aa\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_468, 468, "aa\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_469, 469, "aa\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_470, 470, "aa\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_471, 471, "aa\\z", "b\nca\n", "n", "-", "-");
+    test(regex_472, 472, "aa\\$", "b\nca\n", "n", "-", "-");
+    test(regex_473, 473, "aa\\Z", "b\nca", "n", "-", "-");
+    test(regex_474, 474, "aa\\z", "b\nca", "n", "-", "-");
+    test(regex_475, 475, "aa\\$", "b\nca", "n", "-", "-");
+    test(regex_476, 476, "ab\\Z", "ab\nb\n", "n", "-", "-");
+    test(regex_477, 477, "ab\\z", "ab\nb\n", "n", "-", "-");
+    test(regex_478, 478, "ab\\$", "ab\nb\n", "n", "-", "-");
+    test(regex_479, 479, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_480, 480, "ab\\z", "b\nab\n", "n", "-", "-");
+    test(regex_481, 481, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_482, 482, "ab\\Z", "b\nab", "y", "$-[0]", "2");
+    test(regex_483, 483, "ab\\z", "b\nab", "y", "$-[0]", "2");
+    test(regex_484, 484, "ab\\$", "b\nab", "y", "$-[0]", "2");
+    test(regex_485, 485, "ab\\Z", "ab\nb\n", "n", "-", "-");
+    test(regex_486, 486, "ab\\z", "ab\nb\n", "n", "-", "-");
+    test(regex_487, 487, "ab\\$", "ab\nb\n", "y", "$-[0]", "0");
+    test(regex_488, 488, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_489, 489, "ab\\z", "b\nab\n", "n", "-", "-");
+    test(regex_490, 490, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_491, 491, "ab\\Z", "b\nab", "y", "$-[0]", "2");
+    test(regex_492, 492, "ab\\z", "b\nab", "y", "$-[0]", "2");
+    test(regex_493, 493, "ab\\$", "b\nab", "y", "$-[0]", "2");
+    test(regex_494, 494, "ab\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_495, 495, "ab\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_496, 496, "ab\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_497, 497, "ab\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_498, 498, "ab\\z", "b\nac\n", "n", "-", "-");
+    test(regex_499, 499, "ab\\$", "b\nac\n", "n", "-", "-");
+    test(regex_500, 500, "ab\\Z", "b\nac", "n", "-", "-");
+    test(regex_501, 501, "ab\\z", "b\nac", "n", "-", "-");
+    test(regex_502, 502, "ab\\$", "b\nac", "n", "-", "-");
+    test(regex_503, 503, "ab\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_504, 504, "ab\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_505, 505, "ab\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_506, 506, "ab\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_507, 507, "ab\\z", "b\nac\n", "n", "-", "-");
+    test(regex_508, 508, "ab\\$", "b\nac\n", "n", "-", "-");
+    test(regex_509, 509, "ab\\Z", "b\nac", "n", "-", "-");
+    test(regex_510, 510, "ab\\z", "b\nac", "n", "-", "-");
+    test(regex_511, 511, "ab\\$", "b\nac", "n", "-", "-");
+    test(regex_512, 512, "ab\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_513, 513, "ab\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_514, 514, "ab\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_515, 515, "ab\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_516, 516, "ab\\z", "b\nca\n", "n", "-", "-");
+    test(regex_517, 517, "ab\\$", "b\nca\n", "n", "-", "-");
+    test(regex_518, 518, "ab\\Z", "b\nca", "n", "-", "-");
+    test(regex_519, 519, "ab\\z", "b\nca", "n", "-", "-");
+    test(regex_520, 520, "ab\\$", "b\nca", "n", "-", "-");
+    test(regex_521, 521, "ab\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_522, 522, "ab\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_523, 523, "ab\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_524, 524, "ab\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_525, 525, "ab\\z", "b\nca\n", "n", "-", "-");
+    test(regex_526, 526, "ab\\$", "b\nca\n", "n", "-", "-");
+    test(regex_527, 527, "ab\\Z", "b\nca", "n", "-", "-");
+    test(regex_528, 528, "ab\\z", "b\nca", "n", "-", "-");
+    test(regex_529, 529, "ab\\$", "b\nca", "n", "-", "-");
+    test(regex_530, 530, "abb\\Z", "abb\nb\n", "n", "-", "-");
+    test(regex_531, 531, "abb\\z", "abb\nb\n", "n", "-", "-");
+    test(regex_532, 532, "abb\\$", "abb\nb\n", "n", "-", "-");
+    test(regex_533, 533, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_534, 534, "abb\\z", "b\nabb\n", "n", "-", "-");
+    test(regex_535, 535, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_536, 536, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_537, 537, "abb\\z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_538, 538, "abb\\$", "b\nabb", "y", "$-[0]", "2");
+    test(regex_539, 539, "abb\\Z", "abb\nb\n", "n", "-", "-");
+    test(regex_540, 540, "abb\\z", "abb\nb\n", "n", "-", "-");
+    test(regex_541, 541, "abb\\$", "abb\nb\n", "y", "$-[0]", "0");
+    test(regex_542, 542, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_543, 543, "abb\\z", "b\nabb\n", "n", "-", "-");
+    test(regex_544, 544, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_545, 545, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_546, 546, "abb\\z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_547, 547, "abb\\$", "b\nabb", "y", "$-[0]", "2");
+    test(regex_548, 548, "abb\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_549, 549, "abb\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_550, 550, "abb\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_551, 551, "abb\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_552, 552, "abb\\z", "b\nac\n", "n", "-", "-");
+    test(regex_553, 553, "abb\\$", "b\nac\n", "n", "-", "-");
+    test(regex_554, 554, "abb\\Z", "b\nac", "n", "-", "-");
+    test(regex_555, 555, "abb\\z", "b\nac", "n", "-", "-");
+    test(regex_556, 556, "abb\\$", "b\nac", "n", "-", "-");
+    test(regex_557, 557, "abb\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_558, 558, "abb\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_559, 559, "abb\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_560, 560, "abb\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_561, 561, "abb\\z", "b\nac\n", "n", "-", "-");
+    test(regex_562, 562, "abb\\$", "b\nac\n", "n", "-", "-");
+    test(regex_563, 563, "abb\\Z", "b\nac", "n", "-", "-");
+    test(regex_564, 564, "abb\\z", "b\nac", "n", "-", "-");
+    test(regex_565, 565, "abb\\$", "b\nac", "n", "-", "-");
+    test(regex_566, 566, "abb\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_567, 567, "abb\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_568, 568, "abb\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_569, 569, "abb\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_570, 570, "abb\\z", "b\nca\n", "n", "-", "-");
+    test(regex_571, 571, "abb\\$", "b\nca\n", "n", "-", "-");
+    test(regex_572, 572, "abb\\Z", "b\nca", "n", "-", "-");
+    test(regex_573, 573, "abb\\z", "b\nca", "n", "-", "-");
+    test(regex_574, 574, "abb\\$", "b\nca", "n", "-", "-");
+    test(regex_575, 575, "abb\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_576, 576, "abb\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_577, 577, "abb\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_578, 578, "abb\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_579, 579, "abb\\z", "b\nca\n", "n", "-", "-");
+    test(regex_580, 580, "abb\\$", "b\nca\n", "n", "-", "-");
+    test(regex_581, 581, "abb\\Z", "b\nca", "n", "-", "-");
+    test(regex_582, 582, "abb\\z", "b\nca", "n", "-", "-");
+    test(regex_583, 583, "abb\\$", "b\nca", "n", "-", "-");
+    test(regex_584, 584, "\\Aa\\$", "a\n\n", "y", "$&", "a");
+    test(regex_585, 585, "(?i:.[b].)", "abd", "y", "$&", "abd");
+    test(regex_586, 586, "(?i:\\\\N[b]\\\\N)", "abd", "y", "$&", "abd");
+    test(regex_587, 587, "foo\\Kbar", "foobar", "y", "$&", "bar");
+    test(regex_588, 588, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
     std::cout << std::endl;
   }
 }
 main: (args) = {
-    test_perl_tests().run();
+    test_general_tests().run();
 }
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
index 66be180111..307d79204a 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
@@ -1,4 +1,4 @@
-Running perl_tests:
+Running general_tests:
 0_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
 1_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
 2_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
@@ -168,15 +168,15 @@ Running perl_tests:
 166_y: OK regex: ab*bc parsed_regex: ab*bc str: ABC result_expr: $& expected_results ABC
 167_y: OK regex: ab*bc parsed_regex: ab*bc str: ABBC result_expr: $& expected_results ABBC
 168_y: OK regex: ab*?bc parsed_regex: ab*?bc str: ABBBBC result_expr: $& expected_results ABBBBC
-169_y: Failure: Regex should apply. regex: ab{0,}?bc parsed_regex: ab{0,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+169_y: OK regex: ab{0,}?bc parsed_regex: ab{0,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
 170_y: OK regex: ab+?bc parsed_regex: ab+?bc str: ABBC result_expr: $& expected_results ABBC
 171_n: OK regex: ab+bc parsed_regex: ab+bc str: ABC result_expr: - expected_results -
 172_n: OK regex: ab+bc parsed_regex: ab+bc str: ABQ result_expr: - expected_results -
 173_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: ABQ result_expr: - expected_results -
 174_y: OK regex: ab+bc parsed_regex: ab+bc str: ABBBBC result_expr: $& expected_results ABBBBC
-175_y: Failure: Regex should apply. regex: ab{1,}?bc parsed_regex: ab{1,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+175_y: OK regex: ab{1,}?bc parsed_regex: ab{1,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
 176_y: OK regex: ab{1,3}?bc parsed_regex: ab{1,3}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
-177_y: Failure: Regex should apply. regex: ab{3,4}?bc parsed_regex: ab{3,4}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
+177_y: OK regex: ab{3,4}?bc parsed_regex: ab{3,4}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
 178_n: OK regex: ab{4,5}?bc parsed_regex: ab{4,5}?bc str: ABBBBC result_expr: - expected_results -
 179_y: OK regex: ab??bc parsed_regex: ab??bc str: ABBC result_expr: $& expected_results ABBC
 180_y: OK regex: ab??bc parsed_regex: ab??bc str: ABC result_expr: $& expected_results ABC
@@ -225,14 +225,14 @@ Running perl_tests:
 223_y: OK regex: a{1,}b{1,}c parsed_regex: a{1,}b{1,}c str: AABBABC result_expr: $& expected_results ABC
 224_y: OK regex: a.+?c parsed_regex: a.+?c str: ABCABC result_expr: $& expected_results ABC
 225_y: OK regex: a.*?c parsed_regex: a.*?c str: ABCABC result_expr: $& expected_results ABC
-226_y: Failure: Regex should apply. regex: a.{0,5}?c parsed_regex: a.{0,5}?c str: ABCABC result_expr: $& expected_results ABC
+226_y: OK regex: a.{0,5}?c parsed_regex: a.{0,5}?c str: ABCABC result_expr: $& expected_results ABC
 227_y: OK regex: (a+|b)* parsed_regex: (a+|b)* str: AB result_expr: $&-$1 expected_results AB-B
 228_y: OK regex: (a+|b){0,} parsed_regex: (a+|b){0,} str: AB result_expr: $&-$1 expected_results AB-B
 229_y: OK regex: (a+|b)+ parsed_regex: (a+|b)+ str: AB result_expr: $&-$1 expected_results AB-B
 230_y: OK regex: (a+|b){1,} parsed_regex: (a+|b){1,} str: AB result_expr: $&-$1 expected_results AB-B
 231_y: OK regex: (a+|b)? parsed_regex: (a+|b)? str: AB result_expr: $&-$1 expected_results A-A
 232_y: OK regex: (a+|b){0,1} parsed_regex: (a+|b){0,1} str: AB result_expr: $&-$1 expected_results A-A
-233_y: Failure: Result is wrong. (is: A-A) regex: (a+|b){0,1}? parsed_regex: (a+|b){0,1}? str: AB result_expr: $&-$1 expected_results -
+233_y: OK regex: (a+|b){0,1}? parsed_regex: (a+|b){0,1}? str: AB result_expr: $&-$1 expected_results -
 234_y: OK regex: [^ab]* parsed_regex: [^ab]* str: CDE result_expr: $& expected_results CDE
 235_n: OK regex: abc parsed_regex: abc str:  result_expr: - expected_results -
 236_y: OK regex: a* parsed_regex: a* str:  result_expr: $& expected_results 
@@ -258,7 +258,7 @@ Running perl_tests:
 256_y: OK regex: (ab|a)b*c parsed_regex: (ab|a)b*c str: ABC result_expr: $&-$1 expected_results ABC-AB
 257_y: OK regex: ((a)(b)c)(d) parsed_regex: ((a)(b)c)(d) str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
 258_y: OK regex: [a-zA-Z_][a-zA-Z0-9_]* parsed_regex: [a-zA-Z_][a-zA-Z0-9_]* str: ALPHA result_expr: $& expected_results ALPHA
-259_y: Failure: Result is wrong. (is: BH-BH) regex: ^a(bc+|b[eh])g|.h\$ parsed_regex: ^a(bc+|b[eh])g|.h\$ str: ABH result_expr: $&-$1 expected_results BH-
+259_y: OK regex: ^a(bc+|b[eh])g|.h\$ parsed_regex: ^a(bc+|b[eh])g|.h\$ str: ABH result_expr: $&-$1 expected_results BH-
 260_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
 261_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
 262_n: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: EFFG result_expr: - expected_results -
@@ -352,8 +352,621 @@ bar result_expr: $1-$2 expected_results
 335_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
 336_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
 337_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
-338_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
-339_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+338_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+339_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+340_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+341_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+342_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+343_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+344_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+345_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+346_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+347_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+348_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+349_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+350_y: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: ab result_expr: $& expected_results ab
+351_y: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+352_y: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: aB result_expr: $& expected_results aB
+353_y: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: aB result_expr: $&:$1 expected_results aB:a
+354_n: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: Ab result_expr: - expected_results -
+355_n: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: Ab result_expr: - expected_results -
+356_y: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: aB result_expr: $& expected_results aB
+357_y: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: aB result_expr: $1 expected_results a
+358_n: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: AB result_expr: - expected_results -
+359_n: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: AB result_expr: - expected_results -
+360_y: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: ab result_expr: $& expected_results ab
+361_y: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+362_y: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: aB result_expr: $& expected_results aB
+363_y: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: aB result_expr: $&:$1 expected_results aB:a
+364_n: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: Ab result_expr: - expected_results -
+365_n: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: Ab result_expr: - expected_results -
+366_y: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: aB result_expr: $& expected_results aB
+367_y: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: aB result_expr: $1 expected_results a
+368_n: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: AB result_expr: - expected_results -
+369_n: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: AB result_expr: - expected_results -
+370_n: OK regex: ((?-i:a.))b parsed_regex: ((?-i:a.))b str: a
+B result_expr: - expected_results -
+371_n: OK regex: ((?-i:a\\N))b parsed_regex: ((?-i:a\\N))b str: a
+B result_expr: - expected_results -
+372_y: OK regex: ((?s-i:a.))b parsed_regex: ((?s-i:a.))b str: a
+B result_expr: $1 expected_results a
+
+373_n: OK regex: ((?s-i:a\\N))b parsed_regex: ((?s-i:a\\N))b str: a
+B result_expr: - expected_results -
+374_n: OK regex: ((?s-i:a.))b parsed_regex: ((?s-i:a.))b str: B
+B result_expr: - expected_results -
+375_n: OK regex: ((?s-i:a\\N))b parsed_regex: ((?s-i:a\\N))b str: B
+B result_expr: - expected_results -
+376_n: OK regex: ^(?:a?b?)*\$ parsed_regex: ^(?:a?b?)*\$ str: a-- result_expr: - expected_results -
+377_y: OK regex: ((?s)^a(.))((?m)^b\$) parsed_regex: ((?s)^a(.))((?m)^b\$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+378_y: OK regex: ((?m)^b\$) parsed_regex: ((?m)^b\$) str: a
+b
+c
+ result_expr: $1 expected_results b
+379_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+380_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+381_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+382_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+383_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+384_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+385_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+386_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+387_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+388_y: OK regex: \$ parsed_regex: \$ str: a
+b
+ result_expr: $-[0] expected_results 3
+389_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+390_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+391_y: OK regex: \$ parsed_regex: \$ str: b
+a
+ result_expr: $-[0] expected_results 3
+392_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+393_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+394_y: OK regex: \$ parsed_regex: \$ str: b
+a result_expr: $-[0] expected_results 3
+395_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+396_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+397_y: OK regex: \$ parsed_regex: \$ str: a
+b
+ result_expr: $-[0] expected_results 1
+398_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+399_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+400_y: OK regex: \$ parsed_regex: \$ str: b
+a
+ result_expr: $-[0] expected_results 1
+401_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+402_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+403_y: OK regex: \$ parsed_regex: \$ str: b
+a result_expr: $-[0] expected_results 1
+404_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+405_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+406_n: OK regex: a\$ parsed_regex: a\$ str: a
+b
+ result_expr: - expected_results -
+407_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+408_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+409_y: OK regex: a\$ parsed_regex: a\$ str: b
+a
+ result_expr: $-[0] expected_results 2
+410_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+411_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+412_y: OK regex: a\$ parsed_regex: a\$ str: b
+a result_expr: $-[0] expected_results 2
+413_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+414_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+415_y: OK regex: a\$ parsed_regex: a\$ str: a
+b
+ result_expr: $-[0] expected_results 0
+416_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+417_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+418_y: OK regex: a\$ parsed_regex: a\$ str: b
+a
+ result_expr: $-[0] expected_results 2
+419_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+420_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+421_y: OK regex: a\$ parsed_regex: a\$ str: b
+a result_expr: $-[0] expected_results 2
+422_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+423_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+424_n: OK regex: aa\$ parsed_regex: aa\$ str: aa
+b
+ result_expr: - expected_results -
+425_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+426_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+427_y: OK regex: aa\$ parsed_regex: aa\$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+428_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+429_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+430_y: OK regex: aa\$ parsed_regex: aa\$ str: b
+aa result_expr: $-[0] expected_results 2
+431_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+432_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+433_y: OK regex: aa\$ parsed_regex: aa\$ str: aa
+b
+ result_expr: $-[0] expected_results 0
+434_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+435_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+436_y: OK regex: aa\$ parsed_regex: aa\$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+437_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+438_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+439_y: OK regex: aa\$ parsed_regex: aa\$ str: b
+aa result_expr: $-[0] expected_results 2
+440_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+441_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+442_n: OK regex: aa\$ parsed_regex: aa\$ str: ac
+b
+ result_expr: - expected_results -
+443_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+444_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+445_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ac
+ result_expr: - expected_results -
+446_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+447_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+448_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ac result_expr: - expected_results -
+449_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+450_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+451_n: OK regex: aa\$ parsed_regex: aa\$ str: ac
+b
+ result_expr: - expected_results -
+452_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+453_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+454_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ac
+ result_expr: - expected_results -
+455_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+456_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+457_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ac result_expr: - expected_results -
+458_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+459_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+460_n: OK regex: aa\$ parsed_regex: aa\$ str: ca
+b
+ result_expr: - expected_results -
+461_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+462_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+463_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ca
+ result_expr: - expected_results -
+464_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+465_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+466_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ca result_expr: - expected_results -
+467_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+468_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+469_n: OK regex: aa\$ parsed_regex: aa\$ str: ca
+b
+ result_expr: - expected_results -
+470_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+471_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+472_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ca
+ result_expr: - expected_results -
+473_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+474_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+475_n: OK regex: aa\$ parsed_regex: aa\$ str: b
+ca result_expr: - expected_results -
+476_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+477_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+478_n: OK regex: ab\$ parsed_regex: ab\$ str: ab
+b
+ result_expr: - expected_results -
+479_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+480_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+481_y: OK regex: ab\$ parsed_regex: ab\$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+482_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+483_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+484_y: OK regex: ab\$ parsed_regex: ab\$ str: b
+ab result_expr: $-[0] expected_results 2
+485_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+486_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+487_y: OK regex: ab\$ parsed_regex: ab\$ str: ab
+b
+ result_expr: $-[0] expected_results 0
+488_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+489_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+490_y: OK regex: ab\$ parsed_regex: ab\$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+491_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+492_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+493_y: OK regex: ab\$ parsed_regex: ab\$ str: b
+ab result_expr: $-[0] expected_results 2
+494_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+495_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+496_n: OK regex: ab\$ parsed_regex: ab\$ str: ac
+b
+ result_expr: - expected_results -
+497_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+498_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+499_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ac
+ result_expr: - expected_results -
+500_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+501_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+502_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ac result_expr: - expected_results -
+503_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+504_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+505_n: OK regex: ab\$ parsed_regex: ab\$ str: ac
+b
+ result_expr: - expected_results -
+506_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+507_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+508_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ac
+ result_expr: - expected_results -
+509_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+510_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+511_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ac result_expr: - expected_results -
+512_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+513_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+514_n: OK regex: ab\$ parsed_regex: ab\$ str: ca
+b
+ result_expr: - expected_results -
+515_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+516_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+517_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ca
+ result_expr: - expected_results -
+518_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+519_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+520_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ca result_expr: - expected_results -
+521_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+522_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+523_n: OK regex: ab\$ parsed_regex: ab\$ str: ca
+b
+ result_expr: - expected_results -
+524_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+525_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+526_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ca
+ result_expr: - expected_results -
+527_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+528_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+529_n: OK regex: ab\$ parsed_regex: ab\$ str: b
+ca result_expr: - expected_results -
+530_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+531_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+532_n: OK regex: abb\$ parsed_regex: abb\$ str: abb
+b
+ result_expr: - expected_results -
+533_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+534_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+535_y: OK regex: abb\$ parsed_regex: abb\$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+536_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+537_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+538_y: OK regex: abb\$ parsed_regex: abb\$ str: b
+abb result_expr: $-[0] expected_results 2
+539_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+540_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+541_y: OK regex: abb\$ parsed_regex: abb\$ str: abb
+b
+ result_expr: $-[0] expected_results 0
+542_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+543_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+544_y: OK regex: abb\$ parsed_regex: abb\$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+545_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+546_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+547_y: OK regex: abb\$ parsed_regex: abb\$ str: b
+abb result_expr: $-[0] expected_results 2
+548_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+549_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+550_n: OK regex: abb\$ parsed_regex: abb\$ str: ac
+b
+ result_expr: - expected_results -
+551_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+552_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+553_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ac
+ result_expr: - expected_results -
+554_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+555_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+556_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ac result_expr: - expected_results -
+557_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+558_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+559_n: OK regex: abb\$ parsed_regex: abb\$ str: ac
+b
+ result_expr: - expected_results -
+560_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+561_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+562_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ac
+ result_expr: - expected_results -
+563_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+564_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+565_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ac result_expr: - expected_results -
+566_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+567_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+568_n: OK regex: abb\$ parsed_regex: abb\$ str: ca
+b
+ result_expr: - expected_results -
+569_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+570_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+571_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ca
+ result_expr: - expected_results -
+572_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+573_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+574_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ca result_expr: - expected_results -
+575_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+576_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+577_n: OK regex: abb\$ parsed_regex: abb\$ str: ca
+b
+ result_expr: - expected_results -
+578_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+579_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+580_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ca
+ result_expr: - expected_results -
+581_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+582_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+583_n: OK regex: abb\$ parsed_regex: abb\$ str: b
+ca result_expr: - expected_results -
+584_y: OK regex: \Aa\$ parsed_regex: \Aa\$ str: a
+
+ result_expr: $& expected_results a
+585_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+586_y: OK regex: (?i:\\N[b]\\N) parsed_regex: (?i:\\N[b]\\N) str: abd result_expr: $& expected_results abd
+587_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+588_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
 
bar result_expr: $& expected_results foo	
 
bar
 
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
index b5e02ec91c..ec2946eb96 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
@@ -78,4 +78,207 @@ pure2-regex.cpp2:921:39: warning: unknown escape sequence: '\V'
 pure2-regex.cpp2:923:39: warning: unknown escape sequence: '\V'
 pure2-regex.cpp2:927:39: warning: unknown escape sequence: '\V'
 pure2-regex.cpp2:929:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:931:39: warning: unknown escape sequence: '\K'
+pure2-regex.cpp2:1033:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1035:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1037:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1053:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1055:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1057:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1059:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1061:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1063:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1065:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1067:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1069:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1072:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1075:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1078:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1081:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1084:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1087:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1090:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1093:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1096:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1098:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1100:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1102:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1104:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1106:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1108:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1110:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1112:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1114:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1117:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1120:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1123:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1126:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1129:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1132:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1135:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1138:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1141:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1143:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1145:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1147:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1149:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1151:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1153:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1155:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1157:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1159:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1162:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1165:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1168:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1171:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1174:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1177:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1180:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1183:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1186:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1188:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1190:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1192:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1194:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1196:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1198:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1200:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1202:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1204:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1207:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1210:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1213:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1216:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1219:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1222:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1225:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1228:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1231:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1233:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1235:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1237:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1239:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1241:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1243:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1245:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1247:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1249:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1252:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1255:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1258:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1261:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1264:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1267:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1270:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1273:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1276:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1278:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1280:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1282:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1284:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1286:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1288:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1290:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1292:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1294:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1297:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1300:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1303:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1306:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1309:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1312:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1315:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1318:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1321:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1323:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1325:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1327:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1329:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1331:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1333:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1335:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1337:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1339:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1342:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1345:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1348:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1351:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1354:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1357:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1360:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1363:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1366:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1368:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1370:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1372:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1374:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1376:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1378:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1380:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1382:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1384:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1387:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1390:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1393:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1396:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1399:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1402:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1405:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1408:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1411:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1413:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1415:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1417:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1419:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1421:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1423:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1425:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1427:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1429:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1432:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1435:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1438:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1441:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1444:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1447:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1450:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1453:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1456:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1458:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1460:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1462:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1464:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1466:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1468:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1470:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1472:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1474:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1477:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1480:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1483:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1486:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1489:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1492:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1495:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1498:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1501:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1503:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1505:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1507:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1509:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1511:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1513:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1515:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1517:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1519:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1522:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1525:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1528:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1531:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1534:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1537:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1540:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1543:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1546:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1549:39: warning: unknown escape sequence: '\A'
+pure2-regex.cpp2:1549:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1555:39: warning: unknown escape sequence: '\K'
diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp
index f8eb3577eb..15bd59958f 100644
--- a/regression-tests/test-results/pure2-regex.cpp
+++ b/regression-tests/test-results/pure2-regex.cpp
@@ -9,7 +9,7 @@
 #line 1 "pure2-regex.cpp2"
 
 #line 134 "pure2-regex.cpp2"
-class test_perl_tests;
+class test_general_tests;
   
 
 //=== Cpp2 type definitions and function declarations ===========================
@@ -22,7 +22,7 @@ template auto test(M const& regex, cpp2::in id, cpp2::in resultExpected) -> void;
 
 #line 134 "pure2-regex.cpp2"
-class test_perl_tests {
+class test_general_tests {
 
   private: std::string var_regex_0 {"abc"}; 
 
@@ -819,17 +819,641 @@ class test_perl_tests {
 
   private: std::string var_regex_337 {"(\v)(\V)"}; 
 
-  private: std::string var_regex_338 {"foo\Kbar"}; 
+  private: std::string var_regex_338 {"(?:(?i)a)b"}; 
 
-  private: std::string var_regex_339 {"foo\t\n\r\f\a\ebar"}; 
+  private: std::string var_regex_339 {"((?i)a)b"}; 
+
+  private: std::string var_regex_340 {"(?:(?i)a)b"}; 
+
+  private: std::string var_regex_341 {"((?i)a)b"}; 
+
+  private: std::string var_regex_342 {"(?:(?i)a)b"}; 
+
+  private: std::string var_regex_343 {"((?i)a)b"}; 
+
+  private: std::string var_regex_344 {"(?i:a)b"}; 
+
+  private: std::string var_regex_345 {"((?i:a))b"}; 
+
+  private: std::string var_regex_346 {"(?i:a)b"}; 
+
+  private: std::string var_regex_347 {"((?i:a))b"}; 
+
+  private: std::string var_regex_348 {"(?i:a)b"}; 
+
+  private: std::string var_regex_349 {"((?i:a))b"}; 
+
+#line 956 "pure2-regex.cpp2"
+  private: std::string var_regex_350 {"(?:(?-i)a)b"}; 
+
+#line 959 "pure2-regex.cpp2"
+  private: std::string var_regex_351 {"((?-i)a)b"}; 
+
+#line 962 "pure2-regex.cpp2"
+  private: std::string var_regex_352 {"(?:(?-i)a)b"}; 
+
+#line 965 "pure2-regex.cpp2"
+  private: std::string var_regex_353 {"((?-i)a)b"}; 
+
+#line 968 "pure2-regex.cpp2"
+  private: std::string var_regex_354 {"(?:(?-i)a)b"}; 
+
+#line 971 "pure2-regex.cpp2"
+  private: std::string var_regex_355 {"((?-i)a)b"}; 
+
+#line 974 "pure2-regex.cpp2"
+  private: std::string var_regex_356 {"(?:(?-i)a)b"}; 
+
+#line 977 "pure2-regex.cpp2"
+  private: std::string var_regex_357 {"((?-i)a)b"}; 
+
+#line 980 "pure2-regex.cpp2"
+  private: std::string var_regex_358 {"(?:(?-i)a)b"}; 
+
+#line 983 "pure2-regex.cpp2"
+  private: std::string var_regex_359 {"((?-i)a)b"}; 
+
+#line 986 "pure2-regex.cpp2"
+  private: std::string var_regex_360 {"(?-i:a)b"}; 
+
+#line 989 "pure2-regex.cpp2"
+  private: std::string var_regex_361 {"((?-i:a))b"}; 
+
+#line 992 "pure2-regex.cpp2"
+  private: std::string var_regex_362 {"(?-i:a)b"}; 
+
+#line 995 "pure2-regex.cpp2"
+  private: std::string var_regex_363 {"((?-i:a))b"}; 
+
+#line 998 "pure2-regex.cpp2"
+  private: std::string var_regex_364 {"(?-i:a)b"}; 
+
+#line 1001 "pure2-regex.cpp2"
+  private: std::string var_regex_365 {"((?-i:a))b"}; 
+
+#line 1004 "pure2-regex.cpp2"
+  private: std::string var_regex_366 {"(?-i:a)b"}; 
+
+#line 1007 "pure2-regex.cpp2"
+  private: std::string var_regex_367 {"((?-i:a))b"}; 
+
+#line 1010 "pure2-regex.cpp2"
+  private: std::string var_regex_368 {"(?-i:a)b"}; 
+
+#line 1013 "pure2-regex.cpp2"
+  private: std::string var_regex_369 {"((?-i:a))b"}; 
+
+#line 1016 "pure2-regex.cpp2"
+  private: std::string var_regex_370 {"((?-i:a.))b"}; 
+
+#line 1019 "pure2-regex.cpp2"
+  private: std::string var_regex_371 {"((?-i:a\\N))b"}; 
+
+#line 1022 "pure2-regex.cpp2"
+  private: std::string var_regex_372 {"((?s-i:a.))b"}; 
+
+#line 1025 "pure2-regex.cpp2"
+  private: std::string var_regex_373 {"((?s-i:a\\N))b"}; 
+
+#line 1028 "pure2-regex.cpp2"
+  private: std::string var_regex_374 {"((?s-i:a.))b"}; 
+
+#line 1031 "pure2-regex.cpp2"
+  private: std::string var_regex_375 {"((?s-i:a\\N))b"}; 
+
+  private: std::string var_regex_376 {"^(?:a?b?)*\$"}; 
+
+  private: std::string var_regex_377 {"((?s)^a(.))((?m)^b\$)"}; 
+
+  private: std::string var_regex_378 {"((?m)^b\$)"}; 
+
+  private: std::string var_regex_379 {"(?m)^b"}; 
+
+  private: std::string var_regex_380 {"(?m)^(b)"}; 
+
+  private: std::string var_regex_381 {"((?m)^b)"}; 
+
+  private: std::string var_regex_382 {"\n((?m)^b)"}; 
+
+  private: std::string var_regex_383 {"^b"}; 
+
+  private: std::string var_regex_384 {"()^b"}; 
+
+  private: std::string var_regex_385 {"((?m)^b)"}; 
+
+  private: std::string var_regex_386 {"\Z"}; 
+
+  private: std::string var_regex_387 {"\z"}; 
+
+  private: std::string var_regex_388 {"\$"}; 
+
+  private: std::string var_regex_389 {"\Z"}; 
+
+  private: std::string var_regex_390 {"\z"}; 
+
+  private: std::string var_regex_391 {"\$"}; 
+
+  private: std::string var_regex_392 {"\Z"}; 
+
+  private: std::string var_regex_393 {"\z"}; 
+
+  private: std::string var_regex_394 {"\$"}; 
+
+#line 1072 "pure2-regex.cpp2"
+  private: std::string var_regex_395 {"\Z"}; 
+
+#line 1075 "pure2-regex.cpp2"
+  private: std::string var_regex_396 {"\z"}; 
+
+#line 1078 "pure2-regex.cpp2"
+  private: std::string var_regex_397 {"\$"}; 
+
+#line 1081 "pure2-regex.cpp2"
+  private: std::string var_regex_398 {"\Z"}; 
+
+#line 1084 "pure2-regex.cpp2"
+  private: std::string var_regex_399 {"\z"}; 
+
+#line 1087 "pure2-regex.cpp2"
+  private: std::string var_regex_400 {"\$"}; 
+
+#line 1090 "pure2-regex.cpp2"
+  private: std::string var_regex_401 {"\Z"}; 
+
+#line 1093 "pure2-regex.cpp2"
+  private: std::string var_regex_402 {"\z"}; 
+
+#line 1096 "pure2-regex.cpp2"
+  private: std::string var_regex_403 {"\$"}; 
+
+  private: std::string var_regex_404 {"a\Z"}; 
+
+  private: std::string var_regex_405 {"a\z"}; 
+
+  private: std::string var_regex_406 {"a\$"}; 
+
+  private: std::string var_regex_407 {"a\Z"}; 
+
+  private: std::string var_regex_408 {"a\z"}; 
+
+  private: std::string var_regex_409 {"a\$"}; 
+
+  private: std::string var_regex_410 {"a\Z"}; 
+
+  private: std::string var_regex_411 {"a\z"}; 
+
+  private: std::string var_regex_412 {"a\$"}; 
+
+#line 1117 "pure2-regex.cpp2"
+  private: std::string var_regex_413 {"a\Z"}; 
+
+#line 1120 "pure2-regex.cpp2"
+  private: std::string var_regex_414 {"a\z"}; 
+
+#line 1123 "pure2-regex.cpp2"
+  private: std::string var_regex_415 {"a\$"}; 
+
+#line 1126 "pure2-regex.cpp2"
+  private: std::string var_regex_416 {"a\Z"}; 
+
+#line 1129 "pure2-regex.cpp2"
+  private: std::string var_regex_417 {"a\z"}; 
+
+#line 1132 "pure2-regex.cpp2"
+  private: std::string var_regex_418 {"a\$"}; 
+
+#line 1135 "pure2-regex.cpp2"
+  private: std::string var_regex_419 {"a\Z"}; 
+
+#line 1138 "pure2-regex.cpp2"
+  private: std::string var_regex_420 {"a\z"}; 
+
+#line 1141 "pure2-regex.cpp2"
+  private: std::string var_regex_421 {"a\$"}; 
+
+  private: std::string var_regex_422 {"aa\Z"}; 
+
+  private: std::string var_regex_423 {"aa\z"}; 
+
+  private: std::string var_regex_424 {"aa\$"}; 
+
+  private: std::string var_regex_425 {"aa\Z"}; 
+
+  private: std::string var_regex_426 {"aa\z"}; 
+
+  private: std::string var_regex_427 {"aa\$"}; 
+
+  private: std::string var_regex_428 {"aa\Z"}; 
+
+  private: std::string var_regex_429 {"aa\z"}; 
+
+  private: std::string var_regex_430 {"aa\$"}; 
+
+#line 1162 "pure2-regex.cpp2"
+  private: std::string var_regex_431 {"aa\Z"}; 
+
+#line 1165 "pure2-regex.cpp2"
+  private: std::string var_regex_432 {"aa\z"}; 
+
+#line 1168 "pure2-regex.cpp2"
+  private: std::string var_regex_433 {"aa\$"}; 
+
+#line 1171 "pure2-regex.cpp2"
+  private: std::string var_regex_434 {"aa\Z"}; 
+
+#line 1174 "pure2-regex.cpp2"
+  private: std::string var_regex_435 {"aa\z"}; 
+
+#line 1177 "pure2-regex.cpp2"
+  private: std::string var_regex_436 {"aa\$"}; 
+
+#line 1180 "pure2-regex.cpp2"
+  private: std::string var_regex_437 {"aa\Z"}; 
+
+#line 1183 "pure2-regex.cpp2"
+  private: std::string var_regex_438 {"aa\z"}; 
+
+#line 1186 "pure2-regex.cpp2"
+  private: std::string var_regex_439 {"aa\$"}; 
+
+  private: std::string var_regex_440 {"aa\Z"}; 
+
+  private: std::string var_regex_441 {"aa\z"}; 
+
+  private: std::string var_regex_442 {"aa\$"}; 
+
+  private: std::string var_regex_443 {"aa\Z"}; 
+
+  private: std::string var_regex_444 {"aa\z"}; 
+
+  private: std::string var_regex_445 {"aa\$"}; 
+
+  private: std::string var_regex_446 {"aa\Z"}; 
+
+  private: std::string var_regex_447 {"aa\z"}; 
+
+  private: std::string var_regex_448 {"aa\$"}; 
+
+#line 1207 "pure2-regex.cpp2"
+  private: std::string var_regex_449 {"aa\Z"}; 
+
+#line 1210 "pure2-regex.cpp2"
+  private: std::string var_regex_450 {"aa\z"}; 
+
+#line 1213 "pure2-regex.cpp2"
+  private: std::string var_regex_451 {"aa\$"}; 
+
+#line 1216 "pure2-regex.cpp2"
+  private: std::string var_regex_452 {"aa\Z"}; 
+
+#line 1219 "pure2-regex.cpp2"
+  private: std::string var_regex_453 {"aa\z"}; 
+
+#line 1222 "pure2-regex.cpp2"
+  private: std::string var_regex_454 {"aa\$"}; 
+
+#line 1225 "pure2-regex.cpp2"
+  private: std::string var_regex_455 {"aa\Z"}; 
+
+#line 1228 "pure2-regex.cpp2"
+  private: std::string var_regex_456 {"aa\z"}; 
+
+#line 1231 "pure2-regex.cpp2"
+  private: std::string var_regex_457 {"aa\$"}; 
+
+  private: std::string var_regex_458 {"aa\Z"}; 
+
+  private: std::string var_regex_459 {"aa\z"}; 
+
+  private: std::string var_regex_460 {"aa\$"}; 
+
+  private: std::string var_regex_461 {"aa\Z"}; 
+
+  private: std::string var_regex_462 {"aa\z"}; 
+
+  private: std::string var_regex_463 {"aa\$"}; 
+
+  private: std::string var_regex_464 {"aa\Z"}; 
+
+  private: std::string var_regex_465 {"aa\z"}; 
+
+  private: std::string var_regex_466 {"aa\$"}; 
+
+#line 1252 "pure2-regex.cpp2"
+  private: std::string var_regex_467 {"aa\Z"}; 
+
+#line 1255 "pure2-regex.cpp2"
+  private: std::string var_regex_468 {"aa\z"}; 
+
+#line 1258 "pure2-regex.cpp2"
+  private: std::string var_regex_469 {"aa\$"}; 
+
+#line 1261 "pure2-regex.cpp2"
+  private: std::string var_regex_470 {"aa\Z"}; 
+
+#line 1264 "pure2-regex.cpp2"
+  private: std::string var_regex_471 {"aa\z"}; 
+
+#line 1267 "pure2-regex.cpp2"
+  private: std::string var_regex_472 {"aa\$"}; 
+
+#line 1270 "pure2-regex.cpp2"
+  private: std::string var_regex_473 {"aa\Z"}; 
+
+#line 1273 "pure2-regex.cpp2"
+  private: std::string var_regex_474 {"aa\z"}; 
+
+#line 1276 "pure2-regex.cpp2"
+  private: std::string var_regex_475 {"aa\$"}; 
+
+  private: std::string var_regex_476 {"ab\Z"}; 
+
+  private: std::string var_regex_477 {"ab\z"}; 
+
+  private: std::string var_regex_478 {"ab\$"}; 
+
+  private: std::string var_regex_479 {"ab\Z"}; 
+
+  private: std::string var_regex_480 {"ab\z"}; 
+
+  private: std::string var_regex_481 {"ab\$"}; 
+
+  private: std::string var_regex_482 {"ab\Z"}; 
+
+  private: std::string var_regex_483 {"ab\z"}; 
+
+  private: std::string var_regex_484 {"ab\$"}; 
+
+#line 1297 "pure2-regex.cpp2"
+  private: std::string var_regex_485 {"ab\Z"}; 
+
+#line 1300 "pure2-regex.cpp2"
+  private: std::string var_regex_486 {"ab\z"}; 
+
+#line 1303 "pure2-regex.cpp2"
+  private: std::string var_regex_487 {"ab\$"}; 
+
+#line 1306 "pure2-regex.cpp2"
+  private: std::string var_regex_488 {"ab\Z"}; 
+
+#line 1309 "pure2-regex.cpp2"
+  private: std::string var_regex_489 {"ab\z"}; 
+
+#line 1312 "pure2-regex.cpp2"
+  private: std::string var_regex_490 {"ab\$"}; 
+
+#line 1315 "pure2-regex.cpp2"
+  private: std::string var_regex_491 {"ab\Z"}; 
+
+#line 1318 "pure2-regex.cpp2"
+  private: std::string var_regex_492 {"ab\z"}; 
+
+#line 1321 "pure2-regex.cpp2"
+  private: std::string var_regex_493 {"ab\$"}; 
+
+  private: std::string var_regex_494 {"ab\Z"}; 
+
+  private: std::string var_regex_495 {"ab\z"}; 
+
+  private: std::string var_regex_496 {"ab\$"}; 
+
+  private: std::string var_regex_497 {"ab\Z"}; 
+
+  private: std::string var_regex_498 {"ab\z"}; 
+
+  private: std::string var_regex_499 {"ab\$"}; 
+
+  private: std::string var_regex_500 {"ab\Z"}; 
+
+  private: std::string var_regex_501 {"ab\z"}; 
+
+  private: std::string var_regex_502 {"ab\$"}; 
+
+#line 1342 "pure2-regex.cpp2"
+  private: std::string var_regex_503 {"ab\Z"}; 
+
+#line 1345 "pure2-regex.cpp2"
+  private: std::string var_regex_504 {"ab\z"}; 
+
+#line 1348 "pure2-regex.cpp2"
+  private: std::string var_regex_505 {"ab\$"}; 
+
+#line 1351 "pure2-regex.cpp2"
+  private: std::string var_regex_506 {"ab\Z"}; 
+
+#line 1354 "pure2-regex.cpp2"
+  private: std::string var_regex_507 {"ab\z"}; 
+
+#line 1357 "pure2-regex.cpp2"
+  private: std::string var_regex_508 {"ab\$"}; 
+
+#line 1360 "pure2-regex.cpp2"
+  private: std::string var_regex_509 {"ab\Z"}; 
+
+#line 1363 "pure2-regex.cpp2"
+  private: std::string var_regex_510 {"ab\z"}; 
+
+#line 1366 "pure2-regex.cpp2"
+  private: std::string var_regex_511 {"ab\$"}; 
+
+  private: std::string var_regex_512 {"ab\Z"}; 
+
+  private: std::string var_regex_513 {"ab\z"}; 
+
+  private: std::string var_regex_514 {"ab\$"}; 
+
+  private: std::string var_regex_515 {"ab\Z"}; 
+
+  private: std::string var_regex_516 {"ab\z"}; 
+
+  private: std::string var_regex_517 {"ab\$"}; 
+
+  private: std::string var_regex_518 {"ab\Z"}; 
+
+  private: std::string var_regex_519 {"ab\z"}; 
+
+  private: std::string var_regex_520 {"ab\$"}; 
+
+#line 1387 "pure2-regex.cpp2"
+  private: std::string var_regex_521 {"ab\Z"}; 
+
+#line 1390 "pure2-regex.cpp2"
+  private: std::string var_regex_522 {"ab\z"}; 
+
+#line 1393 "pure2-regex.cpp2"
+  private: std::string var_regex_523 {"ab\$"}; 
+
+#line 1396 "pure2-regex.cpp2"
+  private: std::string var_regex_524 {"ab\Z"}; 
+
+#line 1399 "pure2-regex.cpp2"
+  private: std::string var_regex_525 {"ab\z"}; 
+
+#line 1402 "pure2-regex.cpp2"
+  private: std::string var_regex_526 {"ab\$"}; 
+
+#line 1405 "pure2-regex.cpp2"
+  private: std::string var_regex_527 {"ab\Z"}; 
+
+#line 1408 "pure2-regex.cpp2"
+  private: std::string var_regex_528 {"ab\z"}; 
+
+#line 1411 "pure2-regex.cpp2"
+  private: std::string var_regex_529 {"ab\$"}; 
+
+  private: std::string var_regex_530 {"abb\Z"}; 
+
+  private: std::string var_regex_531 {"abb\z"}; 
+
+  private: std::string var_regex_532 {"abb\$"}; 
+
+  private: std::string var_regex_533 {"abb\Z"}; 
+
+  private: std::string var_regex_534 {"abb\z"}; 
+
+  private: std::string var_regex_535 {"abb\$"}; 
+
+  private: std::string var_regex_536 {"abb\Z"}; 
+
+  private: std::string var_regex_537 {"abb\z"}; 
+
+  private: std::string var_regex_538 {"abb\$"}; 
+
+#line 1432 "pure2-regex.cpp2"
+  private: std::string var_regex_539 {"abb\Z"}; 
+
+#line 1435 "pure2-regex.cpp2"
+  private: std::string var_regex_540 {"abb\z"}; 
+
+#line 1438 "pure2-regex.cpp2"
+  private: std::string var_regex_541 {"abb\$"}; 
+
+#line 1441 "pure2-regex.cpp2"
+  private: std::string var_regex_542 {"abb\Z"}; 
+
+#line 1444 "pure2-regex.cpp2"
+  private: std::string var_regex_543 {"abb\z"}; 
+
+#line 1447 "pure2-regex.cpp2"
+  private: std::string var_regex_544 {"abb\$"}; 
+
+#line 1450 "pure2-regex.cpp2"
+  private: std::string var_regex_545 {"abb\Z"}; 
+
+#line 1453 "pure2-regex.cpp2"
+  private: std::string var_regex_546 {"abb\z"}; 
+
+#line 1456 "pure2-regex.cpp2"
+  private: std::string var_regex_547 {"abb\$"}; 
+
+  private: std::string var_regex_548 {"abb\Z"}; 
+
+  private: std::string var_regex_549 {"abb\z"}; 
+
+  private: std::string var_regex_550 {"abb\$"}; 
+
+  private: std::string var_regex_551 {"abb\Z"}; 
+
+  private: std::string var_regex_552 {"abb\z"}; 
+
+  private: std::string var_regex_553 {"abb\$"}; 
+
+  private: std::string var_regex_554 {"abb\Z"}; 
+
+  private: std::string var_regex_555 {"abb\z"}; 
+
+  private: std::string var_regex_556 {"abb\$"}; 
+
+#line 1477 "pure2-regex.cpp2"
+  private: std::string var_regex_557 {"abb\Z"}; 
+
+#line 1480 "pure2-regex.cpp2"
+  private: std::string var_regex_558 {"abb\z"}; 
+
+#line 1483 "pure2-regex.cpp2"
+  private: std::string var_regex_559 {"abb\$"}; 
+
+#line 1486 "pure2-regex.cpp2"
+  private: std::string var_regex_560 {"abb\Z"}; 
+
+#line 1489 "pure2-regex.cpp2"
+  private: std::string var_regex_561 {"abb\z"}; 
+
+#line 1492 "pure2-regex.cpp2"
+  private: std::string var_regex_562 {"abb\$"}; 
+
+#line 1495 "pure2-regex.cpp2"
+  private: std::string var_regex_563 {"abb\Z"}; 
+
+#line 1498 "pure2-regex.cpp2"
+  private: std::string var_regex_564 {"abb\z"}; 
+
+#line 1501 "pure2-regex.cpp2"
+  private: std::string var_regex_565 {"abb\$"}; 
+
+  private: std::string var_regex_566 {"abb\Z"}; 
+
+  private: std::string var_regex_567 {"abb\z"}; 
+
+  private: std::string var_regex_568 {"abb\$"}; 
+
+  private: std::string var_regex_569 {"abb\Z"}; 
+
+  private: std::string var_regex_570 {"abb\z"}; 
+
+  private: std::string var_regex_571 {"abb\$"}; 
+
+  private: std::string var_regex_572 {"abb\Z"}; 
+
+  private: std::string var_regex_573 {"abb\z"}; 
+
+  private: std::string var_regex_574 {"abb\$"}; 
+
+#line 1522 "pure2-regex.cpp2"
+  private: std::string var_regex_575 {"abb\Z"}; 
+
+#line 1525 "pure2-regex.cpp2"
+  private: std::string var_regex_576 {"abb\z"}; 
+
+#line 1528 "pure2-regex.cpp2"
+  private: std::string var_regex_577 {"abb\$"}; 
+
+#line 1531 "pure2-regex.cpp2"
+  private: std::string var_regex_578 {"abb\Z"}; 
+
+#line 1534 "pure2-regex.cpp2"
+  private: std::string var_regex_579 {"abb\z"}; 
+
+#line 1537 "pure2-regex.cpp2"
+  private: std::string var_regex_580 {"abb\$"}; 
+
+#line 1540 "pure2-regex.cpp2"
+  private: std::string var_regex_581 {"abb\Z"}; 
+
+#line 1543 "pure2-regex.cpp2"
+  private: std::string var_regex_582 {"abb\z"}; 
+
+#line 1546 "pure2-regex.cpp2"
+  private: std::string var_regex_583 {"abb\$"}; 
+
+#line 1549 "pure2-regex.cpp2"
+  private: std::string var_regex_584 {"\Aa\$"}; 
+
+  private: std::string var_regex_585 {"(?i:.[b].)"}; 
+
+  private: std::string var_regex_586 {"(?i:\\N[b]\\N)"}; 
+
+  private: std::string var_regex_587 {"foo\Kbar"}; 
+
+  private: std::string var_regex_588 {"foo\t\n\r\f\a\ebar"}; 
   public: auto run() const& -> void;
-  private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,3,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,3,4,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,4,5,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,5,true,false>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::escaped_char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,false>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; private: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
-  public: test_perl_tests() = default;
-  public: test_perl_tests(test_perl_tests const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_perl_tests const&) -> void = delete;
+  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,false,false>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::escaped_char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"">,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
+  public: test_general_tests() = default;
+  public: test_general_tests(test_general_tests const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_general_tests const&) -> void = delete;
 
 
-#line 1278 "pure2-regex.cpp2"
+#line 2151 "pure2-regex.cpp2"
 };
 auto main(int const argc_, char** argv_) -> int;
 
@@ -970,9 +1594,9 @@ template auto test(M const& regex, cpp2::in id, cpp2::in void{
-    std::cout << "Running perl_tests:" << std::endl;
+#line 1558 "pure2-regex.cpp2"
+  auto test_general_tests::run() const& -> void{
+    std::cout << "Running general_tests:" << std::endl;
     test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
     test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
     test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
@@ -1311,8 +1935,257 @@ template auto test(M const& regex, cpp2::in id, cpp2::in auto test(M const& regex, cpp2::in id, cpp2::in int{
     auto const args = cpp2::make_args(argc_, argv_); 
-#line 1280 "pure2-regex.cpp2"
-    CPP2_UFCS(run)(test_perl_tests());
+#line 2153 "pure2-regex.cpp2"
+    CPP2_UFCS(run)(test_general_tests());
 }
 

From fb3ea396adaf2730b584b2b7730557ae104e0c41 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 10:06:55 +0100
Subject: [PATCH 068/161] Added support for 'n' modifier.

---
 include/cpp2regex.h | 660 +++++++++++++++++++++++---------------------
 source/regex.h2     |  25 +-
 2 files changed, 360 insertions(+), 325 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index ba8a8f49f4..b4fdaed4d0 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -19,136 +19,136 @@ namespace regex {
 class expression_flags;
     
 
-#line 37 "regex.h2"
+#line 38 "regex.h2"
 template class match_group;
     
 
-#line 44 "regex.h2"
+#line 45 "regex.h2"
 template class match_return;
     
 
-#line 49 "regex.h2"
+#line 50 "regex.h2"
 template class match_context;
 
-#line 127 "regex.h2"
+#line 128 "regex.h2"
 template class match_modifiers_state_change;
 
-#line 150 "regex.h2"
+#line 151 "regex.h2"
 template class match_modifiers;
 
-#line 173 "regex.h2"
+#line 174 "regex.h2"
 template class matcher_list;
     
 
-#line 200 "regex.h2"
+#line 201 "regex.h2"
 template class single_class_entry;
 
-#line 208 "regex.h2"
+#line 209 "regex.h2"
 template class range_class_entry;
 
-#line 216 "regex.h2"
+#line 217 "regex.h2"
 template class combined_class_entry;
     
 
-#line 223 "regex.h2"
+#line 224 "regex.h2"
 template class list_class_entry;
     
 
-#line 230 "regex.h2"
+#line 231 "regex.h2"
 template class named_class_entry;
     
 
-#line 235 "regex.h2"
+#line 236 "regex.h2"
 template class negated_class_entry;
     
 
-#line 242 "regex.h2"
+#line 243 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 295 "regex.h2"
+#line 296 "regex.h2"
 template class extract_position_helper;
     
 
-#line 312 "regex.h2"
+#line 313 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 396 "regex.h2"
+#line 397 "regex.h2"
 template class any_matcher_logic;
 
-#line 415 "regex.h2"
+#line 416 "regex.h2"
 template class char_matcher_logic;
 
-#line 443 "regex.h2"
+#line 444 "regex.h2"
 template class class_matcher_logic;
 
-#line 492 "regex.h2"
+#line 493 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 500 "regex.h2"
+#line 501 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 509 "regex.h2"
+#line 510 "regex.h2"
 template class global_group_reset;
     
 
-#line 521 "regex.h2"
+#line 522 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 549 "regex.h2"
+#line 550 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 575 "regex.h2"
+#line 576 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 608 "regex.h2"
+#line 609 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 628 "regex.h2"
+#line 629 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 645 "regex.h2"
+#line 646 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 657 "regex.h2"
+#line 658 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 661 "regex.h2"
+#line 662 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 687 "regex.h2"
+#line 688 "regex.h2"
 template class range_matcher_logic;
 
-#line 815 "regex.h2"
+#line 816 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 834 "regex.h2"
+#line 835 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 885 "regex.h2"
+#line 886 "regex.h2"
 template class group_name_list;
 
-#line 897 "regex.h2"
+#line 898 "regex.h2"
 class group_name_list_end;
     
 
-#line 902 "regex.h2"
+#line 903 "regex.h2"
 template class regular_expression;
 
-#line 986 "regex.h2"
+#line 987 "regex.h2"
 class regex_parser_state;
 
-#line 1018 "regex.h2"
+#line 1021 "regex.h2"
 template class regex_parser;
 
-#line 1747 "regex.h2"
+#line 1764 "regex.h2"
 }
 }
 
@@ -191,12 +191,13 @@ class expression_flags {
     public: static const int case_insensitive;// mod: i
     public: static const int multiple_lines;// mod: m
     public: static const int single_line;// mod: s
+    public: static const int no_group_captures;// mod: n
 
     public: expression_flags() = default;
     public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(expression_flags const&) -> void = delete;
 };
-#line 36 "regex.h2"
+#line 37 "regex.h2"
 
 template class match_group {
     public: Iter start {}; 
@@ -220,13 +221,13 @@ template cl
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     public: match_context(match_context const& that);
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -235,22 +236,22 @@ template cl
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 80 "regex.h2"
+#line 81 "regex.h2"
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 87 "regex.h2"
+#line 88 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 92 "regex.h2"
+#line 93 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 96 "regex.h2"
+#line 97 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 100 "regex.h2"
+#line 101 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -259,12 +260,12 @@ template cl
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 110 "regex.h2"
+#line 111 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 125 "regex.h2"
+#line 126 "regex.h2"
 };
 
 template class match_modifiers_state_change {
@@ -276,13 +277,13 @@ template
 
     public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
 
-#line 145 "regex.h2"
+#line 146 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: match_modifiers_state_change() = default;
     public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_modifiers_state_change const&) -> void = delete;
 
-#line 146 "regex.h2"
+#line 147 "regex.h2"
 };
 
 using match_modifiers_no_change = match_modifiers_state_change;
@@ -306,7 +307,7 @@ template class match_modifiers {
     public: auto operator=(match_modifiers const&) -> void = delete;
 
 
-#line 166 "regex.h2"
+#line 167 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -319,7 +320,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto;
 
-#line 179 "regex.h2"
+#line 180 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
@@ -332,7 +333,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 187 "regex.h2"
+#line 188 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -354,7 +355,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 204 "regex.h2"
+#line 205 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -367,7 +368,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 212 "regex.h2"
+#line 213 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -379,7 +380,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 219 "regex.h2"
+#line 220 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -391,7 +392,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 226 "regex.h2"
+#line 227 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 233 "regex.h2"
+#line 234 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -413,7 +414,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 238 "regex.h2"
+#line 239 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -425,10 +426,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 245 "regex.h2"
+#line 246 "regex.h2"
 };
 
-#line 248 "regex.h2"
+#line 249 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -459,7 +460,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 279 "regex.h2"
+#line 280 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -473,20 +474,20 @@ template                      using short_not_word_class = negat
 //-----------------------------------------------------------------------
 //
 
-#line 293 "regex.h2"
+#line 294 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 304 "regex.h2"
+#line 305 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 306 "regex.h2"
+#line 307 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -497,20 +498,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto;
 
-#line 326 "regex.h2"
+#line 327 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 344 "regex.h2"
+#line 345 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 392 "regex.h2"
+#line 393 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -519,14 +520,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 409 "regex.h2"
+#line 410 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 411 "regex.h2"
+#line 412 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -535,27 +536,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 436 "regex.h2"
+#line 437 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 438 "regex.h2"
+#line 439 "regex.h2"
 };
 
-#line 441 "regex.h2"
+#line 442 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 464 "regex.h2"
+#line 465 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 476 "regex.h2"
+#line 477 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -564,7 +565,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 488 "regex.h2"
+#line 489 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -577,7 +578,7 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 496 "regex.h2"
+#line 497 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -585,13 +586,13 @@ template class empty_matcher_logic {
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 504 "regex.h2"
+#line 505 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 505 "regex.h2"
+#line 506 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -599,14 +600,14 @@ template class escaped_char_matcher_l
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 515 "regex.h2"
+#line 516 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 517 "regex.h2"
+#line 518 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -614,7 +615,7 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 529 "regex.h2"
+#line 530 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -623,13 +624,13 @@ template
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 547 "regex.h2"
+#line 548 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 561 "regex.h2"
+#line 562 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -638,7 +639,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 571 "regex.h2"
+#line 572 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -646,14 +647,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 602 "regex.h2"
+#line 603 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 604 "regex.h2"
+#line 605 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -662,14 +663,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 622 "regex.h2"
+#line 623 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 624 "regex.h2"
+#line 625 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -678,14 +679,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 639 "regex.h2"
+#line 640 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 641 "regex.h2"
+#line 642 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -694,14 +695,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 650 "regex.h2"
+#line 651 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 652 "regex.h2"
+#line 653 "regex.h2"
 };
 
 // Named character classes
@@ -714,7 +715,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 660 "regex.h2"
+#line 661 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -722,7 +723,7 @@ template                    void = delete;
 
 
-#line 663 "regex.h2"
+#line 664 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -732,7 +733,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 673 "regex.h2"
+#line 674 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -744,40 +745,40 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 686 "regex.h2"
+#line 687 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 698 "regex.h2"
+#line 699 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 726 "regex.h2"
+#line 727 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 731 "regex.h2"
+#line 732 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 736 "regex.h2"
+#line 737 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 742 "regex.h2"
+#line 743 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 757 "regex.h2"
+#line 758 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return;
 
-#line 787 "regex.h2"
+#line 788 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 811 "regex.h2"
+#line 812 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -790,7 +791,7 @@ template void = delete;
 
 
-#line 828 "regex.h2"
+#line 829 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -801,7 +802,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 865 "regex.h2"
+#line 866 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -809,10 +810,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
 };
 
-#line 876 "regex.h2"
+#line 877 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -830,7 +831,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 895 "regex.h2"
+#line 896 "regex.h2"
 };
 
 class group_name_list_end {
@@ -839,7 +840,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 899 "regex.h2"
+#line 900 "regex.h2"
 };
 
 // Regular expression implementation
@@ -850,7 +851,7 @@ template> str, auto const& pos) -> auto;
 
-#line 916 "regex.h2"
+#line 917 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -858,7 +859,7 @@ template matched_, context const& ctx_);
 
-#line 926 "regex.h2"
+#line 927 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -873,7 +874,7 @@ template void = delete;
 
 
-#line 942 "regex.h2"
+#line 943 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -881,19 +882,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 954 "regex.h2"
+#line 955 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 976 "regex.h2"
+#line 977 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 977 "regex.h2"
+#line 978 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -911,21 +912,23 @@ class regex_parser_state {
     /// List of alternate matcher lists. E.g. ab|cd|xy
     public: std::vector> alternate_match_lists {}; 
 
+    public: bool group_captures_have_numbers {true}; 
+
     public: auto next_alternative() & -> void;
 
-#line 1000 "regex.h2"
+#line 1003 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 1005 "regex.h2"
+#line 1008 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1014 "regex.h2"
+#line 1017 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 1018 "regex.h2"
+#line 1021 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
@@ -946,107 +949,107 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1042 "regex.h2"
+#line 1045 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 1050 "regex.h2"
+#line 1055 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 1054 "regex.h2"
+#line 1059 "regex.h2"
     // Position management functions
     //
 
     public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
 
-#line 1069 "regex.h2"
+#line 1074 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1076 "regex.h2"
+#line 1081 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1084 "regex.h2"
+#line 1089 "regex.h2"
     public: [[nodiscard]] auto peek() & -> char;
 
-#line 1093 "regex.h2"
+#line 1098 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool;
 
-#line 1110 "regex.h2"
+#line 1115 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1130 "regex.h2"
+#line 1135 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1137 "regex.h2"
+#line 1142 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1144 "regex.h2"
+#line 1149 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1167 "regex.h2"
+#line 1172 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 1177 "regex.h2"
+#line 1182 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 1189 "regex.h2"
-    public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool;
+#line 1194 "regex.h2"
+    public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, bool& group_captures_have_numbers) & -> bool;
 
-#line 1226 "regex.h2"
+#line 1235 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1236 "regex.h2"
+#line 1245 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1249 "regex.h2"
+#line 1258 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1257 "regex.h2"
+#line 1266 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1377 "regex.h2"
+#line 1386 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1488 "regex.h2"
+#line 1497 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1560 "regex.h2"
+#line 1573 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1569 "regex.h2"
+#line 1582 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1643 "regex.h2"
+#line 1656 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1680 "regex.h2"
+#line 1693 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1703 "regex.h2"
+#line 1716 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1724 "regex.h2"
+#line 1741 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1738 "regex.h2"
+#line 1755 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1747 "regex.h2"
+#line 1764 "regex.h2"
 }
 }
 
@@ -1064,35 +1067,36 @@ namespace regex {
     inline CPP2_CONSTEXPR int expression_flags::case_insensitive = 1;
     inline CPP2_CONSTEXPR int expression_flags::multiple_lines = 2;
     inline CPP2_CONSTEXPR int expression_flags::single_line = 4;
+    inline CPP2_CONSTEXPR int expression_flags::no_group_captures = 8;
 
-#line 57 "regex.h2"
+#line 58 "regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 60 "regex.h2"
+#line 61 "regex.h2"
     }
 
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 62 "regex.h2"
+#line 63 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1100,24 +1104,24 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 66 "regex.h2"
+#line 67 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 68 "regex.h2"
+#line 69 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 80 "regex.h2"
+#line 81 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
@@ -1125,34 +1129,34 @@ namespace regex {
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 87 "regex.h2"
+#line 88 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 92 "regex.h2"
+#line 93 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 96 "regex.h2"
+#line 97 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 100 "regex.h2"
+#line 101 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 104 "regex.h2"
+#line 105 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 106 "regex.h2"
+#line 107 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 112 "regex.h2"
+#line 113 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -1167,13 +1171,13 @@ namespace regex {
         return r; 
     }
 
-#line 129 "regex.h2"
+#line 130 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
 
-#line 134 "regex.h2"
+#line 135 "regex.h2"
     template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
         auto new_flags {old_flags}; 
         if (reset) {
@@ -1185,79 +1189,79 @@ namespace regex {
         return new_flags; 
     }
 
-#line 145 "regex.h2"
+#line 146 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 152 "regex.h2"
+#line 153 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
-#line 156 "regex.h2"
-    template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
 #line 157 "regex.h2"
-    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
+    template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
 #line 158 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
+#line 159 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
-#line 163 "regex.h2"
+#line 164 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 174 "regex.h2"
+#line 175 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 176 "regex.h2"
+#line 177 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto { 
         return match_select(cur, ctx, modifiers);  }
 
-#line 179 "regex.h2"
+#line 180 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { 
         return First::match(cur, ctx, modifiers, matcher_list());  }
-#line 181 "regex.h2"
+#line 182 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_return(true, cur);  }
 
-#line 183 "regex.h2"
-    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
 #line 184 "regex.h2"
+    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 185 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 186 "regex.h2"
+#line 187 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 202 "regex.h2"
-    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
 #line 203 "regex.h2"
+    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
+#line 204 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 210 "regex.h2"
-    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
 #line 211 "regex.h2"
+    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
+#line 212 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 217 "regex.h2"
-    template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
 #line 218 "regex.h2"
+    template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
+#line 219 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 224 "regex.h2"
-    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
 #line 225 "regex.h2"
+    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
+#line 226 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 231 "regex.h2"
-    template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
 #line 232 "regex.h2"
+    template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 233 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 237 "regex.h2"
+#line 238 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 243 "regex.h2"
-    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
 #line 244 "regex.h2"
+    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 245 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 296 "regex.h2"
+#line 297 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto r {Other::match(cur, ctx, modifiers)}; 
         if (r.matched) {
@@ -1266,12 +1270,12 @@ namespace regex {
         return r; 
     }
 
-#line 304 "regex.h2"
-    template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
 #line 305 "regex.h2"
+    template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
+#line 306 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 314 "regex.h2"
+#line 315 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1284,12 +1288,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 326 "regex.h2"
-    template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
 #line 327 "regex.h2"
+    template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
+#line 328 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 329 "regex.h2"
+#line 330 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, tail)}; 
         if (r.matched) {
@@ -1305,7 +1309,7 @@ namespace regex {
         }
     }
 
-#line 344 "regex.h2"
+#line 345 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto{
         auto r {First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()))}; 
 
@@ -1321,7 +1325,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 360 "regex.h2"
+#line 361 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1333,7 +1337,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 372 "regex.h2"
+#line 373 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1355,7 +1359,7 @@ namespace regex {
         }
     }
 
-#line 398 "regex.h2"
+#line 399 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -1367,12 +1371,12 @@ namespace regex {
         }
     }
 
-#line 409 "regex.h2"
-    template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
 #line 410 "regex.h2"
+    template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 411 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 417 "regex.h2"
+#line 418 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1392,12 +1396,12 @@ namespace regex {
         }
 
     }
-#line 436 "regex.h2"
-    template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
 #line 437 "regex.h2"
+    template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 438 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 445 "regex.h2"
+#line 446 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1417,7 +1421,7 @@ namespace regex {
         }
     }
 
-#line 464 "regex.h2"
+#line 465 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1430,10 +1434,10 @@ namespace regex {
         return r; 
     }
 
-#line 476 "regex.h2"
+#line 477 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 478 "regex.h2"
+#line 479 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1445,28 +1449,28 @@ namespace regex {
         return r; 
     }
 
-#line 493 "regex.h2"
-    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
 #line 494 "regex.h2"
-    template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
 #line 495 "regex.h2"
+    template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 496 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
 
-#line 504 "regex.h2"
+#line 505 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 510 "regex.h2"
+#line 511 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers); 
     }
 
-#line 515 "regex.h2"
-    template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
 #line 516 "regex.h2"
+    template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
+#line 517 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
 
-#line 522 "regex.h2"
+#line 523 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -1474,10 +1478,10 @@ namespace regex {
         return Other::match(cur, ctx, Modifiers::push(ModifierChange())); 
     }
 
-#line 529 "regex.h2"
+#line 530 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 531 "regex.h2"
+#line 532 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1495,7 +1499,7 @@ namespace regex {
         }
     }
 
-#line 550 "regex.h2"
+#line 551 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -1507,10 +1511,10 @@ namespace regex {
         return r; 
     }
 
-#line 561 "regex.h2"
+#line 562 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 563 "regex.h2"
+#line 564 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1520,7 +1524,7 @@ namespace regex {
         }
     }
 
-#line 576 "regex.h2"
+#line 577 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1547,12 +1551,12 @@ namespace regex {
         }
 
     }
-#line 602 "regex.h2"
-    template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
 #line 603 "regex.h2"
+    template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 604 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 610 "regex.h2"
+#line 611 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1565,12 +1569,12 @@ namespace regex {
         }}
     }
 
-#line 622 "regex.h2"
-    template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
 #line 623 "regex.h2"
+    template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 624 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 630 "regex.h2"
+#line 631 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1580,24 +1584,24 @@ namespace regex {
         }
 
     }
-#line 639 "regex.h2"
-    template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
 #line 640 "regex.h2"
+    template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 641 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 647 "regex.h2"
+#line 648 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange())); 
     }
-#line 650 "regex.h2"
-    template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
 #line 651 "regex.h2"
+    template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 652 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 659 "regex.h2"
+#line 660 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 689 "regex.h2"
+#line 690 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if (greedy) {
             return match_greedy(0, cur, cur, ctx, modifiers, tail); 
@@ -1607,10 +1611,10 @@ namespace regex {
         }
     }
 
-#line 698 "regex.h2"
+#line 699 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 700 "regex.h2"
+#line 701 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1637,26 +1641,26 @@ namespace regex {
       return r; 
     }
 
-#line 726 "regex.h2"
+#line 727 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 731 "regex.h2"
+#line 732 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 736 "regex.h2"
+#line 737 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 742 "regex.h2"
+#line 743 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {match_return(true, cur)}; 
         auto count {0}; 
@@ -1672,7 +1676,7 @@ namespace regex {
         return res; 
     }
 
-#line 757 "regex.h2"
+#line 758 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{
         auto r {M::match(cur, ctx, modifiers, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1703,7 +1707,7 @@ namespace regex {
         }
     }
 
-#line 787 "regex.h2"
+#line 788 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
@@ -1729,7 +1733,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 817 "regex.h2"
+#line 818 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -1742,7 +1746,7 @@ namespace regex {
         return r; 
     }
 
-#line 836 "regex.h2"
+#line 837 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1772,9 +1776,9 @@ namespace regex {
         }
 
     }
-#line 865 "regex.h2"
-    template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
 #line 866 "regex.h2"
+    template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 867 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1783,7 +1787,7 @@ namespace regex {
         }
     }
 
-#line 887 "regex.h2"
+#line 888 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1793,10 +1797,10 @@ namespace regex {
         }
     }
 
-#line 898 "regex.h2"
+#line 899 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 907 "regex.h2"
+#line 908 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1806,31 +1810,31 @@ namespace regex {
         }
     }
 
-#line 921 "regex.h2"
+#line 922 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 924 "regex.h2"
+#line 925 "regex.h2"
         }
 
-#line 926 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
 #line 927 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
 #line 928 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
 #line 929 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 930 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 931 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
 #line 932 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
 #line 933 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+#line 934 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 935 "regex.h2"
+#line 936 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1839,13 +1843,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 944 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
 #line 945 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
 #line 946 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
 #line 947 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 948 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1853,13 +1857,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 954 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
 #line 955 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
 #line 956 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
 #line 957 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 958 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1879,26 +1883,26 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 976 "regex.h2"
+#line 977 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 994 "regex.h2"
+#line 997 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1000 "regex.h2"
+#line 1003 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
     }
 
-#line 1005 "regex.h2"
+#line 1008 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1007 "regex.h2"
+#line 1010 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1906,31 +1910,33 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1014 "regex.h2"
+#line 1017 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1036 "regex.h2"
+#line 1039 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1040 "regex.h2"
+#line 1043 "regex.h2"
     }
 
-#line 1044 "regex.h2"
+#line 1047 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
+        old_state.group_captures_have_numbers = cur_state.group_captures_have_numbers;
         CPP2_UFCS(swap)(old_state, cur_state);
+
         return old_state; 
     }
 
-#line 1050 "regex.h2"
+#line 1055 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 1057 "regex.h2"
+#line 1062 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             pos += 1;
@@ -1943,7 +1949,7 @@ namespace regex {
         }
     }
 
-#line 1069 "regex.h2"
+#line 1074 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -1951,7 +1957,7 @@ namespace regex {
         return r; 
     }
 
-#line 1076 "regex.h2"
+#line 1081 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -1960,7 +1966,7 @@ namespace regex {
         }
     }
 
-#line 1084 "regex.h2"
+#line 1089 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() & -> char{
         if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
@@ -1970,10 +1976,10 @@ namespace regex {
         }
     }
 
-#line 1093 "regex.h2"
+#line 1098 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_one_of(std::string(1, e), cpp2::out(&r));  }
 
-#line 1095 "regex.h2"
+#line 1100 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool{
         auto start {pos}; 
         auto end {CPP2_UFCS(find_first_of)(regex, e, pos)}; 
@@ -1989,7 +1995,7 @@ namespace regex {
         }
     }
 
-#line 1110 "regex.h2"
+#line 1115 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2010,13 +2016,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1132 "regex.h2"
+#line 1137 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1137 "regex.h2"
+#line 1142 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2024,10 +2030,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1144 "regex.h2"
+#line 1149 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1146 "regex.h2"
+#line 1151 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -2049,7 +2055,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1167 "regex.h2"
+#line 1172 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2060,7 +2066,7 @@ namespace regex {
         return r; 
     }
 
-#line 1177 "regex.h2"
+#line 1182 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -2073,8 +2079,8 @@ namespace regex {
         return r; 
     }
 
-#line 1189 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change) & -> bool{
+#line 1194 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, bool& group_captures_have_numbers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
 
@@ -2101,9 +2107,13 @@ namespace regex {
             else {if (cur == 'i') {apply(expression_flags::case_insensitive); }
             else {if (cur == 'm') {apply(expression_flags::multiple_lines); }
             else {if (cur == 's') {apply(expression_flags::single_line); }
+            else {if (cur == 'n') {
+                apply(expression_flags::no_group_captures);
+                group_captures_have_numbers = is_negative;
+            }
             else {
                 error(("Unknown modifier: " + cpp2::to_string(cur))); return false; 
-            }}}}}
+            }}}}}}
         }
 
         modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
@@ -2111,7 +2121,7 @@ namespace regex {
         return true; 
     }
 
-#line 1229 "regex.h2"
+#line 1238 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2119,7 +2129,7 @@ namespace regex {
         return true; 
     }
 
-#line 1236 "regex.h2"
+#line 1245 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2133,7 +2143,7 @@ namespace regex {
         return false; 
     }
 
-#line 1249 "regex.h2"
+#line 1258 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -2142,7 +2152,7 @@ namespace regex {
         return false; 
     }
 
-#line 1257 "regex.h2"
+#line 1266 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2263,7 +2273,7 @@ namespace regex {
         return true; 
     }
 
-#line 1377 "regex.h2"
+#line 1386 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2375,14 +2385,15 @@ namespace regex {
         return true; 
     }
 
-#line 1488 "regex.h2"
+#line 1497 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
-        auto has_id {true}; 
+        auto has_id {cur_state.group_captures_have_numbers}; 
         auto has_pattern {true}; 
         std::string group_name {""}; 
         std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
+        auto group_capture_change_to {cur_state.group_captures_have_numbers}; 
 
         char c_next {'\0'}; 
         // Skip the '('
@@ -2393,6 +2404,7 @@ namespace regex {
 
             if (c_next == '<') {
                 // named group
+                has_id = true; // Force id for named groups.
                 if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
                 if (!(grab_until('>', cpp2::out(&group_name)))) {error("Missing ending bracket for named group."); return false; }
                 if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
@@ -2402,7 +2414,7 @@ namespace regex {
                 has_id = false;
                 std::string change_str {""}; 
                 if (!(grab_until_one_of("):", cpp2::out(&change_str)))) {error("Missing ending bracket for group."); return false; }
-                if (!(parse_modifiers(std::move(change_str), cpp2::out(&modifier_change)))) {
+                if (!(parse_modifiers(std::move(change_str), cpp2::out(&modifier_change), group_capture_change_to))) {
                      return false; 
                 }
 
@@ -2425,6 +2437,7 @@ namespace regex {
             }
 
             auto old_state {new_state()}; 
+            cur_state.group_captures_have_numbers = std::move(group_capture_change_to);
             parse_until(')');
             auto inner {create_matcher_from_state()}; 
             restore_state(std::move(old_state));
@@ -2442,13 +2455,14 @@ namespace regex {
         }
         else {
             // Only a modifier
+            cur_state.group_captures_have_numbers = std::move(group_capture_change_to);
             CPP2_UFCS(add)(cur_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_change)))));
         }
 
         return true; 
     }
 
-#line 1560 "regex.h2"
+#line 1573 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2458,7 +2472,7 @@ namespace regex {
         return false; 
     }
 
-#line 1569 "regex.h2"
+#line 1582 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2533,7 +2547,7 @@ namespace regex {
         return true; 
     }
 
-#line 1643 "regex.h2"
+#line 1656 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2571,7 +2585,7 @@ namespace regex {
         return true; 
     }
 
-#line 1680 "regex.h2"
+#line 1693 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
@@ -2595,7 +2609,7 @@ namespace regex {
         }
     }
 
-#line 1703 "regex.h2"
+#line 1716 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2611,19 +2625,23 @@ namespace regex {
             if (     c == 'i') { add("::cpp2::regex::expression_flags::case_insensitive", r); }
             else {if (c == 'm') {add("::cpp2::regex::expression_flags::multiple_lines", r); }
             else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
-            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}
+            else {if (c == 'n') {
+                add("::cpp2::regex::expression_flags::no_group_captures", r);
+                cur_state.group_captures_have_numbers = false;
+            }
+            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}}
         }
 
         return r; 
     }
 
-#line 1724 "regex.h2"
+#line 1741 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
+        auto mod {parse_modifier()}; 
         parse_until('\0');
 
         if (has_error) {return "Error"; }
 
-        auto mod {parse_modifier()}; 
         auto named_groups_arg {create_named_groups_arg()}; 
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\"")}; 
@@ -2632,7 +2650,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1740 "regex.h2"
+#line 1757 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index fc829807b2..a92c1dd0dc 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -32,6 +32,7 @@ expression_flags: type = {
     case_insensitive : int == 1;  // mod: i
     multiple_lines: int    == 2;  // mod: m
     single_line: int       == 4;  // mod: s
+    no_group_captures: int == 8;  // mod: n
 }
 
 match_group: @struct  type = {
@@ -991,6 +992,8 @@ regex_parser_state: @struct type = {
     /// List of alternate matcher lists. E.g. ab|cd|xy
     alternate_match_lists: std::vector> = ();
 
+    group_captures_have_numbers : bool = true;
+
     next_alternative: (inout this) = {
         new_list: std::vector = ();
         std::swap(new_list, cur_match_list);
@@ -1043,7 +1046,9 @@ regex_parser:  type = {
     //
     new_state: (inout this) -> regex_parser_state = {
         old_state: regex_parser_state = ();
+        old_state.group_captures_have_numbers = cur_state.group_captures_have_numbers;
         old_state.swap(cur_state);
+
         return old_state;
     }
 
@@ -1186,7 +1191,7 @@ regex_parser:  type = {
         return r;
     }
 
-    parse_modifiers: (inout this, change_str: std::string, out modifier_change: std::string) -> bool = {
+    parse_modifiers: (inout this, change_str: std::string, out modifier_change: std::string, inout group_captures_have_numbers: bool) -> bool = {
         is_negative := false;
         is_reset    := false;
 
@@ -1213,6 +1218,10 @@ regex_parser:  type = {
             else if cur == 'i' { apply(expression_flags::case_insensitive); }
             else if cur == 'm' { apply(expression_flags::multiple_lines); }
             else if cur == 's' { apply(expression_flags::single_line); }
+            else if cur == 'n' {
+                apply(expression_flags::no_group_captures);
+                group_captures_have_numbers = is_negative;
+            }
             else {
                 error("Unknown modifier: (cur)$"); return false;
             }
@@ -1488,10 +1497,11 @@ regex_parser:  type = {
     is_group: (inout this, c: char) -> bool = {
         if c != '(' { return false; }
 
-        has_id := true;
+        has_id := cur_state.group_captures_have_numbers;
         has_pattern := true;
         group_name : std::string = "";
         modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
+        group_capture_change_to := cur_state.group_captures_have_numbers;
 
         c_next : char = '\0';
         // Skip the '('
@@ -1502,6 +1512,7 @@ regex_parser:  type = {
 
             if c_next == '<' {
                 // named group
+                has_id = true; // Force id for named groups.
                 if !next(out c_next) /* skip '<' */ { error("Missing ending bracket for named group."); return false; }
                 if !grab_until('>', out group_name) { error("Missing ending bracket for named group."); return false; }
                 if !next(out c_next) { error("Group without closing bracket."); return false;}
@@ -1511,7 +1522,7 @@ regex_parser:  type = {
                 has_id = false;
                 change_str : std::string = "";
                 if !grab_until_one_of("):", out change_str) { error("Missing ending bracket for group."); return false; }
-                if !parse_modifiers(change_str, out modifier_change) {
+                if !parse_modifiers(change_str, out modifier_change, group_capture_change_to) {
                      return false;
                 }
 
@@ -1534,6 +1545,7 @@ regex_parser:  type = {
             }
 
             old_state: _ = new_state();
+            cur_state.group_captures_have_numbers = group_capture_change_to;
             parse_until(')');
             inner:= create_matcher_from_state();
             restore_state(old_state);
@@ -1551,6 +1563,7 @@ regex_parser:  type = {
         }
         else {
             // Only a modifier
+            cur_state.group_captures_have_numbers = group_capture_change_to;
             cur_state.add(create_matcher("modifier_matcher_logic", "(modifier_change)$"));
         }
 
@@ -1715,6 +1728,10 @@ regex_parser:  type = {
             if      c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
             else if c == 'm' { add("::cpp2::regex::expression_flags::multiple_lines", r); }
             else if c == 's' { add("::cpp2::regex::expression_flags::single_line", r); }
+            else if c == 'n' {
+                add("::cpp2::regex::expression_flags::no_group_captures", r);
+                cur_state.group_captures_have_numbers = false;
+            }
             else { error("Unknown modifier: '(c)$'"); }
         }
 
@@ -1722,11 +1739,11 @@ regex_parser:  type = {
     }
 
     parse:(inout this) -> std::string = {
+        mod   := parse_modifier();
         parse_until('\0');
 
         if has_error { return "Error"; }
 
-        mod   := parse_modifier();
         named_groups_arg := create_named_groups_arg();
         inner := create_matcher_from_state();
         start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\"");

From c00bf90dbd909f43fe30a1627f4ddebf7fec0731 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 10:38:13 +0100
Subject: [PATCH 069/161] Added perquisites for per syntax parsing.

---
 source/regex.h2 | 37 ++++++++++++++++++++++++++++++-------
 1 file changed, 30 insertions(+), 7 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index a92c1dd0dc..7aea5471ae 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -29,10 +29,11 @@ bstring:  type == std::basic_string;
 //
 
 expression_flags: type = {
-    case_insensitive : int == 1;  // mod: i
-    multiple_lines: int    == 2;  // mod: m
-    single_line: int       == 4;  // mod: s
-    no_group_captures: int == 8;  // mod: n
+    case_insensitive : int ==  1;  // mod: i
+    multiple_lines: int    ==  2;  // mod: m
+    single_line: int       ==  4;  // mod: s
+    no_group_captures: int ==  8;  // mod: n
+    perl_code_syntax: int  == 16;  // mod: x or xx
 }
 
 match_group: @struct  type = {
@@ -993,6 +994,7 @@ regex_parser_state: @struct type = {
     alternate_match_lists: std::vector> = ();
 
     group_captures_have_numbers : bool = true;
+    perl_code_syntax: bool = false;
 
     next_alternative: (inout this) = {
         new_list: std::vector = ();
@@ -1033,6 +1035,8 @@ regex_parser:  type = {
     has_error: bool = false;
     error_out: Error_out;
 
+    perl_code_syntax_in_classes: bool = false;
+
     supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit");
 
@@ -1047,6 +1051,7 @@ regex_parser:  type = {
     new_state: (inout this) -> regex_parser_state = {
         old_state: regex_parser_state = ();
         old_state.group_captures_have_numbers = cur_state.group_captures_have_numbers;
+        old_state.perl_code_syntax = cur_state.perl_code_syntax;
         old_state.swap(cur_state);
 
         return old_state;
@@ -1191,7 +1196,8 @@ regex_parser:  type = {
         return r;
     }
 
-    parse_modifiers: (inout this, change_str: std::string, out modifier_change: std::string, inout group_captures_have_numbers: bool) -> bool = {
+    parse_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
+                      inout group_captures_have_numbers: bool, inout perl_code_syntax: bool) -> bool = {
         is_negative := false;
         is_reset    := false;
 
@@ -1222,6 +1228,10 @@ regex_parser:  type = {
                 apply(expression_flags::no_group_captures);
                 group_captures_have_numbers = is_negative;
             }
+            else if cur == 'x' {
+                apply(expression_flags::perl_code_syntax);
+                perl_code_syntax = !is_negative;
+            }
             else {
                 error("Unknown modifier: (cur)$"); return false;
             }
@@ -1502,6 +1512,7 @@ regex_parser:  type = {
         group_name : std::string = "";
         modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
         group_capture_change_to := cur_state.group_captures_have_numbers;
+        perl_code_syntax_change_to := cur_state.perl_code_syntax;
 
         c_next : char = '\0';
         // Skip the '('
@@ -1522,7 +1533,7 @@ regex_parser:  type = {
                 has_id = false;
                 change_str : std::string = "";
                 if !grab_until_one_of("):", out change_str) { error("Missing ending bracket for group."); return false; }
-                if !parse_modifiers(change_str, out modifier_change, group_capture_change_to) {
+                if !parse_modifiers(change_str, out modifier_change, group_capture_change_to, perl_code_syntax_change_to) {
                      return false;
                 }
 
@@ -1546,6 +1557,7 @@ regex_parser:  type = {
 
             old_state: _ = new_state();
             cur_state.group_captures_have_numbers = group_capture_change_to;
+            cur_state.perl_code_syntax = perl_code_syntax_change_to;
             parse_until(')');
             inner:= create_matcher_from_state();
             restore_state(old_state);
@@ -1564,6 +1576,7 @@ regex_parser:  type = {
         else {
             // Only a modifier
             cur_state.group_captures_have_numbers = group_capture_change_to;
+            cur_state.perl_code_syntax = perl_code_syntax_change_to;
             cur_state.add(create_matcher("modifier_matcher_logic", "(modifier_change)$"));
         }
 
@@ -1722,7 +1735,7 @@ regex_parser:  type = {
         };
 
         mod_pos := 0;
-        while mod_pos != modifier.size() next mod_pos += 1 {
+        while mod_pos < modifier.ssize() next mod_pos += 1 {
             c: char = modifier[mod_pos];
 
             if      c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
@@ -1732,6 +1745,16 @@ regex_parser:  type = {
                 add("::cpp2::regex::expression_flags::no_group_captures", r);
                 cur_state.group_captures_have_numbers = false;
             }
+            else if c == 'x' {
+                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
+                cur_state.perl_code_syntax = true;
+
+                // Check if we have 'xx'
+                mod_pos += 1;
+                if mod_pos < modifier.ssize() && 'x' == modifier[mod_pos] {
+                    perl_code_syntax_in_classes = true;
+                }
+            }
             else { error("Unknown modifier: '(c)$'"); }
         }
 

From 7b927d04c06b112445d538dbdfc30f965533dd33 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 10:59:59 +0100
Subject: [PATCH 070/161] Remove direkt position handling from parser.

---
 source/regex.h2 | 126 ++++++++++++++++++++++++++++++------------------
 1 file changed, 79 insertions(+), 47 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 7aea5471ae..80fd990e2f 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1064,9 +1064,39 @@ regex_parser:  type = {
     // Position management functions
     //
 
-    next: (inout this, out n: char) -> bool = {
-        if (pos + 1) < regex.size() {
-            pos += 1;
+    private get_next_position: (in this, in_class: bool) -> size_t = {
+        perl_syntax:= cur_state.perl_code_syntax || (in_class && cur_state.perl_code_syntax && perl_code_syntax_in_classes);
+        cur := pos + 1;
+        if perl_syntax {
+            while cur < regex.size() next (cur += 1) {
+                n: = regex[cur];
+
+                if space_class::includes(n) {
+                    continue;
+                }
+                else if !in_class && '#' == n {
+                    cur = regex.find("\n", cur);
+                    if std::string::npos == cur {
+                        // No new line, comment runs until the end of the pattern
+                        cur = regex.size();
+                    }
+                }
+                else { // None space none comment char
+                    break;
+                }
+            }
+        }
+
+        // Check for end of file.
+        if cur > regex.size() {
+            cur = regex.size();
+        }
+        return cur;
+    }
+
+    private next_impl: (inout this, out n: char, in_class: bool) -> bool = {
+        pos = get_next_position(in_class);
+        if pos != regex.size() {
             n = regex[pos];
             return true;
         }
@@ -1076,6 +1106,9 @@ regex_parser:  type = {
         }
     }
 
+    next: (inout this, out n: char)          next_impl(out n, false);
+    next_in_class: (inout this, out n: char) next_impl(out n, true);
+
     skip: (inout this) -> bool = {
         c: char;
         r := next(out c);
@@ -1083,6 +1116,15 @@ regex_parser:  type = {
         return r;
     }
 
+    skip_n:(inout this, n: int) -> bool = {
+        r := true;
+        cur := 0;
+        while r && cur < n next (r = skip()) {
+            cur += 1;
+        }
+        return r;
+    }
+
     current: (in this) -> char = {
         if pos < regex.size() {
             return regex[pos];
@@ -1091,20 +1133,28 @@ regex_parser:  type = {
         }
     }
 
-    peek: (inout this) -> char = {
-        if (pos + 1) < regex.size() {
-            return regex[pos + 1];
+    private peek_impl: (in this, in_class: bool) -> char = {
+        next_pos := get_next_position(in_class);
+        if next_pos < regex.size() {
+            return regex[next_pos];
         }
         else {
             return '\0';
         }
     }
 
-    grab_until: (inout this, in e: char, out r: std::string) grab_until_one_of(std::string(1, e), out r);
+    peek: (in this)          peek_impl(false);
+    peek_in_class: (in this) peek_impl(true);
 
-    grab_until_one_of: (inout this, in e: std::string, out r: std::string) -> bool = {
+    private grab_until_impl: (inout this, in e: std::string, out r: std::string, any: bool) -> bool = {
         start := pos;
-        end: = regex.find_first_of(e, pos);
+        end:= pos;
+        if any {
+            end = regex.find_first_of(e, pos);
+        }
+        else {
+            end = regex.find(e, pos);
+        }
 
         if end != std::string_view::npos {
             r = regex.substr(start, end - pos);
@@ -1117,6 +1167,10 @@ regex_parser:  type = {
         }
     }
 
+    grab_until: (inout this, in e: std::string, out r: std::string)        grab_until_impl(e, out r, false);
+    grab_until: (inout this, in e: char, out r: std::string)               grab_until_impl(std::string(1, e), out r, false);
+    grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true);
+
     grab_number: (inout this) -> std::string = {
         start := pos;
         start_search := pos;
@@ -1278,38 +1332,23 @@ regex_parser:  type = {
 
         classes: std::vector = ();
 
-        c_cur: char = regex[pos];
-        next_item:= :() -> bool = {
-            pos&$* += 1;
-            if pos&$* >= regex$.size() { return false; }
-
-            c_cur&$* = regex$[pos&$*];
-            return true;
-
-        };
-
-        peek_item:= :() -> char = {
-            if (pos$ + 1) >= regex$.size() { return '\0'; }
-            else { return regex[pos + 1]; }
-        };
+        c_cur: char = current();
 
         // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
         negate:= false;
         first:= true;
         range:= false;
-        while next_item() & (c_cur != ']' || first) {
+        while next_in_class(out c_cur) & (c_cur != ']' || first) {
             if c_cur == '^' {
                 negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if c_cur == '[' && peek_item() == ':' {
+            if c_cur == '[' && peek_in_class() == ':' {
                 // We have a character class.
-                pos += 2; // Skip ':]'
+                _ = skip_n(2);
 
-                end := regex.find(":]", pos);
-                if end == std::string::npos { error("Could not find end of character class."); return false; }
-
-                name := regex.substr(pos, end - pos);
+                name: std::string = "";
+                if !grab_until(":]", out name) { error("Could not find end of character class."); return false; }
                 if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) {
                     error("Unsupported character class. Supported ones are: (join(supported_classes))$");
                     return false;
@@ -1317,11 +1356,10 @@ regex_parser:  type = {
 
                 classes.push_back("[:(name)$:]");
 
-                end += 1; // Skip ':' pointing to the ending ']'.
-                pos = end;
+                _ = skip(); // Skip ':' pointing to the ending ']'.
             }
             else if c_cur == '\\' {
-                if next_item()  && (c_cur != ']') {
+                if next_in_class(out c_cur)  && (c_cur != ']') {
                     name := "";
                          if 'd' == c_cur { name = "short_digits"; }
                     else if 'D' == c_cur { name = "short_not_digits"; }
@@ -1363,8 +1401,6 @@ regex_parser:  type = {
             first = false;
         }
 
-        _ = next_item; // TODO: Use in while is not recognized.
-
         if c_cur != ']' {
             error("Error end of character class definition before terminating ']'.");
             return false;
@@ -1397,7 +1433,8 @@ regex_parser:  type = {
         if c != '\\' { return false; }
 
         start := pos; // Keep start for group matchers.
-        pos += 1;
+        c_next := '\0';
+        if !next(out c_next) { error("Escape without a following character."); return false; }
 
         add_group_matcher:= :(name: std::string) -> bool = {
 
@@ -1426,10 +1463,6 @@ regex_parser:  type = {
             return true;
         };
 
-        if pos >= regex.size() { error("Escape without a following character."); return false;}
-
-        c_next: char = regex[pos];
-
         if '1' <= c_next <= '9' {
             group := grab_number();
             if !add_group_matcher(group) { return false; }
@@ -1618,11 +1651,11 @@ regex_parser:  type = {
         possessive := false;
         if peek() == '?' {
             greedy = false;
-            pos += 1;
+            _ = skip();
         }
         else if peek() == '+' {
             possessive = true;
-            pos += 1;
+            _ = skip();
         }
 
         min_count: std::string = "-1";
@@ -1687,11 +1720,11 @@ regex_parser:  type = {
         possessive := false;
         if peek() == '?' {
             greedy = false;
-            pos += 1;
+            _ = skip();
         }
         else if peek() == '+' {
             possessive = true;
-            pos += 1;
+            _ = skip();
         }
 
         if cur_state.empty() {
@@ -1704,9 +1737,8 @@ regex_parser:  type = {
     }
 
     parse_until:(inout this, term: char) = {
-        while pos != regex.size() next pos += 1 {
-            c: char = regex[pos];
-
+        c: char = current();
+        while c != '\n' next _ = next(out c) {
             if c == term { return; }
 
             if !has_error && is_alternative(c) { continue; }

From 0beaa0ca4289a7105cb53feabb6bb274c567214b Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 12:54:25 +0100
Subject: [PATCH 071/161] Added named groups with '.

---
 source/regex.h2 | 29 +++++++++++++++++++++--------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 80fd990e2f..d181f2070a 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -520,7 +520,7 @@ global_group_reset:  type = {
 
 // Regex syntax: () Example: (.*)
 //
-group_matcher_start_logic:  type = {
+group_matcher_start_logic:  type = {
     match:  (cur, inout ctx, _ : Modifiers, _ : Other) -> _ = {
         if -1 != group {
             ctx.set_group_start(group, cur);
@@ -533,7 +533,12 @@ group_matcher_start_logic:  std::string = {
         if group != 0 {
             if 0 != name.size() {
-                return "(?<(name.data())$>";
+                if name_brackets {
+                    return "(?<(name.data())$>";
+                }
+                else {
+                    return "(?'(name.data())$'";
+                }
             }
             else if ModifierChange::has_change {
                 return "(?(ModifierChange::to_string())$:";
@@ -1438,8 +1443,9 @@ regex_parser:  type = {
 
         add_group_matcher:= :(name: std::string) -> bool = {
 
+            name_trim := trim_copy(name);
             group_id : int = 0;
-            if string_to_int(name, group_id) {
+            if string_to_int(name_trim, group_id) {
                 if group_id < 0 {
                     group_id = next_group_id + group_id;
 
@@ -1453,7 +1459,7 @@ regex_parser:  type = {
             }
             else {
                 // Named group
-                iter := named_groups.find(name);
+                iter := named_groups.find(name_trim);
                 if iter == named_groups.end() { error("Group names does not exist. (Name is: (name)$)"); return false; }
 
                 group_id = iter*.second;
@@ -1543,6 +1549,7 @@ regex_parser:  type = {
         has_id := cur_state.group_captures_have_numbers;
         has_pattern := true;
         group_name : std::string = "";
+        group_name_brackets := true;
         modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
         group_capture_change_to := cur_state.group_captures_have_numbers;
         perl_code_syntax_change_to := cur_state.perl_code_syntax;
@@ -1554,11 +1561,17 @@ regex_parser:  type = {
             // Special group
             if !next(out c_next) { error("Missing character after group opening."); return false; }
 
-            if c_next == '<' {
+            if c_next == '<' || c_next == '\'' {
                 // named group
+                end_char := c_next;
+                if end_char == '<' {
+                    end_char = '>';
+                } else {
+                    group_name_brackets = false;
+                }
                 has_id = true; // Force id for named groups.
                 if !next(out c_next) /* skip '<' */ { error("Missing ending bracket for named group."); return false; }
-                if !grab_until('>', out group_name) { error("Missing ending bracket for named group."); return false; }
+                if !grab_until(end_char, out group_name) { error("Missing ending bracket for named group."); return false; }
                 if !next(out c_next) { error("Group without closing bracket."); return false;}
             }
             else {
@@ -1595,7 +1608,7 @@ regex_parser:  type = {
             inner:= create_matcher_from_state();
             restore_state(old_state);
 
-            start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, (modifier_change)$, \"(group_name)$\"");
+            start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, (modifier_change)$, \"(group_name)$\", (group_name_brackets)$");
             if 0 != group_name.size() {
                 if !named_groups.contains(group_name) { // Redefinition of group name is not an error. The left most one is retained.
                     named_groups[group_name] = group_number;
@@ -1801,7 +1814,7 @@ regex_parser:  type = {
 
         named_groups_arg := create_named_groups_arg();
         inner := create_matcher_from_state();
-        start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\"");
+        start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
         return   create_matcher("regular_expression", "(mod)$, (next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");

From 03cdda0b7402d7080fea8e8b425d67a5bb0ecd02 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 13:47:08 +0100
Subject: [PATCH 072/161] Escape of space in character classes.

---
 source/regex.h2 | 59 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 36 insertions(+), 23 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index d181f2070a..7b13036749 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1069,8 +1069,16 @@ regex_parser:  type = {
     // Position management functions
     //
 
-    private get_next_position: (in this, in_class: bool) -> size_t = {
-        perl_syntax:= cur_state.perl_code_syntax || (in_class && cur_state.perl_code_syntax && perl_code_syntax_in_classes);
+    private get_next_position: (in this, in_class: bool, for_escape: bool) -> size_t = {
+        perl_syntax := false;
+        if !for_escape {
+            if in_class {
+                perl_syntax = cur_state.perl_code_syntax && perl_code_syntax_in_classes;
+            }
+            else {
+                perl_syntax = cur_state.perl_code_syntax;
+            }
+        }
         cur := pos + 1;
         if perl_syntax {
             while cur < regex.size() next (cur += 1) {
@@ -1099,8 +1107,8 @@ regex_parser:  type = {
         return cur;
     }
 
-    private next_impl: (inout this, out n: char, in_class: bool) -> bool = {
-        pos = get_next_position(in_class);
+    private next_impl: (inout this, out n: char, in_class: bool, for_escape: bool) -> bool = {
+        pos = get_next_position(in_class, for_escape);
         if pos != regex.size() {
             n = regex[pos];
             return true;
@@ -1111,8 +1119,8 @@ regex_parser:  type = {
         }
     }
 
-    next: (inout this, out n: char)          next_impl(out n, false);
-    next_in_class: (inout this, out n: char) next_impl(out n, true);
+    next: (inout this, out n: char)          next_impl(out n, false, false);
+    next_in_class: (inout this, out n: char, for_escape: bool) next_impl(out n, true, for_escape);
 
     skip: (inout this) -> bool = {
         c: char;
@@ -1139,7 +1147,7 @@ regex_parser:  type = {
     }
 
     private peek_impl: (in this, in_class: bool) -> char = {
-        next_pos := get_next_position(in_class);
+        next_pos := get_next_position(in_class, false);
         if next_pos < regex.size() {
             return regex[next_pos];
         }
@@ -1343,7 +1351,7 @@ regex_parser:  type = {
         negate:= false;
         first:= true;
         range:= false;
-        while next_in_class(out c_cur) & (c_cur != ']' || first) {
+        while next_in_class(out c_cur, false) & (c_cur != ']' || first) {
             if c_cur == '^' {
                 negate = true;
                 continue; // Skip rest of the loop. Also the first update.
@@ -1364,23 +1372,28 @@ regex_parser:  type = {
                 _ = skip(); // Skip ':' pointing to the ending ']'.
             }
             else if c_cur == '\\' {
-                if next_in_class(out c_cur)  && (c_cur != ']') {
-                    name := "";
-                         if 'd' == c_cur { name = "short_digits"; }
-                    else if 'D' == c_cur { name = "short_not_digits"; }
-                    else if 'h' == c_cur { name = "short_hor_space"; }
-                    else if 'H' == c_cur { name = "short_not_hor_space"; }
-                    else if 's' == c_cur { name = "short_space"; }
-                    else if 'S' == c_cur { name = "short_not_space"; }
-                    else if 'v' == c_cur { name = "short_ver_space"; }
-                    else if 'V' == c_cur { name = "short_not_ver_space"; }
-                    else if 'w' == c_cur { name = "short_word"; }
-                    else if 'W' == c_cur { name = "short_not_word"; }
+                if next_in_class(out c_cur, true)  && (c_cur != ']') {
+                    if  ' ' == c_cur && cur_state.perl_code_syntax && perl_code_syntax_in_classes {
+                        classes.push_back(std::string(1, c_cur)); // TODO: UFCS error with char as argument.
+                    }
                     else {
-                        error("Unknown group escape.");
-                        return false;
+                        name := "";
+                            if 'd' == c_cur { name = "short_digits"; }
+                        else if 'D' == c_cur { name = "short_not_digits"; }
+                        else if 'h' == c_cur { name = "short_hor_space"; }
+                        else if 'H' == c_cur { name = "short_not_hor_space"; }
+                        else if 's' == c_cur { name = "short_space"; }
+                        else if 'S' == c_cur { name = "short_not_space"; }
+                        else if 'v' == c_cur { name = "short_ver_space"; }
+                        else if 'V' == c_cur { name = "short_not_ver_space"; }
+                        else if 'w' == c_cur { name = "short_word"; }
+                        else if 'W' == c_cur { name = "short_not_word"; }
+                        else {
+                            error("Unknown group escape.");
+                            return false;
+                        }
+                        classes.push_back("[:(name)$:]");
                     }
-                    classes.push_back("[:(name)$:]");
                 } else {
                     error("Escape without a following character.");
                     return false;

From 2eb0b05a1c673bd64f26e7a95dfa71d40027202f Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 15:00:15 +0100
Subject: [PATCH 073/161] Proper handliing of x and xx modifier switches.

---
 source/regex.h2 | 85 ++++++++++++++++++++++++++++++-------------------
 1 file changed, 53 insertions(+), 32 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 7b13036749..7ebb7a9055 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -29,11 +29,12 @@ bstring:  type == std::basic_string;
 //
 
 expression_flags: type = {
-    case_insensitive : int ==  1;  // mod: i
-    multiple_lines: int    ==  2;  // mod: m
-    single_line: int       ==  4;  // mod: s
-    no_group_captures: int ==  8;  // mod: n
-    perl_code_syntax: int  == 16;  // mod: x or xx
+    case_insensitive : int            ==  1;  // mod: i
+    multiple_lines: int               ==  2;  // mod: m
+    single_line: int                  ==  4;  // mod: s
+    no_group_captures: int            ==  8;  // mod: n
+    perl_code_syntax: int             == 16;  // mod: x
+    perl_code_syntax_in_classes: int  == 32;  // mod: xx
 }
 
 match_group: @struct  type = {
@@ -990,6 +991,12 @@ regular_expression: > = ();
 
-    group_captures_have_numbers : bool = true;
-    perl_code_syntax: bool = false;
+    modifiers : regex_parser_modifier_state = ();
 
     next_alternative: (inout this) = {
         new_list: std::vector = ();
@@ -1040,8 +1046,6 @@ regex_parser:  type = {
     has_error: bool = false;
     error_out: Error_out;
 
-    perl_code_syntax_in_classes: bool = false;
-
     supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit");
 
@@ -1055,8 +1059,7 @@ regex_parser:  type = {
     //
     new_state: (inout this) -> regex_parser_state = {
         old_state: regex_parser_state = ();
-        old_state.group_captures_have_numbers = cur_state.group_captures_have_numbers;
-        old_state.perl_code_syntax = cur_state.perl_code_syntax;
+        old_state.modifiers = cur_state.modifiers;
         old_state.swap(cur_state);
 
         return old_state;
@@ -1073,10 +1076,10 @@ regex_parser:  type = {
         perl_syntax := false;
         if !for_escape {
             if in_class {
-                perl_syntax = cur_state.perl_code_syntax && perl_code_syntax_in_classes;
+                perl_syntax = cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes;
             }
             else {
-                perl_syntax = cur_state.perl_code_syntax;
+                perl_syntax = cur_state.modifiers.perl_code_syntax;
             }
         }
         cur := pos + 1;
@@ -1264,7 +1267,7 @@ regex_parser:  type = {
     }
 
     parse_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
-                      inout group_captures_have_numbers: bool, inout perl_code_syntax: bool) -> bool = {
+                      inout parser_modifiers: regex_parser_modifier_state) -> bool = {
         is_negative := false;
         is_reset    := false;
 
@@ -1273,14 +1276,16 @@ regex_parser:  type = {
 
         apply := :(flag: int) = {
             if is_negative&$* {
-                remove&$* += flag;
+                remove&$* |= flag;
             }
             else {
-                add&$* += flag;
+                add&$* |= flag;
             }
         };
 
-        for change_str do (cur) {
+        iter := change_str.begin();
+        while iter != change_str.end() next (iter++) {
+            cur := iter*;
             if cur == '^' {
                 is_reset = true;
             }
@@ -1293,11 +1298,28 @@ regex_parser:  type = {
             else if cur == 's' { apply(expression_flags::single_line); }
             else if cur == 'n' {
                 apply(expression_flags::no_group_captures);
-                group_captures_have_numbers = is_negative;
+                parser_modifiers.group_captures_have_numbers = is_negative;
             }
             else if cur == 'x' {
-                apply(expression_flags::perl_code_syntax);
-                perl_code_syntax = !is_negative;
+                if (iter + 1) == change_str.end() || (iter + 1)* != 'x' {
+                    // x modifier
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !is_negative;
+
+                    // Just x unsets xx and remove x also removes xx
+                    remove |= expression_flags::perl_code_syntax_in_classes;
+                    parser_modifiers.perl_code_syntax_in_classes = false;
+                }
+                else { // xx modifier
+                    // xx also sets or unsets x
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !is_negative;
+
+                    apply(expression_flags::perl_code_syntax_in_classes);
+                    parser_modifiers.perl_code_syntax_in_classes = !is_negative;
+
+                    iter++; // Skip the second x
+                }
             }
             else {
                 error("Unknown modifier: (cur)$"); return false;
@@ -1373,7 +1395,7 @@ regex_parser:  type = {
             }
             else if c_cur == '\\' {
                 if next_in_class(out c_cur, true)  && (c_cur != ']') {
-                    if  ' ' == c_cur && cur_state.perl_code_syntax && perl_code_syntax_in_classes {
+                    if  ' ' == c_cur && cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes {
                         classes.push_back(std::string(1, c_cur)); // TODO: UFCS error with char as argument.
                     }
                     else {
@@ -1559,13 +1581,13 @@ regex_parser:  type = {
     is_group: (inout this, c: char) -> bool = {
         if c != '(' { return false; }
 
-        has_id := cur_state.group_captures_have_numbers;
+        has_id := cur_state.modifiers.group_captures_have_numbers;
         has_pattern := true;
         group_name : std::string = "";
         group_name_brackets := true;
         modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
-        group_capture_change_to := cur_state.group_captures_have_numbers;
-        perl_code_syntax_change_to := cur_state.perl_code_syntax;
+
+        modifiers_change_to : = cur_state.modifiers;
 
         c_next : char = '\0';
         // Skip the '('
@@ -1592,7 +1614,7 @@ regex_parser:  type = {
                 has_id = false;
                 change_str : std::string = "";
                 if !grab_until_one_of("):", out change_str) { error("Missing ending bracket for group."); return false; }
-                if !parse_modifiers(change_str, out modifier_change, group_capture_change_to, perl_code_syntax_change_to) {
+                if !parse_modifiers(change_str, out modifier_change, modifiers_change_to) {
                      return false;
                 }
 
@@ -1615,8 +1637,7 @@ regex_parser:  type = {
             }
 
             old_state: _ = new_state();
-            cur_state.group_captures_have_numbers = group_capture_change_to;
-            cur_state.perl_code_syntax = perl_code_syntax_change_to;
+            cur_state.modifiers = modifiers_change_to;
             parse_until(')');
             inner:= create_matcher_from_state();
             restore_state(old_state);
@@ -1634,8 +1655,7 @@ regex_parser:  type = {
         }
         else {
             // Only a modifier
-            cur_state.group_captures_have_numbers = group_capture_change_to;
-            cur_state.perl_code_syntax = perl_code_syntax_change_to;
+            cur_state.modifiers = modifiers_change_to;
             cur_state.add(create_matcher("modifier_matcher_logic", "(modifier_change)$"));
         }
 
@@ -1801,16 +1821,17 @@ regex_parser:  type = {
             else if c == 's' { add("::cpp2::regex::expression_flags::single_line", r); }
             else if c == 'n' {
                 add("::cpp2::regex::expression_flags::no_group_captures", r);
-                cur_state.group_captures_have_numbers = false;
+                cur_state.modifiers.group_captures_have_numbers = false;
             }
             else if c == 'x' {
                 add("::cpp2::regex::expression_flags::perl_code_syntax", r);
-                cur_state.perl_code_syntax = true;
+                cur_state.modifiers.perl_code_syntax = true;
 
                 // Check if we have 'xx'
                 mod_pos += 1;
                 if mod_pos < modifier.ssize() && 'x' == modifier[mod_pos] {
-                    perl_code_syntax_in_classes = true;
+                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
+                    cur_state.modifiers.perl_code_syntax_in_classes = true;
                 }
             }
             else { error("Unknown modifier: '(c)$'"); }

From 92a24f11db53f64bf62e7a2b449aba310f663ce9 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 16:15:03 +0100
Subject: [PATCH 074/161] Added parsing for comment groups.

---
 source/regex.h2 | 27 +++++++++++++++++++--------
 1 file changed, 19 insertions(+), 8 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 7ebb7a9055..038cfc4630 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1072,9 +1072,9 @@ regex_parser:  type = {
     // Position management functions
     //
 
-    private get_next_position: (in this, in_class: bool, for_escape: bool) -> size_t = {
+    private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = {
         perl_syntax := false;
-        if !for_escape {
+        if !no_skip {
             if in_class {
                 perl_syntax = cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes;
             }
@@ -1110,8 +1110,8 @@ regex_parser:  type = {
         return cur;
     }
 
-    private next_impl: (inout this, out n: char, in_class: bool, for_escape: bool) -> bool = {
-        pos = get_next_position(in_class, for_escape);
+    private next_impl: (inout this, out n: char, in_class: bool, no_skip: bool) -> bool = {
+        pos = get_next_position(in_class, no_skip);
         if pos != regex.size() {
             n = regex[pos];
             return true;
@@ -1123,7 +1123,10 @@ regex_parser:  type = {
     }
 
     next: (inout this, out n: char)          next_impl(out n, false, false);
-    next_in_class: (inout this, out n: char, for_escape: bool) next_impl(out n, true, for_escape);
+    next_in_class: (inout this, out n: char) next_impl(out n, true, false);
+    next_no_skip: (inout this, out n: char)  next_impl(out n, false, true);
+
+
 
     skip: (inout this) -> bool = {
         c: char;
@@ -1373,7 +1376,7 @@ regex_parser:  type = {
         negate:= false;
         first:= true;
         range:= false;
-        while next_in_class(out c_cur, false) & (c_cur != ']' || first) {
+        while next_in_class(out c_cur) & (c_cur != ']' || first) {
             if c_cur == '^' {
                 negate = true;
                 continue; // Skip rest of the loop. Also the first update.
@@ -1394,7 +1397,7 @@ regex_parser:  type = {
                 _ = skip(); // Skip ':' pointing to the ending ']'.
             }
             else if c_cur == '\\' {
-                if next_in_class(out c_cur, true)  && (c_cur != ']') {
+                if next_no_skip(out c_cur)  && (c_cur != ']') {
                     if  ' ' == c_cur && cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes {
                         classes.push_back(std::string(1, c_cur)); // TODO: UFCS error with char as argument.
                     }
@@ -1594,7 +1597,7 @@ regex_parser:  type = {
         if !next(out c_next) { error("Group without closing bracket."); return false;}
         if c_next == '?' {
             // Special group
-            if !next(out c_next) { error("Missing character after group opening."); return false; }
+            if !next_no_skip(out c_next) { error("Missing character after group opening."); return false; }
 
             if c_next == '<' || c_next == '\'' {
                 // named group
@@ -1609,6 +1612,14 @@ regex_parser:  type = {
                 if !grab_until(end_char, out group_name) { error("Missing ending bracket for named group."); return false; }
                 if !next(out c_next) { error("Group without closing bracket."); return false;}
             }
+            else if c_next == '#' {
+                // Comment
+                comment_str : std::string = "";
+                if !grab_until(")", out comment_str) { error("Group without closing bracket."); return false;}
+                // Do not add comment. Has problems with ranges.
+
+                return true;
+            }
             else {
                 // Simple modifier
                 has_id = false;

From d74458d0656034fe6c25c883b5f7b4b1e661490b Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 6 Mar 2024 18:03:55 +0100
Subject: [PATCH 075/161] Aded branch reset support.

---
 source/regex.h2 | 96 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 89 insertions(+), 7 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 038cfc4630..6de9cd91d2 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -413,6 +413,14 @@ any_matcher_logic:  type =
     to_string: ()               bstring(1, '.');
 }
 
+// Regex syntax: none Example: -
+//
+branch_reset_matcher_logic:  type = {
+    match:  (cur, inout ctx, modifiers, _ : Other) Other::match(cur, ctx, modifiers);
+    reset_ranges: (inout ctx) = {}
+    to_string: () "(?|";
+}
+
 // Regex syntax:   Example: a
 //
 char_matcher_logic:  type =
@@ -578,6 +586,12 @@ group_matcher_end_logic:  type = {
     }
 }
 
+special_group_end_logic:  type = {
+    match:  (cur, inout ctx, modifiers, _ : Other) Other::match(cur, ctx, modifiers);
+    reset_ranges: (inout ctx) = {}
+    to_string: () ")";
+}
+
 // Regex syntax: \  Example: \1
 //
 group_ref_matcher_logic:  type = {
@@ -1016,6 +1030,7 @@ regex_parser_state: @struct type = {
     swap: (inout this, inout t: regex_parser_state) = {
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
+        std::swap(modifiers, t.modifiers);
     }
 
     add: (inout this, matcher: _) = cur_match_list.push_back(matcher);
@@ -1030,15 +1045,41 @@ regex_parser_state: @struct type = {
     empty: (this) -> bool = cur_match_list.empty();
 }
 
+regex_branch_reset_state: @struct type = {
+    is_active : bool = false;
+    cur_group : int  = 1; // Global capture group.
+    max_group : int  = 1;
+    from      : int  = 1;
+
+    next: (inout this) -> int = {
+        g := cur_group;
+        cur_group += 1;
+        max_group = max(max_group, cur_group);
+
+        return g;
+    }
+
+    set_next: (inout this, g: int) = {
+        cur_group = g;
+        max_group = max(max_group, g);
+    }
+
+    next_alternative: (inout this) = {
+        if is_active {
+            cur_group = from;
+        }
+    }
+}
+
 
 regex_parser:  type = {
 
     regex: std::string_view;
     modifier: std::string_view;
     cur_state: regex_parser_state = ();
+    cur_branch_reset_state: regex_branch_reset_state = ();
     pos: size_t = 0;
 
-    next_group_id: int = 1; // Global capture group.
     alternatives_count: int = 0;
 
     named_groups : std::map = ();
@@ -1059,7 +1100,6 @@ regex_parser:  type = {
     //
     new_state: (inout this) -> regex_parser_state = {
         old_state: regex_parser_state = ();
-        old_state.modifiers = cur_state.modifiers;
         old_state.swap(cur_state);
 
         return old_state;
@@ -1069,6 +1109,27 @@ regex_parser:  type = {
         cur_state = old_state;
     }
 
+    // Branch reset management functions
+    //
+
+    group_new_state: (inout this) -> regex_branch_reset_state = {
+        old_state: regex_branch_reset_state = ();
+        std::swap(old_state, cur_branch_reset_state);
+
+        cur_branch_reset_state.is_active = true;
+        cur_branch_reset_state.cur_group = old_state.cur_group;
+        cur_branch_reset_state.from      = cur_branch_reset_state.cur_group;
+        cur_branch_reset_state.max_group = cur_branch_reset_state.cur_group;
+
+        return old_state;
+    }
+
+    group_restore_state: (inout this, old_state: regex_branch_reset_state) = {
+        next_group := cur_branch_reset_state.max_group;
+        cur_branch_reset_state = old_state;
+        cur_branch_reset_state.set_next(next_group);
+    }
+
     // Position management functions
     //
 
@@ -1233,6 +1294,7 @@ regex_parser:  type = {
             cur_state.add(create_matcher("empty_matcher_logic", ""));
         }
         cur_state.next_alternative();
+        cur_branch_reset_state.next_alternative();
 
         list: std::string = "";
         separator: std::string = "";
@@ -1341,6 +1403,7 @@ regex_parser:  type = {
         if c != '|' { return false; }
 
         cur_state.next_alternative();
+        cur_branch_reset_state.next_alternative();
         return true;
     }
 
@@ -1485,7 +1548,7 @@ regex_parser:  type = {
             group_id : int = 0;
             if string_to_int(name_trim, group_id) {
                 if group_id < 0 {
-                    group_id = next_group_id + group_id;
+                    group_id = cur_branch_reset_state.cur_group + group_id;
 
                     if group_id < 1 { // Negative and zero are no valid groups.
                         error("Relative group reference does not reference a valid group. (Would be (group_id)$.)");
@@ -1493,7 +1556,7 @@ regex_parser:  type = {
                     }
                 }
 
-                if group_id >= next_group_id { error("Group reference is used before the group is declared."); return false; }
+                if group_id >= cur_branch_reset_state.cur_group { error("Group reference is used before the group is declared."); return false; }
             }
             else {
                 // Named group
@@ -1620,6 +1683,26 @@ regex_parser:  type = {
 
                 return true;
             }
+            else if c_next == '|' {
+                // Branch reset group
+
+                if !next(out c_next) /* skip '|' */ { error("Missing ending bracket for named group."); return false; }
+
+                old_parser_state: _ = new_state();
+                old_branch_state: _ = group_new_state();
+                parse_until(')');
+                inner:= create_matcher_from_state();
+                group_restore_state(old_branch_state);
+                restore_state(old_parser_state);
+
+                start_matcher := create_matcher("branch_reset_matcher_logic", "");
+                end_matcher := create_matcher("special_group_end_logic", "");
+
+                v: std::vector = (start_matcher, inner, end_matcher);
+                cur_state.add(create_matcher_from_list(v));
+
+                return true;
+            }
             else {
                 // Simple modifier
                 has_id = false;
@@ -1643,8 +1726,7 @@ regex_parser:  type = {
 
             group_number := -1;
             if has_id {
-                group_number = next_group_id;
-                next_group_id += 1;
+                group_number = cur_branch_reset_state.next();
             }
 
             old_state: _ = new_state();
@@ -1862,7 +1944,7 @@ regex_parser:  type = {
         start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-        return   create_matcher("regular_expression", "(mod)$, (next_group_id)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
+        return   create_matcher("regular_expression", "(mod)$, (cur_branch_reset_state.cur_group)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
     }
 
 }

From 3d53f898078d40e1624fc1cf47c38f99e6051365 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 7 Mar 2024 17:24:09 +0100
Subject: [PATCH 076/161] Update of tests and header.

---
 include/cpp2regex.h                           | 1121 +++++++++++------
 regression-tests/pure2-regex.cpp2             |  300 ++++-
 .../gcc-13/pure2-regex.cpp.execution          |   77 +-
 .../gcc-13/pure2-regex.cpp.output             |  557 ++++----
 regression-tests/test-results/pure2-regex.cpp |  879 +++++++++----
 5 files changed, 1970 insertions(+), 964 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index b4fdaed4d0..979976a321 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -17,138 +17,153 @@ namespace regex {
 
 #line 31 "regex.h2"
 class expression_flags;
-    
 
-#line 38 "regex.h2"
+#line 40 "regex.h2"
 template class match_group;
     
 
-#line 45 "regex.h2"
+#line 47 "regex.h2"
 template class match_return;
     
 
-#line 50 "regex.h2"
+#line 52 "regex.h2"
 template class match_context;
 
-#line 128 "regex.h2"
+#line 130 "regex.h2"
 template class match_modifiers_state_change;
 
-#line 151 "regex.h2"
+#line 153 "regex.h2"
 template class match_modifiers;
 
-#line 174 "regex.h2"
+#line 176 "regex.h2"
 template class matcher_list;
     
 
-#line 201 "regex.h2"
+#line 203 "regex.h2"
 template class single_class_entry;
 
-#line 209 "regex.h2"
+#line 211 "regex.h2"
 template class range_class_entry;
 
-#line 217 "regex.h2"
+#line 219 "regex.h2"
 template class combined_class_entry;
     
 
-#line 224 "regex.h2"
+#line 226 "regex.h2"
 template class list_class_entry;
     
 
-#line 231 "regex.h2"
+#line 233 "regex.h2"
 template class named_class_entry;
     
 
-#line 236 "regex.h2"
+#line 238 "regex.h2"
 template class negated_class_entry;
     
 
-#line 243 "regex.h2"
+#line 245 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 296 "regex.h2"
+#line 298 "regex.h2"
 template class extract_position_helper;
     
 
-#line 313 "regex.h2"
+#line 315 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 397 "regex.h2"
+#line 399 "regex.h2"
 template class any_matcher_logic;
 
-#line 416 "regex.h2"
+#line 418 "regex.h2"
+template class branch_reset_matcher_logic;
+    
+
+#line 426 "regex.h2"
 template class char_matcher_logic;
 
-#line 444 "regex.h2"
+#line 454 "regex.h2"
 template class class_matcher_logic;
 
-#line 493 "regex.h2"
+#line 503 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 501 "regex.h2"
+#line 511 "regex.h2"
 template class escaped_char_matcher_logic;
 
-#line 510 "regex.h2"
+#line 520 "regex.h2"
 template class global_group_reset;
     
 
-#line 522 "regex.h2"
-template class group_matcher_start_logic;
+#line 532 "regex.h2"
+template class group_matcher_start_logic;
     
 
-#line 550 "regex.h2"
+#line 565 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 576 "regex.h2"
+#line 589 "regex.h2"
+template class special_group_end_logic;
+    
+
+#line 597 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 609 "regex.h2"
+#line 630 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 629 "regex.h2"
+#line 650 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 646 "regex.h2"
+#line 667 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 658 "regex.h2"
+#line 679 "regex.h2"
 template class named_matcher_logic;
     
 
-#line 662 "regex.h2"
+#line 683 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 688 "regex.h2"
+#line 709 "regex.h2"
 template class range_matcher_logic;
 
-#line 816 "regex.h2"
+#line 837 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 835 "regex.h2"
+#line 856 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 886 "regex.h2"
+#line 907 "regex.h2"
 template class group_name_list;
 
-#line 898 "regex.h2"
+#line 919 "regex.h2"
 class group_name_list_end;
     
 
-#line 903 "regex.h2"
+#line 924 "regex.h2"
 template class regular_expression;
 
-#line 987 "regex.h2"
+#line 1008 "regex.h2"
+class regex_parser_modifier_state;
+    
+
+#line 1014 "regex.h2"
 class regex_parser_state;
 
-#line 1021 "regex.h2"
+#line 1048 "regex.h2"
+class regex_branch_reset_state;
+    
+
+#line 1075 "regex.h2"
 template class regex_parser;
 
-#line 1764 "regex.h2"
+#line 1959 "regex.h2"
 }
 }
 
@@ -189,15 +204,17 @@ template using bstring = std::basic_string;
 
 class expression_flags {
     public: static const int case_insensitive;// mod: i
-    public: static const int multiple_lines;// mod: m
-    public: static const int single_line;// mod: s
+    public: static const int multiple_lines;  // mod: m
+    public: static const int single_line;     // mod: s
     public: static const int no_group_captures;// mod: n
+    public: static const int perl_code_syntax;// mod: x
+    public: static const int perl_code_syntax_in_classes;// mod: xx
 
     public: expression_flags() = default;
     public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(expression_flags const&) -> void = delete;
 };
-#line 37 "regex.h2"
+#line 39 "regex.h2"
 
 template class match_group {
     public: Iter start {}; 
@@ -221,13 +238,13 @@ template cl
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     public: match_context(match_context const& that);
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -236,22 +253,22 @@ template cl
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 75 "regex.h2"
+#line 77 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 81 "regex.h2"
+#line 83 "regex.h2"
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 88 "regex.h2"
+#line 90 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 93 "regex.h2"
+#line 95 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 97 "regex.h2"
+#line 99 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 101 "regex.h2"
+#line 103 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -260,12 +277,12 @@ template cl
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 111 "regex.h2"
+#line 113 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 126 "regex.h2"
+#line 128 "regex.h2"
 };
 
 template class match_modifiers_state_change {
@@ -277,13 +294,13 @@ template
 
     public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
 
-#line 146 "regex.h2"
+#line 148 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: match_modifiers_state_change() = default;
     public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_modifiers_state_change const&) -> void = delete;
 
-#line 147 "regex.h2"
+#line 149 "regex.h2"
 };
 
 using match_modifiers_no_change = match_modifiers_state_change;
@@ -307,7 +324,7 @@ template class match_modifiers {
     public: auto operator=(match_modifiers const&) -> void = delete;
 
 
-#line 167 "regex.h2"
+#line 169 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -320,7 +337,7 @@ template class matcher_list {
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto;
 
-#line 180 "regex.h2"
+#line 182 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
@@ -333,7 +350,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 188 "regex.h2"
+#line 190 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -355,7 +372,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 205 "regex.h2"
+#line 207 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -368,7 +385,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 213 "regex.h2"
+#line 215 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -380,7 +397,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 220 "regex.h2"
+#line 222 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -392,7 +409,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 227 "regex.h2"
+#line 229 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 234 "regex.h2"
+#line 236 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -414,7 +431,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 239 "regex.h2"
+#line 241 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -426,10 +443,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 246 "regex.h2"
+#line 248 "regex.h2"
 };
 
-#line 249 "regex.h2"
+#line 251 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -460,7 +477,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 280 "regex.h2"
+#line 282 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -474,20 +491,20 @@ template                      using short_not_word_class = negat
 //-----------------------------------------------------------------------
 //
 
-#line 294 "regex.h2"
+#line 296 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 305 "regex.h2"
+#line 307 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 307 "regex.h2"
+#line 309 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -498,20 +515,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto;
 
-#line 327 "regex.h2"
+#line 329 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 345 "regex.h2"
+#line 347 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 393 "regex.h2"
+#line 395 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -520,14 +537,27 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 410 "regex.h2"
+#line 412 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 412 "regex.h2"
+#line 414 "regex.h2"
+};
+
+// Regex syntax: none Example: -
+//
+template class branch_reset_matcher_logic {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: branch_reset_matcher_logic() = default;
+    public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
+
+#line 422 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -536,27 +566,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 437 "regex.h2"
+#line 447 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 439 "regex.h2"
+#line 449 "regex.h2"
 };
 
-#line 442 "regex.h2"
+#line 452 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 465 "regex.h2"
+#line 475 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 477 "regex.h2"
+#line 487 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -565,7 +595,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 489 "regex.h2"
+#line 499 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -578,7 +608,7 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 497 "regex.h2"
+#line 507 "regex.h2"
 };
 
 // Regex syntax: \  Example: \.
@@ -586,13 +616,13 @@ template class empty_matcher_logic {
 template class escaped_char_matcher_logic
 : public char_matcher_logic {
 
-#line 505 "regex.h2"
+#line 515 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: escaped_char_matcher_logic() = default;
     public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
 
-#line 506 "regex.h2"
+#line 516 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -600,22 +630,22 @@ template class escaped_char_matcher_l
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 516 "regex.h2"
+#line 526 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 518 "regex.h2"
+#line 528 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
 //
-template class group_matcher_start_logic {
+template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 530 "regex.h2"
+#line 540 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> std::string;
@@ -624,13 +654,13 @@ template
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 548 "regex.h2"
+#line 563 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 562 "regex.h2"
+#line 577 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -639,7 +669,18 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 572 "regex.h2"
+#line 587 "regex.h2"
+};
+
+template class special_group_end_logic {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: special_group_end_logic() = default;
+    public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(special_group_end_logic const&) -> void = delete;
+
+#line 593 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -647,14 +688,14 @@ template class group_matcher_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 603 "regex.h2"
+#line 624 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 605 "regex.h2"
+#line 626 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -663,14 +704,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 623 "regex.h2"
+#line 644 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 625 "regex.h2"
+#line 646 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -679,14 +720,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 640 "regex.h2"
+#line 661 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 642 "regex.h2"
+#line 663 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -695,14 +736,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 651 "regex.h2"
+#line 672 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 653 "regex.h2"
+#line 674 "regex.h2"
 };
 
 // Named character classes
@@ -715,7 +756,7 @@ template class named_matcher_l
     public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_matcher_logic const&) -> void = delete;
 
-#line 661 "regex.h2"
+#line 682 "regex.h2"
 };
 template                    class named_class_matcher_logic: public named_matcher_logic> {
     public: named_class_matcher_logic() = default;
@@ -723,7 +764,7 @@ template                    void = delete;
 
 
-#line 664 "regex.h2"
+#line 685 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -733,7 +774,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 674 "regex.h2"
+#line 695 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -745,40 +786,40 @@ template using named_string_end_or_before_new_line_at_end = name
 template using named_string_end = named_matcher_logic>;
 template using named_string_start = named_matcher_logic>;
 
-#line 687 "regex.h2"
+#line 708 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 699 "regex.h2"
+#line 720 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 727 "regex.h2"
+#line 748 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 732 "regex.h2"
+#line 753 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 737 "regex.h2"
+#line 758 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 743 "regex.h2"
+#line 764 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 758 "regex.h2"
+#line 779 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return;
 
-#line 788 "regex.h2"
+#line 809 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 812 "regex.h2"
+#line 833 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -791,7 +832,7 @@ template void = delete;
 
 
-#line 829 "regex.h2"
+#line 850 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -802,7 +843,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
 
-#line 866 "regex.h2"
+#line 887 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> std::string;
     public: word_boundary_matcher_logic() = default;
@@ -810,10 +851,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 874 "regex.h2"
+#line 895 "regex.h2"
 };
 
-#line 877 "regex.h2"
+#line 898 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -831,7 +872,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 896 "regex.h2"
+#line 917 "regex.h2"
 };
 
 class group_name_list_end {
@@ -840,7 +881,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 900 "regex.h2"
+#line 921 "regex.h2"
 };
 
 // Regular expression implementation
@@ -851,7 +892,7 @@ template> str, auto const& pos) -> auto;
 
-#line 917 "regex.h2"
+#line 938 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -859,7 +900,7 @@ template matched_, context const& ctx_);
 
-#line 927 "regex.h2"
+#line 948 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -874,7 +915,7 @@ template void = delete;
 
 
-#line 943 "regex.h2"
+#line 964 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -882,19 +923,19 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 955 "regex.h2"
+#line 976 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 977 "regex.h2"
+#line 998 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 978 "regex.h2"
+#line 999 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -904,6 +945,12 @@ template> alternate_match_lists {}; 
 
-    public: bool group_captures_have_numbers {true}; 
+    public: regex_parser_modifier_state modifiers {}; 
 
     public: auto next_alternative() & -> void;
 
-#line 1003 "regex.h2"
+#line 1030 "regex.h2"
     public: auto swap(regex_parser_state& t) & -> void;
 
-#line 1008 "regex.h2"
+#line 1036 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1017 "regex.h2"
+#line 1045 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
-#line 1021 "regex.h2"
+class regex_branch_reset_state {
+    public: bool is_active {false}; 
+    public: int cur_group {1}; // Global capture group.
+    public: int max_group {1}; 
+    public: int from {1}; 
+
+    public: [[nodiscard]] auto next() & -> int;
+
+#line 1062 "regex.h2"
+    public: auto set_next(cpp2::in g) & -> void;
+
+#line 1067 "regex.h2"
+    public: auto next_alternative() & -> void;
+
+#line 1072 "regex.h2"
+};
+
+#line 1075 "regex.h2"
 template class regex_parser {
 
     private: std::string_view regex; 
     private: std::string_view modifier; 
     private: regex_parser_state cur_state {}; 
+    private: regex_branch_reset_state cur_branch_reset_state {}; 
     private: size_t pos {0}; 
 
-    private: int next_group_id {1}; // Global capture group.
     private: int alternatives_count {0}; 
 
     private: std::map named_groups {}; 
@@ -949,107 +1013,133 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1045 "regex.h2"
+#line 1099 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto new_state() & -> regex_parser_state;
 
-#line 1055 "regex.h2"
+#line 1108 "regex.h2"
     public: auto restore_state(cpp2::in old_state) & -> void;
 
-#line 1059 "regex.h2"
+#line 1112 "regex.h2"
+    // Branch reset management functions
+    //
+
+    public: [[nodiscard]] auto group_new_state() & -> regex_branch_reset_state;
+
+#line 1127 "regex.h2"
+    public: auto group_restore_state(cpp2::in old_state) & -> void;
+
+#line 1133 "regex.h2"
     // Position management functions
     //
 
-    public: [[nodiscard]] auto next(cpp2::out n) & -> bool;
+    private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
+
+#line 1174 "regex.h2"
+    private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
+
+#line 1186 "regex.h2"
+    public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
+    public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
+    public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1074 "regex.h2"
+#line 1192 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1081 "regex.h2"
+#line 1199 "regex.h2"
+    public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
+
+#line 1208 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1089 "regex.h2"
-    public: [[nodiscard]] auto peek() & -> char;
+#line 1216 "regex.h2"
+    private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1098 "regex.h2"
-    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+#line 1226 "regex.h2"
+    public: [[nodiscard]] auto peek() const& -> auto;
+    public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
-    public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool;
+    private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
+
+#line 1250 "regex.h2"
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+    public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
-#line 1115 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1135 "regex.h2"
+#line 1274 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1142 "regex.h2"
+#line 1281 "regex.h2"
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1149 "regex.h2"
+#line 1288 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1172 "regex.h2"
+#line 1312 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
 
-#line 1182 "regex.h2"
+#line 1322 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
 
-#line 1194 "regex.h2"
-    public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, bool& group_captures_have_numbers) & -> bool;
+#line 1334 "regex.h2"
+    public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+                      regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1235 "regex.h2"
+#line 1399 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1245 "regex.h2"
+#line 1410 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1258 "regex.h2"
+#line 1423 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1266 "regex.h2"
+#line 1431 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1386 "regex.h2"
+#line 1538 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1497 "regex.h2"
+#line 1647 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1573 "regex.h2"
+#line 1758 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1582 "regex.h2"
+#line 1767 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1656 "regex.h2"
+#line 1841 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1693 "regex.h2"
+#line 1878 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1716 "regex.h2"
+#line 1900 "regex.h2"
     public: [[nodiscard]] auto parse_modifier() & -> std::string;
 
-#line 1741 "regex.h2"
+#line 1936 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1755 "regex.h2"
+#line 1950 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1764 "regex.h2"
+#line 1959 "regex.h2"
 }
 }
 
@@ -1068,35 +1158,37 @@ namespace regex {
     inline CPP2_CONSTEXPR int expression_flags::multiple_lines = 2;
     inline CPP2_CONSTEXPR int expression_flags::single_line = 4;
     inline CPP2_CONSTEXPR int expression_flags::no_group_captures = 8;
+    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax = 16;
+    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax_in_classes = 32;
 
-#line 58 "regex.h2"
+#line 60 "regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 61 "regex.h2"
+#line 63 "regex.h2"
     }
 
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 63 "regex.h2"
+#line 65 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1104,24 +1196,24 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 67 "regex.h2"
+#line 69 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 69 "regex.h2"
+#line 71 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 75 "regex.h2"
+#line 77 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 81 "regex.h2"
+#line 83 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
@@ -1129,34 +1221,34 @@ namespace regex {
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 88 "regex.h2"
+#line 90 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 93 "regex.h2"
+#line 95 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 97 "regex.h2"
+#line 99 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 101 "regex.h2"
+#line 103 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 105 "regex.h2"
+#line 107 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 107 "regex.h2"
+#line 109 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 113 "regex.h2"
+#line 115 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -1171,13 +1263,13 @@ namespace regex {
         return r; 
     }
 
-#line 130 "regex.h2"
+#line 132 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
 
-#line 135 "regex.h2"
+#line 137 "regex.h2"
     template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
         auto new_flags {old_flags}; 
         if (reset) {
@@ -1189,79 +1281,79 @@ namespace regex {
         return new_flags; 
     }
 
-#line 146 "regex.h2"
+#line 148 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 153 "regex.h2"
+#line 155 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
-#line 157 "regex.h2"
+#line 159 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
-#line 158 "regex.h2"
+#line 160 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
-#line 159 "regex.h2"
+#line 161 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
-#line 164 "regex.h2"
+#line 166 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 175 "regex.h2"
+#line 177 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 177 "regex.h2"
+#line 179 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto { 
         return match_select(cur, ctx, modifiers);  }
 
-#line 180 "regex.h2"
+#line 182 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { 
         return First::match(cur, ctx, modifiers, matcher_list());  }
-#line 182 "regex.h2"
+#line 184 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_return(true, cur);  }
 
-#line 184 "regex.h2"
+#line 186 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 185 "regex.h2"
+#line 187 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 187 "regex.h2"
+#line 189 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 203 "regex.h2"
+#line 205 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 204 "regex.h2"
+#line 206 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 211 "regex.h2"
+#line 213 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 212 "regex.h2"
+#line 214 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 218 "regex.h2"
+#line 220 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 219 "regex.h2"
+#line 221 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
 
-#line 225 "regex.h2"
+#line 227 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 226 "regex.h2"
+#line 228 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
 
-#line 232 "regex.h2"
+#line 234 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 233 "regex.h2"
+#line 235 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 238 "regex.h2"
+#line 240 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 244 "regex.h2"
+#line 246 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 245 "regex.h2"
+#line 247 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
 
-#line 297 "regex.h2"
+#line 299 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto r {Other::match(cur, ctx, modifiers)}; 
         if (r.matched) {
@@ -1270,12 +1362,12 @@ namespace regex {
         return r; 
     }
 
-#line 305 "regex.h2"
+#line 307 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 306 "regex.h2"
+#line 308 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
 
-#line 315 "regex.h2"
+#line 317 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1288,12 +1380,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 327 "regex.h2"
+#line 329 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 328 "regex.h2"
+#line 330 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 330 "regex.h2"
+#line 332 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, tail)}; 
         if (r.matched) {
@@ -1309,7 +1401,7 @@ namespace regex {
         }
     }
 
-#line 345 "regex.h2"
+#line 347 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto{
         auto r {First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()))}; 
 
@@ -1325,7 +1417,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 361 "regex.h2"
+#line 363 "regex.h2"
         // Check if someone other has something larker
         auto o {match_return(false, ctx.end)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1337,7 +1429,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 373 "regex.h2"
+#line 375 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1359,7 +1451,7 @@ namespace regex {
         }
     }
 
-#line 399 "regex.h2"
+#line 401 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -1371,12 +1463,19 @@ namespace regex {
         }
     }
 
-#line 410 "regex.h2"
+#line 412 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 411 "regex.h2"
+#line 413 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 418 "regex.h2"
+#line 419 "regex.h2"
+    template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
+#line 420 "regex.h2"
+    template  auto branch_reset_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 421 "regex.h2"
+    template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return "(?|";  }
+
+#line 428 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1396,12 +1495,12 @@ namespace regex {
         }
 
     }
-#line 437 "regex.h2"
+#line 447 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 438 "regex.h2"
+#line 448 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 446 "regex.h2"
+#line 456 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1421,7 +1520,7 @@ namespace regex {
         }
     }
 
-#line 465 "regex.h2"
+#line 475 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1434,10 +1533,10 @@ namespace regex {
         return r; 
     }
 
-#line 477 "regex.h2"
+#line 487 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 479 "regex.h2"
+#line 489 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1449,43 +1548,48 @@ namespace regex {
         return r; 
     }
 
-#line 494 "regex.h2"
+#line 504 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
-#line 495 "regex.h2"
+#line 505 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 496 "regex.h2"
+#line 506 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
 
-#line 505 "regex.h2"
+#line 515 "regex.h2"
     template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
 
-#line 511 "regex.h2"
+#line 521 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers); 
     }
 
-#line 516 "regex.h2"
+#line 526 "regex.h2"
     template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
-#line 517 "regex.h2"
+#line 527 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
 
-#line 523 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 533 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
         }
         return Other::match(cur, ctx, Modifiers::push(ModifierChange())); 
     }
 
-#line 530 "regex.h2"
-    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
+#line 540 "regex.h2"
+    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
 
-#line 532 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
+#line 542 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
-                return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
+                if (name_brackets) {
+                    return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
+                }
+                else {
+                    return { "(?'" + cpp2::to_string(CPP2_UFCS(data)(name)) + "'" }; 
+                }
             }
             else {if (ModifierChange::has_change) {
                 return { "(?" + cpp2::to_string(ModifierChange::to_string()) + ":" }; 
@@ -1499,7 +1603,7 @@ namespace regex {
         }
     }
 
-#line 551 "regex.h2"
+#line 566 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -1511,10 +1615,10 @@ namespace regex {
         return r; 
     }
 
-#line 562 "regex.h2"
+#line 577 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 564 "regex.h2"
+#line 579 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
         if (group != 0) {
             return ")"; 
@@ -1524,7 +1628,14 @@ namespace regex {
         }
     }
 
-#line 577 "regex.h2"
+#line 590 "regex.h2"
+    template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
+#line 591 "regex.h2"
+    template  auto special_group_end_logic::reset_ranges(auto& ctx) -> void{}
+#line 592 "regex.h2"
+    template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return ")";  }
+
+#line 598 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1551,12 +1662,12 @@ namespace regex {
         }
 
     }
-#line 603 "regex.h2"
+#line 624 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 604 "regex.h2"
+#line 625 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
 
-#line 611 "regex.h2"
+#line 632 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1569,12 +1680,12 @@ namespace regex {
         }}
     }
 
-#line 623 "regex.h2"
+#line 644 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 624 "regex.h2"
+#line 645 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
 
-#line 631 "regex.h2"
+#line 652 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers); 
@@ -1584,24 +1695,24 @@ namespace regex {
         }
 
     }
-#line 640 "regex.h2"
+#line 661 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 641 "regex.h2"
+#line 662 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 648 "regex.h2"
+#line 669 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange())); 
     }
-#line 651 "regex.h2"
+#line 672 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 652 "regex.h2"
+#line 673 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 660 "regex.h2"
+#line 681 "regex.h2"
     template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
 
-#line 690 "regex.h2"
+#line 711 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if (greedy) {
             return match_greedy(0, cur, cur, ctx, modifiers, tail); 
@@ -1611,10 +1722,10 @@ namespace regex {
         }
     }
 
-#line 699 "regex.h2"
+#line 720 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 701 "regex.h2"
+#line 722 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       std::string r {M::to_string()}; 
 
@@ -1641,26 +1752,26 @@ namespace regex {
       return r; 
     }
 
-#line 727 "regex.h2"
+#line 748 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 732 "regex.h2"
+#line 753 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 737 "regex.h2"
+#line 758 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 743 "regex.h2"
+#line 764 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {match_return(true, cur)}; 
         auto count {0}; 
@@ -1676,7 +1787,7 @@ namespace regex {
         return res; 
     }
 
-#line 758 "regex.h2"
+#line 779 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{
         auto r {M::match(cur, ctx, modifiers, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
@@ -1707,7 +1818,7 @@ namespace regex {
         }
     }
 
-#line 788 "regex.h2"
+#line 809 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
@@ -1733,7 +1844,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 818 "regex.h2"
+#line 839 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -1746,7 +1857,7 @@ namespace regex {
         return r; 
     }
 
-#line 837 "regex.h2"
+#line 858 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -1776,9 +1887,9 @@ namespace regex {
         }
 
     }
-#line 866 "regex.h2"
+#line 887 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 867 "regex.h2"
+#line 888 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
         if (negate) {
             return "\\B"; 
@@ -1787,7 +1898,7 @@ namespace regex {
         }
     }
 
-#line 888 "regex.h2"
+#line 909 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
         if (name == CPP2_UFCS(data)(Name)) {
             return group_id; 
@@ -1797,10 +1908,10 @@ namespace regex {
         }
     }
 
-#line 899 "regex.h2"
+#line 920 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 908 "regex.h2"
+#line 929 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -1810,31 +1921,31 @@ namespace regex {
         }
     }
 
-#line 922 "regex.h2"
+#line 943 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 925 "regex.h2"
+#line 946 "regex.h2"
         }
 
-#line 927 "regex.h2"
+#line 948 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 928 "regex.h2"
+#line 949 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 929 "regex.h2"
+#line 950 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 930 "regex.h2"
+#line 951 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 932 "regex.h2"
+#line 953 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 933 "regex.h2"
+#line 954 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 934 "regex.h2"
+#line 955 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 936 "regex.h2"
+#line 957 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1843,13 +1954,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 945 "regex.h2"
+#line 966 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 946 "regex.h2"
+#line 967 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 947 "regex.h2"
+#line 968 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 948 "regex.h2"
+#line 969 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -1857,13 +1968,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 955 "regex.h2"
+#line 976 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 956 "regex.h2"
+#line 977 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 957 "regex.h2"
+#line 978 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 958 "regex.h2"
+#line 979 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -1883,26 +1994,27 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 977 "regex.h2"
+#line 998 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 997 "regex.h2"
+#line 1024 "regex.h2"
     auto regex_parser_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1003 "regex.h2"
+#line 1030 "regex.h2"
     auto regex_parser_state::swap(regex_parser_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
+        std::swap(modifiers, t.modifiers);
     }
 
-#line 1008 "regex.h2"
+#line 1036 "regex.h2"
     auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1010 "regex.h2"
+#line 1038 "regex.h2"
     auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -1910,36 +2022,116 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1017 "regex.h2"
+#line 1045 "regex.h2"
     [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1039 "regex.h2"
+#line 1054 "regex.h2"
+    [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
+        auto g {cur_group}; 
+        cur_group += 1;
+        max_group = max(max_group, cur_group);
+
+        return g; 
+    }
+
+#line 1062 "regex.h2"
+    auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
+        cur_group = g;
+        max_group = max(max_group, g);
+    }
+
+#line 1067 "regex.h2"
+    auto regex_branch_reset_state::next_alternative() & -> void{
+        if (is_active) {
+            cur_group = from;
+        }
+    }
+
+#line 1093 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1043 "regex.h2"
+#line 1097 "regex.h2"
     }
 
-#line 1047 "regex.h2"
+#line 1101 "regex.h2"
     template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
         regex_parser_state old_state {}; 
-        old_state.group_captures_have_numbers = cur_state.group_captures_have_numbers;
         CPP2_UFCS(swap)(old_state, cur_state);
 
         return old_state; 
     }
 
-#line 1055 "regex.h2"
+#line 1108 "regex.h2"
     template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
         cur_state = old_state;
     }
 
-#line 1062 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> bool{
-        if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
-            pos += 1;
+#line 1115 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_branch_reset_state{
+        regex_branch_reset_state old_state {}; 
+        std::swap(old_state, cur_branch_reset_state);
+
+        cur_branch_reset_state.is_active = true;
+        cur_branch_reset_state.cur_group = old_state.cur_group;
+        cur_branch_reset_state.from      = cur_branch_reset_state.cur_group;
+        cur_branch_reset_state.max_group = cur_branch_reset_state.cur_group;
+
+        return old_state; 
+    }
+
+#line 1127 "regex.h2"
+    template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
+        auto next_group {cur_branch_reset_state.max_group}; 
+        cur_branch_reset_state = old_state;
+        CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
+    }
+
+#line 1136 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
+        auto perl_syntax {false}; 
+        if (!(no_skip)) {
+            if (in_class) {
+                perl_syntax = cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes;
+            }
+            else {
+                perl_syntax = cur_state.modifiers.perl_code_syntax;
+            }
+        }
+        auto cur {pos + 1}; 
+        if (std::move(perl_syntax)) {
+            for( ; cpp2::cmp_less(cur,CPP2_UFCS(size)(regex)); (cur += 1) ) {
+                auto n {CPP2_ASSERT_IN_BOUNDS(regex, cur)}; 
+
+                if (space_class::includes(n)) {
+                    continue;
+                }
+                else {if (!(in_class) && '#' == n) {
+                    cur = CPP2_UFCS(find)(regex, "\n", cur);
+                    if (std::string::npos == cur) {
+                        // No new line, comment runs until the end of the pattern
+                        cur = CPP2_UFCS(size)(regex);
+                    }
+                }
+                else { // None space none comment char
+                    break;
+                }}
+            }
+        }
+
+        // Check for end of file.
+        if (cpp2::cmp_greater(cur,CPP2_UFCS(size)(regex))) {
+            cur = CPP2_UFCS(size)(regex);
+        }
+        return cur; 
+    }
+
+#line 1174 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
+        pos = get_next_position(in_class, no_skip);
+        if (pos != CPP2_UFCS(size)(regex)) {
             n.construct(CPP2_ASSERT_IN_BOUNDS(regex, pos));
             return true; 
         }
@@ -1949,7 +2141,14 @@ namespace regex {
         }
     }
 
-#line 1074 "regex.h2"
+#line 1186 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
+#line 1187 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
+#line 1188 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
+
+#line 1192 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -1957,7 +2156,17 @@ namespace regex {
         return r; 
     }
 
-#line 1081 "regex.h2"
+#line 1199 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
+        auto r {true}; 
+        auto cur {0}; 
+        for( ; r && cpp2::cmp_less(cur,n); (r = skip()) ) {
+            cur += 1;
+        }
+        return r; 
+    }
+
+#line 1208 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -1966,23 +2175,32 @@ namespace regex {
         }
     }
 
-#line 1089 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::peek() & -> char{
-        if (cpp2::cmp_less((pos + 1),CPP2_UFCS(size)(regex))) {
-            return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); 
+#line 1216 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
+        auto next_pos {get_next_position(in_class, false)}; 
+        if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
+            return CPP2_ASSERT_IN_BOUNDS(regex, std::move(next_pos)); 
         }
         else {
             return '\0'; 
         }
     }
 
-#line 1098 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_one_of(std::string(1, e), cpp2::out(&r));  }
+#line 1226 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
+#line 1227 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1100 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> bool{
+#line 1229 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
-        auto end {CPP2_UFCS(find_first_of)(regex, e, pos)}; 
+        auto end {pos}; 
+        if (any) {
+            end = CPP2_UFCS(find_first_of)(regex, e, pos);
+        }
+        else {
+            end = CPP2_UFCS(find)(regex, e, pos);
+        }
 
         if (end != std::string_view::npos) {
             r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
@@ -1995,7 +2213,14 @@ namespace regex {
         }
     }
 
-#line 1115 "regex.h2"
+#line 1250 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
+#line 1251 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+#line 1252 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
+
+#line 1254 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2016,13 +2241,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1137 "regex.h2"
+#line 1276 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1142 "regex.h2"
+#line 1281 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2030,10 +2255,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1149 "regex.h2"
+#line 1288 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1151 "regex.h2"
+#line 1290 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
 
@@ -2041,6 +2266,7 @@ namespace regex {
             CPP2_UFCS(add)(cur_state, create_matcher("empty_matcher_logic", ""));
         }
         CPP2_UFCS(next_alternative)(cur_state);
+        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
 
         std::string list {""}; 
         std::string separator {""}; 
@@ -2055,7 +2281,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1172 "regex.h2"
+#line 1312 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2066,7 +2292,7 @@ namespace regex {
         return r; 
     }
 
-#line 1182 "regex.h2"
+#line 1322 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
         std::string r {""}; 
 
@@ -2079,8 +2305,9 @@ namespace regex {
         return r; 
     }
 
-#line 1194 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, bool& group_captures_have_numbers) & -> bool{
+#line 1334 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+                      regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
 
@@ -2089,14 +2316,16 @@ namespace regex {
 
         auto apply {[&, _1 = (&is_negative), _2 = (&remove), _3 = (&add)](cpp2::in flag) mutable -> void{
             if (*cpp2::assert_not_null(_1)) {
-                *cpp2::assert_not_null(_2) += flag;
+                *cpp2::assert_not_null(_2) |= flag;
             }
             else {
-                *cpp2::assert_not_null(_3) += flag;
+                *cpp2::assert_not_null(_3) |= flag;
             }
         }}; 
 
-        for ( auto const& cur : change_str ) {
+        auto iter {CPP2_UFCS(begin)(change_str)}; 
+        for( ; iter != CPP2_UFCS(end)(change_str); (++iter) ) {
+            auto cur {*cpp2::assert_not_null(iter)}; 
             if (cur == '^') {
                 is_reset = true;
             }
@@ -2109,11 +2338,32 @@ namespace regex {
             else {if (cur == 's') {apply(expression_flags::single_line); }
             else {if (cur == 'n') {
                 apply(expression_flags::no_group_captures);
-                group_captures_have_numbers = is_negative;
+                parser_modifiers.group_captures_have_numbers = is_negative;
+            }
+            else {if (cur == 'x') {
+                if ((iter + 1) == CPP2_UFCS(end)(change_str) || *cpp2::assert_not_null((iter + 1)) != 'x') {
+                    // x modifier
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !(is_negative);
+
+                    // Just x unsets xx and remove x also removes xx
+                    remove |= expression_flags::perl_code_syntax_in_classes;
+                    parser_modifiers.perl_code_syntax_in_classes = false;
+                }
+                else { // xx modifier
+                    // xx also sets or unsets x
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !(is_negative);
+
+                    apply(expression_flags::perl_code_syntax_in_classes);
+                    parser_modifiers.perl_code_syntax_in_classes = !(is_negative);
+
+                    ++iter; // Skip the second x
+                }
             }
             else {
                 error(("Unknown modifier: " + cpp2::to_string(cur))); return false; 
-            }}}}}}
+            }}}}}}}
         }
 
         modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
@@ -2121,15 +2371,16 @@ namespace regex {
         return true; 
     }
 
-#line 1238 "regex.h2"
+#line 1402 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
         CPP2_UFCS(next_alternative)(cur_state);
+        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
         return true; 
     }
 
-#line 1245 "regex.h2"
+#line 1410 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2143,7 +2394,7 @@ namespace regex {
         return false; 
     }
 
-#line 1258 "regex.h2"
+#line 1423 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c == '.') {
             CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
@@ -2152,44 +2403,29 @@ namespace regex {
         return false; 
     }
 
-#line 1266 "regex.h2"
+#line 1431 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
         std::vector classes {}; 
 
-        char c_cur {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
-        auto next_item {[&, _1 = (&pos), _3 = regex, _4 = (&c_cur)]() mutable -> bool{
-            *cpp2::assert_not_null(_1) += 1;
-            if (cpp2::cmp_greater_eq(*cpp2::assert_not_null(_1),CPP2_UFCS(size)(_3))) {return false; }
-
-            *cpp2::assert_not_null(_4) = CPP2_ASSERT_IN_BOUNDS(_3, *cpp2::assert_not_null(_1));
-            return true; 
-
-        }}; 
-
-        auto peek_item {[&, _1 = pos, _2 = regex]() mutable -> char{
-            if (cpp2::cmp_greater_eq((_1 + 1),CPP2_UFCS(size)(_2))) {return '\0'; }
-            else {return CPP2_ASSERT_IN_BOUNDS(regex, pos + 1); }
-        }}; 
+        char c_cur {current()}; 
 
         // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
         auto negate {false}; 
         auto first {true}; 
         auto range {false}; 
-        while( next_item() & (c_cur != ']' || first) ) {
+        while( next_in_class(cpp2::out(&c_cur)) & (c_cur != ']' || first) ) {
             if (c_cur == '^') {
                 negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if (c_cur == '[' && peek_item() == ':') {
+            if (c_cur == '[' && peek_in_class() == ':') {
                 // We have a character class.
-                pos += 2; // Skip ':]'
+                static_cast(skip_n(2));
 
-                auto end {CPP2_UFCS(find)(regex, ":]", pos)}; 
-                if (end == std::string::npos) {error("Could not find end of character class."); return false; }
-
-                auto name {CPP2_UFCS(substr)(regex, pos, end - pos)}; 
+                std::string name {""}; 
+                if (!(grab_until(":]", cpp2::out(&name)))) {error("Could not find end of character class."); return false; }
                 if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
                     error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))));
                     return false; 
@@ -2197,27 +2433,31 @@ namespace regex {
 
                 CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
 
-                end += 1; // Skip ':' pointing to the ending ']'.
-                pos = end;
+                static_cast(skip());// Skip ':' pointing to the ending ']'.
             }
             else {if (c_cur == '\\') {
-                if (next_item()  && (c_cur != ']')) {
-                    auto name {""}; 
-                         if ('d' == c_cur) {name = "short_digits"; }
-                    else {if ('D' == c_cur) {name = "short_not_digits"; }
-                    else {if ('h' == c_cur) {name = "short_hor_space"; }
-                    else {if ('H' == c_cur) {name = "short_not_hor_space"; }
-                    else {if ('s' == c_cur) {name = "short_space"; }
-                    else {if ('S' == c_cur) {name = "short_not_space"; }
-                    else {if ('v' == c_cur) {name = "short_ver_space"; }
-                    else {if ('V' == c_cur) {name = "short_not_ver_space"; }
-                    else {if ('w' == c_cur) {name = "short_word"; }
-                    else {if ('W' == c_cur) {name = "short_not_word"; }
+                if (next_no_skip(cpp2::out(&c_cur)) && (c_cur != ']')) {
+                    if ( ' ' == c_cur && cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes) {
+                        CPP2_UFCS(push_back)(classes, std::string(1, c_cur));// TODO: UFCS error with char as argument.
+                    }
                     else {
-                        error("Unknown group escape.");
-                        return false; 
-                    }}}}}}}}}}
-                    CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
+                        auto name {""}; 
+                            if ('d' == c_cur) {name = "short_digits"; }
+                        else {if ('D' == c_cur) {name = "short_not_digits"; }
+                        else {if ('h' == c_cur) {name = "short_hor_space"; }
+                        else {if ('H' == c_cur) {name = "short_not_hor_space"; }
+                        else {if ('s' == c_cur) {name = "short_space"; }
+                        else {if ('S' == c_cur) {name = "short_not_space"; }
+                        else {if ('v' == c_cur) {name = "short_ver_space"; }
+                        else {if ('V' == c_cur) {name = "short_not_ver_space"; }
+                        else {if ('w' == c_cur) {name = "short_word"; }
+                        else {if ('W' == c_cur) {name = "short_not_word"; }
+                        else {
+                            error("Unknown group escape.");
+                            return false; 
+                        }}}}}}}}}}
+                        CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
+                    }
                 }else {
                     error("Escape without a following character.");
                     return false; 
@@ -2243,8 +2483,6 @@ namespace regex {
             first = false;
         }
 
-        static_cast(std::move(next_item));// TODO: Use in while is not recognized.
-
         if (std::move(c_cur) != ']') {
             error("Error end of character class definition before terminating ']'.");
             return false; 
@@ -2273,19 +2511,21 @@ namespace regex {
         return true; 
     }
 
-#line 1386 "regex.h2"
+#line 1538 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
         auto start {pos}; // Keep start for group matchers.
-        pos += 1;
+        auto c_next {'\0'}; 
+        if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
 
         auto add_group_matcher {[&, _1 = std::move(start), _2 = (&pos)](cpp2::in name) mutable -> bool{
 
+            auto name_trim {trim_copy(name)}; 
             int group_id {0}; 
-            if (string_to_int(name, group_id)) {
+            if (string_to_int(name_trim, group_id)) {
                 if (cpp2::cmp_less(group_id,0)) {
-                    group_id = next_group_id + group_id;
+                    group_id = cur_branch_reset_state.cur_group + group_id;
 
                     if (cpp2::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
                         error(("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)"));
@@ -2293,11 +2533,11 @@ namespace regex {
                     }
                 }
 
-                if (cpp2::cmp_greater_eq(group_id,next_group_id)) {error("Group reference is used before the group is declared."); return false; }
+                if (cpp2::cmp_greater_eq(group_id,cur_branch_reset_state.cur_group)) {error("Group reference is used before the group is declared."); return false; }
             }
             else {
                 // Named group
-                auto iter {CPP2_UFCS(find)(named_groups, name)}; 
+                auto iter {CPP2_UFCS(find)(named_groups, std::move(name_trim))}; 
                 if (iter == CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
 
                 group_id = (*cpp2::assert_not_null(std::move(iter))).second;
@@ -2307,10 +2547,6 @@ namespace regex {
             return true; 
         }}; 
 
-        if (cpp2::cmp_greater_eq(pos,CPP2_UFCS(size)(regex))) {error("Escape without a following character."); return false; }
-
-        char c_next {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
-
         if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
             auto group {grab_number()}; 
             if (!(add_group_matcher(std::move(group)))) {return false; }
@@ -2385,36 +2621,72 @@ namespace regex {
         return true; 
     }
 
-#line 1497 "regex.h2"
+#line 1647 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
-        auto has_id {cur_state.group_captures_have_numbers}; 
+        auto has_id {cur_state.modifiers.group_captures_have_numbers}; 
         auto has_pattern {true}; 
         std::string group_name {""}; 
+        auto group_name_brackets {true}; 
         std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
-        auto group_capture_change_to {cur_state.group_captures_have_numbers}; 
+
+        auto modifiers_change_to {cur_state.modifiers}; 
 
         char c_next {'\0'}; 
         // Skip the '('
         if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
         if (c_next == '?') {
             // Special group
-            if (!(next(cpp2::out(&c_next)))) {error("Missing character after group opening."); return false; }
+            if (!(next_no_skip(cpp2::out(&c_next)))) {error("Missing character after group opening."); return false; }
 
-            if (c_next == '<') {
+            if (c_next == '<' || c_next == '\'') {
                 // named group
+                auto end_char {c_next}; 
+                if (end_char == '<') {
+                    end_char = '>';
+                }else {
+                    group_name_brackets = false;
+                }
                 has_id = true; // Force id for named groups.
                 if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
-                if (!(grab_until('>', cpp2::out(&group_name)))) {error("Missing ending bracket for named group."); return false; }
+                if (!(grab_until(std::move(end_char), cpp2::out(&group_name)))) {error("Missing ending bracket for named group."); return false; }
                 if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
             }
+            else {if (c_next == '#') {
+                // Comment
+                std::string comment_str {""}; 
+                if (!(grab_until(")", cpp2::out(&comment_str)))) {error("Group without closing bracket."); return false; }
+                // Do not add comment. Has problems with ranges.
+
+                return true; 
+            }
+            else {if (c_next == '|') {
+                // Branch reset group
+
+                if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '|' */
+
+                auto old_parser_state {new_state()}; 
+                auto old_branch_state {group_new_state()}; 
+                parse_until(')');
+                auto inner {create_matcher_from_state()}; 
+                group_restore_state(std::move(old_branch_state));
+                restore_state(std::move(old_parser_state));
+
+                auto start_matcher {create_matcher("branch_reset_matcher_logic", "")}; 
+                auto end_matcher {create_matcher("special_group_end_logic", "")}; 
+
+                std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
+                CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v)));
+
+                return true; 
+            }
             else {
                 // Simple modifier
                 has_id = false;
                 std::string change_str {""}; 
                 if (!(grab_until_one_of("):", cpp2::out(&change_str)))) {error("Missing ending bracket for group."); return false; }
-                if (!(parse_modifiers(std::move(change_str), cpp2::out(&modifier_change), group_capture_change_to))) {
+                if (!(parse_modifiers(std::move(change_str), cpp2::out(&modifier_change), modifiers_change_to))) {
                      return false; 
                 }
 
@@ -2424,7 +2696,7 @@ namespace regex {
                 else {
                     if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for group."); return false; }/* skip ':' */
                 }
-            }
+            }}}
         }
 
         if (std::move(has_pattern)) {
@@ -2432,17 +2704,16 @@ namespace regex {
 
             auto group_number {-1}; 
             if (std::move(has_id)) {
-                group_number = next_group_id;
-                next_group_id += 1;
+                group_number = CPP2_UFCS(next)(cur_branch_reset_state);
             }
 
             auto old_state {new_state()}; 
-            cur_state.group_captures_have_numbers = std::move(group_capture_change_to);
+            cur_state.modifiers = std::move(modifiers_change_to);
             parse_until(')');
             auto inner {create_matcher_from_state()}; 
             restore_state(std::move(old_state));
 
-            auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", " + cpp2::to_string(std::move(modifier_change)) + ", \"" + cpp2::to_string(group_name) + "\""))}; 
+            auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", " + cpp2::to_string(std::move(modifier_change)) + ", \"" + cpp2::to_string(group_name) + "\", " + cpp2::to_string(std::move(group_name_brackets))))}; 
             if (0 != CPP2_UFCS(size)(group_name)) {
                 if (!(CPP2_UFCS(contains)(named_groups, group_name))) {// Redefinition of group name is not an error. The left most one is retained.
                     CPP2_ASSERT_IN_BOUNDS(named_groups, group_name) = group_number;
@@ -2455,14 +2726,14 @@ namespace regex {
         }
         else {
             // Only a modifier
-            cur_state.group_captures_have_numbers = std::move(group_capture_change_to);
+            cur_state.modifiers = std::move(modifiers_change_to);
             CPP2_UFCS(add)(cur_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_change)))));
         }
 
         return true; 
     }
 
-#line 1573 "regex.h2"
+#line 1758 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c == '\'') {
             CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
@@ -2472,7 +2743,7 @@ namespace regex {
         return false; 
     }
 
-#line 1582 "regex.h2"
+#line 1767 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         auto to_int {[&](auto const& str) mutable -> int{
@@ -2499,11 +2770,11 @@ namespace regex {
         auto possessive {false}; 
         if (peek() == '?') {
             greedy = false;
-            pos += 1;
+            static_cast(skip());
         }
         else {if (peek() == '+') {
             possessive = true;
-            pos += 1;
+            static_cast(skip());
         }}
 
         std::string min_count {"-1"}; 
@@ -2547,7 +2818,7 @@ namespace regex {
         return true; 
     }
 
-#line 1656 "regex.h2"
+#line 1841 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2569,11 +2840,11 @@ namespace regex {
         auto possessive {false}; 
         if (peek() == '?') {
             greedy = false;
-            pos += 1;
+            static_cast(skip());
         }
         else {if (peek() == '+') {
             possessive = true;
-            pos += 1;
+            static_cast(skip());
         }}
 
         if (CPP2_UFCS(empty)(cur_state)) {
@@ -2585,11 +2856,10 @@ namespace regex {
         return true; 
     }
 
-#line 1693 "regex.h2"
+#line 1878 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
-        for( ; pos != CPP2_UFCS(size)(regex); pos += 1 ) {
-            char c {CPP2_ASSERT_IN_BOUNDS(regex, pos)}; 
-
+        char c {current()}; 
+        for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
             if (c == term) {return ; }
 
             if (!(has_error) && is_alternative(c)) {continue; }
@@ -2609,7 +2879,7 @@ namespace regex {
         }
     }
 
-#line 1716 "regex.h2"
+#line 1900 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2619,7 +2889,7 @@ namespace regex {
         }}; 
 
         auto mod_pos {0}; 
-        for( ; mod_pos != CPP2_UFCS(size)(modifier); mod_pos += 1 ) {
+        for( ; cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)); mod_pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
 
             if (     c == 'i') { add("::cpp2::regex::expression_flags::case_insensitive", r); }
@@ -2627,15 +2897,26 @@ namespace regex {
             else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
             else {if (c == 'n') {
                 add("::cpp2::regex::expression_flags::no_group_captures", r);
-                cur_state.group_captures_have_numbers = false;
+                cur_state.modifiers.group_captures_have_numbers = false;
+            }
+            else {if (c == 'x') {
+                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
+                cur_state.modifiers.perl_code_syntax = true;
+
+                // Check if we have 'xx'
+                mod_pos += 1;
+                if (cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)) && 'x' == CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)) {
+                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
+                    cur_state.modifiers.perl_code_syntax_in_classes = true;
+                }
             }
-            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}}
+            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}}}
         }
 
         return r; 
     }
 
-#line 1741 "regex.h2"
+#line 1936 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parse_modifier()}; 
         parse_until('\0');
@@ -2644,13 +2925,13 @@ namespace regex {
 
         auto named_groups_arg {create_named_groups_arg()}; 
         auto inner {create_matcher_from_state()}; 
-        auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\"")}; 
+        auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
-        return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(next_group_id) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
+        return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(cur_branch_reset_state.cur_group) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1757 "regex.h2"
+#line 1952 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2
index 8b0c594183..fd90077f5e 100644
--- a/regression-tests/pure2-regex.cpp2
+++ b/regression-tests/pure2-regex.cpp2
@@ -21,6 +21,13 @@ create_result: (resultExpr: std::string, r) -> std::string = {
 
     return std::stoi(std::string(start, iter));
   };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
 
   iter := resultExpr.begin();
 
@@ -41,15 +48,27 @@ create_result: (resultExpr: std::string, r) -> std::string = {
         else if next* == '-' || next* == '+' {
           is_start := next* == '-';
           next++;
-          next++; // Skip [
-          group := extract_group_and_advance(next);
-          next++; // Skip ]
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
 
-          if is_start {
-            result += std::to_string(r.group_start(group));
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
           }
           else {
-            result += std::to_string(r.group_end(group));
+            // Return max group
+            result += r.group(r.group_number() - 1);
           }
         }
         else if std::isdigit(next*) {
@@ -102,7 +121,7 @@ test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: st
 
   r := regex.search(str);
 
-  if "y" == kind {
+  if "y" == kind || "yM" == kind || "yS" == kind {
     if !r.matched {
       status = "Failure: Regex should apply.";
     }
@@ -1551,10 +1570,192 @@ test_general_tests: @regex type = {
   var_regex_585 : std::string = "(?i:.[b].)";
   regex_586 := "(?i:\N[b]\N)";
   var_regex_586 : std::string = "(?i:\\N[b]\\N)";
-  regex_587 := "foo\Kbar";
-  var_regex_587 : std::string = "foo\Kbar";
-  regex_588 := "foo\t\n\r\f\a\ebar";
-  var_regex_588 : std::string = "foo\t\n\r\f\a\ebar";
+  regex_587 := "\N {1}";
+  regex_587_mod := "x";
+  var_regex_587 : std::string = "\\N {1}";
+  regex_588 := "\N {1}";
+  regex_588_mod := "x";
+  var_regex_588 : std::string = "\\N {1}";
+  regex_589 := "\N {1}";
+  regex_589_mod := "x";
+  var_regex_589 : std::string = "\\N {1}";
+  regex_590 := "\N {3,4}";
+  regex_590_mod := "x";
+  var_regex_590 : std::string = "\\N {3,4}";
+  regex_591 := "\N {3,4}";
+  regex_591_mod := "x";
+  var_regex_591 : std::string = "\\N {3,4}";
+  regex_592 := "\N {3,4}";
+  regex_592_mod := "x";
+  var_regex_592 : std::string = "\\N {3,4}";
+  regex_593 := "a\N c";
+  regex_593_mod := "x";
+  var_regex_593 : std::string = "a\\N c";
+  regex_594 := "a\N *c";
+  regex_594_mod := "x";
+  var_regex_594 : std::string = "a\\N *c";
+  regex_595 := "a\N *c";
+  regex_595_mod := "x";
+  var_regex_595 : std::string = "a\\N *c";
+  regex_596 := "[a b]";
+  regex_596_mod := "x";
+  var_regex_596 : std::string = "[a b]";
+  regex_597 := "[a b]";
+  regex_597_mod := "xx";
+  var_regex_597 : std::string = "[a b]";
+  regex_598 := "[a\ b]";
+  regex_598_mod := "xx";
+  var_regex_598 : std::string = "[a\ b]";
+  regex_599 := "[ ^ a b ]";
+  regex_599_mod := "xx";
+  var_regex_599 : std::string = "[ ^ a b ]";
+  regex_600 := "[ ^ a b ]";
+  regex_600_mod := "xx";
+  var_regex_600 : std::string = "[ ^ a b ]";
+  regex_601 := "[ ^ a b ]";
+  regex_601_mod := "xx";
+  var_regex_601 : std::string = "[ ^ a b ]";
+  regex_602 := "(?x:[a b])";
+  regex_602_mod := "xx";
+  var_regex_602 : std::string = "(?x:[a b])";
+  regex_603 := "(?xx:[a b])";
+  regex_603_mod := "x";
+  var_regex_603 : std::string = "(?xx:[a b])";
+  regex_604 := "(?x)[a b]";
+  regex_604_mod := "xx";
+  var_regex_604 : std::string = "(?x)[a b]";
+  regex_605 := "(?xx)[a b]";
+  regex_605_mod := "x";
+  var_regex_605 : std::string = "(?xx)[a b]";
+  regex_606 := "(?-x:[a b])";
+  regex_606_mod := "xx";
+  var_regex_606 : std::string = "(?-x:[a b])";
+  regex_607 := "\N {1}";
+  regex_607_mod := "x";
+  var_regex_607 : std::string = "\\N {1}";
+  regex_608 := "\N {1}";
+  regex_608_mod := "x";
+  var_regex_608 : std::string = "\\N {1}";
+  regex_609 := "\N {1}";
+  regex_609_mod := "x";
+  var_regex_609 : std::string = "\\N {1}";
+  regex_610 := "\N {3,4}";
+  regex_610_mod := "x";
+  var_regex_610 : std::string = "\\N {3,4}";
+  regex_611 := "\N {3,4}";
+  regex_611_mod := "x";
+  var_regex_611 : std::string = "\\N {3,4}";
+  regex_612 := "\N {3,4}";
+  regex_612_mod := "x";
+  var_regex_612 : std::string = "\\N {3,4}";
+  regex_613 := "a\N c";
+  regex_613_mod := "x";
+  var_regex_613 : std::string = "a\\N c";
+  regex_614 := "a\N *c";
+  regex_614_mod := "x";
+  var_regex_614 : std::string = "a\\N *c";
+  regex_615 := "a\N *c";
+  regex_615_mod := "x";
+  var_regex_615 : std::string = "a\\N *c";
+  regex_616 := "[#]";
+  var_regex_616 : std::string = "[#]";
+  regex_617 := "[#]b";
+  var_regex_617 : std::string = "[#]b";
+  regex_618 := "[#]";
+  regex_618_mod := "x";
+  var_regex_618 : std::string = "[#]";
+  regex_619 := "[#]b";
+  regex_619_mod := "x";
+  var_regex_619 : std::string = "[#]b";
+  regex_620 := "(?'n'foo) \g{n}";
+  var_regex_620 : std::string = "(?'n'foo) \g{n}";
+  regex_621 := "(?'n'foo) \g{ n }";
+  var_regex_621 : std::string = "(?'n'foo) \g{ n }";
+  regex_622 := "(?'n'foo) \g{n}";
+  var_regex_622 : std::string = "(?'n'foo) \g{n}";
+  regex_623 := "(?foo) \g{n}";
+  var_regex_623 : std::string = "(?foo) \g{n}";
+  regex_624 := "(?foo) \g{n}";
+  var_regex_624 : std::string = "(?foo) \g{n}";
+  regex_625 := "(?as) (\w+) \g{as} (\w+)";
+  var_regex_625 : std::string = "(?as) (\w+) \g{as} (\w+)";
+  regex_626 := "(?'n'foo) \k";
+  var_regex_626 : std::string = "(?'n'foo) \k";
+  regex_627 := "(?'n'foo) \k";
+  var_regex_627 : std::string = "(?'n'foo) \k";
+  regex_628 := "(?foo) \k'n'";
+  var_regex_628 : std::string = "(?foo) \k'n'";
+  regex_629 := "(?foo) \k'n'";
+  var_regex_629 : std::string = "(?foo) \k'n'";
+  regex_630 := "(?'a1'foo) \k'a1'";
+  var_regex_630 : std::string = "(?'a1'foo) \k'a1'";
+  regex_631 := "(?foo) \k";
+  var_regex_631 : std::string = "(?foo) \k";
+  regex_632 := "(?'_'foo) \k'_'";
+  var_regex_632 : std::string = "(?'_'foo) \k'_'";
+  regex_633 := "(?<_>foo) \k<_>";
+  var_regex_633 : std::string = "(?<_>foo) \k<_>";
+  regex_634 := "(?'_0_'foo) \k'_0_'";
+  var_regex_634 : std::string = "(?'_0_'foo) \k'_0_'";
+  regex_635 := "(?<_0_>foo) \k<_0_>";
+  var_regex_635 : std::string = "(?<_0_>foo) \k<_0_>";
+  regex_636 := "(?as) (\w+) \k (\w+)";
+  var_regex_636 : std::string = "(?as) (\w+) \k (\w+)";
+  regex_637 := "(?as) (\w+) \k{as} (\w+)";
+  var_regex_637 : std::string = "(?as) (\w+) \k{as} (\w+)";
+  regex_638 := "(?as) (\w+) \k'as' (\w+)";
+  var_regex_638 : std::string = "(?as) (\w+) \k'as' (\w+)";
+  regex_639 := "(?as) (\w+) \k{ as } (\w+)";
+  var_regex_639 : std::string = "(?as) (\w+) \k{ as } (\w+)";
+  regex_640 := "^a(?#xxx){3}c";
+  var_regex_640 : std::string = "^a(?#xxx){3}c";
+  regex_641 := "^a (?#xxx) (?#yyy) {3}c";
+  regex_641_mod := "x";
+  var_regex_641 : std::string = "^a (?#xxx) (?#yyy) {3}c";
+  regex_642 := "(?|(a))";
+  var_regex_642 : std::string = "(?|(a))";
+  regex_643 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  var_regex_643 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  regex_644 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  var_regex_644 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  regex_645 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  var_regex_645 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  regex_646 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_646 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_647 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_647 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_648 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_648 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_649 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_649 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_650 := "(.)(?|(.)(.)x|(.)d)(.)";
+  var_regex_650 : std::string = "(.)(?|(.)(.)x|(.)d)(.)";
+  regex_651 := "(\N)(?|(\N)(\N)x|(\N)d)(\N)";
+  var_regex_651 : std::string = "(\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N)";
+  regex_652 := "(?|(?x))";
+  var_regex_652 : std::string = "(?|(?x))";
+  regex_653 := "(?|(?x)|(?y))";
+  var_regex_653 : std::string = "(?|(?x)|(?y))";
+  regex_654 := "(?|(?y)|(?x))";
+  var_regex_654 : std::string = "(?|(?y)|(?x))";
+  regex_655 := "(?)(?|(?x))";
+  var_regex_655 : std::string = "(?)(?|(?x))";
+  regex_656 := "foo\Kbar";
+  var_regex_656 : std::string = "foo\Kbar";
+  regex_657 := "foo\t\n\r\f\a\ebar";
+  var_regex_657 : std::string = "foo\t\n\r\f\a\ebar";
+  regex_658 := "(foo)";
+  regex_658_mod := "n";
+  var_regex_658 : std::string = "(foo)";
+  regex_659 := "(?-n)(foo)(?n)(bar)";
+  regex_659_mod := "n";
+  var_regex_659 : std::string = "(?-n)(foo)(?n)(bar)";
+  regex_660 := "(?-n:(foo)(?n:(bar)))";
+  regex_660_mod := "n";
+  var_regex_660 : std::string = "(?-n:(foo)(?n:(bar)))";
+  regex_661 := "foo # Match foo";
+  regex_661_mod := "x";
+  var_regex_661 : std::string = "foo # Match foo";
   run: (this) = {
     std::cout << "Running general_tests:"<< std::endl;
     test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
@@ -2144,8 +2345,81 @@ test_general_tests: @regex type = {
     test(regex_584, 584, "\\Aa\\$", "a\n\n", "y", "$&", "a");
     test(regex_585, 585, "(?i:.[b].)", "abd", "y", "$&", "abd");
     test(regex_586, 586, "(?i:\\\\N[b]\\\\N)", "abd", "y", "$&", "abd");
-    test(regex_587, 587, "foo\\Kbar", "foobar", "y", "$&", "bar");
-    test(regex_588, 588, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
+    test(regex_587, 587, "\\\\N {1}", "abbbbc", "y", "$&", "a");
+    test(regex_588, 588, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_589, 589, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_590, 590, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_591, 591, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_592, 592, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_593, 593, "a\\\\N c", "abc", "y", "$&", "abc");
+    test(regex_594, 594, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
+    test(regex_595, 595, "a\\\\N *c", "axyzd", "n", "-", "-");
+    test(regex_596, 596, "[a b]", " ", "yS", "$&", " ");
+    test(regex_597, 597, "[a b]", " ", "n", "-", "-");
+    test(regex_598, 598, "[a\\ b]", " ", "y", "$&", " ");
+    test(regex_599, 599, "[ ^ a b ]", "a", "n", "-", "-");
+    test(regex_600, 600, "[ ^ a b ]", "b", "n", "-", "-");
+    test(regex_601, 601, "[ ^ a b ]", "A", "y", "$&", "A");
+    test(regex_602, 602, "(?x:[a b])", " ", "yS", "$&", " ");
+    test(regex_603, 603, "(?xx:[a b])", " ", "n", "-", "-");
+    test(regex_604, 604, "(?x)[a b]", " ", "yS", "$&", " ");
+    test(regex_605, 605, "(?xx)[a b]", " ", "n", "-", "-");
+    test(regex_606, 606, "(?-x:[a b])", " ", "yS", "$&", " ");
+    test(regex_607, 607, "\\\\N {1}", "abbbbc", "y", "$&", "a");
+    test(regex_608, 608, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_609, 609, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_610, 610, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_611, 611, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_612, 612, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_613, 613, "a\\\\N c", "abc", "y", "$&", "abc");
+    test(regex_614, 614, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
+    test(regex_615, 615, "a\\\\N *c", "axyzd", "n", "-", "-");
+    test(regex_616, 616, "[#]", "a#b", "y", "$&", "#");
+    test(regex_617, 617, "[#]b", "a#b", "y", "$&", "#b");
+    test(regex_618, 618, "[#]", "a#b", "y", "$&", "#");
+    test(regex_619, 619, "[#]b", "a#b", "y", "$&", "#b");
+    test(regex_620, 620, "(?'n'foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
+    test(regex_621, 621, "(?'n'foo) \\g{ n }", "..foo foo..", "y", "$1", "foo");
+    test(regex_622, 622, "(?'n'foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_623, 623, "(?foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
+    test(regex_624, 624, "(?foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_625, 625, "(?as) (\\w+) \\g{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_626, 626, "(?'n'foo) \\k", "..foo foo..", "y", "$1", "foo");
+    test(regex_627, 627, "(?'n'foo) \\k", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_628, 628, "(?foo) \\k'n'", "..foo foo..", "y", "$1", "foo");
+    test(regex_629, 629, "(?foo) \\k'n'", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_630, 630, "(?'a1'foo) \\k'a1'", "..foo foo..", "yM", "$+{a1}", "foo");
+    test(regex_631, 631, "(?foo) \\k", "..foo foo..", "yM", "$+{a1}", "foo");
+    test(regex_632, 632, "(?'_'foo) \\k'_'", "..foo foo..", "yM", "$+{_}", "foo");
+    test(regex_633, 633, "(?<_>foo) \\k<_>", "..foo foo..", "yM", "$+{_}", "foo");
+    test(regex_634, 634, "(?'_0_'foo) \\k'_0_'", "..foo foo..", "yM", "$+{_0_}", "foo");
+    test(regex_635, 635, "(?<_0_>foo) \\k<_0_>", "..foo foo..", "yM", "$+{_0_}", "foo");
+    test(regex_636, 636, "(?as) (\\w+) \\k (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_637, 637, "(?as) (\\w+) \\k{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_638, 638, "(?as) (\\w+) \\k'as' (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_639, 639, "(?as) (\\w+) \\k{ as } (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_640, 640, "^a(?#xxx){3}c", "aaac", "y", "$&", "aaac");
+    test(regex_641, 641, "^a (?#xxx) (?#yyy) {3}c", "aaac", "y", "$&", "aaac");
+    test(regex_642, 642, "(?|(a))", "a", "y", "$1-$+", "a-a");
+    test(regex_643, 643, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "d!o!da", "y", "$1-$2-$3", "!o!-o-a");
+    test(regex_644, 644, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "aabc", "y", "$1-$2-$3", "a--c");
+    test(regex_645, 645, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "ixyjp", "y", "$1-$2-$3", "x-y-p");
+    test(regex_646, 646, "(?|(?|(a)|(b))|(?|(c)|(d)))", "a", "y", "$1", "a");
+    test(regex_647, 647, "(?|(?|(a)|(b))|(?|(c)|(d)))", "b", "y", "$1", "b");
+    test(regex_648, 648, "(?|(?|(a)|(b))|(?|(c)|(d)))", "c", "y", "$1", "c");
+    test(regex_649, 649, "(?|(?|(a)|(b))|(?|(c)|(d)))", "d", "y", "$1", "d");
+    test(regex_650, 650, "(.)(?|(.)(.)x|(.)d)(.)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
+    test(regex_651, 651, "(\\\\N)(?|(\\\\N)(\\\\N)x|(\\\\N)d)(\\\\N)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
+    test(regex_652, 652, "(?|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_653, 653, "(?|(?x)|(?y))", "x", "yM", "$+{foo}", "x");
+    test(regex_654, 654, "(?|(?y)|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_655, 655, "(?)(?|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_656, 656, "foo\\Kbar", "foobar", "y", "$&", "bar");
+    test(regex_657, 657, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
+    test(regex_658, 658, "(foo)", "foobar", "y", "$&-$1", "foo-");
+    test(regex_659, 659, "(?-n)(foo)(?n)(bar)", "foobar", "y", "$&-$1-$2", "foobar-foo-");
+    test(regex_660, 660, "(?-n:(foo)(?n:(bar)))", "foobar", "y", "$&-$1-$2", "foobar-foo-");
+    test(regex_661, 661, "foo # Match foo", "foobar", "y", "$&", "foo");
     std::cout << std::endl;
   }
 }
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
index 307d79204a..e60a445a55 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
@@ -965,8 +965,81 @@ ca result_expr: - expected_results -
  result_expr: $& expected_results a
 585_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
 586_y: OK regex: (?i:\\N[b]\\N) parsed_regex: (?i:\\N[b]\\N) str: abd result_expr: $& expected_results abd
-587_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
-588_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+587_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $& expected_results a
+588_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $-[0] expected_results 0
+589_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $+[0] expected_results 1
+590_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $& expected_results abbb
+591_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+592_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+593_y: OK Warning: Parsed regex does not match. regex: a\\N c parsed_regex: a\\Nc str: abc result_expr: $& expected_results abc
+594_y: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzc result_expr: $& expected_results axyzc
+595_n: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzd result_expr: - expected_results -
+596_yS: OK regex: [a b] parsed_regex: [a b] str:   result_expr: $& expected_results  
+597_n: OK Warning: Parsed regex does not match. regex: [a b] parsed_regex: [ab] str:   result_expr: - expected_results -
+598_y: OK Warning: Parsed regex does not match. regex: [a\ b] parsed_regex: [a b] str:   result_expr: $& expected_results  
+599_n: OK Warning: Parsed regex does not match. regex: [ ^ a b ] parsed_regex: [^ab] str: a result_expr: - expected_results -
+600_n: OK Warning: Parsed regex does not match. regex: [ ^ a b ] parsed_regex: [^ab] str: b result_expr: - expected_results -
+601_y: OK Warning: Parsed regex does not match. regex: [ ^ a b ] parsed_regex: [^ab] str: A result_expr: $& expected_results A
+602_yS: OK regex: (?x:[a b]) parsed_regex: (?x:[a b]) str:   result_expr: $& expected_results  
+603_n: OK Warning: Parsed regex does not match. regex: (?xx:[a b]) parsed_regex: (?xx:[ab]) str:   result_expr: - expected_results -
+604_yS: OK regex: (?x)[a b] parsed_regex: (?x)[a b] str:   result_expr: $& expected_results  
+605_n: OK Warning: Parsed regex does not match. regex: (?xx)[a b] parsed_regex: (?xx)[ab] str:   result_expr: - expected_results -
+606_yS: OK regex: (?-x:[a b]) parsed_regex: (?-x:[a b]) str:   result_expr: $& expected_results  
+607_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $& expected_results a
+608_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $-[0] expected_results 0
+609_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $+[0] expected_results 1
+610_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $& expected_results abbb
+611_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+612_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+613_y: OK Warning: Parsed regex does not match. regex: a\\N c parsed_regex: a\\Nc str: abc result_expr: $& expected_results abc
+614_y: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzc result_expr: $& expected_results axyzc
+615_n: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzd result_expr: - expected_results -
+616_y: OK regex: [#] parsed_regex: [#] str: a#b result_expr: $& expected_results #
+617_y: OK regex: [#]b parsed_regex: [#]b str: a#b result_expr: $& expected_results #b
+618_y: OK regex: [#] parsed_regex: [#] str: a#b result_expr: $& expected_results #
+619_y: OK regex: [#]b parsed_regex: [#]b str: a#b result_expr: $& expected_results #b
+620_y: OK regex: (?'n'foo) \g{n} parsed_regex: (?'n'foo) \g{n} str: ..foo foo.. result_expr: $1 expected_results foo
+621_y: OK regex: (?'n'foo) \g{ n } parsed_regex: (?'n'foo) \g{ n } str: ..foo foo.. result_expr: $1 expected_results foo
+622_yM: OK regex: (?'n'foo) \g{n} parsed_regex: (?'n'foo) \g{n} str: ..foo foo.. result_expr: $+{n} expected_results foo
+623_y: OK regex: (?foo) \g{n} parsed_regex: (?foo) \g{n} str: ..foo foo.. result_expr: $1 expected_results foo
+624_yM: OK regex: (?foo) \g{n} parsed_regex: (?foo) \g{n} str: ..foo foo.. result_expr: $+{n} expected_results foo
+625_y: OK regex: (?as) (\w+) \g{as} (\w+) parsed_regex: (?as) (\w+) \g{as} (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+626_y: OK regex: (?'n'foo) \k parsed_regex: (?'n'foo) \k str: ..foo foo.. result_expr: $1 expected_results foo
+627_yM: OK regex: (?'n'foo) \k parsed_regex: (?'n'foo) \k str: ..foo foo.. result_expr: $+{n} expected_results foo
+628_y: OK regex: (?foo) \k'n' parsed_regex: (?foo) \k'n' str: ..foo foo.. result_expr: $1 expected_results foo
+629_yM: OK regex: (?foo) \k'n' parsed_regex: (?foo) \k'n' str: ..foo foo.. result_expr: $+{n} expected_results foo
+630_yM: OK regex: (?'a1'foo) \k'a1' parsed_regex: (?'a1'foo) \k'a1' str: ..foo foo.. result_expr: $+{a1} expected_results foo
+631_yM: OK regex: (?foo) \k parsed_regex: (?foo) \k str: ..foo foo.. result_expr: $+{a1} expected_results foo
+632_yM: OK regex: (?'_'foo) \k'_' parsed_regex: (?'_'foo) \k'_' str: ..foo foo.. result_expr: $+{_} expected_results foo
+633_yM: OK regex: (?<_>foo) \k<_> parsed_regex: (?<_>foo) \k<_> str: ..foo foo.. result_expr: $+{_} expected_results foo
+634_yM: OK regex: (?'_0_'foo) \k'_0_' parsed_regex: (?'_0_'foo) \k'_0_' str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+635_yM: OK regex: (?<_0_>foo) \k<_0_> parsed_regex: (?<_0_>foo) \k<_0_> str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+636_y: OK regex: (?as) (\w+) \k (\w+) parsed_regex: (?as) (\w+) \k (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+637_y: OK regex: (?as) (\w+) \k{as} (\w+) parsed_regex: (?as) (\w+) \k{as} (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+638_y: OK regex: (?as) (\w+) \k'as' (\w+) parsed_regex: (?as) (\w+) \k'as' (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+639_y: OK regex: (?as) (\w+) \k{ as } (\w+) parsed_regex: (?as) (\w+) \k{ as } (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+640_y: OK Warning: Parsed regex does not match. regex: ^a(?#xxx){3}c parsed_regex: ^a{3}c str: aaac result_expr: $& expected_results aaac
+641_y: OK Warning: Parsed regex does not match. regex: ^a (?#xxx) (?#yyy) {3}c parsed_regex: ^a{3}c str: aaac result_expr: $& expected_results aaac
+642_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+643_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+644_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+645_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+646_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+647_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+648_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+649_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+650_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+651_y: OK regex: (\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N) parsed_regex: (\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+652_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+653_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+654_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+655_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+656_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+657_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
 
bar result_expr: $& expected_results foo	
 
bar
+658_y: OK regex: (foo) parsed_regex: (foo) str: foobar result_expr: $&-$1 expected_results foo-
+659_y: OK regex: (?-n)(foo)(?n)(bar) parsed_regex: (?-n)(foo)(?n)(bar) str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+660_y: OK regex: (?-n:(foo)(?n:(bar))) parsed_regex: (?-n:(foo)(?n:(bar))) str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+661_y: OK Warning: Parsed regex does not match. regex: foo # Match foo parsed_regex: foo str: foobar result_expr: $& expected_results foo
 
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
index ec2946eb96..8c2117b8f8 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
@@ -1,284 +1,315 @@
-pure2-regex.cpp2:266:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:268:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:272:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:274:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:276:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:280:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:346:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:346:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:348:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:348:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:350:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:350:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:352:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:354:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:356:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:358:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:360:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:362:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:362:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:366:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:368:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:370:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:372:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:374:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:376:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:378:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:380:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:382:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:384:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:386:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:388:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:390:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:392:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:394:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:396:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:398:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:400:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:402:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:404:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:406:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:408:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:410:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:412:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:414:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:430:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:446:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:448:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:448:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:450:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:450:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:452:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:452:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:452:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:533:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:536:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:542:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:545:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:551:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:623:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:755:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:758:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:761:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:764:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:767:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:770:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:791:39: warning: unknown escape sequence: '\)'
-pure2-regex.cpp2:907:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:909:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:909:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:911:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:911:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:913:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:915:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:915:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:917:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:917:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:921:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:923:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:927:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:929:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:1033:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1035:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1037:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1053:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1055:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1057:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1059:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1061:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1063:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1065:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1067:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1069:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:285:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:287:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:291:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:293:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:295:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:299:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:365:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:365:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:367:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:367:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:369:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:369:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:371:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:373:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:375:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:377:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:379:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:381:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:381:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:385:39: warning: unknown escape sequence: '\B'
+pure2-regex.cpp2:387:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:389:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:391:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:393:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:395:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:397:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:399:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:401:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:403:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:405:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:407:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:409:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:411:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:413:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:415:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:417:39: warning: unknown escape sequence: '\W'
+pure2-regex.cpp2:419:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:421:39: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:423:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:425:39: warning: unknown escape sequence: '\S'
+pure2-regex.cpp2:427:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:429:39: warning: unknown escape sequence: '\d'
+pure2-regex.cpp2:431:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:433:39: warning: unknown escape sequence: '\D'
+pure2-regex.cpp2:449:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:465:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:467:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:467:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:469:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:469:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:471:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:471:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:471:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:552:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:555:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:561:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:564:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:570:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:642:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:774:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:777:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:780:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:783:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:786:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:789:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:810:39: warning: unknown escape sequence: '\)'
+pure2-regex.cpp2:926:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:928:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:928:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:930:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:930:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:932:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:934:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:934:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:936:39: warning: unknown escape sequence: '\h'
+pure2-regex.cpp2:936:39: warning: unknown escape sequence: '\H'
+pure2-regex.cpp2:940:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:942:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:946:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:948:39: warning: unknown escape sequence: '\V'
+pure2-regex.cpp2:1052:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1054:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1056:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1072:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1075:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1078:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1081:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1084:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1087:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1090:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1093:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1096:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1098:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1100:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1102:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1104:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1106:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1108:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1110:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1074:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1076:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1078:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1080:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1082:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1084:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1086:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1088:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1091:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1094:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1097:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1100:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1103:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1106:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1109:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1112:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1114:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1115:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1117:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1120:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1123:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1126:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1129:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1132:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1135:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1138:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1141:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1143:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1145:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1147:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1149:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1151:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1153:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1155:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1119:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1121:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1123:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1125:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1127:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1129:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1131:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1133:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1136:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1139:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1142:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1145:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1148:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1151:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1154:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1157:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1159:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1160:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1162:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1165:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1168:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1171:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1174:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1177:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1180:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1183:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1186:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1188:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1190:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1192:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1194:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1196:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1198:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1200:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1164:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1166:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1168:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1170:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1172:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1174:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1176:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1178:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1181:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1184:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1187:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1190:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1193:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1196:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1199:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1202:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1204:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1205:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1207:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1210:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1213:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1216:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1219:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1222:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1225:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1228:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1231:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1233:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1235:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1237:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1239:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1241:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1243:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1245:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1209:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1211:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1213:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1215:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1217:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1219:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1221:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1223:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1226:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1229:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1232:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1235:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1238:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1241:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1244:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1247:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1249:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1250:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1252:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1255:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1258:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1261:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1264:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1267:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1270:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1273:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1276:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1278:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1280:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1282:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1284:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1286:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1288:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1290:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1254:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1256:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1258:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1260:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1262:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1264:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1266:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1268:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1271:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1274:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1277:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1280:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1283:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1286:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1289:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1292:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1294:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1295:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1297:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1300:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1303:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1306:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1309:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1312:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1315:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1318:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1321:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1323:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1325:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1327:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1329:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1331:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1333:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1335:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1299:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1301:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1303:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1305:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1307:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1309:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1311:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1313:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1316:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1319:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1322:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1325:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1328:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1331:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1334:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1337:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1339:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1340:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1342:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1345:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1348:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1351:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1354:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1357:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1360:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1363:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1366:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1368:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1370:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1372:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1374:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1376:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1378:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1380:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1344:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1346:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1348:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1350:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1352:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1354:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1356:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1358:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1361:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1364:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1367:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1370:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1373:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1376:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1379:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1382:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1384:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1385:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1387:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1390:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1393:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1396:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1399:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1402:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1405:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1408:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1411:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1413:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1415:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1417:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1419:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1421:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1423:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1425:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1389:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1391:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1393:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1395:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1397:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1399:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1401:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1403:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1406:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1409:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1412:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1415:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1418:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1421:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1424:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1427:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1429:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1430:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1432:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1435:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1438:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1441:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1444:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1447:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1450:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1453:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1456:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1458:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1460:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1462:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1464:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1466:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1468:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1470:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1434:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1436:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1438:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1440:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1442:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1444:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1446:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1448:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1451:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1454:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1457:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1460:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1463:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1466:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1469:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1472:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1474:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1475:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1477:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1480:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1483:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1486:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1489:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1492:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1495:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1498:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1501:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1503:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1505:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1507:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1509:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1511:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1513:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1515:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1479:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1481:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1483:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1485:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1487:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1489:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1491:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1493:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1496:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1499:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1502:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1505:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1508:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1511:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1514:39: warning: unknown escape sequence: '\Z'
 pure2-regex.cpp2:1517:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1519:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1520:39: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:1522:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1525:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1528:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1531:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1534:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1537:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1540:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1543:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1546:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1549:39: warning: unknown escape sequence: '\A'
-pure2-regex.cpp2:1549:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1555:39: warning: unknown escape sequence: '\K'
+pure2-regex.cpp2:1524:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1526:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1528:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1530:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1532:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1534:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1536:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1538:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1541:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1544:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1547:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1550:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1553:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1556:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1559:39: warning: unknown escape sequence: '\Z'
+pure2-regex.cpp2:1562:39: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:1565:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1568:39: warning: unknown escape sequence: '\A'
+pure2-regex.cpp2:1568:39: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:1608:39: warning: unknown escape sequence: '\040'
+pure2-regex.cpp2:1671:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:1673:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:1675:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:1677:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:1679:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:1681:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1681:39: warning: unknown escape sequence: '\g'
+pure2-regex.cpp2:1681:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1683:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1685:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1687:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1689:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1691:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1693:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1695:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1697:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1699:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1701:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1703:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1703:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1703:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1705:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1705:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1705:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1707:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1707:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1707:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\k'
+pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:1744:39: warning: unknown escape sequence: '\K'
diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp
index 15bd59958f..e1339d26d7 100644
--- a/regression-tests/test-results/pure2-regex.cpp
+++ b/regression-tests/test-results/pure2-regex.cpp
@@ -8,7 +8,7 @@
 
 #line 1 "pure2-regex.cpp2"
 
-#line 134 "pure2-regex.cpp2"
+#line 153 "pure2-regex.cpp2"
 class test_general_tests;
   
 
@@ -17,11 +17,11 @@ class test_general_tests;
 #line 1 "pure2-regex.cpp2"
 [[nodiscard]] auto create_result(cpp2::in resultExpr, auto const& r) -> std::string;
 
-#line 93 "pure2-regex.cpp2"
+#line 112 "pure2-regex.cpp2"
 template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in kind, cpp2::in resultExpr, 
            cpp2::in resultExpected) -> void;
 
-#line 134 "pure2-regex.cpp2"
+#line 153 "pure2-regex.cpp2"
 class test_general_tests {
 
   private: std::string var_regex_0 {"abc"}; 
@@ -342,361 +342,361 @@ class test_general_tests {
 
   private: std::string var_regex_158 {"(a)(b)(c)\g1\g2\g3"}; 
 
-#line 455 "pure2-regex.cpp2"
+#line 474 "pure2-regex.cpp2"
   private: std::string var_regex_159 {"abc"}; 
 
-#line 458 "pure2-regex.cpp2"
+#line 477 "pure2-regex.cpp2"
   private: std::string var_regex_160 {"abc"}; 
 
-#line 461 "pure2-regex.cpp2"
+#line 480 "pure2-regex.cpp2"
   private: std::string var_regex_161 {"abc"}; 
 
-#line 464 "pure2-regex.cpp2"
+#line 483 "pure2-regex.cpp2"
   private: std::string var_regex_162 {"abc"}; 
 
-#line 467 "pure2-regex.cpp2"
+#line 486 "pure2-regex.cpp2"
   private: std::string var_regex_163 {"abc"}; 
 
-#line 470 "pure2-regex.cpp2"
+#line 489 "pure2-regex.cpp2"
   private: std::string var_regex_164 {"abc"}; 
 
-#line 473 "pure2-regex.cpp2"
+#line 492 "pure2-regex.cpp2"
   private: std::string var_regex_165 {"ab*c"}; 
 
-#line 476 "pure2-regex.cpp2"
+#line 495 "pure2-regex.cpp2"
   private: std::string var_regex_166 {"ab*bc"}; 
 
-#line 479 "pure2-regex.cpp2"
+#line 498 "pure2-regex.cpp2"
   private: std::string var_regex_167 {"ab*bc"}; 
 
-#line 482 "pure2-regex.cpp2"
+#line 501 "pure2-regex.cpp2"
   private: std::string var_regex_168 {"ab*?bc"}; 
 
-#line 485 "pure2-regex.cpp2"
+#line 504 "pure2-regex.cpp2"
   private: std::string var_regex_169 {"ab{0,}?bc"}; 
 
-#line 488 "pure2-regex.cpp2"
+#line 507 "pure2-regex.cpp2"
   private: std::string var_regex_170 {"ab+?bc"}; 
 
-#line 491 "pure2-regex.cpp2"
+#line 510 "pure2-regex.cpp2"
   private: std::string var_regex_171 {"ab+bc"}; 
 
-#line 494 "pure2-regex.cpp2"
+#line 513 "pure2-regex.cpp2"
   private: std::string var_regex_172 {"ab+bc"}; 
 
-#line 497 "pure2-regex.cpp2"
+#line 516 "pure2-regex.cpp2"
   private: std::string var_regex_173 {"ab{1,}bc"}; 
 
-#line 500 "pure2-regex.cpp2"
+#line 519 "pure2-regex.cpp2"
   private: std::string var_regex_174 {"ab+bc"}; 
 
-#line 503 "pure2-regex.cpp2"
+#line 522 "pure2-regex.cpp2"
   private: std::string var_regex_175 {"ab{1,}?bc"}; 
 
-#line 506 "pure2-regex.cpp2"
+#line 525 "pure2-regex.cpp2"
   private: std::string var_regex_176 {"ab{1,3}?bc"}; 
 
-#line 509 "pure2-regex.cpp2"
+#line 528 "pure2-regex.cpp2"
   private: std::string var_regex_177 {"ab{3,4}?bc"}; 
 
-#line 512 "pure2-regex.cpp2"
+#line 531 "pure2-regex.cpp2"
   private: std::string var_regex_178 {"ab{4,5}?bc"}; 
 
-#line 515 "pure2-regex.cpp2"
+#line 534 "pure2-regex.cpp2"
   private: std::string var_regex_179 {"ab??bc"}; 
 
-#line 518 "pure2-regex.cpp2"
+#line 537 "pure2-regex.cpp2"
   private: std::string var_regex_180 {"ab??bc"}; 
 
-#line 521 "pure2-regex.cpp2"
+#line 540 "pure2-regex.cpp2"
   private: std::string var_regex_181 {"ab{0,1}?bc"}; 
 
-#line 524 "pure2-regex.cpp2"
+#line 543 "pure2-regex.cpp2"
   private: std::string var_regex_182 {"ab??bc"}; 
 
-#line 527 "pure2-regex.cpp2"
+#line 546 "pure2-regex.cpp2"
   private: std::string var_regex_183 {"ab??c"}; 
 
-#line 530 "pure2-regex.cpp2"
+#line 549 "pure2-regex.cpp2"
   private: std::string var_regex_184 {"ab{0,1}?c"}; 
 
-#line 533 "pure2-regex.cpp2"
+#line 552 "pure2-regex.cpp2"
   private: std::string var_regex_185 {"^abc\$"}; 
 
-#line 536 "pure2-regex.cpp2"
+#line 555 "pure2-regex.cpp2"
   private: std::string var_regex_186 {"^abc\$"}; 
 
-#line 539 "pure2-regex.cpp2"
+#line 558 "pure2-regex.cpp2"
   private: std::string var_regex_187 {"^abc"}; 
 
-#line 542 "pure2-regex.cpp2"
+#line 561 "pure2-regex.cpp2"
   private: std::string var_regex_188 {"^abc\$"}; 
 
-#line 545 "pure2-regex.cpp2"
+#line 564 "pure2-regex.cpp2"
   private: std::string var_regex_189 {"abc\$"}; 
 
-#line 548 "pure2-regex.cpp2"
+#line 567 "pure2-regex.cpp2"
   private: std::string var_regex_190 {"^"}; 
 
-#line 551 "pure2-regex.cpp2"
+#line 570 "pure2-regex.cpp2"
   private: std::string var_regex_191 {"\$"}; 
 
-#line 554 "pure2-regex.cpp2"
+#line 573 "pure2-regex.cpp2"
   private: std::string var_regex_192 {"a.c"}; 
 
-#line 557 "pure2-regex.cpp2"
+#line 576 "pure2-regex.cpp2"
   private: std::string var_regex_193 {"a.c"}; 
 
-#line 560 "pure2-regex.cpp2"
+#line 579 "pure2-regex.cpp2"
   private: std::string var_regex_194 {"a\\Nc"}; 
 
-#line 563 "pure2-regex.cpp2"
+#line 582 "pure2-regex.cpp2"
   private: std::string var_regex_195 {"a.*?c"}; 
 
-#line 566 "pure2-regex.cpp2"
+#line 585 "pure2-regex.cpp2"
   private: std::string var_regex_196 {"a.*c"}; 
 
-#line 569 "pure2-regex.cpp2"
+#line 588 "pure2-regex.cpp2"
   private: std::string var_regex_197 {"a[bc]d"}; 
 
-#line 572 "pure2-regex.cpp2"
+#line 591 "pure2-regex.cpp2"
   private: std::string var_regex_198 {"a[bc]d"}; 
 
-#line 575 "pure2-regex.cpp2"
+#line 594 "pure2-regex.cpp2"
   private: std::string var_regex_199 {"a[b-d]e"}; 
 
-#line 578 "pure2-regex.cpp2"
+#line 597 "pure2-regex.cpp2"
   private: std::string var_regex_200 {"a[b-d]e"}; 
 
-#line 581 "pure2-regex.cpp2"
+#line 600 "pure2-regex.cpp2"
   private: std::string var_regex_201 {"a[b-d]"}; 
 
-#line 584 "pure2-regex.cpp2"
+#line 603 "pure2-regex.cpp2"
   private: std::string var_regex_202 {"a[-b]"}; 
 
-#line 587 "pure2-regex.cpp2"
+#line 606 "pure2-regex.cpp2"
   private: std::string var_regex_203 {"a[b-]"}; 
 
-#line 590 "pure2-regex.cpp2"
+#line 609 "pure2-regex.cpp2"
   private: std::string var_regex_204 {"a]"}; 
 
-#line 593 "pure2-regex.cpp2"
+#line 612 "pure2-regex.cpp2"
   private: std::string var_regex_205 {"a[]]b"}; 
 
-#line 596 "pure2-regex.cpp2"
+#line 615 "pure2-regex.cpp2"
   private: std::string var_regex_206 {"a[^bc]d"}; 
 
-#line 599 "pure2-regex.cpp2"
+#line 618 "pure2-regex.cpp2"
   private: std::string var_regex_207 {"a[^bc]d"}; 
 
-#line 602 "pure2-regex.cpp2"
+#line 621 "pure2-regex.cpp2"
   private: std::string var_regex_208 {"a[^-b]c"}; 
 
-#line 605 "pure2-regex.cpp2"
+#line 624 "pure2-regex.cpp2"
   private: std::string var_regex_209 {"a[^-b]c"}; 
 
-#line 608 "pure2-regex.cpp2"
+#line 627 "pure2-regex.cpp2"
   private: std::string var_regex_210 {"a[^]b]c"}; 
 
-#line 611 "pure2-regex.cpp2"
+#line 630 "pure2-regex.cpp2"
   private: std::string var_regex_211 {"a[^]b]c"}; 
 
-#line 614 "pure2-regex.cpp2"
+#line 633 "pure2-regex.cpp2"
   private: std::string var_regex_212 {"ab|cd"}; 
 
-#line 617 "pure2-regex.cpp2"
+#line 636 "pure2-regex.cpp2"
   private: std::string var_regex_213 {"ab|cd"}; 
 
-#line 620 "pure2-regex.cpp2"
+#line 639 "pure2-regex.cpp2"
   private: std::string var_regex_214 {"()ef"}; 
 
-#line 623 "pure2-regex.cpp2"
+#line 642 "pure2-regex.cpp2"
   private: std::string var_regex_215 {"\$b"}; 
 
-#line 626 "pure2-regex.cpp2"
+#line 645 "pure2-regex.cpp2"
   private: std::string var_regex_216 {"a\(b"}; 
 
-#line 629 "pure2-regex.cpp2"
+#line 648 "pure2-regex.cpp2"
   private: std::string var_regex_217 {"a\(*b"}; 
 
-#line 632 "pure2-regex.cpp2"
+#line 651 "pure2-regex.cpp2"
   private: std::string var_regex_218 {"a\(*b"}; 
 
-#line 635 "pure2-regex.cpp2"
+#line 654 "pure2-regex.cpp2"
   private: std::string var_regex_219 {"a\\b"}; 
 
-#line 638 "pure2-regex.cpp2"
+#line 657 "pure2-regex.cpp2"
   private: std::string var_regex_220 {"((a))"}; 
 
-#line 641 "pure2-regex.cpp2"
+#line 660 "pure2-regex.cpp2"
   private: std::string var_regex_221 {"(a)b(c)"}; 
 
-#line 644 "pure2-regex.cpp2"
+#line 663 "pure2-regex.cpp2"
   private: std::string var_regex_222 {"a+b+c"}; 
 
-#line 647 "pure2-regex.cpp2"
+#line 666 "pure2-regex.cpp2"
   private: std::string var_regex_223 {"a{1,}b{1,}c"}; 
 
-#line 650 "pure2-regex.cpp2"
+#line 669 "pure2-regex.cpp2"
   private: std::string var_regex_224 {"a.+?c"}; 
 
-#line 653 "pure2-regex.cpp2"
+#line 672 "pure2-regex.cpp2"
   private: std::string var_regex_225 {"a.*?c"}; 
 
-#line 656 "pure2-regex.cpp2"
+#line 675 "pure2-regex.cpp2"
   private: std::string var_regex_226 {"a.{0,5}?c"}; 
 
-#line 659 "pure2-regex.cpp2"
+#line 678 "pure2-regex.cpp2"
   private: std::string var_regex_227 {"(a+|b)*"}; 
 
-#line 662 "pure2-regex.cpp2"
+#line 681 "pure2-regex.cpp2"
   private: std::string var_regex_228 {"(a+|b){0,}"}; 
 
-#line 665 "pure2-regex.cpp2"
+#line 684 "pure2-regex.cpp2"
   private: std::string var_regex_229 {"(a+|b)+"}; 
 
-#line 668 "pure2-regex.cpp2"
+#line 687 "pure2-regex.cpp2"
   private: std::string var_regex_230 {"(a+|b){1,}"}; 
 
-#line 671 "pure2-regex.cpp2"
+#line 690 "pure2-regex.cpp2"
   private: std::string var_regex_231 {"(a+|b)?"}; 
 
-#line 674 "pure2-regex.cpp2"
+#line 693 "pure2-regex.cpp2"
   private: std::string var_regex_232 {"(a+|b){0,1}"}; 
 
-#line 677 "pure2-regex.cpp2"
+#line 696 "pure2-regex.cpp2"
   private: std::string var_regex_233 {"(a+|b){0,1}?"}; 
 
-#line 680 "pure2-regex.cpp2"
+#line 699 "pure2-regex.cpp2"
   private: std::string var_regex_234 {"[^ab]*"}; 
 
-#line 683 "pure2-regex.cpp2"
+#line 702 "pure2-regex.cpp2"
   private: std::string var_regex_235 {"abc"}; 
 
-#line 686 "pure2-regex.cpp2"
+#line 705 "pure2-regex.cpp2"
   private: std::string var_regex_236 {"a*"}; 
 
-#line 689 "pure2-regex.cpp2"
+#line 708 "pure2-regex.cpp2"
   private: std::string var_regex_237 {"([abc])*d"}; 
 
-#line 692 "pure2-regex.cpp2"
+#line 711 "pure2-regex.cpp2"
   private: std::string var_regex_238 {"([abc])*bcd"}; 
 
-#line 695 "pure2-regex.cpp2"
+#line 714 "pure2-regex.cpp2"
   private: std::string var_regex_239 {"a|b|c|d|e"}; 
 
-#line 698 "pure2-regex.cpp2"
+#line 717 "pure2-regex.cpp2"
   private: std::string var_regex_240 {"(a|b|c|d|e)f"}; 
 
-#line 701 "pure2-regex.cpp2"
+#line 720 "pure2-regex.cpp2"
   private: std::string var_regex_241 {"abcd*efg"}; 
 
-#line 704 "pure2-regex.cpp2"
+#line 723 "pure2-regex.cpp2"
   private: std::string var_regex_242 {"ab*"}; 
 
-#line 707 "pure2-regex.cpp2"
+#line 726 "pure2-regex.cpp2"
   private: std::string var_regex_243 {"ab*"}; 
 
-#line 710 "pure2-regex.cpp2"
+#line 729 "pure2-regex.cpp2"
   private: std::string var_regex_244 {"(ab|cd)e"}; 
 
-#line 713 "pure2-regex.cpp2"
+#line 732 "pure2-regex.cpp2"
   private: std::string var_regex_245 {"[abhgefdc]ij"}; 
 
-#line 716 "pure2-regex.cpp2"
+#line 735 "pure2-regex.cpp2"
   private: std::string var_regex_246 {"^(ab|cd)e"}; 
 
-#line 719 "pure2-regex.cpp2"
+#line 738 "pure2-regex.cpp2"
   private: std::string var_regex_247 {"(abc|)ef"}; 
 
-#line 722 "pure2-regex.cpp2"
+#line 741 "pure2-regex.cpp2"
   private: std::string var_regex_248 {"(a|b)c*d"}; 
 
-#line 725 "pure2-regex.cpp2"
+#line 744 "pure2-regex.cpp2"
   private: std::string var_regex_249 {"(ab|ab*)bc"}; 
 
-#line 728 "pure2-regex.cpp2"
+#line 747 "pure2-regex.cpp2"
   private: std::string var_regex_250 {"a([bc]*)c*"}; 
 
-#line 731 "pure2-regex.cpp2"
+#line 750 "pure2-regex.cpp2"
   private: std::string var_regex_251 {"a([bc]*)(c*d)"}; 
 
-#line 734 "pure2-regex.cpp2"
+#line 753 "pure2-regex.cpp2"
   private: std::string var_regex_252 {"a([bc]+)(c*d)"}; 
 
-#line 737 "pure2-regex.cpp2"
+#line 756 "pure2-regex.cpp2"
   private: std::string var_regex_253 {"a([bc]*)(c+d)"}; 
 
-#line 740 "pure2-regex.cpp2"
+#line 759 "pure2-regex.cpp2"
   private: std::string var_regex_254 {"a[bcd]*dcdcde"}; 
 
-#line 743 "pure2-regex.cpp2"
+#line 762 "pure2-regex.cpp2"
   private: std::string var_regex_255 {"a[bcd]+dcdcde"}; 
 
-#line 746 "pure2-regex.cpp2"
+#line 765 "pure2-regex.cpp2"
   private: std::string var_regex_256 {"(ab|a)b*c"}; 
 
-#line 749 "pure2-regex.cpp2"
+#line 768 "pure2-regex.cpp2"
   private: std::string var_regex_257 {"((a)(b)c)(d)"}; 
 
-#line 752 "pure2-regex.cpp2"
+#line 771 "pure2-regex.cpp2"
   private: std::string var_regex_258 {"[a-zA-Z_][a-zA-Z0-9_]*"}; 
 
-#line 755 "pure2-regex.cpp2"
+#line 774 "pure2-regex.cpp2"
   private: std::string var_regex_259 {"^a(bc+|b[eh])g|.h\$"}; 
 
-#line 758 "pure2-regex.cpp2"
+#line 777 "pure2-regex.cpp2"
   private: std::string var_regex_260 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
-#line 761 "pure2-regex.cpp2"
+#line 780 "pure2-regex.cpp2"
   private: std::string var_regex_261 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
-#line 764 "pure2-regex.cpp2"
+#line 783 "pure2-regex.cpp2"
   private: std::string var_regex_262 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
-#line 767 "pure2-regex.cpp2"
+#line 786 "pure2-regex.cpp2"
   private: std::string var_regex_263 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
-#line 770 "pure2-regex.cpp2"
+#line 789 "pure2-regex.cpp2"
   private: std::string var_regex_264 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
 
-#line 773 "pure2-regex.cpp2"
+#line 792 "pure2-regex.cpp2"
   private: std::string var_regex_265 {"((((((((((a))))))))))"}; 
 
-#line 776 "pure2-regex.cpp2"
+#line 795 "pure2-regex.cpp2"
   private: std::string var_regex_266 {"((((((((((a))))))))))\10"}; 
 
-#line 779 "pure2-regex.cpp2"
+#line 798 "pure2-regex.cpp2"
   private: std::string var_regex_267 {"(((((((((a)))))))))"}; 
 
-#line 782 "pure2-regex.cpp2"
+#line 801 "pure2-regex.cpp2"
   private: std::string var_regex_268 {"multiple words of text"}; 
 
-#line 785 "pure2-regex.cpp2"
+#line 804 "pure2-regex.cpp2"
   private: std::string var_regex_269 {"multiple words"}; 
 
-#line 788 "pure2-regex.cpp2"
+#line 807 "pure2-regex.cpp2"
   private: std::string var_regex_270 {"(.*)c(.*)"}; 
 
-#line 791 "pure2-regex.cpp2"
+#line 810 "pure2-regex.cpp2"
   private: std::string var_regex_271 {"\((.*), (.*)\)"}; 
 
-#line 794 "pure2-regex.cpp2"
+#line 813 "pure2-regex.cpp2"
   private: std::string var_regex_272 {"[k]"}; 
 
-#line 797 "pure2-regex.cpp2"
+#line 816 "pure2-regex.cpp2"
   private: std::string var_regex_273 {"abcd"}; 
 
-#line 800 "pure2-regex.cpp2"
+#line 819 "pure2-regex.cpp2"
   private: std::string var_regex_274 {"a(bc)d"}; 
 
-#line 803 "pure2-regex.cpp2"
+#line 822 "pure2-regex.cpp2"
   private: std::string var_regex_275 {"a[-]?c"}; 
 
-#line 806 "pure2-regex.cpp2"
+#line 825 "pure2-regex.cpp2"
   private: std::string var_regex_276 {"(abc)\1"}; 
 
-#line 809 "pure2-regex.cpp2"
+#line 828 "pure2-regex.cpp2"
   private: std::string var_regex_277 {"([a-c]*)\1"}; 
 
   private: std::string var_regex_278 {"a++a"}; 
@@ -843,82 +843,82 @@ class test_general_tests {
 
   private: std::string var_regex_349 {"((?i:a))b"}; 
 
-#line 956 "pure2-regex.cpp2"
+#line 975 "pure2-regex.cpp2"
   private: std::string var_regex_350 {"(?:(?-i)a)b"}; 
 
-#line 959 "pure2-regex.cpp2"
+#line 978 "pure2-regex.cpp2"
   private: std::string var_regex_351 {"((?-i)a)b"}; 
 
-#line 962 "pure2-regex.cpp2"
+#line 981 "pure2-regex.cpp2"
   private: std::string var_regex_352 {"(?:(?-i)a)b"}; 
 
-#line 965 "pure2-regex.cpp2"
+#line 984 "pure2-regex.cpp2"
   private: std::string var_regex_353 {"((?-i)a)b"}; 
 
-#line 968 "pure2-regex.cpp2"
+#line 987 "pure2-regex.cpp2"
   private: std::string var_regex_354 {"(?:(?-i)a)b"}; 
 
-#line 971 "pure2-regex.cpp2"
+#line 990 "pure2-regex.cpp2"
   private: std::string var_regex_355 {"((?-i)a)b"}; 
 
-#line 974 "pure2-regex.cpp2"
+#line 993 "pure2-regex.cpp2"
   private: std::string var_regex_356 {"(?:(?-i)a)b"}; 
 
-#line 977 "pure2-regex.cpp2"
+#line 996 "pure2-regex.cpp2"
   private: std::string var_regex_357 {"((?-i)a)b"}; 
 
-#line 980 "pure2-regex.cpp2"
+#line 999 "pure2-regex.cpp2"
   private: std::string var_regex_358 {"(?:(?-i)a)b"}; 
 
-#line 983 "pure2-regex.cpp2"
+#line 1002 "pure2-regex.cpp2"
   private: std::string var_regex_359 {"((?-i)a)b"}; 
 
-#line 986 "pure2-regex.cpp2"
+#line 1005 "pure2-regex.cpp2"
   private: std::string var_regex_360 {"(?-i:a)b"}; 
 
-#line 989 "pure2-regex.cpp2"
+#line 1008 "pure2-regex.cpp2"
   private: std::string var_regex_361 {"((?-i:a))b"}; 
 
-#line 992 "pure2-regex.cpp2"
+#line 1011 "pure2-regex.cpp2"
   private: std::string var_regex_362 {"(?-i:a)b"}; 
 
-#line 995 "pure2-regex.cpp2"
+#line 1014 "pure2-regex.cpp2"
   private: std::string var_regex_363 {"((?-i:a))b"}; 
 
-#line 998 "pure2-regex.cpp2"
+#line 1017 "pure2-regex.cpp2"
   private: std::string var_regex_364 {"(?-i:a)b"}; 
 
-#line 1001 "pure2-regex.cpp2"
+#line 1020 "pure2-regex.cpp2"
   private: std::string var_regex_365 {"((?-i:a))b"}; 
 
-#line 1004 "pure2-regex.cpp2"
+#line 1023 "pure2-regex.cpp2"
   private: std::string var_regex_366 {"(?-i:a)b"}; 
 
-#line 1007 "pure2-regex.cpp2"
+#line 1026 "pure2-regex.cpp2"
   private: std::string var_regex_367 {"((?-i:a))b"}; 
 
-#line 1010 "pure2-regex.cpp2"
+#line 1029 "pure2-regex.cpp2"
   private: std::string var_regex_368 {"(?-i:a)b"}; 
 
-#line 1013 "pure2-regex.cpp2"
+#line 1032 "pure2-regex.cpp2"
   private: std::string var_regex_369 {"((?-i:a))b"}; 
 
-#line 1016 "pure2-regex.cpp2"
+#line 1035 "pure2-regex.cpp2"
   private: std::string var_regex_370 {"((?-i:a.))b"}; 
 
-#line 1019 "pure2-regex.cpp2"
+#line 1038 "pure2-regex.cpp2"
   private: std::string var_regex_371 {"((?-i:a\\N))b"}; 
 
-#line 1022 "pure2-regex.cpp2"
+#line 1041 "pure2-regex.cpp2"
   private: std::string var_regex_372 {"((?s-i:a.))b"}; 
 
-#line 1025 "pure2-regex.cpp2"
+#line 1044 "pure2-regex.cpp2"
   private: std::string var_regex_373 {"((?s-i:a\\N))b"}; 
 
-#line 1028 "pure2-regex.cpp2"
+#line 1047 "pure2-regex.cpp2"
   private: std::string var_regex_374 {"((?s-i:a.))b"}; 
 
-#line 1031 "pure2-regex.cpp2"
+#line 1050 "pure2-regex.cpp2"
   private: std::string var_regex_375 {"((?s-i:a\\N))b"}; 
 
   private: std::string var_regex_376 {"^(?:a?b?)*\$"}; 
@@ -959,31 +959,31 @@ class test_general_tests {
 
   private: std::string var_regex_394 {"\$"}; 
 
-#line 1072 "pure2-regex.cpp2"
+#line 1091 "pure2-regex.cpp2"
   private: std::string var_regex_395 {"\Z"}; 
 
-#line 1075 "pure2-regex.cpp2"
+#line 1094 "pure2-regex.cpp2"
   private: std::string var_regex_396 {"\z"}; 
 
-#line 1078 "pure2-regex.cpp2"
+#line 1097 "pure2-regex.cpp2"
   private: std::string var_regex_397 {"\$"}; 
 
-#line 1081 "pure2-regex.cpp2"
+#line 1100 "pure2-regex.cpp2"
   private: std::string var_regex_398 {"\Z"}; 
 
-#line 1084 "pure2-regex.cpp2"
+#line 1103 "pure2-regex.cpp2"
   private: std::string var_regex_399 {"\z"}; 
 
-#line 1087 "pure2-regex.cpp2"
+#line 1106 "pure2-regex.cpp2"
   private: std::string var_regex_400 {"\$"}; 
 
-#line 1090 "pure2-regex.cpp2"
+#line 1109 "pure2-regex.cpp2"
   private: std::string var_regex_401 {"\Z"}; 
 
-#line 1093 "pure2-regex.cpp2"
+#line 1112 "pure2-regex.cpp2"
   private: std::string var_regex_402 {"\z"}; 
 
-#line 1096 "pure2-regex.cpp2"
+#line 1115 "pure2-regex.cpp2"
   private: std::string var_regex_403 {"\$"}; 
 
   private: std::string var_regex_404 {"a\Z"}; 
@@ -1004,31 +1004,31 @@ class test_general_tests {
 
   private: std::string var_regex_412 {"a\$"}; 
 
-#line 1117 "pure2-regex.cpp2"
+#line 1136 "pure2-regex.cpp2"
   private: std::string var_regex_413 {"a\Z"}; 
 
-#line 1120 "pure2-regex.cpp2"
+#line 1139 "pure2-regex.cpp2"
   private: std::string var_regex_414 {"a\z"}; 
 
-#line 1123 "pure2-regex.cpp2"
+#line 1142 "pure2-regex.cpp2"
   private: std::string var_regex_415 {"a\$"}; 
 
-#line 1126 "pure2-regex.cpp2"
+#line 1145 "pure2-regex.cpp2"
   private: std::string var_regex_416 {"a\Z"}; 
 
-#line 1129 "pure2-regex.cpp2"
+#line 1148 "pure2-regex.cpp2"
   private: std::string var_regex_417 {"a\z"}; 
 
-#line 1132 "pure2-regex.cpp2"
+#line 1151 "pure2-regex.cpp2"
   private: std::string var_regex_418 {"a\$"}; 
 
-#line 1135 "pure2-regex.cpp2"
+#line 1154 "pure2-regex.cpp2"
   private: std::string var_regex_419 {"a\Z"}; 
 
-#line 1138 "pure2-regex.cpp2"
+#line 1157 "pure2-regex.cpp2"
   private: std::string var_regex_420 {"a\z"}; 
 
-#line 1141 "pure2-regex.cpp2"
+#line 1160 "pure2-regex.cpp2"
   private: std::string var_regex_421 {"a\$"}; 
 
   private: std::string var_regex_422 {"aa\Z"}; 
@@ -1049,31 +1049,31 @@ class test_general_tests {
 
   private: std::string var_regex_430 {"aa\$"}; 
 
-#line 1162 "pure2-regex.cpp2"
+#line 1181 "pure2-regex.cpp2"
   private: std::string var_regex_431 {"aa\Z"}; 
 
-#line 1165 "pure2-regex.cpp2"
+#line 1184 "pure2-regex.cpp2"
   private: std::string var_regex_432 {"aa\z"}; 
 
-#line 1168 "pure2-regex.cpp2"
+#line 1187 "pure2-regex.cpp2"
   private: std::string var_regex_433 {"aa\$"}; 
 
-#line 1171 "pure2-regex.cpp2"
+#line 1190 "pure2-regex.cpp2"
   private: std::string var_regex_434 {"aa\Z"}; 
 
-#line 1174 "pure2-regex.cpp2"
+#line 1193 "pure2-regex.cpp2"
   private: std::string var_regex_435 {"aa\z"}; 
 
-#line 1177 "pure2-regex.cpp2"
+#line 1196 "pure2-regex.cpp2"
   private: std::string var_regex_436 {"aa\$"}; 
 
-#line 1180 "pure2-regex.cpp2"
+#line 1199 "pure2-regex.cpp2"
   private: std::string var_regex_437 {"aa\Z"}; 
 
-#line 1183 "pure2-regex.cpp2"
+#line 1202 "pure2-regex.cpp2"
   private: std::string var_regex_438 {"aa\z"}; 
 
-#line 1186 "pure2-regex.cpp2"
+#line 1205 "pure2-regex.cpp2"
   private: std::string var_regex_439 {"aa\$"}; 
 
   private: std::string var_regex_440 {"aa\Z"}; 
@@ -1094,31 +1094,31 @@ class test_general_tests {
 
   private: std::string var_regex_448 {"aa\$"}; 
 
-#line 1207 "pure2-regex.cpp2"
+#line 1226 "pure2-regex.cpp2"
   private: std::string var_regex_449 {"aa\Z"}; 
 
-#line 1210 "pure2-regex.cpp2"
+#line 1229 "pure2-regex.cpp2"
   private: std::string var_regex_450 {"aa\z"}; 
 
-#line 1213 "pure2-regex.cpp2"
+#line 1232 "pure2-regex.cpp2"
   private: std::string var_regex_451 {"aa\$"}; 
 
-#line 1216 "pure2-regex.cpp2"
+#line 1235 "pure2-regex.cpp2"
   private: std::string var_regex_452 {"aa\Z"}; 
 
-#line 1219 "pure2-regex.cpp2"
+#line 1238 "pure2-regex.cpp2"
   private: std::string var_regex_453 {"aa\z"}; 
 
-#line 1222 "pure2-regex.cpp2"
+#line 1241 "pure2-regex.cpp2"
   private: std::string var_regex_454 {"aa\$"}; 
 
-#line 1225 "pure2-regex.cpp2"
+#line 1244 "pure2-regex.cpp2"
   private: std::string var_regex_455 {"aa\Z"}; 
 
-#line 1228 "pure2-regex.cpp2"
+#line 1247 "pure2-regex.cpp2"
   private: std::string var_regex_456 {"aa\z"}; 
 
-#line 1231 "pure2-regex.cpp2"
+#line 1250 "pure2-regex.cpp2"
   private: std::string var_regex_457 {"aa\$"}; 
 
   private: std::string var_regex_458 {"aa\Z"}; 
@@ -1139,31 +1139,31 @@ class test_general_tests {
 
   private: std::string var_regex_466 {"aa\$"}; 
 
-#line 1252 "pure2-regex.cpp2"
+#line 1271 "pure2-regex.cpp2"
   private: std::string var_regex_467 {"aa\Z"}; 
 
-#line 1255 "pure2-regex.cpp2"
+#line 1274 "pure2-regex.cpp2"
   private: std::string var_regex_468 {"aa\z"}; 
 
-#line 1258 "pure2-regex.cpp2"
+#line 1277 "pure2-regex.cpp2"
   private: std::string var_regex_469 {"aa\$"}; 
 
-#line 1261 "pure2-regex.cpp2"
+#line 1280 "pure2-regex.cpp2"
   private: std::string var_regex_470 {"aa\Z"}; 
 
-#line 1264 "pure2-regex.cpp2"
+#line 1283 "pure2-regex.cpp2"
   private: std::string var_regex_471 {"aa\z"}; 
 
-#line 1267 "pure2-regex.cpp2"
+#line 1286 "pure2-regex.cpp2"
   private: std::string var_regex_472 {"aa\$"}; 
 
-#line 1270 "pure2-regex.cpp2"
+#line 1289 "pure2-regex.cpp2"
   private: std::string var_regex_473 {"aa\Z"}; 
 
-#line 1273 "pure2-regex.cpp2"
+#line 1292 "pure2-regex.cpp2"
   private: std::string var_regex_474 {"aa\z"}; 
 
-#line 1276 "pure2-regex.cpp2"
+#line 1295 "pure2-regex.cpp2"
   private: std::string var_regex_475 {"aa\$"}; 
 
   private: std::string var_regex_476 {"ab\Z"}; 
@@ -1184,31 +1184,31 @@ class test_general_tests {
 
   private: std::string var_regex_484 {"ab\$"}; 
 
-#line 1297 "pure2-regex.cpp2"
+#line 1316 "pure2-regex.cpp2"
   private: std::string var_regex_485 {"ab\Z"}; 
 
-#line 1300 "pure2-regex.cpp2"
+#line 1319 "pure2-regex.cpp2"
   private: std::string var_regex_486 {"ab\z"}; 
 
-#line 1303 "pure2-regex.cpp2"
+#line 1322 "pure2-regex.cpp2"
   private: std::string var_regex_487 {"ab\$"}; 
 
-#line 1306 "pure2-regex.cpp2"
+#line 1325 "pure2-regex.cpp2"
   private: std::string var_regex_488 {"ab\Z"}; 
 
-#line 1309 "pure2-regex.cpp2"
+#line 1328 "pure2-regex.cpp2"
   private: std::string var_regex_489 {"ab\z"}; 
 
-#line 1312 "pure2-regex.cpp2"
+#line 1331 "pure2-regex.cpp2"
   private: std::string var_regex_490 {"ab\$"}; 
 
-#line 1315 "pure2-regex.cpp2"
+#line 1334 "pure2-regex.cpp2"
   private: std::string var_regex_491 {"ab\Z"}; 
 
-#line 1318 "pure2-regex.cpp2"
+#line 1337 "pure2-regex.cpp2"
   private: std::string var_regex_492 {"ab\z"}; 
 
-#line 1321 "pure2-regex.cpp2"
+#line 1340 "pure2-regex.cpp2"
   private: std::string var_regex_493 {"ab\$"}; 
 
   private: std::string var_regex_494 {"ab\Z"}; 
@@ -1229,31 +1229,31 @@ class test_general_tests {
 
   private: std::string var_regex_502 {"ab\$"}; 
 
-#line 1342 "pure2-regex.cpp2"
+#line 1361 "pure2-regex.cpp2"
   private: std::string var_regex_503 {"ab\Z"}; 
 
-#line 1345 "pure2-regex.cpp2"
+#line 1364 "pure2-regex.cpp2"
   private: std::string var_regex_504 {"ab\z"}; 
 
-#line 1348 "pure2-regex.cpp2"
+#line 1367 "pure2-regex.cpp2"
   private: std::string var_regex_505 {"ab\$"}; 
 
-#line 1351 "pure2-regex.cpp2"
+#line 1370 "pure2-regex.cpp2"
   private: std::string var_regex_506 {"ab\Z"}; 
 
-#line 1354 "pure2-regex.cpp2"
+#line 1373 "pure2-regex.cpp2"
   private: std::string var_regex_507 {"ab\z"}; 
 
-#line 1357 "pure2-regex.cpp2"
+#line 1376 "pure2-regex.cpp2"
   private: std::string var_regex_508 {"ab\$"}; 
 
-#line 1360 "pure2-regex.cpp2"
+#line 1379 "pure2-regex.cpp2"
   private: std::string var_regex_509 {"ab\Z"}; 
 
-#line 1363 "pure2-regex.cpp2"
+#line 1382 "pure2-regex.cpp2"
   private: std::string var_regex_510 {"ab\z"}; 
 
-#line 1366 "pure2-regex.cpp2"
+#line 1385 "pure2-regex.cpp2"
   private: std::string var_regex_511 {"ab\$"}; 
 
   private: std::string var_regex_512 {"ab\Z"}; 
@@ -1274,31 +1274,31 @@ class test_general_tests {
 
   private: std::string var_regex_520 {"ab\$"}; 
 
-#line 1387 "pure2-regex.cpp2"
+#line 1406 "pure2-regex.cpp2"
   private: std::string var_regex_521 {"ab\Z"}; 
 
-#line 1390 "pure2-regex.cpp2"
+#line 1409 "pure2-regex.cpp2"
   private: std::string var_regex_522 {"ab\z"}; 
 
-#line 1393 "pure2-regex.cpp2"
+#line 1412 "pure2-regex.cpp2"
   private: std::string var_regex_523 {"ab\$"}; 
 
-#line 1396 "pure2-regex.cpp2"
+#line 1415 "pure2-regex.cpp2"
   private: std::string var_regex_524 {"ab\Z"}; 
 
-#line 1399 "pure2-regex.cpp2"
+#line 1418 "pure2-regex.cpp2"
   private: std::string var_regex_525 {"ab\z"}; 
 
-#line 1402 "pure2-regex.cpp2"
+#line 1421 "pure2-regex.cpp2"
   private: std::string var_regex_526 {"ab\$"}; 
 
-#line 1405 "pure2-regex.cpp2"
+#line 1424 "pure2-regex.cpp2"
   private: std::string var_regex_527 {"ab\Z"}; 
 
-#line 1408 "pure2-regex.cpp2"
+#line 1427 "pure2-regex.cpp2"
   private: std::string var_regex_528 {"ab\z"}; 
 
-#line 1411 "pure2-regex.cpp2"
+#line 1430 "pure2-regex.cpp2"
   private: std::string var_regex_529 {"ab\$"}; 
 
   private: std::string var_regex_530 {"abb\Z"}; 
@@ -1319,31 +1319,31 @@ class test_general_tests {
 
   private: std::string var_regex_538 {"abb\$"}; 
 
-#line 1432 "pure2-regex.cpp2"
+#line 1451 "pure2-regex.cpp2"
   private: std::string var_regex_539 {"abb\Z"}; 
 
-#line 1435 "pure2-regex.cpp2"
+#line 1454 "pure2-regex.cpp2"
   private: std::string var_regex_540 {"abb\z"}; 
 
-#line 1438 "pure2-regex.cpp2"
+#line 1457 "pure2-regex.cpp2"
   private: std::string var_regex_541 {"abb\$"}; 
 
-#line 1441 "pure2-regex.cpp2"
+#line 1460 "pure2-regex.cpp2"
   private: std::string var_regex_542 {"abb\Z"}; 
 
-#line 1444 "pure2-regex.cpp2"
+#line 1463 "pure2-regex.cpp2"
   private: std::string var_regex_543 {"abb\z"}; 
 
-#line 1447 "pure2-regex.cpp2"
+#line 1466 "pure2-regex.cpp2"
   private: std::string var_regex_544 {"abb\$"}; 
 
-#line 1450 "pure2-regex.cpp2"
+#line 1469 "pure2-regex.cpp2"
   private: std::string var_regex_545 {"abb\Z"}; 
 
-#line 1453 "pure2-regex.cpp2"
+#line 1472 "pure2-regex.cpp2"
   private: std::string var_regex_546 {"abb\z"}; 
 
-#line 1456 "pure2-regex.cpp2"
+#line 1475 "pure2-regex.cpp2"
   private: std::string var_regex_547 {"abb\$"}; 
 
   private: std::string var_regex_548 {"abb\Z"}; 
@@ -1364,31 +1364,31 @@ class test_general_tests {
 
   private: std::string var_regex_556 {"abb\$"}; 
 
-#line 1477 "pure2-regex.cpp2"
+#line 1496 "pure2-regex.cpp2"
   private: std::string var_regex_557 {"abb\Z"}; 
 
-#line 1480 "pure2-regex.cpp2"
+#line 1499 "pure2-regex.cpp2"
   private: std::string var_regex_558 {"abb\z"}; 
 
-#line 1483 "pure2-regex.cpp2"
+#line 1502 "pure2-regex.cpp2"
   private: std::string var_regex_559 {"abb\$"}; 
 
-#line 1486 "pure2-regex.cpp2"
+#line 1505 "pure2-regex.cpp2"
   private: std::string var_regex_560 {"abb\Z"}; 
 
-#line 1489 "pure2-regex.cpp2"
+#line 1508 "pure2-regex.cpp2"
   private: std::string var_regex_561 {"abb\z"}; 
 
-#line 1492 "pure2-regex.cpp2"
+#line 1511 "pure2-regex.cpp2"
   private: std::string var_regex_562 {"abb\$"}; 
 
-#line 1495 "pure2-regex.cpp2"
+#line 1514 "pure2-regex.cpp2"
   private: std::string var_regex_563 {"abb\Z"}; 
 
-#line 1498 "pure2-regex.cpp2"
+#line 1517 "pure2-regex.cpp2"
   private: std::string var_regex_564 {"abb\z"}; 
 
-#line 1501 "pure2-regex.cpp2"
+#line 1520 "pure2-regex.cpp2"
   private: std::string var_regex_565 {"abb\$"}; 
 
   private: std::string var_regex_566 {"abb\Z"}; 
@@ -1409,51 +1409,233 @@ class test_general_tests {
 
   private: std::string var_regex_574 {"abb\$"}; 
 
-#line 1522 "pure2-regex.cpp2"
+#line 1541 "pure2-regex.cpp2"
   private: std::string var_regex_575 {"abb\Z"}; 
 
-#line 1525 "pure2-regex.cpp2"
+#line 1544 "pure2-regex.cpp2"
   private: std::string var_regex_576 {"abb\z"}; 
 
-#line 1528 "pure2-regex.cpp2"
+#line 1547 "pure2-regex.cpp2"
   private: std::string var_regex_577 {"abb\$"}; 
 
-#line 1531 "pure2-regex.cpp2"
+#line 1550 "pure2-regex.cpp2"
   private: std::string var_regex_578 {"abb\Z"}; 
 
-#line 1534 "pure2-regex.cpp2"
+#line 1553 "pure2-regex.cpp2"
   private: std::string var_regex_579 {"abb\z"}; 
 
-#line 1537 "pure2-regex.cpp2"
+#line 1556 "pure2-regex.cpp2"
   private: std::string var_regex_580 {"abb\$"}; 
 
-#line 1540 "pure2-regex.cpp2"
+#line 1559 "pure2-regex.cpp2"
   private: std::string var_regex_581 {"abb\Z"}; 
 
-#line 1543 "pure2-regex.cpp2"
+#line 1562 "pure2-regex.cpp2"
   private: std::string var_regex_582 {"abb\z"}; 
 
-#line 1546 "pure2-regex.cpp2"
+#line 1565 "pure2-regex.cpp2"
   private: std::string var_regex_583 {"abb\$"}; 
 
-#line 1549 "pure2-regex.cpp2"
+#line 1568 "pure2-regex.cpp2"
   private: std::string var_regex_584 {"\Aa\$"}; 
 
   private: std::string var_regex_585 {"(?i:.[b].)"}; 
 
   private: std::string var_regex_586 {"(?i:\\N[b]\\N)"}; 
 
-  private: std::string var_regex_587 {"foo\Kbar"}; 
+#line 1575 "pure2-regex.cpp2"
+  private: std::string var_regex_587 {"\\N {1}"}; 
 
-  private: std::string var_regex_588 {"foo\t\n\r\f\a\ebar"}; 
+#line 1578 "pure2-regex.cpp2"
+  private: std::string var_regex_588 {"\\N {1}"}; 
+
+#line 1581 "pure2-regex.cpp2"
+  private: std::string var_regex_589 {"\\N {1}"}; 
+
+#line 1584 "pure2-regex.cpp2"
+  private: std::string var_regex_590 {"\\N {3,4}"}; 
+
+#line 1587 "pure2-regex.cpp2"
+  private: std::string var_regex_591 {"\\N {3,4}"}; 
+
+#line 1590 "pure2-regex.cpp2"
+  private: std::string var_regex_592 {"\\N {3,4}"}; 
+
+#line 1593 "pure2-regex.cpp2"
+  private: std::string var_regex_593 {"a\\N c"}; 
+
+#line 1596 "pure2-regex.cpp2"
+  private: std::string var_regex_594 {"a\\N *c"}; 
+
+#line 1599 "pure2-regex.cpp2"
+  private: std::string var_regex_595 {"a\\N *c"}; 
+
+#line 1602 "pure2-regex.cpp2"
+  private: std::string var_regex_596 {"[a b]"}; 
+
+#line 1605 "pure2-regex.cpp2"
+  private: std::string var_regex_597 {"[a b]"}; 
+
+#line 1608 "pure2-regex.cpp2"
+  private: std::string var_regex_598 {"[a\ b]"}; 
+
+#line 1611 "pure2-regex.cpp2"
+  private: std::string var_regex_599 {"[ ^ a b ]"}; 
+
+#line 1614 "pure2-regex.cpp2"
+  private: std::string var_regex_600 {"[ ^ a b ]"}; 
+
+#line 1617 "pure2-regex.cpp2"
+  private: std::string var_regex_601 {"[ ^ a b ]"}; 
+
+#line 1620 "pure2-regex.cpp2"
+  private: std::string var_regex_602 {"(?x:[a b])"}; 
+
+#line 1623 "pure2-regex.cpp2"
+  private: std::string var_regex_603 {"(?xx:[a b])"}; 
+
+#line 1626 "pure2-regex.cpp2"
+  private: std::string var_regex_604 {"(?x)[a b]"}; 
+
+#line 1629 "pure2-regex.cpp2"
+  private: std::string var_regex_605 {"(?xx)[a b]"}; 
+
+#line 1632 "pure2-regex.cpp2"
+  private: std::string var_regex_606 {"(?-x:[a b])"}; 
+
+#line 1635 "pure2-regex.cpp2"
+  private: std::string var_regex_607 {"\\N {1}"}; 
+
+#line 1638 "pure2-regex.cpp2"
+  private: std::string var_regex_608 {"\\N {1}"}; 
+
+#line 1641 "pure2-regex.cpp2"
+  private: std::string var_regex_609 {"\\N {1}"}; 
+
+#line 1644 "pure2-regex.cpp2"
+  private: std::string var_regex_610 {"\\N {3,4}"}; 
+
+#line 1647 "pure2-regex.cpp2"
+  private: std::string var_regex_611 {"\\N {3,4}"}; 
+
+#line 1650 "pure2-regex.cpp2"
+  private: std::string var_regex_612 {"\\N {3,4}"}; 
+
+#line 1653 "pure2-regex.cpp2"
+  private: std::string var_regex_613 {"a\\N c"}; 
+
+#line 1656 "pure2-regex.cpp2"
+  private: std::string var_regex_614 {"a\\N *c"}; 
+
+#line 1659 "pure2-regex.cpp2"
+  private: std::string var_regex_615 {"a\\N *c"}; 
+
+  private: std::string var_regex_616 {"[#]"}; 
+
+  private: std::string var_regex_617 {"[#]b"}; 
+
+#line 1666 "pure2-regex.cpp2"
+  private: std::string var_regex_618 {"[#]"}; 
+
+#line 1669 "pure2-regex.cpp2"
+  private: std::string var_regex_619 {"[#]b"}; 
+
+  private: std::string var_regex_620 {"(?'n'foo) \g{n}"}; 
+
+  private: std::string var_regex_621 {"(?'n'foo) \g{ n }"}; 
+
+  private: std::string var_regex_622 {"(?'n'foo) \g{n}"}; 
+
+  private: std::string var_regex_623 {"(?foo) \g{n}"}; 
+
+  private: std::string var_regex_624 {"(?foo) \g{n}"}; 
+
+  private: std::string var_regex_625 {"(?as) (\w+) \g{as} (\w+)"}; 
+
+  private: std::string var_regex_626 {"(?'n'foo) \k"}; 
+
+  private: std::string var_regex_627 {"(?'n'foo) \k"}; 
+
+  private: std::string var_regex_628 {"(?foo) \k'n'"}; 
+
+  private: std::string var_regex_629 {"(?foo) \k'n'"}; 
+
+  private: std::string var_regex_630 {"(?'a1'foo) \k'a1'"}; 
+
+  private: std::string var_regex_631 {"(?foo) \k"}; 
+
+  private: std::string var_regex_632 {"(?'_'foo) \k'_'"}; 
+
+  private: std::string var_regex_633 {"(?<_>foo) \k<_>"}; 
+
+  private: std::string var_regex_634 {"(?'_0_'foo) \k'_0_'"}; 
+
+  private: std::string var_regex_635 {"(?<_0_>foo) \k<_0_>"}; 
+
+  private: std::string var_regex_636 {"(?as) (\w+) \k (\w+)"}; 
+
+  private: std::string var_regex_637 {"(?as) (\w+) \k{as} (\w+)"}; 
+
+  private: std::string var_regex_638 {"(?as) (\w+) \k'as' (\w+)"}; 
+
+  private: std::string var_regex_639 {"(?as) (\w+) \k{ as } (\w+)"}; 
+
+  private: std::string var_regex_640 {"^a(?#xxx){3}c"}; 
+
+#line 1714 "pure2-regex.cpp2"
+  private: std::string var_regex_641 {"^a (?#xxx) (?#yyy) {3}c"}; 
+
+  private: std::string var_regex_642 {"(?|(a))"}; 
+
+  private: std::string var_regex_643 {"(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)"}; 
+
+  private: std::string var_regex_644 {"(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)"}; 
+
+  private: std::string var_regex_645 {"(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)"}; 
+
+  private: std::string var_regex_646 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
+
+  private: std::string var_regex_647 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
+
+  private: std::string var_regex_648 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
+
+  private: std::string var_regex_649 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
+
+  private: std::string var_regex_650 {"(.)(?|(.)(.)x|(.)d)(.)"}; 
+
+  private: std::string var_regex_651 {"(\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N)"}; 
+
+  private: std::string var_regex_652 {"(?|(?x))"}; 
+
+  private: std::string var_regex_653 {"(?|(?x)|(?y))"}; 
+
+  private: std::string var_regex_654 {"(?|(?y)|(?x))"}; 
+
+  private: std::string var_regex_655 {"(?)(?|(?x))"}; 
+
+  private: std::string var_regex_656 {"foo\Kbar"}; 
+
+  private: std::string var_regex_657 {"foo\t\n\r\f\a\ebar"}; 
+
+#line 1749 "pure2-regex.cpp2"
+  private: std::string var_regex_658 {"(foo)"}; 
+
+#line 1752 "pure2-regex.cpp2"
+  private: std::string var_regex_659 {"(?-n)(foo)(?n)(bar)"}; 
+
+#line 1755 "pure2-regex.cpp2"
+  private: std::string var_regex_660 {"(?-n:(foo)(?n:(bar)))"}; 
+
+#line 1758 "pure2-regex.cpp2"
+  private: std::string var_regex_661 {"foo # Match foo"}; 
   public: auto run() const& -> void;
-  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,false,false>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::escaped_char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"">,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"">,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
+  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,false,false>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::escaped_char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_589 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_590 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_591 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_592 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_593 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_594 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_595 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_596 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_597 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_598 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_599 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_600 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_601 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_602 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_603 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_604 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_605 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_606 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_607 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_608 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_609 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_610 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_611 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_612 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_613 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_614 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_615 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_616 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_617 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_618 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_619 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_620 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_621 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_622 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_623 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_624 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_625 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_626 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_627 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_628 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_629 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_630 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_631 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_632 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_633 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_634 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_635 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_636 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_637 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_638 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_639 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_640 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_641 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_642 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_643 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_644 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_645 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_646 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_647 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_648 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_649 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_650 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_651 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_652 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_653 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_654 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_655 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_656 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_657 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_658 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::modifier_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_659 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_660 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_661 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
   public: test_general_tests() = default;
   public: test_general_tests(test_general_tests const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_general_tests const&) -> void = delete;
 
 
-#line 2151 "pure2-regex.cpp2"
+#line 2425 "pure2-regex.cpp2"
 };
 auto main(int const argc_, char** argv_) -> int;
 
@@ -1484,6 +1666,13 @@ auto main(int const argc_, char** argv_) -> int;
 
     return std::stoi(std::string(std::move(start), iter)); 
   }}; 
+  auto extract_until {[](auto& iter, cpp2::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(std::move(start), iter); 
+  }}; 
 
   auto iter {CPP2_UFCS(begin)(resultExpr)}; 
 
@@ -1504,16 +1693,28 @@ auto main(int const argc_, char** argv_) -> int;
         else {if (*cpp2::assert_not_null(next) == '-' || *cpp2::assert_not_null(next) == '+') {
           auto is_start {*cpp2::assert_not_null(next) == '-'}; 
           ++next;
-          ++next; // Skip [
-          auto group {extract_group_and_advance(next)}; 
-          ++next; // Skip ]
+          if (*cpp2::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, group);
+          }
+          else {if (*cpp2::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
 
-          if (is_start) {
-            result += std::to_string(CPP2_UFCS(group_start)(r, group));
+            if (is_start) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, group));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, group));
+            }
           }
           else {
-            result += std::to_string(CPP2_UFCS(group_end)(r, group));
-          }
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
         }
         else {if (std::isdigit(*cpp2::assert_not_null(next))) {
           auto group {extract_group_and_advance(next)}; 
@@ -1553,7 +1754,7 @@ auto main(int const argc_, char** argv_) -> int;
   return result; 
 }
 
-#line 93 "pure2-regex.cpp2"
+#line 112 "pure2-regex.cpp2"
 template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in kind, cpp2::in resultExpr, 
            cpp2::in resultExpected) -> void{
 
@@ -1566,7 +1767,7 @@ template auto test(M const& regex, cpp2::in id, cpp2::in auto test(M const& regex, cpp2::in id, cpp2::in void{
     std::cout << "Running general_tests:" << std::endl;
     test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
@@ -2184,8 +2385,81 @@ template auto test(M const& regex, cpp2::in id, cpp2::infoo) \\g{n}", "..foo foo..", "y", "$1", "foo");
+    test(regex_624, 624, "(?foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_625, 625, "(?as) (\\w+) \\g{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_626, 626, "(?'n'foo) \\k", "..foo foo..", "y", "$1", "foo");
+    test(regex_627, 627, "(?'n'foo) \\k", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_628, 628, "(?foo) \\k'n'", "..foo foo..", "y", "$1", "foo");
+    test(regex_629, 629, "(?foo) \\k'n'", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_630, 630, "(?'a1'foo) \\k'a1'", "..foo foo..", "yM", "$+{a1}", "foo");
+    test(regex_631, 631, "(?foo) \\k", "..foo foo..", "yM", "$+{a1}", "foo");
+    test(regex_632, 632, "(?'_'foo) \\k'_'", "..foo foo..", "yM", "$+{_}", "foo");
+    test(regex_633, 633, "(?<_>foo) \\k<_>", "..foo foo..", "yM", "$+{_}", "foo");
+    test(regex_634, 634, "(?'_0_'foo) \\k'_0_'", "..foo foo..", "yM", "$+{_0_}", "foo");
+    test(regex_635, 635, "(?<_0_>foo) \\k<_0_>", "..foo foo..", "yM", "$+{_0_}", "foo");
+    test(regex_636, 636, "(?as) (\\w+) \\k (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_637, 637, "(?as) (\\w+) \\k{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_638, 638, "(?as) (\\w+) \\k'as' (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_639, 639, "(?as) (\\w+) \\k{ as } (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_640, 640, "^a(?#xxx){3}c", "aaac", "y", "$&", "aaac");
+    test(regex_641, 641, "^a (?#xxx) (?#yyy) {3}c", "aaac", "y", "$&", "aaac");
+    test(regex_642, 642, "(?|(a))", "a", "y", "$1-$+", "a-a");
+    test(regex_643, 643, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "d!o!da", "y", "$1-$2-$3", "!o!-o-a");
+    test(regex_644, 644, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "aabc", "y", "$1-$2-$3", "a--c");
+    test(regex_645, 645, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "ixyjp", "y", "$1-$2-$3", "x-y-p");
+    test(regex_646, 646, "(?|(?|(a)|(b))|(?|(c)|(d)))", "a", "y", "$1", "a");
+    test(regex_647, 647, "(?|(?|(a)|(b))|(?|(c)|(d)))", "b", "y", "$1", "b");
+    test(regex_648, 648, "(?|(?|(a)|(b))|(?|(c)|(d)))", "c", "y", "$1", "c");
+    test(regex_649, 649, "(?|(?|(a)|(b))|(?|(c)|(d)))", "d", "y", "$1", "d");
+    test(regex_650, 650, "(.)(?|(.)(.)x|(.)d)(.)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
+    test(regex_651, 651, "(\\\\N)(?|(\\\\N)(\\\\N)x|(\\\\N)d)(\\\\N)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
+    test(regex_652, 652, "(?|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_653, 653, "(?|(?x)|(?y))", "x", "yM", "$+{foo}", "x");
+    test(regex_654, 654, "(?|(?y)|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_655, 655, "(?)(?|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_656, 656, "foo\\Kbar", "foobar", "y", "$&", "bar");
+    test(regex_657, 657, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
+    test(regex_658, 658, "(foo)", "foobar", "y", "$&-$1", "foo-");
+    test(regex_659, 659, "(?-n)(foo)(?n)(bar)", "foobar", "y", "$&-$1-$2", "foobar-foo-");
+    test(regex_660, 660, "(?-n:(foo)(?n:(bar)))", "foobar", "y", "$&-$1-$2", "foobar-foo-");
+    test(regex_661, 661, "foo # Match foo", "foobar", "y", "$&", "foo");
     std::cout << std::endl;
   }
 
@@ -2778,10 +3052,83 @@ template auto test(M const& regex, cpp2::in id, cpp2::in int{
     auto const args = cpp2::make_args(argc_, argv_); 
-#line 2153 "pure2-regex.cpp2"
+#line 2427 "pure2-regex.cpp2"
     CPP2_UFCS(run)(test_general_tests());
 }
 

From 8362c8d37bad79c58812774a8ee9f604e205d845 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 8 Mar 2024 13:59:04 +0100
Subject: [PATCH 077/161] Added support for \x.

---
 source/regex.h2 | 51 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 50 insertions(+), 1 deletion(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 6de9cd91d2..82f30cccc6 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -308,6 +308,14 @@ extract_position_helper:  type = {
     to_string: () -> _ = {}
 }
 
+// Helper for standard matchers with special syntax
+//
+//
+wrapped_matcher_logic:  type = {
+    this : base = ();
+    to_string: () syntax.data();
+}
+
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -1251,6 +1259,18 @@ regex_parser:  type = {
     grab_until: (inout this, in e: char, out r: std::string)               grab_until_impl(std::string(1, e), out r, false);
     grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true);
 
+    grab_n: (inout this, in n: int, out r: std::string) -> bool = {
+        if pos + n <= regex.size() {
+            r = regex.substr(pos, n);
+            pos += n - 1;
+            return true;
+        }
+        else {
+            r = "";
+            return false;
+        }
+    }
+
     grab_number: (inout this) -> std::string = {
         start := pos;
         start_search := pos;
@@ -1260,7 +1280,7 @@ regex_parser:  type = {
         end := regex.find_first_not_of("1234567890", start_search);
 
         r : std::string;
-        if end != std::string_view::npos {
+        if end != std::string::npos {
             r = regex.substr(start, end - start);
             pos = end - 1;
         }
@@ -1620,6 +1640,35 @@ regex_parser:  type = {
         else if 'K' == c_next {
             cur_state.add(create_matcher("global_group_reset", ""));
         }
+        else if 'x' == c_next {
+            if !next(out c_next) { error("x escape without number."); return false; }
+            has_brackets := false;
+            number_str: std::string = "";
+            if '{' == c_next {
+                // Bracketed
+                has_brackets = true;
+                _  = skip(); // Skip '{'
+                if !grab_until('}', out number_str) { error("No ending bracket for \\x"); return false; }
+            }
+            else {
+                // grab two chars
+
+                if !grab_n(2, out number_str) { error("Missing hexadecimal digits after \\x."); return false; }
+            }
+
+            number := 0;
+            if !string_to_int(number_str, number, 16) { error("Could not convert hexadecimal to int."); return false; }
+
+            number_as_char : char = unsafe_narrow(number);
+
+            syntax: std::string = int_to_string(number_as_char as int, 16);
+            if has_brackets {
+                syntax = "{(syntax)$}";
+            }
+            syntax = "\\x(syntax)$";
+            char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
+            cur_state.add(create_matcher("wrapped_matcher_logic", "\"(syntax)$\", (char_matcher)$"));
+        }
         else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
         else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
         else if 'B' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "true")); }

From 0a5c9a0a2b799c12f5282d09e4d3e0d116163ecc Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 8 Mar 2024 19:17:28 +0100
Subject: [PATCH 078/161] Added \000 and \o{000} handles.

---
 source/regex.h2 | 35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 82f30cccc6..8861759e1c 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1590,9 +1590,22 @@ regex_parser:  type = {
             return true;
         };
 
-        if '1' <= c_next <= '9' {
+        if '0' <= c_next <= '9' {
             group := grab_number();
-            if !add_group_matcher(group) { return false; }
+            if group.ssize() >= 3 {
+                // \000 syntax
+                number := 0;
+                if !string_to_int(group, number, 8) { error("Could not convert octal to int."); return false; }
+
+                number_as_char : char = unsafe_narrow(number);
+
+                syntax: std::string = "\\(int_to_string(number_as_char as int, 8))$";
+                char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
+                cur_state.add(create_matcher("wrapped_matcher_logic", "\"(syntax)$\", (char_matcher)$"));
+            }
+            else {
+                if !add_group_matcher(group) { return false; }
+            }
         }
         else if std::string::npos != std::string("tnrfae").find(c_next) {
             inner := create_matcher("char_matcher_logic", "'\\(c_next)$', '\\(c_next)$', '\\(c_next)$'");
@@ -1645,6 +1658,7 @@ regex_parser:  type = {
             has_brackets := false;
             number_str: std::string = "";
             if '{' == c_next {
+                // TODO: Currently does not work since the compiler handles \x also.
                 // Bracketed
                 has_brackets = true;
                 _  = skip(); // Skip '{'
@@ -1669,6 +1683,23 @@ regex_parser:  type = {
             char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
             cur_state.add(create_matcher("wrapped_matcher_logic", "\"(syntax)$\", (char_matcher)$"));
         }
+        else if 'o' == c_next {
+            if !next(out c_next) { error("o escape without bracket."); return false; }
+            number_str: std::string = "";
+            if '{' == c_next {
+                _  = skip(); // Skip '{'
+                if !grab_until('}', out number_str) { error("No ending bracket for \\o"); return false; }
+            }
+
+            number := 0;
+            if !string_to_int(number_str, number, 8) { error("Could not convert octal to int."); return false; }
+
+            number_as_char : char = unsafe_narrow(number);
+
+            syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
+            char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
+            cur_state.add(create_matcher("wrapped_matcher_logic", "\"(syntax)$\", (char_matcher)$"));
+        }
         else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
         else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
         else if 'B' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "true")); }

From 93af009a34015fe0a0fe7868a8a1909c5aa48478 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 8 Mar 2024 21:53:19 +0100
Subject: [PATCH 079/161] Added lookahead matchers.

---
 source/regex.h2 | 61 ++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 60 insertions(+), 1 deletion(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 8861759e1c..0f15db2ec1 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -545,7 +545,11 @@ group_matcher_start_logic:  std::string = {
         if group != 0 {
@@ -670,6 +674,29 @@ line_start_matcher_logic:  type =
     to_string: ()               bstring(1, '^');
 }
 
+// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
+//
+lookahead_matcher_logic:  type =
+{
+    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+        r := Pattern::match(cur, ctx, modifiers, no_tail());
+
+        if !positive {
+            r.matched = !r.matched;
+        }
+
+        if r.matched {
+            return Other::match(cur, ctx, modifiers);
+        }
+        else {
+            return match_return(false, ctx.end);
+        }
+
+    }
+    reset_ranges: (inout ctx) = { Pattern::reset_ranges(ctx); }
+    to_string: ()               "((name.data())$(Pattern::to_string())$)"
+}
+
 // Regex syntax: (?)  Example: (?i)
 //
 modifier_matcher_logic:  type =
@@ -1783,6 +1810,11 @@ regex_parser:  type = {
 
                 return true;
             }
+            else if c_next == '=' || c_next == '!' {
+                _ = skip(); // Skip '!'
+                // Positive or negative lookahead
+                return parse_lookahead("?(c_next)$", c_next == '=');
+            }
             else {
                 // Simple modifier
                 has_id = false;
@@ -1800,6 +1832,22 @@ regex_parser:  type = {
                 }
             }
         }
+        else if c_next == '*' {
+            // named pattern
+            _ = skip(); // Skip *.
+            name: std::string = "";
+            if !grab_until(':', out name) { error("Missing colon for named pattern."); return false; }
+
+            if name == "pla" || name == "positive_lookahead" {
+                return parse_lookahead("*(name)$:", true);
+            }
+            else if name == "nla" || name == "negative_lookahead" {
+                return parse_lookahead("*(name)$:", false);
+            }
+            else {
+                error("Unknown named group pattern: '(name)$'"); return false;
+            }
+        }
 
         if has_pattern {
             // regular group
@@ -1955,6 +2003,17 @@ regex_parser:  type = {
         return true;
     }
 
+    parse_lookahead: (inout this, name: std::string, positive: bool) -> bool = {
+        old_state: _ = new_state();
+        parse_until(')');
+        inner:= create_matcher_from_state();
+        restore_state(old_state);
+
+        cur_state.add(create_matcher("lookahead_matcher_logic", "(positive)$, \"(name)$\", (inner)$"));
+
+        return true;
+    }
+
     parse_until:(inout this, term: char) = {
         c: char = current();
         while c != '\n' next _ = next(out c) {

From ee5d81e468f22f270aa6ed8b16f01d9b9af93602 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 9 Mar 2024 10:36:22 +0100
Subject: [PATCH 080/161] Addes statefull match tail.

---
 source/regex.h2 | 142 +++++++++++++++++++++++++++++-------------------
 1 file changed, 87 insertions(+), 55 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 0f15db2ec1..ccffc5c06e 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -173,23 +173,55 @@ match_modifiers:  type = {
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
 //  Otherwise the matcher can try a different alternative.
 //
-matcher_list:  type = {
-    match: (cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
+match_tail:  type = {
+    match: (this, cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
 
-    match:  (cur, inout ctx, modifiers, _: matcher_list)
-        match_select(cur, ctx, modifiers);
+    // match:  (this, cur, inout ctx, modifiers, other: match_tail)
+    //     other.match_select(cur, ctx, modifiers);
 
-    private match_select:  (cur, inout ctx, modifiers)
-        First::match(cur, ctx, modifiers, matcher_list());
-    private match_select: (cur, inout ctx, modifiers) match_return(true, cur);
+    private match_select:  (this, cur, inout ctx, modifiers)
+        First::match(cur, ctx, modifiers, match_tail());
+    private match_select: (this, cur, inout ctx, modifiers) match_return(true, cur);
 
     reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
     to_string: () (bstring() + ... + List::to_string());
 
-    prepend: 
 (_ : Pre) matcher_list();
+    prepend:  (this, _...: Pre) match_tail();
+
+    make_calling:  (this, call: Call) calling_match_tail(call);
+}
+
+calling_match_tail:  type = {
+    call: Call;
+
+    operator=: (out this, call_) = {
+        call = call_;
+    }
+
+    match: (this, cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
+
+    // match:  (this, cur, inout ctx, modifiers, other: calling_match_tail)
+    //     other.match_select(cur, ctx, modifiers);
+
+    private match_select:  (this, cur, inout ctx, modifiers)
+        First::match(cur, ctx, modifiers, calling_match_tail(call));
+    private match_select: (this, cur, inout ctx, modifiers) call(cur, ctx, modifiers);
+
+    reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
+    to_string: () (bstring() + ... + List::to_string());
+
+    prepend:  (this, _...: Pre) calling_match_tail(call);
+}
+
+matcher_list:  type = {
+    match: (cur, inout ctx, modifiers, other)
+        other.prepend(List()...).match(cur, ctx, modifiers);
+
+    reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
+    to_string: () (bstring() + ... + List::to_string());
 }
 
-no_tail:  type == matcher_list;
+no_tail:  type == match_tail;
 
 //-----------------------------------------------------------------------
 //
@@ -296,8 +328,8 @@ short_not_word_class       :  type == negated_class_entry type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
-        r := Other::match(cur, ctx, modifiers);
+    match: (cur, inout ctx, modifiers, other) -> _ = {
+        r := other.match(cur, ctx, modifiers);
         if r.matched {
             ctx.set_alternative_pos(alternative, cur);
         }
@@ -322,11 +354,11 @@ wrapped_matcher_logic:  type = {
 //
 alternative_matcher_logic:  type = {
 
-    match:  (cur, inout ctx, modifiers, tail: Tail) -> _ = {
+    match: (cur, inout ctx, modifiers, tail) -> _ = {
         if constexpr greedy_alternative {
             max_overall_length: = 0;
             max_current_length: = 0;
-            r := match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
+            r := match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
             _ = max_overall_length;
             _ = max_current_length;
             return r;
@@ -338,7 +370,7 @@ alternative_matcher_logic:  type = {
     to_string: ()                   (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'.
 
     private match_first:  (cur, inout ctx, modifiers, tail) -> _ = {
-        r := First::match(cur, ctx, modifiers, tail);
+        r := First().match(cur, ctx, modifiers, tail);
         if r.matched {
             return r;
         } else {
@@ -352,8 +384,8 @@ alternative_matcher_logic:  type = {
         }
     }
 
-    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, modifiers, _: Tail) -> _ = {
-        r := First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()));
+    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, modifiers, tail) -> _ = {
+        r := First().match(cur, ctx, modifiers, tail.prepend(extract_position_helper()));
 
         // Get the end position of First.
         end_overall_pos := cur;
@@ -371,7 +403,7 @@ alternative_matcher_logic:  type = {
         // Check if someone other has something larker
         o := match_return(false, ctx.end);
         if constexpr 0 != sizeof...(Next) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, Tail());
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
         }
 
         my_current_length := unsafe_narrow(std::distance(cur, end_current_pos));
@@ -385,7 +417,7 @@ alternative_matcher_logic:  type = {
             if my_current_length == max_current_length {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx) , ...); // Reset all other ranges.
-                return First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()));
+                return First::match(cur, ctx, modifiers, tail.prepend(extract_position_helper()));
             }
             else {
                 // We are not, so there was an other match.
@@ -406,11 +438,11 @@ alternative_matcher_logic:  type = {
 //
 any_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         if cur != ctx.end &&
           (modifiers.has_flag(expression_flags::single_line) ||
            cur* != '\n') {
-            return Other::match(cur + 1, ctx, modifiers);
+            return other.match(cur + 1, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -424,7 +456,7 @@ any_matcher_logic:  type =
 // Regex syntax: none Example: -
 //
 branch_reset_matcher_logic:  type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) Other::match(cur, ctx, modifiers);
+    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
     to_string: () "(?|";
 }
@@ -433,10 +465,10 @@ branch_reset_matcher_logic:  type = {
 //
 char_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         if modifiers.has_flag(expression_flags::case_insensitive) {
             if cur != ctx.end && (cur* == L || cur* == U) {
-                return Other::match(cur + 1, ctx, modifiers);
+                return other.match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -444,7 +476,7 @@ char_matcher_logic:  type =
         }
         else {
             if cur != ctx.end && cur* == C {
-                return Other::match(cur + 1, ctx, modifiers);
+                return other.match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -461,10 +493,10 @@ char_matcher_logic:  type =
 //
 class_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         if modifiers.has_flag(expression_flags::case_insensitive) {
             if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
-                return Other::match(cur + 1, ctx, modifiers);
+                return other.match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -472,7 +504,7 @@ class_matcher_logic:  type =
         }
         else {
             if cur != ctx.end && negate != match_any(cur*) {
-                return Other::match(cur + 1, ctx, modifiers);
+                return other.match(cur + 1, ctx, modifiers);
             }
             else {
                 return match_return(false, ctx.end);
@@ -509,7 +541,7 @@ class_matcher_logic:  type =
 // Regex syntax: none Example: -
 //
 empty_matcher_logic:  type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) Other::match(cur, ctx, modifiers);
+    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
     to_string: () bstring();
 }
@@ -526,9 +558,9 @@ escaped_char_matcher_logic:  type =
 // Regex syntax: \K Example: \K
 //
 global_group_reset:  type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         ctx.set_group_start(0, cur);
-        return Other::match(cur, ctx, modifiers);
+        return other.match(cur, ctx, modifiers);
     }
 
     reset_ranges: (inout ctx) = {}
@@ -538,11 +570,11 @@ global_group_reset:  type = {
 // Regex syntax: () Example: (.*)
 //
 group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, _ : Modifiers, _ : Other) -> _ = {
+    match:  (cur, inout ctx, _ : Modifiers, other) -> _ = {
         if -1 != group {
             ctx.set_group_start(group, cur);
         }
-        return Other::match(cur, ctx, Modifiers::push(ModifierChange()));
+        return other.match(cur, ctx, Modifiers::push(ModifierChange()));
     }
 
     reset_ranges: (inout ctx) = {
@@ -575,11 +607,11 @@ group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, modifiers: Modifier, _ : Other) -> _ = {
+    match:  (cur, inout ctx, modifiers: Modifier, other) -> _ = {
         if -1 != group {
             ctx.set_group_end(group, cur);
         }
-        r := Other::match(cur, ctx, Modifier::pop());
+        r := other.match(cur, ctx, Modifier::pop());
         if !r.matched && -1 != group {
             ctx.set_group_invalid(group);
         }
@@ -599,7 +631,7 @@ group_matcher_end_logic:  type = {
 }
 
 special_group_end_logic:  type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) Other::match(cur, ctx, modifiers);
+    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
     to_string: () ")";
 }
@@ -607,7 +639,7 @@ special_group_end_logic:  type = {
 // Regex syntax: \  Example: \1
 //
 group_ref_matcher_logic:  type = {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         g := ctx.get_group(group);
 
         pos := cur;
@@ -626,7 +658,7 @@ group_ref_matcher_logic:  type = {
         }
 
         if group_pos == g.end {
-            return Other::match(pos, ctx, modifiers);
+            return other.match(pos, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -641,12 +673,12 @@ group_ref_matcher_logic:  type = {
 //
 line_end_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         if cur == ctx.end || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines) && cur* == '\n') {
-            return Other::match(cur, ctx, modifiers);
+            return other.match(cur, ctx, modifiers);
         }
         else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end.
-            return Other::match(cur, ctx, modifiers);
+            return other.match(cur, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -661,9 +693,9 @@ line_end_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         if cur == ctx.begin || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n') {
-            return Other::match(cur, ctx, modifiers);
+            return other.match(cur, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -678,7 +710,7 @@ line_start_matcher_logic:  type =
 //
 lookahead_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, modifiers, _ : Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         r := Pattern::match(cur, ctx, modifiers, no_tail());
 
         if !positive {
@@ -686,7 +718,7 @@ lookahead_matcher_logic:  ty
         }
 
         if r.matched {
-            return Other::match(cur, ctx, modifiers);
+            return other.match(cur, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -701,8 +733,8 @@ lookahead_matcher_logic:  ty
 //
 modifier_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _: Modifier, _ : Other) -> _ = {
-        return Other::match(cur, ctx, Modifier::replace(ModifierChange()));
+    match:  (cur, inout ctx, _: Modifier, other) -> _ = {
+        return other.match(cur, ctx, Modifier::replace(ModifierChange()));
     }
     reset_ranges: (inout ctx) = {}
     to_string: ()               "(?(ModifierChange::to_string())$)";
@@ -811,12 +843,12 @@ range_matcher_logic:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, _ : Other) -> match_return = {
+    private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> match_return = {
         r:= M::match(cur, ctx, modifiers, no_tail());
         if  is_below_upper_bound(count) && r.matched &&
             (is_below_lower_bound(count) || r.pos != cur)
         {
-            inner := match_greedy(count + 1, r.pos, cur, ctx, modifiers, Other());
+            inner := match_greedy(count + 1, r.pos, cur, ctx, modifiers, other);
 
             if possessive ||  // Do not backtrack if possessive.
                inner.matched {
@@ -841,7 +873,7 @@ range_matcher_logic:  (cur: Iter, inout ctx, modifiers, _ : Other) -> match_return = {
+    private match_not_greedy: (cur: Iter, inout ctx, modifiers, other) -> match_return = {
         count := 0;
         start := match_min_count(cur, ctx, modifiers, count);
         if !start.matched {
@@ -850,7 +882,7 @@ range_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, modifiers, _: Other) -> _ = {
+    match: (cur, inout ctx, modifiers, other) -> _ = {
         words : word_class = ();
         is_match := false;
         if cur == ctx.begin { // String start
@@ -912,7 +944,7 @@ word_boundary_matcher_logic:  type =
         }
 
         if is_match{
-            return Other::match(cur, ctx, modifiers);
+            return other.match(cur, ctx, modifiers);
         }
         else {
             return match_return(false, ctx.end);
@@ -1004,7 +1036,7 @@ regular_expression:  (in this, start: Iter, end: Iter) -> search_return = {
         ctx: context = (start, end);
 
-        r := Matcher::match(start, ctx, modifiers());
+        r := Matcher().match(start, ctx, modifiers(), no_tail());
         return search_return(r.matched && r.pos == end, ctx);
     }
 
@@ -1017,7 +1049,7 @@ regular_expression: ()).matched {
                 matched = true;
                 break;
             }

From a64ccfb7e29b75af84aa90106af4a8fba26768bb Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 9 Mar 2024 10:43:44 +0100
Subject: [PATCH 081/161] Helper functions for match_return creation.

---
 source/regex.h2 | 62 ++++++++++++++++++++++++++-----------------------
 1 file changed, 33 insertions(+), 29 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index ccffc5c06e..0a89c8ac42 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -18,7 +18,7 @@ regex: namespace = {
 
 greedy_alternative : bool == false;
 
-view:  type == std::basic_string_view;
+bview:  type == std::basic_string_view;
 bstring:  type == std::basic_string;
 
 //-----------------------------------------------------------------------
@@ -125,6 +125,10 @@ match_context:  type =
 
         return r;
     }
+
+    fail: (in this)            match_return(false, end);
+    pass: (in this, cur: Iter) match_return(true, cur);
+
 }
 
 match_modifiers_state_change:  type = {
@@ -181,7 +185,7 @@ match_tail:  type = {
 
     private match_select:  (this, cur, inout ctx, modifiers)
         First::match(cur, ctx, modifiers, match_tail());
-    private match_select: (this, cur, inout ctx, modifiers) match_return(true, cur);
+    private match_select: (this, cur, inout ctx, modifiers) ctx.pass(cur);
 
     reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
     to_string: () (bstring() + ... + List::to_string());
@@ -379,7 +383,7 @@ alternative_matcher_logic:  type = {
             if constexpr 0 != sizeof...(Next) {
                 return match_first(cur, ctx, modifiers, tail);
             } else {
-                return match_return(false, ctx.end);
+                return ctx.fail();
             }
         }
     }
@@ -401,7 +405,7 @@ alternative_matcher_logic:  type = {
 
 
         // Check if someone other has something larker
-        o := match_return(false, ctx.end);
+        o := ctx.fail();
         if constexpr 0 != sizeof...(Next) {
             o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
         }
@@ -445,7 +449,7 @@ any_matcher_logic:  type =
             return other.match(cur + 1, ctx, modifiers);
         }
         else {
-            return match_return(false, ctx.end);
+            return ctx.fail();
         }
     }
 
@@ -471,7 +475,7 @@ char_matcher_logic:  type =
                 return other.match(cur + 1, ctx, modifiers);
             }
             else {
-                return match_return(false, ctx.end);
+                return ctx.fail();
             }
         }
         else {
@@ -479,7 +483,7 @@ char_matcher_logic:  type =
                 return other.match(cur + 1, ctx, modifiers);
             }
             else {
-                return match_return(false, ctx.end);
+                return ctx.fail();
             }
         }
 
@@ -499,7 +503,7 @@ class_matcher_logic:  type =
                 return other.match(cur + 1, ctx, modifiers);
             }
             else {
-                return match_return(false, ctx.end);
+                return ctx.fail();
             }
         }
         else {
@@ -507,7 +511,7 @@ class_matcher_logic:  type =
                 return other.match(cur + 1, ctx, modifiers);
             }
             else {
-                return match_return(false, ctx.end);
+                return ctx.fail();
             }
         }
     }
@@ -647,12 +651,12 @@ group_ref_matcher_logic:  type = {
         while group_pos != g.end && pos != ctx.end next (group_pos++, pos++) {
             if modifiers.has_flag(expression_flags::case_insensitive) {
                 if safe_tolower(group_pos*) != safe_tolower(pos*) {
-                    return match_return(false, ctx.end);
+                    return ctx.fail();
                 }
             }
             else {
                 if group_pos* != pos* {
-                    return match_return(false, ctx.end);
+                    return ctx.fail();
                 }
             }
         }
@@ -661,7 +665,7 @@ group_ref_matcher_logic:  type = {
             return other.match(pos, ctx, modifiers);
         }
         else {
-            return match_return(false, ctx.end);
+            return ctx.fail();
         }
 
     }
@@ -681,7 +685,7 @@ line_end_matcher_logic:  type =
             return other.match(cur, ctx, modifiers);
         }
         else {
-            return match_return(false, ctx.end);
+            return ctx.fail();
         }
 
     }
@@ -721,7 +725,7 @@ lookahead_matcher_logic:  ty
             return other.match(cur, ctx, modifiers);
         }
         else {
-            return match_return(false, ctx.end);
+            return ctx.fail();
         }
 
     }
@@ -829,7 +833,7 @@ range_matcher_logic:  (cur: Iter, inout ctx, modifiers, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
-        res := match_return(true, cur);
+        res := ctx.pass(cur);
         count := 0;
 
         while is_below_lower_bound(count) && res.matched {
@@ -843,7 +847,7 @@ range_matcher_logic: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> match_return = {
+    private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> _ = {
         r:= M::match(cur, ctx, modifiers, no_tail());
         if  is_below_upper_bound(count) && r.matched &&
             (is_below_lower_bound(count) || r.pos != cur)
@@ -858,7 +862,7 @@ range_matcher_logic: (cur: Iter, inout ctx, modifiers, other) -> match_return = {
+    private match_not_greedy: (cur: Iter, inout ctx, modifiers, other) -> _ = {
         count := 0;
         start := match_min_count(cur, ctx, modifiers, count);
         if !start.matched {
@@ -889,7 +893,7 @@ range_matcher_logic: ());
             if !r.matched {
-                return match_return(false, ctx.end);
+                return ctx.fail();
             }
             count += 1;
             pos = r.pos;
@@ -947,7 +951,7 @@ word_boundary_matcher_logic:  type =
             return other.match(cur, ctx, modifiers);
         }
         else {
-            return match_return(false, ctx.end);
+            return ctx.fail();
         }
 
     }
@@ -993,7 +997,7 @@ regular_expression:  type == match_context;
     modifiers: type == match_modifiers;
 
-    private get_iter: (str: view, pos) -> _ = {
+    private get_iter: (str: bview, pos) -> _ = {
         if pos < str.size() {
             return str.begin() + pos;
         }
@@ -1030,9 +1034,9 @@ regular_expression: )                 match(str.begin(), str.end());
-    match: (in this, str: view, start)          match(get_iter(str, start), str.end());
-    match: (in this, str: view, start, length)  match(get_iter(str, start), get_iter(str, start + length));
+    match: (in this, str: bview)                 match(str.begin(), str.end());
+    match: (in this, str: bview, start)          match(get_iter(str, start), str.end());
+    match: (in this, str: bview, start, length)  match(get_iter(str, start), get_iter(str, start + length));
     match:  (in this, start: Iter, end: Iter) -> search_return = {
         ctx: context = (start, end);
 
@@ -1040,9 +1044,9 @@ regular_expression: )                 search(str.begin(), str.end());
-    search: (in this, str: view, start)          search(get_iter(str, start), str.end());
-    search: (in this, str: view, start, length)  search(get_iter(str, start), get_iter(str, start + length));
+    search: (in this, str: bview)                 search(str.begin(), str.end());
+    search: (in this, str: bview, start)          search(get_iter(str, start), str.end());
+    search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
     search:  (in this, start: Iter, end: Iter) -> search_return = {
         matched := false;
         ctx: context = (start, end);

From 46ce90b752bdbf5293ab9a17f06e7165633e86f3 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 9 Mar 2024 10:51:04 +0100
Subject: [PATCH 082/161] Refactor of matcher naming and helpers.

---
 include/string_util.h | 38 ++++++++++++++++---
 source/regex.h2       | 87 +++++++++++++++++++++++--------------------
 2 files changed, 79 insertions(+), 46 deletions(-)

diff --git a/include/string_util.h b/include/string_util.h
index dd56b85ca9..edc1c6e328 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -51,16 +51,20 @@ inline std::string trim_copy(std::string_view s) {
 template
 struct fixed_string {
     constexpr fixed_string(const CharT (&s)[N+1]) {
-        std::copy_n(s, N + 1, str);
+        std::copy_n(s, N + 1, c_str);
     }
     constexpr const CharT* data() const {
-        return str;
+        return c_str;
     }
     constexpr std::size_t size() const {
         return N;
     }
 
-    CharT str[N+1];
+    constexpr auto str() const {
+        return std::basic_string(c_str);
+    }
+
+    CharT c_str[N+1];
 };
 
 template
@@ -72,9 +76,9 @@ inline bool is_escaped(std::string_view s) {
     return s.starts_with("\"") && s.ends_with("\"");
 }
 
-inline bool string_to_int(std::string const& s, int& v) {
+inline bool string_to_int(std::string const& s, int& v, int base = 10) {
     try {
-        v = stoi(s);
+        v = stoi(s, nullptr, base);
         return true;
     }
     catch (std::invalid_argument const& ex)
@@ -87,6 +91,21 @@ inline bool string_to_int(std::string const& s, int& v) {
     }
 }
 
+inline std::string int_to_string(int i, int base = 10) {
+    if (8 == base) {
+        return std::format("{:03o}", i);
+    }
+    else if (10 == base) {
+        return std::format("{}", i);
+    }
+    else if (16 == base) {
+        return std::format("{:02x}", i);
+    }
+    else {
+        throw std::runtime_error(std::format("Base {} not implemented.", base));
+    }
+}
+
 inline char safe_toupper(char ch) {
     return static_cast(std::toupper(static_cast(ch)));
 }
@@ -94,3 +113,12 @@ inline char safe_toupper(char ch) {
 inline char safe_tolower(char ch) {
     return static_cast(std::tolower(static_cast(ch)));
 }
+
+inline std::string replace_all(std::string str, const std::string& from, const std::string& to) {
+    size_t start_pos = 0;
+    while((start_pos = str.find(from, start_pos)) != std::string::npos) {
+        str.replace(start_pos, from.length(), to);
+        start_pos += to.length(); // Handles case where 'to' is a substring of 'from'
+    }
+    return str;
+}
\ No newline at end of file
diff --git a/source/regex.h2 b/source/regex.h2
index 0a89c8ac42..bc9b6737e2 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -195,6 +195,13 @@ match_tail:  type = {
     make_calling:  (this, call: Call) calling_match_tail(call);
 }
 
+//  Represents the remainder of the regular expression. Will call a function wen the end is reached.
+//
+//  TODO: Create common base with match_tail.
+//
+//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
+//  Otherwise the matcher can try a different alternative.
+//
 calling_match_tail:  type = {
     call: Call;
 
@@ -217,14 +224,6 @@ calling_match_tail:  type = {
     prepend:  (this, _...: Pre) calling_match_tail(call);
 }
 
-matcher_list:  type = {
-    match: (cur, inout ctx, modifiers, other)
-        other.prepend(List()...).match(cur, ctx, modifiers);
-
-    reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
-    to_string: () (bstring() + ... + List::to_string());
-}
-
 no_tail:  type == match_tail;
 
 //-----------------------------------------------------------------------
@@ -323,11 +322,18 @@ short_not_word_class       :  type == negated_class_entry type = {
+    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
+    reset_ranges: (inout ctx) = {}
+    to_string: () bstring();
+}
 
 // Helper for greedy alternatives
 //
@@ -341,17 +347,35 @@ extract_position_helper:  type = {
     }
 
     reset_ranges: (inout ctx) = {}
-    to_string: () -> _ = {}
+    to_string: () bstring();
+}
+
+// A list of matchers. Prepends to the current match tail.
+//
+matcher_list:  type = {
+    match: (cur, inout ctx, modifiers, other)
+        other.prepend(List()...).match(cur, ctx, modifiers);
+
+    reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
+    to_string: () (bstring() + ... + List::to_string());
 }
 
 // Helper for standard matchers with special syntax
 //
 //
-wrapped_matcher_logic:  type = {
+special_syntax_wrapper:  type = {
     this : base = ();
-    to_string: () syntax.data();
+    to_string: () syntax.str();
 }
 
+//-----------------------------------------------------------------------
+//
+//  Matchers for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -542,23 +566,6 @@ class_matcher_logic:  type =
     }
 }
 
-// Regex syntax: none Example: -
-//
-empty_matcher_logic:  type = {
-    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
-    reset_ranges: (inout ctx) = {}
-    to_string: () bstring();
-}
-
-// Regex syntax: \  Example: \.
-//
-escaped_char_matcher_logic:  type =
-{
-    this : char_matcher_logic = ();
-
-    to_string: () "\\(C)$";
-}
-
 // Regex syntax: \K Example: \K
 //
 global_group_reset:  type = {
@@ -847,7 +854,7 @@ range_matcher_logic: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> _ = {
+    private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> match_return = {
         r:= M::match(cur, ctx, modifiers, no_tail());
         if  is_below_upper_bound(count) && r.matched &&
             (is_below_lower_bound(count) || r.pos != cur)
@@ -877,7 +884,7 @@ range_matcher_logic: (cur: Iter, inout ctx, modifiers, other) -> _ = {
+    private match_not_greedy: (cur: Iter, inout ctx, modifiers, other) -> match_return = {
         count := 0;
         start := match_min_count(cur, ctx, modifiers, count);
         if !start.matched {
@@ -1664,27 +1671,25 @@ regex_parser:  type = {
 
                 syntax: std::string = "\\(int_to_string(number_as_char as int, 8))$";
                 char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-                cur_state.add(create_matcher("wrapped_matcher_logic", "\"(syntax)$\", (char_matcher)$"));
+                cur_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
             }
             else {
                 if !add_group_matcher(group) { return false; }
             }
         }
-        else if std::string::npos != std::string("tnrfae").find(c_next) {
-            inner := create_matcher("char_matcher_logic", "'\\(c_next)$', '\\(c_next)$', '\\(c_next)$'");
-            cur_state.add(create_matcher("named_matcher_logic", "\"\\\\(c_next)$\", (inner)$"));
-        }
-        else if std::string::npos != std::string("^.[]$()*{}?+|").find(c_next) {
+        else if std::string::npos != std::string("tnrfae^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {
                 // TODO: Provide proper escape for cppfront capture
                 cur_state.add(create_matcher("line_end_matcher_logic", "true, true"));
             }
             else {
-                cur_state.add(create_matcher("escaped_char_matcher_logic", "'(c_next)$', '(safe_tolower(c_next))$', '(safe_toupper(c_next))$'"));
+                inner := create_matcher("char_matcher_logic", "'\\(c_next)$', '\\(c_next)$', '\\(c_next)$'");
+                cur_state.add(create_matcher("special_syntax_wrapper", "\"\\\\(c_next)$\", (inner)$"));
             }
         }
         else if '\\' == c_next {
-            cur_state.add(create_matcher("escaped_char_matcher_logic", "'\\\\', '\\\\', '\\\\'"));
+            inner := create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'");
+            cur_state.add(create_matcher("special_syntax_wrapper", "\"\\\\\\\\\", (inner)$"));
         }
         else if 'g' == c_next {
             if !next(out c_next) {error("Group escape without a following char."); return false; }
@@ -1744,7 +1749,7 @@ regex_parser:  type = {
             }
             syntax = "\\x(syntax)$";
             char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-            cur_state.add(create_matcher("wrapped_matcher_logic", "\"(syntax)$\", (char_matcher)$"));
+            cur_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
         }
         else if 'o' == c_next {
             if !next(out c_next) { error("o escape without bracket."); return false; }
@@ -1761,7 +1766,7 @@ regex_parser:  type = {
 
             syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
             char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-            cur_state.add(create_matcher("wrapped_matcher_logic", "\"(syntax)$\", (char_matcher)$"));
+            cur_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
         }
         else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
         else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }

From 9d3151eca8b1bb5d35302cdaab23d27b85d0eabe Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 9 Mar 2024 11:33:18 +0100
Subject: [PATCH 083/161] Cleanup of to_string.

---
 source/regex.h2 | 40 ++++++++++++++++++----------------------
 1 file changed, 18 insertions(+), 22 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index bc9b6737e2..05db15ee16 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -253,14 +253,14 @@ range_class_entry:  type =
 //
 combined_class_entry:  type = {
     includes: (c: CharT) (false || ... || List::includes(c));
-    to_string: ()        ("" + ... + List::to_string());
+    to_string: ()        (bstring() + ... + List::to_string());
 }
 
 // Class syntax:   Example: abcd
 //
 list_class_entry:  type = {
     includes: (c: CharT) (false || ... || (List == c));
-    to_string: ()        ("" + ... + List);
+    to_string: ()        (bstring() + ... + List);
 }
 
 // Class syntax: [: type = {
 //
 shorthand_class_entry:  type = {
     includes: (c: CharT) Inner::includes(c);
-    to_string: ()        bstring(Name.data());
+    to_string: ()        Name.str();
 }
 
 
@@ -486,7 +486,7 @@ any_matcher_logic:  type =
 branch_reset_matcher_logic:  type = {
     match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
-    to_string: () "(?|";
+    to_string: () bstring("(?|");
 }
 
 // Regex syntax:   Example: a
@@ -575,7 +575,7 @@ global_group_reset:  type = {
     }
 
     reset_ranges: (inout ctx) = {}
-    to_string: () "\\K";
+    to_string: () bstring("\\K");
 }
 
 // Regex syntax: () Example: (.*)
@@ -594,7 +594,7 @@ group_matcher_start_logic:  std::string = {
+    to_string: () -> bstring = {
         if group != 0 {
             if 0 != name.size() {
                 if name_brackets {
@@ -631,7 +631,7 @@ group_matcher_end_logic:  type = {
 
     reset_ranges: (inout ctx) = {}
 
-    to_string: () -> _ = {
+    to_string: () -> bstring = {
         if group != 0 {
             return ")";
         }
@@ -644,7 +644,7 @@ group_matcher_end_logic:  type = {
 special_group_end_logic:  type = {
     match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
-    to_string: () ")";
+    to_string: () bstring(")");
 }
 
 // Regex syntax: \  Example: \1
@@ -677,7 +677,7 @@ group_ref_matcher_logic:  type = {
 
     }
     reset_ranges: (inout ctx) = {}
-    to_string: ()               bstring(symbol.data());
+    to_string: ()               symbol.str();
 }
 
 // Regex syntax: $  Example: aa$
@@ -697,7 +697,7 @@ line_end_matcher_logic: ("\\$");
 }
 
 // Regex syntax: ^  Example: ^aa
@@ -754,12 +754,8 @@ modifier_matcher_logic:  type =
 // Named character classes
 //
 
-named_matcher_logic:  type = {
-    this: Base = ();
-    to_string: () bstring(Name.data());
-}
 named_class_matcher_logic:  type =  {
-    this: named_matcher_logic> = ();
+    this: special_syntax_wrapper> = ();
 }
 
 named_class_no_new_line:  type == named_class_matcher_logic>; // TODO: Remove second \, switch to raw strings.
@@ -777,9 +773,9 @@ named_class_not_ver_space :  type == named_class_matcher_logic type == named_class_matcher_logic>;
 
 // Other named matchers
-named_string_end_or_before_new_line_at_end:  type == named_matcher_logic>;
-named_string_end:  type == named_matcher_logic>;
-named_string_start:  type == named_matcher_logic>;
+named_string_end_or_before_new_line_at_end:  type == special_syntax_wrapper>;
+named_string_end:  type == special_syntax_wrapper>;
+named_string_start:  type == special_syntax_wrapper>;
 
 
 
@@ -798,7 +794,7 @@ range_matcher_logic:  bstring = {
-      r: std::string = M::to_string();
+      r: bstring = M::to_string();
 
       if min_count == max_count {
         r += "{(min_count)$}";
@@ -914,7 +910,7 @@ range_matcher_logic:  type = {
     this: range_matcher_logic = ();
-    to_string: () -> _ = {
+    to_string: () -> bstring = {
         r := M::to_string() + symbol;
         if !greedy {
             r += "?";
@@ -963,7 +959,7 @@ word_boundary_matcher_logic:  type =
 
     }
     reset_ranges: (inout ctx) = {}
-    to_string: () -> std::string = {
+    to_string: () -> bstring = {
         if negate {
             return "\\B";
         } else {
@@ -1073,7 +1069,7 @@ regular_expression:  _ = Matcher::to_string();
+    to_string: (in this) Matcher::to_string();
 }
 
 //-----------------------------------------------------------------------

From 05a632e6a5d3b6012b2615b68581b35d5350b268 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 9 Mar 2024 12:03:18 +0100
Subject: [PATCH 084/161] Matcher cleanup.

---
 source/regex.h2 | 48 ++++++++++++++++++++++++------------------------
 1 file changed, 24 insertions(+), 24 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index 05db15ee16..ac107d97df 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -131,6 +131,9 @@ match_context:  type =
 
 }
 
+// Flag change for matching modifiers. Creates a new flag for match_modifiers.
+// See expression_flags for possible flags.
+//
 match_modifiers_state_change:  type = {
 
     reset: bool == reset_;
@@ -154,6 +157,9 @@ match_modifiers_state_change: ;
 
+// Current modifiers for the regular expression.
+// See expression_flags for possible flags.
+//
 match_modifiers:  type = {
 
     flags : int == flags_;
@@ -180,9 +186,6 @@ match_modifiers:  type = {
 match_tail:  type = {
     match: (this, cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
 
-    // match:  (this, cur, inout ctx, modifiers, other: match_tail)
-    //     other.match_select(cur, ctx, modifiers);
-
     private match_select:  (this, cur, inout ctx, modifiers)
         First::match(cur, ctx, modifiers, match_tail());
     private match_select: (this, cur, inout ctx, modifiers) ctx.pass(cur);
@@ -211,9 +214,6 @@ calling_match_tail:  type = {
 
     match: (this, cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
 
-    // match:  (this, cur, inout ctx, modifiers, other: calling_match_tail)
-    //     other.match_select(cur, ctx, modifiers);
-
     private match_select:  (this, cur, inout ctx, modifiers)
         First::match(cur, ctx, modifiers, calling_match_tail(call));
     private match_select: (this, cur, inout ctx, modifiers) call(cur, ctx, modifiers);
@@ -330,9 +330,9 @@ short_not_word_class       :  type == negated_class_entry type = {
-    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
+    match:        (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
-    to_string: () bstring();
+    to_string:    () bstring();
 }
 
 // Helper for greedy alternatives
@@ -347,7 +347,7 @@ extract_position_helper:  type = {
     }
 
     reset_ranges: (inout ctx) = {}
-    to_string: () bstring();
+    to_string:    () bstring();
 }
 
 // A list of matchers. Prepends to the current match tail.
@@ -357,7 +357,7 @@ matcher_list:  type = {
         other.prepend(List()...).match(cur, ctx, modifiers);
 
     reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
-    to_string: () (bstring() + ... + List::to_string());
+    to_string:    () (bstring() + ... + List::to_string());
 }
 
 // Helper for standard matchers with special syntax
@@ -365,7 +365,7 @@ matcher_list:  type = {
 //
 special_syntax_wrapper:  type = {
     this : base = ();
-    to_string: () syntax.str();
+    to_string:    () syntax.str();
 }
 
 //-----------------------------------------------------------------------
@@ -478,7 +478,7 @@ any_matcher_logic:  type =
     }
 
     reset_ranges: (inout ctx) = {}
-    to_string: ()               bstring(1, '.');
+    to_string:    ()          bstring(1, '.');
 }
 
 // Regex syntax: none Example: -
@@ -486,7 +486,7 @@ any_matcher_logic:  type =
 branch_reset_matcher_logic:  type = {
     match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
-    to_string: () bstring("(?|");
+    to_string:    ()          bstring("(?|");
 }
 
 // Regex syntax:   Example: a
@@ -513,7 +513,7 @@ char_matcher_logic:  type =
 
     }
     reset_ranges: (inout ctx) = {}
-    to_string: ()               bstring(1, C);
+    to_string:    ()          bstring(1, C);
 }
 
 
@@ -575,7 +575,7 @@ global_group_reset:  type = {
     }
 
     reset_ranges: (inout ctx) = {}
-    to_string: () bstring("\\K");
+    to_string:    ()          bstring("\\K");
 }
 
 // Regex syntax: () Example: (.*)
@@ -644,7 +644,7 @@ group_matcher_end_logic:  type = {
 special_group_end_logic:  type = {
     match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
     reset_ranges: (inout ctx) = {}
-    to_string: () bstring(")");
+    to_string:    ()          bstring(")");
 }
 
 // Regex syntax: \  Example: \1
@@ -677,7 +677,7 @@ group_ref_matcher_logic:  type = {
 
     }
     reset_ranges: (inout ctx) = {}
-    to_string: ()               symbol.str();
+    to_string:    ()          symbol.str();
 }
 
 // Regex syntax: $  Example: aa$
@@ -697,7 +697,7 @@ line_end_matcher_logic: ("\\$");
+    to_string:    ()          bstring("\\$");
 }
 
 // Regex syntax: ^  Example: ^aa
@@ -714,7 +714,7 @@ line_start_matcher_logic:  type =
 
     }
     reset_ranges: (inout ctx) = {}
-    to_string: ()               bstring(1, '^');
+    to_string:    ()          bstring(1, '^');
 }
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -737,7 +737,7 @@ lookahead_matcher_logic:  ty
 
     }
     reset_ranges: (inout ctx) = { Pattern::reset_ranges(ctx); }
-    to_string: ()               "((name.data())$(Pattern::to_string())$)"
+    to_string:    ()          "((name.data())$(Pattern::to_string())$)";
 }
 
 // Regex syntax: (?)  Example: (?i)
@@ -748,7 +748,7 @@ modifier_matcher_logic:  type =
         return other.match(cur, ctx, Modifier::replace(ModifierChange()));
     }
     reset_ranges: (inout ctx) = {}
-    to_string: ()               "(?(ModifierChange::to_string())$)";
+    to_string:    ()          "(?(ModifierChange::to_string())$)";
 }
 
 // Named character classes
@@ -773,8 +773,8 @@ named_class_not_ver_space :  type == named_class_matcher_logic type == named_class_matcher_logic>;
 
 // Other named matchers
-named_string_end_or_before_new_line_at_end:  type == special_syntax_wrapper>;
-named_string_end:  type == special_syntax_wrapper>;
+named_string_end_or_before_new_line_at_end:  type  == special_syntax_wrapper>;
+named_string_end:  type   == special_syntax_wrapper>;
 named_string_start:  type == special_syntax_wrapper>;
 
 
@@ -959,7 +959,7 @@ word_boundary_matcher_logic:  type =
 
     }
     reset_ranges: (inout ctx) = {}
-    to_string: () -> bstring = {
+    to_string:    () -> bstring = {
         if negate {
             return "\\B";
         } else {

From 210f2a1d1c2eb3744d1748d0f700befe804b30cf Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 9 Mar 2024 12:21:37 +0100
Subject: [PATCH 085/161] Parser refactor.

---
 source/regex.h2 | 357 ++++++++++++++++++++++++------------------------
 1 file changed, 176 insertions(+), 181 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index ac107d97df..049d54f4e0 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -978,14 +978,14 @@ word_boundary_matcher_logic:  type =
 
 // Helper for named groups.
 
-group_name_list:  type = {
+group_name_list:  type = {
 
-    get_group_id: (name) -> int = {
-        if name == Name.data() {
+    get_group_id: (g) -> int = {
+        if g == name.str() {
             return group_id;
         }
         else {
-            return Inner::get_group_id(name);
+            return Inner::get_group_id(g);
         }
     }
 }
@@ -998,16 +998,7 @@ group_name_list_end: type = {
 regular_expression:  type = {
 
     context:  type == match_context;
-    modifiers: type == match_modifiers;
-
-    private get_iter: (str: bview, pos) -> _ = {
-        if pos < str.size() {
-            return str.begin() + pos;
-        }
-        else {
-            return str.end();
-        }
-    }
+    modifiers: type      == match_modifiers;
 
     // TODO: Named multiple return has problems with templates.
     search_return:  type = {
@@ -1070,6 +1061,18 @@ regular_expression: , pos) -> _ = {
+        if pos < str.size() {
+            return str.begin() + pos;
+        }
+        else {
+            return str.end();
+        }
+    }
 }
 
 //-----------------------------------------------------------------------
@@ -1079,18 +1082,21 @@ regular_expression: )'
+regex_parser_group_state: @struct type = {
 
     // Current list of matchers
     cur_match_list: std::vector = ();
 
-    /// List of alternate matcher lists. E.g. ab|cd|xy
+    // List of alternate matcher lists. E.g. ab|cd|xy
     alternate_match_lists: std::vector> = ();
 
     modifiers : regex_parser_modifier_state = ();
@@ -1101,7 +1107,7 @@ regex_parser_state: @struct type = {
         _ = alternate_match_lists.insert(alternate_match_lists.end(), new_list);
     }
 
-    swap: (inout this, inout t: regex_parser_state) = {
+    swap: (inout this, inout t: regex_parser_group_state) = {
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
@@ -1119,6 +1125,7 @@ regex_parser_state: @struct type = {
     empty: (this) -> bool = cur_match_list.empty();
 }
 
+// State for the branch reset. Takes care of the group numbering. See '(|)'.
 regex_branch_reset_state: @struct type = {
     is_active : bool = false;
     cur_group : int  = 1; // Global capture group.
@@ -1145,22 +1152,20 @@ regex_branch_reset_state: @struct type = {
     }
 }
 
-
+// Parser and generator for regular expressions.
 regex_parser:  type = {
 
-    regex: std::string_view;
-    modifier: std::string_view;
-    cur_state: regex_parser_state = ();
-    cur_branch_reset_state: regex_branch_reset_state = ();
-    pos: size_t = 0;
-
-    alternatives_count: int = 0;
-
-    named_groups : std::map = ();
-
-    has_error: bool = false;
+    regex:     std::string_view;
+    modifier:  std::string_view;
     error_out: Error_out;
 
+    cur_group_state:        regex_parser_group_state = ();
+    cur_branch_reset_state: regex_branch_reset_state = ();
+    pos:                    size_t = 0;
+    alternatives_count:     int = 0;
+    named_groups :          std::map = ();
+    has_error:              bool = false;
+
     supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit");
 
@@ -1172,21 +1177,21 @@ regex_parser:  type = {
 
     // State management functions
     //
-    new_state: (inout this) -> regex_parser_state = {
-        old_state: regex_parser_state = ();
-        old_state.swap(cur_state);
+    group_new_state: (inout this) -> regex_parser_group_state = {
+        old_state: regex_parser_group_state = ();
+        old_state.swap(cur_group_state);
 
         return old_state;
     }
 
-    restore_state: (inout this, old_state: regex_parser_state) = {
-        cur_state = old_state;
+    group_restore_state: (inout this, old_state: regex_parser_group_state) = {
+        cur_group_state = old_state;
     }
 
     // Branch reset management functions
     //
 
-    group_new_state: (inout this) -> regex_branch_reset_state = {
+    branch_reset_new_state: (inout this) -> regex_branch_reset_state = {
         old_state: regex_branch_reset_state = ();
         std::swap(old_state, cur_branch_reset_state);
 
@@ -1198,7 +1203,7 @@ regex_parser:  type = {
         return old_state;
     }
 
-    group_restore_state: (inout this, old_state: regex_branch_reset_state) = {
+    branch_reset_restore_state: (inout this, old_state: regex_branch_reset_state) = {
         next_group := cur_branch_reset_state.max_group;
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(next_group);
@@ -1211,10 +1216,10 @@ regex_parser:  type = {
         perl_syntax := false;
         if !no_skip {
             if in_class {
-                perl_syntax = cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes;
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
             }
             else {
-                perl_syntax = cur_state.modifiers.perl_code_syntax;
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
             }
         }
         cur := pos + 1;
@@ -1364,6 +1369,24 @@ regex_parser:  type = {
         has_error = true;
     }
 
+    join: (list, func) -> std::string = {
+        r: std::string = "";
+
+        separator: std::string = "";
+        for list do (cur) {
+            r += separator + func(cur);
+            separator = ", ";
+        }
+
+        return r;
+    }
+
+    join: (list: std::vector) join(list, :(arg) -> _ == arg); // Todo: Shorthand syntax for const lambda
+
+
+    // Creator functions for matchers.
+    //
+
     create_matcher: (in this, name: std::string, template_arguments: std::string) -> _ = {
         sep := ", ";
         if template_arguments.empty() { sep = ""; }
@@ -1374,28 +1397,22 @@ regex_parser:  type = {
     create_matcher_from_list: (inout this, list) create_matcher("matcher_list", join(list));
 
     create_matcher_from_state: (inout this) -> std::string = {
-        if 0 == cur_state.alternate_match_lists.size() { return create_matcher_from_list(cur_state.cur_match_list); }
+        if 0 == cur_group_state.alternate_match_lists.size() { return create_matcher_from_list(cur_group_state.cur_match_list); }
 
-        if 0 == cur_state.cur_match_list.size() {
-            cur_state.add(create_matcher("empty_matcher_logic", ""));
+        if 0 == cur_group_state.cur_match_list.size() {
+            cur_group_state.add(create_matcher("empty_matcher_logic", ""));
         }
-        cur_state.next_alternative();
+        cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
 
-        list: std::string = "";
-        separator: std::string = "";
-        for cur_state.alternate_match_lists do (cur) {
-            list += separator + create_matcher_from_list(cur);
-            separator = ", ";
-        }
-
+        list := join(cur_group_state.alternate_match_lists, :(arg) -> _ == create_matcher_from_list(arg));
         alternative_id := alternatives_count;
         alternatives_count += 1;
 
         return create_matcher("alternative_matcher_logic", "(alternative_id)$, (list)$");
     }
 
-    create_named_groups_arg: (in this) -> std::string = {
+    create_named_groups_list: (in this) -> std::string = {
         r : std::string = "::cpp2::regex::group_name_list_end";
 
         for named_groups do (cur) {
@@ -1405,19 +1422,56 @@ regex_parser:  type = {
         return r;
     }
 
-    join: (list: std::vector) -> std::string = {
-        r: std::string = "";
+    // Parser helper functions.
 
-        separator: std::string = "";
-        for list do (cur) {
-            r += separator + cur;
-            separator = ", ";
+    parse_lookahead: (inout this, name: std::string, positive: bool) -> bool = {
+        old_state: _ = group_new_state();
+        parse_until(')');
+        inner:= create_matcher_from_state();
+        group_restore_state(old_state);
+
+        cur_group_state.add(create_matcher("lookahead_matcher_logic", "(positive)$, \"(name)$\", (inner)$"));
+
+        return true;
+    }
+
+    parser_expression_modifiers: (inout this) -> std::string = {
+        r: std::string = "0";
+        sep: std::string = " | ";
+
+        add := :(name, inout r) = {
+            r += "(sep$)$(name)$";
+        };
+
+        mod_pos := 0;
+        while mod_pos < modifier.ssize() next mod_pos += 1 {
+            c: char = modifier[mod_pos];
+
+            if      c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            else if c == 'm' { add("::cpp2::regex::expression_flags::multiple_lines", r); }
+            else if c == 's' { add("::cpp2::regex::expression_flags::single_line", r); }
+            else if c == 'n' {
+                add("::cpp2::regex::expression_flags::no_group_captures", r);
+                cur_group_state.modifiers.group_captures_have_numbers = false;
+            }
+            else if c == 'x' {
+                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
+                cur_group_state.modifiers.perl_code_syntax = true;
+
+                // Check if we have 'xx'
+                mod_pos += 1;
+                if mod_pos < modifier.ssize() && 'x' == modifier[mod_pos] {
+                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
+                    cur_group_state.modifiers.perl_code_syntax_in_classes = true;
+                }
+            }
+            else { error("Unknown modifier: '(c)$'"); }
         }
 
         return r;
     }
 
-    parse_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
+    parser_group_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
                       inout parser_modifiers: regex_parser_modifier_state) -> bool = {
         is_negative := false;
         is_reset    := false;
@@ -1488,18 +1542,18 @@ regex_parser:  type = {
     is_alternative: (inout this, c: char) -> bool = {
         if c != '|' { return false; }
 
-        cur_state.next_alternative();
+        cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
         return true;
     }
 
     is_anchor: (inout this, c: char) -> bool = {
         if c == '^' {
-            cur_state.add(create_matcher("line_start_matcher_logic", "true"));
+            cur_group_state.add(create_matcher("line_start_matcher_logic", "true"));
             return true;
         }
         else if c == '$' {
-            cur_state.add(create_matcher("line_end_matcher_logic", "true, true"));
+            cur_group_state.add(create_matcher("line_end_matcher_logic", "true, true"));
             return true;
         }
 
@@ -1507,11 +1561,11 @@ regex_parser:  type = {
     }
 
     is_any: (inout this, c: char) -> bool = {
-        if c == '.' {
-            cur_state.add(create_matcher("any_matcher_logic", ""));
-            return true;
-        }
-        return false;
+        if c != '.' { return false; }
+
+        cur_group_state.add(create_matcher("any_matcher_logic", ""));
+        return true;
+
     }
 
     is_class: (inout this, c: char) -> bool = {
@@ -1532,7 +1586,7 @@ regex_parser:  type = {
             }
             if c_cur == '[' && peek_in_class() == ':' {
                 // We have a character class.
-                _ = skip_n(2);
+                _ = skip_n(2);  // Skip [:
 
                 name: std::string = "";
                 if !grab_until(":]", out name) { error("Could not find end of character class."); return false; }
@@ -1547,7 +1601,7 @@ regex_parser:  type = {
             }
             else if c_cur == '\\' {
                 if next_no_skip(out c_cur)  && (c_cur != ']') {
-                    if  ' ' == c_cur && cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes {
+                    if  ' ' == c_cur && cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes {
                         classes.push_back(std::string(1, c_cur)); // TODO: UFCS error with char as argument.
                     }
                     else {
@@ -1617,7 +1671,7 @@ regex_parser:  type = {
         }
 
         inner := join(classes);
-        cur_state.add(create_matcher("class_matcher_logic", "(negate)$, (inner)$"));
+        cur_group_state.add(create_matcher("class_matcher_logic", "(negate)$, (inner)$"));
         return true;
     }
 
@@ -1651,7 +1705,7 @@ regex_parser:  type = {
 
                 group_id = iter*.second;
             }
-            cur_state.add(create_matcher("group_ref_matcher_logic", "(group_id)$, \"\\(regex.substr(start$, pos&$* - start$ + 1))$\""));
+            cur_group_state.add(create_matcher("group_ref_matcher_logic", "(group_id)$, \"\\(regex.substr(start$, pos&$* - start$ + 1))$\""));
 
             return true;
         };
@@ -1667,7 +1721,7 @@ regex_parser:  type = {
 
                 syntax: std::string = "\\(int_to_string(number_as_char as int, 8))$";
                 char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-                cur_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
+                cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
             }
             else {
                 if !add_group_matcher(group) { return false; }
@@ -1676,16 +1730,16 @@ regex_parser:  type = {
         else if std::string::npos != std::string("tnrfae^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {
                 // TODO: Provide proper escape for cppfront capture
-                cur_state.add(create_matcher("line_end_matcher_logic", "true, true"));
+                cur_group_state.add(create_matcher("line_end_matcher_logic", "true, true"));
             }
             else {
                 inner := create_matcher("char_matcher_logic", "'\\(c_next)$', '\\(c_next)$', '\\(c_next)$'");
-                cur_state.add(create_matcher("special_syntax_wrapper", "\"\\\\(c_next)$\", (inner)$"));
+                cur_group_state.add(create_matcher("special_syntax_wrapper", "\"\\\\(c_next)$\", (inner)$"));
             }
         }
         else if '\\' == c_next {
             inner := create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'");
-            cur_state.add(create_matcher("special_syntax_wrapper", "\"\\\\\\\\\", (inner)$"));
+            cur_group_state.add(create_matcher("special_syntax_wrapper", "\"\\\\\\\\\", (inner)$"));
         }
         else if 'g' == c_next {
             if !next(out c_next) {error("Group escape without a following char."); return false; }
@@ -1715,7 +1769,7 @@ regex_parser:  type = {
             if !add_group_matcher(group) { return false; }
         }
         else if 'K' == c_next {
-            cur_state.add(create_matcher("global_group_reset", ""));
+            cur_group_state.add(create_matcher("global_group_reset", ""));
         }
         else if 'x' == c_next {
             if !next(out c_next) { error("x escape without number."); return false; }
@@ -1745,7 +1799,7 @@ regex_parser:  type = {
             }
             syntax = "\\x(syntax)$";
             char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-            cur_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
+            cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
         }
         else if 'o' == c_next {
             if !next(out c_next) { error("o escape without bracket."); return false; }
@@ -1762,24 +1816,24 @@ regex_parser:  type = {
 
             syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
             char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-            cur_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
-        }
-        else if 'A' == c_next { cur_state.add(create_matcher("named_string_start", "")); }
-        else if 'b' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
-        else if 'B' == c_next { cur_state.add(create_matcher("word_boundary_matcher_logic", "true")); }
-        else if 'd' == c_next { cur_state.add(create_matcher("named_class_digits", "")); }
-        else if 'D' == c_next { cur_state.add(create_matcher("named_class_not_digits", "")); }
-        else if 'h' == c_next { cur_state.add(create_matcher("named_class_hor_space", "")); }
-        else if 'H' == c_next { cur_state.add(create_matcher("named_class_not_hor_space", "")); }
-        else if 'N' == c_next { cur_state.add(create_matcher("named_class_no_new_line", "")); }
-        else if 's' == c_next { cur_state.add(create_matcher("named_class_space", "")); }
-        else if 'S' == c_next { cur_state.add(create_matcher("named_class_not_space", "")); }
-        else if 'v' == c_next { cur_state.add(create_matcher("named_class_ver_space", "")); }
-        else if 'V' == c_next { cur_state.add(create_matcher("named_class_not_ver_space", "")); }
-        else if 'w' == c_next { cur_state.add(create_matcher("named_class_word", "")); }
-        else if 'W' == c_next { cur_state.add(create_matcher("named_class_not_word", "")); }
-        else if 'Z' == c_next { cur_state.add(create_matcher("named_string_end_or_before_new_line_at_end", "")); }
-        else if 'z' == c_next { cur_state.add(create_matcher("named_string_end", "")); }
+            cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
+        }
+        else if 'A' == c_next { cur_group_state.add(create_matcher("named_string_start", "")); }
+        else if 'b' == c_next { cur_group_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
+        else if 'B' == c_next { cur_group_state.add(create_matcher("word_boundary_matcher_logic", "true")); }
+        else if 'd' == c_next { cur_group_state.add(create_matcher("named_class_digits", "")); }
+        else if 'D' == c_next { cur_group_state.add(create_matcher("named_class_not_digits", "")); }
+        else if 'h' == c_next { cur_group_state.add(create_matcher("named_class_hor_space", "")); }
+        else if 'H' == c_next { cur_group_state.add(create_matcher("named_class_not_hor_space", "")); }
+        else if 'N' == c_next { cur_group_state.add(create_matcher("named_class_no_new_line", "")); }
+        else if 's' == c_next { cur_group_state.add(create_matcher("named_class_space", "")); }
+        else if 'S' == c_next { cur_group_state.add(create_matcher("named_class_not_space", "")); }
+        else if 'v' == c_next { cur_group_state.add(create_matcher("named_class_ver_space", "")); }
+        else if 'V' == c_next { cur_group_state.add(create_matcher("named_class_not_ver_space", "")); }
+        else if 'w' == c_next { cur_group_state.add(create_matcher("named_class_word", "")); }
+        else if 'W' == c_next { cur_group_state.add(create_matcher("named_class_not_word", "")); }
+        else if 'Z' == c_next { cur_group_state.add(create_matcher("named_string_end_or_before_new_line_at_end", "")); }
+        else if 'z' == c_next { cur_group_state.add(create_matcher("named_string_end", "")); }
         else {
             error("Unknown escape.");
             return false;
@@ -1791,13 +1845,13 @@ regex_parser:  type = {
     is_group: (inout this, c: char) -> bool = {
         if c != '(' { return false; }
 
-        has_id := cur_state.modifiers.group_captures_have_numbers;
+        has_id := cur_group_state.modifiers.group_captures_have_numbers;
         has_pattern := true;
         group_name : std::string = "";
         group_name_brackets := true;
         modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
 
-        modifiers_change_to : = cur_state.modifiers;
+        modifiers_change_to : = cur_group_state.modifiers;
 
         c_next : char = '\0';
         // Skip the '('
@@ -1832,18 +1886,18 @@ regex_parser:  type = {
 
                 if !next(out c_next) /* skip '|' */ { error("Missing ending bracket for named group."); return false; }
 
-                old_parser_state: _ = new_state();
-                old_branch_state: _ = group_new_state();
+                old_parser_state: _ = group_new_state();
+                old_branch_state: _ = branch_reset_new_state();
                 parse_until(')');
                 inner:= create_matcher_from_state();
-                group_restore_state(old_branch_state);
-                restore_state(old_parser_state);
+                branch_reset_restore_state(old_branch_state);
+                group_restore_state(old_parser_state);
 
                 start_matcher := create_matcher("branch_reset_matcher_logic", "");
                 end_matcher := create_matcher("special_group_end_logic", "");
 
                 v: std::vector = (start_matcher, inner, end_matcher);
-                cur_state.add(create_matcher_from_list(v));
+                cur_group_state.add(create_matcher_from_list(v));
 
                 return true;
             }
@@ -1857,7 +1911,7 @@ regex_parser:  type = {
                 has_id = false;
                 change_str : std::string = "";
                 if !grab_until_one_of("):", out change_str) { error("Missing ending bracket for group."); return false; }
-                if !parse_modifiers(change_str, out modifier_change, modifiers_change_to) {
+                if !parser_group_modifiers(change_str, out modifier_change, modifiers_change_to) {
                      return false;
                 }
 
@@ -1894,11 +1948,11 @@ regex_parser:  type = {
                 group_number = cur_branch_reset_state.next();
             }
 
-            old_state: _ = new_state();
-            cur_state.modifiers = modifiers_change_to;
+            old_state: _ = group_new_state();
+            cur_group_state.modifiers = modifiers_change_to;
             parse_until(')');
             inner:= create_matcher_from_state();
-            restore_state(old_state);
+            group_restore_state(old_state);
 
             start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, (modifier_change)$, \"(group_name)$\", (group_name_brackets)$");
             if 0 != group_name.size() {
@@ -1909,40 +1963,28 @@ regex_parser:  type = {
             end_matcher := create_matcher("group_matcher_end_logic", "(group_number)$");
 
             v: std::vector = (start_matcher, inner, end_matcher);
-            cur_state.add(create_matcher_from_list(v));
+            cur_group_state.add(create_matcher_from_list(v));
         }
         else {
             // Only a modifier
-            cur_state.modifiers = modifiers_change_to;
-            cur_state.add(create_matcher("modifier_matcher_logic", "(modifier_change)$"));
+            cur_group_state.modifiers = modifiers_change_to;
+            cur_group_state.add(create_matcher("modifier_matcher_logic", "(modifier_change)$"));
         }
 
         return true;
     }
 
     is_handle_special: (inout this, c: char) -> bool = {
-        if c == '\'' {
-            cur_state.add(create_matcher("char_matcher_logic", "'\\(c)$', '\\(c)$', '\\(c)$'"));
-            return true;
-        }
+        if c != '\'' { return false; }
 
-        return false;
+        cur_group_state.add(create_matcher("char_matcher_logic", "'\\(c)$', '\\(c)$', '\\(c)$'"));
+        return true;
     }
 
     is_range: (inout this, c: char) -> bool = {
 
-        to_int := :(str) -> int = {
-            // TODO: Add exception handling.
-            // try {
-                return std::stoi(str);
-            // } catch (_) {
-            //     error("Could not convert range argument '(inner)$' to int.");
-            // }
-            // return 0;
-        };
-
         if c != '{' { return false; }
-        if cur_state.empty() { error("'{' without previous element.");  return false; }
+        if cur_group_state.empty() { error("'{' without previous element.");  return false; }
         if !skip() { error("End of regex before closing '}'."); return false; }
 
         inner: std::string = "";
@@ -1971,7 +2013,7 @@ regex_parser:  type = {
         if sep == std::string::npos {
             min_count = inner;
             max_count = inner;
-            min_count_number = to_int(inner);
+            if !string_to_int(inner, min_count_number) { error("Could not convert range to number."); return false; }
             max_count_number = min_count_number;
         }
         else {
@@ -1985,11 +2027,11 @@ regex_parser:  type = {
 
             if !inner_first.empty() {
                 min_count = inner_first;
-                min_count_number = to_int(inner_first);
+                if !string_to_int(inner, min_count_number) { error("Could not convert range to number."); return false; }
             }
             if !inner_last.empty() {
                 max_count = inner_last;
-                max_count_number = to_int(inner_last);
+                if !string_to_int(inner, max_count_number) { error("Could not convert range to number."); return false; }
             }
         }
 
@@ -1998,7 +2040,7 @@ regex_parser:  type = {
             return false;
         }
 
-        cur_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$, (greedy)$, (possessive)$"));
+        cur_group_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$, (greedy)$, (possessive)$"));
 
         return true;
     }
@@ -2031,23 +2073,12 @@ regex_parser:  type = {
             _ = skip();
         }
 
-        if cur_state.empty() {
+        if cur_group_state.empty() {
             error("'(c)$' without previous element.");
             return false;
         }
 
-        cur_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, (greedy)$, (possessive)$, '(c$)$'"));
-        return true;
-    }
-
-    parse_lookahead: (inout this, name: std::string, positive: bool) -> bool = {
-        old_state: _ = new_state();
-        parse_until(')');
-        inner:= create_matcher_from_state();
-        restore_state(old_state);
-
-        cur_state.add(create_matcher("lookahead_matcher_logic", "(positive)$, \"(name)$\", (inner)$"));
-
+        cur_group_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, (greedy)$, (possessive)$, '(c$)$'"));
         return true;
     }
 
@@ -2069,53 +2100,17 @@ regex_parser:  type = {
             if has_error { return; }
 
             // No special char, push a character match
-            cur_state.add(create_matcher("char_matcher_logic", "'(c)$', '(safe_tolower(c))$', '(safe_toupper(c))$'"));
-        }
-    }
-
-    parse_modifier: (inout this) -> std::string = {
-        r: std::string = "0";
-        sep: std::string = " | ";
-
-        add := :(name, inout r) = {
-            r += "(sep$)$(name)$";
-        };
-
-        mod_pos := 0;
-        while mod_pos < modifier.ssize() next mod_pos += 1 {
-            c: char = modifier[mod_pos];
-
-            if      c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
-            else if c == 'm' { add("::cpp2::regex::expression_flags::multiple_lines", r); }
-            else if c == 's' { add("::cpp2::regex::expression_flags::single_line", r); }
-            else if c == 'n' {
-                add("::cpp2::regex::expression_flags::no_group_captures", r);
-                cur_state.modifiers.group_captures_have_numbers = false;
-            }
-            else if c == 'x' {
-                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
-                cur_state.modifiers.perl_code_syntax = true;
-
-                // Check if we have 'xx'
-                mod_pos += 1;
-                if mod_pos < modifier.ssize() && 'x' == modifier[mod_pos] {
-                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
-                    cur_state.modifiers.perl_code_syntax_in_classes = true;
-                }
-            }
-            else { error("Unknown modifier: '(c)$'"); }
+            cur_group_state.add(create_matcher("char_matcher_logic", "'(c)$', '(safe_tolower(c))$', '(safe_toupper(c))$'"));
         }
-
-        return r;
     }
 
     parse:(inout this) -> std::string = {
-        mod   := parse_modifier();
+        mod   := parser_expression_modifiers();
         parse_until('\0');
 
         if has_error { return "Error"; }
 
-        named_groups_arg := create_named_groups_arg();
+        named_groups_arg := create_named_groups_list();
         inner := create_matcher_from_state();
         start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false");
         end   := create_matcher("group_matcher_end_logic", "0");

From 86fa6e9250b4d266e94a41831ce6fe557c7ba576 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 9 Mar 2024 13:45:57 +0100
Subject: [PATCH 086/161] Header update and tests update.

---
 include/cpp2regex.h                           | 1623 ++++++++++-------
 regression-tests/pure2-regex.cpp2             |  159 +-
 .../gcc-13/pure2-regex.cpp.execution          |   81 +-
 .../gcc-13/pure2-regex.cpp.output             |   11 +
 regression-tests/test-results/pure2-regex.cpp |  240 ++-
 5 files changed, 1408 insertions(+), 706 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 979976a321..bc18e09c28 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -29,141 +29,148 @@ template class match_return;
 #line 52 "regex.h2"
 template class match_context;
 
-#line 130 "regex.h2"
+#line 137 "regex.h2"
 template class match_modifiers_state_change;
 
-#line 153 "regex.h2"
+#line 163 "regex.h2"
 template class match_modifiers;
 
-#line 176 "regex.h2"
-template class matcher_list;
+#line 186 "regex.h2"
+template class match_tail;
+    
+
+#line 208 "regex.h2"
+template class calling_match_tail;
     
 
-#line 203 "regex.h2"
+#line 238 "regex.h2"
 template class single_class_entry;
 
-#line 211 "regex.h2"
+#line 246 "regex.h2"
 template class range_class_entry;
 
-#line 219 "regex.h2"
+#line 254 "regex.h2"
 template class combined_class_entry;
     
 
-#line 226 "regex.h2"
+#line 261 "regex.h2"
 template class list_class_entry;
     
 
-#line 233 "regex.h2"
+#line 268 "regex.h2"
 template class named_class_entry;
     
 
-#line 238 "regex.h2"
+#line 273 "regex.h2"
 template class negated_class_entry;
     
 
-#line 245 "regex.h2"
+#line 280 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 298 "regex.h2"
+#line 332 "regex.h2"
+template class empty_matcher_logic;
+
+#line 340 "regex.h2"
 template class extract_position_helper;
     
 
-#line 315 "regex.h2"
+#line 355 "regex.h2"
+template class matcher_list;
+    
+
+#line 366 "regex.h2"
+template class special_syntax_wrapper;
+    
+
+#line 383 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 399 "regex.h2"
+#line 467 "regex.h2"
 template class any_matcher_logic;
 
-#line 418 "regex.h2"
+#line 486 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 426 "regex.h2"
+#line 494 "regex.h2"
 template class char_matcher_logic;
 
-#line 454 "regex.h2"
+#line 522 "regex.h2"
 template class class_matcher_logic;
 
-#line 503 "regex.h2"
-template class empty_matcher_logic;
-    
-
-#line 511 "regex.h2"
-template class escaped_char_matcher_logic;
-
-#line 520 "regex.h2"
+#line 571 "regex.h2"
 template class global_group_reset;
     
 
-#line 532 "regex.h2"
+#line 583 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 565 "regex.h2"
+#line 620 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 589 "regex.h2"
+#line 644 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 597 "regex.h2"
+#line 652 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 630 "regex.h2"
+#line 685 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 650 "regex.h2"
+#line 705 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 667 "regex.h2"
-template class modifier_matcher_logic;
+#line 722 "regex.h2"
+template class lookahead_matcher_logic;
 
-#line 679 "regex.h2"
-template class named_matcher_logic;
-    
+#line 745 "regex.h2"
+template class modifier_matcher_logic;
 
-#line 683 "regex.h2"
+#line 757 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 709 "regex.h2"
+#line 783 "regex.h2"
 template class range_matcher_logic;
 
-#line 837 "regex.h2"
+#line 911 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 856 "regex.h2"
+#line 930 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 907 "regex.h2"
-template class group_name_list;
+#line 981 "regex.h2"
+template class group_name_list;
 
-#line 919 "regex.h2"
+#line 993 "regex.h2"
 class group_name_list_end;
     
 
-#line 924 "regex.h2"
+#line 998 "regex.h2"
 template class regular_expression;
 
-#line 1008 "regex.h2"
+#line 1087 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1014 "regex.h2"
-class regex_parser_state;
+#line 1094 "regex.h2"
+class regex_parser_group_state;
 
-#line 1048 "regex.h2"
+#line 1129 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1075 "regex.h2"
+#line 1156 "regex.h2"
 template class regex_parser;
 
-#line 1959 "regex.h2"
+#line 2130 "regex.h2"
 }
 }
 
@@ -192,7 +199,7 @@ namespace regex {
 
 bool inline constexpr greedy_alternative = false;
 
-template using view = std::basic_string_view;
+template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
 //-----------------------------------------------------------------------
@@ -282,9 +289,15 @@ template cl
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 128 "regex.h2"
+#line 129 "regex.h2"
+    public: [[nodiscard]] auto fail() const& -> auto;
+    public: [[nodiscard]] auto pass(cpp2::in cur) const& -> auto;
+
 };
 
+// Flag change for matching modifiers. Creates a new flag for match_modifiers.
+// See expression_flags for possible flags.
+//
 template class match_modifiers_state_change {
 
     public: static const bool reset;
@@ -294,17 +307,20 @@ template
 
     public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
 
-#line 148 "regex.h2"
+#line 155 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: match_modifiers_state_change() = default;
     public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_modifiers_state_change const&) -> void = delete;
 
-#line 149 "regex.h2"
+#line 156 "regex.h2"
 };
 
 using match_modifiers_no_change = match_modifiers_state_change;
 
+// Current modifiers for the regular expression.
+// See expression_flags for possible flags.
+//
 template class match_modifiers {
 
     public: static const int flags;
@@ -324,7 +340,7 @@ template class match_modifiers {
     public: auto operator=(match_modifiers const&) -> void = delete;
 
 
-#line 169 "regex.h2"
+#line 179 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -332,28 +348,58 @@ template class match_modifiers {
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
 //  Otherwise the matcher can try a different alternative.
 //
-template class matcher_list {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
+template class match_tail {
+    public: [[nodiscard]] auto match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
 
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto;
+    private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
 
-#line 182 "regex.h2"
-    private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
+    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
 
-    private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto;
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+
+    public: template [[nodiscard]] auto prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto;
+
+    public: template [[nodiscard]] auto make_calling(Call const& call) const& -> auto;
+    public: match_tail() = default;
+    public: match_tail(match_tail const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(match_tail const&) -> void = delete;
+
+#line 199 "regex.h2"
+};
+
+//  Represents the remainder of the regular expression. Will call a function wen the end is reached.
+//
+//  TODO: Create common base with match_tail.
+//
+//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
+//  Otherwise the matcher can try a different alternative.
+//
+template class calling_match_tail {
+    private: Call call; 
+
+    public: explicit calling_match_tail(auto const& call_);
+#line 211 "regex.h2"
+    public: auto operator=(auto const& call_) -> calling_match_tail& ;
+
+#line 215 "regex.h2"
+    public: [[nodiscard]] auto match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+
+    private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+
+    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
 
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
-    public: template [[nodiscard]] static auto prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto;
-    public: matcher_list() = default;
-    public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(matcher_list const&) -> void = delete;
+    public: template [[nodiscard]] auto prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto;
+    public: calling_match_tail(calling_match_tail const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(calling_match_tail const&) -> void = delete;
 
-#line 190 "regex.h2"
+#line 225 "regex.h2"
 };
 
-template using no_tail = matcher_list;
+template using no_tail = match_tail;
 
 //-----------------------------------------------------------------------
 //
@@ -372,7 +418,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 207 "regex.h2"
+#line 242 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -385,7 +431,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 215 "regex.h2"
+#line 250 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -397,7 +443,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 222 "regex.h2"
+#line 257 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -409,7 +455,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 229 "regex.h2"
+#line 264 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 236 "regex.h2"
+#line 271 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -431,7 +477,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 241 "regex.h2"
+#line 276 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -443,10 +489,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 248 "regex.h2"
+#line 283 "regex.h2"
 };
 
-#line 251 "regex.h2"
+#line 286 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -477,7 +523,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 282 "regex.h2"
+#line 317 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -486,107 +532,155 @@ template                      using short_not_word_class = negat
 
 //-----------------------------------------------------------------------
 //
-//  Matchers for regular expressions.
+//  Helper matchers for regular expressions.
 //
 //-----------------------------------------------------------------------
 //
 
-#line 296 "regex.h2"
+// Regex syntax: none Example: -
+//
+template class empty_matcher_logic {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: empty_matcher_logic() = default;
+    public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(empty_matcher_logic const&) -> void = delete;
+
+#line 336 "regex.h2"
+};
+
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 307 "regex.h2"
+#line 349 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 309 "regex.h2"
+#line 351 "regex.h2"
+};
+
+// A list of matchers. Prepends to the current match tail.
+//
+template class matcher_list {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 359 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: matcher_list() = default;
+    public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(matcher_list const&) -> void = delete;
+
+#line 361 "regex.h2"
 };
 
+// Helper for standard matchers with special syntax
+//
+//
+template class special_syntax_wrapper: public base {
+
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: special_syntax_wrapper() = default;
+    public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(special_syntax_wrapper const&) -> void = delete;
+
+#line 369 "regex.h2"
+};
+
+//-----------------------------------------------------------------------
+//
+//  Matchers for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+#line 379 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
 //
 template class alternative_matcher_logic {
 
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 329 "regex.h2"
+#line 397 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 347 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto;
+#line 415 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 395 "regex.h2"
+#line 463 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 template class any_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 412 "regex.h2"
+#line 480 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 414 "regex.h2"
+#line 482 "regex.h2"
 };
 
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: branch_reset_matcher_logic() = default;
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 422 "regex.h2"
+#line 490 "regex.h2"
 };
 
 // Regex syntax:   Example: a
 //
 template class char_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 447 "regex.h2"
+#line 515 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 449 "regex.h2"
+#line 517 "regex.h2"
 };
 
-#line 452 "regex.h2"
+#line 520 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 475 "regex.h2"
+#line 543 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 487 "regex.h2"
+#line 555 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -595,176 +689,157 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 499 "regex.h2"
-};
-
-// Regex syntax: none Example: -
-//
-template class empty_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
-    public: static auto reset_ranges(auto& ctx) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: empty_matcher_logic() = default;
-    public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(empty_matcher_logic const&) -> void = delete;
-
-#line 507 "regex.h2"
-};
-
-// Regex syntax: \  Example: \.
-//
-template class escaped_char_matcher_logic
-: public char_matcher_logic {
-
-#line 515 "regex.h2"
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: escaped_char_matcher_logic() = default;
-    public: escaped_char_matcher_logic(escaped_char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(escaped_char_matcher_logic const&) -> void = delete;
-
-#line 516 "regex.h2"
+#line 567 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
 //
 template class global_group_reset {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 526 "regex.h2"
+#line 577 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 528 "regex.h2"
+#line 579 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
 //
 template class group_matcher_start_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto;
 
-#line 540 "regex.h2"
+#line 591 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-    public: [[nodiscard]] static auto to_string() -> std::string;
+#line 597 "regex.h2"
+    public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 563 "regex.h2"
+#line 618 "regex.h2"
 };
 
 template class group_matcher_end_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, auto const& other) -> auto;
 
-#line 577 "regex.h2"
+#line 632 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-    public: [[nodiscard]] static auto to_string() -> auto;
+    public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_end_logic() = default;
     public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 587 "regex.h2"
+#line 642 "regex.h2"
 };
 
 template class special_group_end_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: special_group_end_logic() = default;
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 593 "regex.h2"
+#line 648 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
 //
 template class group_ref_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 624 "regex.h2"
+#line 679 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 626 "regex.h2"
+#line 681 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 template class line_end_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 644 "regex.h2"
+#line 699 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 646 "regex.h2"
+#line 701 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
 //
 template class line_start_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 661 "regex.h2"
+#line 716 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 663 "regex.h2"
+#line 718 "regex.h2"
+};
+
+// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
+//
+template class lookahead_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 739 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: lookahead_matcher_logic() = default;
+    public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
+
+#line 741 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
 //
 template class modifier_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
 
-#line 672 "regex.h2"
+#line 750 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 674 "regex.h2"
+#line 752 "regex.h2"
 };
 
 // Named character classes
 //
 
-template class named_matcher_logic: public Base {
-
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: named_matcher_logic() = default;
-    public: named_matcher_logic(named_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(named_matcher_logic const&) -> void = delete;
-
-#line 682 "regex.h2"
-};
-template                    class named_class_matcher_logic: public named_matcher_logic> {
+template                    class named_class_matcher_logic: public special_syntax_wrapper> {
     public: named_class_matcher_logic() = default;
     public: named_class_matcher_logic(named_class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_matcher_logic const&) -> void = delete;
 
 
-#line 685 "regex.h2"
+#line 759 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -774,7 +849,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 695 "regex.h2"
+#line 769 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -782,57 +857,57 @@ template using named_class_not_ver_space = named_class_matcher_l
 template                     using named_class_not_word = named_class_matcher_logic>;
 
 // Other named matchers
-template using named_string_end_or_before_new_line_at_end = named_matcher_logic>;
-template using named_string_end = named_matcher_logic>;
-template using named_string_start = named_matcher_logic>;
+template                                     using named_string_end_or_before_new_line_at_end = special_syntax_wrapper>;
+template           using named_string_end = special_syntax_wrapper>;
+template using named_string_start = special_syntax_wrapper>;
 
-#line 708 "regex.h2"
+#line 782 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 720 "regex.h2"
+#line 794 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 748 "regex.h2"
+#line 822 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 753 "regex.h2"
+#line 827 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 758 "regex.h2"
+#line 832 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 764 "regex.h2"
+#line 838 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 779 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return;
+#line 853 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
 
-#line 809 "regex.h2"
-    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return;
+#line 883 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 833 "regex.h2"
+#line 907 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 template class special_range_matcher_logic: public range_matcher_logic {
 
-    public: [[nodiscard]] static auto to_string() -> auto;
+    public: [[nodiscard]] static auto to_string() -> bstring;
     public: special_range_matcher_logic() = default;
     public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_range_matcher_logic const&) -> void = delete;
 
 
-#line 850 "regex.h2"
+#line 924 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -841,20 +916,20 @@ template class word_boundary_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 887 "regex.h2"
+#line 961 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
-    public: [[nodiscard]] static auto to_string() -> std::string;
+    public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
     public: word_boundary_matcher_logic(word_boundary_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 895 "regex.h2"
+#line 969 "regex.h2"
 };
 
-#line 898 "regex.h2"
+#line 972 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -864,15 +939,15 @@ template class word_boundary_matcher_logic
 
 // Helper for named groups.
 
-template class group_name_list {
+template class group_name_list {
 
-    public: [[nodiscard]] static auto get_group_id(auto const& name) -> int;
+    public: [[nodiscard]] static auto get_group_id(auto const& g) -> int;
     public: group_name_list() = default;
     public: group_name_list(group_name_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 917 "regex.h2"
+#line 991 "regex.h2"
 };
 
 class group_name_list_end {
@@ -881,7 +956,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 921 "regex.h2"
+#line 995 "regex.h2"
 };
 
 // Regular expression implementation
@@ -890,9 +965,6 @@ template using context = match_context;
     public: using modifiers = match_modifiers;
 
-    private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
-
-#line 938 "regex.h2"
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -900,7 +972,7 @@ template matched_, context const& ctx_);
 
-#line 948 "regex.h2"
+#line 1013 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -915,27 +987,33 @@ template void = delete;
 
 
-#line 964 "regex.h2"
+#line 1029 "regex.h2"
     };
 
-    public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
-    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start) const& -> auto;
-    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
+    public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
+    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start) const& -> auto;
+    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 976 "regex.h2"
-    public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
-    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
-    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
+#line 1041 "regex.h2"
+    public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
+    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
+    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 998 "regex.h2"
+#line 1063 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
+
+    // Helper functions
+    //
+
+    private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
-#line 999 "regex.h2"
+
+#line 1076 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -945,36 +1023,40 @@ template)'
+class regex_parser_group_state {
 
     // Current list of matchers
     public: std::vector cur_match_list {}; 
 
-    /// List of alternate matcher lists. E.g. ab|cd|xy
+    // List of alternate matcher lists. E.g. ab|cd|xy
     public: std::vector> alternate_match_lists {}; 
 
     public: regex_parser_modifier_state modifiers {}; 
 
     public: auto next_alternative() & -> void;
 
-#line 1030 "regex.h2"
-    public: auto swap(regex_parser_state& t) & -> void;
+#line 1110 "regex.h2"
+    public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1036 "regex.h2"
+#line 1116 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1045 "regex.h2"
+#line 1125 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
+// State for the branch reset. Takes care of the group numbering. See '(|)'.
 class regex_branch_reset_state {
     public: bool is_active {false}; 
     public: int cur_group {1}; // Global capture group.
@@ -983,163 +1065,175 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1062 "regex.h2"
+#line 1143 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1067 "regex.h2"
+#line 1148 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1072 "regex.h2"
+#line 1153 "regex.h2"
 };
 
-#line 1075 "regex.h2"
+// Parser and generator for regular expressions.
 template class regex_parser {
 
     private: std::string_view regex; 
     private: std::string_view modifier; 
-    private: regex_parser_state cur_state {}; 
+    private: Error_out error_out; 
+
+    private: regex_parser_group_state cur_group_state {}; 
     private: regex_branch_reset_state cur_branch_reset_state {}; 
     private: size_t pos {0}; 
-
     private: int alternatives_count {0}; 
-
     private: std::map named_groups {}; 
-
     private: bool has_error {false}; 
-    private: Error_out error_out; 
 
     private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1099 "regex.h2"
+#line 1178 "regex.h2"
     // State management functions
     //
-    public: [[nodiscard]] auto new_state() & -> regex_parser_state;
+    public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1108 "regex.h2"
-    public: auto restore_state(cpp2::in old_state) & -> void;
+#line 1187 "regex.h2"
+    public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1112 "regex.h2"
+#line 1191 "regex.h2"
     // Branch reset management functions
     //
 
-    public: [[nodiscard]] auto group_new_state() & -> regex_branch_reset_state;
+    public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1127 "regex.h2"
-    public: auto group_restore_state(cpp2::in old_state) & -> void;
+#line 1206 "regex.h2"
+    public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1133 "regex.h2"
+#line 1212 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1174 "regex.h2"
+#line 1253 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1186 "regex.h2"
+#line 1265 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1192 "regex.h2"
+#line 1271 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1199 "regex.h2"
+#line 1278 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1208 "regex.h2"
+#line 1287 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1216 "regex.h2"
+#line 1295 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1226 "regex.h2"
+#line 1305 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1250 "regex.h2"
+#line 1329 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
+    public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
+
+#line 1345 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1274 "regex.h2"
+#line 1365 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1281 "regex.h2"
+#line 1372 "regex.h2"
+    public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
+
+#line 1384 "regex.h2"
+    public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
+
+#line 1387 "regex.h2"
+    // Creator functions for matchers.
+    //
+
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1288 "regex.h2"
+#line 1397 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1312 "regex.h2"
-    public: [[nodiscard]] auto create_named_groups_arg() const& -> std::string;
+#line 1415 "regex.h2"
+    public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
+
+#line 1425 "regex.h2"
+    // Parser helper functions.
 
-#line 1322 "regex.h2"
-    public: [[nodiscard]] static auto join(cpp2::in> list) -> std::string;
+    public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1334 "regex.h2"
-    public: [[nodiscard]] auto parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+#line 1438 "regex.h2"
+    public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
+
+#line 1474 "regex.h2"
+    public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1399 "regex.h2"
+#line 1539 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1410 "regex.h2"
+#line 1550 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1423 "regex.h2"
+#line 1563 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1431 "regex.h2"
+#line 1571 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1538 "regex.h2"
+#line 1678 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1647 "regex.h2"
+#line 1845 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1758 "regex.h2"
+#line 1977 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1767 "regex.h2"
+#line 1984 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 1841 "regex.h2"
+#line 2048 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 1878 "regex.h2"
+#line 2085 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 1900 "regex.h2"
-    public: [[nodiscard]] auto parse_modifier() & -> std::string;
-
-#line 1936 "regex.h2"
+#line 2107 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 1950 "regex.h2"
+#line 2121 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 1959 "regex.h2"
+#line 2130 "regex.h2"
 }
 }
 
@@ -1263,13 +1357,18 @@ namespace regex {
         return r; 
     }
 
-#line 132 "regex.h2"
+#line 129 "regex.h2"
+    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
+#line 130 "regex.h2"
+    template  [[nodiscard]] auto match_context::pass(cpp2::in cur) const& -> auto { return match_return(true, cur);  }
+
+#line 139 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
 
-#line 137 "regex.h2"
+#line 144 "regex.h2"
     template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
         auto new_flags {old_flags}; 
         if (reset) {
@@ -1281,98 +1380,147 @@ namespace regex {
         return new_flags; 
     }
 
-#line 148 "regex.h2"
+#line 155 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 155 "regex.h2"
+#line 165 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
-#line 159 "regex.h2"
+#line 169 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
-#line 160 "regex.h2"
+#line 170 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
-#line 161 "regex.h2"
+#line 171 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
-#line 166 "regex.h2"
+#line 176 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 177 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_select(cur, ctx, modifiers);  }
+#line 187 "regex.h2"
+    template  [[nodiscard]] auto match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 179 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] matcher_list const& unnamed_param_4) -> auto { 
-        return match_select(cur, ctx, modifiers);  }
+#line 189 "regex.h2"
+    template  template [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
+        return First::match(cur, ctx, modifiers, match_tail());  }
+#line 191 "regex.h2"
+    template  [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
-#line 182 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { 
-        return First::match(cur, ctx, modifiers, matcher_list());  }
-#line 184 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers) -> auto { return match_return(true, cur);  }
+#line 193 "regex.h2"
+    template  auto match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 194 "regex.h2"
+    template  [[nodiscard]] auto match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 186 "regex.h2"
-    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 187 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
+#line 196 "regex.h2"
+    template  template [[nodiscard]] auto match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return match_tail();  }
 
-#line 189 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
+#line 198 "regex.h2"
+    template  template [[nodiscard]] auto match_tail::make_calling(Call const& call) const& -> auto { return calling_match_tail(call);  }
+
+#line 211 "regex.h2"
+    template  calling_match_tail::calling_match_tail(auto const& call_)
+        : call{ call_ }{
+
+#line 213 "regex.h2"
+    }
+#line 211 "regex.h2"
+    template  auto calling_match_tail::operator=(auto const& call_) -> calling_match_tail& {
+        call = call_;
+        return *this;
+
+#line 213 "regex.h2"
+    }
+
+#line 215 "regex.h2"
+    template  [[nodiscard]] auto calling_match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
+
+#line 217 "regex.h2"
+    template  template [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
+        return First::match(cur, ctx, modifiers, calling_match_tail(call));  }
+#line 219 "regex.h2"
+    template  [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return call(cur, ctx, modifiers);  }
+
+#line 221 "regex.h2"
+    template  auto calling_match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 222 "regex.h2"
+    template  [[nodiscard]] auto calling_match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 205 "regex.h2"
+#line 224 "regex.h2"
+    template  template [[nodiscard]] auto calling_match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return calling_match_tail(call);  }
+
+#line 240 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 206 "regex.h2"
+#line 241 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 213 "regex.h2"
+#line 248 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 214 "regex.h2"
+#line 249 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 220 "regex.h2"
+#line 255 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 221 "regex.h2"
-    template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return ("" + ... + List::to_string()); }
+#line 256 "regex.h2"
+    template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 227 "regex.h2"
+#line 262 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 228 "regex.h2"
-    template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return ("" + ... + List); }
+#line 263 "regex.h2"
+    template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 234 "regex.h2"
+#line 269 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 235 "regex.h2"
+#line 270 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 240 "regex.h2"
+#line 275 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 246 "regex.h2"
+#line 281 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 247 "regex.h2"
-    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name)); }
+#line 282 "regex.h2"
+    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
 
-#line 299 "regex.h2"
-    template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        auto r {Other::match(cur, ctx, modifiers)}; 
+#line 333 "regex.h2"
+    template  [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers); }
+#line 334 "regex.h2"
+    template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
+#line 335 "regex.h2"
+    template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
+
+#line 341 "regex.h2"
+    template  [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        auto r {CPP2_UFCS(match)(other, cur, ctx, modifiers)}; 
         if (r.matched) {
             CPP2_UFCS(set_alternative_pos)(ctx, alternative, cur);
         }
         return r; 
     }
 
-#line 307 "regex.h2"
+#line 349 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 308 "regex.h2"
-    template  [[nodiscard]] auto extract_position_helper::to_string() -> auto{}
+#line 350 "regex.h2"
+    template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
-#line 317 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, Tail const& tail) -> auto{
+#line 356 "regex.h2"
+    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { 
+        return CPP2_UFCS(match)(CPP2_UFCS(prepend)(other, List()...), cur, ctx, modifiers);  }
+
+#line 359 "regex.h2"
+    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 360 "regex.h2"
+    template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); }
+
+#line 368 "regex.h2"
+    template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
+
+#line 385 "regex.h2"
+    template  [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
             auto max_current_length {0}; 
-            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail)}; 
+            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail)}; 
             static_cast(std::move(max_overall_length));
             static_cast(std::move(max_current_length));
             return r; 
@@ -1380,14 +1528,14 @@ namespace regex {
             return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 329 "regex.h2"
+#line 397 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 330 "regex.h2"
+#line 398 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 332 "regex.h2"
+#line 400 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
-        auto r {First::match(cur, ctx, modifiers, tail)}; 
+        auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, tail)}; 
         if (r.matched) {
             return r; 
         }else {
@@ -1396,14 +1544,14 @@ namespace regex {
             if constexpr (0 != sizeof...(Next)) {
                 return match_first(cur, ctx, modifiers, tail); 
             }else {
-                return match_return(false, ctx.end); 
+                return CPP2_UFCS(fail)(ctx); 
             }
         }
     }
 
-#line 347 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, [[maybe_unused]] Tail const& unnamed_param_6) -> auto{
-        auto r {First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper()))}; 
+#line 415 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, CPP2_UFCS(prepend)(tail, extract_position_helper()))}; 
 
         // Get the end position of First.
         auto end_overall_pos {cur}; 
@@ -1417,11 +1565,11 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 363 "regex.h2"
+#line 431 "regex.h2"
         // Check if someone other has something larker
-        auto o {match_return(false, ctx.end)}; 
+        auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, Tail());
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
         }
 
         auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; 
@@ -1429,13 +1577,13 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 375 "regex.h2"
+#line 443 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx), ...);  // Reset all other ranges.
-                return First::match(cur, ctx, modifiers, Tail::prepend(extract_position_helper())); 
+                return First::match(cur, ctx, modifiers, CPP2_UFCS(prepend)(tail, extract_position_helper())); 
             }
             else {
                 // We are not, so there was an other match.
@@ -1451,76 +1599,76 @@ namespace regex {
         }
     }
 
-#line 401 "regex.h2"
-    template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 469 "regex.h2"
+    template  [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
            *cpp2::assert_not_null(cur) != '\n')) {
-            return Other::match(cur + 1, ctx, modifiers); 
+            return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
         }
         else {
-            return match_return(false, ctx.end); 
+            return CPP2_UFCS(fail)(ctx); 
         }
     }
 
-#line 412 "regex.h2"
+#line 480 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 413 "regex.h2"
+#line 481 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 419 "regex.h2"
-    template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
-#line 420 "regex.h2"
+#line 487 "regex.h2"
+    template  [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
+#line 488 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 421 "regex.h2"
-    template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return "(?|";  }
+#line 489 "regex.h2"
+    template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 428 "regex.h2"
-    template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 496 "regex.h2"
+    template  [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
-                return Other::match(cur + 1, ctx, modifiers); 
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
             }
             else {
-                return match_return(false, ctx.end); 
+                return CPP2_UFCS(fail)(ctx); 
             }
         }
         else {
             if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
-                return Other::match(cur + 1, ctx, modifiers); 
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
             }
             else {
-                return match_return(false, ctx.end); 
+                return CPP2_UFCS(fail)(ctx); 
             }
         }
 
     }
-#line 447 "regex.h2"
+#line 515 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 448 "regex.h2"
+#line 516 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 456 "regex.h2"
-    template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 524 "regex.h2"
+    template  [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
-                return Other::match(cur + 1, ctx, modifiers); 
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
             }
             else {
-                return match_return(false, ctx.end); 
+                return CPP2_UFCS(fail)(ctx); 
             }
         }
         else {
             if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
-                return Other::match(cur + 1, ctx, modifiers); 
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
             }
             else {
-                return match_return(false, ctx.end); 
+                return CPP2_UFCS(fail)(ctx); 
             }
         }
     }
 
-#line 475 "regex.h2"
+#line 543 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1533,10 +1681,10 @@ namespace regex {
         return r; 
     }
 
-#line 487 "regex.h2"
+#line 555 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 489 "regex.h2"
+#line 557 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1548,40 +1696,34 @@ namespace regex {
         return r; 
     }
 
-#line 504 "regex.h2"
-    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
-#line 505 "regex.h2"
-    template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 506 "regex.h2"
-    template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring();  }
-
-#line 515 "regex.h2"
-    template  [[nodiscard]] auto escaped_char_matcher_logic::to_string() -> auto { return "\\" + cpp2::to_string(C);  }
-
-#line 521 "regex.h2"
-    template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 572 "regex.h2"
+    template  [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
-        return Other::match(cur, ctx, modifiers); 
+        return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
     }
 
-#line 526 "regex.h2"
+#line 577 "regex.h2"
     template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
-#line 527 "regex.h2"
-    template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return "\\K";  }
+#line 578 "regex.h2"
+    template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 533 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 584 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
         }
-        return Other::match(cur, ctx, Modifiers::push(ModifierChange())); 
+        return CPP2_UFCS(match)(other, cur, ctx, Modifiers::push(ModifierChange())); 
     }
 
-#line 540 "regex.h2"
-    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void { CPP2_UFCS(set_group_invalid)(ctx, group);  }
+#line 591 "regex.h2"
+    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
+        if (-1 != group) {
+            CPP2_UFCS(set_group_invalid)(ctx, group);
+        }
+    }
 
-#line 542 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> std::string{
+#line 597 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
                 if (name_brackets) {
@@ -1603,23 +1745,23 @@ namespace regex {
         }
     }
 
-#line 566 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 621 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, auto const& other) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
         }
-        auto r {Other::match(cur, ctx, Modifier::pop())}; 
+        auto r {CPP2_UFCS(match)(other, cur, ctx, Modifier::pop())}; 
         if (!(r.matched) && -1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
         return r; 
     }
 
-#line 577 "regex.h2"
+#line 632 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 579 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> auto{
+#line 634 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
         }
@@ -1628,15 +1770,15 @@ namespace regex {
         }
     }
 
-#line 590 "regex.h2"
-    template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto { return Other::match(cur, ctx, modifiers);  }
-#line 591 "regex.h2"
+#line 645 "regex.h2"
+    template  [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
+#line 646 "regex.h2"
     template  auto special_group_end_logic::reset_ranges(auto& ctx) -> void{}
-#line 592 "regex.h2"
-    template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return ")";  }
+#line 647 "regex.h2"
+    template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 598 "regex.h2"
-    template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 653 "regex.h2"
+    template  [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
         auto pos {cur}; 
@@ -1644,75 +1786,93 @@ namespace regex {
         for( ; group_pos != g.end && pos != ctx.end; (++group_pos, ++pos) ) {
             if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
                 if (safe_tolower(*cpp2::assert_not_null(group_pos)) != safe_tolower(*cpp2::assert_not_null(pos))) {
-                    return match_return(false, ctx.end); 
+                    return CPP2_UFCS(fail)(ctx); 
                 }
             }
             else {
                 if (*cpp2::assert_not_null(group_pos) != *cpp2::assert_not_null(pos)) {
-                    return match_return(false, ctx.end); 
+                    return CPP2_UFCS(fail)(ctx); 
                 }
             }
         }
 
         if (std::move(group_pos) == std::move(g).end) {
-            return Other::match(std::move(pos), ctx, modifiers); 
+            return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); 
         }
         else {
-            return match_return(false, ctx.end); 
+            return CPP2_UFCS(fail)(ctx); 
         }
 
     }
-#line 624 "regex.h2"
+#line 679 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 625 "regex.h2"
-    template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(symbol)); }
+#line 680 "regex.h2"
+    template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 632 "regex.h2"
-    template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 687 "regex.h2"
+    template  [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
-            return Other::match(cur, ctx, modifiers); 
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
         }
         else {if (match_new_line_before_end && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end.
-            return Other::match(cur, ctx, modifiers); 
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
         }
         else {
-            return match_return(false, ctx.end); 
+            return CPP2_UFCS(fail)(ctx); 
         }}
     }
 
-#line 644 "regex.h2"
+#line 699 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 645 "regex.h2"
-    template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return "\\$"; }
+#line 700 "regex.h2"
+    template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 652 "regex.h2"
-    template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 707 "regex.h2"
+    template  [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
-            return Other::match(cur, ctx, modifiers); 
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
         }
         else {
-            return match_return(false, ctx.end); 
+            return CPP2_UFCS(fail)(ctx); 
         }
 
     }
-#line 661 "regex.h2"
+#line 716 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 662 "regex.h2"
+#line 717 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 669 "regex.h2"
-    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
-        return Other::match(cur, ctx, Modifier::replace(ModifierChange())); 
+#line 724 "regex.h2"
+    template  [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        auto r {Pattern::match(cur, ctx, modifiers, no_tail())}; 
+
+        if (!(positive)) {
+            r.matched = !(r.matched);
+        }
+
+        if (std::move(r).matched) {
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+        }
+        else {
+            return CPP2_UFCS(fail)(ctx); 
+        }
+
+    }
+#line 739 "regex.h2"
+    template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
+#line 740 "regex.h2"
+    template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
+
+#line 747 "regex.h2"
+    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto{
+        return CPP2_UFCS(match)(other, cur, ctx, Modifier::replace(ModifierChange())); 
     }
-#line 672 "regex.h2"
+#line 750 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 673 "regex.h2"
+#line 751 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 681 "regex.h2"
-    template  [[nodiscard]] auto named_matcher_logic::to_string() -> auto { return bstring(CPP2_UFCS(data)(Name));  }
-
-#line 711 "regex.h2"
+#line 785 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if (greedy) {
             return match_greedy(0, cur, cur, ctx, modifiers, tail); 
@@ -1722,12 +1882,12 @@ namespace regex {
         }
     }
 
-#line 720 "regex.h2"
+#line 794 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 722 "regex.h2"
+#line 796 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
-      std::string r {M::to_string()}; 
+      bstring r {M::to_string()}; 
 
       if (min_count == max_count) {
         r += ("{" + cpp2::to_string(min_count) + "}");
@@ -1752,28 +1912,28 @@ namespace regex {
       return r; 
     }
 
-#line 748 "regex.h2"
+#line 822 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 753 "regex.h2"
+#line 827 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 758 "regex.h2"
+#line 832 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 764 "regex.h2"
+#line 838 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
-        auto res {match_return(true, cur)}; 
+        auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
 
         while( is_below_lower_bound(count) && res.matched ) {
@@ -1787,13 +1947,13 @@ namespace regex {
         return res; 
     }
 
-#line 779 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_6) -> match_return{
+#line 853 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
         auto r {M::match(cur, ctx, modifiers, no_tail())}; 
         if ( is_below_upper_bound(count) && r.matched && 
             (is_below_lower_bound(count) || r.pos != cur)) 
         {
-            auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, modifiers, Other())}; 
+            auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, modifiers, other)}; 
 
             if (possessive || // Do not backtrack if possessive.
                inner.matched) {
@@ -1803,7 +1963,7 @@ namespace regex {
 
         // No match from the recursion. Try to match our tail.
         if (is_in_range(count)) {
-            auto o {Other::match(cur, ctx, modifiers)}; 
+            auto o {CPP2_UFCS(match)(other, cur, ctx, modifiers)}; 
 
             if (o.matched) {
                 // Rematch M to set the groups.
@@ -1814,12 +1974,12 @@ namespace regex {
             return o; 
         }
         else {
-            return match_return(false, ctx.end); 
+            return CPP2_UFCS(fail)(ctx); 
         }
     }
 
-#line 809 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> match_return{
+#line 883 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
         if (!(start.matched)) {
@@ -1828,24 +1988,24 @@ namespace regex {
 
         auto pos {std::move(start).pos}; 
         while( is_below_upper_bound(count) ) {
-            auto o {Other::match(pos, ctx, modifiers)}; 
+            auto o {CPP2_UFCS(match)(other, pos, ctx, modifiers)}; 
             if (o.matched) {
                 return o; 
             }
 
             auto r {M::match(pos, ctx, modifiers, no_tail())}; 
             if (!(r.matched)) {
-                return match_return(false, ctx.end); 
+                return CPP2_UFCS(fail)(ctx); 
             }
             count += 1;
             pos = r.pos;
         }
 
-        return Other::match(std::move(pos), ctx, modifiers); // Upper bound reached.
+        return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 839 "regex.h2"
-    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> auto{
+#line 913 "regex.h2"
+    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
             r += "?";
@@ -1857,8 +2017,8 @@ namespace regex {
         return r; 
     }
 
-#line 858 "regex.h2"
-    template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, [[maybe_unused]] Other const& unnamed_param_4) -> auto{
+#line 932 "regex.h2"
+    template  [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         word_class words {}; 
         auto is_match {false}; 
         if (cur == ctx.begin) {// String start
@@ -1880,17 +2040,17 @@ namespace regex {
         }
 
         if (std::move(is_match)) {
-            return Other::match(cur, ctx, modifiers); 
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
         }
         else {
-            return match_return(false, ctx.end); 
+            return CPP2_UFCS(fail)(ctx); 
         }
 
     }
-#line 887 "regex.h2"
+#line 961 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 888 "regex.h2"
-    template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> std::string{
+#line 962 "regex.h2"
+    template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
         }else {
@@ -1898,54 +2058,44 @@ namespace regex {
         }
     }
 
-#line 909 "regex.h2"
-    template  [[nodiscard]] auto group_name_list::get_group_id(auto const& name) -> int{
-        if (name == CPP2_UFCS(data)(Name)) {
+#line 983 "regex.h2"
+    template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
+        if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
         }
         else {
-            return Inner::get_group_id(name); 
+            return Inner::get_group_id(g); 
         }
     }
 
-#line 920 "regex.h2"
+#line 994 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 929 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
-        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
-            return CPP2_UFCS(begin)(str) + pos; 
-        }
-        else {
-            return CPP2_UFCS(end)(str); 
-        }
-    }
-
-#line 943 "regex.h2"
+#line 1008 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 946 "regex.h2"
+#line 1011 "regex.h2"
         }
 
-#line 948 "regex.h2"
+#line 1013 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 949 "regex.h2"
+#line 1014 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 950 "regex.h2"
+#line 1015 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 951 "regex.h2"
+#line 1016 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 953 "regex.h2"
+#line 1018 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 954 "regex.h2"
+#line 1019 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 955 "regex.h2"
+#line 1020 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 957 "regex.h2"
+#line 1022 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -1954,34 +2104,34 @@ namespace regex {
             return group_id; 
         }
 
-#line 966 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 967 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 968 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 969 "regex.h2"
+#line 1031 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 1032 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 1033 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 1034 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
-        auto r {Matcher::match(start, ctx, modifiers())}; 
+        auto r {CPP2_UFCS(match)(Matcher(), start, ctx, modifiers(), no_tail())}; 
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 976 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 977 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 978 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 979 "regex.h2"
+#line 1041 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 1042 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 1043 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 1044 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
 
         auto cur {start}; 
         for( ; true; (++cur) ) {
-            if (Matcher::match(cur, ctx, modifiers()).matched) {
+            if (CPP2_UFCS(match)(Matcher(), cur, ctx, modifiers(), no_tail()).matched) {
                 matched = true;
                 break;
             }
@@ -1994,38 +2144,48 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 998 "regex.h2"
+#line 1063 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1024 "regex.h2"
-    auto regex_parser_state::next_alternative() & -> void{
+#line 1068 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
+        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
+            return CPP2_UFCS(begin)(str) + pos; 
+        }
+        else {
+            return CPP2_UFCS(end)(str); 
+        }
+    }
+
+#line 1104 "regex.h2"
+    auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1030 "regex.h2"
-    auto regex_parser_state::swap(regex_parser_state& t) & -> void{
+#line 1110 "regex.h2"
+    auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1036 "regex.h2"
-    auto regex_parser_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
+#line 1116 "regex.h2"
+    auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1038 "regex.h2"
-    auto regex_parser_state::wrap_last(auto const& matcher) & -> void{
+#line 1118 "regex.h2"
+    auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
         static_cast(matcher);
         static_cast(std::move(last));
     }
 
-#line 1045 "regex.h2"
-    [[nodiscard]] auto regex_parser_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
+#line 1125 "regex.h2"
+    [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1054 "regex.h2"
+#line 1135 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2034,43 +2194,43 @@ namespace regex {
         return g; 
     }
 
-#line 1062 "regex.h2"
+#line 1143 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1067 "regex.h2"
+#line 1148 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1093 "regex.h2"
+#line 1172 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1097 "regex.h2"
+#line 1176 "regex.h2"
     }
 
-#line 1101 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::new_state() & -> regex_parser_state{
-        regex_parser_state old_state {}; 
-        CPP2_UFCS(swap)(old_state, cur_state);
+#line 1180 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
+        regex_parser_group_state old_state {}; 
+        CPP2_UFCS(swap)(old_state, cur_group_state);
 
         return old_state; 
     }
 
-#line 1108 "regex.h2"
-    template  auto regex_parser::restore_state(cpp2::in old_state) & -> void{
-        cur_state = old_state;
+#line 1187 "regex.h2"
+    template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
+        cur_group_state = old_state;
     }
 
-#line 1115 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_branch_reset_state{
+#line 1194 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
 
@@ -2082,22 +2242,22 @@ namespace regex {
         return old_state; 
     }
 
-#line 1127 "regex.h2"
-    template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
+#line 1206 "regex.h2"
+    template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1136 "regex.h2"
+#line 1215 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
             if (in_class) {
-                perl_syntax = cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes;
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
             }
             else {
-                perl_syntax = cur_state.modifiers.perl_code_syntax;
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
             }
         }
         auto cur {pos + 1}; 
@@ -2128,7 +2288,7 @@ namespace regex {
         return cur; 
     }
 
-#line 1174 "regex.h2"
+#line 1253 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2141,14 +2301,14 @@ namespace regex {
         }
     }
 
-#line 1186 "regex.h2"
+#line 1265 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1187 "regex.h2"
+#line 1266 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1188 "regex.h2"
+#line 1267 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1192 "regex.h2"
+#line 1271 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2156,7 +2316,7 @@ namespace regex {
         return r; 
     }
 
-#line 1199 "regex.h2"
+#line 1278 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2166,7 +2326,7 @@ namespace regex {
         return r; 
     }
 
-#line 1208 "regex.h2"
+#line 1287 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2175,7 +2335,7 @@ namespace regex {
         }
     }
 
-#line 1216 "regex.h2"
+#line 1295 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2186,12 +2346,12 @@ namespace regex {
         }
     }
 
-#line 1226 "regex.h2"
+#line 1305 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1227 "regex.h2"
+#line 1306 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1229 "regex.h2"
+#line 1308 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2213,14 +2373,27 @@ namespace regex {
         }
     }
 
-#line 1250 "regex.h2"
+#line 1329 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1251 "regex.h2"
+#line 1330 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1252 "regex.h2"
+#line 1331 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1254 "regex.h2"
+#line 1333 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
+        if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
+            r.construct(CPP2_UFCS(substr)(regex, pos, n));
+            pos += n - 1;
+            return true; 
+        }
+        else {
+            r.construct("");
+            return false; 
+        }
+    }
+
+#line 1345 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2230,7 +2403,7 @@ namespace regex {
         auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", std::move(start_search))}; 
 
         cpp2::deferred_init r; 
-        if (end != std::string_view::npos) {
+        if (end != std::string::npos) {
             r.construct(CPP2_UFCS(substr)(regex, start, end - std::move(start)));
             pos = std::move(end) - 1;
         }
@@ -2241,13 +2414,29 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1276 "regex.h2"
+#line 1367 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1281 "regex.h2"
+#line 1372 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
+        std::string r {""}; 
+
+        std::string separator {""}; 
+        for ( auto const& cur : list ) {
+            r += separator + func(cur);
+            separator = ", ";
+        }
+
+        return r; 
+    }
+
+#line 1384 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
+
+#line 1390 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2255,34 +2444,28 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1288 "regex.h2"
+#line 1397 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1290 "regex.h2"
+#line 1399 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
-        if (0 == CPP2_UFCS(size)(cur_state.alternate_match_lists)) {return create_matcher_from_list(cur_state.cur_match_list); }
+        if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
-        if (0 == CPP2_UFCS(size)(cur_state.cur_match_list)) {
-            CPP2_UFCS(add)(cur_state, create_matcher("empty_matcher_logic", ""));
+        if (0 == CPP2_UFCS(size)(cur_group_state.cur_match_list)) {
+            CPP2_UFCS(add)(cur_group_state, create_matcher("empty_matcher_logic", ""));
         }
-        CPP2_UFCS(next_alternative)(cur_state);
+        CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
 
-        std::string list {""}; 
-        std::string separator {""}; 
-        for ( auto const& cur : cur_state.alternate_match_lists ) {
-            list += separator + create_matcher_from_list(cur);
-            separator = ", ";
-        }
-
+        auto list {join(cur_group_state.alternate_match_lists, [&](auto const& arg) -> auto { return create_matcher_from_list(arg);  })}; 
         auto alternative_id {alternatives_count}; 
         alternatives_count += 1;
 
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1312 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::create_named_groups_arg() const& -> std::string{
+#line 1415 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
         for ( auto const& cur : named_groups ) {
@@ -2292,21 +2475,57 @@ namespace regex {
         return r; 
     }
 
-#line 1322 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> std::string{
-        std::string r {""}; 
+#line 1427 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
+        auto old_state {group_new_state()}; 
+        parse_until(')');
+        auto inner {create_matcher_from_state()}; 
+        group_restore_state(std::move(old_state));
 
-        std::string separator {""}; 
-        for ( auto const& cur : list ) {
-            r += separator + cur;
-            separator = ", ";
+        CPP2_UFCS(add)(cur_group_state, create_matcher("lookahead_matcher_logic", (cpp2::to_string(positive) + ", \"" + cpp2::to_string(name) + "\", " + cpp2::to_string(std::move(inner)))));
+
+        return true; 
+    }
+
+#line 1438 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
+        std::string r {"0"}; 
+        std::string sep {" | "}; 
+
+        auto add {[&, _1 = std::move(sep)](auto const& name, auto& r) mutable -> void{
+            r += (cpp2::to_string(_1) + cpp2::to_string(name));
+        }}; 
+
+        auto mod_pos {0}; 
+        for( ; cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)); mod_pos += 1 ) {
+            char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
+
+            if (     c == 'i') { add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            else {if (c == 'm') {add("::cpp2::regex::expression_flags::multiple_lines", r); }
+            else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
+            else {if (c == 'n') {
+                add("::cpp2::regex::expression_flags::no_group_captures", r);
+                cur_group_state.modifiers.group_captures_have_numbers = false;
+            }
+            else {if (c == 'x') {
+                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
+                cur_group_state.modifiers.perl_code_syntax = true;
+
+                // Check if we have 'xx'
+                mod_pos += 1;
+                if (cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)) && 'x' == CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)) {
+                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
+                    cur_group_state.modifiers.perl_code_syntax_in_classes = true;
+                }
+            }
+            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}}}
         }
 
         return r; 
     }
 
-#line 1334 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+#line 1474 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2371,39 +2590,39 @@ namespace regex {
         return true; 
     }
 
-#line 1402 "regex.h2"
+#line 1542 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
-        CPP2_UFCS(next_alternative)(cur_state);
+        CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
         return true; 
     }
 
-#line 1410 "regex.h2"
+#line 1550 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
-            CPP2_UFCS(add)(cur_state, create_matcher("line_start_matcher_logic", "true"));
+            CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
             return true; 
         }
         else {if (c == '$') {
-            CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, true"));
+            CPP2_UFCS(add)(cur_group_state, create_matcher("line_end_matcher_logic", "true, true"));
             return true; 
         }}
 
         return false; 
     }
 
-#line 1423 "regex.h2"
+#line 1563 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
-        if (c == '.') {
-            CPP2_UFCS(add)(cur_state, create_matcher("any_matcher_logic", ""));
-            return true; 
-        }
-        return false; 
+        if (c != '.') {return false; }
+
+        CPP2_UFCS(add)(cur_group_state, create_matcher("any_matcher_logic", ""));
+        return true; 
+
     }
 
-#line 1431 "regex.h2"
+#line 1571 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2422,7 +2641,7 @@ namespace regex {
             }
             if (c_cur == '[' && peek_in_class() == ':') {
                 // We have a character class.
-                static_cast(skip_n(2));
+                static_cast(skip_n(2));// Skip [:
 
                 std::string name {""}; 
                 if (!(grab_until(":]", cpp2::out(&name)))) {error("Could not find end of character class."); return false; }
@@ -2437,7 +2656,7 @@ namespace regex {
             }
             else {if (c_cur == '\\') {
                 if (next_no_skip(cpp2::out(&c_cur)) && (c_cur != ']')) {
-                    if ( ' ' == c_cur && cur_state.modifiers.perl_code_syntax && cur_state.modifiers.perl_code_syntax_in_classes) {
+                    if ( ' ' == c_cur && cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes) {
                         CPP2_UFCS(push_back)(classes, std::string(1, c_cur));// TODO: UFCS error with char as argument.
                     }
                     else {
@@ -2507,11 +2726,11 @@ namespace regex {
         }
 
         auto inner {join(std::move(classes))}; 
-        CPP2_UFCS(add)(cur_state, create_matcher("class_matcher_logic", (cpp2::to_string(std::move(negate)) + ", " + cpp2::to_string(std::move(inner)))));
+        CPP2_UFCS(add)(cur_group_state, create_matcher("class_matcher_logic", (cpp2::to_string(std::move(negate)) + ", " + cpp2::to_string(std::move(inner)))));
         return true; 
     }
 
-#line 1538 "regex.h2"
+#line 1678 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2542,30 +2761,41 @@ namespace regex {
 
                 group_id = (*cpp2::assert_not_null(std::move(iter))).second;
             }
-            CPP2_UFCS(add)(cur_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *cpp2::assert_not_null(_2) - _1 + 1)) + "\"")));
+            CPP2_UFCS(add)(cur_group_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *cpp2::assert_not_null(_2) - _1 + 1)) + "\"")));
 
             return true; 
         }}; 
 
-        if ([_0 = '1', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
+        if ([_0 = '0', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
             auto group {grab_number()}; 
-            if (!(add_group_matcher(std::move(group)))) {return false; }
-        }
-        else {if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae"), c_next)) {
-            auto inner {create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "'"))}; 
-            CPP2_UFCS(add)(cur_state, create_matcher("named_matcher_logic", ("\"\\\\" + cpp2::to_string(c_next) + "\", " + cpp2::to_string(std::move(inner)))));
+            if (cpp2::cmp_greater_eq(CPP2_UFCS(ssize)(group),3)) {
+                // \000 syntax
+                auto number {0}; 
+                if (!(string_to_int(group, number, 8))) {error("Could not convert octal to int."); return false; }
+
+                char number_as_char {unsafe_narrow(std::move(number))}; 
+
+                std::string syntax {"\\" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8))}; 
+                auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(std::move(number_as_char))) + "'"))}; 
+                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
+            }
+            else {
+                if (!(add_group_matcher(std::move(group)))) {return false; }
+            }
         }
-        else {if (std::string::npos != CPP2_UFCS(find)(std::string("^.[]$()*{}?+|"), c_next)) {
+        else {if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae^.[]$()*{}?+|"), c_next)) {
             if (c_next == '$') {
                 // TODO: Provide proper escape for cppfront capture
-                CPP2_UFCS(add)(cur_state, create_matcher("line_end_matcher_logic", "true, true"));
+                CPP2_UFCS(add)(cur_group_state, create_matcher("line_end_matcher_logic", "true, true"));
             }
             else {
-                CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", ("'" + cpp2::to_string(c_next) + "', '" + cpp2::to_string(safe_tolower(c_next)) + "', '" + cpp2::to_string(safe_toupper(c_next)) + "'")));
+                auto inner {create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "'"))}; 
+                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\" + cpp2::to_string(c_next) + "\", " + cpp2::to_string(std::move(inner)))));
             }
         }
         else {if ('\\' == c_next) {
-            CPP2_UFCS(add)(cur_state, create_matcher("escaped_char_matcher_logic", "'\\\\', '\\\\', '\\\\'"));
+            auto inner {create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'")}; 
+            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\\\\\\", " + cpp2::to_string(std::move(inner)))));
         }
         else {if ('g' == c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
@@ -2595,43 +2825,90 @@ namespace regex {
             if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
         }
         else {if ('K' == c_next) {
-            CPP2_UFCS(add)(cur_state, create_matcher("global_group_reset", ""));
-        }
-        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_start", "")); }
-        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "false")); }
-        else {if ('B' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("word_boundary_matcher_logic", "true")); }
-        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_digits", "")); }
-        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_digits", "")); }
-        else {if ('h' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_hor_space", "")); }
-        else {if ('H' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_hor_space", "")); }
-        else {if ('N' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_no_new_line", "")); }
-        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_space", "")); }
-        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_space", "")); }
-        else {if ('v' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_ver_space", "")); }
-        else {if ('V' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_ver_space", "")); }
-        else {if ('w' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_word", "")); }
-        else {if ('W' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_class_not_word", "")); }
-        else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
-        else {if ('z' == std::move(c_next)) {CPP2_UFCS(add)(cur_state, create_matcher("named_string_end", "")); }
+            CPP2_UFCS(add)(cur_group_state, create_matcher("global_group_reset", ""));
+        }
+        else {if ('x' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("x escape without number."); return false; }
+            auto has_brackets {false}; 
+            std::string number_str {""}; 
+            if ('{' == c_next) {
+                // TODO: Currently does not work since the compiler handles \x also.
+                // Bracketed
+                has_brackets = true;
+                static_cast(skip());// Skip '{'
+                if (!(grab_until('}', cpp2::out(&number_str)))) {error("No ending bracket for \\x"); return false; }
+            }
+            else {
+                // grab two chars
+
+                if (!(grab_n(2, cpp2::out(&number_str)))) {error("Missing hexadecimal digits after \\x."); return false; }
+            }
+
+            auto number {0}; 
+            if (!(string_to_int(std::move(number_str), number, 16))) {error("Could not convert hexadecimal to int."); return false; }
+
+            char number_as_char {unsafe_narrow(std::move(number))}; 
+
+            std::string syntax {int_to_string(cpp2::as_(number_as_char), 16)}; 
+            if (std::move(has_brackets)) {
+                syntax = { "{" + cpp2::to_string(syntax) + "}" };
+            }
+            syntax = { "\\x" + cpp2::to_string(syntax) };
+            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(std::move(number_as_char))) + "'"))}; 
+            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
+        }
+        else {if ('o' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("o escape without bracket."); return false; }
+            std::string number_str {""}; 
+            if ('{' == c_next) {
+                static_cast(skip());// Skip '{'
+                if (!(grab_until('}', cpp2::out(&number_str)))) {error("No ending bracket for \\o"); return false; }
+            }
+
+            auto number {0}; 
+            if (!(string_to_int(std::move(number_str), number, 8))) {error("Could not convert octal to int."); return false; }
+
+            char number_as_char {unsafe_narrow(std::move(number))}; 
+
+            std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8)) + "}"}; 
+            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(std::move(number_as_char))) + "'"))}; 
+            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
+        }
+        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_start", "")); }
+        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("word_boundary_matcher_logic", "false")); }
+        else {if ('B' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("word_boundary_matcher_logic", "true")); }
+        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_digits", "")); }
+        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_digits", "")); }
+        else {if ('h' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_hor_space", "")); }
+        else {if ('H' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_hor_space", "")); }
+        else {if ('N' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_no_new_line", "")); }
+        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_space", "")); }
+        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_space", "")); }
+        else {if ('v' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_ver_space", "")); }
+        else {if ('V' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_ver_space", "")); }
+        else {if ('w' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_word", "")); }
+        else {if ('W' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_word", "")); }
+        else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
+        else {if ('z' == std::move(c_next)) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_end", "")); }
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}}}}}}}}}}
+        }}}}}}}}}}}}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 1647 "regex.h2"
+#line 1845 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
-        auto has_id {cur_state.modifiers.group_captures_have_numbers}; 
+        auto has_id {cur_group_state.modifiers.group_captures_have_numbers}; 
         auto has_pattern {true}; 
         std::string group_name {""}; 
         auto group_name_brackets {true}; 
         std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
 
-        auto modifiers_change_to {cur_state.modifiers}; 
+        auto modifiers_change_to {cur_group_state.modifiers}; 
 
         char c_next {'\0'}; 
         // Skip the '('
@@ -2666,27 +2943,32 @@ namespace regex {
 
                 if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '|' */
 
-                auto old_parser_state {new_state()}; 
-                auto old_branch_state {group_new_state()}; 
+                auto old_parser_state {group_new_state()}; 
+                auto old_branch_state {branch_reset_new_state()}; 
                 parse_until(')');
                 auto inner {create_matcher_from_state()}; 
-                group_restore_state(std::move(old_branch_state));
-                restore_state(std::move(old_parser_state));
+                branch_reset_restore_state(std::move(old_branch_state));
+                group_restore_state(std::move(old_parser_state));
 
                 auto start_matcher {create_matcher("branch_reset_matcher_logic", "")}; 
                 auto end_matcher {create_matcher("special_group_end_logic", "")}; 
 
                 std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
-                CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v)));
+                CPP2_UFCS(add)(cur_group_state, create_matcher_from_list(std::move(v)));
 
                 return true; 
             }
+            else {if (c_next == '=' || c_next == '!') {
+                static_cast(skip());// Skip '!'
+                // Positive or negative lookahead
+                return parse_lookahead(("?" + cpp2::to_string(c_next)), c_next == '='); 
+            }
             else {
                 // Simple modifier
                 has_id = false;
                 std::string change_str {""}; 
                 if (!(grab_until_one_of("):", cpp2::out(&change_str)))) {error("Missing ending bracket for group."); return false; }
-                if (!(parse_modifiers(std::move(change_str), cpp2::out(&modifier_change), modifiers_change_to))) {
+                if (!(parser_group_modifiers(std::move(change_str), cpp2::out(&modifier_change), modifiers_change_to))) {
                      return false; 
                 }
 
@@ -2696,8 +2978,24 @@ namespace regex {
                 else {
                     if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for group."); return false; }/* skip ':' */
                 }
-            }}}
+            }}}}
         }
+        else {if (std::move(c_next) == '*') {
+            // named pattern
+            static_cast(skip());// Skip *.
+            std::string name {""}; 
+            if (!(grab_until(':', cpp2::out(&name)))) {error("Missing colon for named pattern."); return false; }
+
+            if (name == "pla" || name == "positive_lookahead") {
+                return parse_lookahead(("*" + cpp2::to_string(name) + ":"), true); 
+            }
+            else {if (name == "nla" || name == "negative_lookahead") {
+                return parse_lookahead(("*" + cpp2::to_string(std::move(name)) + ":"), false); 
+            }
+            else {
+                error(("Unknown named group pattern: '" + cpp2::to_string(std::move(name)) + "'")); return false; 
+            }}
+        }}
 
         if (std::move(has_pattern)) {
             // regular group
@@ -2707,11 +3005,11 @@ namespace regex {
                 group_number = CPP2_UFCS(next)(cur_branch_reset_state);
             }
 
-            auto old_state {new_state()}; 
-            cur_state.modifiers = std::move(modifiers_change_to);
+            auto old_state {group_new_state()}; 
+            cur_group_state.modifiers = std::move(modifiers_change_to);
             parse_until(')');
             auto inner {create_matcher_from_state()}; 
-            restore_state(std::move(old_state));
+            group_restore_state(std::move(old_state));
 
             auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", " + cpp2::to_string(std::move(modifier_change)) + ", \"" + cpp2::to_string(group_name) + "\", " + cpp2::to_string(std::move(group_name_brackets))))}; 
             if (0 != CPP2_UFCS(size)(group_name)) {
@@ -2722,42 +3020,30 @@ namespace regex {
             auto end_matcher {create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number))))}; 
 
             std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
-            CPP2_UFCS(add)(cur_state, create_matcher_from_list(std::move(v)));
+            CPP2_UFCS(add)(cur_group_state, create_matcher_from_list(std::move(v)));
         }
         else {
             // Only a modifier
-            cur_state.modifiers = std::move(modifiers_change_to);
-            CPP2_UFCS(add)(cur_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_change)))));
+            cur_group_state.modifiers = std::move(modifiers_change_to);
+            CPP2_UFCS(add)(cur_group_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_change)))));
         }
 
         return true; 
     }
 
-#line 1758 "regex.h2"
+#line 1977 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
-        if (c == '\'') {
-            CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
-            return true; 
-        }
+        if (c != '\'') {return false; }
 
-        return false; 
+        CPP2_UFCS(add)(cur_group_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
+        return true; 
     }
 
-#line 1767 "regex.h2"
+#line 1984 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
-        auto to_int {[&](auto const& str) mutable -> int{
-            // TODO: Add exception handling.
-            // try {
-                return std::stoi(str); 
-            // } catch (_) {
-            //     error("Could not convert range argument '(inner)$' to int.");
-            // }
-            // return 0;
-        }}; 
-
         if (c != '{') {return false; }
-        if (CPP2_UFCS(empty)(cur_state)) {error("'{' without previous element.");return false; }
+        if (CPP2_UFCS(empty)(cur_group_state)) {error("'{' without previous element.");return false; }
         if (!(skip())) {error("End of regex before closing '}'."); return false; }
 
         std::string inner {""}; 
@@ -2786,7 +3072,7 @@ namespace regex {
         if (sep == std::string::npos) {
             min_count = inner;
             max_count = inner;
-            min_count_number = std::move(to_int)(inner);
+            if (!(string_to_int(inner, min_count_number))) {error("Could not convert range to number."); return false; }
             max_count_number = min_count_number;
         }
         else {
@@ -2799,12 +3085,12 @@ namespace regex {
             }
 
             if (!(CPP2_UFCS(empty)(inner_first))) {
-                min_count = inner_first;
-                min_count_number = to_int(std::move(inner_first));
+                min_count = std::move(inner_first);
+                if (!(string_to_int(inner, min_count_number))) {error("Could not convert range to number."); return false; }
             }
             if (!(CPP2_UFCS(empty)(inner_last))) {
-                max_count = inner_last;
-                max_count_number = std::move(to_int)(std::move(inner_last));
+                max_count = std::move(inner_last);
+                if (!(string_to_int(inner, max_count_number))) {error("Could not convert range to number."); return false; }
             }
         }
 
@@ -2813,12 +3099,12 @@ namespace regex {
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive))));  });
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive))));  });
 
         return true; 
     }
 
-#line 1841 "regex.h2"
+#line 2048 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -2847,16 +3133,16 @@ namespace regex {
             static_cast(skip());
         }}
 
-        if (CPP2_UFCS(empty)(cur_state)) {
+        if (CPP2_UFCS(empty)(cur_group_state)) {
             error(("'" + cpp2::to_string(c) + "' without previous element."));
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive)) + ", '" + cpp2::to_string(_3) + "'"));  });
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive)) + ", '" + cpp2::to_string(_3) + "'"));  });
         return true; 
     }
 
-#line 1878 "regex.h2"
+#line 2085 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -2875,55 +3161,18 @@ namespace regex {
             if (has_error) {return ; }
 
             // No special char, push a character match
-            CPP2_UFCS(add)(cur_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "', '" + cpp2::to_string(safe_tolower(c)) + "', '" + cpp2::to_string(safe_toupper(c)) + "'")));
+            CPP2_UFCS(add)(cur_group_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "', '" + cpp2::to_string(safe_tolower(c)) + "', '" + cpp2::to_string(safe_toupper(c)) + "'")));
         }
     }
 
-#line 1900 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse_modifier() & -> std::string{
-        std::string r {"0"}; 
-        std::string sep {" | "}; 
-
-        auto add {[&, _1 = std::move(sep)](auto const& name, auto& r) mutable -> void{
-            r += (cpp2::to_string(_1) + cpp2::to_string(name));
-        }}; 
-
-        auto mod_pos {0}; 
-        for( ; cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)); mod_pos += 1 ) {
-            char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
-
-            if (     c == 'i') { add("::cpp2::regex::expression_flags::case_insensitive", r); }
-            else {if (c == 'm') {add("::cpp2::regex::expression_flags::multiple_lines", r); }
-            else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
-            else {if (c == 'n') {
-                add("::cpp2::regex::expression_flags::no_group_captures", r);
-                cur_state.modifiers.group_captures_have_numbers = false;
-            }
-            else {if (c == 'x') {
-                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
-                cur_state.modifiers.perl_code_syntax = true;
-
-                // Check if we have 'xx'
-                mod_pos += 1;
-                if (cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)) && 'x' == CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)) {
-                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
-                    cur_state.modifiers.perl_code_syntax_in_classes = true;
-                }
-            }
-            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}}}
-        }
-
-        return r; 
-    }
-
-#line 1936 "regex.h2"
+#line 2107 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
-        auto mod {parse_modifier()}; 
+        auto mod {parser_expression_modifiers()}; 
         parse_until('\0');
 
         if (has_error) {return "Error"; }
 
-        auto named_groups_arg {create_named_groups_arg()}; 
+        auto named_groups_arg {create_named_groups_list()}; 
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
@@ -2931,7 +3180,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(cur_branch_reset_state.cur_group) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1952 "regex.h2"
+#line 2123 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2
index fd90077f5e..e818bcabd8 100644
--- a/regression-tests/pure2-regex.cpp2
+++ b/regression-tests/pure2-regex.cpp2
@@ -121,7 +121,7 @@ test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: st
 
   r := regex.search(str);
 
-  if "y" == kind || "yM" == kind || "yS" == kind {
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
     if !r.matched {
       status = "Failure: Regex should apply.";
     }
@@ -150,7 +150,7 @@ test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: st
 }
 
 
-test_general_tests: @regex type = {
+test_perl_tests_general: @regex type = {
   regex_0 := "abc";
   var_regex_0 : std::string = "abc";
   regex_1 := "abc";
@@ -1756,8 +1756,12 @@ test_general_tests: @regex type = {
   regex_661 := "foo # Match foo";
   regex_661_mod := "x";
   var_regex_661 : std::string = "foo # Match foo";
+  regex_662 := "\x41\x42";
+  var_regex_662 : std::string = "\x41\x42";
+  regex_663 := "\101\o{102}";
+  var_regex_663 : std::string = "\101\o{102}";
   run: (this) = {
-    std::cout << "Running general_tests:"<< std::endl;
+    std::cout << "Running perl_tests_general:"<< std::endl;
     test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
     test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
     test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
@@ -2420,9 +2424,156 @@ test_general_tests: @regex type = {
     test(regex_659, 659, "(?-n)(foo)(?n)(bar)", "foobar", "y", "$&-$1-$2", "foobar-foo-");
     test(regex_660, 660, "(?-n:(foo)(?n:(bar)))", "foobar", "y", "$&-$1-$2", "foobar-foo-");
     test(regex_661, 661, "foo # Match foo", "foobar", "y", "$&", "foo");
+    test(regex_662, 662, "\\x41\\x42", "AB", "y", "$&", "AB");
+    test(regex_663, 663, "\\101\\o{102}", "AB", "y", "$&", "AB");
+    std::cout << std::endl;
+  }
+}
+test_perl_tests_lookahead: @regex type = {
+  regex_0 := "a(?!b).";
+  var_regex_0 : std::string = "a(?!b).";
+  regex_1 := "(?=)a";
+  var_regex_1 : std::string = "(?=)a";
+  regex_2 := "a(?=d).";
+  var_regex_2 : std::string = "a(?=d).";
+  regex_3 := "a(?=c|d).";
+  var_regex_3 : std::string = "a(?=c|d).";
+  regex_4 := "^(?:b|a(?=(.)))*\1";
+  var_regex_4 : std::string = "^(?:b|a(?=(.)))*\1";
+  regex_5 := "(?=(a+?))(\1ab)";
+  var_regex_5 : std::string = "(?=(a+?))(\1ab)";
+  regex_6 := "^(?=(a+?))\1ab";
+  var_regex_6 : std::string = "^(?=(a+?))\1ab";
+  regex_7 := "(?=(a+?))(\1ab)";
+  var_regex_7 : std::string = "(?=(a+?))(\1ab)";
+  regex_8 := "^(?=(a+?))\1ab";
+  var_regex_8 : std::string = "^(?=(a+?))\1ab";
+  regex_9 := "(.*)(?=c)";
+  var_regex_9 : std::string = "(.*)(?=c)";
+  regex_10 := "(.*)(?=c)c";
+  var_regex_10 : std::string = "(.*)(?=c)c";
+  regex_11 := "(.*)(?=b|c)";
+  var_regex_11 : std::string = "(.*)(?=b|c)";
+  regex_12 := "(.*)(?=b|c)c";
+  var_regex_12 : std::string = "(.*)(?=b|c)c";
+  regex_13 := "(.*)(?=c|b)";
+  var_regex_13 : std::string = "(.*)(?=c|b)";
+  regex_14 := "(.*)(?=c|b)c";
+  var_regex_14 : std::string = "(.*)(?=c|b)c";
+  regex_15 := "(.*)(?=[bc])";
+  var_regex_15 : std::string = "(.*)(?=[bc])";
+  regex_16 := "(.*)(?=[bc])c";
+  var_regex_16 : std::string = "(.*)(?=[bc])c";
+  regex_17 := "(.*?)(?=c)";
+  var_regex_17 : std::string = "(.*?)(?=c)";
+  regex_18 := "(.*?)(?=c)c";
+  var_regex_18 : std::string = "(.*?)(?=c)c";
+  regex_19 := "(.*?)(?=b|c)";
+  var_regex_19 : std::string = "(.*?)(?=b|c)";
+  regex_20 := "(.*?)(?=b|c)c";
+  var_regex_20 : std::string = "(.*?)(?=b|c)c";
+  regex_21 := "(.*?)(?=c|b)";
+  var_regex_21 : std::string = "(.*?)(?=c|b)";
+  regex_22 := "(.*?)(?=c|b)c";
+  var_regex_22 : std::string = "(.*?)(?=c|b)c";
+  regex_23 := "(.*?)(?=[bc])";
+  var_regex_23 : std::string = "(.*?)(?=[bc])";
+  regex_24 := "(.*?)(?=[bc])c";
+  var_regex_24 : std::string = "(.*?)(?=[bc])c";
+  regex_25 := "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
+  var_regex_25 : std::string = "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
+  regex_26 := "a(?!b(?!c))(..)";
+  var_regex_26 : std::string = "a(?!b(?!c))(..)";
+  regex_27 := "a(?!b(?=a))(..)";
+  var_regex_27 : std::string = "a(?!b(?=a))(..)";
+  regex_28 := "X(\w+)(?=\s)|X(\w+)";
+  var_regex_28 : std::string = "X(\w+)(?=\s)|X(\w+)";
+  regex_29 := "^a*(?=b)b";
+  var_regex_29 : std::string = "^a*(?=b)b";
+  regex_30 := "(?!\A)x";
+  regex_30_mod := "m";
+  var_regex_30 : std::string = "(?!\A)x";
+  regex_31 := "^(o)(?!.*\1)";
+  regex_31_mod := "i";
+  var_regex_31 : std::string = "^(o)(?!.*\1)";
+  regex_32 := ".*a(?!(b|cd)*e).*f";
+  var_regex_32 : std::string = ".*a(?!(b|cd)*e).*f";
+  regex_33 := "^(a*?)(?!(aa|aaaa)*\$)";
+  var_regex_33 : std::string = "^(a*?)(?!(aa|aaaa)*\$)";
+  regex_34 := "(?!)+?|(.{2,4})";
+  var_regex_34 : std::string = "(?!)+?|(.{2,4})";
+  regex_35 := "^(a*?)(?!(a{6}|a{5})*\$)";
+  var_regex_35 : std::string = "^(a*?)(?!(a{6}|a{5})*\$)";
+  regex_36 := "a(?!b(?!c(?!d(?!e))))...(.)";
+  var_regex_36 : std::string = "a(?!b(?!c(?!d(?!e))))...(.)";
+  regex_37 := "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
+  var_regex_37 : std::string = "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
+  regex_38 := "((?s).)c(?!.)";
+  var_regex_38 : std::string = "((?s).)c(?!.)";
+  regex_39 := "((?s).)c(?!.)";
+  var_regex_39 : std::string = "((?s).)c(?!.)";
+  regex_40 := "((?s)b.)c(?!.)";
+  var_regex_40 : std::string = "((?s)b.)c(?!.)";
+  regex_41 := "((?s)b.)c(?!.)";
+  var_regex_41 : std::string = "((?s)b.)c(?!.)";
+  regex_42 := "((?s)b.)c(?!\N)";
+  var_regex_42 : std::string = "((?s)b.)c(?!\\N)";
+  regex_43 := "(b.)c(?!\N)";
+  regex_43_mod := "s";
+  var_regex_43 : std::string = "(b.)c(?!\\N)";
+  regex_44 := "a*(?!)";
+  var_regex_44 : std::string = "a*(?!)";
+  run: (this) = {
+    std::cout << "Running perl_tests_lookahead:"<< std::endl;
+    test(regex_0, 0, "a(?!b).", "abad", "y", "$&", "ad");
+    test(regex_1, 1, "(?=)a", "a", "y", "$&", "a");
+    test(regex_2, 2, "a(?=d).", "abad", "y", "$&", "ad");
+    test(regex_3, 3, "a(?=c|d).", "abad", "y", "$&", "ad");
+    test(regex_4, 4, "^(?:b|a(?=(.)))*\\1", "abc", "y", "$&", "ab");
+    test(regex_5, 5, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
+    test(regex_6, 6, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
+    test(regex_7, 7, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
+    test(regex_8, 8, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
+    test(regex_9, 9, "(.*)(?=c)", "abcd", "y", "$1", "ab");
+    test(regex_10, 10, "(.*)(?=c)c", "abcd", "yB", "$1", "ab");
+    test(regex_11, 11, "(.*)(?=b|c)", "abcd", "y", "$1", "ab");
+    test(regex_12, 12, "(.*)(?=b|c)c", "abcd", "y", "$1", "ab");
+    test(regex_13, 13, "(.*)(?=c|b)", "abcd", "y", "$1", "ab");
+    test(regex_14, 14, "(.*)(?=c|b)c", "abcd", "y", "$1", "ab");
+    test(regex_15, 15, "(.*)(?=[bc])", "abcd", "y", "$1", "ab");
+    test(regex_16, 16, "(.*)(?=[bc])c", "abcd", "yB", "$1", "ab");
+    test(regex_17, 17, "(.*?)(?=c)", "abcd", "y", "$1", "ab");
+    test(regex_18, 18, "(.*?)(?=c)c", "abcd", "yB", "$1", "ab");
+    test(regex_19, 19, "(.*?)(?=b|c)", "abcd", "y", "$1", "a");
+    test(regex_20, 20, "(.*?)(?=b|c)c", "abcd", "y", "$1", "ab");
+    test(regex_21, 21, "(.*?)(?=c|b)", "abcd", "y", "$1", "a");
+    test(regex_22, 22, "(.*?)(?=c|b)c", "abcd", "y", "$1", "ab");
+    test(regex_23, 23, "(.*?)(?=[bc])", "abcd", "y", "$1", "a");
+    test(regex_24, 24, "(.*?)(?=[bc])c", "abcd", "yB", "$1", "ab");
+    test(regex_25, 25, "^(a*?)(?!(aa|aaaa)*\\$)(?=a\\z)", "aaaaaaaa", "y", "$1", "aaaaaaa");
+    test(regex_26, 26, "a(?!b(?!c))(..)", "abababc", "y", "$1", "bc");
+    test(regex_27, 27, "a(?!b(?=a))(..)", "abababc", "y", "$1", "bc");
+    test(regex_28, 28, "X(\\w+)(?=\\s)|X(\\w+)", "Xab", "y", "[$1-$2]", "[-ab]");
+    test(regex_29, 29, "^a*(?=b)b", "ab", "y", "$&", "ab");
+    test(regex_30, 30, "(?!\\A)x", "a\nxb\n", "y", "-", "-");
+    test(regex_31, 31, "^(o)(?!.*\\1)", "Oo", "n", "-", "-");
+    test(regex_32, 32, ".*a(?!(b|cd)*e).*f", "......abef", "n", "-", "-");
+    test(regex_33, 33, "^(a*?)(?!(aa|aaaa)*\\$)", "aaaaaaaaaaaaaaaaaaaa", "y", "$1", "a");
+    test(regex_34, 34, "(?!)+?|(.{2,4})", "abcde", "y", "$1", "abcd");
+    test(regex_35, 35, "^(a*?)(?!(a{6}|a{5})*\\$)", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", "$+[1]", "12");
+    test(regex_36, 36, "a(?!b(?!c(?!d(?!e))))...(.)", "abxabcdxabcde", "y", "$1", "e");
+    test(regex_37, 37, "X(?!b+(?!(c+)*(?!(c+)*d))).*X", "aXbbbbbbbcccccccccccccaaaX", "y", "-", "-");
+    test(regex_38, 38, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1", "\n");
+    test(regex_39, 39, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "\n:\nc");
+    test(regex_40, 40, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1", "b\n");
+    test(regex_41, 41, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_42, 42, "((?s)b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_43, 43, "(b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_44, 44, "a*(?!)", "aaaab", "n", "-", "-");
     std::cout << std::endl;
   }
 }
 main: (args) = {
-    test_general_tests().run();
+    test_perl_tests_general().run();
+    test_perl_tests_lookahead().run();
 }
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
index e60a445a55..f150469d86 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
@@ -1,4 +1,4 @@
-Running general_tests:
+Running perl_tests_general:
 0_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
 1_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
 2_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
@@ -1042,4 +1042,83 @@ ca result_expr: - expected_results -
 659_y: OK regex: (?-n)(foo)(?n)(bar) parsed_regex: (?-n)(foo)(?n)(bar) str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
 660_y: OK regex: (?-n:(foo)(?n:(bar))) parsed_regex: (?-n:(foo)(?n:(bar))) str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
 661_y: OK Warning: Parsed regex does not match. regex: foo # Match foo parsed_regex: foo str: foobar result_expr: $& expected_results foo
+662_y: OK Warning: Parsed regex does not match. regex: \x41\x42 parsed_regex: AB str: AB result_expr: $& expected_results AB
+663_y: OK Warning: Parsed regex does not match. regex: \101\o{102} parsed_regex: AB str: AB result_expr: $& expected_results AB
+
+Running perl_tests_lookahead:
+0_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+1_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+2_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+3_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+4_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+5_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+6_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+7_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+8_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+9_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+10_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+11_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+16_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+17_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+18_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+19_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+20_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+21_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+22_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+23_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+24_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+25_y: OK regex: ^(a*?)(?!(aa|aaaa)*\$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*\$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+26_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+27_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+29_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+30_y: OK regex: (?!\A)x parsed_regex: (?!\A)x str: a
+xb
+ result_expr: - expected_results -
+31_n: OK regex: ^(o)(?!.*\1) parsed_regex: ^(o)(?!.*\1) str: Oo result_expr: - expected_results -
+32_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+33_y: OK regex: ^(a*?)(?!(aa|aaaa)*\$) parsed_regex: ^(a*?)(?!(aa|aaaa)*\$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+34_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+35_y: Failure: Result is wrong. (is: 0) regex: ^(a*?)(?!(a{6}|a{5})*\$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*\$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+36_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+37_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+38_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+39_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+40_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+41_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+42_y: OK regex: ((?s)b.)c(?!\\N) parsed_regex: ((?s)b.)c(?!\\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+43_y: OK regex: (b.)c(?!\\N) parsed_regex: (b.)c(?!\\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+44_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
 
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
index 8c2117b8f8..b0517cebae 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
@@ -1,3 +1,6 @@
+pure2-regex.cpp2:1764: warning: unknown escape sequence: '\)'
+pure2-regex.cpp2:1764: warning: unknown escape sequence: '\)'
+pure2-regex.cpp2:1764: warning: unknown escape sequence: '\)'
 pure2-regex.cpp2:285:38: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:287:38: warning: unknown escape sequence: '\$'
 pure2-regex.cpp2:291:38: warning: unknown escape sequence: '\$'
@@ -313,3 +316,11 @@ pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\w'
 pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\k'
 pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\w'
 pure2-regex.cpp2:1744:39: warning: unknown escape sequence: '\K'
+pure2-regex.cpp2:2484:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:2484:38: warning: unknown escape sequence: '\z'
+pure2-regex.cpp2:2490:38: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:2490:38: warning: unknown escape sequence: '\s'
+pure2-regex.cpp2:2490:38: warning: unknown escape sequence: '\w'
+pure2-regex.cpp2:2495:38: warning: unknown escape sequence: '\A'
+pure2-regex.cpp2:2502:38: warning: unknown escape sequence: '\$'
+pure2-regex.cpp2:2506:38: warning: unknown escape sequence: '\$'
diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp
index e1339d26d7..dee915870d 100644
--- a/regression-tests/test-results/pure2-regex.cpp
+++ b/regression-tests/test-results/pure2-regex.cpp
@@ -9,7 +9,11 @@
 #line 1 "pure2-regex.cpp2"
 
 #line 153 "pure2-regex.cpp2"
-class test_general_tests;
+class test_perl_tests_general;
+  
+
+#line 2432 "pure2-regex.cpp2"
+class test_perl_tests_lookahead;
   
 
 //=== Cpp2 type definitions and function declarations ===========================
@@ -22,7 +26,7 @@ template auto test(M const& regex, cpp2::in id, cpp2::in resultExpected) -> void;
 
 #line 153 "pure2-regex.cpp2"
-class test_general_tests {
+class test_perl_tests_general {
 
   private: std::string var_regex_0 {"abc"}; 
 
@@ -1628,14 +1632,121 @@ class test_general_tests {
 
 #line 1758 "pure2-regex.cpp2"
   private: std::string var_regex_661 {"foo # Match foo"}; 
+
+  private: std::string var_regex_662 {"\x41\x42"}; 
+
+  private: std::string var_regex_663 {"\101\o{102}"}; 
   public: auto run() const& -> void;
-  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::escaped_char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,false,false>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::escaped_char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_589 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_590 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_591 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_592 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_593 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_594 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_595 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_596 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_597 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_598 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_599 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_600 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_601 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_602 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_603 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_604 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_605 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_606 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_607 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_608 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_609 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_610 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_611 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_612 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_613 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_614 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_615 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_616 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_617 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_618 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_619 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_620 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_621 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_622 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_623 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_624 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_625 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_626 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_627 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_628 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_629 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_630 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_631 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_632 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_633 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_634 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_635 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_636 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_637 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_638 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_639 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_640 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_641 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_642 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_643 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_644 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_645 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_646 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_647 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_648 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_649 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_650 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_651 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_652 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_653 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_654 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_655 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_656 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::named_matcher_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_657 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_658 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::modifier_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_659 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_660 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_661 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
-  public: test_general_tests() = default;
-  public: test_general_tests(test_general_tests const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_general_tests const&) -> void = delete;
+  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,false,false>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_589 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_590 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_591 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_592 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_593 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_594 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_595 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_596 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_597 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_598 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_599 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_600 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_601 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_602 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_603 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_604 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_605 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_606 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_607 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_608 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_609 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_610 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_611 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_612 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_613 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_614 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_615 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_616 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_617 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_618 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_619 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_620 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_621 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_622 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_623 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_624 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_625 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_626 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_627 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_628 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_629 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_630 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_631 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_632 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_633 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_634 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_635 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_636 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_637 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_638 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_639 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_640 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_641 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_642 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_643 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_644 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_645 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_646 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_647 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_648 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_649 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_650 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_651 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_652 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_653 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_654 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_655 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_656 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_657 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_658 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::modifier_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_659 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_660 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_661 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_662 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_663 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
+  public: test_perl_tests_general() = default;
+  public: test_perl_tests_general(test_perl_tests_general const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_perl_tests_general const&) -> void = delete;
 
 
-#line 2425 "pure2-regex.cpp2"
+#line 2431 "pure2-regex.cpp2"
+};
+class test_perl_tests_lookahead {
+
+  private: std::string var_regex_0 {"a(?!b)."}; 
+
+  private: std::string var_regex_1 {"(?=)a"}; 
+
+  private: std::string var_regex_2 {"a(?=d)."}; 
+
+  private: std::string var_regex_3 {"a(?=c|d)."}; 
+
+  private: std::string var_regex_4 {"^(?:b|a(?=(.)))*\1"}; 
+
+  private: std::string var_regex_5 {"(?=(a+?))(\1ab)"}; 
+
+  private: std::string var_regex_6 {"^(?=(a+?))\1ab"}; 
+
+  private: std::string var_regex_7 {"(?=(a+?))(\1ab)"}; 
+
+  private: std::string var_regex_8 {"^(?=(a+?))\1ab"}; 
+
+  private: std::string var_regex_9 {"(.*)(?=c)"}; 
+
+  private: std::string var_regex_10 {"(.*)(?=c)c"}; 
+
+  private: std::string var_regex_11 {"(.*)(?=b|c)"}; 
+
+  private: std::string var_regex_12 {"(.*)(?=b|c)c"}; 
+
+  private: std::string var_regex_13 {"(.*)(?=c|b)"}; 
+
+  private: std::string var_regex_14 {"(.*)(?=c|b)c"}; 
+
+  private: std::string var_regex_15 {"(.*)(?=[bc])"}; 
+
+  private: std::string var_regex_16 {"(.*)(?=[bc])c"}; 
+
+  private: std::string var_regex_17 {"(.*?)(?=c)"}; 
+
+  private: std::string var_regex_18 {"(.*?)(?=c)c"}; 
+
+  private: std::string var_regex_19 {"(.*?)(?=b|c)"}; 
+
+  private: std::string var_regex_20 {"(.*?)(?=b|c)c"}; 
+
+  private: std::string var_regex_21 {"(.*?)(?=c|b)"}; 
+
+  private: std::string var_regex_22 {"(.*?)(?=c|b)c"}; 
+
+  private: std::string var_regex_23 {"(.*?)(?=[bc])"}; 
+
+  private: std::string var_regex_24 {"(.*?)(?=[bc])c"}; 
+
+  private: std::string var_regex_25 {"^(a*?)(?!(aa|aaaa)*\$)(?=a\z)"}; 
+
+  private: std::string var_regex_26 {"a(?!b(?!c))(..)"}; 
+
+  private: std::string var_regex_27 {"a(?!b(?=a))(..)"}; 
+
+  private: std::string var_regex_28 {"X(\w+)(?=\s)|X(\w+)"}; 
+
+  private: std::string var_regex_29 {"^a*(?=b)b"}; 
+
+#line 2495 "pure2-regex.cpp2"
+  private: std::string var_regex_30 {"(?!\A)x"}; 
+
+#line 2498 "pure2-regex.cpp2"
+  private: std::string var_regex_31 {"^(o)(?!.*\1)"}; 
+
+  private: std::string var_regex_32 {".*a(?!(b|cd)*e).*f"}; 
+
+  private: std::string var_regex_33 {"^(a*?)(?!(aa|aaaa)*\$)"}; 
+
+  private: std::string var_regex_34 {"(?!)+?|(.{2,4})"}; 
+
+  private: std::string var_regex_35 {"^(a*?)(?!(a{6}|a{5})*\$)"}; 
+
+  private: std::string var_regex_36 {"a(?!b(?!c(?!d(?!e))))...(.)"}; 
+
+  private: std::string var_regex_37 {"X(?!b+(?!(c+)*(?!(c+)*d))).*X"}; 
+
+  private: std::string var_regex_38 {"((?s).)c(?!.)"}; 
+
+  private: std::string var_regex_39 {"((?s).)c(?!.)"}; 
+
+  private: std::string var_regex_40 {"((?s)b.)c(?!.)"}; 
+
+  private: std::string var_regex_41 {"((?s)b.)c(?!.)"}; 
+
+  private: std::string var_regex_42 {"((?s)b.)c(?!\\N)"}; 
+
+#line 2523 "pure2-regex.cpp2"
+  private: std::string var_regex_43 {"(b.)c(?!\\N)"}; 
+
+  private: std::string var_regex_44 {"a*(?!)"}; 
+  public: auto run() const& -> void;
+  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::named_string_end>>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::group_ref_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,1,-1,false,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,2,4,true,false>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,6,6,true,false>>,::cpp2::regex::matcher_list,5,5,true,false>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>>>>>,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>>>>>>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
+  public: test_perl_tests_lookahead() = default;
+  public: test_perl_tests_lookahead(test_perl_tests_lookahead const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_perl_tests_lookahead const&) -> void = delete;
+
+
+#line 2575 "pure2-regex.cpp2"
 };
 auto main(int const argc_, char** argv_) -> int;
 
@@ -1767,7 +1878,7 @@ template auto test(M const& regex, cpp2::in id, cpp2::in auto test(M const& regex, cpp2::in id, cpp2::in void{
-    std::cout << "Running general_tests:" << std::endl;
+#line 1763 "pure2-regex.cpp2"
+  auto test_perl_tests_general::run() const& -> void{
+    std::cout << "Running perl_tests_general:" << std::endl;
     test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
     test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
     test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
@@ -2460,6 +2571,8 @@ template auto test(M const& regex, cpp2::in id, cpp2::in auto test(M const& regex, cpp2::in id, cpp2::in void{
+    std::cout << "Running perl_tests_lookahead:" << std::endl;
+    test(regex_0, 0, "a(?!b).", "abad", "y", "$&", "ad");
+    test(regex_1, 1, "(?=)a", "a", "y", "$&", "a");
+    test(regex_2, 2, "a(?=d).", "abad", "y", "$&", "ad");
+    test(regex_3, 3, "a(?=c|d).", "abad", "y", "$&", "ad");
+    test(regex_4, 4, "^(?:b|a(?=(.)))*\\1", "abc", "y", "$&", "ab");
+    test(regex_5, 5, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
+    test(regex_6, 6, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
+    test(regex_7, 7, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
+    test(regex_8, 8, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
+    test(regex_9, 9, "(.*)(?=c)", "abcd", "y", "$1", "ab");
+    test(regex_10, 10, "(.*)(?=c)c", "abcd", "yB", "$1", "ab");
+    test(regex_11, 11, "(.*)(?=b|c)", "abcd", "y", "$1", "ab");
+    test(regex_12, 12, "(.*)(?=b|c)c", "abcd", "y", "$1", "ab");
+    test(regex_13, 13, "(.*)(?=c|b)", "abcd", "y", "$1", "ab");
+    test(regex_14, 14, "(.*)(?=c|b)c", "abcd", "y", "$1", "ab");
+    test(regex_15, 15, "(.*)(?=[bc])", "abcd", "y", "$1", "ab");
+    test(regex_16, 16, "(.*)(?=[bc])c", "abcd", "yB", "$1", "ab");
+    test(regex_17, 17, "(.*?)(?=c)", "abcd", "y", "$1", "ab");
+    test(regex_18, 18, "(.*?)(?=c)c", "abcd", "yB", "$1", "ab");
+    test(regex_19, 19, "(.*?)(?=b|c)", "abcd", "y", "$1", "a");
+    test(regex_20, 20, "(.*?)(?=b|c)c", "abcd", "y", "$1", "ab");
+    test(regex_21, 21, "(.*?)(?=c|b)", "abcd", "y", "$1", "a");
+    test(regex_22, 22, "(.*?)(?=c|b)c", "abcd", "y", "$1", "ab");
+    test(regex_23, 23, "(.*?)(?=[bc])", "abcd", "y", "$1", "a");
+    test(regex_24, 24, "(.*?)(?=[bc])c", "abcd", "yB", "$1", "ab");
+    test(regex_25, 25, "^(a*?)(?!(aa|aaaa)*\\$)(?=a\\z)", "aaaaaaaa", "y", "$1", "aaaaaaa");
+    test(regex_26, 26, "a(?!b(?!c))(..)", "abababc", "y", "$1", "bc");
+    test(regex_27, 27, "a(?!b(?=a))(..)", "abababc", "y", "$1", "bc");
+    test(regex_28, 28, "X(\\w+)(?=\\s)|X(\\w+)", "Xab", "y", "[$1-$2]", "[-ab]");
+    test(regex_29, 29, "^a*(?=b)b", "ab", "y", "$&", "ab");
+    test(regex_30, 30, "(?!\\A)x", "a\nxb\n", "y", "-", "-");
+    test(regex_31, 31, "^(o)(?!.*\\1)", "Oo", "n", "-", "-");
+    test(regex_32, 32, ".*a(?!(b|cd)*e).*f", "......abef", "n", "-", "-");
+    test(regex_33, 33, "^(a*?)(?!(aa|aaaa)*\\$)", "aaaaaaaaaaaaaaaaaaaa", "y", "$1", "a");
+    test(regex_34, 34, "(?!)+?|(.{2,4})", "abcde", "y", "$1", "abcd");
+    test(regex_35, 35, "^(a*?)(?!(a{6}|a{5})*\\$)", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", "$+[1]", "12");
+    test(regex_36, 36, "a(?!b(?!c(?!d(?!e))))...(.)", "abxabcdxabcde", "y", "$1", "e");
+    test(regex_37, 37, "X(?!b+(?!(c+)*(?!(c+)*d))).*X", "aXbbbbbbbcccccccccccccaaaX", "y", "-", "-");
+    test(regex_38, 38, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1", "\n");
+    test(regex_39, 39, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "\n:\nc");
+    test(regex_40, 40, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1", "b\n");
+    test(regex_41, 41, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_42, 42, "((?s)b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_43, 43, "(b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_44, 44, "a*(?!)", "aaaab", "n", "-", "-");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#line 2576 "pure2-regex.cpp2"
 auto main(int const argc_, char** argv_) -> int{
     auto const args = cpp2::make_args(argc_, argv_); 
-#line 2427 "pure2-regex.cpp2"
-    CPP2_UFCS(run)(test_general_tests());
+#line 2577 "pure2-regex.cpp2"
+    CPP2_UFCS(run)(test_perl_tests_general());
+    CPP2_UFCS(run)(test_perl_tests_lookahead());
 }
 

From 6adf9b4abb4992729bcbb374f528b7acd07d0ecc Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 10 Mar 2024 18:33:56 +0100
Subject: [PATCH 087/161] Fix for greedy range matching.

Greedy ranges matching is now a recursive call which no longer discards
the state of previous iterations of M. This enables the regex to try all
alternatives over the bounds of the greedy method.
---
 include/cpp2regex.h                           | 419 ++++++++++--------
 .../gcc-13/pure2-regex.cpp.execution          |   2 +-
 source/regex.h2                               |  67 ++-
 3 files changed, 286 insertions(+), 202 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index bc18e09c28..f09c5833c0 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -139,38 +139,38 @@ template                    class range_matcher_logic;
 
-#line 911 "regex.h2"
+#line 966 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 930 "regex.h2"
+#line 985 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 981 "regex.h2"
+#line 1036 "regex.h2"
 template class group_name_list;
 
-#line 993 "regex.h2"
+#line 1048 "regex.h2"
 class group_name_list_end;
     
 
-#line 998 "regex.h2"
+#line 1053 "regex.h2"
 template class regular_expression;
 
-#line 1087 "regex.h2"
+#line 1142 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1094 "regex.h2"
+#line 1149 "regex.h2"
 class regex_parser_group_state;
 
-#line 1129 "regex.h2"
+#line 1184 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1156 "regex.h2"
+#line 1211 "regex.h2"
 template class regex_parser;
 
-#line 2130 "regex.h2"
+#line 2185 "regex.h2"
 }
 }
 
@@ -867,34 +867,67 @@ template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 794 "regex.h2"
+#line 797 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 822 "regex.h2"
+#line 825 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 827 "regex.h2"
+#line 830 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 832 "regex.h2"
+#line 835 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 838 "regex.h2"
+#line 841 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 853 "regex.h2"
+#line 856 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
 
-#line 883 "regex.h2"
+#line 884 "regex.h2"
+    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
+
+#line 908 "regex.h2"
+    // private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> match_return = {
+    //     r:= M::match(cur, ctx, modifiers, no_tail());
+    //     if  is_below_upper_bound(count) && r.matched &&
+    //         (is_below_lower_bound(count) || r.pos != cur)
+    //     {
+    //         inner := match_greedy(count + 1, r.pos, cur, ctx, modifiers, other);
+
+    //         if possessive ||  // Do not backtrack if possessive.
+    //            inner.matched {
+    //             return inner;
+    //         }
+    //     }
+
+    //     // No match from the recursion. Try to match our tail.
+    //     if is_in_range(count) {
+    //         o:= other.match(cur, ctx, modifiers);
+
+    //         if o.matched {
+    //             // Rematch M to set the groups.
+    //             M::reset_ranges(ctx);
+    //             _ = M::match(last_valid, ctx, modifiers, no_tail());
+    //         }
+
+    //         return o;
+    //     }
+    //     else {
+    //         return ctx.fail();
+    //     }
+    // }
+
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 907 "regex.h2"
+#line 962 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -907,7 +940,7 @@ template void = delete;
 
 
-#line 924 "regex.h2"
+#line 979 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -918,7 +951,7 @@ template class word_boundary_matcher_logic
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 961 "regex.h2"
+#line 1016 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -926,10 +959,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 969 "regex.h2"
+#line 1024 "regex.h2"
 };
 
-#line 972 "regex.h2"
+#line 1027 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -947,7 +980,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 991 "regex.h2"
+#line 1046 "regex.h2"
 };
 
 class group_name_list_end {
@@ -956,7 +989,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 995 "regex.h2"
+#line 1050 "regex.h2"
 };
 
 // Regular expression implementation
@@ -972,7 +1005,7 @@ template matched_, context const& ctx_);
 
-#line 1013 "regex.h2"
+#line 1068 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -987,7 +1020,7 @@ template void = delete;
 
 
-#line 1029 "regex.h2"
+#line 1084 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -995,13 +1028,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1041 "regex.h2"
+#line 1096 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1063 "regex.h2"
+#line 1118 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1013,7 +1046,7 @@ template void = delete;
 
 
-#line 1076 "regex.h2"
+#line 1131 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1044,15 +1077,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1110 "regex.h2"
+#line 1165 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1116 "regex.h2"
+#line 1171 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1125 "regex.h2"
+#line 1180 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1065,13 +1098,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1143 "regex.h2"
+#line 1198 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1148 "regex.h2"
+#line 1203 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1153 "regex.h2"
+#line 1208 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1093,147 +1126,147 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1178 "regex.h2"
+#line 1233 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1187 "regex.h2"
+#line 1242 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1191 "regex.h2"
+#line 1246 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1206 "regex.h2"
+#line 1261 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1212 "regex.h2"
+#line 1267 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1253 "regex.h2"
+#line 1308 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1265 "regex.h2"
+#line 1320 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1271 "regex.h2"
+#line 1326 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1278 "regex.h2"
+#line 1333 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1287 "regex.h2"
+#line 1342 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1295 "regex.h2"
+#line 1350 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1305 "regex.h2"
+#line 1360 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1329 "regex.h2"
+#line 1384 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1345 "regex.h2"
+#line 1400 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1365 "regex.h2"
+#line 1420 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1372 "regex.h2"
+#line 1427 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1384 "regex.h2"
+#line 1439 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1387 "regex.h2"
+#line 1442 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1397 "regex.h2"
+#line 1452 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1415 "regex.h2"
+#line 1470 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1425 "regex.h2"
+#line 1480 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1438 "regex.h2"
+#line 1493 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1474 "regex.h2"
+#line 1529 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1539 "regex.h2"
+#line 1594 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1550 "regex.h2"
+#line 1605 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1563 "regex.h2"
+#line 1618 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1571 "regex.h2"
+#line 1626 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1678 "regex.h2"
+#line 1733 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1845 "regex.h2"
+#line 1900 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1977 "regex.h2"
+#line 2032 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1984 "regex.h2"
+#line 2039 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2048 "regex.h2"
+#line 2103 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2085 "regex.h2"
+#line 2140 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2107 "regex.h2"
+#line 2162 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2121 "regex.h2"
+#line 2176 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2130 "regex.h2"
+#line 2185 "regex.h2"
 }
 }
 
@@ -1874,18 +1907,21 @@ namespace regex {
 
 #line 785 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
-        if (greedy) {
-            return match_greedy(0, cur, cur, ctx, modifiers, tail); 
+        if (possessive) {
+            return match_possessive(cur, ctx, modifiers, tail); 
+        }
+        else {if (greedy) {
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, tail); 
         }
         else {
             return match_not_greedy(cur, ctx, modifiers, tail); 
-        }
+        }}
     }
 
-#line 794 "regex.h2"
+#line 797 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 796 "regex.h2"
+#line 799 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
@@ -1912,26 +1948,26 @@ namespace regex {
       return r; 
     }
 
-#line 822 "regex.h2"
+#line 825 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 827 "regex.h2"
+#line 830 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 832 "regex.h2"
+#line 835 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 838 "regex.h2"
+#line 841 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -1947,38 +1983,61 @@ namespace regex {
         return res; 
     }
 
-#line 853 "regex.h2"
+#line 856 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
-        auto r {M::match(cur, ctx, modifiers, no_tail())}; 
-        if ( is_below_upper_bound(count) && r.matched && 
-            (is_below_lower_bound(count) || r.pos != cur)) 
-        {
-            auto inner {match_greedy(count + 1, std::move(r).pos, cur, ctx, modifiers, other)}; 
-
-            if (possessive || // Do not backtrack if possessive.
-               inner.matched) {
-                return inner; 
-            }
+        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (&other)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
+            return match_greedy(_0, tail_cur, _1, tail_ctx, tail_modifiers, *cpp2::assert_not_null(_2)); 
+        }}; 
+        auto is_m_valid {true}; 
+        auto r {CPP2_UFCS(fail)(ctx)}; 
+        if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
+            is_m_valid = false;  // Group ranges in M are invalidated through the call.
+            r = CPP2_UFCS(match)(CPP2_UFCS(make_calling)(match_tail(), std::move(inner_call)), cur, ctx, modifiers);
         }
 
-        // No match from the recursion. Try to match our tail.
-        if (is_in_range(count)) {
-            auto o {CPP2_UFCS(match)(other, cur, ctx, modifiers)}; 
+        if (!(r.matched) && is_in_range(count)) {
+            // The recursion did not yield a match try now the tail
+            r = CPP2_UFCS(match)(other, cur, ctx, modifiers);
 
-            if (o.matched) {
-                // Rematch M to set the groups.
+            if (r.matched && !(std::move(is_m_valid))) {
+                // We have a match rematch M if required
                 M::reset_ranges(ctx);
-                static_cast(M::match(last_valid, ctx, modifiers, no_tail()));
+
+                if (cpp2::cmp_greater(count,0)) {
+                    static_cast(M::match(last_valid, ctx, modifiers, no_tail()));
+                }
             }
+        }
 
-            return o; 
+        return r; 
+    }
+
+#line 884 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+        auto count {0}; 
+        auto r {match_min_count(cur, ctx, modifiers, count)}; 
+
+        if (!(r.matched)) {
+          return r; 
         }
-        else {
-            return CPP2_UFCS(fail)(ctx); 
+
+        auto pos {r.pos}; 
+        while( r.matched && is_below_upper_bound(count) ) {
+            r = M::match(pos, ctx, modifiers, no_tail());
+
+            if (pos == r.pos) {
+                break; // Break infinite loop.
+            }
+            if (r.matched) {
+                count += 1;
+                pos = r.pos;
+            }
         }
+
+        return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); 
     }
 
-#line 883 "regex.h2"
+#line 938 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
@@ -2004,7 +2063,7 @@ namespace regex {
         return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 913 "regex.h2"
+#line 968 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (!(greedy)) {
@@ -2017,7 +2076,7 @@ namespace regex {
         return r; 
     }
 
-#line 932 "regex.h2"
+#line 987 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2047,9 +2106,9 @@ namespace regex {
         }
 
     }
-#line 961 "regex.h2"
+#line 1016 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 962 "regex.h2"
+#line 1017 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2058,7 +2117,7 @@ namespace regex {
         }
     }
 
-#line 983 "regex.h2"
+#line 1038 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2068,34 +2127,34 @@ namespace regex {
         }
     }
 
-#line 994 "regex.h2"
+#line 1049 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1008 "regex.h2"
+#line 1063 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1011 "regex.h2"
+#line 1066 "regex.h2"
         }
 
-#line 1013 "regex.h2"
+#line 1068 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1014 "regex.h2"
+#line 1069 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1015 "regex.h2"
+#line 1070 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1016 "regex.h2"
+#line 1071 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1018 "regex.h2"
+#line 1073 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1019 "regex.h2"
+#line 1074 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1020 "regex.h2"
+#line 1075 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1022 "regex.h2"
+#line 1077 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2104,13 +2163,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 1031 "regex.h2"
+#line 1086 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1032 "regex.h2"
+#line 1087 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1033 "regex.h2"
+#line 1088 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1034 "regex.h2"
+#line 1089 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2118,13 +2177,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 1041 "regex.h2"
+#line 1096 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1042 "regex.h2"
+#line 1097 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1043 "regex.h2"
+#line 1098 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1044 "regex.h2"
+#line 1099 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2144,10 +2203,10 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1063 "regex.h2"
+#line 1118 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1068 "regex.h2"
+#line 1123 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2157,24 +2216,24 @@ namespace regex {
         }
     }
 
-#line 1104 "regex.h2"
+#line 1159 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1110 "regex.h2"
+#line 1165 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1116 "regex.h2"
+#line 1171 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1118 "regex.h2"
+#line 1173 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2182,10 +2241,10 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1125 "regex.h2"
+#line 1180 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1135 "regex.h2"
+#line 1190 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2194,29 +2253,29 @@ namespace regex {
         return g; 
     }
 
-#line 1143 "regex.h2"
+#line 1198 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1148 "regex.h2"
+#line 1203 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1172 "regex.h2"
+#line 1227 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1176 "regex.h2"
+#line 1231 "regex.h2"
     }
 
-#line 1180 "regex.h2"
+#line 1235 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2224,12 +2283,12 @@ namespace regex {
         return old_state; 
     }
 
-#line 1187 "regex.h2"
+#line 1242 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1194 "regex.h2"
+#line 1249 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2242,14 +2301,14 @@ namespace regex {
         return old_state; 
     }
 
-#line 1206 "regex.h2"
+#line 1261 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1215 "regex.h2"
+#line 1270 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2288,7 +2347,7 @@ namespace regex {
         return cur; 
     }
 
-#line 1253 "regex.h2"
+#line 1308 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2301,14 +2360,14 @@ namespace regex {
         }
     }
 
-#line 1265 "regex.h2"
+#line 1320 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1266 "regex.h2"
+#line 1321 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1267 "regex.h2"
+#line 1322 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1271 "regex.h2"
+#line 1326 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2316,7 +2375,7 @@ namespace regex {
         return r; 
     }
 
-#line 1278 "regex.h2"
+#line 1333 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2326,7 +2385,7 @@ namespace regex {
         return r; 
     }
 
-#line 1287 "regex.h2"
+#line 1342 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2335,7 +2394,7 @@ namespace regex {
         }
     }
 
-#line 1295 "regex.h2"
+#line 1350 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2346,12 +2405,12 @@ namespace regex {
         }
     }
 
-#line 1305 "regex.h2"
+#line 1360 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1306 "regex.h2"
+#line 1361 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1308 "regex.h2"
+#line 1363 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2373,14 +2432,14 @@ namespace regex {
         }
     }
 
-#line 1329 "regex.h2"
+#line 1384 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1330 "regex.h2"
+#line 1385 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1331 "regex.h2"
+#line 1386 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1333 "regex.h2"
+#line 1388 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2393,7 +2452,7 @@ namespace regex {
         }
     }
 
-#line 1345 "regex.h2"
+#line 1400 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2414,13 +2473,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1367 "regex.h2"
+#line 1422 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1372 "regex.h2"
+#line 1427 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2433,10 +2492,10 @@ namespace regex {
         return r; 
     }
 
-#line 1384 "regex.h2"
+#line 1439 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1390 "regex.h2"
+#line 1445 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2444,10 +2503,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1397 "regex.h2"
+#line 1452 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1399 "regex.h2"
+#line 1454 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -2464,7 +2523,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1415 "regex.h2"
+#line 1470 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2475,7 +2534,7 @@ namespace regex {
         return r; 
     }
 
-#line 1427 "regex.h2"
+#line 1482 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -2487,7 +2546,7 @@ namespace regex {
         return true; 
     }
 
-#line 1438 "regex.h2"
+#line 1493 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2524,7 +2583,7 @@ namespace regex {
         return r; 
     }
 
-#line 1474 "regex.h2"
+#line 1529 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2590,7 +2649,7 @@ namespace regex {
         return true; 
     }
 
-#line 1542 "regex.h2"
+#line 1597 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2599,7 +2658,7 @@ namespace regex {
         return true; 
     }
 
-#line 1550 "regex.h2"
+#line 1605 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2613,7 +2672,7 @@ namespace regex {
         return false; 
     }
 
-#line 1563 "regex.h2"
+#line 1618 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -2622,7 +2681,7 @@ namespace regex {
 
     }
 
-#line 1571 "regex.h2"
+#line 1626 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2730,7 +2789,7 @@ namespace regex {
         return true; 
     }
 
-#line 1678 "regex.h2"
+#line 1733 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2898,7 +2957,7 @@ namespace regex {
         return true; 
     }
 
-#line 1845 "regex.h2"
+#line 1900 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3031,7 +3090,7 @@ namespace regex {
         return true; 
     }
 
-#line 1977 "regex.h2"
+#line 2032 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3039,7 +3098,7 @@ namespace regex {
         return true; 
     }
 
-#line 1984 "regex.h2"
+#line 2039 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3104,7 +3163,7 @@ namespace regex {
         return true; 
     }
 
-#line 2048 "regex.h2"
+#line 2103 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3142,7 +3201,7 @@ namespace regex {
         return true; 
     }
 
-#line 2085 "regex.h2"
+#line 2140 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3165,7 +3224,7 @@ namespace regex {
         }
     }
 
-#line 2107 "regex.h2"
+#line 2162 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_until('\0');
@@ -3180,7 +3239,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(cur_branch_reset_state.cur_group) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2123 "regex.h2"
+#line 2178 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
index f150469d86..0c4f04cab7 100644
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
+++ b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
@@ -1083,7 +1083,7 @@ xb
 32_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
 33_y: OK regex: ^(a*?)(?!(aa|aaaa)*\$) parsed_regex: ^(a*?)(?!(aa|aaaa)*\$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
 34_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
-35_y: Failure: Result is wrong. (is: 0) regex: ^(a*?)(?!(a{6}|a{5})*\$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*\$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+35_y: OK regex: ^(a*?)(?!(a{6}|a{5})*\$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*\$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
 36_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
 37_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
 38_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
diff --git a/source/regex.h2 b/source/regex.h2
index 049d54f4e0..f4e5baa2c1 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -783,8 +783,11 @@ named_string_start:  type == special_syntax_wrapper type = {
 
     match:  (cur: Iter, inout ctx, modifiers, tail) -> _ = {
-        if greedy {
-            return match_greedy(0, cur, cur, ctx, modifiers, tail);
+        if possessive {
+            return match_possessive(cur, ctx, modifiers, tail);
+        }
+        else if greedy {
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, tail);
         }
         else {
             return match_not_greedy(cur, ctx, modifiers, tail);
@@ -851,33 +854,55 @@ range_matcher_logic: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> match_return = {
-        r:= M::match(cur, ctx, modifiers, no_tail());
-        if  is_below_upper_bound(count) && r.matched &&
-            (is_below_lower_bound(count) || r.pos != cur)
-        {
-            inner := match_greedy(count + 1, r.pos, cur, ctx, modifiers, other);
-
-            if possessive ||  // Do not backtrack if possessive.
-               inner.matched {
-                return inner;
-            }
+        inner_call := :(tail_cur, inout tail_ctx, tail_modifiers) -> _ == {
+            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, tail_modifiers, (other&)$*);
+        };
+        is_m_valid := true;
+        r := ctx.fail();
+        if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) {
+            is_m_valid = false;  // Group ranges in M are invalidated through the call.
+            r = match_tail().make_calling(inner_call).match(cur, ctx, modifiers);
         }
 
-        // No match from the recursion. Try to match our tail.
-        if is_in_range(count) {
-            o:= other.match(cur, ctx, modifiers);
+        if !r.matched && is_in_range(count) {
+            // The recursion did not yield a match try now the tail
+            r = other.match(cur, ctx, modifiers);
 
-            if o.matched {
-                // Rematch M to set the groups.
+            if r.matched && !is_m_valid{
+                // We have a match rematch M if required
                 M::reset_ranges(ctx);
-                _ = M::match(last_valid, ctx, modifiers, no_tail());
+
+                if count > 0 {
+                    _ = M::match(last_valid, ctx, modifiers, no_tail());
+                }
             }
+        }
 
-            return o;
+        return r;
+    }
+
+    private match_possessive: (cur: Iter, inout ctx, modifiers, other) -> match_return = {
+        count :=0;
+        r := match_min_count(cur, ctx, modifiers, count);
+
+        if !r.matched {
+          return r;
         }
-        else {
-            return ctx.fail();
+
+        pos := r.pos;
+        while r.matched && is_below_upper_bound(count) {
+            r = M::match(pos, ctx, modifiers, no_tail());
+
+            if pos == r.pos {
+                break; // Break infinite loop.
+            }
+            if r.matched {
+                count += 1;
+                pos = r.pos;
+            }
         }
+
+        return other.match(pos, ctx, modifiers);
     }
 
     private match_not_greedy: (cur: Iter, inout ctx, modifiers, other) -> match_return = {

From a054d749955c7fbda2795340374111722255e84b Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 10 Mar 2024 18:54:06 +0100
Subject: [PATCH 088/161] Better template arguments for range matchers.

---
 include/cpp2regex.h | 869 ++++++++++++++++++++++----------------------
 source/regex.h2     |  47 ++-
 2 files changed, 457 insertions(+), 459 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index f09c5833c0..1f7ca9f3f0 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -18,159 +18,163 @@ namespace regex {
 #line 31 "regex.h2"
 class expression_flags;
 
-#line 40 "regex.h2"
+#line 43 "regex.h2"
+class range_flags;
+    
+
+#line 49 "regex.h2"
 template class match_group;
     
 
-#line 47 "regex.h2"
+#line 56 "regex.h2"
 template class match_return;
     
 
-#line 52 "regex.h2"
+#line 61 "regex.h2"
 template class match_context;
 
-#line 137 "regex.h2"
+#line 146 "regex.h2"
 template class match_modifiers_state_change;
 
-#line 163 "regex.h2"
+#line 172 "regex.h2"
 template class match_modifiers;
 
-#line 186 "regex.h2"
+#line 195 "regex.h2"
 template class match_tail;
     
 
-#line 208 "regex.h2"
+#line 217 "regex.h2"
 template class calling_match_tail;
     
 
-#line 238 "regex.h2"
+#line 247 "regex.h2"
 template class single_class_entry;
 
-#line 246 "regex.h2"
+#line 255 "regex.h2"
 template class range_class_entry;
 
-#line 254 "regex.h2"
+#line 263 "regex.h2"
 template class combined_class_entry;
     
 
-#line 261 "regex.h2"
+#line 270 "regex.h2"
 template class list_class_entry;
     
 
-#line 268 "regex.h2"
+#line 277 "regex.h2"
 template class named_class_entry;
     
 
-#line 273 "regex.h2"
+#line 282 "regex.h2"
 template class negated_class_entry;
     
 
-#line 280 "regex.h2"
+#line 289 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 332 "regex.h2"
+#line 341 "regex.h2"
 template class empty_matcher_logic;
 
-#line 340 "regex.h2"
+#line 349 "regex.h2"
 template class extract_position_helper;
     
 
-#line 355 "regex.h2"
+#line 364 "regex.h2"
 template class matcher_list;
     
 
-#line 366 "regex.h2"
+#line 375 "regex.h2"
 template class special_syntax_wrapper;
     
 
-#line 383 "regex.h2"
+#line 392 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 467 "regex.h2"
+#line 476 "regex.h2"
 template class any_matcher_logic;
 
-#line 486 "regex.h2"
+#line 495 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 494 "regex.h2"
+#line 503 "regex.h2"
 template class char_matcher_logic;
 
-#line 522 "regex.h2"
+#line 531 "regex.h2"
 template class class_matcher_logic;
 
-#line 571 "regex.h2"
+#line 580 "regex.h2"
 template class global_group_reset;
     
 
-#line 583 "regex.h2"
+#line 592 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 620 "regex.h2"
+#line 629 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 644 "regex.h2"
+#line 653 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 652 "regex.h2"
+#line 661 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 685 "regex.h2"
+#line 694 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 705 "regex.h2"
+#line 714 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 722 "regex.h2"
+#line 731 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 745 "regex.h2"
+#line 754 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 757 "regex.h2"
+#line 766 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 783 "regex.h2"
-template class range_matcher_logic;
+#line 792 "regex.h2"
+template class range_matcher_logic;
 
-#line 966 "regex.h2"
-template class special_range_matcher_logic;
+#line 945 "regex.h2"
+template class special_range_matcher_logic;
     
 
-#line 985 "regex.h2"
+#line 964 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1036 "regex.h2"
+#line 1015 "regex.h2"
 template class group_name_list;
 
-#line 1048 "regex.h2"
+#line 1027 "regex.h2"
 class group_name_list_end;
     
 
-#line 1053 "regex.h2"
+#line 1032 "regex.h2"
 template class regular_expression;
 
-#line 1142 "regex.h2"
+#line 1121 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1149 "regex.h2"
+#line 1128 "regex.h2"
 class regex_parser_group_state;
 
-#line 1184 "regex.h2"
+#line 1163 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1211 "regex.h2"
+#line 1190 "regex.h2"
 template class regex_parser;
 
-#line 2185 "regex.h2"
+#line 2162 "regex.h2"
 }
 }
 
@@ -223,6 +227,20 @@ class expression_flags {
 };
 #line 39 "regex.h2"
 
+// TODO: @enum as template parameter yields two error:
+//     error: type 'range_flags' of non-type template parameter is not a structural type
+//     error: non-type template parameter has incomplete type 'range_flags'
+class range_flags {
+    public: static const int not_greedy;
+    public: static const int greedy;
+    public: static const int possessive;
+
+    public: range_flags() = default;
+    public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(range_flags const&) -> void = delete;
+};
+#line 48 "regex.h2"
+
 template class match_group {
     public: Iter start {}; 
     public: Iter end {}; 
@@ -245,13 +263,13 @@ template cl
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     public: match_context(match_context const& that);
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
     // Getter and setter for groups
@@ -260,22 +278,22 @@ template cl
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 77 "regex.h2"
+#line 86 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 83 "regex.h2"
+#line 92 "regex.h2"
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 90 "regex.h2"
+#line 99 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 95 "regex.h2"
+#line 104 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 99 "regex.h2"
+#line 108 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 103 "regex.h2"
+#line 112 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
     // Getter and setter for alternatives
@@ -284,12 +302,12 @@ template cl
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 113 "regex.h2"
+#line 122 "regex.h2"
     // Misc functions
     //
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 129 "regex.h2"
+#line 138 "regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::in cur) const& -> auto;
 
@@ -307,13 +325,13 @@ template
 
     public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
 
-#line 155 "regex.h2"
+#line 164 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: match_modifiers_state_change() = default;
     public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_modifiers_state_change const&) -> void = delete;
 
-#line 156 "regex.h2"
+#line 165 "regex.h2"
 };
 
 using match_modifiers_no_change = match_modifiers_state_change;
@@ -340,7 +358,7 @@ template class match_modifiers {
     public: auto operator=(match_modifiers const&) -> void = delete;
 
 
-#line 179 "regex.h2"
+#line 188 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression.
@@ -365,7 +383,7 @@ template class match_tail {
     public: match_tail(match_tail const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_tail const&) -> void = delete;
 
-#line 199 "regex.h2"
+#line 208 "regex.h2"
 };
 
 //  Represents the remainder of the regular expression. Will call a function wen the end is reached.
@@ -379,10 +397,10 @@ template class calling_match_ta
     private: Call call; 
 
     public: explicit calling_match_tail(auto const& call_);
-#line 211 "regex.h2"
+#line 220 "regex.h2"
     public: auto operator=(auto const& call_) -> calling_match_tail& ;
 
-#line 215 "regex.h2"
+#line 224 "regex.h2"
     public: [[nodiscard]] auto match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
 
     private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
@@ -396,7 +414,7 @@ template class calling_match_ta
     public: calling_match_tail(calling_match_tail const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(calling_match_tail const&) -> void = delete;
 
-#line 225 "regex.h2"
+#line 234 "regex.h2"
 };
 
 template using no_tail = match_tail;
@@ -418,7 +436,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 242 "regex.h2"
+#line 251 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -431,7 +449,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 250 "regex.h2"
+#line 259 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -443,7 +461,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 257 "regex.h2"
+#line 266 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -455,7 +473,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 264 "regex.h2"
+#line 273 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 271 "regex.h2"
+#line 280 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -477,7 +495,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 276 "regex.h2"
+#line 285 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -489,10 +507,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 283 "regex.h2"
+#line 292 "regex.h2"
 };
 
-#line 286 "regex.h2"
+#line 295 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -523,7 +541,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 317 "regex.h2"
+#line 326 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -547,7 +565,7 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 336 "regex.h2"
+#line 345 "regex.h2"
 };
 
 // Helper for greedy alternatives
@@ -555,14 +573,14 @@ template class empty_matcher_logic {
 template class extract_position_helper {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 349 "regex.h2"
+#line 358 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 351 "regex.h2"
+#line 360 "regex.h2"
 };
 
 // A list of matchers. Prepends to the current match tail.
@@ -570,14 +588,14 @@ template class extract_position_helper {
 template class matcher_list {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 359 "regex.h2"
+#line 368 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: matcher_list() = default;
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 361 "regex.h2"
+#line 370 "regex.h2"
 };
 
 // Helper for standard matchers with special syntax
@@ -590,7 +608,7 @@ template class special_synta
     public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_syntax_wrapper const&) -> void = delete;
 
-#line 369 "regex.h2"
+#line 378 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -600,7 +618,7 @@ template class special_synta
 //-----------------------------------------------------------------------
 //
 
-#line 379 "regex.h2"
+#line 388 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -609,20 +627,20 @@ template class alternative
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 397 "regex.h2"
+#line 406 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 415 "regex.h2"
+#line 424 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 463 "regex.h2"
+#line 472 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -631,14 +649,14 @@ template class any_matcher_logic
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 480 "regex.h2"
+#line 489 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 482 "regex.h2"
+#line 491 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -651,7 +669,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 490 "regex.h2"
+#line 499 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -660,27 +678,27 @@ template class char_matcher_logic
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 515 "regex.h2"
+#line 524 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 517 "regex.h2"
+#line 526 "regex.h2"
 };
 
-#line 520 "regex.h2"
+#line 529 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 543 "regex.h2"
+#line 552 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 555 "regex.h2"
+#line 564 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -689,7 +707,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 567 "regex.h2"
+#line 576 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -697,14 +715,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 577 "regex.h2"
+#line 586 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 579 "regex.h2"
+#line 588 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -712,23 +730,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto;
 
-#line 591 "regex.h2"
+#line 600 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 597 "regex.h2"
+#line 606 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 618 "regex.h2"
+#line 627 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, auto const& other) -> auto;
 
-#line 632 "regex.h2"
+#line 641 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -737,7 +755,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 642 "regex.h2"
+#line 651 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -748,7 +766,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 648 "regex.h2"
+#line 657 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -756,14 +774,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 679 "regex.h2"
+#line 688 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 681 "regex.h2"
+#line 690 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -772,14 +790,14 @@ template cl
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 699 "regex.h2"
+#line 708 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 701 "regex.h2"
+#line 710 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -788,14 +806,14 @@ template class line_start_matcher_logic
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 716 "regex.h2"
+#line 725 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 718 "regex.h2"
+#line 727 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -804,14 +822,14 @@ template cla
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 739 "regex.h2"
+#line 748 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 741 "regex.h2"
+#line 750 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -820,14 +838,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
 
-#line 750 "regex.h2"
+#line 759 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 752 "regex.h2"
+#line 761 "regex.h2"
 };
 
 // Named character classes
@@ -839,7 +857,7 @@ template                    void = delete;
 
 
-#line 759 "regex.h2"
+#line 768 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -849,7 +867,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 769 "regex.h2"
+#line 778 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -861,78 +879,48 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 782 "regex.h2"
+#line 791 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
-template class range_matcher_logic {
+template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
 
-#line 797 "regex.h2"
+#line 806 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 825 "regex.h2"
+#line 834 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 830 "regex.h2"
+#line 839 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 835 "regex.h2"
+#line 844 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 841 "regex.h2"
+#line 850 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
 
-#line 856 "regex.h2"
+#line 865 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
 
-#line 884 "regex.h2"
+#line 893 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
 
-#line 908 "regex.h2"
-    // private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> match_return = {
-    //     r:= M::match(cur, ctx, modifiers, no_tail());
-    //     if  is_below_upper_bound(count) && r.matched &&
-    //         (is_below_lower_bound(count) || r.pos != cur)
-    //     {
-    //         inner := match_greedy(count + 1, r.pos, cur, ctx, modifiers, other);
-
-    //         if possessive ||  // Do not backtrack if possessive.
-    //            inner.matched {
-    //             return inner;
-    //         }
-    //     }
-
-    //     // No match from the recursion. Try to match our tail.
-    //     if is_in_range(count) {
-    //         o:= other.match(cur, ctx, modifiers);
-
-    //         if o.matched {
-    //             // Rematch M to set the groups.
-    //             M::reset_ranges(ctx);
-    //             _ = M::match(last_valid, ctx, modifiers, no_tail());
-    //         }
-
-    //         return o;
-    //     }
-    //     else {
-    //         return ctx.fail();
-    //     }
-    // }
-
+#line 917 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 962 "regex.h2"
+#line 941 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
-template class special_range_matcher_logic: public range_matcher_logic {
+template class special_range_matcher_logic: public range_matcher_logic {
 
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: special_range_matcher_logic() = default;
@@ -940,7 +928,7 @@ template void = delete;
 
 
-#line 979 "regex.h2"
+#line 958 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -951,7 +939,7 @@ template class word_boundary_matcher_logic
  {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
-#line 1016 "regex.h2"
+#line 995 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -959,10 +947,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1024 "regex.h2"
+#line 1003 "regex.h2"
 };
 
-#line 1027 "regex.h2"
+#line 1006 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -980,7 +968,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1046 "regex.h2"
+#line 1025 "regex.h2"
 };
 
 class group_name_list_end {
@@ -989,7 +977,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1050 "regex.h2"
+#line 1029 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1005,7 +993,7 @@ template matched_, context const& ctx_);
 
-#line 1068 "regex.h2"
+#line 1047 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1020,7 +1008,7 @@ template void = delete;
 
 
-#line 1084 "regex.h2"
+#line 1063 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1028,13 +1016,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1096 "regex.h2"
+#line 1075 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1118 "regex.h2"
+#line 1097 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1046,7 +1034,7 @@ template void = delete;
 
 
-#line 1131 "regex.h2"
+#line 1110 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1077,15 +1065,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1165 "regex.h2"
+#line 1144 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1171 "regex.h2"
+#line 1150 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1180 "regex.h2"
+#line 1159 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1098,13 +1086,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1198 "regex.h2"
+#line 1177 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1203 "regex.h2"
+#line 1182 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1208 "regex.h2"
+#line 1187 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1126,147 +1114,147 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1233 "regex.h2"
+#line 1212 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1242 "regex.h2"
+#line 1221 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1246 "regex.h2"
+#line 1225 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1261 "regex.h2"
+#line 1240 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1267 "regex.h2"
+#line 1246 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1308 "regex.h2"
+#line 1287 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1320 "regex.h2"
+#line 1299 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1326 "regex.h2"
+#line 1305 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1333 "regex.h2"
+#line 1312 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1342 "regex.h2"
+#line 1321 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1350 "regex.h2"
+#line 1329 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1360 "regex.h2"
+#line 1339 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1384 "regex.h2"
+#line 1363 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1400 "regex.h2"
+#line 1379 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1420 "regex.h2"
+#line 1399 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1427 "regex.h2"
+#line 1406 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1439 "regex.h2"
+#line 1418 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1442 "regex.h2"
+#line 1421 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1452 "regex.h2"
+#line 1431 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1470 "regex.h2"
+#line 1449 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1480 "regex.h2"
+#line 1459 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1493 "regex.h2"
+#line 1472 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1529 "regex.h2"
+#line 1508 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1594 "regex.h2"
+#line 1573 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1605 "regex.h2"
+#line 1584 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1618 "regex.h2"
+#line 1597 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1626 "regex.h2"
+#line 1605 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1733 "regex.h2"
+#line 1712 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1900 "regex.h2"
+#line 1879 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2032 "regex.h2"
+#line 2011 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2039 "regex.h2"
+#line 2018 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2103 "regex.h2"
+#line 2081 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2140 "regex.h2"
+#line 2117 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2162 "regex.h2"
+#line 2139 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2176 "regex.h2"
+#line 2153 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2185 "regex.h2"
+#line 2162 "regex.h2"
 }
 }
 
@@ -1288,34 +1276,39 @@ namespace regex {
     inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax = 16;
     inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax_in_classes = 32;
 
-#line 60 "regex.h2"
+#line 44 "regex.h2"
+    inline CPP2_CONSTEXPR int range_flags::not_greedy = 1;
+    inline CPP2_CONSTEXPR int range_flags::greedy = 2;
+    inline CPP2_CONSTEXPR int range_flags::possessive = 3;
+
+#line 69 "regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 63 "regex.h2"
+#line 72 "regex.h2"
     }
 
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 65 "regex.h2"
+#line 74 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1323,24 +1316,24 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
-#line 69 "regex.h2"
+#line 78 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 71 "regex.h2"
+#line 80 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 77 "regex.h2"
+#line 86 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 83 "regex.h2"
+#line 92 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
@@ -1348,34 +1341,34 @@ namespace regex {
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 90 "regex.h2"
+#line 99 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 95 "regex.h2"
+#line 104 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 99 "regex.h2"
+#line 108 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 103 "regex.h2"
+#line 112 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-#line 107 "regex.h2"
+#line 116 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 109 "regex.h2"
+#line 118 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
-#line 115 "regex.h2"
+#line 124 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -1390,18 +1383,18 @@ namespace regex {
         return r; 
     }
 
-#line 129 "regex.h2"
+#line 138 "regex.h2"
     template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
-#line 130 "regex.h2"
+#line 139 "regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 139 "regex.h2"
+#line 148 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
 
-#line 144 "regex.h2"
+#line 153 "regex.h2"
     template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
         auto new_flags {old_flags}; 
         if (reset) {
@@ -1413,116 +1406,116 @@ namespace regex {
         return new_flags; 
     }
 
-#line 155 "regex.h2"
+#line 164 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 165 "regex.h2"
+#line 174 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
-#line 169 "regex.h2"
+#line 178 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
-#line 170 "regex.h2"
+#line 179 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
-#line 171 "regex.h2"
+#line 180 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
-#line 176 "regex.h2"
+#line 185 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 187 "regex.h2"
+#line 196 "regex.h2"
     template  [[nodiscard]] auto match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 189 "regex.h2"
+#line 198 "regex.h2"
     template  template [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
         return First::match(cur, ctx, modifiers, match_tail());  }
-#line 191 "regex.h2"
+#line 200 "regex.h2"
     template  [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
-#line 193 "regex.h2"
+#line 202 "regex.h2"
     template  auto match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 194 "regex.h2"
+#line 203 "regex.h2"
     template  [[nodiscard]] auto match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 196 "regex.h2"
+#line 205 "regex.h2"
     template  template [[nodiscard]] auto match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return match_tail();  }
 
-#line 198 "regex.h2"
+#line 207 "regex.h2"
     template  template [[nodiscard]] auto match_tail::make_calling(Call const& call) const& -> auto { return calling_match_tail(call);  }
 
-#line 211 "regex.h2"
+#line 220 "regex.h2"
     template  calling_match_tail::calling_match_tail(auto const& call_)
         : call{ call_ }{
 
-#line 213 "regex.h2"
+#line 222 "regex.h2"
     }
-#line 211 "regex.h2"
+#line 220 "regex.h2"
     template  auto calling_match_tail::operator=(auto const& call_) -> calling_match_tail& {
         call = call_;
         return *this;
 
-#line 213 "regex.h2"
+#line 222 "regex.h2"
     }
 
-#line 215 "regex.h2"
+#line 224 "regex.h2"
     template  [[nodiscard]] auto calling_match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
 
-#line 217 "regex.h2"
+#line 226 "regex.h2"
     template  template [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
         return First::match(cur, ctx, modifiers, calling_match_tail(call));  }
-#line 219 "regex.h2"
+#line 228 "regex.h2"
     template  [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return call(cur, ctx, modifiers);  }
 
-#line 221 "regex.h2"
+#line 230 "regex.h2"
     template  auto calling_match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 222 "regex.h2"
+#line 231 "regex.h2"
     template  [[nodiscard]] auto calling_match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 224 "regex.h2"
+#line 233 "regex.h2"
     template  template [[nodiscard]] auto calling_match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return calling_match_tail(call);  }
 
-#line 240 "regex.h2"
+#line 249 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 241 "regex.h2"
+#line 250 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 248 "regex.h2"
+#line 257 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 249 "regex.h2"
+#line 258 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 255 "regex.h2"
+#line 264 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 256 "regex.h2"
+#line 265 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 262 "regex.h2"
+#line 271 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 263 "regex.h2"
+#line 272 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 269 "regex.h2"
+#line 278 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 270 "regex.h2"
+#line 279 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 275 "regex.h2"
+#line 284 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 281 "regex.h2"
+#line 290 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 282 "regex.h2"
+#line 291 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
 
-#line 333 "regex.h2"
+#line 342 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers); }
-#line 334 "regex.h2"
+#line 343 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 335 "regex.h2"
+#line 344 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
 
-#line 341 "regex.h2"
+#line 350 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         auto r {CPP2_UFCS(match)(other, cur, ctx, modifiers)}; 
         if (r.matched) {
@@ -1531,24 +1524,24 @@ namespace regex {
         return r; 
     }
 
-#line 349 "regex.h2"
+#line 358 "regex.h2"
     template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
-#line 350 "regex.h2"
+#line 359 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
-#line 356 "regex.h2"
+#line 365 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { 
         return CPP2_UFCS(match)(CPP2_UFCS(prepend)(other, List()...), cur, ctx, modifiers);  }
 
-#line 359 "regex.h2"
+#line 368 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 360 "regex.h2"
+#line 369 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 368 "regex.h2"
+#line 377 "regex.h2"
     template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
 
-#line 385 "regex.h2"
+#line 394 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1561,12 +1554,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, tail); 
         }
     }
-#line 397 "regex.h2"
+#line 406 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 398 "regex.h2"
+#line 407 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 400 "regex.h2"
+#line 409 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, tail)}; 
         if (r.matched) {
@@ -1582,7 +1575,7 @@ namespace regex {
         }
     }
 
-#line 415 "regex.h2"
+#line 424 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
         auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, CPP2_UFCS(prepend)(tail, extract_position_helper()))}; 
 
@@ -1598,7 +1591,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 431 "regex.h2"
+#line 440 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1610,7 +1603,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 443 "regex.h2"
+#line 452 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1632,7 +1625,7 @@ namespace regex {
         }
     }
 
-#line 469 "regex.h2"
+#line 478 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -1644,19 +1637,19 @@ namespace regex {
         }
     }
 
-#line 480 "regex.h2"
+#line 489 "regex.h2"
     template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 481 "regex.h2"
+#line 490 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 487 "regex.h2"
+#line 496 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
-#line 488 "regex.h2"
+#line 497 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 489 "regex.h2"
+#line 498 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 496 "regex.h2"
+#line 505 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1676,12 +1669,12 @@ namespace regex {
         }
 
     }
-#line 515 "regex.h2"
+#line 524 "regex.h2"
     template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 516 "regex.h2"
+#line 525 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 524 "regex.h2"
+#line 533 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1701,7 +1694,7 @@ namespace regex {
         }
     }
 
-#line 543 "regex.h2"
+#line 552 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1714,10 +1707,10 @@ namespace regex {
         return r; 
     }
 
-#line 555 "regex.h2"
+#line 564 "regex.h2"
     template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 557 "regex.h2"
+#line 566 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1729,18 +1722,18 @@ namespace regex {
         return r; 
     }
 
-#line 572 "regex.h2"
+#line 581 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
     }
 
-#line 577 "regex.h2"
+#line 586 "regex.h2"
     template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
-#line 578 "regex.h2"
+#line 587 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 584 "regex.h2"
+#line 593 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -1748,14 +1741,14 @@ namespace regex {
         return CPP2_UFCS(match)(other, cur, ctx, Modifiers::push(ModifierChange())); 
     }
 
-#line 591 "regex.h2"
+#line 600 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 597 "regex.h2"
+#line 606 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1778,7 +1771,7 @@ namespace regex {
         }
     }
 
-#line 621 "regex.h2"
+#line 630 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, auto const& other) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -1790,10 +1783,10 @@ namespace regex {
         return r; 
     }
 
-#line 632 "regex.h2"
+#line 641 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
 
-#line 634 "regex.h2"
+#line 643 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -1803,14 +1796,14 @@ namespace regex {
         }
     }
 
-#line 645 "regex.h2"
+#line 654 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
-#line 646 "regex.h2"
+#line 655 "regex.h2"
     template  auto special_group_end_logic::reset_ranges(auto& ctx) -> void{}
-#line 647 "regex.h2"
+#line 656 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 653 "regex.h2"
+#line 662 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1837,12 +1830,12 @@ namespace regex {
         }
 
     }
-#line 679 "regex.h2"
+#line 688 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 680 "regex.h2"
+#line 689 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 687 "regex.h2"
+#line 696 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
@@ -1855,12 +1848,12 @@ namespace regex {
         }}
     }
 
-#line 699 "regex.h2"
+#line 708 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 700 "regex.h2"
+#line 709 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 707 "regex.h2"
+#line 716 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
@@ -1870,12 +1863,12 @@ namespace regex {
         }
 
     }
-#line 716 "regex.h2"
+#line 725 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 717 "regex.h2"
+#line 726 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 724 "regex.h2"
+#line 733 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, no_tail())}; 
 
@@ -1891,38 +1884,38 @@ namespace regex {
         }
 
     }
-#line 739 "regex.h2"
+#line 748 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 740 "regex.h2"
+#line 749 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 747 "regex.h2"
+#line 756 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto{
         return CPP2_UFCS(match)(other, cur, ctx, Modifier::replace(ModifierChange())); 
     }
-#line 750 "regex.h2"
+#line 759 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 751 "regex.h2"
+#line 760 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 785 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
-        if (possessive) {
+#line 794 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, tail); 
         }
-        else {if (greedy) {
+        else {if (range_flags::greedy == kind) {
             return match_greedy(0, cur, ctx.end, ctx, modifiers, tail); 
         }
-        else {
+        else { // range_flags::not_greedy == kind
             return match_not_greedy(cur, ctx, modifiers, tail); 
         }}
     }
 
-#line 797 "regex.h2"
-    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
+#line 806 "regex.h2"
+    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 799 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
+#line 808 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
       if (min_count == max_count) {
@@ -1938,37 +1931,37 @@ namespace regex {
         r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}");
       }}}
 
-      if (!(greedy)) {
+      if (kind == range_flags::not_greedy) {
         r += "?";
       }
-      else {if (possessive) {
+      else {if (kind == range_flags::possessive) {
         r += "+";
       }}
 
       return r; 
     }
 
-#line 825 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
+#line 834 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 830 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
+#line 839 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 835 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
+#line 844 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 841 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+#line 850 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
 
@@ -1983,8 +1976,8 @@ namespace regex {
         return res; 
     }
 
-#line 856 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+#line 865 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (&other)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, tail_modifiers, *cpp2::assert_not_null(_2)); 
         }}; 
@@ -2012,8 +2005,8 @@ namespace regex {
         return r; 
     }
 
-#line 884 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+#line 893 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, count)}; 
 
@@ -2037,8 +2030,8 @@ namespace regex {
         return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); 
     }
 
-#line 938 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+#line 917 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, count)}; 
         if (!(start.matched)) {
@@ -2063,20 +2056,20 @@ namespace regex {
         return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); // Upper bound reached.
     }
 
-#line 968 "regex.h2"
-    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
+#line 947 "regex.h2"
+    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
-        if (!(greedy)) {
+        if (kind == range_flags::not_greedy) {
             r += "?";
         }
-        else {if (possessive) {
+        else {if (kind == range_flags::possessive) {
             r += "+";
         }}
 
         return r; 
     }
 
-#line 987 "regex.h2"
+#line 966 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2106,9 +2099,9 @@ namespace regex {
         }
 
     }
-#line 1016 "regex.h2"
+#line 995 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
-#line 1017 "regex.h2"
+#line 996 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2117,7 +2110,7 @@ namespace regex {
         }
     }
 
-#line 1038 "regex.h2"
+#line 1017 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2127,34 +2120,34 @@ namespace regex {
         }
     }
 
-#line 1049 "regex.h2"
+#line 1028 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1063 "regex.h2"
+#line 1042 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1066 "regex.h2"
+#line 1045 "regex.h2"
         }
 
-#line 1068 "regex.h2"
+#line 1047 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1069 "regex.h2"
+#line 1048 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1070 "regex.h2"
+#line 1049 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1071 "regex.h2"
+#line 1050 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1073 "regex.h2"
+#line 1052 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1074 "regex.h2"
+#line 1053 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1075 "regex.h2"
+#line 1054 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1077 "regex.h2"
+#line 1056 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2163,13 +2156,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 1086 "regex.h2"
+#line 1065 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1087 "regex.h2"
+#line 1066 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1088 "regex.h2"
+#line 1067 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1089 "regex.h2"
+#line 1068 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2177,13 +2170,13 @@ namespace regex {
         return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
     }
 
-#line 1096 "regex.h2"
+#line 1075 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1097 "regex.h2"
+#line 1076 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1098 "regex.h2"
+#line 1077 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1099 "regex.h2"
+#line 1078 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2203,10 +2196,10 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1118 "regex.h2"
+#line 1097 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1123 "regex.h2"
+#line 1102 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2216,24 +2209,24 @@ namespace regex {
         }
     }
 
-#line 1159 "regex.h2"
+#line 1138 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1165 "regex.h2"
+#line 1144 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1171 "regex.h2"
+#line 1150 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1173 "regex.h2"
+#line 1152 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2241,10 +2234,10 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1180 "regex.h2"
+#line 1159 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1190 "regex.h2"
+#line 1169 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2253,29 +2246,29 @@ namespace regex {
         return g; 
     }
 
-#line 1198 "regex.h2"
+#line 1177 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1203 "regex.h2"
+#line 1182 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1227 "regex.h2"
+#line 1206 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1231 "regex.h2"
+#line 1210 "regex.h2"
     }
 
-#line 1235 "regex.h2"
+#line 1214 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2283,12 +2276,12 @@ namespace regex {
         return old_state; 
     }
 
-#line 1242 "regex.h2"
+#line 1221 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1249 "regex.h2"
+#line 1228 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2301,14 +2294,14 @@ namespace regex {
         return old_state; 
     }
 
-#line 1261 "regex.h2"
+#line 1240 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1270 "regex.h2"
+#line 1249 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2347,7 +2340,7 @@ namespace regex {
         return cur; 
     }
 
-#line 1308 "regex.h2"
+#line 1287 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2360,14 +2353,14 @@ namespace regex {
         }
     }
 
-#line 1320 "regex.h2"
+#line 1299 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1321 "regex.h2"
+#line 1300 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1322 "regex.h2"
+#line 1301 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1326 "regex.h2"
+#line 1305 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2375,7 +2368,7 @@ namespace regex {
         return r; 
     }
 
-#line 1333 "regex.h2"
+#line 1312 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2385,7 +2378,7 @@ namespace regex {
         return r; 
     }
 
-#line 1342 "regex.h2"
+#line 1321 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2394,7 +2387,7 @@ namespace regex {
         }
     }
 
-#line 1350 "regex.h2"
+#line 1329 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2405,12 +2398,12 @@ namespace regex {
         }
     }
 
-#line 1360 "regex.h2"
+#line 1339 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1361 "regex.h2"
+#line 1340 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1363 "regex.h2"
+#line 1342 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2432,14 +2425,14 @@ namespace regex {
         }
     }
 
-#line 1384 "regex.h2"
+#line 1363 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1385 "regex.h2"
+#line 1364 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1386 "regex.h2"
+#line 1365 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1388 "regex.h2"
+#line 1367 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2452,7 +2445,7 @@ namespace regex {
         }
     }
 
-#line 1400 "regex.h2"
+#line 1379 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2473,13 +2466,13 @@ namespace regex {
         return r.value(); 
     }
 
-#line 1422 "regex.h2"
+#line 1401 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1427 "regex.h2"
+#line 1406 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2492,10 +2485,10 @@ namespace regex {
         return r; 
     }
 
-#line 1439 "regex.h2"
+#line 1418 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1445 "regex.h2"
+#line 1424 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2503,10 +2496,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1452 "regex.h2"
+#line 1431 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1454 "regex.h2"
+#line 1433 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -2523,7 +2516,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1470 "regex.h2"
+#line 1449 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2534,7 +2527,7 @@ namespace regex {
         return r; 
     }
 
-#line 1482 "regex.h2"
+#line 1461 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -2546,7 +2539,7 @@ namespace regex {
         return true; 
     }
 
-#line 1493 "regex.h2"
+#line 1472 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2583,7 +2576,7 @@ namespace regex {
         return r; 
     }
 
-#line 1529 "regex.h2"
+#line 1508 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2649,7 +2642,7 @@ namespace regex {
         return true; 
     }
 
-#line 1597 "regex.h2"
+#line 1576 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2658,7 +2651,7 @@ namespace regex {
         return true; 
     }
 
-#line 1605 "regex.h2"
+#line 1584 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2672,7 +2665,7 @@ namespace regex {
         return false; 
     }
 
-#line 1618 "regex.h2"
+#line 1597 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -2681,7 +2674,7 @@ namespace regex {
 
     }
 
-#line 1626 "regex.h2"
+#line 1605 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2789,7 +2782,7 @@ namespace regex {
         return true; 
     }
 
-#line 1733 "regex.h2"
+#line 1712 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2957,7 +2950,7 @@ namespace regex {
         return true; 
     }
 
-#line 1900 "regex.h2"
+#line 1879 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3090,7 +3083,7 @@ namespace regex {
         return true; 
     }
 
-#line 2032 "regex.h2"
+#line 2011 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3098,7 +3091,7 @@ namespace regex {
         return true; 
     }
 
-#line 2039 "regex.h2"
+#line 2018 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3111,14 +3104,13 @@ namespace regex {
         inner = trim_copy(inner);
         if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
-        auto greedy {true}; 
-        auto possessive {false}; 
+        auto kind {range_flags::greedy}; 
         if (peek() == '?') {
-            greedy = false;
+            kind = range_flags::not_greedy;
             static_cast(skip());
         }
         else {if (peek() == '+') {
-            possessive = true;
+            kind = range_flags::possessive;
             static_cast(skip());
         }}
 
@@ -3158,12 +3150,12 @@ namespace regex {
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive))));  });
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(kind))));  });
 
         return true; 
     }
 
-#line 2103 "regex.h2"
+#line 2081 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3181,14 +3173,13 @@ namespace regex {
             return false; 
         }}}
 
-        auto greedy {true}; 
-        auto possessive {false}; 
+        auto kind {range_flags::greedy}; 
         if (peek() == '?') {
-            greedy = false;
+            kind = range_flags::not_greedy;
             static_cast(skip());
         }
         else {if (peek() == '+') {
-            possessive = true;
+            kind = range_flags::possessive;
             static_cast(skip());
         }}
 
@@ -3197,11 +3188,11 @@ namespace regex {
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(greedy)) + ", " + cpp2::to_string(std::move(possessive)) + ", '" + cpp2::to_string(_3) + "'"));  });
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(kind)) + ", '" + cpp2::to_string(_3) + "'"));  });
         return true; 
     }
 
-#line 2140 "regex.h2"
+#line 2117 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3224,7 +3215,7 @@ namespace regex {
         }
     }
 
-#line 2162 "regex.h2"
+#line 2139 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_until('\0');
@@ -3239,7 +3230,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(cur_branch_reset_state.cur_group) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2178 "regex.h2"
+#line 2155 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index f4e5baa2c1..029c6bc5ce 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -37,6 +37,15 @@ expression_flags: type = {
     perl_code_syntax_in_classes: int  == 32;  // mod: xx
 }
 
+// TODO: @enum as template parameter yields two error:
+//     error: type 'range_flags' of non-type template parameter is not a structural type
+//     error: non-type template parameter has incomplete type 'range_flags'
+range_flags: type = {
+    not_greedy: int == 1;
+    greedy:     int == 2;
+    possessive: int == 3;
+}
+
 match_group: @struct  type = {
     start: Iter = ();
     end: Iter = ();
@@ -780,16 +789,16 @@ named_string_start:  type == special_syntax_wrapper{min, max}  Example: a{2,4}
-range_matcher_logic:  type = {
+range_matcher_logic:  type = {
 
     match:  (cur: Iter, inout ctx, modifiers, tail) -> _ = {
-        if possessive {
+        if range_flags::possessive == kind {
             return match_possessive(cur, ctx, modifiers, tail);
         }
-        else if greedy {
+        else if range_flags::greedy == kind {
             return match_greedy(0, cur, ctx.end, ctx, modifiers, tail);
         }
-        else {
+        else { // range_flags::not_greedy == kind
             return match_not_greedy(cur, ctx, modifiers, tail);
         }
     }
@@ -812,10 +821,10 @@ range_matcher_logic:  type = {
-    this: range_matcher_logic = ();
+special_range_matcher_logic:  type = {
+    this: range_matcher_logic = ();
     to_string: () -> bstring = {
         r := M::to_string() + symbol;
-        if !greedy {
+        if kind == range_flags::not_greedy {
             r += "?";
         }
-        else if possessive {
+        else if kind == range_flags::possessive {
             r += "+";
         }
 
@@ -2018,14 +2027,13 @@ regex_parser:  type = {
         inner = trim_copy(inner);
         if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
 
-        greedy := true;
-        possessive := false;
+        kind := range_flags::greedy;
         if peek() == '?' {
-            greedy = false;
+            kind = range_flags::not_greedy;
             _ = skip();
         }
         else if peek() == '+' {
-            possessive = true;
+            kind = range_flags::possessive;
             _ = skip();
         }
 
@@ -2065,7 +2073,7 @@ regex_parser:  type = {
             return false;
         }
 
-        cur_group_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$, (greedy)$, (possessive)$"));
+        cur_group_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$, (kind)$"));
 
         return true;
     }
@@ -2087,14 +2095,13 @@ regex_parser:  type = {
             return false;
         }
 
-        greedy := true;
-        possessive := false;
+        kind := range_flags::greedy;
         if peek() == '?' {
-            greedy = false;
+            kind = range_flags::not_greedy;
             _ = skip();
         }
         else if peek() == '+' {
-            possessive = true;
+            kind = range_flags::possessive;
             _ = skip();
         }
 
@@ -2103,7 +2110,7 @@ regex_parser:  type = {
             return false;
         }
 
-        cur_group_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, (greedy)$, (possessive)$, '(c$)$'"));
+        cur_group_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, (kind)$, '(c$)$'"));
         return true;
     }
 

From a7daf8043e19b9ec03c1cccf36c2e3636dc2a79a Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 10 Mar 2024 19:03:05 +0100
Subject: [PATCH 089/161] Update for regex tests.

---
 regression-tests/pure2-regex.cpp2             |  2 +-
 regression-tests/test-results/pure2-regex.cpp | 24 +++++++++----------
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2
index e818bcabd8..ee690581fa 100644
--- a/regression-tests/pure2-regex.cpp2
+++ b/regression-tests/pure2-regex.cpp2
@@ -2573,7 +2573,7 @@ test_perl_tests_lookahead: @regex type = {
     std::cout << std::endl;
   }
 }
-main: (args) = {
+main: () = {
     test_perl_tests_general().run();
     test_perl_tests_lookahead().run();
 }
diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp
index dee915870d..287b24836f 100644
--- a/regression-tests/test-results/pure2-regex.cpp
+++ b/regression-tests/test-results/pure2-regex.cpp
@@ -1637,7 +1637,7 @@ class test_perl_tests_general {
 
   private: std::string var_regex_663 {"\101\o{102}"}; 
   public: auto run() const& -> void;
-  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,false,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,false>,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,false,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,false,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,false,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,false,false>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,true,true,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,true,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,true,true>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,true,true,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::matcher_list,0,1,true,false,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_589 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_590 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_591 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_592 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_593 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_594 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_595 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_596 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_597 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_598 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_599 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_600 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_601 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_602 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_603 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_604 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_605 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_606 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_607 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_608 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_609 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_610 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_611 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,true,false>>,::cpp2::regex::group_matcher_end_logic>> regex_612 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_613 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_614 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_615 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_616 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_617 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_618 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_619 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_620 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_621 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_622 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_623 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_624 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_625 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_626 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_627 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_628 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_629 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,true,false,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_630 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_631 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_632 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_633 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_634 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_635 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_636 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_637 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_638 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_639 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_640 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,true,false>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_641 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_642 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_643 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_644 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_645 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_646 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_647 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_648 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_649 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_650 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_651 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_652 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_653 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_654 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_655 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_656 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_657 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_658 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::modifier_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_659 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_660 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_661 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_662 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_663 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
+  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,2,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,2>,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,2,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,2,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_589 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_590 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_591 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_592 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_593 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_594 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_595 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_596 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_597 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_598 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_599 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_600 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_601 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_602 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_603 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_604 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_605 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_606 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_607 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_608 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_609 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_610 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_611 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_612 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_613 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_614 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_615 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_616 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_617 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_618 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_619 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_620 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_621 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_622 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_623 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_624 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_625 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_626 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_627 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_628 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_629 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_630 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_631 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_632 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_633 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_634 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_635 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_636 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_637 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_638 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_639 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_640 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_641 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_642 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_643 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_644 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_645 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_646 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_647 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_648 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_649 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_650 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_651 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_652 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_653 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_654 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_655 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_656 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_657 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_658 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::modifier_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_659 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_660 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_661 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_662 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_663 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
   public: test_perl_tests_general() = default;
   public: test_perl_tests_general(test_perl_tests_general const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_perl_tests_general const&) -> void = delete;
@@ -1740,7 +1740,7 @@ class test_perl_tests_lookahead {
 
   private: std::string var_regex_44 {"a*(?!)"}; 
   public: auto run() const& -> void;
-  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::named_string_end>>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::group_ref_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,1,-1,false,false,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,2,4,true,false>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,false,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,6,6,true,false>>,::cpp2::regex::matcher_list,5,5,true,false>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>>>>>,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,1,-1,true,false,'+'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,true,false,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>>>>>>,::cpp2::regex::special_range_matcher_logic,0,-1,true,false,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,true,false,'*'>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,true,false,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,false,false,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,true,false,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
+  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::named_string_end>>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,0,-1,2,'*'>,::cpp2::regex::group_ref_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,1,-1,1,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,2,4,2>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,6,6,2>>,::cpp2::regex::matcher_list,5,5,2>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>>>>>,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,1,-1,2,'+'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>>>>>>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
   public: test_perl_tests_lookahead() = default;
   public: test_perl_tests_lookahead(test_perl_tests_lookahead const&) = delete; /* No 'that' constructor, suppress copy */
   public: auto operator=(test_perl_tests_lookahead const&) -> void = delete;
@@ -1748,7 +1748,7 @@ class test_perl_tests_lookahead {
 
 #line 2575 "pure2-regex.cpp2"
 };
-auto main(int const argc_, char** argv_) -> int;
+auto main() -> int;
 
 //=== Cpp2 function definitions =================================================
 
@@ -1808,18 +1808,18 @@ auto main(int const argc_, char** argv_) -> int;
             ++next; // Skip {
             auto group {extract_until(next, '}')}; 
             ++next; // Skip }
-            result += CPP2_UFCS(group)(r, group);
+            result += CPP2_UFCS(group)(r, std::move(group));
           }
           else {if (*cpp2::assert_not_null(next) == '[') {
             ++next; // Skip [
             auto group {extract_group_and_advance(next)}; 
             ++next; // Skip ]
 
-            if (is_start) {
-              result += std::to_string(CPP2_UFCS(group_start)(r, group));
+            if (std::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, std::move(group)));
             }
             else {
-              result += std::to_string(CPP2_UFCS(group_end)(r, group));
+              result += std::to_string(CPP2_UFCS(group_end)(r, std::move(group)));
             }
           }
           else {
@@ -1829,7 +1829,7 @@ auto main(int const argc_, char** argv_) -> int;
         }
         else {if (std::isdigit(*cpp2::assert_not_null(next))) {
           auto group {extract_group_and_advance(next)}; 
-          result += CPP2_UFCS(group)(r, group);
+          result += CPP2_UFCS(group)(r, std::move(group));
         }
         else {
           std::cerr << "Not implemented";
@@ -1848,7 +1848,7 @@ auto main(int const argc_, char** argv_) -> int;
             else {
               pos = CPP2_UFCS(group_end)(r, i);
             }
-            result +=  std::to_string(pos);
+            result +=  std::to_string(std::move(pos));
           }
         }
         else {
@@ -1859,7 +1859,7 @@ auto main(int const argc_, char** argv_) -> int;
         std::cerr << "Not implemented.";
       }}
     }
-    iter = next;
+    iter = std::move(next);
   }
 
   return result; 
@@ -3337,9 +3337,7 @@ template auto test(M const& regex, cpp2::in id, cpp2::in int{
-    auto const args = cpp2::make_args(argc_, argv_); 
-#line 2577 "pure2-regex.cpp2"
+auto main() -> int{
     CPP2_UFCS(run)(test_perl_tests_general());
     CPP2_UFCS(run)(test_perl_tests_lookahead());
 }

From 8ea456193bcf759ec305dab2de6f8618e7d2b1c2 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 10 Mar 2024 21:03:19 +0100
Subject: [PATCH 090/161] Changes for new analysis.

---
 include/cpp2regex.h | 118 ++++++++++++++++++++++----------------------
 source/reflect.h    |  34 ++++++-------
 source/regex.h2     |  48 +++++++++---------
 3 files changed, 100 insertions(+), 100 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 1f7ca9f3f0..1eda6545c4 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -371,7 +371,7 @@ template class match_tail {
 
     private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
 
-    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto;
 
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -559,7 +559,7 @@ template                      using short_not_word_class = negat
 //
 template class empty_matcher_logic {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: empty_matcher_logic() = default;
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -574,7 +574,7 @@ template class extract_position_helper {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 358 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
@@ -650,7 +650,7 @@ template class any_matcher_logic
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 489 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -663,7 +663,7 @@ template class any_matcher_logic
 //
 template class branch_reset_matcher_logic {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: branch_reset_matcher_logic() = default;
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -679,7 +679,7 @@ template class char_matcher_logic
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 524 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -699,7 +699,7 @@ template class class_matcher_logi
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
 #line 564 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: class_matcher_logic() = default;
@@ -716,7 +716,7 @@ template class global_group_reset {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 586 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
@@ -744,10 +744,10 @@ template class group_matcher_end_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, Modifier const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
 
 #line 641 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_end_logic() = default;
@@ -760,7 +760,7 @@ template class group_matcher_end_logic {
 
 template class special_group_end_logic {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: special_group_end_logic() = default;
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -775,7 +775,7 @@ template class group_ref_matcher
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 688 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -791,7 +791,7 @@ template cl
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 708 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -807,7 +807,7 @@ template class line_start_matcher_logic
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 725 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -839,7 +839,7 @@ template class modifier_matcher_logic
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
 
 #line 759 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -940,7 +940,7 @@ template class word_boundary_matcher_logic
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
 
 #line 995 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
     public: word_boundary_matcher_logic(word_boundary_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
@@ -1431,7 +1431,7 @@ namespace regex {
     template  template [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
         return First::match(cur, ctx, modifiers, match_tail());  }
 #line 200 "regex.h2"
-    template  [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
+    template  [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
 #line 202 "regex.h2"
     template  auto match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
@@ -1511,7 +1511,7 @@ namespace regex {
 #line 342 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers); }
 #line 343 "regex.h2"
-    template  auto empty_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 344 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
 
@@ -1525,7 +1525,7 @@ namespace regex {
     }
 
 #line 358 "regex.h2"
-    template  auto extract_position_helper::reset_ranges(auto& ctx) -> void{}
+    template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 359 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
@@ -1638,14 +1638,14 @@ namespace regex {
     }
 
 #line 489 "regex.h2"
-    template  auto any_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 490 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
 #line 496 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
 #line 497 "regex.h2"
-    template  auto branch_reset_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 498 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
@@ -1670,7 +1670,7 @@ namespace regex {
 
     }
 #line 524 "regex.h2"
-    template  auto char_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 525 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
@@ -1708,7 +1708,7 @@ namespace regex {
     }
 
 #line 564 "regex.h2"
-    template  auto class_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
 #line 566 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
@@ -1729,7 +1729,7 @@ namespace regex {
     }
 
 #line 586 "regex.h2"
-    template  auto global_group_reset::reset_ranges(auto& ctx) -> void{}
+    template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 587 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
@@ -1772,7 +1772,7 @@ namespace regex {
     }
 
 #line 630 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, Modifier const& modifiers, auto const& other) -> auto{
+    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
         }
@@ -1784,7 +1784,7 @@ namespace regex {
     }
 
 #line 641 "regex.h2"
-    template  auto group_matcher_end_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
 #line 643 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
@@ -1799,7 +1799,7 @@ namespace regex {
 #line 654 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
 #line 655 "regex.h2"
-    template  auto special_group_end_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 656 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
@@ -1831,7 +1831,7 @@ namespace regex {
 
     }
 #line 688 "regex.h2"
-    template  auto group_ref_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 689 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
@@ -1849,7 +1849,7 @@ namespace regex {
     }
 
 #line 708 "regex.h2"
-    template  auto line_end_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 709 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
@@ -1864,7 +1864,7 @@ namespace regex {
 
     }
 #line 725 "regex.h2"
-    template  auto line_start_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 726 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
@@ -1894,7 +1894,7 @@ namespace regex {
         return CPP2_UFCS(match)(other, cur, ctx, Modifier::replace(ModifierChange())); 
     }
 #line 759 "regex.h2"
-    template  auto modifier_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 760 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
@@ -2050,7 +2050,7 @@ namespace regex {
                 return CPP2_UFCS(fail)(ctx); 
             }
             count += 1;
-            pos = r.pos;
+            pos = std::move(r).pos;
         }
 
         return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); // Upper bound reached.
@@ -2079,12 +2079,12 @@ namespace regex {
             }
         }
         else {if (cur == ctx.end) {// String end
-            is_match = CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)));
+            is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null((cur - 1)));
         }
         else { // Middle of string
             is_match = 
                    (CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)))) // End of word: \w\W
-                || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur)));// Start of word: \W\w
+                || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)));// Start of word: \W\w
 
         }}
         if (negate) {
@@ -2100,7 +2100,7 @@ namespace regex {
 
     }
 #line 995 "regex.h2"
-    template  auto word_boundary_matcher_logic::reset_ranges(auto& ctx) -> void{}
+    template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 996 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
@@ -2167,7 +2167,7 @@ namespace regex {
         context ctx {start, end}; 
 
         auto r {CPP2_UFCS(match)(Matcher(), start, ctx, modifiers(), no_tail())}; 
-        return search_return(r.matched && std::move(r).pos == end, std::move(ctx)); 
+        return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
 #line 1075 "regex.h2"
@@ -2320,7 +2320,7 @@ namespace regex {
                 if (space_class::includes(n)) {
                     continue;
                 }
-                else {if (!(in_class) && '#' == n) {
+                else {if (!(in_class) && '#' == std::move(n)) {
                     cur = CPP2_UFCS(find)(regex, "\n", cur);
                     if (std::string::npos == cur) {
                         // No new line, comment runs until the end of the pattern
@@ -2456,14 +2456,14 @@ namespace regex {
 
         cpp2::deferred_init r; 
         if (end != std::string::npos) {
-            r.construct(CPP2_UFCS(substr)(regex, start, end - std::move(start)));
+            r.construct(CPP2_UFCS(substr)(regex, start, end - start));
             pos = std::move(end) - 1;
         }
         else {
             r.construct(CPP2_UFCS(substr)(regex, std::move(start)));
             pos = CPP2_UFCS(size)(regex) - 1;
         }
-        return r.value(); 
+        return std::move(r.value()); 
     }
 
 #line 1401 "regex.h2"
@@ -2570,7 +2570,7 @@ namespace regex {
                     cur_group_state.modifiers.perl_code_syntax_in_classes = true;
                 }
             }
-            else {error(("Unknown modifier: '" + cpp2::to_string(c) + "'")); }}}}}
+            else {error(("Unknown modifier: '" + cpp2::to_string(std::move(c)) + "'")); }}}}}
         }
 
         return r; 
@@ -2633,7 +2633,7 @@ namespace regex {
                 }
             }
             else {
-                error(("Unknown modifier: " + cpp2::to_string(cur))); return false; 
+                error(("Unknown modifier: " + cpp2::to_string(std::move(cur)))); return false; 
             }}}}}}}
         }
 
@@ -2702,7 +2702,7 @@ namespace regex {
                     return false; 
                 }
 
-                CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
+                CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
 
                 static_cast(skip());// Skip ':' pointing to the ending ']'.
             }
@@ -2727,7 +2727,7 @@ namespace regex {
                             error("Unknown group escape.");
                             return false; 
                         }}}}}}}}}}
-                        CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(name) + ":]"));
+                        CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
                     }
                 }else {
                     error("Escape without a following character.");
@@ -2767,7 +2767,7 @@ namespace regex {
         for ( auto& cur : classes ) {
             if (CPP2_UFCS(starts_with)(cur, "[:")) {
                 auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; 
-                cur = create_matcher((cpp2::to_string(name) + "_class"), "");
+                cur = create_matcher((cpp2::to_string(std::move(name)) + "_class"), "");
             }
             else {if (1 != CPP2_UFCS(size)(cur)) {
                 cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"));
@@ -2823,16 +2823,16 @@ namespace regex {
             if (cpp2::cmp_greater_eq(CPP2_UFCS(ssize)(group),3)) {
                 // \000 syntax
                 auto number {0}; 
-                if (!(string_to_int(group, number, 8))) {error("Could not convert octal to int."); return false; }
+                if (!(string_to_int(std::move(group), number, 8))) {error("Could not convert octal to int."); return false; }
 
                 char number_as_char {unsafe_narrow(std::move(number))}; 
 
                 std::string syntax {"\\" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8))}; 
-                auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(std::move(number_as_char))) + "'"))}; 
+                auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
                 CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
             }
             else {
-                if (!(add_group_matcher(std::move(group)))) {return false; }
+                if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
             }
         }
         else {if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae^.[]$()*{}?+|"), c_next)) {
@@ -2842,7 +2842,7 @@ namespace regex {
             }
             else {
                 auto inner {create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "'"))}; 
-                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\" + cpp2::to_string(c_next) + "\", " + cpp2::to_string(std::move(inner)))));
+                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\" + cpp2::to_string(std::move(c_next)) + "\", " + cpp2::to_string(std::move(inner)))));
             }
         }
         else {if ('\\' == c_next) {
@@ -2859,7 +2859,7 @@ namespace regex {
             else {
                 group = grab_number();
             }
-            if (!(add_group_matcher(std::move(group)))) {return false; }
+            if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
         }
         else {if ('k' == c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
@@ -2883,7 +2883,7 @@ namespace regex {
             if (!(next(cpp2::out(&c_next)))) {error("x escape without number."); return false; }
             auto has_brackets {false}; 
             std::string number_str {""}; 
-            if ('{' == c_next) {
+            if ('{' == std::move(c_next)) {
                 // TODO: Currently does not work since the compiler handles \x also.
                 // Bracketed
                 has_brackets = true;
@@ -2906,13 +2906,13 @@ namespace regex {
                 syntax = { "{" + cpp2::to_string(syntax) + "}" };
             }
             syntax = { "\\x" + cpp2::to_string(syntax) };
-            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(std::move(number_as_char))) + "'"))}; 
+            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
             CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
         }
         else {if ('o' == c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("o escape without bracket."); return false; }
             std::string number_str {""}; 
-            if ('{' == c_next) {
+            if ('{' == std::move(c_next)) {
                 static_cast(skip());// Skip '{'
                 if (!(grab_until('}', cpp2::out(&number_str)))) {error("No ending bracket for \\o"); return false; }
             }
@@ -2923,7 +2923,7 @@ namespace regex {
             char number_as_char {unsafe_narrow(std::move(number))}; 
 
             std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8)) + "}"}; 
-            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(std::move(number_as_char))) + "'"))}; 
+            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
             CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
         }
         else {if ('A' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_start", "")); }
@@ -3013,7 +3013,7 @@ namespace regex {
             else {if (c_next == '=' || c_next == '!') {
                 static_cast(skip());// Skip '!'
                 // Positive or negative lookahead
-                return parse_lookahead(("?" + cpp2::to_string(c_next)), c_next == '='); 
+                return parse_lookahead(("?" + cpp2::to_string(c_next)), std::move(c_next) == '='); 
             }
             else {
                 // Simple modifier
@@ -3039,7 +3039,7 @@ namespace regex {
             if (!(grab_until(':', cpp2::out(&name)))) {error("Missing colon for named pattern."); return false; }
 
             if (name == "pla" || name == "positive_lookahead") {
-                return parse_lookahead(("*" + cpp2::to_string(name) + ":"), true); 
+                return parse_lookahead(("*" + cpp2::to_string(std::move(name)) + ":"), true); 
             }
             else {if (name == "nla" || name == "negative_lookahead") {
                 return parse_lookahead(("*" + cpp2::to_string(std::move(name)) + ":"), false); 
@@ -3123,7 +3123,7 @@ namespace regex {
         if (sep == std::string::npos) {
             min_count = inner;
             max_count = inner;
-            if (!(string_to_int(inner, min_count_number))) {error("Could not convert range to number."); return false; }
+            if (!(string_to_int(std::move(inner), min_count_number))) {error("Could not convert range to number."); return false; }
             max_count_number = min_count_number;
         }
         else {
@@ -3141,7 +3141,7 @@ namespace regex {
             }
             if (!(CPP2_UFCS(empty)(inner_last))) {
                 max_count = std::move(inner_last);
-                if (!(string_to_int(inner, max_count_number))) {error("Could not convert range to number."); return false; }
+                if (!(string_to_int(std::move(inner), max_count_number))) {error("Could not convert range to number."); return false; }
             }
         }
 
@@ -3150,7 +3150,7 @@ namespace regex {
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(kind))));  });
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(kind)));  });
 
         return true; 
     }
@@ -3188,7 +3188,7 @@ namespace regex {
             return false; 
         }
 
-        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(std::move(kind)) + ", '" + cpp2::to_string(_3) + "'"));  });
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(kind) + ", '" + cpp2::to_string(_3) + "'"));  });
         return true; 
     }
 
diff --git a/source/reflect.h b/source/reflect.h
index b651295249..b6863081b8 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -1451,7 +1451,7 @@ auto interface(meta::type_declaration& t) -> void
             CPP2_UFCS(require)(mf, CPP2_UFCS(make_public)(mf), 
                         "interface functions must be public");
             CPP2_UFCS(default_to_virtual)(mf);
-            has_dtor |= CPP2_UFCS(is_destructor)(mf);
+            has_dtor |= CPP2_UFCS(is_destructor)(std::move(mf));
         }
     }
 
@@ -1614,7 +1614,7 @@ auto cpp2_struct(meta::type_declaration& t) -> void
             auto mf {CPP2_UFCS(as_function)(m)}; 
             CPP2_UFCS(require)(t, !(CPP2_UFCS(is_virtual)(mf)), 
                        "a struct may not have a virtual function");
-            CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(mf, "operator=")), 
+            CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(std::move(mf), "operator=")), 
                        "a struct may not have a user-defined operator=");
         }
     }
@@ -1663,25 +1663,25 @@ std::string value{"-1"};
 
         auto is_default_or_numeric {is_empty_or_a_decimal_number(init)}; 
         found_non_numeric |= !(CPP2_UFCS(empty)(init)) && !(is_default_or_numeric);
-        CPP2_UFCS(require)(m, !(is_default_or_numeric) || !(found_non_numeric) || CPP2_UFCS(has_name)(mo, "none"), 
+        CPP2_UFCS(require)(m, !(std::move(is_default_or_numeric)) || !(found_non_numeric) || CPP2_UFCS(has_name)(mo, "none"), 
             (cpp2::to_string(CPP2_UFCS(name)(mo)) + ": enumerators with non-numeric values must come after all default and numeric values"));
 
-        nextval(value, init);
+        nextval(value, std::move(init));
 
         auto v {std::strtoll(&CPP2_ASSERT_IN_BOUNDS_LITERAL(value, 0), nullptr, 10)}; // for non-numeric values we'll just get 0 which is okay for now
         if (cpp2::cmp_less(v,min_value)) {
             min_value = v;
         }
         if (cpp2::cmp_greater(v,max_value)) {
-            max_value = v;
+            max_value = std::move(v);
         }
 
         //  Adding local variable 'e' to work around a Clang warning
         value_member_info e {cpp2::as_(CPP2_UFCS(name)(mo)), "", value}; 
-        CPP2_UFCS(push_back)(enumerators, e);
+        CPP2_UFCS(push_back)(enumerators, std::move(e));
 
         CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo);
-        static_cast(mo);
+        static_cast(std::move(mo));
     }
 }
 
@@ -1707,7 +1707,7 @@ std::string value{"-1"};
             else {if (cpp2::cmp_greater_eq(min_value,std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
                 underlying_type.value() = "i32";
             }
-            else {if (cpp2::cmp_greater_eq(std::move(min_value),std::numeric_limits::min()) && cpp2::cmp_less_eq(max_value,std::numeric_limits::max())) {
+            else {if (cpp2::cmp_greater_eq(std::move(min_value),std::numeric_limits::min()) && cpp2::cmp_less_eq(std::move(max_value),std::numeric_limits::max())) {
                 underlying_type.value() = "i64";
             }
             else {
@@ -1788,7 +1788,7 @@ std::string to_string{"    to_string: (this) -> std::string = { \n"};
         }
 
         for ( 
-              auto const& e : enumerators ) {
+              auto const& e : std::move(enumerators) ) {
             if (e.name != "_") {// ignore unnamed values
                 if (bitwise) {
                     if (e.name != "none") {
@@ -1881,10 +1881,10 @@ auto value{0};
 
         //  Adding local variable 'e' to work around a Clang warning
         value_member_info e {cpp2::as_(CPP2_UFCS(name)(mo)), CPP2_UFCS(type)(mo), cpp2::as_(value)}; 
-        CPP2_UFCS(push_back)(alternatives, e);
+        CPP2_UFCS(push_back)(alternatives, std::move(e));
 
         CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo);
-        static_cast(mo);
+        static_cast(std::move(mo));
     } while (false); ++value; }
 }
 
@@ -1994,7 +1994,7 @@ std::string value_set{""};
 #line 1347 "reflect.h2"
     {
         for ( 
-              auto const& a : alternatives ) {
+              auto const& a : std::move(alternatives) ) {
             value_set += ("        if that.is_" + cpp2::to_string(a.name) + "() { set_" + cpp2::to_string(a.name) + "( that." + cpp2::to_string(a.name) + "() ); }\n");
         }
         value_set += "    }\n";
@@ -2057,7 +2057,7 @@ auto regex_gen(meta::type_declaration& t) -> void
                 name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(size)(name) - CPP2_UFCS(size)(postfix));
 
                 if (CPP2_UFCS(contains)(expressions, name)) {
-                    CPP2_ASSERT_IN_BOUNDS(expressions, name).second = expr;
+                    CPP2_ASSERT_IN_BOUNDS(expressions, name).second = std::move(expr);
                 }
                 else {
                     CPP2_UFCS(error)(t, "Expression modifier defined without expression.");
@@ -2065,7 +2065,7 @@ auto regex_gen(meta::type_declaration& t) -> void
 
             }
             else {
-                CPP2_ASSERT_IN_BOUNDS(expressions, name) = std::make_pair(expr, "");
+                CPP2_ASSERT_IN_BOUNDS(expressions, name) = std::make_pair(std::move(expr), "");
             }
 
 #line 1439 "reflect.h2"
@@ -2074,10 +2074,10 @@ auto regex_gen(meta::type_declaration& t) -> void
 
     CPP2_UFCS(remove_marked_members)(t);
 
-    for ( auto const& expr : expressions ) {
+    for ( auto const& expr : std::move(expressions) ) {
         auto regular_expression {::cpp2::regex::generate_template(expr.second.first, expr.second.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
 
-        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": " + cpp2::to_string(regular_expression) + " = ();"));
+        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": " + cpp2::to_string(std::move(regular_expression)) + " = ();"));
     }
 }
 
@@ -2179,7 +2179,7 @@ auto regex_gen(meta::type_declaration& t) -> void
             && !(CPP2_UFCS(arguments_were_used)(rtype)))) 
 
         {
-            error(name + " did not use its template arguments - did you mean to write '" + name + " <" + CPP2_ASSERT_IN_BOUNDS_LITERAL(args, 0) + "> type' (with the spaces)?");
+            error(name + " did not use its template arguments - did you mean to write '" + name + " <" + CPP2_ASSERT_IN_BOUNDS_LITERAL(std::move(args), 0) + "> type' (with the spaces)?");
             return false; 
         }
     }
diff --git a/source/regex.h2 b/source/regex.h2
index 029c6bc5ce..ecb16ec7cf 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -197,7 +197,7 @@ match_tail:  type = {
 
     private match_select:  (this, cur, inout ctx, modifiers)
         First::match(cur, ctx, modifiers, match_tail());
-    private match_select: (this, cur, inout ctx, modifiers) ctx.pass(cur);
+    private match_select: (this, cur, inout ctx, _) ctx.pass(cur);
 
     reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
     to_string: () (bstring() + ... + List::to_string());
@@ -340,7 +340,7 @@ short_not_word_class       :  type == negated_class_entry type = {
     match:        (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
-    reset_ranges: (inout ctx) = {}
+    reset_ranges: (_) = {}
     to_string:    () bstring();
 }
 
@@ -355,7 +355,7 @@ extract_position_helper:  type = {
         return r;
     }
 
-    reset_ranges: (inout ctx) = {}
+    reset_ranges: (_) = {}
     to_string:    () bstring();
 }
 
@@ -486,7 +486,7 @@ any_matcher_logic:  type =
         }
     }
 
-    reset_ranges: (inout ctx) = {}
+    reset_ranges: (_) = {}
     to_string:    ()          bstring(1, '.');
 }
 
@@ -494,8 +494,8 @@ any_matcher_logic:  type =
 //
 branch_reset_matcher_logic:  type = {
     match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
-    reset_ranges: (inout ctx) = {}
-    to_string:    ()          bstring("(?|");
+    reset_ranges: (_) = {}
+    to_string:    ()  bstring("(?|");
 }
 
 // Regex syntax:   Example: a
@@ -521,8 +521,8 @@ char_matcher_logic:  type =
         }
 
     }
-    reset_ranges: (inout ctx) = {}
-    to_string:    ()          bstring(1, C);
+    reset_ranges: (_) = {}
+    to_string:    ()  bstring(1, C);
 }
 
 
@@ -561,7 +561,7 @@ class_matcher_logic:  type =
         return r;
     }
 
-    reset_ranges: (inout ctx) = {}
+    reset_ranges: (_) = {}
 
     to_string: () -> bstring = {
         r: bstring = "[";
@@ -583,8 +583,8 @@ global_group_reset:  type = {
         return other.match(cur, ctx, modifiers);
     }
 
-    reset_ranges: (inout ctx) = {}
-    to_string:    ()          bstring("\\K");
+    reset_ranges: (_) = {}
+    to_string:    ()  bstring("\\K");
 }
 
 // Regex syntax: () Example: (.*)
@@ -627,7 +627,7 @@ group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, modifiers: Modifier, other) -> _ = {
+    match:  (cur, inout ctx, _: Modifier, other) -> _ = {
         if -1 != group {
             ctx.set_group_end(group, cur);
         }
@@ -638,7 +638,7 @@ group_matcher_end_logic:  type = {
         return r;
     }
 
-    reset_ranges: (inout ctx) = {}
+    reset_ranges: (_) = {}
 
     to_string: () -> bstring = {
         if group != 0 {
@@ -652,8 +652,8 @@ group_matcher_end_logic:  type = {
 
 special_group_end_logic:  type = {
     match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
-    reset_ranges: (inout ctx) = {}
-    to_string:    ()          bstring(")");
+    reset_ranges: (_) = {}
+    to_string:    ()  bstring(")");
 }
 
 // Regex syntax: \  Example: \1
@@ -685,8 +685,8 @@ group_ref_matcher_logic:  type = {
         }
 
     }
-    reset_ranges: (inout ctx) = {}
-    to_string:    ()          symbol.str();
+    reset_ranges: (_) = {}
+    to_string:    ()  symbol.str();
 }
 
 // Regex syntax: $  Example: aa$
@@ -705,8 +705,8 @@ line_end_matcher_logic: ("\\$");
+    reset_ranges: (_) = {}
+    to_string:    ()  bstring("\\$");
 }
 
 // Regex syntax: ^  Example: ^aa
@@ -722,8 +722,8 @@ line_start_matcher_logic:  type =
         }
 
     }
-    reset_ranges: (inout ctx) = {}
-    to_string:    ()          bstring(1, '^');
+    reset_ranges: (_) = {}
+    to_string:    ()  bstring(1, '^');
 }
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -756,8 +756,8 @@ modifier_matcher_logic:  type =
     match:  (cur, inout ctx, _: Modifier, other) -> _ = {
         return other.match(cur, ctx, Modifier::replace(ModifierChange()));
     }
-    reset_ranges: (inout ctx) = {}
-    to_string:    ()          "(?(ModifierChange::to_string())$)";
+    reset_ranges: (_) = {}
+    to_string:    ()  "(?(ModifierChange::to_string())$)";
 }
 
 // Named character classes
@@ -992,7 +992,7 @@ word_boundary_matcher_logic:  type =
         }
 
     }
-    reset_ranges: (inout ctx) = {}
+    reset_ranges: (_) = {}
     to_string:    () -> bstring = {
         if negate {
             return "\\B";

From 599cc56d51acaa85aef6b356abb997f445159fa1 Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Tue, 19 Mar 2024 13:14:44 -1000
Subject: [PATCH 091/161] Remove  dependency, get warning-clean build

Header `` requires newer (2022/2023) compilers, so I'll try to remove depending on it to keep cppfront's own build working to ~2019 compilers
---
 include/string_util.h |   17 +-
 source/regex.h        | 3244 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 3255 insertions(+), 6 deletions(-)
 create mode 100644 source/regex.h

diff --git a/include/string_util.h b/include/string_util.h
index edc1c6e328..2336d37bd6 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -2,6 +2,7 @@
 
 #include 
 #include 
+#include 
 
 // From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring
 
@@ -81,11 +82,11 @@ inline bool string_to_int(std::string const& s, int& v, int base = 10) {
         v = stoi(s, nullptr, base);
         return true;
     }
-    catch (std::invalid_argument const& ex)
+    catch (std::invalid_argument const&)
     {
         return false;
     }
-    catch (std::out_of_range const& ex)
+    catch (std::out_of_range const&)
     {
         return false;
     }
@@ -93,16 +94,20 @@ inline bool string_to_int(std::string const& s, int& v, int base = 10) {
 
 inline std::string int_to_string(int i, int base = 10) {
     if (8 == base) {
-        return std::format("{:03o}", i);
+        std::ostringstream oss;
+        oss << std::oct << i;
+        return oss.str();
     }
     else if (10 == base) {
-        return std::format("{}", i);
+        return std::to_string(i);
     }
     else if (16 == base) {
-        return std::format("{:02x}", i);
+        std::ostringstream oss;
+        oss << std::hex << i;
+        return oss.str();
     }
     else {
-        throw std::runtime_error(std::format("Base {} not implemented.", base));
+        throw std::runtime_error("Base " + std::to_string(i) + " not implemented.");
     }
 }
 
diff --git a/source/regex.h b/source/regex.h
new file mode 100644
index 0000000000..898bfe9caf
--- /dev/null
+++ b/source/regex.h
@@ -0,0 +1,3244 @@
+
+#ifndef REGEX_H_CPP2
+#define REGEX_H_CPP2
+
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "regex.h2"
+
+#line 15 "regex.h2"
+namespace cpp2 {
+
+namespace regex {
+
+#line 31 "regex.h2"
+class expression_flags;
+
+#line 43 "regex.h2"
+class range_flags;
+    
+
+#line 49 "regex.h2"
+template class match_group;
+    
+
+#line 56 "regex.h2"
+template class match_return;
+    
+
+#line 61 "regex.h2"
+template class match_context;
+
+#line 146 "regex.h2"
+template class match_modifiers_state_change;
+
+#line 172 "regex.h2"
+template class match_modifiers;
+
+#line 195 "regex.h2"
+template class match_tail;
+    
+
+#line 217 "regex.h2"
+template class calling_match_tail;
+    
+
+#line 247 "regex.h2"
+template class single_class_entry;
+
+#line 255 "regex.h2"
+template class range_class_entry;
+
+#line 263 "regex.h2"
+template class combined_class_entry;
+    
+
+#line 270 "regex.h2"
+template class list_class_entry;
+    
+
+#line 277 "regex.h2"
+template class named_class_entry;
+    
+
+#line 282 "regex.h2"
+template class negated_class_entry;
+    
+
+#line 289 "regex.h2"
+template class shorthand_class_entry;
+    
+
+#line 341 "regex.h2"
+template class empty_matcher_logic;
+
+#line 349 "regex.h2"
+template class extract_position_helper;
+    
+
+#line 364 "regex.h2"
+template class matcher_list;
+    
+
+#line 375 "regex.h2"
+template class special_syntax_wrapper;
+    
+
+#line 392 "regex.h2"
+template class alternative_matcher_logic;
+
+#line 476 "regex.h2"
+template class any_matcher_logic;
+
+#line 495 "regex.h2"
+template class branch_reset_matcher_logic;
+    
+
+#line 503 "regex.h2"
+template class char_matcher_logic;
+
+#line 531 "regex.h2"
+template class class_matcher_logic;
+
+#line 580 "regex.h2"
+template class global_group_reset;
+    
+
+#line 592 "regex.h2"
+template class group_matcher_start_logic;
+    
+
+#line 629 "regex.h2"
+template class group_matcher_end_logic;
+    
+
+#line 653 "regex.h2"
+template class special_group_end_logic;
+    
+
+#line 661 "regex.h2"
+template class group_ref_matcher_logic;
+    
+
+#line 694 "regex.h2"
+template class line_end_matcher_logic;
+
+#line 714 "regex.h2"
+template class line_start_matcher_logic;
+
+#line 731 "regex.h2"
+template class lookahead_matcher_logic;
+
+#line 754 "regex.h2"
+template class modifier_matcher_logic;
+
+#line 766 "regex.h2"
+template                    class named_class_matcher_logic;
+    
+
+#line 792 "regex.h2"
+template class range_matcher_logic;
+
+#line 945 "regex.h2"
+template class special_range_matcher_logic;
+    
+
+#line 964 "regex.h2"
+template class word_boundary_matcher_logic;
+
+#line 1015 "regex.h2"
+template class group_name_list;
+
+#line 1027 "regex.h2"
+class group_name_list_end;
+    
+
+#line 1032 "regex.h2"
+template class regular_expression;
+
+#line 1121 "regex.h2"
+class regex_parser_modifier_state;
+    
+
+#line 1128 "regex.h2"
+class regex_parser_group_state;
+
+#line 1163 "regex.h2"
+class regex_branch_reset_state;
+    
+
+#line 1190 "regex.h2"
+template class regex_parser;
+
+#line 2162 "regex.h2"
+}
+}
+
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "regex.h2"
+
+//  Copyright (c) Herb Sutter
+//  SPDX-License-Identifier: CC-BY-NC-ND-4.0
+
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#include 
+
+#line 15 "regex.h2"
+namespace cpp2 {
+
+namespace regex {
+
+bool inline constexpr greedy_alternative = false;
+
+template using bview = std::basic_string_view;
+template using bstring = std::basic_string;
+
+//-----------------------------------------------------------------------
+//
+//  Helper structures for the expression matching.
+//
+//-----------------------------------------------------------------------
+//
+
+class expression_flags {
+    public: static const int case_insensitive;// mod: i
+    public: static const int multiple_lines;  // mod: m
+    public: static const int single_line;     // mod: s
+    public: static const int no_group_captures;// mod: n
+    public: static const int perl_code_syntax;// mod: x
+    public: static const int perl_code_syntax_in_classes;// mod: xx
+
+    public: expression_flags() = default;
+    public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(expression_flags const&) -> void = delete;
+};
+#line 39 "regex.h2"
+
+// TODO: @enum as template parameter yields two error:
+//     error: type 'range_flags' of non-type template parameter is not a structural type
+//     error: non-type template parameter has incomplete type 'range_flags'
+class range_flags {
+    public: static const int not_greedy;
+    public: static const int greedy;
+    public: static const int possessive;
+
+    public: range_flags() = default;
+    public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(range_flags const&) -> void = delete;
+};
+#line 48 "regex.h2"
+
+template class match_group {
+    public: Iter start {}; 
+    public: Iter end {}; 
+
+    public: bool matched {false}; 
+};
+
+template class match_return {
+    public: bool matched {false}; 
+    public: Iter pos {}; 
+};
+
+template class match_context
+ {
+    public: Iter begin; 
+    public: Iter end; 
+
+    private: std::array,max_groups> groups {}; 
+    private: std::array alternatives_pos {}; 
+
+    public: explicit match_context(Iter const& begin_, Iter const& end_);
+
+#line 74 "regex.h2"
+    public: match_context(match_context const& that);
+#line 74 "regex.h2"
+    public: auto operator=(match_context const& that) -> match_context& ;
+#line 74 "regex.h2"
+    public: match_context(match_context&& that) noexcept;
+#line 74 "regex.h2"
+    public: auto operator=(match_context&& that) noexcept -> match_context& ;
+
+    // Getter and setter for groups
+    //
+    public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
+
+    public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
+
+#line 86 "regex.h2"
+    public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
+
+#line 92 "regex.h2"
+    public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
+
+#line 99 "regex.h2"
+    public: auto set_group_end(auto const& group, auto const& pos) & -> void;
+
+#line 104 "regex.h2"
+    public: auto set_group_invalid(auto const& group) & -> void;
+
+#line 108 "regex.h2"
+    public: auto set_group_start(auto const& group, auto const& pos) & -> void;
+
+#line 112 "regex.h2"
+    public: [[nodiscard]] auto size() const& -> auto;
+
+    // Getter and setter for alternatives
+
+    public: [[nodiscard]] auto get_alternative_pos(auto const& alternative) const& -> auto;
+
+    public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
+
+#line 122 "regex.h2"
+    // Misc functions
+    //
+    public: [[nodiscard]] auto print_ranges() const& -> bstring;
+
+#line 138 "regex.h2"
+    public: [[nodiscard]] auto fail() const& -> auto;
+    public: [[nodiscard]] auto pass(cpp2::in cur) const& -> auto;
+
+};
+
+// Flag change for matching modifiers. Creates a new flag for match_modifiers.
+// See expression_flags for possible flags.
+//
+template class match_modifiers_state_change {
+
+    public: static const bool reset;
+    public: static const int add;
+    public: static const int remove;
+    public: static const bool has_change;
+
+    public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
+
+#line 164 "regex.h2"
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: match_modifiers_state_change() = default;
+    public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(match_modifiers_state_change const&) -> void = delete;
+
+#line 165 "regex.h2"
+};
+
+using match_modifiers_no_change = match_modifiers_state_change;
+
+// Current modifiers for the regular expression.
+// See expression_flags for possible flags.
+//
+template class match_modifiers {
+
+    public: static const int flags;
+
+    // Push/pop management
+
+    public: template [[nodiscard]] static auto push([[maybe_unused]] Change const& unnamed_param_1) -> auto;
+    public: [[nodiscard]] static auto pop() -> auto;
+    public: template [[nodiscard]] static auto replace([[maybe_unused]] Change const& unnamed_param_1) -> auto;
+
+    // Flag management
+    //
+
+    public: [[nodiscard]] auto has_flag(cpp2::in f) const& -> bool;
+    public: match_modifiers() = default;
+    public: match_modifiers(match_modifiers const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(match_modifiers const&) -> void = delete;
+
+
+#line 188 "regex.h2"
+};
+
+//  Represents the remainder of the regular expression.
+//
+//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
+//  Otherwise the matcher can try a different alternative.
+//
+template class match_tail {
+    public: [[nodiscard]] auto match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+
+    private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+
+    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto;
+
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+
+    public: template [[nodiscard]] auto prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto;
+
+    public: template [[nodiscard]] auto make_calling(Call const& call) const& -> auto;
+    public: match_tail() = default;
+    public: match_tail(match_tail const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(match_tail const&) -> void = delete;
+
+#line 208 "regex.h2"
+};
+
+//  Represents the remainder of the regular expression. Will call a function wen the end is reached.
+//
+//  TODO: Create common base with match_tail.
+//
+//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
+//  Otherwise the matcher can try a different alternative.
+//
+template class calling_match_tail {
+    private: Call call; 
+
+    public: explicit calling_match_tail(auto const& call_);
+#line 220 "regex.h2"
+    public: auto operator=(auto const& call_) -> calling_match_tail& ;
+
+#line 224 "regex.h2"
+    public: [[nodiscard]] auto match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+
+    private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+
+    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+
+    public: template [[nodiscard]] auto prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto;
+    public: calling_match_tail(calling_match_tail const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(calling_match_tail const&) -> void = delete;
+
+#line 234 "regex.h2"
+};
+
+template using no_tail = match_tail;
+
+//-----------------------------------------------------------------------
+//
+//  Character classes for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+// Class syntax:  Example: a
+//
+template class single_class_entry
+ {
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: single_class_entry() = default;
+    public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(single_class_entry const&) -> void = delete;
+
+#line 251 "regex.h2"
+};
+
+// Class syntax: - Example: a-c
+//
+template class range_class_entry
+ {
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: range_class_entry() = default;
+    public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(range_class_entry const&) -> void = delete;
+
+#line 259 "regex.h2"
+};
+
+// Helper for combining two character classes
+//
+template class combined_class_entry {
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: combined_class_entry() = default;
+    public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(combined_class_entry const&) -> void = delete;
+
+#line 266 "regex.h2"
+};
+
+// Class syntax:   Example: abcd
+//
+template class list_class_entry {
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: list_class_entry() = default;
+    public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(list_class_entry const&) -> void = delete;
+
+#line 273 "regex.h2"
+};
+
+// Class syntax: [: class named_class_entry {
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: named_class_entry() = default;
+    public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(named_class_entry const&) -> void = delete;
+
+#line 280 "regex.h2"
+};
+
+template class negated_class_entry: public Inner {
+
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: negated_class_entry() = default;
+    public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(negated_class_entry const&) -> void = delete;
+
+#line 285 "regex.h2"
+};
+
+// Short class syntax: \  Example: \w
+//
+template class shorthand_class_entry {
+    public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: shorthand_class_entry() = default;
+    public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(shorthand_class_entry const&) -> void = delete;
+
+#line 292 "regex.h2"
+};
+
+#line 295 "regex.h2"
+// Named basic character classes
+//
+template         using digits_class = named_class_entry>;
+template         using lower_class = named_class_entry>;
+template         using upper_class = named_class_entry>;
+
+// Named other classes
+//
+template           using alnum_class = named_class_entry,upper_class,digits_class>>;
+template           using alpha_class = named_class_entry,upper_class>>;
+template           using ascii_class = named_class_entry>;
+template           using blank_class = named_class_entry>;
+template           using cntrl_class = named_class_entry,single_class_entry>>;
+template           using graph_class = named_class_entry>;
+template using hor_space_class = named_class_entry>;
+template           using print_class = named_class_entry>;
+template           using punct_class = named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>;
+template           using space_class = named_class_entry>;
+template using ver_space_class = named_class_entry>;
+template           using word_class = named_class_entry,single_class_entry>>;
+template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
+
+// Shorthand class entries
+//
+template                  using short_digits_class = shorthand_class_entry>;
+template                  using short_hor_space_class = shorthand_class_entry>;
+template                  using short_space_class = shorthand_class_entry>;
+template using short_vert_space_class = shorthand_class_entry>;
+template                  using short_word_class = shorthand_class_entry>;
+
+#line 326 "regex.h2"
+template                      using short_not_digits_class = negated_class_entry>>;
+template                      using short_not_hor_space_class = negated_class_entry>>;
+template                      using short_not_space_class = negated_class_entry>>;
+template using short_not_vert_space_class = negated_class_entry>>;
+template                      using short_not_word_class = negated_class_entry>>;
+
+//-----------------------------------------------------------------------
+//
+//  Helper matchers for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+// Regex syntax: none Example: -
+//
+template class empty_matcher_logic {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: empty_matcher_logic() = default;
+    public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(empty_matcher_logic const&) -> void = delete;
+
+#line 345 "regex.h2"
+};
+
+// Helper for greedy alternatives
+//
+template class extract_position_helper {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 358 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: extract_position_helper() = default;
+    public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(extract_position_helper const&) -> void = delete;
+
+#line 360 "regex.h2"
+};
+
+// A list of matchers. Prepends to the current match tail.
+//
+template class matcher_list {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 368 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: matcher_list() = default;
+    public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(matcher_list const&) -> void = delete;
+
+#line 370 "regex.h2"
+};
+
+// Helper for standard matchers with special syntax
+//
+//
+template class special_syntax_wrapper: public base {
+
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: special_syntax_wrapper() = default;
+    public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(special_syntax_wrapper const&) -> void = delete;
+
+#line 378 "regex.h2"
+};
+
+//-----------------------------------------------------------------------
+//
+//  Matchers for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+#line 388 "regex.h2"
+//  Regex syntax: |  Example: ab|ba
+//
+//  Non greedy implementation. First alternative that matches is chosen. 
+//
+template class alternative_matcher_logic {
+
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+
+#line 406 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+
+    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+
+#line 424 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+    public: alternative_matcher_logic() = default;
+    public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(alternative_matcher_logic const&) -> void = delete;
+
+
+#line 472 "regex.h2"
+};
+
+//  Regex syntax: .
+//
+template class any_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 489 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: any_matcher_logic() = default;
+    public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(any_matcher_logic const&) -> void = delete;
+
+#line 491 "regex.h2"
+};
+
+// Regex syntax: none Example: -
+//
+template class branch_reset_matcher_logic {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: branch_reset_matcher_logic() = default;
+    public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
+
+#line 499 "regex.h2"
+};
+
+// Regex syntax:   Example: a
+//
+template class char_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 524 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: char_matcher_logic() = default;
+    public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(char_matcher_logic const&) -> void = delete;
+
+#line 526 "regex.h2"
+};
+
+#line 529 "regex.h2"
+// Regex syntax: []  Example: [abcx-y[:digits:]]
+//
+template class class_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 552 "regex.h2"
+    private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
+
+#line 564 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+
+    public: [[nodiscard]] static auto to_string() -> bstring;
+    public: class_matcher_logic() = default;
+    public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(class_matcher_logic const&) -> void = delete;
+
+
+#line 576 "regex.h2"
+};
+
+// Regex syntax: \K Example: \K
+//
+template class global_group_reset {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 586 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: global_group_reset() = default;
+    public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(global_group_reset const&) -> void = delete;
+
+#line 588 "regex.h2"
+};
+
+// Regex syntax: () Example: (.*)
+//
+template class group_matcher_start_logic {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto;
+
+#line 600 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+
+#line 606 "regex.h2"
+    public: [[nodiscard]] static auto to_string() -> bstring;
+    public: group_matcher_start_logic() = default;
+    public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_matcher_start_logic const&) -> void = delete;
+
+
+#line 627 "regex.h2"
+};
+
+template class group_matcher_end_logic {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
+
+#line 641 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+
+    public: [[nodiscard]] static auto to_string() -> bstring;
+    public: group_matcher_end_logic() = default;
+    public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_matcher_end_logic const&) -> void = delete;
+
+
+#line 651 "regex.h2"
+};
+
+template class special_group_end_logic {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: special_group_end_logic() = default;
+    public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(special_group_end_logic const&) -> void = delete;
+
+#line 657 "regex.h2"
+};
+
+// Regex syntax: \  Example: \1
+//
+template class group_ref_matcher_logic {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 688 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: group_ref_matcher_logic() = default;
+    public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
+
+#line 690 "regex.h2"
+};
+
+// Regex syntax: $  Example: aa$
+//
+template class line_end_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 708 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: line_end_matcher_logic() = default;
+    public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(line_end_matcher_logic const&) -> void = delete;
+
+#line 710 "regex.h2"
+};
+
+// Regex syntax: ^  Example: ^aa
+//
+template class line_start_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 725 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: line_start_matcher_logic() = default;
+    public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(line_start_matcher_logic const&) -> void = delete;
+
+#line 727 "regex.h2"
+};
+
+// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
+//
+template class lookahead_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 748 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: lookahead_matcher_logic() = default;
+    public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
+
+#line 750 "regex.h2"
+};
+
+// Regex syntax: (?)  Example: (?i)
+//
+template class modifier_matcher_logic
+ {
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
+
+#line 759 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> auto;
+    public: modifier_matcher_logic() = default;
+    public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(modifier_matcher_logic const&) -> void = delete;
+
+#line 761 "regex.h2"
+};
+
+// Named character classes
+//
+
+template                    class named_class_matcher_logic: public special_syntax_wrapper> {
+    public: named_class_matcher_logic() = default;
+    public: named_class_matcher_logic(named_class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(named_class_matcher_logic const&) -> void = delete;
+
+
+#line 768 "regex.h2"
+};
+
+template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
+template                  using named_class_digits = named_class_matcher_logic>;
+template                  using named_class_hor_space = named_class_matcher_logic>;
+template                  using named_class_space = named_class_matcher_logic>;
+template                  using named_class_ver_space = named_class_matcher_logic>;
+template                  using named_class_word = named_class_matcher_logic>;
+
+#line 778 "regex.h2"
+template                     using named_class_not_digits = named_class_matcher_logic>;
+template using named_class_not_hor_space = named_class_matcher_logic>;
+template                     using named_class_not_space = named_class_matcher_logic>;
+template using named_class_not_ver_space = named_class_matcher_logic>;
+template                     using named_class_not_word = named_class_matcher_logic>;
+
+// Other named matchers
+template                                     using named_string_end_or_before_new_line_at_end = special_syntax_wrapper>;
+template           using named_string_end = special_syntax_wrapper>;
+template using named_string_start = special_syntax_wrapper>;
+
+#line 791 "regex.h2"
+// Regex syntax: {min, max}  Example: a{2,4}
+template class range_matcher_logic {
+
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+
+#line 806 "regex.h2"
+    public: static auto reset_ranges(auto& ctx) -> void;
+
+    public: [[nodiscard]] static auto to_string() -> bstring;
+
+#line 834 "regex.h2"
+    private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
+
+#line 839 "regex.h2"
+    private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
+
+#line 844 "regex.h2"
+    private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
+
+#line 850 "regex.h2"
+    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
+
+#line 865 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
+
+#line 893 "regex.h2"
+    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
+
+#line 917 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
+    public: range_matcher_logic() = default;
+    public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(range_matcher_logic const&) -> void = delete;
+
+
+#line 941 "regex.h2"
+};
+
+// Regex syntax: *, +, or ?  Example: aa*
+//
+template class special_range_matcher_logic: public range_matcher_logic {
+
+    public: [[nodiscard]] static auto to_string() -> bstring;
+    public: special_range_matcher_logic() = default;
+    public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(special_range_matcher_logic const&) -> void = delete;
+
+
+#line 958 "regex.h2"
+};
+
+// Regex syntax: \b or \B  Example: \bword\b
+//
+// Matches the start end end of word boundaries.
+//
+template class word_boundary_matcher_logic
+ {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+
+#line 995 "regex.h2"
+    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
+    public: [[nodiscard]] static auto to_string() -> bstring;
+    public: word_boundary_matcher_logic() = default;
+    public: word_boundary_matcher_logic(word_boundary_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
+
+
+#line 1003 "regex.h2"
+};
+
+#line 1006 "regex.h2"
+//-----------------------------------------------------------------------
+//
+//  Regular expression implementation.
+//
+//-----------------------------------------------------------------------
+//
+
+// Helper for named groups.
+
+template class group_name_list {
+
+    public: [[nodiscard]] static auto get_group_id(auto const& g) -> int;
+    public: group_name_list() = default;
+    public: group_name_list(group_name_list const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_name_list const&) -> void = delete;
+
+
+#line 1025 "regex.h2"
+};
+
+class group_name_list_end {
+    public: [[nodiscard]] static auto get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto;
+    public: group_name_list_end() = default;
+    public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_name_list_end const&) -> void = delete;
+
+#line 1029 "regex.h2"
+};
+
+// Regular expression implementation
+template class regular_expression {
+
+    public: template using context = match_context;
+    public: using modifiers = match_modifiers;
+
+    // TODO: Named multiple return has problems with templates.
+    public: template class search_return {
+        public: bool matched; 
+        public: context ctx; 
+
+        public: explicit search_return(cpp2::in matched_, context const& ctx_);
+
+#line 1047 "regex.h2"
+        public: [[nodiscard]] auto group_number() const& -> auto;
+        public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
+        public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
+        public: [[nodiscard]] auto group_end(cpp2::in g) const& -> auto;
+
+        public: [[nodiscard]] auto group(cpp2::in> g) const& -> auto;
+        public: [[nodiscard]] auto group_start(cpp2::in> g) const& -> auto;
+        public: [[nodiscard]] auto group_end(cpp2::in> g) const& -> auto;
+
+        private: [[nodiscard]] auto get_group_id(cpp2::in> g) const& -> auto;
+        public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(search_return const&) -> void = delete;
+
+
+#line 1063 "regex.h2"
+    };
+
+    public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
+    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start) const& -> auto;
+    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
+    public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
+
+#line 1075 "regex.h2"
+    public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
+    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
+    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
+    public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
+
+#line 1097 "regex.h2"
+    public: [[nodiscard]] auto to_string() const& -> auto;
+
+    // Helper functions
+    //
+
+    private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
+    public: regular_expression() = default;
+    public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regular_expression const&) -> void = delete;
+
+
+#line 1110 "regex.h2"
+};
+
+//-----------------------------------------------------------------------
+//
+//  Parser for regular expression.
+//
+//-----------------------------------------------------------------------
+//
+
+// State of the expression modifiers.
+//
+class regex_parser_modifier_state {
+    public: bool group_captures_have_numbers {true}; 
+    public: bool perl_code_syntax {false}; 
+    public: bool perl_code_syntax_in_classes {false}; 
+};
+
+// State of the current group. See '()'
+class regex_parser_group_state {
+
+    // Current list of matchers
+    public: std::vector cur_match_list {}; 
+
+    // List of alternate matcher lists. E.g. ab|cd|xy
+    public: std::vector> alternate_match_lists {}; 
+
+    public: regex_parser_modifier_state modifiers {}; 
+
+    public: auto next_alternative() & -> void;
+
+#line 1144 "regex.h2"
+    public: auto swap(regex_parser_group_state& t) & -> void;
+
+#line 1150 "regex.h2"
+    public: auto add(auto const& matcher) & -> void;
+
+    public: auto wrap_last(auto const& matcher) & -> void;
+
+#line 1159 "regex.h2"
+    public: [[nodiscard]] auto empty() const& -> bool;
+};
+
+// State for the branch reset. Takes care of the group numbering. See '(|)'.
+class regex_branch_reset_state {
+    public: bool is_active {false}; 
+    public: int cur_group {1}; // Global capture group.
+    public: int max_group {1}; 
+    public: int from {1}; 
+
+    public: [[nodiscard]] auto next() & -> int;
+
+#line 1177 "regex.h2"
+    public: auto set_next(cpp2::in g) & -> void;
+
+#line 1182 "regex.h2"
+    public: auto next_alternative() & -> void;
+
+#line 1187 "regex.h2"
+};
+
+// Parser and generator for regular expressions.
+template class regex_parser {
+
+    private: std::string_view regex; 
+    private: std::string_view modifier; 
+    private: Error_out error_out; 
+
+    private: regex_parser_group_state cur_group_state {}; 
+    private: regex_branch_reset_state cur_branch_reset_state {}; 
+    private: size_t pos {0}; 
+    private: int alternatives_count {0}; 
+    private: std::map named_groups {}; 
+    private: bool has_error {false}; 
+
+    private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
+                                                   "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
+
+    public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
+
+#line 1212 "regex.h2"
+    // State management functions
+    //
+    public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
+
+#line 1221 "regex.h2"
+    public: auto group_restore_state(cpp2::in old_state) & -> void;
+
+#line 1225 "regex.h2"
+    // Branch reset management functions
+    //
+
+    public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
+
+#line 1240 "regex.h2"
+    public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
+
+#line 1246 "regex.h2"
+    // Position management functions
+    //
+
+    private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
+
+#line 1287 "regex.h2"
+    private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
+
+#line 1299 "regex.h2"
+    public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
+    public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
+    public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
+
+#line 1305 "regex.h2"
+    public: [[nodiscard]] auto skip() & -> bool;
+
+#line 1312 "regex.h2"
+    public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
+
+#line 1321 "regex.h2"
+    public: [[nodiscard]] auto current() const& -> char;
+
+#line 1329 "regex.h2"
+    private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
+
+#line 1339 "regex.h2"
+    public: [[nodiscard]] auto peek() const& -> auto;
+    public: [[nodiscard]] auto peek_in_class() const& -> auto;
+
+    private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
+
+#line 1363 "regex.h2"
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+    public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
+
+    public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
+
+#line 1379 "regex.h2"
+    public: [[nodiscard]] auto grab_number() & -> std::string;
+
+#line 1399 "regex.h2"
+    // Misc functions
+    //
+    public: auto error(cpp2::in message) & -> void;
+
+#line 1406 "regex.h2"
+    public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
+
+#line 1418 "regex.h2"
+    public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
+
+#line 1421 "regex.h2"
+    // Creator functions for matchers.
+    //
+
+    public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
+
+#line 1431 "regex.h2"
+    public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
+
+    public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
+
+#line 1449 "regex.h2"
+    public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
+
+#line 1459 "regex.h2"
+    // Parser helper functions.
+
+    public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
+
+#line 1472 "regex.h2"
+    public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
+
+#line 1508 "regex.h2"
+    public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+                      regex_parser_modifier_state& parser_modifiers) & -> bool;
+
+#line 1573 "regex.h2"
+    // Parsing functions
+    //
+
+    public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
+
+#line 1584 "regex.h2"
+    public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
+
+#line 1597 "regex.h2"
+    public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
+
+#line 1605 "regex.h2"
+    public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
+
+#line 1712 "regex.h2"
+    public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
+
+#line 1879 "regex.h2"
+    public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
+
+#line 2011 "regex.h2"
+    public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
+
+#line 2018 "regex.h2"
+    public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
+
+#line 2081 "regex.h2"
+    public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
+
+#line 2117 "regex.h2"
+    public: auto parse_until(cpp2::in term) & -> void;
+
+#line 2139 "regex.h2"
+    public: [[nodiscard]] auto parse() & -> std::string;
+    public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_parser const&) -> void = delete;
+
+
+#line 2153 "regex.h2"
+};
+
+template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
+
+#line 2162 "regex.h2"
+}
+}
+
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "regex.h2"
+
+#line 15 "regex.h2"
+namespace cpp2 {
+
+namespace regex {
+
+#line 32 "regex.h2"
+    inline CPP2_CONSTEXPR int expression_flags::case_insensitive = 1;
+    inline CPP2_CONSTEXPR int expression_flags::multiple_lines = 2;
+    inline CPP2_CONSTEXPR int expression_flags::single_line = 4;
+    inline CPP2_CONSTEXPR int expression_flags::no_group_captures = 8;
+    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax = 16;
+    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax_in_classes = 32;
+
+#line 44 "regex.h2"
+    inline CPP2_CONSTEXPR int range_flags::not_greedy = 1;
+    inline CPP2_CONSTEXPR int range_flags::greedy = 2;
+    inline CPP2_CONSTEXPR int range_flags::possessive = 3;
+
+#line 69 "regex.h2"
+    template  match_context::match_context(Iter const& begin_, Iter const& end_)
+        : begin{ begin_ }
+        , end{ end_ }{
+
+#line 72 "regex.h2"
+    }
+
+#line 74 "regex.h2"
+    template  match_context::match_context(match_context const& that)
+                                   : begin{ that.begin }
+                                   , end{ that.end }
+                                   , groups{ that.groups }
+                                   , alternatives_pos{ that.alternatives_pos }{}
+#line 74 "regex.h2"
+    template  auto match_context::operator=(match_context const& that) -> match_context& {
+                                   begin = that.begin;
+                                   end = that.end;
+                                   groups = that.groups;
+                                   alternatives_pos = that.alternatives_pos;
+                                   return *this; }
+#line 74 "regex.h2"
+    template  match_context::match_context(match_context&& that) noexcept
+                                   : begin{ std::move(that).begin }
+                                   , end{ std::move(that).end }
+                                   , groups{ std::move(that).groups }
+                                   , alternatives_pos{ std::move(that).alternatives_pos }{}
+#line 74 "regex.h2"
+    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
+                                   begin = std::move(that).begin;
+                                   end = std::move(that).end;
+                                   groups = std::move(that).groups;
+                                   alternatives_pos = std::move(that).alternatives_pos;
+                                   return *this; }
+
+#line 78 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
+
+#line 80 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
+        if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
+            return ""; 
+        }
+        return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+    }
+#line 86 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
+        if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
+            return 0; 
+        }
+        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
+    }
+#line 92 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
+        if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
+            return 0; 
+        }
+        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+    }
+
+#line 99 "regex.h2"
+    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
+        CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
+        CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
+    }
+
+#line 104 "regex.h2"
+    template  auto match_context::set_group_invalid(auto const& group) & -> void{
+        CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
+    }
+
+#line 108 "regex.h2"
+    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
+        CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
+    }
+
+#line 112 "regex.h2"
+    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
+
+#line 116 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
+
+#line 118 "regex.h2"
+    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
+        CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
+    }
+
+#line 124 "regex.h2"
+    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
+        bstring r {""}; 
+        for ( auto const& cur : groups ) {
+            if (cur.matched) {
+                r += ("(" + cpp2::to_string(std::distance(begin, cur.start)) + "," + cpp2::to_string(std::distance(begin, cur.end)) + ")");
+            }
+            else {
+                r += "(?,?)";
+            }
+        }
+
+        return r; 
+    }
+
+#line 138 "regex.h2"
+    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
+#line 139 "regex.h2"
+    template  [[nodiscard]] auto match_context::pass(cpp2::in cur) const& -> auto { return match_return(true, cur);  }
+
+#line 148 "regex.h2"
+    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
+    template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
+    template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
+    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
+
+#line 153 "regex.h2"
+    template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
+        auto new_flags {old_flags}; 
+        if (reset) {
+            new_flags = 0;
+        }
+        new_flags = new_flags | add;
+        new_flags = new_flags & (~remove);
+
+        return new_flags; 
+    }
+
+#line 164 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
+
+#line 174 "regex.h2"
+    template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
+
+#line 178 "regex.h2"
+    template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
+#line 179 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
+#line 180 "regex.h2"
+    template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
+
+#line 185 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
+        return  0 != (f & flags); 
+    }
+
+#line 196 "regex.h2"
+    template  [[nodiscard]] auto match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
+
+#line 198 "regex.h2"
+    template  template [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
+        return First::match(cur, ctx, modifiers, match_tail());  }
+#line 200 "regex.h2"
+    template  [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
+
+#line 202 "regex.h2"
+    template  auto match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 203 "regex.h2"
+    template  [[nodiscard]] auto match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
+
+#line 205 "regex.h2"
+    template  template [[nodiscard]] auto match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return match_tail();  }
+
+#line 207 "regex.h2"
+    template  template [[nodiscard]] auto match_tail::make_calling(Call const& call) const& -> auto { return calling_match_tail(call);  }
+
+#line 220 "regex.h2"
+    template  calling_match_tail::calling_match_tail(auto const& call_)
+        : call{ call_ }{
+
+#line 222 "regex.h2"
+    }
+#line 220 "regex.h2"
+    template  auto calling_match_tail::operator=(auto const& call_) -> calling_match_tail& {
+        call = call_;
+        return *this;
+
+#line 222 "regex.h2"
+    }
+
+#line 224 "regex.h2"
+    template  [[nodiscard]] auto calling_match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
+
+#line 226 "regex.h2"
+    template  template [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
+        return First::match(cur, ctx, modifiers, calling_match_tail(call));  }
+#line 228 "regex.h2"
+    template  [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return call(cur, ctx, modifiers);  }
+
+#line 230 "regex.h2"
+    template  auto calling_match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 231 "regex.h2"
+    template  [[nodiscard]] auto calling_match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
+
+#line 233 "regex.h2"
+    template  template [[nodiscard]] auto calling_match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return calling_match_tail(call);  }
+
+#line 249 "regex.h2"
+    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
+#line 250 "regex.h2"
+    template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
+
+#line 257 "regex.h2"
+    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
+#line 258 "regex.h2"
+    template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
+
+#line 264 "regex.h2"
+    template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
+#line 265 "regex.h2"
+    template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
+
+#line 271 "regex.h2"
+    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
+#line 272 "regex.h2"
+    template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
+
+#line 278 "regex.h2"
+    template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 279 "regex.h2"
+    template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
+
+#line 284 "regex.h2"
+    template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
+
+#line 290 "regex.h2"
+    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 291 "regex.h2"
+    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
+
+#line 342 "regex.h2"
+    template  [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers); }
+#line 343 "regex.h2"
+    template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 344 "regex.h2"
+    template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
+
+#line 350 "regex.h2"
+    template  [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        auto r {CPP2_UFCS(match)(other, cur, ctx, modifiers)}; 
+        if (r.matched) {
+            CPP2_UFCS(set_alternative_pos)(ctx, alternative, cur);
+        }
+        return r; 
+    }
+
+#line 358 "regex.h2"
+    template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 359 "regex.h2"
+    template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
+
+#line 365 "regex.h2"
+    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { 
+        return CPP2_UFCS(match)(CPP2_UFCS(prepend)(other, List()...), cur, ctx, modifiers);  }
+
+#line 368 "regex.h2"
+    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 369 "regex.h2"
+    template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); }
+
+#line 377 "regex.h2"
+    template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
+
+#line 394 "regex.h2"
+    template  [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        if constexpr (greedy_alternative) {
+            auto max_overall_length {0}; 
+            auto max_current_length {0}; 
+            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail)}; 
+            static_cast(std::move(max_overall_length));
+            static_cast(std::move(max_current_length));
+            return r; 
+        }else {
+            return match_first(cur, ctx, modifiers, tail); 
+        }
+    }
+#line 406 "regex.h2"
+    template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
+#line 407 "regex.h2"
+    template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
+
+#line 409 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, tail)}; 
+        if (r.matched) {
+            return r; 
+        }else {
+            First::reset_ranges(ctx);
+
+            if constexpr (0 != sizeof...(Next)) {
+                return match_first(cur, ctx, modifiers, tail); 
+            }else {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+        }
+    }
+
+#line 424 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, CPP2_UFCS(prepend)(tail, extract_position_helper()))}; 
+
+        // Get the end position of First.
+        auto end_overall_pos {cur}; 
+        auto end_current_pos {cur}; 
+        if (r.matched) {
+            end_overall_pos = r.pos;
+            end_current_pos = CPP2_UFCS(get_alternative_pos)(ctx, alternative);
+        }
+
+        // Compute the new max length and our max length.
+        auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
+        max_overall_length = std::max(max_overall_length, my_overall_length);
+
+#line 440 "regex.h2"
+        // Check if someone other has something larker
+        auto o {CPP2_UFCS(fail)(ctx)}; 
+        if constexpr (0 != sizeof...(Next)) {
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
+        }
+
+        auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; 
+        if (max_overall_length == my_overall_length) {
+            max_current_length = std::max(max_current_length, my_current_length);
+        }
+
+#line 452 "regex.h2"
+        if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
+            // We are the longest. Check now if we are also the longest in this alternative.
+            if (std::move(my_current_length) == max_current_length) {
+                // Yes we are. Reset all groups by matching again.
+                (Next::reset_ranges(ctx), ...);  // Reset all other ranges.
+                return First::match(cur, ctx, modifiers, CPP2_UFCS(prepend)(tail, extract_position_helper())); 
+            }
+            else {
+                // We are not, so there was an other match.
+                First::reset_ranges(ctx);
+
+                return o; 
+            }
+        }else {
+            // We are not the largest one.
+            First::reset_ranges(ctx);
+
+            return o; 
+        }
+    }
+
+#line 478 "regex.h2"
+    template  [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        if (cur != ctx.end && 
+          (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
+           *cpp2::assert_not_null(cur) != '\n')) {
+            return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+        }
+        else {
+            return CPP2_UFCS(fail)(ctx); 
+        }
+    }
+
+#line 489 "regex.h2"
+    template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 490 "regex.h2"
+    template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
+
+#line 496 "regex.h2"
+    template  [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
+#line 497 "regex.h2"
+    template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 498 "regex.h2"
+    template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
+
+#line 505 "regex.h2"
+    template  [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+            if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+            }
+            else {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+        }
+        else {
+            if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+            }
+            else {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+        }
+
+    }
+#line 524 "regex.h2"
+    template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 525 "regex.h2"
+    template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
+
+#line 533 "regex.h2"
+    template  [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+            if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+            }
+            else {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+        }
+        else {
+            if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
+                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+            }
+            else {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+        }
+    }
+
+#line 552 "regex.h2"
+    template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
+        bool r {First::includes(c)}; 
+
+        if (!(r)) {
+            if constexpr (0 != sizeof...(Other)) {
+                r = match_any(c);
+            }
+        }
+
+        return r; 
+    }
+
+#line 564 "regex.h2"
+    template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+
+#line 566 "regex.h2"
+    template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
+        bstring r {"["}; 
+        if (negate) {
+            r += "^";
+        }
+        r += (bstring() + ... + List::to_string());
+        r += "]";
+
+        return r; 
+    }
+
+#line 581 "regex.h2"
+    template  [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        CPP2_UFCS(set_group_start)(ctx, 0, cur);
+        return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+    }
+
+#line 586 "regex.h2"
+    template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 587 "regex.h2"
+    template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
+
+#line 593 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto{
+        if (-1 != group) {
+            CPP2_UFCS(set_group_start)(ctx, group, cur);
+        }
+        return CPP2_UFCS(match)(other, cur, ctx, Modifiers::push(ModifierChange())); 
+    }
+
+#line 600 "regex.h2"
+    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
+        if (-1 != group) {
+            CPP2_UFCS(set_group_invalid)(ctx, group);
+        }
+    }
+
+#line 606 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
+        if (group != 0) {
+            if (0 != CPP2_UFCS(size)(name)) {
+                if (name_brackets) {
+                    return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
+                }
+                else {
+                    return { "(?'" + cpp2::to_string(CPP2_UFCS(data)(name)) + "'" }; 
+                }
+            }
+            else {if (ModifierChange::has_change) {
+                return { "(?" + cpp2::to_string(ModifierChange::to_string()) + ":" }; 
+            }
+            else {
+                return "("; 
+            }}
+        }
+        else {
+            return ""; 
+        }
+    }
+
+#line 630 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto{
+        if (-1 != group) {
+            CPP2_UFCS(set_group_end)(ctx, group, cur);
+        }
+        auto r {CPP2_UFCS(match)(other, cur, ctx, Modifier::pop())}; 
+        if (!(r.matched) && -1 != group) {
+            CPP2_UFCS(set_group_invalid)(ctx, group);
+        }
+        return r; 
+    }
+
+#line 641 "regex.h2"
+    template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+
+#line 643 "regex.h2"
+    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
+        if (group != 0) {
+            return ")"; 
+        }
+        else {
+            return ""; 
+        }
+    }
+
+#line 654 "regex.h2"
+    template  [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
+#line 655 "regex.h2"
+    template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 656 "regex.h2"
+    template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
+
+#line 662 "regex.h2"
+    template  [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        auto g {CPP2_UFCS(get_group)(ctx, group)}; 
+
+        auto pos {cur}; 
+        auto group_pos {g.start}; 
+        for( ; group_pos != g.end && pos != ctx.end; (++group_pos, ++pos) ) {
+            if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+                if (safe_tolower(*cpp2::assert_not_null(group_pos)) != safe_tolower(*cpp2::assert_not_null(pos))) {
+                    return CPP2_UFCS(fail)(ctx); 
+                }
+            }
+            else {
+                if (*cpp2::assert_not_null(group_pos) != *cpp2::assert_not_null(pos)) {
+                    return CPP2_UFCS(fail)(ctx); 
+                }
+            }
+        }
+
+        if (std::move(group_pos) == std::move(g).end) {
+            return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); 
+        }
+        else {
+            return CPP2_UFCS(fail)(ctx); 
+        }
+
+    }
+#line 688 "regex.h2"
+    template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 689 "regex.h2"
+    template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
+
+#line 696 "regex.h2"
+    template  [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+        }
+        else {if (match_new_line_before_end && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end.
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+        }
+        else {
+            return CPP2_UFCS(fail)(ctx); 
+        }}
+    }
+
+#line 708 "regex.h2"
+    template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 709 "regex.h2"
+    template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
+
+#line 716 "regex.h2"
+    template  [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+        }
+        else {
+            return CPP2_UFCS(fail)(ctx); 
+        }
+
+    }
+#line 725 "regex.h2"
+    template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 726 "regex.h2"
+    template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
+
+#line 733 "regex.h2"
+    template  [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        auto r {Pattern::match(cur, ctx, modifiers, no_tail())}; 
+
+        if (!(positive)) {
+            r.matched = !(r.matched);
+        }
+
+        if (std::move(r).matched) {
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+        }
+        else {
+            return CPP2_UFCS(fail)(ctx); 
+        }
+
+    }
+#line 748 "regex.h2"
+    template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
+#line 749 "regex.h2"
+    template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
+
+#line 756 "regex.h2"
+    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto{
+        return CPP2_UFCS(match)(other, cur, ctx, Modifier::replace(ModifierChange())); 
+    }
+#line 759 "regex.h2"
+    template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 760 "regex.h2"
+    template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
+
+#line 794 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+        if (range_flags::possessive == kind) {
+            return match_possessive(cur, ctx, modifiers, tail); 
+        }
+        else {if (range_flags::greedy == kind) {
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, tail); 
+        }
+        else { // range_flags::not_greedy == kind
+            return match_not_greedy(cur, ctx, modifiers, tail); 
+        }}
+    }
+
+#line 806 "regex.h2"
+    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
+
+#line 808 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
+      bstring r {M::to_string()}; 
+
+      if (min_count == max_count) {
+        r += ("{" + cpp2::to_string(min_count) + "}");
+      }
+      else {if (min_count == -1) {
+        r += ("{," + cpp2::to_string(max_count) + "}");
+      }
+      else {if (max_count == -1) {
+        r += ("{" + cpp2::to_string(min_count) + ",}");
+      }
+      else {
+        r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}");
+      }}}
+
+      if (kind == range_flags::not_greedy) {
+        r += "?";
+      }
+      else {if (kind == range_flags::possessive) {
+        r += "+";
+      }}
+
+      return r; 
+    }
+
+#line 834 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
+        if (-1 == max_count) {return true; }
+        else {return cpp2::cmp_less(count,max_count); }
+    }
+
+#line 839 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
+        if (-1 == min_count) {return false; }
+        else {return cpp2::cmp_less(count,min_count); }
+    }
+
+#line 844 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
+        if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
+        if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
+        return true; 
+    }
+
+#line 850 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+        auto res {CPP2_UFCS(pass)(ctx, cur)}; 
+        auto count {0}; 
+
+        while( is_below_lower_bound(count) && res.matched ) {
+            res = M::match(res.pos, ctx, modifiers, no_tail());
+            if (res.matched) {
+                count += 1;
+            }
+        }
+
+        count_r = std::move(count);
+        return res; 
+    }
+
+#line 865 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (&other)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
+            return match_greedy(_0, tail_cur, _1, tail_ctx, tail_modifiers, *cpp2::assert_not_null(_2)); 
+        }}; 
+        auto is_m_valid {true}; 
+        auto r {CPP2_UFCS(fail)(ctx)}; 
+        if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
+            is_m_valid = false;  // Group ranges in M are invalidated through the call.
+            r = CPP2_UFCS(match)(CPP2_UFCS(make_calling)(match_tail(), std::move(inner_call)), cur, ctx, modifiers);
+        }
+
+        if (!(r.matched) && is_in_range(count)) {
+            // The recursion did not yield a match try now the tail
+            r = CPP2_UFCS(match)(other, cur, ctx, modifiers);
+
+            if (r.matched && !(std::move(is_m_valid))) {
+                // We have a match rematch M if required
+                M::reset_ranges(ctx);
+
+                if (cpp2::cmp_greater(count,0)) {
+                    static_cast(M::match(last_valid, ctx, modifiers, no_tail()));
+                }
+            }
+        }
+
+        return r; 
+    }
+
+#line 893 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+        auto count {0}; 
+        auto r {match_min_count(cur, ctx, modifiers, count)}; 
+
+        if (!(r.matched)) {
+          return r; 
+        }
+
+        auto pos {r.pos}; 
+        while( r.matched && is_below_upper_bound(count) ) {
+            r = M::match(pos, ctx, modifiers, no_tail());
+
+            if (pos == r.pos) {
+                break; // Break infinite loop.
+            }
+            if (r.matched) {
+                count += 1;
+                pos = r.pos;
+            }
+        }
+
+        return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); 
+    }
+
+#line 917 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+        auto count {0}; 
+        auto start {match_min_count(cur, ctx, modifiers, count)}; 
+        if (!(start.matched)) {
+          return start; 
+        }
+
+        auto pos {std::move(start).pos}; 
+        while( is_below_upper_bound(count) ) {
+            auto o {CPP2_UFCS(match)(other, pos, ctx, modifiers)}; 
+            if (o.matched) {
+                return o; 
+            }
+
+            auto r {M::match(pos, ctx, modifiers, no_tail())}; 
+            if (!(r.matched)) {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+            count += 1;
+            pos = std::move(r).pos;
+        }
+
+        return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); // Upper bound reached.
+    }
+
+#line 947 "regex.h2"
+    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
+        auto r {M::to_string() + symbol}; 
+        if (kind == range_flags::not_greedy) {
+            r += "?";
+        }
+        else {if (kind == range_flags::possessive) {
+            r += "+";
+        }}
+
+        return r; 
+    }
+
+#line 966 "regex.h2"
+    template  [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+        word_class words {}; 
+        auto is_match {false}; 
+        if (cur == ctx.begin) {// String start
+            if (cur != ctx.end) {// No empty string
+                is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur));
+            }
+        }
+        else {if (cur == ctx.end) {// String end
+            is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null((cur - 1)));
+        }
+        else { // Middle of string
+            is_match = 
+                   (CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)))) // End of word: \w\W
+                || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)));// Start of word: \W\w
+
+        }}
+        if (negate) {
+            is_match = !(is_match);
+        }
+
+        if (std::move(is_match)) {
+            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+        }
+        else {
+            return CPP2_UFCS(fail)(ctx); 
+        }
+
+    }
+#line 995 "regex.h2"
+    template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 996 "regex.h2"
+    template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
+        if (negate) {
+            return "\\B"; 
+        }else {
+            return "\\b"; 
+        }
+    }
+
+#line 1017 "regex.h2"
+    template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
+        if (g == CPP2_UFCS(str)(name)) {
+            return group_id; 
+        }
+        else {
+            return Inner::get_group_id(g); 
+        }
+    }
+
+#line 1028 "regex.h2"
+    [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
+
+#line 1042 "regex.h2"
+        template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
+            : matched{ matched_ }
+            , ctx{ ctx_ }{
+
+#line 1045 "regex.h2"
+        }
+
+#line 1047 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 1048 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+#line 1049 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 1050 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+
+#line 1052 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
+#line 1053 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+#line 1054 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
+
+#line 1056 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
+            auto group_id {named_groups::get_group_id(g)}; 
+            if (-1 == group_id) {
+                // TODO: Throw error.
+            }
+            return group_id; 
+        }
+
+#line 1065 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 1066 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 1067 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 1068 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
+        context ctx {start, end}; 
+
+        auto r {CPP2_UFCS(match)(Matcher(), start, ctx, modifiers(), no_tail())}; 
+        return search_return(r.matched && r.pos == end, std::move(ctx)); 
+    }
+
+#line 1075 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 1076 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 1077 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 1078 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
+        auto matched {false}; 
+        context ctx {start, end}; 
+
+        auto cur {start}; 
+        for( ; true; (++cur) ) {
+            if (CPP2_UFCS(match)(Matcher(), cur, ctx, modifiers(), no_tail()).matched) {
+                matched = true;
+                break;
+            }
+
+            if (cur == ctx.end) {
+                break;
+            }
+        }
+
+        return search_return(std::move(matched), std::move(ctx)); 
+    }
+
+#line 1097 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
+
+#line 1102 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
+        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
+            return CPP2_UFCS(begin)(str) + pos; 
+        }
+        else {
+            return CPP2_UFCS(end)(str); 
+        }
+    }
+
+#line 1138 "regex.h2"
+    auto regex_parser_group_state::next_alternative() & -> void{
+        std::vector new_list {}; 
+        std::swap(new_list, cur_match_list);
+        static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
+    }
+
+#line 1144 "regex.h2"
+    auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
+        std::swap(cur_match_list, t.cur_match_list);
+        std::swap(alternate_match_lists, t.alternate_match_lists);
+        std::swap(modifiers, t.modifiers);
+    }
+
+#line 1150 "regex.h2"
+    auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
+
+#line 1152 "regex.h2"
+    auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
+        auto last {CPP2_UFCS(back)(cur_match_list)}; 
+        CPP2_UFCS(back)(cur_match_list) = matcher(last);
+        static_cast(matcher);
+        static_cast(std::move(last));
+    }
+
+#line 1159 "regex.h2"
+    [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
+
+#line 1169 "regex.h2"
+    [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
+        auto g {cur_group}; 
+        cur_group += 1;
+        max_group = max(max_group, cur_group);
+
+        return g; 
+    }
+
+#line 1177 "regex.h2"
+    auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
+        cur_group = g;
+        max_group = max(max_group, g);
+    }
+
+#line 1182 "regex.h2"
+    auto regex_branch_reset_state::next_alternative() & -> void{
+        if (is_active) {
+            cur_group = from;
+        }
+    }
+
+#line 1206 "regex.h2"
+    template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
+        : regex{ r }
+        , modifier{ m }
+        , error_out{ e }{
+
+#line 1210 "regex.h2"
+    }
+
+#line 1214 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
+        regex_parser_group_state old_state {}; 
+        CPP2_UFCS(swap)(old_state, cur_group_state);
+
+        return old_state; 
+    }
+
+#line 1221 "regex.h2"
+    template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
+        cur_group_state = old_state;
+    }
+
+#line 1228 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
+        regex_branch_reset_state old_state {}; 
+        std::swap(old_state, cur_branch_reset_state);
+
+        cur_branch_reset_state.is_active = true;
+        cur_branch_reset_state.cur_group = old_state.cur_group;
+        cur_branch_reset_state.from      = cur_branch_reset_state.cur_group;
+        cur_branch_reset_state.max_group = cur_branch_reset_state.cur_group;
+
+        return old_state; 
+    }
+
+#line 1240 "regex.h2"
+    template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
+        auto next_group {cur_branch_reset_state.max_group}; 
+        cur_branch_reset_state = old_state;
+        CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
+    }
+
+#line 1249 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
+        auto perl_syntax {false}; 
+        if (!(no_skip)) {
+            if (in_class) {
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
+            }
+            else {
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
+            }
+        }
+        auto cur {pos + 1}; 
+        if (std::move(perl_syntax)) {
+            for( ; cpp2::cmp_less(cur,CPP2_UFCS(size)(regex)); (cur += 1) ) {
+                auto n {CPP2_ASSERT_IN_BOUNDS(regex, cur)}; 
+
+                if (space_class::includes(n)) {
+                    continue;
+                }
+                else {if (!(in_class) && '#' == std::move(n)) {
+                    cur = CPP2_UFCS(find)(regex, "\n", cur);
+                    if (std::string::npos == cur) {
+                        // No new line, comment runs until the end of the pattern
+                        cur = CPP2_UFCS(size)(regex);
+                    }
+                }
+                else { // None space none comment char
+                    break;
+                }}
+            }
+        }
+
+        // Check for end of file.
+        if (cpp2::cmp_greater(cur,CPP2_UFCS(size)(regex))) {
+            cur = CPP2_UFCS(size)(regex);
+        }
+        return cur; 
+    }
+
+#line 1287 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
+        pos = get_next_position(in_class, no_skip);
+        if (pos != CPP2_UFCS(size)(regex)) {
+            n.construct(CPP2_ASSERT_IN_BOUNDS(regex, pos));
+            return true; 
+        }
+        else {
+            n.construct('\0');
+            return false; 
+        }
+    }
+
+#line 1299 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
+#line 1300 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
+#line 1301 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
+
+#line 1305 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::skip() & -> bool{
+        cpp2::deferred_init c; 
+        auto r {next(cpp2::out(&c))}; 
+        static_cast(std::move(c.value()));
+        return r; 
+    }
+
+#line 1312 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
+        auto r {true}; 
+        auto cur {0}; 
+        for( ; r && cpp2::cmp_less(cur,n); (r = skip()) ) {
+            cur += 1;
+        }
+        return r; 
+    }
+
+#line 1321 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::current() const& -> char{
+        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
+            return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
+        }else {
+            return '\0'; 
+        }
+    }
+
+#line 1329 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
+        auto next_pos {get_next_position(in_class, false)}; 
+        if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
+            return CPP2_ASSERT_IN_BOUNDS(regex, std::move(next_pos)); 
+        }
+        else {
+            return '\0'; 
+        }
+    }
+
+#line 1339 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
+#line 1340 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
+
+#line 1342 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
+        auto start {pos}; 
+        auto end {pos}; 
+        if (any) {
+            end = CPP2_UFCS(find_first_of)(regex, e, pos);
+        }
+        else {
+            end = CPP2_UFCS(find)(regex, e, pos);
+        }
+
+        if (end != std::string_view::npos) {
+            r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
+            pos = std::move(end);
+            return true; 
+        }
+        else {
+            r.construct("");
+            return false; 
+        }
+    }
+
+#line 1363 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
+#line 1364 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+#line 1365 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
+
+#line 1367 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
+        if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
+            r.construct(CPP2_UFCS(substr)(regex, pos, n));
+            pos += n - 1;
+            return true; 
+        }
+        else {
+            r.construct("");
+            return false; 
+        }
+    }
+
+#line 1379 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
+        auto start {pos}; 
+        auto start_search {pos}; 
+        if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
+            start_search += 1;
+        }
+        auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", std::move(start_search))}; 
+
+        cpp2::deferred_init r; 
+        if (end != std::string::npos) {
+            r.construct(CPP2_UFCS(substr)(regex, start, end - start));
+            pos = std::move(end) - 1;
+        }
+        else {
+            r.construct(CPP2_UFCS(substr)(regex, std::move(start)));
+            pos = CPP2_UFCS(size)(regex) - 1;
+        }
+        return std::move(r.value()); 
+    }
+
+#line 1401 "regex.h2"
+    template  auto regex_parser::error(cpp2::in message) & -> void{
+        error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
+        has_error = true;
+    }
+
+#line 1406 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
+        std::string r {""}; 
+
+        std::string separator {""}; 
+        for ( auto const& cur : list ) {
+            r += separator + func(cur);
+            separator = ", ";
+        }
+
+        return r; 
+    }
+
+#line 1418 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
+
+#line 1424 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
+        auto sep {", "}; 
+        if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
+
+        return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
+    }
+
+#line 1431 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
+
+#line 1433 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
+        if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
+
+        if (0 == CPP2_UFCS(size)(cur_group_state.cur_match_list)) {
+            CPP2_UFCS(add)(cur_group_state, create_matcher("empty_matcher_logic", ""));
+        }
+        CPP2_UFCS(next_alternative)(cur_group_state);
+        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
+
+        auto list {join(cur_group_state.alternate_match_lists, [&](auto const& arg) -> auto { return create_matcher_from_list(arg);  })}; 
+        auto alternative_id {alternatives_count}; 
+        alternatives_count += 1;
+
+        return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
+    }
+
+#line 1449 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
+        std::string r {"::cpp2::regex::group_name_list_end"}; 
+
+        for ( auto const& cur : named_groups ) {
+            r = { "::cpp2::regex::group_name_list<\"" + cpp2::to_string(cur.first) + "\", " + cpp2::to_string(cur.second) + ", " + cpp2::to_string(r) + ">" };
+        }
+
+        return r; 
+    }
+
+#line 1461 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
+        auto old_state {group_new_state()}; 
+        parse_until(')');
+        auto inner {create_matcher_from_state()}; 
+        group_restore_state(std::move(old_state));
+
+        CPP2_UFCS(add)(cur_group_state, create_matcher("lookahead_matcher_logic", (cpp2::to_string(positive) + ", \"" + cpp2::to_string(name) + "\", " + cpp2::to_string(std::move(inner)))));
+
+        return true; 
+    }
+
+#line 1472 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
+        std::string r {"0"}; 
+        std::string sep {" | "}; 
+
+        auto add {[&, _1 = std::move(sep)](auto const& name, auto& r) mutable -> void{
+            r += (cpp2::to_string(_1) + cpp2::to_string(name));
+        }}; 
+
+        auto mod_pos {0}; 
+        for( ; cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)); mod_pos += 1 ) {
+            char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
+
+            if (     c == 'i') { add("::cpp2::regex::expression_flags::case_insensitive", r); }
+            else {if (c == 'm') {add("::cpp2::regex::expression_flags::multiple_lines", r); }
+            else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
+            else {if (c == 'n') {
+                add("::cpp2::regex::expression_flags::no_group_captures", r);
+                cur_group_state.modifiers.group_captures_have_numbers = false;
+            }
+            else {if (c == 'x') {
+                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
+                cur_group_state.modifiers.perl_code_syntax = true;
+
+                // Check if we have 'xx'
+                mod_pos += 1;
+                if (cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)) && 'x' == CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)) {
+                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
+                    cur_group_state.modifiers.perl_code_syntax_in_classes = true;
+                }
+            }
+            else {error(("Unknown modifier: '" + cpp2::to_string(std::move(c)) + "'")); }}}}}
+        }
+
+        return r; 
+    }
+
+#line 1508 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+                      regex_parser_modifier_state& parser_modifiers) & -> bool{
+        auto is_negative {false}; 
+        auto is_reset {false}; 
+
+        auto add {0}; 
+        auto remove {0}; 
+
+        auto apply {[&, _1 = (&is_negative), _2 = (&remove), _3 = (&add)](cpp2::in flag) mutable -> void{
+            if (*cpp2::assert_not_null(_1)) {
+                *cpp2::assert_not_null(_2) |= flag;
+            }
+            else {
+                *cpp2::assert_not_null(_3) |= flag;
+            }
+        }}; 
+
+        auto iter {CPP2_UFCS(begin)(change_str)}; 
+        for( ; iter != CPP2_UFCS(end)(change_str); (++iter) ) {
+            auto cur {*cpp2::assert_not_null(iter)}; 
+            if (cur == '^') {
+                is_reset = true;
+            }
+            else {if (cur == '-') {
+                if (is_reset) {error("No negative modifier allowed."); return false; }
+                is_negative = true;
+            }
+            else {if (cur == 'i') {apply(expression_flags::case_insensitive); }
+            else {if (cur == 'm') {apply(expression_flags::multiple_lines); }
+            else {if (cur == 's') {apply(expression_flags::single_line); }
+            else {if (cur == 'n') {
+                apply(expression_flags::no_group_captures);
+                parser_modifiers.group_captures_have_numbers = is_negative;
+            }
+            else {if (cur == 'x') {
+                if ((iter + 1) == CPP2_UFCS(end)(change_str) || *cpp2::assert_not_null((iter + 1)) != 'x') {
+                    // x modifier
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !(is_negative);
+
+                    // Just x unsets xx and remove x also removes xx
+                    remove |= expression_flags::perl_code_syntax_in_classes;
+                    parser_modifiers.perl_code_syntax_in_classes = false;
+                }
+                else { // xx modifier
+                    // xx also sets or unsets x
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !(is_negative);
+
+                    apply(expression_flags::perl_code_syntax_in_classes);
+                    parser_modifiers.perl_code_syntax_in_classes = !(is_negative);
+
+                    ++iter; // Skip the second x
+                }
+            }
+            else {
+                error(("Unknown modifier: " + cpp2::to_string(std::move(cur)))); return false; 
+            }}}}}}}
+        }
+
+        modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
+
+        return true; 
+    }
+
+#line 1576 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
+        if (c != '|') {return false; }
+
+        CPP2_UFCS(next_alternative)(cur_group_state);
+        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
+        return true; 
+    }
+
+#line 1584 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
+        if (c == '^') {
+            CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
+            return true; 
+        }
+        else {if (c == '$') {
+            CPP2_UFCS(add)(cur_group_state, create_matcher("line_end_matcher_logic", "true, true"));
+            return true; 
+        }}
+
+        return false; 
+    }
+
+#line 1597 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
+        if (c != '.') {return false; }
+
+        CPP2_UFCS(add)(cur_group_state, create_matcher("any_matcher_logic", ""));
+        return true; 
+
+    }
+
+#line 1605 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
+        if (c != '[') {return false; }
+
+        std::vector classes {}; 
+
+        char c_cur {current()}; 
+
+        // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
+        auto negate {false}; 
+        auto first {true}; 
+        auto range {false}; 
+        while( next_in_class(cpp2::out(&c_cur)) & (c_cur != ']' || first) ) {
+            if (c_cur == '^') {
+                negate = true;
+                continue; // Skip rest of the loop. Also the first update.
+            }
+            if (c_cur == '[' && peek_in_class() == ':') {
+                // We have a character class.
+                static_cast(skip_n(2));// Skip [:
+
+                std::string name {""}; 
+                if (!(grab_until(":]", cpp2::out(&name)))) {error("Could not find end of character class."); return false; }
+                if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
+                    error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))));
+                    return false; 
+                }
+
+                CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
+
+                static_cast(skip());// Skip ':' pointing to the ending ']'.
+            }
+            else {if (c_cur == '\\') {
+                if (next_no_skip(cpp2::out(&c_cur)) && (c_cur != ']')) {
+                    if ( ' ' == c_cur && cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes) {
+                        CPP2_UFCS(push_back)(classes, std::string(1, c_cur));// TODO: UFCS error with char as argument.
+                    }
+                    else {
+                        auto name {""}; 
+                            if ('d' == c_cur) {name = "short_digits"; }
+                        else {if ('D' == c_cur) {name = "short_not_digits"; }
+                        else {if ('h' == c_cur) {name = "short_hor_space"; }
+                        else {if ('H' == c_cur) {name = "short_not_hor_space"; }
+                        else {if ('s' == c_cur) {name = "short_space"; }
+                        else {if ('S' == c_cur) {name = "short_not_space"; }
+                        else {if ('v' == c_cur) {name = "short_ver_space"; }
+                        else {if ('V' == c_cur) {name = "short_not_ver_space"; }
+                        else {if ('w' == c_cur) {name = "short_word"; }
+                        else {if ('W' == c_cur) {name = "short_not_word"; }
+                        else {
+                            error("Unknown group escape.");
+                            return false; 
+                        }}}}}}}}}}
+                        CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
+                    }
+                }else {
+                    error("Escape without a following character.");
+                    return false; 
+                }
+            }
+            else {if (c_cur == '-') {
+                if (first) {// Literal if first entry.
+                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(c_cur)));
+                }else {
+                    range = true;
+                }
+            }
+            else {
+                if (range) {// Modify last element to be a range.
+                    CPP2_UFCS(back)(classes) += ("-" + cpp2::to_string(c_cur));
+                    range = false;
+                }
+                else {
+                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(c_cur)));
+                }
+            }}}
+
+            first = false;
+        }
+
+        if (std::move(c_cur) != ']') {
+            error("Error end of character class definition before terminating ']'.");
+            return false; 
+        }
+
+        if (std::move(range)) {// If '-' is last entry treat it as a literal char.
+            CPP2_UFCS(push_back)(classes, "-");
+        }
+
+        // Second step: Wrap the item on the class stack with corresponding class implementation.
+        for ( auto& cur : classes ) {
+            if (CPP2_UFCS(starts_with)(cur, "[:")) {
+                auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; 
+                cur = create_matcher((cpp2::to_string(std::move(name)) + "_class"), "");
+            }
+            else {if (1 != CPP2_UFCS(size)(cur)) {
+                cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"));
+            }
+            else {
+                cur = create_matcher("single_class_entry", ("'" + cpp2::to_string(cur) + "'"));
+            }}
+        }
+
+        auto inner {join(std::move(classes))}; 
+        CPP2_UFCS(add)(cur_group_state, create_matcher("class_matcher_logic", (cpp2::to_string(std::move(negate)) + ", " + cpp2::to_string(std::move(inner)))));
+        return true; 
+    }
+
+#line 1712 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
+        if (c != '\\') {return false; }
+
+        auto start {pos}; // Keep start for group matchers.
+        auto c_next {'\0'}; 
+        if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
+
+        auto add_group_matcher {[&, _1 = std::move(start), _2 = (&pos)](cpp2::in name) mutable -> bool{
+
+            auto name_trim {trim_copy(name)}; 
+            int group_id {0}; 
+            if (string_to_int(name_trim, group_id)) {
+                if (cpp2::cmp_less(group_id,0)) {
+                    group_id = cur_branch_reset_state.cur_group + group_id;
+
+                    if (cpp2::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
+                        error(("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)"));
+                        return false; 
+                    }
+                }
+
+                if (cpp2::cmp_greater_eq(group_id,cur_branch_reset_state.cur_group)) {error("Group reference is used before the group is declared."); return false; }
+            }
+            else {
+                // Named group
+                auto iter {CPP2_UFCS(find)(named_groups, std::move(name_trim))}; 
+                if (iter == CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
+
+                group_id = (*cpp2::assert_not_null(std::move(iter))).second;
+            }
+            CPP2_UFCS(add)(cur_group_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *cpp2::assert_not_null(_2) - _1 + 1)) + "\"")));
+
+            return true; 
+        }}; 
+
+        if ([_0 = '0', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
+            auto group {grab_number()}; 
+            if (cpp2::cmp_greater_eq(CPP2_UFCS(ssize)(group),3)) {
+                // \000 syntax
+                auto number {0}; 
+                if (!(string_to_int(std::move(group), number, 8))) {error("Could not convert octal to int."); return false; }
+
+                char number_as_char {unsafe_narrow(std::move(number))}; 
+
+                std::string syntax {"\\" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8))}; 
+                auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
+                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
+            }
+            else {
+                if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
+            }
+        }
+        else {if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae^.[]$()*{}?+|"), c_next)) {
+            if (c_next == '$') {
+                // TODO: Provide proper escape for cppfront capture
+                CPP2_UFCS(add)(cur_group_state, create_matcher("line_end_matcher_logic", "true, true"));
+            }
+            else {
+                auto inner {create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "'"))}; 
+                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\" + cpp2::to_string(std::move(c_next)) + "\", " + cpp2::to_string(std::move(inner)))));
+            }
+        }
+        else {if ('\\' == c_next) {
+            auto inner {create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'")}; 
+            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\\\\\\", " + cpp2::to_string(std::move(inner)))));
+        }
+        else {if ('g' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
+
+            std::string group {""}; 
+            if (c_next == '{') {
+                if (!((next(cpp2::out(&c_next)) && grab_until('}', cpp2::out(&group))))) {error("No ending bracket."); return false; }
+            }
+            else {
+                group = grab_number();
+            }
+            if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
+        }
+        else {if ('k' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
+
+            auto term_char {'\0'}; 
+            if (c_next == '{') {term_char = '}'; }
+            else {if (c_next == '<') {term_char = '>'; }
+            else {if (c_next == '\'') {term_char = '\''; }
+            else {
+                error("Group escape has wrong operator."); return false; 
+            }}}
+
+            std::string group {""}; 
+            if (!((next(cpp2::out(&c_next)) && grab_until(std::move(term_char), cpp2::out(&group))))) {error("No ending bracket."); return false; }
+            if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
+        }
+        else {if ('K' == c_next) {
+            CPP2_UFCS(add)(cur_group_state, create_matcher("global_group_reset", ""));
+        }
+        else {if ('x' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("x escape without number."); return false; }
+            auto has_brackets {false}; 
+            std::string number_str {""}; 
+            if ('{' == std::move(c_next)) {
+                // TODO: Currently does not work since the compiler handles \x also.
+                // Bracketed
+                has_brackets = true;
+                static_cast(skip());// Skip '{'
+                if (!(grab_until('}', cpp2::out(&number_str)))) {error("No ending bracket for \\x"); return false; }
+            }
+            else {
+                // grab two chars
+
+                if (!(grab_n(2, cpp2::out(&number_str)))) {error("Missing hexadecimal digits after \\x."); return false; }
+            }
+
+            auto number {0}; 
+            if (!(string_to_int(std::move(number_str), number, 16))) {error("Could not convert hexadecimal to int."); return false; }
+
+            char number_as_char {unsafe_narrow(std::move(number))}; 
+
+            std::string syntax {int_to_string(cpp2::as_(number_as_char), 16)}; 
+            if (std::move(has_brackets)) {
+                syntax = { "{" + cpp2::to_string(syntax) + "}" };
+            }
+            syntax = { "\\x" + cpp2::to_string(syntax) };
+            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
+            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
+        }
+        else {if ('o' == c_next) {
+            if (!(next(cpp2::out(&c_next)))) {error("o escape without bracket."); return false; }
+            std::string number_str {""}; 
+            if ('{' == std::move(c_next)) {
+                static_cast(skip());// Skip '{'
+                if (!(grab_until('}', cpp2::out(&number_str)))) {error("No ending bracket for \\o"); return false; }
+            }
+
+            auto number {0}; 
+            if (!(string_to_int(std::move(number_str), number, 8))) {error("Could not convert octal to int."); return false; }
+
+            char number_as_char {unsafe_narrow(std::move(number))}; 
+
+            std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8)) + "}"}; 
+            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
+            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
+        }
+        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_start", "")); }
+        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("word_boundary_matcher_logic", "false")); }
+        else {if ('B' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("word_boundary_matcher_logic", "true")); }
+        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_digits", "")); }
+        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_digits", "")); }
+        else {if ('h' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_hor_space", "")); }
+        else {if ('H' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_hor_space", "")); }
+        else {if ('N' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_no_new_line", "")); }
+        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_space", "")); }
+        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_space", "")); }
+        else {if ('v' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_ver_space", "")); }
+        else {if ('V' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_ver_space", "")); }
+        else {if ('w' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_word", "")); }
+        else {if ('W' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_word", "")); }
+        else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
+        else {if ('z' == std::move(c_next)) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_end", "")); }
+        else {
+            error("Unknown escape.");
+            return false; 
+        }}}}}}}}}}}}}}}}}}}}}}}}
+
+        return true; 
+    }
+
+#line 1879 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
+        if (c != '(') {return false; }
+
+        auto has_id {cur_group_state.modifiers.group_captures_have_numbers}; 
+        auto has_pattern {true}; 
+        std::string group_name {""}; 
+        auto group_name_brackets {true}; 
+        std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
+
+        auto modifiers_change_to {cur_group_state.modifiers}; 
+
+        char c_next {'\0'}; 
+        // Skip the '('
+        if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
+        if (c_next == '?') {
+            // Special group
+            if (!(next_no_skip(cpp2::out(&c_next)))) {error("Missing character after group opening."); return false; }
+
+            if (c_next == '<' || c_next == '\'') {
+                // named group
+                auto end_char {c_next}; 
+                if (end_char == '<') {
+                    end_char = '>';
+                }else {
+                    group_name_brackets = false;
+                }
+                has_id = true; // Force id for named groups.
+                if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
+                if (!(grab_until(std::move(end_char), cpp2::out(&group_name)))) {error("Missing ending bracket for named group."); return false; }
+                if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
+            }
+            else {if (c_next == '#') {
+                // Comment
+                std::string comment_str {""}; 
+                if (!(grab_until(")", cpp2::out(&comment_str)))) {error("Group without closing bracket."); return false; }
+                // Do not add comment. Has problems with ranges.
+
+                return true; 
+            }
+            else {if (c_next == '|') {
+                // Branch reset group
+
+                if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '|' */
+
+                auto old_parser_state {group_new_state()}; 
+                auto old_branch_state {branch_reset_new_state()}; 
+                parse_until(')');
+                auto inner {create_matcher_from_state()}; 
+                branch_reset_restore_state(std::move(old_branch_state));
+                group_restore_state(std::move(old_parser_state));
+
+                auto start_matcher {create_matcher("branch_reset_matcher_logic", "")}; 
+                auto end_matcher {create_matcher("special_group_end_logic", "")}; 
+
+                std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
+                CPP2_UFCS(add)(cur_group_state, create_matcher_from_list(std::move(v)));
+
+                return true; 
+            }
+            else {if (c_next == '=' || c_next == '!') {
+                static_cast(skip());// Skip '!'
+                // Positive or negative lookahead
+                return parse_lookahead(("?" + cpp2::to_string(c_next)), std::move(c_next) == '='); 
+            }
+            else {
+                // Simple modifier
+                has_id = false;
+                std::string change_str {""}; 
+                if (!(grab_until_one_of("):", cpp2::out(&change_str)))) {error("Missing ending bracket for group."); return false; }
+                if (!(parser_group_modifiers(std::move(change_str), cpp2::out(&modifier_change), modifiers_change_to))) {
+                     return false; 
+                }
+
+                if (')' == current()) {
+                    has_pattern = false;
+                }
+                else {
+                    if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for group."); return false; }/* skip ':' */
+                }
+            }}}}
+        }
+        else {if (std::move(c_next) == '*') {
+            // named pattern
+            static_cast(skip());// Skip *.
+            std::string name {""}; 
+            if (!(grab_until(':', cpp2::out(&name)))) {error("Missing colon for named pattern."); return false; }
+
+            if (name == "pla" || name == "positive_lookahead") {
+                return parse_lookahead(("*" + cpp2::to_string(std::move(name)) + ":"), true); 
+            }
+            else {if (name == "nla" || name == "negative_lookahead") {
+                return parse_lookahead(("*" + cpp2::to_string(std::move(name)) + ":"), false); 
+            }
+            else {
+                error(("Unknown named group pattern: '" + cpp2::to_string(std::move(name)) + "'")); return false; 
+            }}
+        }}
+
+        if (std::move(has_pattern)) {
+            // regular group
+
+            auto group_number {-1}; 
+            if (std::move(has_id)) {
+                group_number = CPP2_UFCS(next)(cur_branch_reset_state);
+            }
+
+            auto old_state {group_new_state()}; 
+            cur_group_state.modifiers = std::move(modifiers_change_to);
+            parse_until(')');
+            auto inner {create_matcher_from_state()}; 
+            group_restore_state(std::move(old_state));
+
+            auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", " + cpp2::to_string(std::move(modifier_change)) + ", \"" + cpp2::to_string(group_name) + "\", " + cpp2::to_string(std::move(group_name_brackets))))}; 
+            if (0 != CPP2_UFCS(size)(group_name)) {
+                if (!(CPP2_UFCS(contains)(named_groups, group_name))) {// Redefinition of group name is not an error. The left most one is retained.
+                    CPP2_ASSERT_IN_BOUNDS(named_groups, group_name) = group_number;
+                }
+            }
+            auto end_matcher {create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number))))}; 
+
+            std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
+            CPP2_UFCS(add)(cur_group_state, create_matcher_from_list(std::move(v)));
+        }
+        else {
+            // Only a modifier
+            cur_group_state.modifiers = std::move(modifiers_change_to);
+            CPP2_UFCS(add)(cur_group_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_change)))));
+        }
+
+        return true; 
+    }
+
+#line 2011 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
+        if (c != '\'') {return false; }
+
+        CPP2_UFCS(add)(cur_group_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
+        return true; 
+    }
+
+#line 2018 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
+
+        if (c != '{') {return false; }
+        if (CPP2_UFCS(empty)(cur_group_state)) {error("'{' without previous element.");return false; }
+        if (!(skip())) {error("End of regex before closing '}'."); return false; }
+
+        std::string inner {""}; 
+        if (!(grab_until('}', cpp2::out(&inner)))) {error("Missing closing bracket."); return false; }
+
+        inner = trim_copy(inner);
+        if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
+
+        auto kind {range_flags::greedy}; 
+        if (peek() == '?') {
+            kind = range_flags::not_greedy;
+            static_cast(skip());
+        }
+        else {if (peek() == '+') {
+            kind = range_flags::possessive;
+            static_cast(skip());
+        }}
+
+        std::string min_count {"-1"}; 
+        int min_count_number {0}; 
+        std::string max_count {"-1"}; 
+        int max_count_number {std::numeric_limits::max()}; 
+
+        size_t sep {CPP2_UFCS(find)(inner, ",")}; 
+        if (sep == std::string::npos) {
+            min_count = inner;
+            max_count = inner;
+            if (!(string_to_int(std::move(inner), min_count_number))) {error("Could not convert range to number."); return false; }
+            max_count_number = min_count_number;
+        }
+        else {
+            std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; 
+            std::string inner_last {trim_copy(CPP2_UFCS(substr)(inner, std::move(sep) + 1))}; 
+
+            if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) {
+                error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
+                return false; 
+            }
+
+            if (!(CPP2_UFCS(empty)(inner_first))) {
+                min_count = std::move(inner_first);
+                if (!(string_to_int(inner, min_count_number))) {error("Could not convert range to number."); return false; }
+            }
+            if (!(CPP2_UFCS(empty)(inner_last))) {
+                max_count = std::move(inner_last);
+                if (!(string_to_int(std::move(inner), max_count_number))) {error("Could not convert range to number."); return false; }
+            }
+        }
+
+        if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) {
+            error(("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string(std::move(min_count_number)) + " <= " + cpp2::to_string(std::move(max_count_number))));
+            return false; 
+        }
+
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(kind)));  });
+
+        return true; 
+    }
+
+#line 2081 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
+        std::string min_range {"0"}; 
+        std::string max_range {"-1"}; 
+        if (c == '*') {
+            min_range = "0";
+        }
+        else {if (c == '+') {
+            min_range = "1";
+        }
+        else {if (c == '?') {
+            min_range = "0";
+            max_range = "1";
+        }
+        else {
+            return false; 
+        }}}
+
+        auto kind {range_flags::greedy}; 
+        if (peek() == '?') {
+            kind = range_flags::not_greedy;
+            static_cast(skip());
+        }
+        else {if (peek() == '+') {
+            kind = range_flags::possessive;
+            static_cast(skip());
+        }}
+
+        if (CPP2_UFCS(empty)(cur_group_state)) {
+            error(("'" + cpp2::to_string(c) + "' without previous element."));
+            return false; 
+        }
+
+        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(kind) + ", '" + cpp2::to_string(_3) + "'"));  });
+        return true; 
+    }
+
+#line 2117 "regex.h2"
+    template  auto regex_parser::parse_until(cpp2::in term) & -> void{
+        char c {current()}; 
+        for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
+            if (c == term) {return ; }
+
+            if (!(has_error) && is_alternative(c)) {continue; }
+            if (!(has_error) && is_any(c)) {continue; }
+            if (!(has_error) && is_class(c)) {continue; }
+            if (!(has_error) && is_escape(c)) {continue; }
+            if (!(has_error) && is_anchor(c)) {continue; }
+            if (!(has_error) && is_group(c)) {continue; }
+            if (!(has_error) && is_handle_special(c)) {continue; }
+            if (!(has_error) && is_range(c)) {continue; }
+            if (!(has_error) && is_special_range(c)) {continue; }
+
+            if (has_error) {return ; }
+
+            // No special char, push a character match
+            CPP2_UFCS(add)(cur_group_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "', '" + cpp2::to_string(safe_tolower(c)) + "', '" + cpp2::to_string(safe_toupper(c)) + "'")));
+        }
+    }
+
+#line 2139 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
+        auto mod {parser_expression_modifiers()}; 
+        parse_until('\0');
+
+        if (has_error) {return "Error"; }
+
+        auto named_groups_arg {create_named_groups_list()}; 
+        auto inner {create_matcher_from_state()}; 
+        auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false")}; 
+        auto end {create_matcher("group_matcher_end_logic", "0")}; 
+        auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
+        return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(cur_branch_reset_state.cur_group) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
+    }
+
+#line 2155 "regex.h2"
+template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
+    regex_parser parser {regex, modifier, err}; 
+    auto r {CPP2_UFCS(parse)(parser)}; 
+    static_cast(std::move(parser));
+    return r; 
+}
+
+}
+}
+
+#endif

From b5e987982ad648c84b35605980ae7e89679effff Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Tue, 19 Mar 2024 14:27:15 -1000
Subject: [PATCH 092/161] Create pure2-regex-partial.cpp2

Feel free to drop this file again:

I just added it to show the results of trying to comment out all the cases that cause the metafunction to report an error, in an attempt to get an executable file. After commenting these ones, cppfront completes

I still get strange errors from the Cpp1 compiler, which I've narrowed down to this short repro:

    #define CPP2_IMPORT_STD          Yes
    #include "cpp2util.h"

If the macro is commented out, things compile fine. So there's something about the "import std" path that's going wrong, it seems on both MSVC and GCC 10. I haven't been able to diagnose the problem further than that though.
---
 regression-tests/pure2-regex-partial.cpp2 | 2579 +++++++++++++++++++++
 1 file changed, 2579 insertions(+)
 create mode 100644 regression-tests/pure2-regex-partial.cpp2

diff --git a/regression-tests/pure2-regex-partial.cpp2 b/regression-tests/pure2-regex-partial.cpp2
new file mode 100644
index 0000000000..cf6712ef2a
--- /dev/null
+++ b/regression-tests/pure2-regex-partial.cpp2
@@ -0,0 +1,2579 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply.";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_perl_tests_general: @regex type = {
+  regex_0 := "abc";
+  var_regex_0 : std::string = "abc";
+  regex_1 := "abc";
+  var_regex_1 : std::string = "abc";
+  regex_2 := "abc";
+  var_regex_2 : std::string = "abc";
+  regex_3 := "abc";
+  var_regex_3 : std::string = "abc";
+  regex_4 := "abc";
+  var_regex_4 : std::string = "abc";
+  regex_5 := "abc";
+  var_regex_5 : std::string = "abc";
+  regex_6 := "abc";
+  var_regex_6 : std::string = "abc";
+  regex_7 := "abc";
+  var_regex_7 : std::string = "abc";
+  regex_8 := "abc";
+  var_regex_8 : std::string = "abc";
+  regex_9 := "abc";
+  var_regex_9 : std::string = "abc";
+  regex_10 := "abc";
+  var_regex_10 : std::string = "abc";
+  regex_11 := "abc";
+  var_regex_11 : std::string = "abc";
+  regex_12 := "ab*c";
+  var_regex_12 : std::string = "ab*c";
+  regex_13 := "ab*c";
+  var_regex_13 : std::string = "ab*c";
+  regex_14 := "ab*c";
+  var_regex_14 : std::string = "ab*c";
+  regex_15 := "ab*bc";
+  var_regex_15 : std::string = "ab*bc";
+  regex_16 := "ab*bc";
+  var_regex_16 : std::string = "ab*bc";
+  regex_17 := "ab*bc";
+  var_regex_17 : std::string = "ab*bc";
+  regex_18 := "ab*bc";
+  var_regex_18 : std::string = "ab*bc";
+  regex_19 := "ab*bc";
+  var_regex_19 : std::string = "ab*bc";
+  regex_20 := "ab*bc";
+  var_regex_20 : std::string = "ab*bc";
+  regex_21 := "ab*bc";
+  var_regex_21 : std::string = "ab*bc";
+  regex_22 := "ab*bc";
+  var_regex_22 : std::string = "ab*bc";
+  regex_23 := "ab*bc";
+  var_regex_23 : std::string = "ab*bc";
+  regex_24 := ".{1}";
+  var_regex_24 : std::string = ".{1}";
+  regex_25 := ".{1}";
+  var_regex_25 : std::string = ".{1}";
+  regex_26 := ".{1}";
+  var_regex_26 : std::string = ".{1}";
+  regex_27 := ".{3,4}";
+  var_regex_27 : std::string = ".{3,4}";
+  regex_28 := ".{3,4}";
+  var_regex_28 : std::string = ".{3,4}";
+  regex_29 := ".{3,4}";
+  var_regex_29 : std::string = ".{3,4}";
+  regex_30 := "\N{1}";
+  var_regex_30 : std::string = "\\N{1}";
+  regex_31 := "\N{1}";
+  var_regex_31 : std::string = "\\N{1}";
+  regex_32 := "\N{1}";
+  var_regex_32 : std::string = "\\N{1}";
+  regex_33 := "\N{3,4}";
+  var_regex_33 : std::string = "\\N{3,4}";
+  regex_34 := "\N{3,4}";
+  var_regex_34 : std::string = "\\N{3,4}";
+  regex_35 := "\N{3,4}";
+  var_regex_35 : std::string = "\\N{3,4}";
+  regex_36 := "\N{ 3 , 4 }";
+  var_regex_36 : std::string = "\\N{ 3 , 4 }";
+  regex_37 := "ab{0,}bc";
+  var_regex_37 : std::string = "ab{0,}bc";
+  regex_38 := "ab{0,}bc";
+  var_regex_38 : std::string = "ab{0,}bc";
+  regex_39 := "ab{0,}bc";
+  var_regex_39 : std::string = "ab{0,}bc";
+  regex_40 := "ab+bc";
+  var_regex_40 : std::string = "ab+bc";
+  regex_41 := "ab+bc";
+  var_regex_41 : std::string = "ab+bc";
+  regex_42 := "ab+bc";
+  var_regex_42 : std::string = "ab+bc";
+  regex_43 := "ab+bc";
+  var_regex_43 : std::string = "ab+bc";
+  regex_44 := "ab+bc";
+  var_regex_44 : std::string = "ab+bc";
+  regex_45 := "ab{1,}bc";
+  var_regex_45 : std::string = "ab{1,}bc";
+  regex_46 := "ab+bc";
+  var_regex_46 : std::string = "ab+bc";
+  regex_47 := "ab+bc";
+  var_regex_47 : std::string = "ab+bc";
+  regex_48 := "ab+bc";
+  var_regex_48 : std::string = "ab+bc";
+  regex_49 := "ab{1,}bc";
+  var_regex_49 : std::string = "ab{1,}bc";
+  regex_50 := "ab{1,}bc";
+  var_regex_50 : std::string = "ab{1,}bc";
+  regex_51 := "ab{1,}bc";
+  var_regex_51 : std::string = "ab{1,}bc";
+  regex_52 := "ab{1,3}bc";
+  var_regex_52 : std::string = "ab{1,3}bc";
+  regex_53 := "ab{1,3}bc";
+  var_regex_53 : std::string = "ab{1,3}bc";
+  regex_54 := "ab{1,3}bc";
+  var_regex_54 : std::string = "ab{1,3}bc";
+  regex_55 := "ab{3,4}bc";
+  var_regex_55 : std::string = "ab{3,4}bc";
+  regex_56 := "ab{3,4}bc";
+  var_regex_56 : std::string = "ab{3,4}bc";
+  regex_57 := "ab{3,4}bc";
+  var_regex_57 : std::string = "ab{3,4}bc";
+  regex_58 := "ab{4,5}bc";
+  var_regex_58 : std::string = "ab{4,5}bc";
+  regex_59 := "ab?bc";
+  var_regex_59 : std::string = "ab?bc";
+  regex_60 := "ab?bc";
+  var_regex_60 : std::string = "ab?bc";
+  regex_61 := "ab{0,1}bc";
+  var_regex_61 : std::string = "ab{0,1}bc";
+  regex_62 := "ab?bc";
+  var_regex_62 : std::string = "ab?bc";
+  regex_63 := "ab?c";
+  var_regex_63 : std::string = "ab?c";
+  regex_64 := "ab{0,1}c";
+  var_regex_64 : std::string = "ab{0,1}c";
+  regex_65 := "^abc\$";
+  var_regex_65 : std::string = "^abc\$";
+  regex_66 := "^abc\$";
+  var_regex_66 : std::string = "^abc\$";
+  regex_67 := "^abc";
+  var_regex_67 : std::string = "^abc";
+  regex_68 := "^abc\$";
+  var_regex_68 : std::string = "^abc\$";
+  regex_69 := "abc\$";
+  var_regex_69 : std::string = "abc\$";
+  regex_70 := "abc\$";
+  var_regex_70 : std::string = "abc\$";
+  regex_71 := "^";
+  var_regex_71 : std::string = "^";
+  regex_72 := "\$";
+  var_regex_72 : std::string = "\$";
+  regex_73 := "a.c";
+  var_regex_73 : std::string = "a.c";
+  regex_74 := "a.c";
+  var_regex_74 : std::string = "a.c";
+  regex_75 := "a\Nc";
+  var_regex_75 : std::string = "a\\Nc";
+  regex_76 := "a.*c";
+  var_regex_76 : std::string = "a.*c";
+  regex_77 := "a\N*c";
+  var_regex_77 : std::string = "a\\N*c";
+  regex_78 := "a.*c";
+  var_regex_78 : std::string = "a.*c";
+  regex_79 := "a\N*c";
+  var_regex_79 : std::string = "a\\N*c";
+//   regex_80 := "a[bc]d";
+//   var_regex_80 : std::string = "a[bc]d";
+//   regex_81 := "a[bc]d";
+//   var_regex_81 : std::string = "a[bc]d";
+//   regex_82 := "a[b]d";
+//   var_regex_82 : std::string = "a[b]d";
+//   regex_83 := "[a][b][d]";
+//   var_regex_83 : std::string = "[a][b][d]";
+//   regex_84 := ".[b].";
+//   var_regex_84 : std::string = ".[b].";
+//   regex_85 := ".[b].";
+//   var_regex_85 : std::string = ".[b].";
+//   regex_86 := "a[b-d]e";
+//   var_regex_86 : std::string = "a[b-d]e";
+//   regex_87 := "a[b-d]e";
+//   var_regex_87 : std::string = "a[b-d]e";
+//   regex_88 := "a[b-d]";
+//   var_regex_88 : std::string = "a[b-d]";
+//   regex_89 := "a[-b]";
+//   var_regex_89 : std::string = "a[-b]";
+//   regex_90 := "a[b-]";
+//   var_regex_90 : std::string = "a[b-]";
+  regex_91 := "a]";
+  var_regex_91 : std::string = "a]";
+  regex_92 := "a[]]b";
+  var_regex_92 : std::string = "a[]]b";
+//   regex_93 := "a[^bc]d";
+//   var_regex_93 : std::string = "a[^bc]d";
+//   regex_94 := "a[^bc]d";
+//   var_regex_94 : std::string = "a[^bc]d";
+//   regex_95 := "a[^-b]c";
+//   var_regex_95 : std::string = "a[^-b]c";
+//   regex_96 := "a[^-b]c";
+//   var_regex_96 : std::string = "a[^-b]c";
+//   regex_97 := "a[^]b]c";
+//   var_regex_97 : std::string = "a[^]b]c";
+//   regex_98 := "a[^]b]c";
+//   var_regex_98 : std::string = "a[^]b]c";
+  regex_99 := "\ba\b";
+  var_regex_99 : std::string = "\ba\b";
+  regex_100 := "\ba\b";
+  var_regex_100 : std::string = "\ba\b";
+  regex_101 := "\ba\b";
+  var_regex_101 : std::string = "\ba\b";
+  regex_102 := "\by\b";
+  var_regex_102 : std::string = "\by\b";
+  regex_103 := "\by\b";
+  var_regex_103 : std::string = "\by\b";
+  regex_104 := "\by\b";
+  var_regex_104 : std::string = "\by\b";
+  regex_105 := "\Ba\B";
+  var_regex_105 : std::string = "\Ba\B";
+  regex_106 := "\Ba\B";
+  var_regex_106 : std::string = "\Ba\B";
+  regex_107 := "\Ba\B";
+  var_regex_107 : std::string = "\Ba\B";
+  regex_108 := "\By\b";
+  var_regex_108 : std::string = "\By\b";
+  regex_109 := "\By\b";
+  var_regex_109 : std::string = "\By\b";
+  regex_110 := "\By\b";
+  var_regex_110 : std::string = "\By\b";
+  regex_111 := "\By\b";
+  var_regex_111 : std::string = "\By\b";
+  regex_112 := "\by\B";
+  var_regex_112 : std::string = "\by\B";
+  regex_113 := "\By\B";
+  var_regex_113 : std::string = "\By\B";
+  regex_114 := "\b";
+  var_regex_114 : std::string = "\b";
+  regex_115 := "\B";
+  var_regex_115 : std::string = "\B";
+  regex_116 := "\w";
+  var_regex_116 : std::string = "\w";
+  regex_117 := "\w";
+  var_regex_117 : std::string = "\w";
+  regex_118 := "\W";
+  var_regex_118 : std::string = "\W";
+  regex_119 := "\W";
+  var_regex_119 : std::string = "\W";
+  regex_120 := "a\sb";
+  var_regex_120 : std::string = "a\sb";
+  regex_121 := "a\sb";
+  var_regex_121 : std::string = "a\sb";
+  regex_122 := "a\Sb";
+  var_regex_122 : std::string = "a\Sb";
+  regex_123 := "a\Sb";
+  var_regex_123 : std::string = "a\Sb";
+  regex_124 := "\d";
+  var_regex_124 : std::string = "\d";
+  regex_125 := "\d";
+  var_regex_125 : std::string = "\d";
+  regex_126 := "\D";
+  var_regex_126 : std::string = "\D";
+  regex_127 := "\D";
+  var_regex_127 : std::string = "\D";
+//   regex_128 := "[\w]";
+//   var_regex_128 : std::string = "[\w]";
+//   regex_129 := "[\w]";
+//   var_regex_129 : std::string = "[\w]";
+//   regex_130 := "[\W]";
+//   var_regex_130 : std::string = "[\W]";
+//   regex_131 := "[\W]";
+//   var_regex_131 : std::string = "[\W]";
+//   regex_132 := "a[\s]b";
+//   var_regex_132 : std::string = "a[\s]b";
+//   regex_133 := "a[\s]b";
+//   var_regex_133 : std::string = "a[\s]b";
+//   regex_134 := "a[\S]b";
+//   var_regex_134 : std::string = "a[\S]b";
+//   regex_135 := "a[\S]b";
+//   var_regex_135 : std::string = "a[\S]b";
+//   regex_136 := "[\d]";
+//   var_regex_136 : std::string = "[\d]";
+//   regex_137 := "[\d]";
+//   var_regex_137 : std::string = "[\d]";
+//   regex_138 := "[\D]";
+//   var_regex_138 : std::string = "[\D]";
+//   regex_139 := "[\D]";
+  var_regex_139 : std::string = "[\D]";
+  regex_140 := "ab|cd";
+  var_regex_140 : std::string = "ab|cd";
+  regex_141 := "ab|cd";
+  var_regex_141 : std::string = "ab|cd";
+  regex_142 := "()ef";
+  var_regex_142 : std::string = "()ef";
+  regex_143 := "()ef";
+  var_regex_143 : std::string = "()ef";
+  regex_144 := "()ef";
+  var_regex_144 : std::string = "()ef";
+  regex_145 := "()ef";
+  var_regex_145 : std::string = "()ef";
+  regex_146 := "()ef";
+  var_regex_146 : std::string = "()ef";
+  regex_147 := "\$b";
+  var_regex_147 : std::string = "\$b";
+  regex_148 := "a\(b";
+  var_regex_148 : std::string = "a\(b";
+  regex_149 := "a\(*b";
+  var_regex_149 : std::string = "a\(*b";
+  regex_150 := "a\(*b";
+  var_regex_150 : std::string = "a\(*b";
+  regex_151 := "a\\b";
+  var_regex_151 : std::string = "a\\b";
+  regex_152 := "((a))";
+  var_regex_152 : std::string = "((a))";
+  regex_153 := "((a))";
+  var_regex_153 : std::string = "((a))";
+  regex_154 := "((a))";
+  var_regex_154 : std::string = "((a))";
+  regex_155 := "(foo)(\g-2)";
+  var_regex_155 : std::string = "(foo)(\g-2)";
+  regex_156 := "(foo)(\g-2)(foo)(\g-2)";
+  var_regex_156 : std::string = "(foo)(\g-2)(foo)(\g-2)";
+//   regex_157 := "(([abc]+) \g-1)(([abc]+) \g{-1})";
+//   var_regex_157 : std::string = "(([abc]+) \g-1)(([abc]+) \g{-1})";
+  regex_158 := "(a)(b)(c)\g1\g2\g3";
+  var_regex_158 : std::string = "(a)(b)(c)\g1\g2\g3";
+  regex_159 := "abc";
+  regex_159_mod := "i";
+  var_regex_159 : std::string = "abc";
+  regex_160 := "abc";
+  regex_160_mod := "i";
+  var_regex_160 : std::string = "abc";
+  regex_161 := "abc";
+  regex_161_mod := "i";
+  var_regex_161 : std::string = "abc";
+  regex_162 := "abc";
+  regex_162_mod := "i";
+  var_regex_162 : std::string = "abc";
+  regex_163 := "abc";
+  regex_163_mod := "i";
+  var_regex_163 : std::string = "abc";
+  regex_164 := "abc";
+  regex_164_mod := "i";
+  var_regex_164 : std::string = "abc";
+  regex_165 := "ab*c";
+  regex_165_mod := "i";
+  var_regex_165 : std::string = "ab*c";
+  regex_166 := "ab*bc";
+  regex_166_mod := "i";
+  var_regex_166 : std::string = "ab*bc";
+  regex_167 := "ab*bc";
+  regex_167_mod := "i";
+  var_regex_167 : std::string = "ab*bc";
+  regex_168 := "ab*?bc";
+  regex_168_mod := "i";
+  var_regex_168 : std::string = "ab*?bc";
+  regex_169 := "ab{0,}?bc";
+  regex_169_mod := "i";
+  var_regex_169 : std::string = "ab{0,}?bc";
+  regex_170 := "ab+?bc";
+  regex_170_mod := "i";
+  var_regex_170 : std::string = "ab+?bc";
+  regex_171 := "ab+bc";
+  regex_171_mod := "i";
+  var_regex_171 : std::string = "ab+bc";
+  regex_172 := "ab+bc";
+  regex_172_mod := "i";
+  var_regex_172 : std::string = "ab+bc";
+  regex_173 := "ab{1,}bc";
+  regex_173_mod := "i";
+  var_regex_173 : std::string = "ab{1,}bc";
+  regex_174 := "ab+bc";
+  regex_174_mod := "i";
+  var_regex_174 : std::string = "ab+bc";
+  regex_175 := "ab{1,}?bc";
+  regex_175_mod := "i";
+  var_regex_175 : std::string = "ab{1,}?bc";
+  regex_176 := "ab{1,3}?bc";
+  regex_176_mod := "i";
+  var_regex_176 : std::string = "ab{1,3}?bc";
+  regex_177 := "ab{3,4}?bc";
+  regex_177_mod := "i";
+  var_regex_177 : std::string = "ab{3,4}?bc";
+  regex_178 := "ab{4,5}?bc";
+  regex_178_mod := "i";
+  var_regex_178 : std::string = "ab{4,5}?bc";
+  regex_179 := "ab??bc";
+  regex_179_mod := "i";
+  var_regex_179 : std::string = "ab??bc";
+  regex_180 := "ab??bc";
+  regex_180_mod := "i";
+  var_regex_180 : std::string = "ab??bc";
+  regex_181 := "ab{0,1}?bc";
+  regex_181_mod := "i";
+  var_regex_181 : std::string = "ab{0,1}?bc";
+  regex_182 := "ab??bc";
+  regex_182_mod := "i";
+  var_regex_182 : std::string = "ab??bc";
+  regex_183 := "ab??c";
+  regex_183_mod := "i";
+  var_regex_183 : std::string = "ab??c";
+  regex_184 := "ab{0,1}?c";
+  regex_184_mod := "i";
+  var_regex_184 : std::string = "ab{0,1}?c";
+  regex_185 := "^abc\$";
+  regex_185_mod := "i";
+  var_regex_185 : std::string = "^abc\$";
+  regex_186 := "^abc\$";
+  regex_186_mod := "i";
+  var_regex_186 : std::string = "^abc\$";
+  regex_187 := "^abc";
+  regex_187_mod := "i";
+  var_regex_187 : std::string = "^abc";
+  regex_188 := "^abc\$";
+  regex_188_mod := "i";
+  var_regex_188 : std::string = "^abc\$";
+  regex_189 := "abc\$";
+  regex_189_mod := "i";
+  var_regex_189 : std::string = "abc\$";
+  regex_190 := "^";
+  regex_190_mod := "i";
+  var_regex_190 : std::string = "^";
+  regex_191 := "\$";
+  regex_191_mod := "i";
+  var_regex_191 : std::string = "\$";
+  regex_192 := "a.c";
+  regex_192_mod := "i";
+  var_regex_192 : std::string = "a.c";
+  regex_193 := "a.c";
+  regex_193_mod := "i";
+  var_regex_193 : std::string = "a.c";
+  regex_194 := "a\Nc";
+  regex_194_mod := "i";
+  var_regex_194 : std::string = "a\\Nc";
+  regex_195 := "a.*?c";
+  regex_195_mod := "i";
+  var_regex_195 : std::string = "a.*?c";
+  regex_196 := "a.*c";
+  regex_196_mod := "i";
+  var_regex_196 : std::string = "a.*c";
+//   regex_197 := "a[bc]d";
+//   regex_197_mod := "i";
+//   var_regex_197 : std::string = "a[bc]d";
+//   regex_198 := "a[bc]d";
+//   regex_198_mod := "i";
+//   var_regex_198 : std::string = "a[bc]d";
+//   regex_199 := "a[b-d]e";
+//   regex_199_mod := "i";
+//   var_regex_199 : std::string = "a[b-d]e";
+//   regex_200 := "a[b-d]e";
+//   regex_200_mod := "i";
+//   var_regex_200 : std::string = "a[b-d]e";
+//   regex_201 := "a[b-d]";
+//   regex_201_mod := "i";
+//   var_regex_201 : std::string = "a[b-d]";
+//   regex_202 := "a[-b]";
+//   regex_202_mod := "i";
+//   var_regex_202 : std::string = "a[-b]";
+//   regex_203 := "a[b-]";
+//   regex_203_mod := "i";
+//   var_regex_203 : std::string = "a[b-]";
+  regex_204 := "a]";
+  regex_204_mod := "i";
+  var_regex_204 : std::string = "a]";
+  regex_205 := "a[]]b";
+  regex_205_mod := "i";
+  var_regex_205 : std::string = "a[]]b";
+//   regex_206 := "a[^bc]d";
+//   regex_206_mod := "i";
+//   var_regex_206 : std::string = "a[^bc]d";
+//   regex_207 := "a[^bc]d";
+//   regex_207_mod := "i";
+//   var_regex_207 : std::string = "a[^bc]d";
+//   regex_208 := "a[^-b]c";
+//   regex_208_mod := "i";
+//   var_regex_208 : std::string = "a[^-b]c";
+//   regex_209 := "a[^-b]c";
+//   regex_209_mod := "i";
+//   var_regex_209 : std::string = "a[^-b]c";
+//   regex_210 := "a[^]b]c";
+//   regex_210_mod := "i";
+//   var_regex_210 : std::string = "a[^]b]c";
+//   regex_211 := "a[^]b]c";
+//   regex_211_mod := "i";
+//   var_regex_211 : std::string = "a[^]b]c";
+  regex_212 := "ab|cd";
+  regex_212_mod := "i";
+  var_regex_212 : std::string = "ab|cd";
+  regex_213 := "ab|cd";
+  regex_213_mod := "i";
+  var_regex_213 : std::string = "ab|cd";
+  regex_214 := "()ef";
+  regex_214_mod := "i";
+  var_regex_214 : std::string = "()ef";
+  regex_215 := "\$b";
+  regex_215_mod := "i";
+  var_regex_215 : std::string = "\$b";
+  regex_216 := "a\(b";
+  regex_216_mod := "i";
+  var_regex_216 : std::string = "a\(b";
+  regex_217 := "a\(*b";
+  regex_217_mod := "i";
+  var_regex_217 : std::string = "a\(*b";
+  regex_218 := "a\(*b";
+  regex_218_mod := "i";
+  var_regex_218 : std::string = "a\(*b";
+  regex_219 := "a\\b";
+  regex_219_mod := "i";
+  var_regex_219 : std::string = "a\\b";
+  regex_220 := "((a))";
+  regex_220_mod := "i";
+  var_regex_220 : std::string = "((a))";
+  regex_221 := "(a)b(c)";
+  regex_221_mod := "i";
+  var_regex_221 : std::string = "(a)b(c)";
+  regex_222 := "a+b+c";
+  regex_222_mod := "i";
+  var_regex_222 : std::string = "a+b+c";
+  regex_223 := "a{1,}b{1,}c";
+  regex_223_mod := "i";
+  var_regex_223 : std::string = "a{1,}b{1,}c";
+  regex_224 := "a.+?c";
+  regex_224_mod := "i";
+  var_regex_224 : std::string = "a.+?c";
+  regex_225 := "a.*?c";
+  regex_225_mod := "i";
+  var_regex_225 : std::string = "a.*?c";
+  regex_226 := "a.{0,5}?c";
+  regex_226_mod := "i";
+  var_regex_226 : std::string = "a.{0,5}?c";
+  regex_227 := "(a+|b)*";
+  regex_227_mod := "i";
+  var_regex_227 : std::string = "(a+|b)*";
+  regex_228 := "(a+|b){0,}";
+  regex_228_mod := "i";
+  var_regex_228 : std::string = "(a+|b){0,}";
+  regex_229 := "(a+|b)+";
+  regex_229_mod := "i";
+  var_regex_229 : std::string = "(a+|b)+";
+  regex_230 := "(a+|b){1,}";
+  regex_230_mod := "i";
+  var_regex_230 : std::string = "(a+|b){1,}";
+  regex_231 := "(a+|b)?";
+  regex_231_mod := "i";
+  var_regex_231 : std::string = "(a+|b)?";
+  regex_232 := "(a+|b){0,1}";
+  regex_232_mod := "i";
+  var_regex_232 : std::string = "(a+|b){0,1}";
+  regex_233 := "(a+|b){0,1}?";
+  regex_233_mod := "i";
+  var_regex_233 : std::string = "(a+|b){0,1}?";
+//   regex_234 := "[^ab]*";
+//   regex_234_mod := "i";
+//   var_regex_234 : std::string = "[^ab]*";
+  regex_235 := "abc";
+  regex_235_mod := "i";
+  var_regex_235 : std::string = "abc";
+  regex_236 := "a*";
+  regex_236_mod := "i";
+  var_regex_236 : std::string = "a*";
+//   regex_237 := "([abc])*d";
+//   regex_237_mod := "i";
+//   var_regex_237 : std::string = "([abc])*d";
+//   regex_238 := "([abc])*bcd";
+//   regex_238_mod := "i";
+//   var_regex_238 : std::string = "([abc])*bcd";
+  regex_239 := "a|b|c|d|e";
+  regex_239_mod := "i";
+  var_regex_239 : std::string = "a|b|c|d|e";
+  regex_240 := "(a|b|c|d|e)f";
+  regex_240_mod := "i";
+  var_regex_240 : std::string = "(a|b|c|d|e)f";
+  regex_241 := "abcd*efg";
+  regex_241_mod := "i";
+  var_regex_241 : std::string = "abcd*efg";
+  regex_242 := "ab*";
+  regex_242_mod := "i";
+  var_regex_242 : std::string = "ab*";
+  regex_243 := "ab*";
+  regex_243_mod := "i";
+  var_regex_243 : std::string = "ab*";
+  regex_244 := "(ab|cd)e";
+  regex_244_mod := "i";
+  var_regex_244 : std::string = "(ab|cd)e";
+//   regex_245 := "[abhgefdc]ij";
+//   regex_245_mod := "i";
+//   var_regex_245 : std::string = "[abhgefdc]ij";
+  regex_246 := "^(ab|cd)e";
+  regex_246_mod := "i";
+  var_regex_246 : std::string = "^(ab|cd)e";
+  regex_247 := "(abc|)ef";
+  regex_247_mod := "i";
+  var_regex_247 : std::string = "(abc|)ef";
+  regex_248 := "(a|b)c*d";
+  regex_248_mod := "i";
+  var_regex_248 : std::string = "(a|b)c*d";
+  regex_249 := "(ab|ab*)bc";
+  regex_249_mod := "i";
+  var_regex_249 : std::string = "(ab|ab*)bc";
+//   regex_250 := "a([bc]*)c*";
+//   regex_250_mod := "i";
+//   var_regex_250 : std::string = "a([bc]*)c*";
+//   regex_251 := "a([bc]*)(c*d)";
+//   regex_251_mod := "i";
+//   var_regex_251 : std::string = "a([bc]*)(c*d)";
+//   regex_252 := "a([bc]+)(c*d)";
+//   regex_252_mod := "i";
+//   var_regex_252 : std::string = "a([bc]+)(c*d)";
+//   regex_253 := "a([bc]*)(c+d)";
+//   regex_253_mod := "i";
+//   var_regex_253 : std::string = "a([bc]*)(c+d)";
+//   regex_254 := "a[bcd]*dcdcde";
+//   regex_254_mod := "i";
+//   var_regex_254 : std::string = "a[bcd]*dcdcde";
+//   regex_255 := "a[bcd]+dcdcde";
+//   regex_255_mod := "i";
+//   var_regex_255 : std::string = "a[bcd]+dcdcde";
+  regex_256 := "(ab|a)b*c";
+  regex_256_mod := "i";
+  var_regex_256 : std::string = "(ab|a)b*c";
+  regex_257 := "((a)(b)c)(d)";
+  regex_257_mod := "i";
+  var_regex_257 : std::string = "((a)(b)c)(d)";
+//   regex_258 := "[a-zA-Z_][a-zA-Z0-9_]*";
+//   regex_258_mod := "i";
+//   var_regex_258 : std::string = "[a-zA-Z_][a-zA-Z0-9_]*";
+//   regex_259 := "^a(bc+|b[eh])g|.h\$";
+//   regex_259_mod := "i";
+//   var_regex_259 : std::string = "^a(bc+|b[eh])g|.h\$";
+  regex_260 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_260_mod := "i";
+  var_regex_260 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_261 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_261_mod := "i";
+  var_regex_261 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_262 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_262_mod := "i";
+  var_regex_262 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_263 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_263_mod := "i";
+  var_regex_263 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_264 := "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_264_mod := "i";
+  var_regex_264 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
+  regex_265 := "((((((((((a))))))))))";
+  regex_265_mod := "i";
+  var_regex_265 : std::string = "((((((((((a))))))))))";
+  regex_266 := "((((((((((a))))))))))\10";
+  regex_266_mod := "i";
+  var_regex_266 : std::string = "((((((((((a))))))))))\10";
+  regex_267 := "(((((((((a)))))))))";
+  regex_267_mod := "i";
+  var_regex_267 : std::string = "(((((((((a)))))))))";
+  regex_268 := "multiple words of text";
+  regex_268_mod := "i";
+  var_regex_268 : std::string = "multiple words of text";
+  regex_269 := "multiple words";
+  regex_269_mod := "i";
+  var_regex_269 : std::string = "multiple words";
+  regex_270 := "(.*)c(.*)";
+  regex_270_mod := "i";
+  var_regex_270 : std::string = "(.*)c(.*)";
+  regex_271 := "\((.*), (.*)\)";
+  regex_271_mod := "i";
+  var_regex_271 : std::string = "\((.*), (.*)\)";
+//   regex_272 := "[k]";
+//   regex_272_mod := "i";
+//   var_regex_272 : std::string = "[k]";
+  regex_273 := "abcd";
+  regex_273_mod := "i";
+  var_regex_273 : std::string = "abcd";
+  regex_274 := "a(bc)d";
+  regex_274_mod := "i";
+  var_regex_274 : std::string = "a(bc)d";
+//   regex_275 := "a[-]?c";
+//   regex_275_mod := "i";
+//   var_regex_275 : std::string = "a[-]?c";
+  regex_276 := "(abc)\1";
+  regex_276_mod := "i";
+  var_regex_276 : std::string = "(abc)\1";
+//   regex_277 := "([a-c]*)\1";
+//   regex_277_mod := "i";
+//   var_regex_277 : std::string = "([a-c]*)\1";
+  regex_278 := "a++a";
+  var_regex_278 : std::string = "a++a";
+  regex_279 := "a*+a";
+  var_regex_279 : std::string = "a*+a";
+  regex_280 := "a{1,5}+a";
+  var_regex_280 : std::string = "a{1,5}+a";
+  regex_281 := "a?+a";
+  var_regex_281 : std::string = "a?+a";
+  regex_282 := "a++b";
+  var_regex_282 : std::string = "a++b";
+  regex_283 := "a*+b";
+  var_regex_283 : std::string = "a*+b";
+  regex_284 := "a{1,5}+b";
+  var_regex_284 : std::string = "a{1,5}+b";
+  regex_285 := "a?+b";
+  var_regex_285 : std::string = "a?+b";
+  regex_286 := "fooa++a";
+  var_regex_286 : std::string = "fooa++a";
+  regex_287 := "fooa*+a";
+  var_regex_287 : std::string = "fooa*+a";
+  regex_288 := "fooa{1,5}+a";
+  var_regex_288 : std::string = "fooa{1,5}+a";
+  regex_289 := "fooa?+a";
+  var_regex_289 : std::string = "fooa?+a";
+  regex_290 := "fooa++b";
+  var_regex_290 : std::string = "fooa++b";
+  regex_291 := "fooa*+b";
+  var_regex_291 : std::string = "fooa*+b";
+  regex_292 := "fooa{1,5}+b";
+  var_regex_292 : std::string = "fooa{1,5}+b";
+  regex_293 := "fooa?+b";
+  var_regex_293 : std::string = "fooa?+b";
+  regex_294 := "(aA)++(aA)";
+  var_regex_294 : std::string = "(aA)++(aA)";
+  regex_295 := "(aA|bB)++(aA|bB)";
+  var_regex_295 : std::string = "(aA|bB)++(aA|bB)";
+  regex_296 := "(aA)*+(aA)";
+  var_regex_296 : std::string = "(aA)*+(aA)";
+  regex_297 := "(aA|bB)*+(aA|bB)";
+  var_regex_297 : std::string = "(aA|bB)*+(aA|bB)";
+  regex_298 := "(aA){1,5}+(aA)";
+  var_regex_298 : std::string = "(aA){1,5}+(aA)";
+  regex_299 := "(aA|bB){1,5}+(aA|bB)";
+  var_regex_299 : std::string = "(aA|bB){1,5}+(aA|bB)";
+  regex_300 := "(aA)?+(aA)";
+  var_regex_300 : std::string = "(aA)?+(aA)";
+  regex_301 := "(aA|bB)?+(aA|bB)";
+  var_regex_301 : std::string = "(aA|bB)?+(aA|bB)";
+  regex_302 := "(aA)++b";
+  var_regex_302 : std::string = "(aA)++b";
+  regex_303 := "(aA|bB)++b";
+  var_regex_303 : std::string = "(aA|bB)++b";
+  regex_304 := "(aA)*+b";
+  var_regex_304 : std::string = "(aA)*+b";
+  regex_305 := "(aA|bB)*+b";
+  var_regex_305 : std::string = "(aA|bB)*+b";
+  regex_306 := "(aA){1,5}+b";
+  var_regex_306 : std::string = "(aA){1,5}+b";
+  regex_307 := "(aA|bB){1,5}+b";
+  var_regex_307 : std::string = "(aA|bB){1,5}+b";
+  regex_308 := "(aA)?+b";
+  var_regex_308 : std::string = "(aA)?+b";
+  regex_309 := "(aA|bB)?+b";
+  var_regex_309 : std::string = "(aA|bB)?+b";
+  regex_310 := "foo(aA)++(aA)";
+  var_regex_310 : std::string = "foo(aA)++(aA)";
+  regex_311 := "foo(aA|bB)++(aA|bB)";
+  var_regex_311 : std::string = "foo(aA|bB)++(aA|bB)";
+  regex_312 := "foo(aA)*+(aA)";
+  var_regex_312 : std::string = "foo(aA)*+(aA)";
+  regex_313 := "foo(aA|bB)*+(aA|bB)";
+  var_regex_313 : std::string = "foo(aA|bB)*+(aA|bB)";
+  regex_314 := "foo(aA){1,5}+(aA)";
+  var_regex_314 : std::string = "foo(aA){1,5}+(aA)";
+  regex_315 := "foo(aA|bB){1,5}+(aA|bB)";
+  var_regex_315 : std::string = "foo(aA|bB){1,5}+(aA|bB)";
+  regex_316 := "foo(aA)?+(aA)";
+  var_regex_316 : std::string = "foo(aA)?+(aA)";
+  regex_317 := "foo(aA|bB)?+(aA|bB)";
+  var_regex_317 : std::string = "foo(aA|bB)?+(aA|bB)";
+  regex_318 := "foo(aA)++b";
+  var_regex_318 : std::string = "foo(aA)++b";
+  regex_319 := "foo(aA|bB)++b";
+  var_regex_319 : std::string = "foo(aA|bB)++b";
+  regex_320 := "foo(aA)*+b";
+  var_regex_320 : std::string = "foo(aA)*+b";
+  regex_321 := "foo(aA|bB)*+b";
+  var_regex_321 : std::string = "foo(aA|bB)*+b";
+  regex_322 := "foo(aA){1,5}+b";
+  var_regex_322 : std::string = "foo(aA){1,5}+b";
+  regex_323 := "foo(aA|bB){1,5}+b";
+  var_regex_323 : std::string = "foo(aA|bB){1,5}+b";
+  regex_324 := "foo(aA)?+b";
+  var_regex_324 : std::string = "foo(aA)?+b";
+  regex_325 := "foo(aA|bB)?+b";
+  var_regex_325 : std::string = "foo(aA|bB)?+b";
+  regex_326 := "foo(\h+)bar";
+  var_regex_326 : std::string = "foo(\h+)bar";
+  regex_327 := "(\H+)(\h)";
+  var_regex_327 : std::string = "(\H+)(\h)";
+  regex_328 := "(\h+)(\H)";
+  var_regex_328 : std::string = "(\h+)(\H)";
+  regex_329 := "foo(\h)bar";
+  var_regex_329 : std::string = "foo(\h)bar";
+  regex_330 := "(\H)(\h)";
+  var_regex_330 : std::string = "(\H)(\h)";
+  regex_331 := "(\h)(\H)";
+  var_regex_331 : std::string = "(\h)(\H)";
+  regex_332 := "foo(\v+)bar";
+  var_regex_332 : std::string = "foo(\v+)bar";
+  regex_333 := "(\V+)(\v)";
+  var_regex_333 : std::string = "(\V+)(\v)";
+  regex_334 := "(\v+)(\V)";
+  var_regex_334 : std::string = "(\v+)(\V)";
+  regex_335 := "foo(\v)bar";
+  var_regex_335 : std::string = "foo(\v)bar";
+  regex_336 := "(\V)(\v)";
+  var_regex_336 : std::string = "(\V)(\v)";
+  regex_337 := "(\v)(\V)";
+  var_regex_337 : std::string = "(\v)(\V)";
+  regex_338 := "(?:(?i)a)b";
+  var_regex_338 : std::string = "(?:(?i)a)b";
+  regex_339 := "((?i)a)b";
+  var_regex_339 : std::string = "((?i)a)b";
+  regex_340 := "(?:(?i)a)b";
+  var_regex_340 : std::string = "(?:(?i)a)b";
+  regex_341 := "((?i)a)b";
+  var_regex_341 : std::string = "((?i)a)b";
+  regex_342 := "(?:(?i)a)b";
+  var_regex_342 : std::string = "(?:(?i)a)b";
+  regex_343 := "((?i)a)b";
+  var_regex_343 : std::string = "((?i)a)b";
+  regex_344 := "(?i:a)b";
+  var_regex_344 : std::string = "(?i:a)b";
+  regex_345 := "((?i:a))b";
+  var_regex_345 : std::string = "((?i:a))b";
+  regex_346 := "(?i:a)b";
+  var_regex_346 : std::string = "(?i:a)b";
+  regex_347 := "((?i:a))b";
+  var_regex_347 : std::string = "((?i:a))b";
+  regex_348 := "(?i:a)b";
+  var_regex_348 : std::string = "(?i:a)b";
+  regex_349 := "((?i:a))b";
+  var_regex_349 : std::string = "((?i:a))b";
+  regex_350 := "(?:(?-i)a)b";
+  regex_350_mod := "i";
+  var_regex_350 : std::string = "(?:(?-i)a)b";
+  regex_351 := "((?-i)a)b";
+  regex_351_mod := "i";
+  var_regex_351 : std::string = "((?-i)a)b";
+  regex_352 := "(?:(?-i)a)b";
+  regex_352_mod := "i";
+  var_regex_352 : std::string = "(?:(?-i)a)b";
+  regex_353 := "((?-i)a)b";
+  regex_353_mod := "i";
+  var_regex_353 : std::string = "((?-i)a)b";
+  regex_354 := "(?:(?-i)a)b";
+  regex_354_mod := "i";
+  var_regex_354 : std::string = "(?:(?-i)a)b";
+  regex_355 := "((?-i)a)b";
+  regex_355_mod := "i";
+  var_regex_355 : std::string = "((?-i)a)b";
+  regex_356 := "(?:(?-i)a)b";
+  regex_356_mod := "i";
+  var_regex_356 : std::string = "(?:(?-i)a)b";
+  regex_357 := "((?-i)a)b";
+  regex_357_mod := "i";
+  var_regex_357 : std::string = "((?-i)a)b";
+  regex_358 := "(?:(?-i)a)b";
+  regex_358_mod := "i";
+  var_regex_358 : std::string = "(?:(?-i)a)b";
+  regex_359 := "((?-i)a)b";
+  regex_359_mod := "i";
+  var_regex_359 : std::string = "((?-i)a)b";
+  regex_360 := "(?-i:a)b";
+  regex_360_mod := "i";
+  var_regex_360 : std::string = "(?-i:a)b";
+  regex_361 := "((?-i:a))b";
+  regex_361_mod := "i";
+  var_regex_361 : std::string = "((?-i:a))b";
+  regex_362 := "(?-i:a)b";
+  regex_362_mod := "i";
+  var_regex_362 : std::string = "(?-i:a)b";
+  regex_363 := "((?-i:a))b";
+  regex_363_mod := "i";
+  var_regex_363 : std::string = "((?-i:a))b";
+  regex_364 := "(?-i:a)b";
+  regex_364_mod := "i";
+  var_regex_364 : std::string = "(?-i:a)b";
+  regex_365 := "((?-i:a))b";
+  regex_365_mod := "i";
+  var_regex_365 : std::string = "((?-i:a))b";
+  regex_366 := "(?-i:a)b";
+  regex_366_mod := "i";
+  var_regex_366 : std::string = "(?-i:a)b";
+  regex_367 := "((?-i:a))b";
+  regex_367_mod := "i";
+  var_regex_367 : std::string = "((?-i:a))b";
+  regex_368 := "(?-i:a)b";
+  regex_368_mod := "i";
+  var_regex_368 : std::string = "(?-i:a)b";
+  regex_369 := "((?-i:a))b";
+  regex_369_mod := "i";
+  var_regex_369 : std::string = "((?-i:a))b";
+  regex_370 := "((?-i:a.))b";
+  regex_370_mod := "i";
+  var_regex_370 : std::string = "((?-i:a.))b";
+  regex_371 := "((?-i:a\N))b";
+  regex_371_mod := "i";
+  var_regex_371 : std::string = "((?-i:a\\N))b";
+  regex_372 := "((?s-i:a.))b";
+  regex_372_mod := "i";
+  var_regex_372 : std::string = "((?s-i:a.))b";
+  regex_373 := "((?s-i:a\N))b";
+  regex_373_mod := "i";
+  var_regex_373 : std::string = "((?s-i:a\\N))b";
+  regex_374 := "((?s-i:a.))b";
+  regex_374_mod := "i";
+  var_regex_374 : std::string = "((?s-i:a.))b";
+  regex_375 := "((?s-i:a\N))b";
+  regex_375_mod := "i";
+  var_regex_375 : std::string = "((?s-i:a\\N))b";
+  regex_376 := "^(?:a?b?)*\$";
+  var_regex_376 : std::string = "^(?:a?b?)*\$";
+  regex_377 := "((?s)^a(.))((?m)^b\$)";
+  var_regex_377 : std::string = "((?s)^a(.))((?m)^b\$)";
+  regex_378 := "((?m)^b\$)";
+  var_regex_378 : std::string = "((?m)^b\$)";
+  regex_379 := "(?m)^b";
+  var_regex_379 : std::string = "(?m)^b";
+  regex_380 := "(?m)^(b)";
+  var_regex_380 : std::string = "(?m)^(b)";
+  regex_381 := "((?m)^b)";
+  var_regex_381 : std::string = "((?m)^b)";
+  regex_382 := "\n((?m)^b)";
+  var_regex_382 : std::string = "\n((?m)^b)";
+  regex_383 := "^b";
+  var_regex_383 : std::string = "^b";
+  regex_384 := "()^b";
+  var_regex_384 : std::string = "()^b";
+  regex_385 := "((?m)^b)";
+  var_regex_385 : std::string = "((?m)^b)";
+  regex_386 := "\Z";
+  var_regex_386 : std::string = "\Z";
+  regex_387 := "\z";
+  var_regex_387 : std::string = "\z";
+  regex_388 := "\$";
+  var_regex_388 : std::string = "\$";
+  regex_389 := "\Z";
+  var_regex_389 : std::string = "\Z";
+  regex_390 := "\z";
+  var_regex_390 : std::string = "\z";
+  regex_391 := "\$";
+  var_regex_391 : std::string = "\$";
+  regex_392 := "\Z";
+  var_regex_392 : std::string = "\Z";
+  regex_393 := "\z";
+  var_regex_393 : std::string = "\z";
+  regex_394 := "\$";
+  var_regex_394 : std::string = "\$";
+  regex_395 := "\Z";
+  regex_395_mod := "m";
+  var_regex_395 : std::string = "\Z";
+  regex_396 := "\z";
+  regex_396_mod := "m";
+  var_regex_396 : std::string = "\z";
+  regex_397 := "\$";
+  regex_397_mod := "m";
+  var_regex_397 : std::string = "\$";
+  regex_398 := "\Z";
+  regex_398_mod := "m";
+  var_regex_398 : std::string = "\Z";
+  regex_399 := "\z";
+  regex_399_mod := "m";
+  var_regex_399 : std::string = "\z";
+  regex_400 := "\$";
+  regex_400_mod := "m";
+  var_regex_400 : std::string = "\$";
+  regex_401 := "\Z";
+  regex_401_mod := "m";
+  var_regex_401 : std::string = "\Z";
+  regex_402 := "\z";
+  regex_402_mod := "m";
+  var_regex_402 : std::string = "\z";
+  regex_403 := "\$";
+  regex_403_mod := "m";
+  var_regex_403 : std::string = "\$";
+  regex_404 := "a\Z";
+  var_regex_404 : std::string = "a\Z";
+  regex_405 := "a\z";
+  var_regex_405 : std::string = "a\z";
+  regex_406 := "a\$";
+  var_regex_406 : std::string = "a\$";
+  regex_407 := "a\Z";
+  var_regex_407 : std::string = "a\Z";
+  regex_408 := "a\z";
+  var_regex_408 : std::string = "a\z";
+  regex_409 := "a\$";
+  var_regex_409 : std::string = "a\$";
+  regex_410 := "a\Z";
+  var_regex_410 : std::string = "a\Z";
+  regex_411 := "a\z";
+  var_regex_411 : std::string = "a\z";
+  regex_412 := "a\$";
+  var_regex_412 : std::string = "a\$";
+  regex_413 := "a\Z";
+  regex_413_mod := "m";
+  var_regex_413 : std::string = "a\Z";
+  regex_414 := "a\z";
+  regex_414_mod := "m";
+  var_regex_414 : std::string = "a\z";
+  regex_415 := "a\$";
+  regex_415_mod := "m";
+  var_regex_415 : std::string = "a\$";
+  regex_416 := "a\Z";
+  regex_416_mod := "m";
+  var_regex_416 : std::string = "a\Z";
+  regex_417 := "a\z";
+  regex_417_mod := "m";
+  var_regex_417 : std::string = "a\z";
+  regex_418 := "a\$";
+  regex_418_mod := "m";
+  var_regex_418 : std::string = "a\$";
+  regex_419 := "a\Z";
+  regex_419_mod := "m";
+  var_regex_419 : std::string = "a\Z";
+  regex_420 := "a\z";
+  regex_420_mod := "m";
+  var_regex_420 : std::string = "a\z";
+  regex_421 := "a\$";
+  regex_421_mod := "m";
+  var_regex_421 : std::string = "a\$";
+  regex_422 := "aa\Z";
+  var_regex_422 : std::string = "aa\Z";
+  regex_423 := "aa\z";
+  var_regex_423 : std::string = "aa\z";
+  regex_424 := "aa\$";
+  var_regex_424 : std::string = "aa\$";
+  regex_425 := "aa\Z";
+  var_regex_425 : std::string = "aa\Z";
+  regex_426 := "aa\z";
+  var_regex_426 : std::string = "aa\z";
+  regex_427 := "aa\$";
+  var_regex_427 : std::string = "aa\$";
+  regex_428 := "aa\Z";
+  var_regex_428 : std::string = "aa\Z";
+  regex_429 := "aa\z";
+  var_regex_429 : std::string = "aa\z";
+  regex_430 := "aa\$";
+  var_regex_430 : std::string = "aa\$";
+  regex_431 := "aa\Z";
+  regex_431_mod := "m";
+  var_regex_431 : std::string = "aa\Z";
+  regex_432 := "aa\z";
+  regex_432_mod := "m";
+  var_regex_432 : std::string = "aa\z";
+  regex_433 := "aa\$";
+  regex_433_mod := "m";
+  var_regex_433 : std::string = "aa\$";
+  regex_434 := "aa\Z";
+  regex_434_mod := "m";
+  var_regex_434 : std::string = "aa\Z";
+  regex_435 := "aa\z";
+  regex_435_mod := "m";
+  var_regex_435 : std::string = "aa\z";
+  regex_436 := "aa\$";
+  regex_436_mod := "m";
+  var_regex_436 : std::string = "aa\$";
+  regex_437 := "aa\Z";
+  regex_437_mod := "m";
+  var_regex_437 : std::string = "aa\Z";
+  regex_438 := "aa\z";
+  regex_438_mod := "m";
+  var_regex_438 : std::string = "aa\z";
+  regex_439 := "aa\$";
+  regex_439_mod := "m";
+  var_regex_439 : std::string = "aa\$";
+  regex_440 := "aa\Z";
+  var_regex_440 : std::string = "aa\Z";
+  regex_441 := "aa\z";
+  var_regex_441 : std::string = "aa\z";
+  regex_442 := "aa\$";
+  var_regex_442 : std::string = "aa\$";
+  regex_443 := "aa\Z";
+  var_regex_443 : std::string = "aa\Z";
+  regex_444 := "aa\z";
+  var_regex_444 : std::string = "aa\z";
+  regex_445 := "aa\$";
+  var_regex_445 : std::string = "aa\$";
+  regex_446 := "aa\Z";
+  var_regex_446 : std::string = "aa\Z";
+  regex_447 := "aa\z";
+  var_regex_447 : std::string = "aa\z";
+  regex_448 := "aa\$";
+  var_regex_448 : std::string = "aa\$";
+  regex_449 := "aa\Z";
+  regex_449_mod := "m";
+  var_regex_449 : std::string = "aa\Z";
+  regex_450 := "aa\z";
+  regex_450_mod := "m";
+  var_regex_450 : std::string = "aa\z";
+  regex_451 := "aa\$";
+  regex_451_mod := "m";
+  var_regex_451 : std::string = "aa\$";
+  regex_452 := "aa\Z";
+  regex_452_mod := "m";
+  var_regex_452 : std::string = "aa\Z";
+  regex_453 := "aa\z";
+  regex_453_mod := "m";
+  var_regex_453 : std::string = "aa\z";
+  regex_454 := "aa\$";
+  regex_454_mod := "m";
+  var_regex_454 : std::string = "aa\$";
+  regex_455 := "aa\Z";
+  regex_455_mod := "m";
+  var_regex_455 : std::string = "aa\Z";
+  regex_456 := "aa\z";
+  regex_456_mod := "m";
+  var_regex_456 : std::string = "aa\z";
+  regex_457 := "aa\$";
+  regex_457_mod := "m";
+  var_regex_457 : std::string = "aa\$";
+  regex_458 := "aa\Z";
+  var_regex_458 : std::string = "aa\Z";
+  regex_459 := "aa\z";
+  var_regex_459 : std::string = "aa\z";
+  regex_460 := "aa\$";
+  var_regex_460 : std::string = "aa\$";
+  regex_461 := "aa\Z";
+  var_regex_461 : std::string = "aa\Z";
+  regex_462 := "aa\z";
+  var_regex_462 : std::string = "aa\z";
+  regex_463 := "aa\$";
+  var_regex_463 : std::string = "aa\$";
+  regex_464 := "aa\Z";
+  var_regex_464 : std::string = "aa\Z";
+  regex_465 := "aa\z";
+  var_regex_465 : std::string = "aa\z";
+  regex_466 := "aa\$";
+  var_regex_466 : std::string = "aa\$";
+  regex_467 := "aa\Z";
+  regex_467_mod := "m";
+  var_regex_467 : std::string = "aa\Z";
+  regex_468 := "aa\z";
+  regex_468_mod := "m";
+  var_regex_468 : std::string = "aa\z";
+  regex_469 := "aa\$";
+  regex_469_mod := "m";
+  var_regex_469 : std::string = "aa\$";
+  regex_470 := "aa\Z";
+  regex_470_mod := "m";
+  var_regex_470 : std::string = "aa\Z";
+  regex_471 := "aa\z";
+  regex_471_mod := "m";
+  var_regex_471 : std::string = "aa\z";
+  regex_472 := "aa\$";
+  regex_472_mod := "m";
+  var_regex_472 : std::string = "aa\$";
+  regex_473 := "aa\Z";
+  regex_473_mod := "m";
+  var_regex_473 : std::string = "aa\Z";
+  regex_474 := "aa\z";
+  regex_474_mod := "m";
+  var_regex_474 : std::string = "aa\z";
+  regex_475 := "aa\$";
+  regex_475_mod := "m";
+  var_regex_475 : std::string = "aa\$";
+  regex_476 := "ab\Z";
+  var_regex_476 : std::string = "ab\Z";
+  regex_477 := "ab\z";
+  var_regex_477 : std::string = "ab\z";
+  regex_478 := "ab\$";
+  var_regex_478 : std::string = "ab\$";
+  regex_479 := "ab\Z";
+  var_regex_479 : std::string = "ab\Z";
+  regex_480 := "ab\z";
+  var_regex_480 : std::string = "ab\z";
+  regex_481 := "ab\$";
+  var_regex_481 : std::string = "ab\$";
+  regex_482 := "ab\Z";
+  var_regex_482 : std::string = "ab\Z";
+  regex_483 := "ab\z";
+  var_regex_483 : std::string = "ab\z";
+  regex_484 := "ab\$";
+  var_regex_484 : std::string = "ab\$";
+  regex_485 := "ab\Z";
+  regex_485_mod := "m";
+  var_regex_485 : std::string = "ab\Z";
+  regex_486 := "ab\z";
+  regex_486_mod := "m";
+  var_regex_486 : std::string = "ab\z";
+  regex_487 := "ab\$";
+  regex_487_mod := "m";
+  var_regex_487 : std::string = "ab\$";
+  regex_488 := "ab\Z";
+  regex_488_mod := "m";
+  var_regex_488 : std::string = "ab\Z";
+  regex_489 := "ab\z";
+  regex_489_mod := "m";
+  var_regex_489 : std::string = "ab\z";
+  regex_490 := "ab\$";
+  regex_490_mod := "m";
+  var_regex_490 : std::string = "ab\$";
+  regex_491 := "ab\Z";
+  regex_491_mod := "m";
+  var_regex_491 : std::string = "ab\Z";
+  regex_492 := "ab\z";
+  regex_492_mod := "m";
+  var_regex_492 : std::string = "ab\z";
+  regex_493 := "ab\$";
+  regex_493_mod := "m";
+  var_regex_493 : std::string = "ab\$";
+  regex_494 := "ab\Z";
+  var_regex_494 : std::string = "ab\Z";
+  regex_495 := "ab\z";
+  var_regex_495 : std::string = "ab\z";
+  regex_496 := "ab\$";
+  var_regex_496 : std::string = "ab\$";
+  regex_497 := "ab\Z";
+  var_regex_497 : std::string = "ab\Z";
+  regex_498 := "ab\z";
+  var_regex_498 : std::string = "ab\z";
+  regex_499 := "ab\$";
+  var_regex_499 : std::string = "ab\$";
+  regex_500 := "ab\Z";
+  var_regex_500 : std::string = "ab\Z";
+  regex_501 := "ab\z";
+  var_regex_501 : std::string = "ab\z";
+  regex_502 := "ab\$";
+  var_regex_502 : std::string = "ab\$";
+  regex_503 := "ab\Z";
+  regex_503_mod := "m";
+  var_regex_503 : std::string = "ab\Z";
+  regex_504 := "ab\z";
+  regex_504_mod := "m";
+  var_regex_504 : std::string = "ab\z";
+  regex_505 := "ab\$";
+  regex_505_mod := "m";
+  var_regex_505 : std::string = "ab\$";
+  regex_506 := "ab\Z";
+  regex_506_mod := "m";
+  var_regex_506 : std::string = "ab\Z";
+  regex_507 := "ab\z";
+  regex_507_mod := "m";
+  var_regex_507 : std::string = "ab\z";
+  regex_508 := "ab\$";
+  regex_508_mod := "m";
+  var_regex_508 : std::string = "ab\$";
+  regex_509 := "ab\Z";
+  regex_509_mod := "m";
+  var_regex_509 : std::string = "ab\Z";
+  regex_510 := "ab\z";
+  regex_510_mod := "m";
+  var_regex_510 : std::string = "ab\z";
+  regex_511 := "ab\$";
+  regex_511_mod := "m";
+  var_regex_511 : std::string = "ab\$";
+  regex_512 := "ab\Z";
+  var_regex_512 : std::string = "ab\Z";
+  regex_513 := "ab\z";
+  var_regex_513 : std::string = "ab\z";
+  regex_514 := "ab\$";
+  var_regex_514 : std::string = "ab\$";
+  regex_515 := "ab\Z";
+  var_regex_515 : std::string = "ab\Z";
+  regex_516 := "ab\z";
+  var_regex_516 : std::string = "ab\z";
+  regex_517 := "ab\$";
+  var_regex_517 : std::string = "ab\$";
+  regex_518 := "ab\Z";
+  var_regex_518 : std::string = "ab\Z";
+  regex_519 := "ab\z";
+  var_regex_519 : std::string = "ab\z";
+  regex_520 := "ab\$";
+  var_regex_520 : std::string = "ab\$";
+  regex_521 := "ab\Z";
+  regex_521_mod := "m";
+  var_regex_521 : std::string = "ab\Z";
+  regex_522 := "ab\z";
+  regex_522_mod := "m";
+  var_regex_522 : std::string = "ab\z";
+  regex_523 := "ab\$";
+  regex_523_mod := "m";
+  var_regex_523 : std::string = "ab\$";
+  regex_524 := "ab\Z";
+  regex_524_mod := "m";
+  var_regex_524 : std::string = "ab\Z";
+  regex_525 := "ab\z";
+  regex_525_mod := "m";
+  var_regex_525 : std::string = "ab\z";
+  regex_526 := "ab\$";
+  regex_526_mod := "m";
+  var_regex_526 : std::string = "ab\$";
+  regex_527 := "ab\Z";
+  regex_527_mod := "m";
+  var_regex_527 : std::string = "ab\Z";
+  regex_528 := "ab\z";
+  regex_528_mod := "m";
+  var_regex_528 : std::string = "ab\z";
+  regex_529 := "ab\$";
+  regex_529_mod := "m";
+  var_regex_529 : std::string = "ab\$";
+  regex_530 := "abb\Z";
+  var_regex_530 : std::string = "abb\Z";
+  regex_531 := "abb\z";
+  var_regex_531 : std::string = "abb\z";
+  regex_532 := "abb\$";
+  var_regex_532 : std::string = "abb\$";
+  regex_533 := "abb\Z";
+  var_regex_533 : std::string = "abb\Z";
+  regex_534 := "abb\z";
+  var_regex_534 : std::string = "abb\z";
+  regex_535 := "abb\$";
+  var_regex_535 : std::string = "abb\$";
+  regex_536 := "abb\Z";
+  var_regex_536 : std::string = "abb\Z";
+  regex_537 := "abb\z";
+  var_regex_537 : std::string = "abb\z";
+  regex_538 := "abb\$";
+  var_regex_538 : std::string = "abb\$";
+  regex_539 := "abb\Z";
+  regex_539_mod := "m";
+  var_regex_539 : std::string = "abb\Z";
+  regex_540 := "abb\z";
+  regex_540_mod := "m";
+  var_regex_540 : std::string = "abb\z";
+  regex_541 := "abb\$";
+  regex_541_mod := "m";
+  var_regex_541 : std::string = "abb\$";
+  regex_542 := "abb\Z";
+  regex_542_mod := "m";
+  var_regex_542 : std::string = "abb\Z";
+  regex_543 := "abb\z";
+  regex_543_mod := "m";
+  var_regex_543 : std::string = "abb\z";
+  regex_544 := "abb\$";
+  regex_544_mod := "m";
+  var_regex_544 : std::string = "abb\$";
+  regex_545 := "abb\Z";
+  regex_545_mod := "m";
+  var_regex_545 : std::string = "abb\Z";
+  regex_546 := "abb\z";
+  regex_546_mod := "m";
+  var_regex_546 : std::string = "abb\z";
+  regex_547 := "abb\$";
+  regex_547_mod := "m";
+  var_regex_547 : std::string = "abb\$";
+  regex_548 := "abb\Z";
+  var_regex_548 : std::string = "abb\Z";
+  regex_549 := "abb\z";
+  var_regex_549 : std::string = "abb\z";
+  regex_550 := "abb\$";
+  var_regex_550 : std::string = "abb\$";
+  regex_551 := "abb\Z";
+  var_regex_551 : std::string = "abb\Z";
+  regex_552 := "abb\z";
+  var_regex_552 : std::string = "abb\z";
+  regex_553 := "abb\$";
+  var_regex_553 : std::string = "abb\$";
+  regex_554 := "abb\Z";
+  var_regex_554 : std::string = "abb\Z";
+  regex_555 := "abb\z";
+  var_regex_555 : std::string = "abb\z";
+  regex_556 := "abb\$";
+  var_regex_556 : std::string = "abb\$";
+  regex_557 := "abb\Z";
+  regex_557_mod := "m";
+  var_regex_557 : std::string = "abb\Z";
+  regex_558 := "abb\z";
+  regex_558_mod := "m";
+  var_regex_558 : std::string = "abb\z";
+  regex_559 := "abb\$";
+  regex_559_mod := "m";
+  var_regex_559 : std::string = "abb\$";
+  regex_560 := "abb\Z";
+  regex_560_mod := "m";
+  var_regex_560 : std::string = "abb\Z";
+  regex_561 := "abb\z";
+  regex_561_mod := "m";
+  var_regex_561 : std::string = "abb\z";
+  regex_562 := "abb\$";
+  regex_562_mod := "m";
+  var_regex_562 : std::string = "abb\$";
+  regex_563 := "abb\Z";
+  regex_563_mod := "m";
+  var_regex_563 : std::string = "abb\Z";
+  regex_564 := "abb\z";
+  regex_564_mod := "m";
+  var_regex_564 : std::string = "abb\z";
+  regex_565 := "abb\$";
+  regex_565_mod := "m";
+  var_regex_565 : std::string = "abb\$";
+  regex_566 := "abb\Z";
+  var_regex_566 : std::string = "abb\Z";
+  regex_567 := "abb\z";
+  var_regex_567 : std::string = "abb\z";
+  regex_568 := "abb\$";
+  var_regex_568 : std::string = "abb\$";
+  regex_569 := "abb\Z";
+  var_regex_569 : std::string = "abb\Z";
+  regex_570 := "abb\z";
+  var_regex_570 : std::string = "abb\z";
+  regex_571 := "abb\$";
+  var_regex_571 : std::string = "abb\$";
+  regex_572 := "abb\Z";
+  var_regex_572 : std::string = "abb\Z";
+  regex_573 := "abb\z";
+  var_regex_573 : std::string = "abb\z";
+  regex_574 := "abb\$";
+  var_regex_574 : std::string = "abb\$";
+  regex_575 := "abb\Z";
+  regex_575_mod := "m";
+  var_regex_575 : std::string = "abb\Z";
+  regex_576 := "abb\z";
+  regex_576_mod := "m";
+  var_regex_576 : std::string = "abb\z";
+  regex_577 := "abb\$";
+  regex_577_mod := "m";
+  var_regex_577 : std::string = "abb\$";
+  regex_578 := "abb\Z";
+  regex_578_mod := "m";
+  var_regex_578 : std::string = "abb\Z";
+  regex_579 := "abb\z";
+  regex_579_mod := "m";
+  var_regex_579 : std::string = "abb\z";
+  regex_580 := "abb\$";
+  regex_580_mod := "m";
+  var_regex_580 : std::string = "abb\$";
+  regex_581 := "abb\Z";
+  regex_581_mod := "m";
+  var_regex_581 : std::string = "abb\Z";
+  regex_582 := "abb\z";
+  regex_582_mod := "m";
+  var_regex_582 : std::string = "abb\z";
+  regex_583 := "abb\$";
+  regex_583_mod := "m";
+  var_regex_583 : std::string = "abb\$";
+  regex_584 := "\Aa\$";
+  regex_584_mod := "m";
+  var_regex_584 : std::string = "\Aa\$";
+//   regex_585 := "(?i:.[b].)";
+//   var_regex_585 : std::string = "(?i:.[b].)";
+//   regex_586 := "(?i:\N[b]\N)";
+//   var_regex_586 : std::string = "(?i:\\N[b]\\N)";
+  regex_587 := "\N {1}";
+  regex_587_mod := "x";
+  var_regex_587 : std::string = "\\N {1}";
+  regex_588 := "\N {1}";
+  regex_588_mod := "x";
+  var_regex_588 : std::string = "\\N {1}";
+  regex_589 := "\N {1}";
+  regex_589_mod := "x";
+  var_regex_589 : std::string = "\\N {1}";
+  regex_590 := "\N {3,4}";
+  regex_590_mod := "x";
+  var_regex_590 : std::string = "\\N {3,4}";
+  regex_591 := "\N {3,4}";
+  regex_591_mod := "x";
+  var_regex_591 : std::string = "\\N {3,4}";
+  regex_592 := "\N {3,4}";
+  regex_592_mod := "x";
+  var_regex_592 : std::string = "\\N {3,4}";
+  regex_593 := "a\N c";
+  regex_593_mod := "x";
+  var_regex_593 : std::string = "a\\N c";
+  regex_594 := "a\N *c";
+  regex_594_mod := "x";
+  var_regex_594 : std::string = "a\\N *c";
+  regex_595 := "a\N *c";
+  regex_595_mod := "x";
+  var_regex_595 : std::string = "a\\N *c";
+//   regex_596 := "[a b]";
+//   regex_596_mod := "x";
+//   var_regex_596 : std::string = "[a b]";
+//   regex_597 := "[a b]";
+//   regex_597_mod := "xx";
+//   var_regex_597 : std::string = "[a b]";
+//   regex_598 := "[a\ b]";
+//   regex_598_mod := "xx";
+//   var_regex_598 : std::string = "[a\ b]";
+//   regex_599 := "[ ^ a b ]";
+//   regex_599_mod := "xx";
+//   var_regex_599 : std::string = "[ ^ a b ]";
+//   regex_600 := "[ ^ a b ]";
+//   regex_600_mod := "xx";
+//   var_regex_600 : std::string = "[ ^ a b ]";
+//   regex_601 := "[ ^ a b ]";
+//   regex_601_mod := "xx";
+//   var_regex_601 : std::string = "[ ^ a b ]";
+//   regex_602 := "(?x:[a b])";
+//   regex_602_mod := "xx";
+//   var_regex_602 : std::string = "(?x:[a b])";
+//   regex_603 := "(?xx:[a b])";
+//   regex_603_mod := "x";
+//   var_regex_603 : std::string = "(?xx:[a b])";
+//   regex_604 := "(?x)[a b]";
+//   regex_604_mod := "xx";
+//   var_regex_604 : std::string = "(?x)[a b]";
+//   regex_605 := "(?xx)[a b]";
+//   regex_605_mod := "x";
+//   var_regex_605 : std::string = "(?xx)[a b]";
+//   regex_606 := "(?-x:[a b])";
+//   regex_606_mod := "xx";
+//   var_regex_606 : std::string = "(?-x:[a b])";
+  regex_607 := "\N {1}";
+  regex_607_mod := "x";
+  var_regex_607 : std::string = "\\N {1}";
+  regex_608 := "\N {1}";
+  regex_608_mod := "x";
+  var_regex_608 : std::string = "\\N {1}";
+  regex_609 := "\N {1}";
+  regex_609_mod := "x";
+  var_regex_609 : std::string = "\\N {1}";
+  regex_610 := "\N {3,4}";
+  regex_610_mod := "x";
+  var_regex_610 : std::string = "\\N {3,4}";
+  regex_611 := "\N {3,4}";
+  regex_611_mod := "x";
+  var_regex_611 : std::string = "\\N {3,4}";
+  regex_612 := "\N {3,4}";
+  regex_612_mod := "x";
+  var_regex_612 : std::string = "\\N {3,4}";
+  regex_613 := "a\N c";
+  regex_613_mod := "x";
+  var_regex_613 : std::string = "a\\N c";
+  regex_614 := "a\N *c";
+  regex_614_mod := "x";
+  var_regex_614 : std::string = "a\\N *c";
+  regex_615 := "a\N *c";
+  regex_615_mod := "x";
+  var_regex_615 : std::string = "a\\N *c";
+//   regex_616 := "[#]";
+//   var_regex_616 : std::string = "[#]";
+//   regex_617 := "[#]b";
+//   var_regex_617 : std::string = "[#]b";
+//   regex_618 := "[#]";
+//   regex_618_mod := "x";
+//   var_regex_618 : std::string = "[#]";
+//   regex_619 := "[#]b";
+//   regex_619_mod := "x";
+//   var_regex_619 : std::string = "[#]b";
+  regex_620 := "(?'n'foo) \g{n}";
+  var_regex_620 : std::string = "(?'n'foo) \g{n}";
+  regex_621 := "(?'n'foo) \g{ n }";
+  var_regex_621 : std::string = "(?'n'foo) \g{ n }";
+  regex_622 := "(?'n'foo) \g{n}";
+  var_regex_622 : std::string = "(?'n'foo) \g{n}";
+  regex_623 := "(?foo) \g{n}";
+  var_regex_623 : std::string = "(?foo) \g{n}";
+  regex_624 := "(?foo) \g{n}";
+  var_regex_624 : std::string = "(?foo) \g{n}";
+  regex_625 := "(?as) (\w+) \g{as} (\w+)";
+  var_regex_625 : std::string = "(?as) (\w+) \g{as} (\w+)";
+  regex_626 := "(?'n'foo) \k";
+  var_regex_626 : std::string = "(?'n'foo) \k";
+  regex_627 := "(?'n'foo) \k";
+  var_regex_627 : std::string = "(?'n'foo) \k";
+  regex_628 := "(?foo) \k'n'";
+  var_regex_628 : std::string = "(?foo) \k'n'";
+  regex_629 := "(?foo) \k'n'";
+  var_regex_629 : std::string = "(?foo) \k'n'";
+  regex_630 := "(?'a1'foo) \k'a1'";
+  var_regex_630 : std::string = "(?'a1'foo) \k'a1'";
+  regex_631 := "(?foo) \k";
+  var_regex_631 : std::string = "(?foo) \k";
+  regex_632 := "(?'_'foo) \k'_'";
+  var_regex_632 : std::string = "(?'_'foo) \k'_'";
+  regex_633 := "(?<_>foo) \k<_>";
+  var_regex_633 : std::string = "(?<_>foo) \k<_>";
+  regex_634 := "(?'_0_'foo) \k'_0_'";
+  var_regex_634 : std::string = "(?'_0_'foo) \k'_0_'";
+  regex_635 := "(?<_0_>foo) \k<_0_>";
+  var_regex_635 : std::string = "(?<_0_>foo) \k<_0_>";
+  regex_636 := "(?as) (\w+) \k (\w+)";
+  var_regex_636 : std::string = "(?as) (\w+) \k (\w+)";
+  regex_637 := "(?as) (\w+) \k{as} (\w+)";
+  var_regex_637 : std::string = "(?as) (\w+) \k{as} (\w+)";
+  regex_638 := "(?as) (\w+) \k'as' (\w+)";
+  var_regex_638 : std::string = "(?as) (\w+) \k'as' (\w+)";
+  regex_639 := "(?as) (\w+) \k{ as } (\w+)";
+  var_regex_639 : std::string = "(?as) (\w+) \k{ as } (\w+)";
+  regex_640 := "^a(?#xxx){3}c";
+  var_regex_640 : std::string = "^a(?#xxx){3}c";
+  regex_641 := "^a (?#xxx) (?#yyy) {3}c";
+  regex_641_mod := "x";
+  var_regex_641 : std::string = "^a (?#xxx) (?#yyy) {3}c";
+  regex_642 := "(?|(a))";
+  var_regex_642 : std::string = "(?|(a))";
+  regex_643 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  var_regex_643 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  regex_644 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  var_regex_644 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  regex_645 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  var_regex_645 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
+  regex_646 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_646 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_647 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_647 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_648 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_648 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_649 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  var_regex_649 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
+  regex_650 := "(.)(?|(.)(.)x|(.)d)(.)";
+  var_regex_650 : std::string = "(.)(?|(.)(.)x|(.)d)(.)";
+  regex_651 := "(\N)(?|(\N)(\N)x|(\N)d)(\N)";
+  var_regex_651 : std::string = "(\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N)";
+  regex_652 := "(?|(?x))";
+  var_regex_652 : std::string = "(?|(?x))";
+  regex_653 := "(?|(?x)|(?y))";
+  var_regex_653 : std::string = "(?|(?x)|(?y))";
+  regex_654 := "(?|(?y)|(?x))";
+  var_regex_654 : std::string = "(?|(?y)|(?x))";
+  regex_655 := "(?)(?|(?x))";
+  var_regex_655 : std::string = "(?)(?|(?x))";
+  regex_656 := "foo\Kbar";
+  var_regex_656 : std::string = "foo\Kbar";
+  regex_657 := "foo\t\n\r\f\a\ebar";
+  var_regex_657 : std::string = "foo\t\n\r\f\a\ebar";
+  regex_658 := "(foo)";
+  regex_658_mod := "n";
+  var_regex_658 : std::string = "(foo)";
+  regex_659 := "(?-n)(foo)(?n)(bar)";
+  regex_659_mod := "n";
+  var_regex_659 : std::string = "(?-n)(foo)(?n)(bar)";
+  regex_660 := "(?-n:(foo)(?n:(bar)))";
+  regex_660_mod := "n";
+  var_regex_660 : std::string = "(?-n:(foo)(?n:(bar)))";
+  regex_661 := "foo # Match foo";
+  regex_661_mod := "x";
+  var_regex_661 : std::string = "foo # Match foo";
+  regex_662 := "\x41\x42";
+  var_regex_662 : std::string = "\x41\x42";
+  regex_663 := "\101\o{102}";
+  var_regex_663 : std::string = "\101\o{102}";
+  run: (this) = {
+    std::cout << "Running perl_tests_general:"<< std::endl;
+    test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
+    test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
+    test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
+    test(regex_3, 3, "abc", "xbc", "n", "-", "-");
+    test(regex_4, 4, "abc", "axc", "n", "-", "-");
+    test(regex_5, 5, "abc", "abx", "n", "-", "-");
+    test(regex_6, 6, "abc", "xabcy", "y", "$&", "abc");
+    test(regex_7, 7, "abc", "xabcy", "y", "$-[0]", "1");
+    test(regex_8, 8, "abc", "xabcy", "y", "$+[0]", "4");
+    test(regex_9, 9, "abc", "ababc", "y", "$&", "abc");
+    test(regex_10, 10, "abc", "ababc", "y", "$-[0]", "2");
+    test(regex_11, 11, "abc", "ababc", "y", "$+[0]", "5");
+    test(regex_12, 12, "ab*c", "abc", "y", "$&", "abc");
+    test(regex_13, 13, "ab*c", "abc", "y", "$-[0]", "0");
+    test(regex_14, 14, "ab*c", "abc", "y", "$+[0]", "3");
+    test(regex_15, 15, "ab*bc", "abc", "y", "$&", "abc");
+    test(regex_16, 16, "ab*bc", "abc", "y", "$-[0]", "0");
+    test(regex_17, 17, "ab*bc", "abc", "y", "$+[0]", "3");
+    test(regex_18, 18, "ab*bc", "abbc", "y", "$&", "abbc");
+    test(regex_19, 19, "ab*bc", "abbc", "y", "$-[0]", "0");
+    test(regex_20, 20, "ab*bc", "abbc", "y", "$+[0]", "4");
+    test(regex_21, 21, "ab*bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_22, 22, "ab*bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_23, 23, "ab*bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_24, 24, ".{1}", "abbbbc", "y", "$&", "a");
+    test(regex_25, 25, ".{1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_26, 26, ".{1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_27, 27, ".{3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_28, 28, ".{3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_29, 29, ".{3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_30, 30, "\\\\N{1}", "abbbbc", "y", "$&", "a");
+    test(regex_31, 31, "\\\\N{1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_32, 32, "\\\\N{1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_33, 33, "\\\\N{3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_34, 34, "\\\\N{3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_35, 35, "\\\\N{3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_36, 36, "\\\\N{ 3 , 4 }", "abbbbc", "y", "$+[0]", "4");
+    test(regex_37, 37, "ab{0,}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_38, 38, "ab{0,}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_39, 39, "ab{0,}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_40, 40, "ab+bc", "abbc", "y", "$&", "abbc");
+    test(regex_41, 41, "ab+bc", "abbc", "y", "$-[0]", "0");
+    test(regex_42, 42, "ab+bc", "abbc", "y", "$+[0]", "4");
+    test(regex_43, 43, "ab+bc", "abc", "n", "-", "-");
+    test(regex_44, 44, "ab+bc", "abq", "n", "-", "-");
+    test(regex_45, 45, "ab{1,}bc", "abq", "n", "-", "-");
+    test(regex_46, 46, "ab+bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_47, 47, "ab+bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_48, 48, "ab+bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_49, 49, "ab{1,}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_50, 50, "ab{1,}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_51, 51, "ab{1,}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_52, 52, "ab{1,3}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_53, 53, "ab{1,3}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_54, 54, "ab{1,3}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_55, 55, "ab{3,4}bc", "abbbbc", "y", "$&", "abbbbc");
+    test(regex_56, 56, "ab{3,4}bc", "abbbbc", "y", "$-[0]", "0");
+    test(regex_57, 57, "ab{3,4}bc", "abbbbc", "y", "$+[0]", "6");
+    test(regex_58, 58, "ab{4,5}bc", "abbbbc", "n", "-", "-");
+    test(regex_59, 59, "ab?bc", "abbc", "y", "$&", "abbc");
+    test(regex_60, 60, "ab?bc", "abc", "y", "$&", "abc");
+    test(regex_61, 61, "ab{0,1}bc", "abc", "y", "$&", "abc");
+    test(regex_62, 62, "ab?bc", "abbbbc", "n", "-", "-");
+    test(regex_63, 63, "ab?c", "abc", "y", "$&", "abc");
+    test(regex_64, 64, "ab{0,1}c", "abc", "y", "$&", "abc");
+    test(regex_65, 65, "^abc\\$", "abc", "y", "$&", "abc");
+    test(regex_66, 66, "^abc\\$", "abcc", "n", "-", "-");
+    test(regex_67, 67, "^abc", "abcc", "y", "$&", "abc");
+    test(regex_68, 68, "^abc\\$", "aabc", "n", "-", "-");
+    test(regex_69, 69, "abc\\$", "aabc", "y", "$&", "abc");
+    test(regex_70, 70, "abc\\$", "aabcd", "n", "-", "-");
+    test(regex_71, 71, "^", "abc", "y", "$&", "");
+    test(regex_72, 72, "\\$", "abc", "y", "$&", "");
+    test(regex_73, 73, "a.c", "abc", "y", "$&", "abc");
+    test(regex_74, 74, "a.c", "axc", "y", "$&", "axc");
+    test(regex_75, 75, "a\\\\Nc", "abc", "y", "$&", "abc");
+    test(regex_76, 76, "a.*c", "axyzc", "y", "$&", "axyzc");
+    test(regex_77, 77, "a\\\\N*c", "axyzc", "y", "$&", "axyzc");
+    test(regex_78, 78, "a.*c", "axyzd", "n", "-", "-");
+    test(regex_79, 79, "a\\\\N*c", "axyzd", "n", "-", "-");
+    // test(regex_80, 80, "a[bc]d", "abc", "n", "-", "-");
+    // test(regex_81, 81, "a[bc]d", "abd", "y", "$&", "abd");
+    // test(regex_82, 82, "a[b]d", "abd", "y", "$&", "abd");
+    // test(regex_83, 83, "[a][b][d]", "abd", "y", "$&", "abd");
+    // test(regex_84, 84, ".[b].", "abd", "y", "$&", "abd");
+    // test(regex_85, 85, ".[b].", "aBd", "n", "-", "-");
+    // test(regex_86, 86, "a[b-d]e", "abd", "n", "-", "-");
+    // test(regex_87, 87, "a[b-d]e", "ace", "y", "$&", "ace");
+    // test(regex_88, 88, "a[b-d]", "aac", "y", "$&", "ac");
+    // test(regex_89, 89, "a[-b]", "a-", "y", "$&", "a-");
+    // test(regex_90, 90, "a[b-]", "a-", "y", "$&", "a-");
+    test(regex_91, 91, "a]", "a]", "y", "$&", "a]");
+    test(regex_92, 92, "a[]]b", "a]b", "y", "$&", "a]b");
+    // test(regex_93, 93, "a[^bc]d", "aed", "y", "$&", "aed");
+    // test(regex_94, 94, "a[^bc]d", "abd", "n", "-", "-");
+    // test(regex_95, 95, "a[^-b]c", "adc", "y", "$&", "adc");
+    // test(regex_96, 96, "a[^-b]c", "a-c", "n", "-", "-");
+    // test(regex_97, 97, "a[^]b]c", "a]c", "n", "-", "-");
+    // test(regex_98, 98, "a[^]b]c", "adc", "y", "$&", "adc");
+    test(regex_99, 99, "\\ba\\b", "a-", "y", "-", "-");
+    test(regex_100, 100, "\\ba\\b", "-a", "y", "-", "-");
+    test(regex_101, 101, "\\ba\\b", "-a-", "y", "-", "-");
+    test(regex_102, 102, "\\by\\b", "xy", "n", "-", "-");
+    test(regex_103, 103, "\\by\\b", "yz", "n", "-", "-");
+    test(regex_104, 104, "\\by\\b", "xyz", "n", "-", "-");
+    test(regex_105, 105, "\\Ba\\B", "a-", "n", "-", "-");
+    test(regex_106, 106, "\\Ba\\B", "-a", "n", "-", "-");
+    test(regex_107, 107, "\\Ba\\B", "-a-", "n", "-", "-");
+    test(regex_108, 108, "\\By\\b", "xy", "y", "-", "-");
+    test(regex_109, 109, "\\By\\b", "xy", "y", "$-[0]", "1");
+    test(regex_110, 110, "\\By\\b", "xy", "y", "$+[0]", "2");
+    test(regex_111, 111, "\\By\\b", "xy", "y", "-", "-");
+    test(regex_112, 112, "\\by\\B", "yz", "y", "-", "-");
+    test(regex_113, 113, "\\By\\B", "xyz", "y", "-", "-");
+    test(regex_114, 114, "\\b", "", "n", "-", "-");
+    test(regex_115, 115, "\\B", "", "y", "-", "-");
+    test(regex_116, 116, "\\w", "a", "y", "-", "-");
+    test(regex_117, 117, "\\w", "-", "n", "-", "-");
+    test(regex_118, 118, "\\W", "a", "n", "-", "-");
+    test(regex_119, 119, "\\W", "-", "y", "-", "-");
+    test(regex_120, 120, "a\\sb", "a b", "y", "-", "-");
+    test(regex_121, 121, "a\\sb", "a-b", "n", "-", "-");
+    test(regex_122, 122, "a\\Sb", "a b", "n", "-", "-");
+    test(regex_123, 123, "a\\Sb", "a-b", "y", "-", "-");
+    test(regex_124, 124, "\\d", "1", "y", "-", "-");
+    test(regex_125, 125, "\\d", "-", "n", "-", "-");
+    test(regex_126, 126, "\\D", "1", "n", "-", "-");
+    test(regex_127, 127, "\\D", "-", "y", "-", "-");
+    // test(regex_128, 128, "[\\w]", "a", "y", "-", "-");
+    // test(regex_129, 129, "[\\w]", "-", "n", "-", "-");
+    // test(regex_130, 130, "[\\W]", "a", "n", "-", "-");
+    // test(regex_131, 131, "[\\W]", "-", "y", "-", "-");
+    // test(regex_132, 132, "a[\\s]b", "a b", "y", "-", "-");
+    // test(regex_133, 133, "a[\\s]b", "a-b", "n", "-", "-");
+    // test(regex_134, 134, "a[\\S]b", "a b", "n", "-", "-");
+    // test(regex_135, 135, "a[\\S]b", "a-b", "y", "-", "-");
+    // test(regex_136, 136, "[\\d]", "1", "y", "-", "-");
+    // test(regex_137, 137, "[\\d]", "-", "n", "-", "-");
+    // test(regex_138, 138, "[\\D]", "1", "n", "-", "-");
+    // test(regex_139, 139, "[\\D]", "-", "y", "-", "-");
+    test(regex_140, 140, "ab|cd", "abc", "y", "$&", "ab");
+    test(regex_141, 141, "ab|cd", "abcd", "y", "$&", "ab");
+    test(regex_142, 142, "()ef", "def", "y", "$&-$1", "ef-");
+    test(regex_143, 143, "()ef", "def", "y", "$-[0]", "1");
+    test(regex_144, 144, "()ef", "def", "y", "$+[0]", "3");
+    test(regex_145, 145, "()ef", "def", "y", "$-[1]", "1");
+    test(regex_146, 146, "()ef", "def", "y", "$+[1]", "1");
+    test(regex_147, 147, "\\$b", "b", "n", "-", "-");
+    test(regex_148, 148, "a\\(b", "a(b", "y", "$&-$1", "a(b-");
+    test(regex_149, 149, "a\\(*b", "ab", "y", "$&", "ab");
+    test(regex_150, 150, "a\\(*b", "a((b", "y", "$&", "a((b");
+    test(regex_151, 151, "a\\\\b", "a\\b", "y", "$&", "a\\b");
+    test(regex_152, 152, "((a))", "abc", "y", "$&-$1-$2", "a-a-a");
+    test(regex_153, 153, "((a))", "abc", "y", "$-[0]-$-[1]-$-[2]", "0-0-0");
+    test(regex_154, 154, "((a))", "abc", "y", "$+[0]-$+[1]-$+[2]", "1-1-1");
+    test(regex_155, 155, "(foo)(\\g-2)", "foofoo", "y", "$1-$2", "foo-foo");
+    test(regex_156, 156, "(foo)(\\g-2)(foo)(\\g-2)", "foofoofoofoo", "y", "$1-$2-$3-$4", "foo-foo-foo-foo");
+    // test(regex_157, 157, "(([abc]+) \\g-1)(([abc]+) \\g{-1})", "abc abccba cba", "y", "$2-$4", "abc-cba");
+    test(regex_158, 158, "(a)(b)(c)\\g1\\g2\\g3", "abcabc", "y", "$1$2$3", "abc");
+    test(regex_159, 159, "abc", "ABC", "y", "$&", "ABC");
+    test(regex_160, 160, "abc", "XBC", "n", "-", "-");
+    test(regex_161, 161, "abc", "AXC", "n", "-", "-");
+    test(regex_162, 162, "abc", "ABX", "n", "-", "-");
+    test(regex_163, 163, "abc", "XABCY", "y", "$&", "ABC");
+    test(regex_164, 164, "abc", "ABABC", "y", "$&", "ABC");
+    test(regex_165, 165, "ab*c", "ABC", "y", "$&", "ABC");
+    test(regex_166, 166, "ab*bc", "ABC", "y", "$&", "ABC");
+    test(regex_167, 167, "ab*bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_168, 168, "ab*?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_169, 169, "ab{0,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_170, 170, "ab+?bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_171, 171, "ab+bc", "ABC", "n", "-", "-");
+    test(regex_172, 172, "ab+bc", "ABQ", "n", "-", "-");
+    test(regex_173, 173, "ab{1,}bc", "ABQ", "n", "-", "-");
+    test(regex_174, 174, "ab+bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_175, 175, "ab{1,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_176, 176, "ab{1,3}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_177, 177, "ab{3,4}?bc", "ABBBBC", "y", "$&", "ABBBBC");
+    test(regex_178, 178, "ab{4,5}?bc", "ABBBBC", "n", "-", "-");
+    test(regex_179, 179, "ab??bc", "ABBC", "y", "$&", "ABBC");
+    test(regex_180, 180, "ab??bc", "ABC", "y", "$&", "ABC");
+    test(regex_181, 181, "ab{0,1}?bc", "ABC", "y", "$&", "ABC");
+    test(regex_182, 182, "ab??bc", "ABBBBC", "n", "-", "-");
+    test(regex_183, 183, "ab??c", "ABC", "y", "$&", "ABC");
+    test(regex_184, 184, "ab{0,1}?c", "ABC", "y", "$&", "ABC");
+    test(regex_185, 185, "^abc\\$", "ABC", "y", "$&", "ABC");
+    test(regex_186, 186, "^abc\\$", "ABCC", "n", "-", "-");
+    test(regex_187, 187, "^abc", "ABCC", "y", "$&", "ABC");
+    test(regex_188, 188, "^abc\\$", "AABC", "n", "-", "-");
+    test(regex_189, 189, "abc\\$", "AABC", "y", "$&", "ABC");
+    test(regex_190, 190, "^", "ABC", "y", "$&", "");
+    test(regex_191, 191, "\\$", "ABC", "y", "$&", "");
+    test(regex_192, 192, "a.c", "ABC", "y", "$&", "ABC");
+    test(regex_193, 193, "a.c", "AXC", "y", "$&", "AXC");
+    test(regex_194, 194, "a\\\\Nc", "ABC", "y", "$&", "ABC");
+    test(regex_195, 195, "a.*?c", "AXYZC", "y", "$&", "AXYZC");
+    test(regex_196, 196, "a.*c", "AXYZD", "n", "-", "-");
+    // test(regex_197, 197, "a[bc]d", "ABC", "n", "-", "-");
+    // test(regex_198, 198, "a[bc]d", "ABD", "y", "$&", "ABD");
+    // test(regex_199, 199, "a[b-d]e", "ABD", "n", "-", "-");
+    // test(regex_200, 200, "a[b-d]e", "ACE", "y", "$&", "ACE");
+    // test(regex_201, 201, "a[b-d]", "AAC", "y", "$&", "AC");
+    // test(regex_202, 202, "a[-b]", "A-", "y", "$&", "A-");
+    // test(regex_203, 203, "a[b-]", "A-", "y", "$&", "A-");
+    test(regex_204, 204, "a]", "A]", "y", "$&", "A]");
+    test(regex_205, 205, "a[]]b", "A]B", "y", "$&", "A]B");
+    // test(regex_206, 206, "a[^bc]d", "AED", "y", "$&", "AED");
+    // test(regex_207, 207, "a[^bc]d", "ABD", "n", "-", "-");
+    // test(regex_208, 208, "a[^-b]c", "ADC", "y", "$&", "ADC");
+    // test(regex_209, 209, "a[^-b]c", "A-C", "n", "-", "-");
+    // test(regex_210, 210, "a[^]b]c", "A]C", "n", "-", "-");
+    // test(regex_211, 211, "a[^]b]c", "ADC", "y", "$&", "ADC");
+    test(regex_212, 212, "ab|cd", "ABC", "y", "$&", "AB");
+    test(regex_213, 213, "ab|cd", "ABCD", "y", "$&", "AB");
+    test(regex_214, 214, "()ef", "DEF", "y", "$&-$1", "EF-");
+    test(regex_215, 215, "\\$b", "B", "n", "-", "-");
+    test(regex_216, 216, "a\\(b", "A(B", "y", "$&-$1", "A(B-");
+    test(regex_217, 217, "a\\(*b", "AB", "y", "$&", "AB");
+    test(regex_218, 218, "a\\(*b", "A((B", "y", "$&", "A((B");
+    test(regex_219, 219, "a\\\\b", "A\\B", "y", "$&", "A\\B");
+    test(regex_220, 220, "((a))", "ABC", "y", "$&-$1-$2", "A-A-A");
+    test(regex_221, 221, "(a)b(c)", "ABC", "y", "$&-$1-$2", "ABC-A-C");
+    test(regex_222, 222, "a+b+c", "AABBABC", "y", "$&", "ABC");
+    test(regex_223, 223, "a{1,}b{1,}c", "AABBABC", "y", "$&", "ABC");
+    test(regex_224, 224, "a.+?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_225, 225, "a.*?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_226, 226, "a.{0,5}?c", "ABCABC", "y", "$&", "ABC");
+    test(regex_227, 227, "(a+|b)*", "AB", "y", "$&-$1", "AB-B");
+    test(regex_228, 228, "(a+|b){0,}", "AB", "y", "$&-$1", "AB-B");
+    test(regex_229, 229, "(a+|b)+", "AB", "y", "$&-$1", "AB-B");
+    test(regex_230, 230, "(a+|b){1,}", "AB", "y", "$&-$1", "AB-B");
+    test(regex_231, 231, "(a+|b)?", "AB", "y", "$&-$1", "A-A");
+    test(regex_232, 232, "(a+|b){0,1}", "AB", "y", "$&-$1", "A-A");
+    test(regex_233, 233, "(a+|b){0,1}?", "AB", "y", "$&-$1", "-");
+    // test(regex_234, 234, "[^ab]*", "CDE", "y", "$&", "CDE");
+    test(regex_235, 235, "abc", "", "n", "-", "-");
+    test(regex_236, 236, "a*", "", "y", "$&", "");
+    // test(regex_237, 237, "([abc])*d", "ABBBCD", "y", "$&-$1", "ABBBCD-C");
+    // test(regex_238, 238, "([abc])*bcd", "ABCD", "y", "$&-$1", "ABCD-A");
+    test(regex_239, 239, "a|b|c|d|e", "E", "y", "$&", "E");
+    test(regex_240, 240, "(a|b|c|d|e)f", "EF", "y", "$&-$1", "EF-E");
+    test(regex_241, 241, "abcd*efg", "ABCDEFG", "y", "$&", "ABCDEFG");
+    test(regex_242, 242, "ab*", "XABYABBBZ", "y", "$&", "AB");
+    test(regex_243, 243, "ab*", "XAYABBBZ", "y", "$&", "A");
+    test(regex_244, 244, "(ab|cd)e", "ABCDE", "y", "$&-$1", "CDE-CD");
+    // test(regex_245, 245, "[abhgefdc]ij", "HIJ", "y", "$&", "HIJ");
+    test(regex_246, 246, "^(ab|cd)e", "ABCDE", "n", "x$1y", "XY");
+    test(regex_247, 247, "(abc|)ef", "ABCDEF", "y", "$&-$1", "EF-");
+    test(regex_248, 248, "(a|b)c*d", "ABCD", "y", "$&-$1", "BCD-B");
+    test(regex_249, 249, "(ab|ab*)bc", "ABC", "y", "$&-$1", "ABC-A");
+    // test(regex_250, 250, "a([bc]*)c*", "ABC", "y", "$&-$1", "ABC-BC");
+    // test(regex_251, 251, "a([bc]*)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
+    // test(regex_252, 252, "a([bc]+)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
+    // test(regex_253, 253, "a([bc]*)(c+d)", "ABCD", "y", "$&-$1-$2", "ABCD-B-CD");
+    // test(regex_254, 254, "a[bcd]*dcdcde", "ADCDCDE", "y", "$&", "ADCDCDE");
+    // test(regex_255, 255, "a[bcd]+dcdcde", "ADCDCDE", "n", "-", "-");
+    test(regex_256, 256, "(ab|a)b*c", "ABC", "y", "$&-$1", "ABC-AB");
+    test(regex_257, 257, "((a)(b)c)(d)", "ABCD", "y", "$1-$2-$3-$4", "ABC-A-B-D");
+    // test(regex_258, 258, "[a-zA-Z_][a-zA-Z0-9_]*", "ALPHA", "y", "$&", "ALPHA");
+    // test(regex_259, 259, "^a(bc+|b[eh])g|.h\\$", "ABH", "y", "$&-$1", "BH-");
+    test(regex_260, 260, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
+    test(regex_261, 261, "(bc+d\\$|ef*g.|h?i(j|k))", "IJ", "y", "$&-$1-$2", "IJ-IJ-J");
+    test(regex_262, 262, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFG", "n", "-", "-");
+    test(regex_263, 263, "(bc+d\\$|ef*g.|h?i(j|k))", "BCDD", "n", "-", "-");
+    test(regex_264, 264, "(bc+d\\$|ef*g.|h?i(j|k))", "REFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
+    test(regex_265, 265, "((((((((((a))))))))))", "A", "y", "$10", "A");
+    test(regex_266, 266, "((((((((((a))))))))))\\10", "AA", "y", "$&", "AA");
+    test(regex_267, 267, "(((((((((a)))))))))", "A", "y", "$&", "A");
+    test(regex_268, 268, "multiple words of text", "UH-UH", "n", "-", "-");
+    test(regex_269, 269, "multiple words", "MULTIPLE WORDS, YEAH", "y", "$&", "MULTIPLE WORDS");
+    test(regex_270, 270, "(.*)c(.*)", "ABCDE", "y", "$&-$1-$2", "ABCDE-AB-DE");
+    test(regex_271, 271, "\\((.*), (.*)\\)", "(A, B)", "y", "($2, $1)", "(B, A)");
+    // test(regex_272, 272, "[k]", "AB", "n", "-", "-");
+    test(regex_273, 273, "abcd", "ABCD", "y", "$&", "ABCD");
+    test(regex_274, 274, "a(bc)d", "ABCD", "y", "$1", "BC");
+    // test(regex_275, 275, "a[-]?c", "AC", "y", "$&", "AC");
+    test(regex_276, 276, "(abc)\\1", "ABCABC", "y", "$1", "ABC");
+    // test(regex_277, 277, "([a-c]*)\\1", "ABCABC", "y", "$1", "ABC");
+    test(regex_278, 278, "a++a", "aaaaa", "n", "-", "-");
+    test(regex_279, 279, "a*+a", "aaaaa", "n", "-", "-");
+    test(regex_280, 280, "a{1,5}+a", "aaaaa", "n", "-", "-");
+    test(regex_281, 281, "a?+a", "ab", "n", "-", "-");
+    test(regex_282, 282, "a++b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_283, 283, "a*+b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_284, 284, "a{1,5}+b", "aaaaab", "y", "$&", "aaaaab");
+    test(regex_285, 285, "a?+b", "ab", "y", "$&", "ab");
+    test(regex_286, 286, "fooa++a", "fooaaaaa", "n", "-", "-");
+    test(regex_287, 287, "fooa*+a", "fooaaaaa", "n", "-", "-");
+    test(regex_288, 288, "fooa{1,5}+a", "fooaaaaa", "n", "-", "-");
+    test(regex_289, 289, "fooa?+a", "fooab", "n", "-", "-");
+    test(regex_290, 290, "fooa++b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_291, 291, "fooa*+b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_292, 292, "fooa{1,5}+b", "fooaaaaab", "y", "$&", "fooaaaaab");
+    test(regex_293, 293, "fooa?+b", "fooab", "y", "$&", "fooab");
+    test(regex_294, 294, "(aA)++(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_295, 295, "(aA|bB)++(aA|bB)", "aAaAbBaAbB", "n", "-", "aAaAbBaAbB");
+    test(regex_296, 296, "(aA)*+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_297, 297, "(aA|bB)*+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
+    test(regex_298, 298, "(aA){1,5}+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
+    test(regex_299, 299, "(aA|bB){1,5}+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
+    test(regex_300, 300, "(aA)?+(aA)", "aAb", "n", "-", "aAb");
+    test(regex_301, 301, "(aA|bB)?+(aA|bB)", "bBb", "n", "-", "bBb");
+    test(regex_302, 302, "(aA)++b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_303, 303, "(aA|bB)++b", "aAbBaAaAbBb", "y", "$&", "aAbBaAaAbBb");
+    test(regex_304, 304, "(aA)*+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_305, 305, "(aA|bB)*+b", "bBbBbBbBbBb", "y", "$&", "bBbBbBbBbBb");
+    test(regex_306, 306, "(aA){1,5}+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
+    test(regex_307, 307, "(aA|bB){1,5}+b", "bBaAbBaAbBb", "y", "$&", "bBaAbBaAbBb");
+    test(regex_308, 308, "(aA)?+b", "aAb", "y", "$&", "aAb");
+    test(regex_309, 309, "(aA|bB)?+b", "bBb", "y", "$&", "bBb");
+    test(regex_310, 310, "foo(aA)++(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_311, 311, "foo(aA|bB)++(aA|bB)", "foobBbBbBaAaA", "n", "-", "foobBbBbBaAaA");
+    test(regex_312, 312, "foo(aA)*+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_313, 313, "foo(aA|bB)*+(aA|bB)", "foobBaAbBaAaA", "n", "-", "foobBaAbBaAaA");
+    test(regex_314, 314, "foo(aA){1,5}+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
+    test(regex_315, 315, "foo(aA|bB){1,5}+(aA|bB)", "fooaAbBbBaAaA", "n", "-", "fooaAbBbBaAaA");
+    test(regex_316, 316, "foo(aA)?+(aA)", "fooaAb", "n", "-", "fooaAb");
+    test(regex_317, 317, "foo(aA|bB)?+(aA|bB)", "foobBb", "n", "-", "foobBb");
+    test(regex_318, 318, "foo(aA)++b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_319, 319, "foo(aA|bB)++b", "foobBaAbBaAbBb", "y", "$&", "foobBaAbBaAbBb");
+    test(regex_320, 320, "foo(aA)*+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_321, 321, "foo(aA|bB)*+b", "foobBbBaAaAaAb", "y", "$&", "foobBbBaAaAaAb");
+    test(regex_322, 322, "foo(aA){1,5}+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
+    test(regex_323, 323, "foo(aA|bB){1,5}+b", "foobBaAaAaAaAb", "y", "$&", "foobBaAaAaAaAb");
+    test(regex_324, 324, "foo(aA)?+b", "fooaAb", "y", "$&", "fooaAb");
+    test(regex_325, 325, "foo(aA|bB)?+b", "foobBb", "y", "$&", "foobBb");
+    test(regex_326, 326, "foo(\\h+)bar", "foo\tbar", "y", "$1", "\t");
+    test(regex_327, 327, "(\\H+)(\\h)", "foo\tbar", "y", "$1-$2", "foo-\t");
+    test(regex_328, 328, "(\\h+)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
+    test(regex_329, 329, "foo(\\h)bar", "foo\tbar", "y", "$1", "\t");
+    test(regex_330, 330, "(\\H)(\\h)", "foo\tbar", "y", "$1-$2", "o-\t");
+    test(regex_331, 331, "(\\h)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
+    test(regex_332, 332, "foo(\\v+)bar", "foo\r\n\r\n\nbar", "y", "$1", "\r\n\r\n\n");
+    test(regex_333, 333, "(\\V+)(\\v)", "foo\r\n\r\n\nbar", "y", "$1-$2", "foo-\r");
+    test(regex_334, 334, "(\\v+)(\\V)", "foo\r\n\r\n\nbar", "y", "$1-$2", "\r\n\r\n\n-b");
+    test(regex_335, 335, "foo(\\v)bar", "foo\rbar", "y", "$1", "\r");
+    test(regex_336, 336, "(\\V)(\\v)", "foo\rbar", "y", "$1-$2", "o-\r");
+    test(regex_337, 337, "(\\v)(\\V)", "foo\rbar", "y", "$1-$2", "\r-b");
+    test(regex_338, 338, "(?:(?i)a)b", "ab", "y", "$&", "ab");
+    test(regex_339, 339, "((?i)a)b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_340, 340, "(?:(?i)a)b", "Ab", "y", "$&", "Ab");
+    test(regex_341, 341, "((?i)a)b", "Ab", "y", "$&:$1", "Ab:A");
+    test(regex_342, 342, "(?:(?i)a)b", "aB", "n", "-", "-");
+    test(regex_343, 343, "((?i)a)b", "aB", "n", "-", "-");
+    test(regex_344, 344, "(?i:a)b", "ab", "y", "$&", "ab");
+    test(regex_345, 345, "((?i:a))b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_346, 346, "(?i:a)b", "Ab", "y", "$&", "Ab");
+    test(regex_347, 347, "((?i:a))b", "Ab", "y", "$&:$1", "Ab:A");
+    test(regex_348, 348, "(?i:a)b", "aB", "n", "-", "-");
+    test(regex_349, 349, "((?i:a))b", "aB", "n", "-", "-");
+    test(regex_350, 350, "(?:(?-i)a)b", "ab", "y", "$&", "ab");
+    test(regex_351, 351, "((?-i)a)b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_352, 352, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
+    test(regex_353, 353, "((?-i)a)b", "aB", "y", "$&:$1", "aB:a");
+    test(regex_354, 354, "(?:(?-i)a)b", "Ab", "n", "-", "-");
+    test(regex_355, 355, "((?-i)a)b", "Ab", "n", "-", "-");
+    test(regex_356, 356, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
+    test(regex_357, 357, "((?-i)a)b", "aB", "y", "$1", "a");
+    test(regex_358, 358, "(?:(?-i)a)b", "AB", "n", "-", "-");
+    test(regex_359, 359, "((?-i)a)b", "AB", "n", "-", "-");
+    test(regex_360, 360, "(?-i:a)b", "ab", "y", "$&", "ab");
+    test(regex_361, 361, "((?-i:a))b", "ab", "y", "$&:$1", "ab:a");
+    test(regex_362, 362, "(?-i:a)b", "aB", "y", "$&", "aB");
+    test(regex_363, 363, "((?-i:a))b", "aB", "y", "$&:$1", "aB:a");
+    test(regex_364, 364, "(?-i:a)b", "Ab", "n", "-", "-");
+    test(regex_365, 365, "((?-i:a))b", "Ab", "n", "-", "-");
+    test(regex_366, 366, "(?-i:a)b", "aB", "y", "$&", "aB");
+    test(regex_367, 367, "((?-i:a))b", "aB", "y", "$1", "a");
+    test(regex_368, 368, "(?-i:a)b", "AB", "n", "-", "-");
+    test(regex_369, 369, "((?-i:a))b", "AB", "n", "-", "-");
+    test(regex_370, 370, "((?-i:a.))b", "a\nB", "n", "-", "-");
+    test(regex_371, 371, "((?-i:a\\\\N))b", "a\nB", "n", "-", "-");
+    test(regex_372, 372, "((?s-i:a.))b", "a\nB", "y", "$1", "a\n");
+    test(regex_373, 373, "((?s-i:a\\\\N))b", "a\nB", "n", "-", "-");
+    test(regex_374, 374, "((?s-i:a.))b", "B\nB", "n", "-", "-");
+    test(regex_375, 375, "((?s-i:a\\\\N))b", "B\nB", "n", "-", "-");
+    test(regex_376, 376, "^(?:a?b?)*\\$", "a--", "n", "-", "-");
+    test(regex_377, 377, "((?s)^a(.))((?m)^b\\$)", "a\nb\nc\n", "y", "$1;$2;$3", "a\n;\n;b");
+    test(regex_378, 378, "((?m)^b\\$)", "a\nb\nc\n", "y", "$1", "b");
+    test(regex_379, 379, "(?m)^b", "a\nb\n", "y", "$&", "b");
+    test(regex_380, 380, "(?m)^(b)", "a\nb\n", "y", "$1", "b");
+    test(regex_381, 381, "((?m)^b)", "a\nb\n", "y", "$1", "b");
+    test(regex_382, 382, "\\n((?m)^b)", "a\nb\n", "y", "$1", "b");
+    test(regex_383, 383, "^b", "a\nb\nc\n", "n", "-", "-");
+    test(regex_384, 384, "()^b", "a\nb\nc\n", "n", "-", "-");
+    test(regex_385, 385, "((?m)^b)", "a\nb\nc\n", "y", "$1", "b");
+    test(regex_386, 386, "\\Z", "a\nb\n", "y", "$-[0]", "3");
+    test(regex_387, 387, "\\z", "a\nb\n", "y", "$-[0]", "4");
+    test(regex_388, 388, "\\$", "a\nb\n", "y", "$-[0]", "3");
+    test(regex_389, 389, "\\Z", "b\na\n", "y", "$-[0]", "3");
+    test(regex_390, 390, "\\z", "b\na\n", "y", "$-[0]", "4");
+    test(regex_391, 391, "\\$", "b\na\n", "y", "$-[0]", "3");
+    test(regex_392, 392, "\\Z", "b\na", "y", "$-[0]", "3");
+    test(regex_393, 393, "\\z", "b\na", "y", "$-[0]", "3");
+    test(regex_394, 394, "\\$", "b\na", "y", "$-[0]", "3");
+    test(regex_395, 395, "\\Z", "a\nb\n", "y", "$-[0]", "3");
+    test(regex_396, 396, "\\z", "a\nb\n", "y", "$-[0]", "4");
+    test(regex_397, 397, "\\$", "a\nb\n", "y", "$-[0]", "1");
+    test(regex_398, 398, "\\Z", "b\na\n", "y", "$-[0]", "3");
+    test(regex_399, 399, "\\z", "b\na\n", "y", "$-[0]", "4");
+    test(regex_400, 400, "\\$", "b\na\n", "y", "$-[0]", "1");
+    test(regex_401, 401, "\\Z", "b\na", "y", "$-[0]", "3");
+    test(regex_402, 402, "\\z", "b\na", "y", "$-[0]", "3");
+    test(regex_403, 403, "\\$", "b\na", "y", "$-[0]", "1");
+    test(regex_404, 404, "a\\Z", "a\nb\n", "n", "-", "-");
+    test(regex_405, 405, "a\\z", "a\nb\n", "n", "-", "-");
+    test(regex_406, 406, "a\\$", "a\nb\n", "n", "-", "-");
+    test(regex_407, 407, "a\\Z", "b\na\n", "y", "$-[0]", "2");
+    test(regex_408, 408, "a\\z", "b\na\n", "n", "-", "-");
+    test(regex_409, 409, "a\\$", "b\na\n", "y", "$-[0]", "2");
+    test(regex_410, 410, "a\\Z", "b\na", "y", "$-[0]", "2");
+    test(regex_411, 411, "a\\z", "b\na", "y", "$-[0]", "2");
+    test(regex_412, 412, "a\\$", "b\na", "y", "$-[0]", "2");
+    test(regex_413, 413, "a\\Z", "a\nb\n", "n", "-", "-");
+    test(regex_414, 414, "a\\z", "a\nb\n", "n", "-", "-");
+    test(regex_415, 415, "a\\$", "a\nb\n", "y", "$-[0]", "0");
+    test(regex_416, 416, "a\\Z", "b\na\n", "y", "$-[0]", "2");
+    test(regex_417, 417, "a\\z", "b\na\n", "n", "-", "-");
+    test(regex_418, 418, "a\\$", "b\na\n", "y", "$-[0]", "2");
+    test(regex_419, 419, "a\\Z", "b\na", "y", "$-[0]", "2");
+    test(regex_420, 420, "a\\z", "b\na", "y", "$-[0]", "2");
+    test(regex_421, 421, "a\\$", "b\na", "y", "$-[0]", "2");
+    test(regex_422, 422, "aa\\Z", "aa\nb\n", "n", "-", "-");
+    test(regex_423, 423, "aa\\z", "aa\nb\n", "n", "-", "-");
+    test(regex_424, 424, "aa\\$", "aa\nb\n", "n", "-", "-");
+    test(regex_425, 425, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_426, 426, "aa\\z", "b\naa\n", "n", "-", "-");
+    test(regex_427, 427, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_428, 428, "aa\\Z", "b\naa", "y", "$-[0]", "2");
+    test(regex_429, 429, "aa\\z", "b\naa", "y", "$-[0]", "2");
+    test(regex_430, 430, "aa\\$", "b\naa", "y", "$-[0]", "2");
+    test(regex_431, 431, "aa\\Z", "aa\nb\n", "n", "-", "-");
+    test(regex_432, 432, "aa\\z", "aa\nb\n", "n", "-", "-");
+    test(regex_433, 433, "aa\\$", "aa\nb\n", "y", "$-[0]", "0");
+    test(regex_434, 434, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_435, 435, "aa\\z", "b\naa\n", "n", "-", "-");
+    test(regex_436, 436, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
+    test(regex_437, 437, "aa\\Z", "b\naa", "y", "$-[0]", "2");
+    test(regex_438, 438, "aa\\z", "b\naa", "y", "$-[0]", "2");
+    test(regex_439, 439, "aa\\$", "b\naa", "y", "$-[0]", "2");
+    test(regex_440, 440, "aa\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_441, 441, "aa\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_442, 442, "aa\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_443, 443, "aa\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_444, 444, "aa\\z", "b\nac\n", "n", "-", "-");
+    test(regex_445, 445, "aa\\$", "b\nac\n", "n", "-", "-");
+    test(regex_446, 446, "aa\\Z", "b\nac", "n", "-", "-");
+    test(regex_447, 447, "aa\\z", "b\nac", "n", "-", "-");
+    test(regex_448, 448, "aa\\$", "b\nac", "n", "-", "-");
+    test(regex_449, 449, "aa\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_450, 450, "aa\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_451, 451, "aa\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_452, 452, "aa\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_453, 453, "aa\\z", "b\nac\n", "n", "-", "-");
+    test(regex_454, 454, "aa\\$", "b\nac\n", "n", "-", "-");
+    test(regex_455, 455, "aa\\Z", "b\nac", "n", "-", "-");
+    test(regex_456, 456, "aa\\z", "b\nac", "n", "-", "-");
+    test(regex_457, 457, "aa\\$", "b\nac", "n", "-", "-");
+    test(regex_458, 458, "aa\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_459, 459, "aa\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_460, 460, "aa\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_461, 461, "aa\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_462, 462, "aa\\z", "b\nca\n", "n", "-", "-");
+    test(regex_463, 463, "aa\\$", "b\nca\n", "n", "-", "-");
+    test(regex_464, 464, "aa\\Z", "b\nca", "n", "-", "-");
+    test(regex_465, 465, "aa\\z", "b\nca", "n", "-", "-");
+    test(regex_466, 466, "aa\\$", "b\nca", "n", "-", "-");
+    test(regex_467, 467, "aa\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_468, 468, "aa\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_469, 469, "aa\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_470, 470, "aa\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_471, 471, "aa\\z", "b\nca\n", "n", "-", "-");
+    test(regex_472, 472, "aa\\$", "b\nca\n", "n", "-", "-");
+    test(regex_473, 473, "aa\\Z", "b\nca", "n", "-", "-");
+    test(regex_474, 474, "aa\\z", "b\nca", "n", "-", "-");
+    test(regex_475, 475, "aa\\$", "b\nca", "n", "-", "-");
+    test(regex_476, 476, "ab\\Z", "ab\nb\n", "n", "-", "-");
+    test(regex_477, 477, "ab\\z", "ab\nb\n", "n", "-", "-");
+    test(regex_478, 478, "ab\\$", "ab\nb\n", "n", "-", "-");
+    test(regex_479, 479, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_480, 480, "ab\\z", "b\nab\n", "n", "-", "-");
+    test(regex_481, 481, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_482, 482, "ab\\Z", "b\nab", "y", "$-[0]", "2");
+    test(regex_483, 483, "ab\\z", "b\nab", "y", "$-[0]", "2");
+    test(regex_484, 484, "ab\\$", "b\nab", "y", "$-[0]", "2");
+    test(regex_485, 485, "ab\\Z", "ab\nb\n", "n", "-", "-");
+    test(regex_486, 486, "ab\\z", "ab\nb\n", "n", "-", "-");
+    test(regex_487, 487, "ab\\$", "ab\nb\n", "y", "$-[0]", "0");
+    test(regex_488, 488, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_489, 489, "ab\\z", "b\nab\n", "n", "-", "-");
+    test(regex_490, 490, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
+    test(regex_491, 491, "ab\\Z", "b\nab", "y", "$-[0]", "2");
+    test(regex_492, 492, "ab\\z", "b\nab", "y", "$-[0]", "2");
+    test(regex_493, 493, "ab\\$", "b\nab", "y", "$-[0]", "2");
+    test(regex_494, 494, "ab\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_495, 495, "ab\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_496, 496, "ab\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_497, 497, "ab\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_498, 498, "ab\\z", "b\nac\n", "n", "-", "-");
+    test(regex_499, 499, "ab\\$", "b\nac\n", "n", "-", "-");
+    test(regex_500, 500, "ab\\Z", "b\nac", "n", "-", "-");
+    test(regex_501, 501, "ab\\z", "b\nac", "n", "-", "-");
+    test(regex_502, 502, "ab\\$", "b\nac", "n", "-", "-");
+    test(regex_503, 503, "ab\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_504, 504, "ab\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_505, 505, "ab\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_506, 506, "ab\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_507, 507, "ab\\z", "b\nac\n", "n", "-", "-");
+    test(regex_508, 508, "ab\\$", "b\nac\n", "n", "-", "-");
+    test(regex_509, 509, "ab\\Z", "b\nac", "n", "-", "-");
+    test(regex_510, 510, "ab\\z", "b\nac", "n", "-", "-");
+    test(regex_511, 511, "ab\\$", "b\nac", "n", "-", "-");
+    test(regex_512, 512, "ab\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_513, 513, "ab\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_514, 514, "ab\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_515, 515, "ab\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_516, 516, "ab\\z", "b\nca\n", "n", "-", "-");
+    test(regex_517, 517, "ab\\$", "b\nca\n", "n", "-", "-");
+    test(regex_518, 518, "ab\\Z", "b\nca", "n", "-", "-");
+    test(regex_519, 519, "ab\\z", "b\nca", "n", "-", "-");
+    test(regex_520, 520, "ab\\$", "b\nca", "n", "-", "-");
+    test(regex_521, 521, "ab\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_522, 522, "ab\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_523, 523, "ab\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_524, 524, "ab\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_525, 525, "ab\\z", "b\nca\n", "n", "-", "-");
+    test(regex_526, 526, "ab\\$", "b\nca\n", "n", "-", "-");
+    test(regex_527, 527, "ab\\Z", "b\nca", "n", "-", "-");
+    test(regex_528, 528, "ab\\z", "b\nca", "n", "-", "-");
+    test(regex_529, 529, "ab\\$", "b\nca", "n", "-", "-");
+    test(regex_530, 530, "abb\\Z", "abb\nb\n", "n", "-", "-");
+    test(regex_531, 531, "abb\\z", "abb\nb\n", "n", "-", "-");
+    test(regex_532, 532, "abb\\$", "abb\nb\n", "n", "-", "-");
+    test(regex_533, 533, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_534, 534, "abb\\z", "b\nabb\n", "n", "-", "-");
+    test(regex_535, 535, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_536, 536, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_537, 537, "abb\\z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_538, 538, "abb\\$", "b\nabb", "y", "$-[0]", "2");
+    test(regex_539, 539, "abb\\Z", "abb\nb\n", "n", "-", "-");
+    test(regex_540, 540, "abb\\z", "abb\nb\n", "n", "-", "-");
+    test(regex_541, 541, "abb\\$", "abb\nb\n", "y", "$-[0]", "0");
+    test(regex_542, 542, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_543, 543, "abb\\z", "b\nabb\n", "n", "-", "-");
+    test(regex_544, 544, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
+    test(regex_545, 545, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_546, 546, "abb\\z", "b\nabb", "y", "$-[0]", "2");
+    test(regex_547, 547, "abb\\$", "b\nabb", "y", "$-[0]", "2");
+    test(regex_548, 548, "abb\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_549, 549, "abb\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_550, 550, "abb\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_551, 551, "abb\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_552, 552, "abb\\z", "b\nac\n", "n", "-", "-");
+    test(regex_553, 553, "abb\\$", "b\nac\n", "n", "-", "-");
+    test(regex_554, 554, "abb\\Z", "b\nac", "n", "-", "-");
+    test(regex_555, 555, "abb\\z", "b\nac", "n", "-", "-");
+    test(regex_556, 556, "abb\\$", "b\nac", "n", "-", "-");
+    test(regex_557, 557, "abb\\Z", "ac\nb\n", "n", "-", "-");
+    test(regex_558, 558, "abb\\z", "ac\nb\n", "n", "-", "-");
+    test(regex_559, 559, "abb\\$", "ac\nb\n", "n", "-", "-");
+    test(regex_560, 560, "abb\\Z", "b\nac\n", "n", "-", "-");
+    test(regex_561, 561, "abb\\z", "b\nac\n", "n", "-", "-");
+    test(regex_562, 562, "abb\\$", "b\nac\n", "n", "-", "-");
+    test(regex_563, 563, "abb\\Z", "b\nac", "n", "-", "-");
+    test(regex_564, 564, "abb\\z", "b\nac", "n", "-", "-");
+    test(regex_565, 565, "abb\\$", "b\nac", "n", "-", "-");
+    test(regex_566, 566, "abb\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_567, 567, "abb\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_568, 568, "abb\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_569, 569, "abb\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_570, 570, "abb\\z", "b\nca\n", "n", "-", "-");
+    test(regex_571, 571, "abb\\$", "b\nca\n", "n", "-", "-");
+    test(regex_572, 572, "abb\\Z", "b\nca", "n", "-", "-");
+    test(regex_573, 573, "abb\\z", "b\nca", "n", "-", "-");
+    test(regex_574, 574, "abb\\$", "b\nca", "n", "-", "-");
+    test(regex_575, 575, "abb\\Z", "ca\nb\n", "n", "-", "-");
+    test(regex_576, 576, "abb\\z", "ca\nb\n", "n", "-", "-");
+    test(regex_577, 577, "abb\\$", "ca\nb\n", "n", "-", "-");
+    test(regex_578, 578, "abb\\Z", "b\nca\n", "n", "-", "-");
+    test(regex_579, 579, "abb\\z", "b\nca\n", "n", "-", "-");
+    test(regex_580, 580, "abb\\$", "b\nca\n", "n", "-", "-");
+    test(regex_581, 581, "abb\\Z", "b\nca", "n", "-", "-");
+    test(regex_582, 582, "abb\\z", "b\nca", "n", "-", "-");
+    test(regex_583, 583, "abb\\$", "b\nca", "n", "-", "-");
+    test(regex_584, 584, "\\Aa\\$", "a\n\n", "y", "$&", "a");
+    // test(regex_585, 585, "(?i:.[b].)", "abd", "y", "$&", "abd");
+    // test(regex_586, 586, "(?i:\\\\N[b]\\\\N)", "abd", "y", "$&", "abd");
+    test(regex_587, 587, "\\\\N {1}", "abbbbc", "y", "$&", "a");
+    test(regex_588, 588, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_589, 589, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_590, 590, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_591, 591, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_592, 592, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_593, 593, "a\\\\N c", "abc", "y", "$&", "abc");
+    test(regex_594, 594, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
+    test(regex_595, 595, "a\\\\N *c", "axyzd", "n", "-", "-");
+    // test(regex_596, 596, "[a b]", " ", "yS", "$&", " ");
+    // test(regex_597, 597, "[a b]", " ", "n", "-", "-");
+    // test(regex_598, 598, "[a\\ b]", " ", "y", "$&", " ");
+    // test(regex_599, 599, "[ ^ a b ]", "a", "n", "-", "-");
+    // test(regex_600, 600, "[ ^ a b ]", "b", "n", "-", "-");
+    // test(regex_601, 601, "[ ^ a b ]", "A", "y", "$&", "A");
+    // test(regex_602, 602, "(?x:[a b])", " ", "yS", "$&", " ");
+    // test(regex_603, 603, "(?xx:[a b])", " ", "n", "-", "-");
+    // test(regex_604, 604, "(?x)[a b]", " ", "yS", "$&", " ");
+    // test(regex_605, 605, "(?xx)[a b]", " ", "n", "-", "-");
+    // test(regex_606, 606, "(?-x:[a b])", " ", "yS", "$&", " ");
+    test(regex_607, 607, "\\\\N {1}", "abbbbc", "y", "$&", "a");
+    test(regex_608, 608, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_609, 609, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
+    test(regex_610, 610, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
+    test(regex_611, 611, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
+    test(regex_612, 612, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
+    test(regex_613, 613, "a\\\\N c", "abc", "y", "$&", "abc");
+    test(regex_614, 614, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
+    test(regex_615, 615, "a\\\\N *c", "axyzd", "n", "-", "-");
+    // test(regex_616, 616, "[#]", "a#b", "y", "$&", "#");
+    // test(regex_617, 617, "[#]b", "a#b", "y", "$&", "#b");
+    // test(regex_618, 618, "[#]", "a#b", "y", "$&", "#");
+    // test(regex_619, 619, "[#]b", "a#b", "y", "$&", "#b");
+    test(regex_620, 620, "(?'n'foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
+    test(regex_621, 621, "(?'n'foo) \\g{ n }", "..foo foo..", "y", "$1", "foo");
+    test(regex_622, 622, "(?'n'foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_623, 623, "(?foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
+    test(regex_624, 624, "(?foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_625, 625, "(?as) (\\w+) \\g{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_626, 626, "(?'n'foo) \\k", "..foo foo..", "y", "$1", "foo");
+    test(regex_627, 627, "(?'n'foo) \\k", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_628, 628, "(?foo) \\k'n'", "..foo foo..", "y", "$1", "foo");
+    test(regex_629, 629, "(?foo) \\k'n'", "..foo foo..", "yM", "$+{n}", "foo");
+    test(regex_630, 630, "(?'a1'foo) \\k'a1'", "..foo foo..", "yM", "$+{a1}", "foo");
+    test(regex_631, 631, "(?foo) \\k", "..foo foo..", "yM", "$+{a1}", "foo");
+    test(regex_632, 632, "(?'_'foo) \\k'_'", "..foo foo..", "yM", "$+{_}", "foo");
+    test(regex_633, 633, "(?<_>foo) \\k<_>", "..foo foo..", "yM", "$+{_}", "foo");
+    test(regex_634, 634, "(?'_0_'foo) \\k'_0_'", "..foo foo..", "yM", "$+{_0_}", "foo");
+    test(regex_635, 635, "(?<_0_>foo) \\k<_0_>", "..foo foo..", "yM", "$+{_0_}", "foo");
+    test(regex_636, 636, "(?as) (\\w+) \\k (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_637, 637, "(?as) (\\w+) \\k{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_638, 638, "(?as) (\\w+) \\k'as' (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_639, 639, "(?as) (\\w+) \\k{ as } (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
+    test(regex_640, 640, "^a(?#xxx){3}c", "aaac", "y", "$&", "aaac");
+    test(regex_641, 641, "^a (?#xxx) (?#yyy) {3}c", "aaac", "y", "$&", "aaac");
+    test(regex_642, 642, "(?|(a))", "a", "y", "$1-$+", "a-a");
+    test(regex_643, 643, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "d!o!da", "y", "$1-$2-$3", "!o!-o-a");
+    test(regex_644, 644, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "aabc", "y", "$1-$2-$3", "a--c");
+    test(regex_645, 645, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "ixyjp", "y", "$1-$2-$3", "x-y-p");
+    test(regex_646, 646, "(?|(?|(a)|(b))|(?|(c)|(d)))", "a", "y", "$1", "a");
+    test(regex_647, 647, "(?|(?|(a)|(b))|(?|(c)|(d)))", "b", "y", "$1", "b");
+    test(regex_648, 648, "(?|(?|(a)|(b))|(?|(c)|(d)))", "c", "y", "$1", "c");
+    test(regex_649, 649, "(?|(?|(a)|(b))|(?|(c)|(d)))", "d", "y", "$1", "d");
+    test(regex_650, 650, "(.)(?|(.)(.)x|(.)d)(.)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
+    test(regex_651, 651, "(\\\\N)(?|(\\\\N)(\\\\N)x|(\\\\N)d)(\\\\N)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
+    test(regex_652, 652, "(?|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_653, 653, "(?|(?x)|(?y))", "x", "yM", "$+{foo}", "x");
+    test(regex_654, 654, "(?|(?y)|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_655, 655, "(?)(?|(?x))", "x", "yM", "$+{foo}", "x");
+    test(regex_656, 656, "foo\\Kbar", "foobar", "y", "$&", "bar");
+    test(regex_657, 657, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
+    test(regex_658, 658, "(foo)", "foobar", "y", "$&-$1", "foo-");
+    test(regex_659, 659, "(?-n)(foo)(?n)(bar)", "foobar", "y", "$&-$1-$2", "foobar-foo-");
+    test(regex_660, 660, "(?-n:(foo)(?n:(bar)))", "foobar", "y", "$&-$1-$2", "foobar-foo-");
+    test(regex_661, 661, "foo # Match foo", "foobar", "y", "$&", "foo");
+    test(regex_662, 662, "\\x41\\x42", "AB", "y", "$&", "AB");
+    test(regex_663, 663, "\\101\\o{102}", "AB", "y", "$&", "AB");
+    std::cout << std::endl;
+  }
+}
+test_perl_tests_lookahead: @regex type = {
+  regex_0 := "a(?!b).";
+  var_regex_0 : std::string = "a(?!b).";
+  regex_1 := "(?=)a";
+  var_regex_1 : std::string = "(?=)a";
+  regex_2 := "a(?=d).";
+  var_regex_2 : std::string = "a(?=d).";
+  regex_3 := "a(?=c|d).";
+  var_regex_3 : std::string = "a(?=c|d).";
+  regex_4 := "^(?:b|a(?=(.)))*\1";
+  var_regex_4 : std::string = "^(?:b|a(?=(.)))*\1";
+  regex_5 := "(?=(a+?))(\1ab)";
+  var_regex_5 : std::string = "(?=(a+?))(\1ab)";
+  regex_6 := "^(?=(a+?))\1ab";
+  var_regex_6 : std::string = "^(?=(a+?))\1ab";
+  regex_7 := "(?=(a+?))(\1ab)";
+  var_regex_7 : std::string = "(?=(a+?))(\1ab)";
+  regex_8 := "^(?=(a+?))\1ab";
+  var_regex_8 : std::string = "^(?=(a+?))\1ab";
+  regex_9 := "(.*)(?=c)";
+  var_regex_9 : std::string = "(.*)(?=c)";
+  regex_10 := "(.*)(?=c)c";
+  var_regex_10 : std::string = "(.*)(?=c)c";
+  regex_11 := "(.*)(?=b|c)";
+  var_regex_11 : std::string = "(.*)(?=b|c)";
+  regex_12 := "(.*)(?=b|c)c";
+  var_regex_12 : std::string = "(.*)(?=b|c)c";
+  regex_13 := "(.*)(?=c|b)";
+  var_regex_13 : std::string = "(.*)(?=c|b)";
+  regex_14 := "(.*)(?=c|b)c";
+  var_regex_14 : std::string = "(.*)(?=c|b)c";
+//   regex_15 := "(.*)(?=[bc])";
+//   var_regex_15 : std::string = "(.*)(?=[bc])";
+//   regex_16 := "(.*)(?=[bc])c";
+//   var_regex_16 : std::string = "(.*)(?=[bc])c";
+  regex_17 := "(.*?)(?=c)";
+  var_regex_17 : std::string = "(.*?)(?=c)";
+  regex_18 := "(.*?)(?=c)c";
+  var_regex_18 : std::string = "(.*?)(?=c)c";
+  regex_19 := "(.*?)(?=b|c)";
+  var_regex_19 : std::string = "(.*?)(?=b|c)";
+  regex_20 := "(.*?)(?=b|c)c";
+  var_regex_20 : std::string = "(.*?)(?=b|c)c";
+  regex_21 := "(.*?)(?=c|b)";
+  var_regex_21 : std::string = "(.*?)(?=c|b)";
+  regex_22 := "(.*?)(?=c|b)c";
+  var_regex_22 : std::string = "(.*?)(?=c|b)c";
+//   regex_23 := "(.*?)(?=[bc])";
+//   var_regex_23 : std::string = "(.*?)(?=[bc])";
+//   regex_24 := "(.*?)(?=[bc])c";
+//   var_regex_24 : std::string = "(.*?)(?=[bc])c";
+  regex_25 := "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
+  var_regex_25 : std::string = "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
+  regex_26 := "a(?!b(?!c))(..)";
+  var_regex_26 : std::string = "a(?!b(?!c))(..)";
+  regex_27 := "a(?!b(?=a))(..)";
+  var_regex_27 : std::string = "a(?!b(?=a))(..)";
+  regex_28 := "X(\w+)(?=\s)|X(\w+)";
+  var_regex_28 : std::string = "X(\w+)(?=\s)|X(\w+)";
+  regex_29 := "^a*(?=b)b";
+  var_regex_29 : std::string = "^a*(?=b)b";
+  regex_30 := "(?!\A)x";
+  regex_30_mod := "m";
+  var_regex_30 : std::string = "(?!\A)x";
+  regex_31 := "^(o)(?!.*\1)";
+  regex_31_mod := "i";
+  var_regex_31 : std::string = "^(o)(?!.*\1)";
+  regex_32 := ".*a(?!(b|cd)*e).*f";
+  var_regex_32 : std::string = ".*a(?!(b|cd)*e).*f";
+  regex_33 := "^(a*?)(?!(aa|aaaa)*\$)";
+  var_regex_33 : std::string = "^(a*?)(?!(aa|aaaa)*\$)";
+  regex_34 := "(?!)+?|(.{2,4})";
+  var_regex_34 : std::string = "(?!)+?|(.{2,4})";
+  regex_35 := "^(a*?)(?!(a{6}|a{5})*\$)";
+  var_regex_35 : std::string = "^(a*?)(?!(a{6}|a{5})*\$)";
+  regex_36 := "a(?!b(?!c(?!d(?!e))))...(.)";
+  var_regex_36 : std::string = "a(?!b(?!c(?!d(?!e))))...(.)";
+  regex_37 := "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
+  var_regex_37 : std::string = "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
+  regex_38 := "((?s).)c(?!.)";
+  var_regex_38 : std::string = "((?s).)c(?!.)";
+  regex_39 := "((?s).)c(?!.)";
+  var_regex_39 : std::string = "((?s).)c(?!.)";
+  regex_40 := "((?s)b.)c(?!.)";
+  var_regex_40 : std::string = "((?s)b.)c(?!.)";
+  regex_41 := "((?s)b.)c(?!.)";
+  var_regex_41 : std::string = "((?s)b.)c(?!.)";
+  regex_42 := "((?s)b.)c(?!\N)";
+  var_regex_42 : std::string = "((?s)b.)c(?!\\N)";
+  regex_43 := "(b.)c(?!\N)";
+  regex_43_mod := "s";
+  var_regex_43 : std::string = "(b.)c(?!\\N)";
+  regex_44 := "a*(?!)";
+  var_regex_44 : std::string = "a*(?!)";
+  run: (this) = {
+    std::cout << "Running perl_tests_lookahead:"<< std::endl;
+    test(regex_0, 0, "a(?!b).", "abad", "y", "$&", "ad");
+    test(regex_1, 1, "(?=)a", "a", "y", "$&", "a");
+    test(regex_2, 2, "a(?=d).", "abad", "y", "$&", "ad");
+    test(regex_3, 3, "a(?=c|d).", "abad", "y", "$&", "ad");
+    test(regex_4, 4, "^(?:b|a(?=(.)))*\\1", "abc", "y", "$&", "ab");
+    test(regex_5, 5, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
+    test(regex_6, 6, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
+    test(regex_7, 7, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
+    test(regex_8, 8, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
+    test(regex_9, 9, "(.*)(?=c)", "abcd", "y", "$1", "ab");
+    test(regex_10, 10, "(.*)(?=c)c", "abcd", "yB", "$1", "ab");
+    test(regex_11, 11, "(.*)(?=b|c)", "abcd", "y", "$1", "ab");
+    test(regex_12, 12, "(.*)(?=b|c)c", "abcd", "y", "$1", "ab");
+    test(regex_13, 13, "(.*)(?=c|b)", "abcd", "y", "$1", "ab");
+    test(regex_14, 14, "(.*)(?=c|b)c", "abcd", "y", "$1", "ab");
+    test(regex_15, 15, "(.*)(?=[bc])", "abcd", "y", "$1", "ab");
+    test(regex_16, 16, "(.*)(?=[bc])c", "abcd", "yB", "$1", "ab");
+    test(regex_17, 17, "(.*?)(?=c)", "abcd", "y", "$1", "ab");
+    test(regex_18, 18, "(.*?)(?=c)c", "abcd", "yB", "$1", "ab");
+    test(regex_19, 19, "(.*?)(?=b|c)", "abcd", "y", "$1", "a");
+    test(regex_20, 20, "(.*?)(?=b|c)c", "abcd", "y", "$1", "ab");
+    test(regex_21, 21, "(.*?)(?=c|b)", "abcd", "y", "$1", "a");
+    test(regex_22, 22, "(.*?)(?=c|b)c", "abcd", "y", "$1", "ab");
+    test(regex_23, 23, "(.*?)(?=[bc])", "abcd", "y", "$1", "a");
+    test(regex_24, 24, "(.*?)(?=[bc])c", "abcd", "yB", "$1", "ab");
+    test(regex_25, 25, "^(a*?)(?!(aa|aaaa)*\\$)(?=a\\z)", "aaaaaaaa", "y", "$1", "aaaaaaa");
+    test(regex_26, 26, "a(?!b(?!c))(..)", "abababc", "y", "$1", "bc");
+    test(regex_27, 27, "a(?!b(?=a))(..)", "abababc", "y", "$1", "bc");
+    test(regex_28, 28, "X(\\w+)(?=\\s)|X(\\w+)", "Xab", "y", "[$1-$2]", "[-ab]");
+    test(regex_29, 29, "^a*(?=b)b", "ab", "y", "$&", "ab");
+    test(regex_30, 30, "(?!\\A)x", "a\nxb\n", "y", "-", "-");
+    test(regex_31, 31, "^(o)(?!.*\\1)", "Oo", "n", "-", "-");
+    test(regex_32, 32, ".*a(?!(b|cd)*e).*f", "......abef", "n", "-", "-");
+    test(regex_33, 33, "^(a*?)(?!(aa|aaaa)*\\$)", "aaaaaaaaaaaaaaaaaaaa", "y", "$1", "a");
+    test(regex_34, 34, "(?!)+?|(.{2,4})", "abcde", "y", "$1", "abcd");
+    test(regex_35, 35, "^(a*?)(?!(a{6}|a{5})*\\$)", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", "$+[1]", "12");
+    test(regex_36, 36, "a(?!b(?!c(?!d(?!e))))...(.)", "abxabcdxabcde", "y", "$1", "e");
+    test(regex_37, 37, "X(?!b+(?!(c+)*(?!(c+)*d))).*X", "aXbbbbbbbcccccccccccccaaaX", "y", "-", "-");
+    test(regex_38, 38, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1", "\n");
+    test(regex_39, 39, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "\n:\nc");
+    test(regex_40, 40, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1", "b\n");
+    test(regex_41, 41, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_42, 42, "((?s)b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_43, 43, "(b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
+    test(regex_44, 44, "a*(?!)", "aaaab", "n", "-", "-");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_perl_tests_general().run();
+    test_perl_tests_lookahead().run();
+}

From c3afdc86ebc222040361a4786fedac25630fc961 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 21 Mar 2024 11:17:57 +0100
Subject: [PATCH 093/161] Fix for compile time degradation.

The change for the stateful tail increased the compile time. The tail is
now stateless again and we have an extra argument for the end function
call.
---
 include/cpp2regex.h | 934 ++++++++++++++++++++------------------------
 source/regex.h2     | 195 ++++-----
 2 files changed, 507 insertions(+), 622 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 1eda6545c4..8ce06bfe7a 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -40,141 +40,138 @@ template
 template class match_modifiers;
 
 #line 195 "regex.h2"
-template class match_tail;
+template class matcher_list;
     
 
-#line 217 "regex.h2"
-template class calling_match_tail;
+#line 212 "regex.h2"
+class true_end_func;
     
 
-#line 247 "regex.h2"
+#line 225 "regex.h2"
 template class single_class_entry;
 
-#line 255 "regex.h2"
+#line 233 "regex.h2"
 template class range_class_entry;
 
-#line 263 "regex.h2"
+#line 241 "regex.h2"
 template class combined_class_entry;
     
 
-#line 270 "regex.h2"
+#line 248 "regex.h2"
 template class list_class_entry;
     
 
-#line 277 "regex.h2"
+#line 255 "regex.h2"
 template class named_class_entry;
     
 
-#line 282 "regex.h2"
+#line 260 "regex.h2"
 template class negated_class_entry;
     
 
-#line 289 "regex.h2"
+#line 267 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 341 "regex.h2"
+#line 319 "regex.h2"
 template class empty_matcher_logic;
-
-#line 349 "regex.h2"
-template class extract_position_helper;
     
 
-#line 364 "regex.h2"
-template class matcher_list;
+#line 328 "regex.h2"
+template class extract_position_helper;
     
 
-#line 375 "regex.h2"
+#line 344 "regex.h2"
 template class special_syntax_wrapper;
     
 
-#line 392 "regex.h2"
+#line 361 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 476 "regex.h2"
+#line 445 "regex.h2"
 template class any_matcher_logic;
 
-#line 495 "regex.h2"
+#line 464 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 503 "regex.h2"
+#line 472 "regex.h2"
 template class char_matcher_logic;
 
-#line 531 "regex.h2"
+#line 500 "regex.h2"
 template class class_matcher_logic;
 
-#line 580 "regex.h2"
+#line 549 "regex.h2"
 template class global_group_reset;
     
 
-#line 592 "regex.h2"
+#line 561 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 629 "regex.h2"
+#line 598 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 653 "regex.h2"
+#line 622 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 661 "regex.h2"
+#line 630 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 694 "regex.h2"
+#line 663 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 714 "regex.h2"
+#line 683 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 731 "regex.h2"
+#line 700 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 754 "regex.h2"
+#line 723 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 766 "regex.h2"
+#line 735 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 792 "regex.h2"
+#line 761 "regex.h2"
 template class range_matcher_logic;
 
-#line 945 "regex.h2"
+#line 914 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 964 "regex.h2"
+#line 933 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1015 "regex.h2"
+#line 984 "regex.h2"
 template class group_name_list;
 
-#line 1027 "regex.h2"
+#line 996 "regex.h2"
 class group_name_list_end;
     
 
-#line 1032 "regex.h2"
+#line 1001 "regex.h2"
 template class regular_expression;
 
-#line 1121 "regex.h2"
+#line 1090 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1128 "regex.h2"
+#line 1097 "regex.h2"
 class regex_parser_group_state;
 
-#line 1163 "regex.h2"
+#line 1132 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1190 "regex.h2"
+#line 1159 "regex.h2"
 template class regex_parser;
 
-#line 2162 "regex.h2"
+#line 2131 "regex.h2"
 }
 }
 
@@ -353,10 +350,6 @@ template class match_modifiers {
     //
 
     public: [[nodiscard]] auto has_flag(cpp2::in f) const& -> bool;
-    public: match_modifiers() = default;
-    public: match_modifiers(match_modifiers const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(match_modifiers const&) -> void = delete;
-
 
 #line 188 "regex.h2"
 };
@@ -366,58 +359,31 @@ template class match_modifiers {
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
 //  Otherwise the matcher can try a different alternative.
 //
-template class match_tail {
-    public: [[nodiscard]] auto match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
-
-    private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
-
-    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto;
-
-    public: static auto reset_ranges(auto& ctx) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-
-    public: template [[nodiscard]] auto prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto;
-
-    public: template [[nodiscard]] auto make_calling(Call const& call) const& -> auto;
-    public: match_tail() = default;
-    public: match_tail(match_tail const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(match_tail const&) -> void = delete;
-
-#line 208 "regex.h2"
-};
-
-//  Represents the remainder of the regular expression. Will call a function wen the end is reached.
-//
-//  TODO: Create common base with match_tail.
-//
-//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
-//  Otherwise the matcher can try a different alternative.
-//
-template class calling_match_tail {
-    private: Call call; 
-
-    public: explicit calling_match_tail(auto const& call_);
-#line 220 "regex.h2"
-    public: auto operator=(auto const& call_) -> calling_match_tail& ;
+template class matcher_list {
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
-#line 224 "regex.h2"
-    public: [[nodiscard]] auto match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto;
 
-    private: template [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+#line 201 "regex.h2"
+    private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
-    private: [[nodiscard]] auto match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto;
+    private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
-    public: template [[nodiscard]] auto prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto;
-    public: calling_match_tail(calling_match_tail const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(calling_match_tail const&) -> void = delete;
+    public: template [[nodiscard]] static auto prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto;
+    public: matcher_list() = default;
+    public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 234 "regex.h2"
+#line 209 "regex.h2"
 };
 
-template using no_tail = match_tail;
+template using no_tail = matcher_list;
+class true_end_func {
+    public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto;
+};
 
 //-----------------------------------------------------------------------
 //
@@ -436,7 +402,7 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 251 "regex.h2"
+#line 229 "regex.h2"
 };
 
 // Class syntax: - Example: a-c
@@ -449,7 +415,7 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 259 "regex.h2"
+#line 237 "regex.h2"
 };
 
 // Helper for combining two character classes
@@ -461,7 +427,7 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 266 "regex.h2"
+#line 244 "regex.h2"
 };
 
 // Class syntax:   Example: abcd
@@ -473,7 +439,7 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 273 "regex.h2"
+#line 251 "regex.h2"
 };
 
 // Class syntax: [: class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 280 "regex.h2"
+#line 258 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -495,7 +461,7 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 285 "regex.h2"
+#line 263 "regex.h2"
 };
 
 // Short class syntax: \  Example: \w
@@ -507,10 +473,10 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 292 "regex.h2"
+#line 270 "regex.h2"
 };
 
-#line 295 "regex.h2"
+#line 273 "regex.h2"
 // Named basic character classes
 //
 template         using digits_class = named_class_entry>;
@@ -541,7 +507,7 @@ template                  using short_space_class = shorthand_cl
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 326 "regex.h2"
+#line 304 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
@@ -558,44 +524,30 @@ template                      using short_not_word_class = negat
 // Regex syntax: none Example: -
 //
 template class empty_matcher_logic {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: empty_matcher_logic() = default;
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 345 "regex.h2"
+#line 323 "regex.h2"
 };
 
+#line 326 "regex.h2"
 // Helper for greedy alternatives
 //
 template class extract_position_helper {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 358 "regex.h2"
+#line 337 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 360 "regex.h2"
-};
-
-// A list of matchers. Prepends to the current match tail.
-//
-template class matcher_list {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
-
-#line 368 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: matcher_list() = default;
-    public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(matcher_list const&) -> void = delete;
-
-#line 370 "regex.h2"
+#line 339 "regex.h2"
 };
 
 // Helper for standard matchers with special syntax
@@ -608,7 +560,7 @@ template class special_synta
     public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_syntax_wrapper const&) -> void = delete;
 
-#line 378 "regex.h2"
+#line 347 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -618,87 +570,87 @@ template class special_synta
 //-----------------------------------------------------------------------
 //
 
-#line 388 "regex.h2"
+#line 357 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
 //
 template class alternative_matcher_logic {
 
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 406 "regex.h2"
+#line 375 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
-    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 424 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+#line 393 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 472 "regex.h2"
+#line 441 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 template class any_matcher_logic
  {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 489 "regex.h2"
+#line 458 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 491 "regex.h2"
+#line 460 "regex.h2"
 };
 
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: branch_reset_matcher_logic() = default;
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 499 "regex.h2"
+#line 468 "regex.h2"
 };
 
 // Regex syntax:   Example: a
 //
 template class char_matcher_logic
  {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 524 "regex.h2"
+#line 493 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 526 "regex.h2"
+#line 495 "regex.h2"
 };
 
-#line 529 "regex.h2"
+#line 498 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 552 "regex.h2"
+#line 521 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 564 "regex.h2"
+#line 533 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -707,46 +659,46 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 576 "regex.h2"
+#line 545 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
 //
 template class global_group_reset {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 586 "regex.h2"
+#line 555 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 588 "regex.h2"
+#line 557 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
 //
 template class group_matcher_start_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 600 "regex.h2"
+#line 569 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 606 "regex.h2"
+#line 575 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 627 "regex.h2"
+#line 596 "regex.h2"
 };
 
 template class group_matcher_end_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 641 "regex.h2"
+#line 610 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -755,97 +707,97 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 651 "regex.h2"
+#line 620 "regex.h2"
 };
 
 template class special_group_end_logic {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: special_group_end_logic() = default;
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 657 "regex.h2"
+#line 626 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
 //
 template class group_ref_matcher_logic {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 688 "regex.h2"
+#line 657 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 690 "regex.h2"
+#line 659 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 template class line_end_matcher_logic
  {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 708 "regex.h2"
+#line 677 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 710 "regex.h2"
+#line 679 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
 //
 template class line_start_matcher_logic
  {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 725 "regex.h2"
+#line 694 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 727 "regex.h2"
+#line 696 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 template class lookahead_matcher_logic
  {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 748 "regex.h2"
+#line 717 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 750 "regex.h2"
+#line 719 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
 //
 template class modifier_matcher_logic
  {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 759 "regex.h2"
+#line 728 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 761 "regex.h2"
+#line 730 "regex.h2"
 };
 
 // Named character classes
@@ -857,7 +809,7 @@ template                    void = delete;
 
 
-#line 768 "regex.h2"
+#line 737 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -867,7 +819,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 778 "regex.h2"
+#line 747 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -879,43 +831,43 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 791 "regex.h2"
+#line 760 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
-    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto;
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 806 "regex.h2"
+#line 775 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 834 "regex.h2"
+#line 803 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 839 "regex.h2"
+#line 808 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 844 "regex.h2"
+#line 813 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 850 "regex.h2"
-    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto;
+#line 819 "regex.h2"
+    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto;
 
-#line 865 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
+#line 834 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return;
 
-#line 893 "regex.h2"
-    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
+#line 862 "regex.h2"
+    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
 
-#line 917 "regex.h2"
-    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return;
+#line 886 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 941 "regex.h2"
+#line 910 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -928,7 +880,7 @@ template void = delete;
 
 
-#line 958 "regex.h2"
+#line 927 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -937,9 +889,9 @@ template class word_boundary_matcher_logic
  {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto;
+    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 995 "regex.h2"
+#line 964 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -947,10 +899,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1003 "regex.h2"
+#line 972 "regex.h2"
 };
 
-#line 1006 "regex.h2"
+#line 975 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -968,7 +920,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1025 "regex.h2"
+#line 994 "regex.h2"
 };
 
 class group_name_list_end {
@@ -977,7 +929,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1029 "regex.h2"
+#line 998 "regex.h2"
 };
 
 // Regular expression implementation
@@ -993,7 +945,7 @@ template matched_, context const& ctx_);
 
-#line 1047 "regex.h2"
+#line 1016 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1008,7 +960,7 @@ template void = delete;
 
 
-#line 1063 "regex.h2"
+#line 1032 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1016,13 +968,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1075 "regex.h2"
+#line 1044 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1097 "regex.h2"
+#line 1066 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1034,7 +986,7 @@ template void = delete;
 
 
-#line 1110 "regex.h2"
+#line 1079 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1065,15 +1017,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1144 "regex.h2"
+#line 1113 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1150 "regex.h2"
+#line 1119 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1159 "regex.h2"
+#line 1128 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1086,13 +1038,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1177 "regex.h2"
+#line 1146 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1182 "regex.h2"
+#line 1151 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1187 "regex.h2"
+#line 1156 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1114,147 +1066,147 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1212 "regex.h2"
+#line 1181 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1221 "regex.h2"
+#line 1190 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1225 "regex.h2"
+#line 1194 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1240 "regex.h2"
+#line 1209 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1246 "regex.h2"
+#line 1215 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1287 "regex.h2"
+#line 1256 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1299 "regex.h2"
+#line 1268 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1305 "regex.h2"
+#line 1274 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1312 "regex.h2"
+#line 1281 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1321 "regex.h2"
+#line 1290 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1329 "regex.h2"
+#line 1298 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1339 "regex.h2"
+#line 1308 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1363 "regex.h2"
+#line 1332 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1379 "regex.h2"
+#line 1348 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1399 "regex.h2"
+#line 1368 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1406 "regex.h2"
+#line 1375 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1418 "regex.h2"
+#line 1387 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1421 "regex.h2"
+#line 1390 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1431 "regex.h2"
+#line 1400 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1449 "regex.h2"
+#line 1418 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1459 "regex.h2"
+#line 1428 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1472 "regex.h2"
+#line 1441 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1508 "regex.h2"
+#line 1477 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1573 "regex.h2"
+#line 1542 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1584 "regex.h2"
+#line 1553 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1597 "regex.h2"
+#line 1566 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1605 "regex.h2"
+#line 1574 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1712 "regex.h2"
+#line 1681 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1879 "regex.h2"
+#line 1848 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2011 "regex.h2"
+#line 1980 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2018 "regex.h2"
+#line 1987 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2081 "regex.h2"
+#line 2050 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2117 "regex.h2"
+#line 2086 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2139 "regex.h2"
+#line 2108 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2153 "regex.h2"
+#line 2122 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2162 "regex.h2"
+#line 2131 "regex.h2"
 }
 }
 
@@ -1425,159 +1377,123 @@ namespace regex {
     }
 
 #line 196 "regex.h2"
-    template  [[nodiscard]] auto match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
+    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return match_select(cur, ctx, modifiers, end_func);  }
 
 #line 198 "regex.h2"
-    template  template [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
-        return First::match(cur, ctx, modifiers, match_tail());  }
-#line 200 "regex.h2"
-    template  [[nodiscard]] auto match_tail::match_select(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
+    template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { 
+        return match_select(cur, ctx, modifiers, end_func);  }
 
-#line 202 "regex.h2"
-    template  auto match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 201 "regex.h2"
+    template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { 
+        return First::match(cur, ctx, modifiers, end_func, matcher_list());  }
 #line 203 "regex.h2"
-    template  [[nodiscard]] auto match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
+    template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return end_func(cur, ctx, modifiers);  }
 
 #line 205 "regex.h2"
-    template  template [[nodiscard]] auto match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return match_tail();  }
-
-#line 207 "regex.h2"
-    template  template [[nodiscard]] auto match_tail::make_calling(Call const& call) const& -> auto { return calling_match_tail(call);  }
-
-#line 220 "regex.h2"
-    template  calling_match_tail::calling_match_tail(auto const& call_)
-        : call{ call_ }{
-
-#line 222 "regex.h2"
-    }
-#line 220 "regex.h2"
-    template  auto calling_match_tail::operator=(auto const& call_) -> calling_match_tail& {
-        call = call_;
-        return *this;
-
-#line 222 "regex.h2"
-    }
-
-#line 224 "regex.h2"
-    template  [[nodiscard]] auto calling_match_tail::match(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return match_select(cur, ctx, modifiers);  }
-
-#line 226 "regex.h2"
-    template  template [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { 
-        return First::match(cur, ctx, modifiers, calling_match_tail(call));  }
-#line 228 "regex.h2"
-    template  [[nodiscard]] auto calling_match_tail::match_select(auto const& cur, auto& ctx, auto const& modifiers) const& -> auto { return call(cur, ctx, modifiers);  }
+    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 206 "regex.h2"
+    template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 230 "regex.h2"
-    template  auto calling_match_tail::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 231 "regex.h2"
-    template  [[nodiscard]] auto calling_match_tail::to_string() -> auto { return (bstring() + ... + List::to_string());  }
+#line 208 "regex.h2"
+    template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 233 "regex.h2"
-    template  template [[nodiscard]] auto calling_match_tail::prepend([[maybe_unused]] Pre const& ...unnamed_param_2) const& -> auto { return calling_match_tail(call);  }
+#line 213 "regex.h2"
+    [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
-#line 249 "regex.h2"
+#line 227 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
-#line 250 "regex.h2"
+#line 228 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 257 "regex.h2"
+#line 235 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
-#line 258 "regex.h2"
+#line 236 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 264 "regex.h2"
+#line 242 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 265 "regex.h2"
+#line 243 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 271 "regex.h2"
+#line 249 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
-#line 272 "regex.h2"
+#line 250 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 278 "regex.h2"
+#line 256 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 279 "regex.h2"
+#line 257 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 284 "regex.h2"
+#line 262 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 290 "regex.h2"
+#line 268 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
-#line 291 "regex.h2"
+#line 269 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
 
-#line 342 "regex.h2"
-    template  [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers); }
-#line 343 "regex.h2"
+#line 320 "regex.h2"
+    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
+#line 321 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 344 "regex.h2"
+#line 322 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
 
-#line 350 "regex.h2"
-    template  [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
-        auto r {CPP2_UFCS(match)(other, cur, ctx, modifiers)}; 
+#line 329 "regex.h2"
+    template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
+        auto r {Other::match(cur, ctx, modifiers, end_func)}; 
         if (r.matched) {
             CPP2_UFCS(set_alternative_pos)(ctx, alternative, cur);
         }
         return r; 
     }
 
-#line 358 "regex.h2"
+#line 337 "regex.h2"
     template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 359 "regex.h2"
+#line 338 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
-#line 365 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { 
-        return CPP2_UFCS(match)(CPP2_UFCS(prepend)(other, List()...), cur, ctx, modifiers);  }
-
-#line 368 "regex.h2"
-    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 369 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string()); }
-
-#line 377 "regex.h2"
+#line 346 "regex.h2"
     template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
 
-#line 394 "regex.h2"
-    template  [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+#line 363 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
             auto max_current_length {0}; 
-            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail)}; 
+            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, tail)}; 
             static_cast(std::move(max_overall_length));
             static_cast(std::move(max_current_length));
             return r; 
         }else {
-            return match_first(cur, ctx, modifiers, tail); 
+            return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 406 "regex.h2"
+#line 375 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 407 "regex.h2"
+#line 376 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 409 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
-        auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, tail)}; 
+#line 378 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
+        auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
             return r; 
         }else {
             First::reset_ranges(ctx);
 
             if constexpr (0 != sizeof...(Next)) {
-                return match_first(cur, ctx, modifiers, tail); 
+                return match_first(cur, ctx, modifiers, end_func, tail); 
             }else {
                 return CPP2_UFCS(fail)(ctx); 
             }
         }
     }
 
-#line 424 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
-        auto r {CPP2_UFCS(match)(First(), cur, ctx, modifiers, CPP2_UFCS(prepend)(tail, extract_position_helper()))}; 
+#line 393 "regex.h2"
+    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
+        auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
         // Get the end position of First.
         auto end_overall_pos {cur}; 
@@ -1591,11 +1507,11 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 440 "regex.h2"
+#line 409 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, Tail());
         }
 
         auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; 
@@ -1603,13 +1519,13 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 452 "regex.h2"
+#line 421 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx), ...);  // Reset all other ranges.
-                return First::match(cur, ctx, modifiers, CPP2_UFCS(prepend)(tail, extract_position_helper())); 
+                return First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper())); 
             }
             else {
                 // We are not, so there was an other match.
@@ -1625,35 +1541,35 @@ namespace regex {
         }
     }
 
-#line 478 "regex.h2"
-    template  [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 447 "regex.h2"
+    template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
            *cpp2::assert_not_null(cur) != '\n')) {
-            return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+            return Other::match(cur + 1, ctx, modifiers, end_func); 
         }
         else {
             return CPP2_UFCS(fail)(ctx); 
         }
     }
 
-#line 489 "regex.h2"
+#line 458 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 490 "regex.h2"
+#line 459 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 496 "regex.h2"
-    template  [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
-#line 497 "regex.h2"
+#line 465 "regex.h2"
+    template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
+#line 466 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 498 "regex.h2"
+#line 467 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 505 "regex.h2"
-    template  [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 474 "regex.h2"
+    template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
-                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+                return Other::match(cur + 1, ctx, modifiers, end_func); 
             }
             else {
                 return CPP2_UFCS(fail)(ctx); 
@@ -1661,7 +1577,7 @@ namespace regex {
         }
         else {
             if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
-                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+                return Other::match(cur + 1, ctx, modifiers, end_func); 
             }
             else {
                 return CPP2_UFCS(fail)(ctx); 
@@ -1669,16 +1585,16 @@ namespace regex {
         }
 
     }
-#line 524 "regex.h2"
+#line 493 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 525 "regex.h2"
+#line 494 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 533 "regex.h2"
-    template  [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 502 "regex.h2"
+    template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
-                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+                return Other::match(cur + 1, ctx, modifiers, end_func); 
             }
             else {
                 return CPP2_UFCS(fail)(ctx); 
@@ -1686,7 +1602,7 @@ namespace regex {
         }
         else {
             if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
-                return CPP2_UFCS(match)(other, cur + 1, ctx, modifiers); 
+                return Other::match(cur + 1, ctx, modifiers, end_func); 
             }
             else {
                 return CPP2_UFCS(fail)(ctx); 
@@ -1694,7 +1610,7 @@ namespace regex {
         }
     }
 
-#line 552 "regex.h2"
+#line 521 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1707,10 +1623,10 @@ namespace regex {
         return r; 
     }
 
-#line 564 "regex.h2"
+#line 533 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 566 "regex.h2"
+#line 535 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1722,33 +1638,33 @@ namespace regex {
         return r; 
     }
 
-#line 581 "regex.h2"
-    template  [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 550 "regex.h2"
+    template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
-        return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+        return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 586 "regex.h2"
+#line 555 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 587 "regex.h2"
+#line 556 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 593 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& other) -> auto{
+#line 562 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
         }
-        return CPP2_UFCS(match)(other, cur, ctx, Modifiers::push(ModifierChange())); 
+        return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 600 "regex.h2"
+#line 569 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 606 "regex.h2"
+#line 575 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1771,22 +1687,22 @@ namespace regex {
         }
     }
 
-#line 630 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto{
+#line 599 "regex.h2"
+    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
         }
-        auto r {CPP2_UFCS(match)(other, cur, ctx, Modifier::pop())}; 
+        auto r {Other::match(cur, ctx, Modifier::pop(), end_func)}; 
         if (!(r.matched) && -1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
         return r; 
     }
 
-#line 641 "regex.h2"
+#line 610 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 643 "regex.h2"
+#line 612 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -1796,15 +1712,15 @@ namespace regex {
         }
     }
 
-#line 654 "regex.h2"
-    template  [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto { return CPP2_UFCS(match)(other, cur, ctx, modifiers);  }
-#line 655 "regex.h2"
+#line 623 "regex.h2"
+    template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
+#line 624 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 656 "regex.h2"
+#line 625 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 662 "regex.h2"
-    template  [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 631 "regex.h2"
+    template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
         auto pos {cur}; 
@@ -1823,98 +1739,98 @@ namespace regex {
         }
 
         if (std::move(group_pos) == std::move(g).end) {
-            return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); 
+            return Other::match(std::move(pos), ctx, modifiers, end_func); 
         }
         else {
             return CPP2_UFCS(fail)(ctx); 
         }
 
     }
-#line 688 "regex.h2"
+#line 657 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 689 "regex.h2"
+#line 658 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 696 "regex.h2"
-    template  [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 665 "regex.h2"
+    template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
-            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+            return Other::match(cur, ctx, modifiers, end_func); 
         }
         else {if (match_new_line_before_end && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end.
-            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+            return Other::match(cur, ctx, modifiers, end_func); 
         }
         else {
             return CPP2_UFCS(fail)(ctx); 
         }}
     }
 
-#line 708 "regex.h2"
+#line 677 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 709 "regex.h2"
+#line 678 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 716 "regex.h2"
-    template  [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 685 "regex.h2"
+    template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
-            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+            return Other::match(cur, ctx, modifiers, end_func); 
         }
         else {
             return CPP2_UFCS(fail)(ctx); 
         }
 
     }
-#line 725 "regex.h2"
+#line 694 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 726 "regex.h2"
+#line 695 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 733 "regex.h2"
-    template  [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
-        auto r {Pattern::match(cur, ctx, modifiers, no_tail())}; 
+#line 702 "regex.h2"
+    template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
+        auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
         if (!(positive)) {
             r.matched = !(r.matched);
         }
 
         if (std::move(r).matched) {
-            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+            return Other::match(cur, ctx, modifiers, end_func); 
         }
         else {
             return CPP2_UFCS(fail)(ctx); 
         }
 
     }
-#line 748 "regex.h2"
+#line 717 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 749 "regex.h2"
+#line 718 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 756 "regex.h2"
-    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& other) -> auto{
-        return CPP2_UFCS(match)(other, cur, ctx, Modifier::replace(ModifierChange())); 
+#line 725 "regex.h2"
+    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
+        return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 759 "regex.h2"
+#line 728 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 760 "regex.h2"
+#line 729 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 794 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& tail) -> auto{
+#line 763 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
-            return match_possessive(cur, ctx, modifiers, tail); 
+            return match_possessive(cur, ctx, modifiers, end_func, tail); 
         }
         else {if (range_flags::greedy == kind) {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, tail); 
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, end_func, tail); 
         }
         else { // range_flags::not_greedy == kind
-            return match_not_greedy(cur, ctx, modifiers, tail); 
+            return match_not_greedy(cur, ctx, modifiers, end_func, tail); 
         }}
     }
 
-#line 806 "regex.h2"
+#line 775 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 808 "regex.h2"
+#line 777 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
@@ -1941,32 +1857,32 @@ namespace regex {
       return r; 
     }
 
-#line 834 "regex.h2"
+#line 803 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 839 "regex.h2"
+#line 808 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 844 "regex.h2"
+#line 813 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 850 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+#line 819 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
 
         while( is_below_lower_bound(count) && res.matched ) {
-            res = M::match(res.pos, ctx, modifiers, no_tail());
+            res = M::match(res.pos, ctx, modifiers, end_func, no_tail());
             if (res.matched) {
                 count += 1;
             }
@@ -1976,28 +1892,28 @@ namespace regex {
         return res; 
     }
 
-#line 865 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
-        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (&other)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
-            return match_greedy(_0, tail_cur, _1, tail_ctx, tail_modifiers, *cpp2::assert_not_null(_2)); 
+#line 834 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{
+        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (end_func)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
+            return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, Other()); 
         }}; 
         auto is_m_valid {true}; 
         auto r {CPP2_UFCS(fail)(ctx)}; 
         if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = CPP2_UFCS(match)(CPP2_UFCS(make_calling)(match_tail(), std::move(inner_call)), cur, ctx, modifiers);
+            r = M::match(cur, ctx, modifiers, std::move(inner_call), no_tail());
         }
 
         if (!(r.matched) && is_in_range(count)) {
             // The recursion did not yield a match try now the tail
-            r = CPP2_UFCS(match)(other, cur, ctx, modifiers);
+            r = Other::match(cur, ctx, modifiers, end_func);
 
             if (r.matched && !(std::move(is_m_valid))) {
                 // We have a match rematch M if required
                 M::reset_ranges(ctx);
 
                 if (cpp2::cmp_greater(count,0)) {
-                    static_cast(M::match(last_valid, ctx, modifiers, no_tail()));
+                    static_cast(M::match(last_valid, ctx, modifiers, end_func, no_tail()));
                 }
             }
         }
@@ -2005,10 +1921,10 @@ namespace regex {
         return r; 
     }
 
-#line 893 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+#line 862 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
-        auto r {match_min_count(cur, ctx, modifiers, count)}; 
+        auto r {match_min_count(cur, ctx, modifiers, end_func, count)}; 
 
         if (!(r.matched)) {
           return r; 
@@ -2016,7 +1932,7 @@ namespace regex {
 
         auto pos {r.pos}; 
         while( r.matched && is_below_upper_bound(count) ) {
-            r = M::match(pos, ctx, modifiers, no_tail());
+            r = M::match(pos, ctx, modifiers, true_end_func(), no_tail());
 
             if (pos == r.pos) {
                 break; // Break infinite loop.
@@ -2027,25 +1943,25 @@ namespace regex {
             }
         }
 
-        return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); 
+        return Other::match(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 917 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& other) -> match_return{
+#line 886 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
-        auto start {match_min_count(cur, ctx, modifiers, count)}; 
+        auto start {match_min_count(cur, ctx, modifiers, end_func, count)}; 
         if (!(start.matched)) {
           return start; 
         }
 
         auto pos {std::move(start).pos}; 
         while( is_below_upper_bound(count) ) {
-            auto o {CPP2_UFCS(match)(other, pos, ctx, modifiers)}; 
+            auto o {Other::match(pos, ctx, modifiers, end_func)}; 
             if (o.matched) {
                 return o; 
             }
 
-            auto r {M::match(pos, ctx, modifiers, no_tail())}; 
+            auto r {M::match(pos, ctx, modifiers, end_func, no_tail())}; 
             if (!(r.matched)) {
                 return CPP2_UFCS(fail)(ctx); 
             }
@@ -2053,10 +1969,10 @@ namespace regex {
             pos = std::move(r).pos;
         }
 
-        return CPP2_UFCS(match)(other, std::move(pos), ctx, modifiers); // Upper bound reached.
+        return Other::match(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 947 "regex.h2"
+#line 916 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (kind == range_flags::not_greedy) {
@@ -2069,8 +1985,8 @@ namespace regex {
         return r; 
     }
 
-#line 966 "regex.h2"
-    template  [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& other) -> auto{
+#line 935 "regex.h2"
+    template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
         if (cur == ctx.begin) {// String start
@@ -2092,16 +2008,16 @@ namespace regex {
         }
 
         if (std::move(is_match)) {
-            return CPP2_UFCS(match)(other, cur, ctx, modifiers); 
+            return Other::match(cur, ctx, modifiers, end_func); 
         }
         else {
             return CPP2_UFCS(fail)(ctx); 
         }
 
     }
-#line 995 "regex.h2"
+#line 964 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 996 "regex.h2"
+#line 965 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2110,7 +2026,7 @@ namespace regex {
         }
     }
 
-#line 1017 "regex.h2"
+#line 986 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2120,34 +2036,34 @@ namespace regex {
         }
     }
 
-#line 1028 "regex.h2"
+#line 997 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1042 "regex.h2"
+#line 1011 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1045 "regex.h2"
+#line 1014 "regex.h2"
         }
 
-#line 1047 "regex.h2"
+#line 1016 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1048 "regex.h2"
+#line 1017 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1049 "regex.h2"
+#line 1018 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1050 "regex.h2"
+#line 1019 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1052 "regex.h2"
+#line 1021 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1053 "regex.h2"
+#line 1022 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1054 "regex.h2"
+#line 1023 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1056 "regex.h2"
+#line 1025 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2156,34 +2072,34 @@ namespace regex {
             return group_id; 
         }
 
-#line 1065 "regex.h2"
+#line 1034 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1066 "regex.h2"
+#line 1035 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1067 "regex.h2"
+#line 1036 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1068 "regex.h2"
+#line 1037 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
-        auto r {CPP2_UFCS(match)(Matcher(), start, ctx, modifiers(), no_tail())}; 
+        auto r {Matcher::match(start, ctx, modifiers(), true_end_func())}; 
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1075 "regex.h2"
+#line 1044 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1076 "regex.h2"
+#line 1045 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1077 "regex.h2"
+#line 1046 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1078 "regex.h2"
+#line 1047 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
 
         auto cur {start}; 
         for( ; true; (++cur) ) {
-            if (CPP2_UFCS(match)(Matcher(), cur, ctx, modifiers(), no_tail()).matched) {
+            if (Matcher::match(cur, ctx, modifiers(), true_end_func()).matched) {
                 matched = true;
                 break;
             }
@@ -2196,10 +2112,10 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1097 "regex.h2"
+#line 1066 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1102 "regex.h2"
+#line 1071 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2209,24 +2125,24 @@ namespace regex {
         }
     }
 
-#line 1138 "regex.h2"
+#line 1107 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1144 "regex.h2"
+#line 1113 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1150 "regex.h2"
+#line 1119 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1152 "regex.h2"
+#line 1121 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2234,10 +2150,10 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1159 "regex.h2"
+#line 1128 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1169 "regex.h2"
+#line 1138 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2246,29 +2162,29 @@ namespace regex {
         return g; 
     }
 
-#line 1177 "regex.h2"
+#line 1146 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1182 "regex.h2"
+#line 1151 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1206 "regex.h2"
+#line 1175 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1210 "regex.h2"
+#line 1179 "regex.h2"
     }
 
-#line 1214 "regex.h2"
+#line 1183 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2276,12 +2192,12 @@ namespace regex {
         return old_state; 
     }
 
-#line 1221 "regex.h2"
+#line 1190 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1228 "regex.h2"
+#line 1197 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2294,14 +2210,14 @@ namespace regex {
         return old_state; 
     }
 
-#line 1240 "regex.h2"
+#line 1209 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1249 "regex.h2"
+#line 1218 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2340,7 +2256,7 @@ namespace regex {
         return cur; 
     }
 
-#line 1287 "regex.h2"
+#line 1256 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2353,14 +2269,14 @@ namespace regex {
         }
     }
 
-#line 1299 "regex.h2"
+#line 1268 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1300 "regex.h2"
+#line 1269 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1301 "regex.h2"
+#line 1270 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1305 "regex.h2"
+#line 1274 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2368,7 +2284,7 @@ namespace regex {
         return r; 
     }
 
-#line 1312 "regex.h2"
+#line 1281 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2378,7 +2294,7 @@ namespace regex {
         return r; 
     }
 
-#line 1321 "regex.h2"
+#line 1290 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2387,7 +2303,7 @@ namespace regex {
         }
     }
 
-#line 1329 "regex.h2"
+#line 1298 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2398,12 +2314,12 @@ namespace regex {
         }
     }
 
-#line 1339 "regex.h2"
+#line 1308 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1340 "regex.h2"
+#line 1309 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1342 "regex.h2"
+#line 1311 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2425,14 +2341,14 @@ namespace regex {
         }
     }
 
-#line 1363 "regex.h2"
+#line 1332 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1364 "regex.h2"
+#line 1333 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1365 "regex.h2"
+#line 1334 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1367 "regex.h2"
+#line 1336 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2445,7 +2361,7 @@ namespace regex {
         }
     }
 
-#line 1379 "regex.h2"
+#line 1348 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2466,13 +2382,13 @@ namespace regex {
         return std::move(r.value()); 
     }
 
-#line 1401 "regex.h2"
+#line 1370 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1406 "regex.h2"
+#line 1375 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2485,10 +2401,10 @@ namespace regex {
         return r; 
     }
 
-#line 1418 "regex.h2"
+#line 1387 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1424 "regex.h2"
+#line 1393 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2496,10 +2412,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1431 "regex.h2"
+#line 1400 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1433 "regex.h2"
+#line 1402 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -2516,7 +2432,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1449 "regex.h2"
+#line 1418 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2527,7 +2443,7 @@ namespace regex {
         return r; 
     }
 
-#line 1461 "regex.h2"
+#line 1430 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -2539,7 +2455,7 @@ namespace regex {
         return true; 
     }
 
-#line 1472 "regex.h2"
+#line 1441 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2576,7 +2492,7 @@ namespace regex {
         return r; 
     }
 
-#line 1508 "regex.h2"
+#line 1477 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2642,7 +2558,7 @@ namespace regex {
         return true; 
     }
 
-#line 1576 "regex.h2"
+#line 1545 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2651,7 +2567,7 @@ namespace regex {
         return true; 
     }
 
-#line 1584 "regex.h2"
+#line 1553 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2665,7 +2581,7 @@ namespace regex {
         return false; 
     }
 
-#line 1597 "regex.h2"
+#line 1566 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -2674,7 +2590,7 @@ namespace regex {
 
     }
 
-#line 1605 "regex.h2"
+#line 1574 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2782,7 +2698,7 @@ namespace regex {
         return true; 
     }
 
-#line 1712 "regex.h2"
+#line 1681 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2950,7 +2866,7 @@ namespace regex {
         return true; 
     }
 
-#line 1879 "regex.h2"
+#line 1848 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3083,7 +2999,7 @@ namespace regex {
         return true; 
     }
 
-#line 2011 "regex.h2"
+#line 1980 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3091,7 +3007,7 @@ namespace regex {
         return true; 
     }
 
-#line 2018 "regex.h2"
+#line 1987 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3155,7 +3071,7 @@ namespace regex {
         return true; 
     }
 
-#line 2081 "regex.h2"
+#line 2050 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3192,7 +3108,7 @@ namespace regex {
         return true; 
     }
 
-#line 2117 "regex.h2"
+#line 2086 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3215,7 +3131,7 @@ namespace regex {
         }
     }
 
-#line 2139 "regex.h2"
+#line 2108 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_until('\0');
@@ -3230,7 +3146,7 @@ namespace regex {
         return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(cur_branch_reset_state.cur_group) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2155 "regex.h2"
+#line 2124 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index ecb16ec7cf..c0218b7a5f 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -169,7 +169,7 @@ match_modifiers_no_change : type == match_modifiers_state_change type = {
+match_modifiers: @struct  type = {
 
     flags : int == flags_;
 
@@ -192,48 +192,26 @@ match_modifiers:  type = {
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
 //  Otherwise the matcher can try a different alternative.
 //
-match_tail:  type = {
-    match: (this, cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
-
-    private match_select:  (this, cur, inout ctx, modifiers)
-        First::match(cur, ctx, modifiers, match_tail());
-    private match_select: (this, cur, inout ctx, _) ctx.pass(cur);
-
-    reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
-    to_string: () (bstring() + ... + List::to_string());
-
-    prepend:  (this, _...: Pre) match_tail();
-
-    make_calling:  (this, call: Call) calling_match_tail(call);
-}
-
-//  Represents the remainder of the regular expression. Will call a function wen the end is reached.
-//
-//  TODO: Create common base with match_tail.
-//
-//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
-//  Otherwise the matcher can try a different alternative.
-//
-calling_match_tail:  type = {
-    call: Call;
-
-    operator=: (out this, call_) = {
-        call = call_;
-    }
+matcher_list:  type = {
+    match: (cur, inout ctx, modifiers, end_func) match_select(cur, ctx, modifiers, end_func);
 
-    match: (this, cur, inout ctx, modifiers) match_select(cur, ctx, modifiers);
+    match:  (cur, inout ctx, modifiers, end_func, _: matcher_list)
+        match_select(cur, ctx, modifiers, end_func);
 
-    private match_select:  (this, cur, inout ctx, modifiers)
-        First::match(cur, ctx, modifiers, calling_match_tail(call));
-    private match_select: (this, cur, inout ctx, modifiers) call(cur, ctx, modifiers);
+    private match_select:  (cur, inout ctx, modifiers, end_func)
+        First::match(cur, ctx, modifiers, end_func, matcher_list());
+    private match_select: (cur, inout ctx, modifiers, end_func) end_func(cur, ctx, modifiers);
 
     reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
     to_string: () (bstring() + ... + List::to_string());
 
-    prepend:  (this, _...: Pre) calling_match_tail(call);
+    prepend: 
 (_ : Pre) matcher_list();
 }
 
-no_tail:  type == match_tail;
+no_tail:  type == matcher_list;
+true_end_func: @struct type = {
+    operator(): (in this, cur, inout ctx, _) ctx.pass(cur);
+}
 
 //-----------------------------------------------------------------------
 //
@@ -339,16 +317,17 @@ short_not_word_class       :  type == negated_class_entry type = {
-    match:        (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
-    reset_ranges: (_) = {}
-    to_string:    () bstring();
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) Other::match(cur, ctx, modifiers, end_func);
+    reset_ranges:  (_) = {}
+    to_string:     ()  bstring();
 }
 
+
 // Helper for greedy alternatives
 //
 extract_position_helper:  type = {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
-        r := other.match(cur, ctx, modifiers);
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
+        r := Other::match(cur, ctx, modifiers, end_func);
         if r.matched {
             ctx.set_alternative_pos(alternative, cur);
         }
@@ -359,16 +338,6 @@ extract_position_helper:  type = {
     to_string:    () bstring();
 }
 
-// A list of matchers. Prepends to the current match tail.
-//
-matcher_list:  type = {
-    match: (cur, inout ctx, modifiers, other)
-        other.prepend(List()...).match(cur, ctx, modifiers);
-
-    reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
-    to_string:    () (bstring() + ... + List::to_string());
-}
-
 // Helper for standard matchers with special syntax
 //
 //
@@ -391,38 +360,38 @@ special_syntax_wrapper:  type = {
 //
 alternative_matcher_logic:  type = {
 
-    match: (cur, inout ctx, modifiers, tail) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, tail: Tail) -> _ = {
         if constexpr greedy_alternative {
             max_overall_length: = 0;
             max_current_length: = 0;
-            r := match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
+            r := match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, tail);
             _ = max_overall_length;
             _ = max_current_length;
             return r;
         } else {
-            return match_first(cur, ctx, modifiers, tail);
+            return match_first(cur, ctx, modifiers, end_func, tail);
         }
     }
     reset_ranges: (inout ctx)     = (List::reset_ranges(ctx) , ...);
     to_string: ()                   (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'.
 
-    private match_first:  (cur, inout ctx, modifiers, tail) -> _ = {
-        r := First().match(cur, ctx, modifiers, tail);
+    private match_first:  (cur, inout ctx, modifiers, end_func, tail) -> _ = {
+        r := First::match(cur, ctx, modifiers, end_func, tail);
         if r.matched {
             return r;
         } else {
             First::reset_ranges(ctx);
 
             if constexpr 0 != sizeof...(Next) {
-                return match_first(cur, ctx, modifiers, tail);
+                return match_first(cur, ctx, modifiers, end_func, tail);
             } else {
                 return ctx.fail();
             }
         }
     }
 
-    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, modifiers, tail) -> _ = {
-        r := First().match(cur, ctx, modifiers, tail.prepend(extract_position_helper()));
+    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, modifiers, end_func, _: Tail) -> _ = {
+        r := First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()));
 
         // Get the end position of First.
         end_overall_pos := cur;
@@ -440,7 +409,7 @@ alternative_matcher_logic:  type = {
         // Check if someone other has something larker
         o := ctx.fail();
         if constexpr 0 != sizeof...(Next) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, tail);
+            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, Tail());
         }
 
         my_current_length := unsafe_narrow(std::distance(cur, end_current_pos));
@@ -454,7 +423,7 @@ alternative_matcher_logic:  type = {
             if my_current_length == max_current_length {
                 // Yes we are. Reset all groups by matching again.
                 (Next::reset_ranges(ctx) , ...); // Reset all other ranges.
-                return First::match(cur, ctx, modifiers, tail.prepend(extract_position_helper()));
+                return First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()));
             }
             else {
                 // We are not, so there was an other match.
@@ -475,11 +444,11 @@ alternative_matcher_logic:  type = {
 //
 any_matcher_logic:  type =
 {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         if cur != ctx.end &&
           (modifiers.has_flag(expression_flags::single_line) ||
            cur* != '\n') {
-            return other.match(cur + 1, ctx, modifiers);
+            return Other::match(cur + 1, ctx, modifiers, end_func);
         }
         else {
             return ctx.fail();
@@ -493,7 +462,7 @@ any_matcher_logic:  type =
 // Regex syntax: none Example: -
 //
 branch_reset_matcher_logic:  type = {
-    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) Other::match(cur, ctx, modifiers, end_func);
     reset_ranges: (_) = {}
     to_string:    ()  bstring("(?|");
 }
@@ -502,10 +471,10 @@ branch_reset_matcher_logic:  type = {
 //
 char_matcher_logic:  type =
 {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         if modifiers.has_flag(expression_flags::case_insensitive) {
             if cur != ctx.end && (cur* == L || cur* == U) {
-                return other.match(cur + 1, ctx, modifiers);
+                return Other::match(cur + 1, ctx, modifiers, end_func);
             }
             else {
                 return ctx.fail();
@@ -513,7 +482,7 @@ char_matcher_logic:  type =
         }
         else {
             if cur != ctx.end && cur* == C {
-                return other.match(cur + 1, ctx, modifiers);
+                return Other::match(cur + 1, ctx, modifiers, end_func);
             }
             else {
                 return ctx.fail();
@@ -530,10 +499,10 @@ char_matcher_logic:  type =
 //
 class_matcher_logic:  type =
 {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         if modifiers.has_flag(expression_flags::case_insensitive) {
             if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
-                return other.match(cur + 1, ctx, modifiers);
+                return Other::match(cur + 1, ctx, modifiers, end_func);
             }
             else {
                 return ctx.fail();
@@ -541,7 +510,7 @@ class_matcher_logic:  type =
         }
         else {
             if cur != ctx.end && negate != match_any(cur*) {
-                return other.match(cur + 1, ctx, modifiers);
+                return Other::match(cur + 1, ctx, modifiers, end_func);
             }
             else {
                 return ctx.fail();
@@ -578,9 +547,9 @@ class_matcher_logic:  type =
 // Regex syntax: \K Example: \K
 //
 global_group_reset:  type = {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         ctx.set_group_start(0, cur);
-        return other.match(cur, ctx, modifiers);
+        return Other::match(cur, ctx, modifiers, end_func);
     }
 
     reset_ranges: (_) = {}
@@ -590,11 +559,11 @@ global_group_reset:  type = {
 // Regex syntax: () Example: (.*)
 //
 group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, _ : Modifiers, other) -> _ = {
+    match:  (cur, inout ctx, _ : Modifiers, end_func, _ : Other) -> _ = {
         if -1 != group {
             ctx.set_group_start(group, cur);
         }
-        return other.match(cur, ctx, Modifiers::push(ModifierChange()));
+        return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func);
     }
 
     reset_ranges: (inout ctx) = {
@@ -627,11 +596,11 @@ group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, _: Modifier, other) -> _ = {
+    match:  (cur, inout ctx, _: Modifier, end_func, _ : Other) -> _ = {
         if -1 != group {
             ctx.set_group_end(group, cur);
         }
-        r := other.match(cur, ctx, Modifier::pop());
+        r := Other::match(cur, ctx, Modifier::pop(), end_func);
         if !r.matched && -1 != group {
             ctx.set_group_invalid(group);
         }
@@ -651,7 +620,7 @@ group_matcher_end_logic:  type = {
 }
 
 special_group_end_logic:  type = {
-    match: (cur, inout ctx, modifiers, other) other.match(cur, ctx, modifiers);
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) Other::match(cur, ctx, modifiers, end_func);
     reset_ranges: (_) = {}
     to_string:    ()  bstring(")");
 }
@@ -659,7 +628,7 @@ special_group_end_logic:  type = {
 // Regex syntax: \  Example: \1
 //
 group_ref_matcher_logic:  type = {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         g := ctx.get_group(group);
 
         pos := cur;
@@ -678,7 +647,7 @@ group_ref_matcher_logic:  type = {
         }
 
         if group_pos == g.end {
-            return other.match(pos, ctx, modifiers);
+            return Other::match(pos, ctx, modifiers, end_func);
         }
         else {
             return ctx.fail();
@@ -693,12 +662,12 @@ group_ref_matcher_logic:  type = {
 //
 line_end_matcher_logic:  type =
 {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         if cur == ctx.end || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines) && cur* == '\n') {
-            return other.match(cur, ctx, modifiers);
+            return Other::match(cur, ctx, modifiers, end_func);
         }
         else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end.
-            return other.match(cur, ctx, modifiers);
+            return Other::match(cur, ctx, modifiers, end_func);
         }
         else {
             return ctx.fail();
@@ -713,9 +682,9 @@ line_end_matcher_logic:  type =
 {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         if cur == ctx.begin || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n') {
-            return other.match(cur, ctx, modifiers);
+            return Other::match(cur, ctx, modifiers, end_func);
         }
         else {
             return ctx.fail();
@@ -730,15 +699,15 @@ line_start_matcher_logic:  type =
 //
 lookahead_matcher_logic:  type =
 {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
-        r := Pattern::match(cur, ctx, modifiers, no_tail());
+    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
+        r := Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail());
 
         if !positive {
             r.matched = !r.matched;
         }
 
         if r.matched {
-            return other.match(cur, ctx, modifiers);
+            return Other::match(cur, ctx, modifiers, end_func);
         }
         else {
             return ctx.fail();
@@ -753,8 +722,8 @@ lookahead_matcher_logic:  ty
 //
 modifier_matcher_logic:  type =
 {
-    match:  (cur, inout ctx, _: Modifier, other) -> _ = {
-        return other.match(cur, ctx, Modifier::replace(ModifierChange()));
+    match:  (cur, inout ctx, _: Modifier, end_func, _ : Other) -> _ = {
+        return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func);
     }
     reset_ranges: (_) = {}
     to_string:    ()  "(?(ModifierChange::to_string())$)";
@@ -791,15 +760,15 @@ named_string_start:  type == special_syntax_wrapper{min, max}  Example: a{2,4}
 range_matcher_logic:  type = {
 
-    match:  (cur: Iter, inout ctx, modifiers, tail) -> _ = {
+    match:  (cur: Iter, inout ctx, modifiers, end_func, tail) -> _ = {
         if range_flags::possessive == kind {
-            return match_possessive(cur, ctx, modifiers, tail);
+            return match_possessive(cur, ctx, modifiers, end_func, tail);
         }
         else if range_flags::greedy == kind {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, tail);
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, end_func, tail);
         }
         else { // range_flags::not_greedy == kind
-            return match_not_greedy(cur, ctx, modifiers, tail);
+            return match_not_greedy(cur, ctx, modifiers, end_func, tail);
         }
     }
 
@@ -847,12 +816,12 @@ range_matcher_logic:  type
         return true;
     }
 
-    private match_min_count:  (cur: Iter, inout ctx, modifiers, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
+    private match_min_count:  (cur: Iter, inout ctx, modifiers, end_func, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
         res := ctx.pass(cur);
         count := 0;
 
         while is_below_lower_bound(count) && res.matched {
-            res = M::match(res.pos, ctx, modifiers, no_tail());
+            res = M::match(res.pos, ctx, modifiers, end_func, no_tail());
             if res.matched {
                 count += 1;
             }
@@ -862,27 +831,27 @@ range_matcher_logic:  type
         return res;
     }
 
-    private match_greedy: (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, other) -> match_return = {
-        inner_call := :(tail_cur, inout tail_ctx, tail_modifiers) -> _ == {
-            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, tail_modifiers, (other&)$*);
+    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, end_func, _ : Other) -> match_return = {
+        inner_call := :(tail_cur, inout tail_ctx, _ /* ignore new modifiers */) -> _ == {
+            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (modifiers)$, (end_func)$, Other());
         };
         is_m_valid := true;
         r := ctx.fail();
         if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = match_tail().make_calling(inner_call).match(cur, ctx, modifiers);
+            r = M::match(cur, ctx, modifiers, inner_call, no_tail());
         }
 
         if !r.matched && is_in_range(count) {
             // The recursion did not yield a match try now the tail
-            r = other.match(cur, ctx, modifiers);
+            r = Other::match(cur, ctx, modifiers, end_func);
 
             if r.matched && !is_m_valid{
                 // We have a match rematch M if required
                 M::reset_ranges(ctx);
 
                 if count > 0 {
-                    _ = M::match(last_valid, ctx, modifiers, no_tail());
+                    _ = M::match(last_valid, ctx, modifiers, end_func, no_tail());
                 }
             }
         }
@@ -890,9 +859,9 @@ range_matcher_logic:  type
         return r;
     }
 
-    private match_possessive: (cur: Iter, inout ctx, modifiers, other) -> match_return = {
+    private match_possessive:  (cur: Iter, inout ctx, modifiers, end_func, _ : Other) -> match_return = {
         count :=0;
-        r := match_min_count(cur, ctx, modifiers, count);
+        r := match_min_count(cur, ctx, modifiers, end_func, count);
 
         if !r.matched {
           return r;
@@ -900,7 +869,7 @@ range_matcher_logic:  type
 
         pos := r.pos;
         while r.matched && is_below_upper_bound(count) {
-            r = M::match(pos, ctx, modifiers, no_tail());
+            r = M::match(pos, ctx, modifiers, true_end_func(), no_tail());
 
             if pos == r.pos {
                 break; // Break infinite loop.
@@ -911,24 +880,24 @@ range_matcher_logic:  type
             }
         }
 
-        return other.match(pos, ctx, modifiers);
+        return Other::match(pos, ctx, modifiers, end_func);
     }
 
-    private match_not_greedy: (cur: Iter, inout ctx, modifiers, other) -> match_return = {
+    private match_not_greedy:  (cur: Iter, inout ctx, modifiers, end_func, _ : Other) -> match_return = {
         count := 0;
-        start := match_min_count(cur, ctx, modifiers, count);
+        start := match_min_count(cur, ctx, modifiers, end_func, count);
         if !start.matched {
           return start;
         }
 
         pos := start.pos;
         while is_below_upper_bound(count) {
-            o:= other.match(pos, ctx, modifiers);
+            o:= Other::match(pos, ctx, modifiers, end_func);
             if o.matched {
                 return o;
             }
 
-            r:= M::match(pos, ctx, modifiers, no_tail());
+            r:= M::match(pos, ctx, modifiers, end_func, no_tail());
             if !r.matched {
                 return ctx.fail();
             }
@@ -936,7 +905,7 @@ range_matcher_logic:  type
             pos = r.pos;
         }
 
-        return other.match(pos, ctx, modifiers); // Upper bound reached.
+        return Other::match(pos, ctx, modifiers, end_func); // Upper bound reached.
     }
 }
 
@@ -963,7 +932,7 @@ special_range_matcher_logic:  type =
 {
-    match: (cur, inout ctx, modifiers, other) -> _ = {
+    match:  (cur, inout ctx, modifiers, end_func, _: Other) -> _ = {
         words : word_class = ();
         is_match := false;
         if cur == ctx.begin { // String start
@@ -985,7 +954,7 @@ word_boundary_matcher_logic:  type =
         }
 
         if is_match{
-            return other.match(cur, ctx, modifiers);
+            return Other::match(cur, ctx, modifiers, end_func);
         }
         else {
             return ctx.fail();
@@ -1068,7 +1037,7 @@ regular_expression:  (in this, start: Iter, end: Iter) -> search_return = {
         ctx: context = (start, end);
 
-        r := Matcher().match(start, ctx, modifiers(), no_tail());
+        r := Matcher::match(start, ctx, modifiers(), true_end_func());
         return search_return(r.matched && r.pos == end, ctx);
     }
 
@@ -1081,7 +1050,7 @@ regular_expression: ()).matched {
+            if Matcher::match(cur, ctx, modifiers(), true_end_func()).matched {
                 matched = true;
                 break;
             }

From ddf291d5ae18c6c9fa3625ab43c98078fc8f6acc Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 2 May 2024 12:17:29 +0200
Subject: [PATCH 094/161] Added first conversion to matcher generator.

---
 include/cpp2regex.h | 387 ++++++++++++++++++++++++++++++++------------
 source/reflect.h    |  13 +-
 source/reflect.h2   |   3 +-
 source/regex.h2     | 119 +++++++++++++-
 4 files changed, 410 insertions(+), 112 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 8ce06bfe7a..0343c55c39 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -157,21 +157,24 @@ class group_name_list_end;
 #line 1001 "regex.h2"
 template class regular_expression;
 
-#line 1090 "regex.h2"
+#line 1082 "regex.h2"
+template class regular_expression_with_matcher;
+
+#line 1171 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1097 "regex.h2"
+#line 1178 "regex.h2"
 class regex_parser_group_state;
 
-#line 1132 "regex.h2"
+#line 1213 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1159 "regex.h2"
+#line 1240 "regex.h2"
 template class regex_parser;
 
-#line 2131 "regex.h2"
+#line 2244 "regex.h2"
 }
 }
 
@@ -989,6 +992,63 @@ template class regular_expression_with_matcher {
+
+    public: template using context = match_context;
+    public: using modifiers = match_modifiers;
+
+    // TODO: Named multiple return has problems with templates.
+    public: template class search_return {
+        public: bool matched;
+        public: context ctx;
+
+        public: explicit search_return(cpp2::in matched_, context const& ctx_);
+
+#line 1097 "regex.h2"
+        public: [[nodiscard]] auto group_number() const& -> auto;
+        public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
+        public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
+        public: [[nodiscard]] auto group_end(cpp2::in g) const& -> auto;
+
+        public: [[nodiscard]] auto group(cpp2::in> g) const& -> auto;
+        public: [[nodiscard]] auto group_start(cpp2::in> g) const& -> auto;
+        public: [[nodiscard]] auto group_end(cpp2::in> g) const& -> auto;
+
+        private: [[nodiscard]] auto get_group_id(cpp2::in> g) const& -> auto;
+        public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(search_return const&) -> void = delete;
+
+
+#line 1113 "regex.h2"
+    };
+
+    public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
+    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start) const& -> auto;
+    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
+    public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
+
+#line 1125 "regex.h2"
+    public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
+    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
+    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
+    public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
+
+#line 1147 "regex.h2"
+    public: [[nodiscard]] auto to_string() const& -> auto;
+
+    // Helper functions
+    //
+
+    private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
+    public: regular_expression_with_matcher() = default;
+    public: regular_expression_with_matcher(regular_expression_with_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
+
+
+#line 1160 "regex.h2"
+};
+
 //-----------------------------------------------------------------------
 //
 //  Parser for regular expression.
@@ -1017,15 +1077,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1113 "regex.h2"
+#line 1194 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1119 "regex.h2"
+#line 1200 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1128 "regex.h2"
+#line 1209 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1038,13 +1098,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1146 "regex.h2"
+#line 1227 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1151 "regex.h2"
+#line 1232 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1156 "regex.h2"
+#line 1237 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1066,147 +1126,150 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1181 "regex.h2"
+#line 1262 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1190 "regex.h2"
+#line 1271 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1194 "regex.h2"
+#line 1275 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1209 "regex.h2"
+#line 1290 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1215 "regex.h2"
+#line 1296 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1256 "regex.h2"
+#line 1337 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1268 "regex.h2"
+#line 1349 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1274 "regex.h2"
+#line 1355 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1281 "regex.h2"
+#line 1362 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1290 "regex.h2"
+#line 1371 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1298 "regex.h2"
+#line 1379 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1308 "regex.h2"
+#line 1389 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1332 "regex.h2"
+#line 1413 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1348 "regex.h2"
+#line 1429 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1368 "regex.h2"
+#line 1449 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1375 "regex.h2"
+#line 1456 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1387 "regex.h2"
+#line 1468 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1390 "regex.h2"
+#line 1471 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1400 "regex.h2"
+#line 1481 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1418 "regex.h2"
+#line 1499 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1428 "regex.h2"
+#line 1509 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1441 "regex.h2"
+#line 1522 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1477 "regex.h2"
+#line 1558 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1542 "regex.h2"
+#line 1623 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1553 "regex.h2"
+#line 1634 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1566 "regex.h2"
+#line 1647 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1574 "regex.h2"
+#line 1655 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1681 "regex.h2"
+#line 1762 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1848 "regex.h2"
+#line 1929 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 1980 "regex.h2"
+#line 2061 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 1987 "regex.h2"
+#line 2068 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2050 "regex.h2"
+#line 2131 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2086 "regex.h2"
+#line 2167 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2108 "regex.h2"
+#line 2189 "regex.h2"
+    public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
+
+#line 2211 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2122 "regex.h2"
+#line 2235 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2131 "regex.h2"
+#line 2244 "regex.h2"
 }
 }
 
@@ -2125,24 +2188,110 @@ namespace regex {
         }
     }
 
-#line 1107 "regex.h2"
+#line 1092 "regex.h2"
+        template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
+            : matched{ matched_ }
+            , ctx{ ctx_ }{
+
+#line 1095 "regex.h2"
+        }
+
+#line 1097 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 1098 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+#line 1099 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 1100 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+
+#line 1102 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
+#line 1103 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+#line 1104 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
+
+#line 1106 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
+            auto group_id {Matcher::get_named_group_index(g)};
+            if (-1 == group_id) {
+                // TODO: Throw error.
+            }
+            return group_id;
+        }
+
+#line 1115 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 1116 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 1117 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 1118 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
+        context ctx {start, end};
+
+        auto r {Matcher::entry(start, ctx, modifiers())};
+        return search_return(r.matched && r.pos == end, std::move(ctx));
+    }
+
+#line 1125 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 1126 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 1127 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 1128 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
+        auto matched {false};
+        context ctx {start, end};
+
+        auto cur {start};
+        for( ; true; (++cur) ) {
+            if (Matcher::entry(cur, ctx, modifiers()).matched) {
+                matched = true;
+                break;
+            }
+
+            if (cur == ctx.end) {
+                break;
+            }
+        }
+
+        return search_return(std::move(matched), std::move(ctx));
+    }
+
+#line 1147 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
+
+#line 1152 "regex.h2"
+    template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
+        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
+            return CPP2_UFCS(begin)(str) + pos;
+        }
+        else {
+            return CPP2_UFCS(end)(str);
+        }
+    }
+
+#line 1188 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1113 "regex.h2"
+#line 1194 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1119 "regex.h2"
+#line 1200 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1121 "regex.h2"
+#line 1202 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2150,10 +2299,10 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1128 "regex.h2"
+#line 1209 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1138 "regex.h2"
+#line 1219 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2162,29 +2311,29 @@ namespace regex {
         return g; 
     }
 
-#line 1146 "regex.h2"
+#line 1227 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1151 "regex.h2"
+#line 1232 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1175 "regex.h2"
+#line 1256 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1179 "regex.h2"
+#line 1260 "regex.h2"
     }
 
-#line 1183 "regex.h2"
+#line 1264 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2192,12 +2341,12 @@ namespace regex {
         return old_state; 
     }
 
-#line 1190 "regex.h2"
+#line 1271 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1197 "regex.h2"
+#line 1278 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2210,14 +2359,14 @@ namespace regex {
         return old_state; 
     }
 
-#line 1209 "regex.h2"
+#line 1290 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1218 "regex.h2"
+#line 1299 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2256,7 +2405,7 @@ namespace regex {
         return cur; 
     }
 
-#line 1256 "regex.h2"
+#line 1337 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2269,14 +2418,14 @@ namespace regex {
         }
     }
 
-#line 1268 "regex.h2"
+#line 1349 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1269 "regex.h2"
+#line 1350 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1270 "regex.h2"
+#line 1351 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1274 "regex.h2"
+#line 1355 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2284,7 +2433,7 @@ namespace regex {
         return r; 
     }
 
-#line 1281 "regex.h2"
+#line 1362 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2294,7 +2443,7 @@ namespace regex {
         return r; 
     }
 
-#line 1290 "regex.h2"
+#line 1371 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2303,7 +2452,7 @@ namespace regex {
         }
     }
 
-#line 1298 "regex.h2"
+#line 1379 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2314,12 +2463,12 @@ namespace regex {
         }
     }
 
-#line 1308 "regex.h2"
+#line 1389 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1309 "regex.h2"
+#line 1390 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1311 "regex.h2"
+#line 1392 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2341,14 +2490,14 @@ namespace regex {
         }
     }
 
-#line 1332 "regex.h2"
+#line 1413 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1333 "regex.h2"
+#line 1414 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1334 "regex.h2"
+#line 1415 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1336 "regex.h2"
+#line 1417 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2361,7 +2510,7 @@ namespace regex {
         }
     }
 
-#line 1348 "regex.h2"
+#line 1429 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2382,13 +2531,13 @@ namespace regex {
         return std::move(r.value()); 
     }
 
-#line 1370 "regex.h2"
+#line 1451 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1375 "regex.h2"
+#line 1456 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2401,10 +2550,10 @@ namespace regex {
         return r; 
     }
 
-#line 1387 "regex.h2"
+#line 1468 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1393 "regex.h2"
+#line 1474 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2412,10 +2561,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1400 "regex.h2"
+#line 1481 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1402 "regex.h2"
+#line 1483 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -2432,7 +2581,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1418 "regex.h2"
+#line 1499 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2443,7 +2592,7 @@ namespace regex {
         return r; 
     }
 
-#line 1430 "regex.h2"
+#line 1511 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -2455,7 +2604,7 @@ namespace regex {
         return true; 
     }
 
-#line 1441 "regex.h2"
+#line 1522 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2492,7 +2641,7 @@ namespace regex {
         return r; 
     }
 
-#line 1477 "regex.h2"
+#line 1558 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2558,7 +2707,7 @@ namespace regex {
         return true; 
     }
 
-#line 1545 "regex.h2"
+#line 1626 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2567,7 +2716,7 @@ namespace regex {
         return true; 
     }
 
-#line 1553 "regex.h2"
+#line 1634 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2581,7 +2730,7 @@ namespace regex {
         return false; 
     }
 
-#line 1566 "regex.h2"
+#line 1647 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -2590,7 +2739,7 @@ namespace regex {
 
     }
 
-#line 1574 "regex.h2"
+#line 1655 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2698,7 +2847,7 @@ namespace regex {
         return true; 
     }
 
-#line 1681 "regex.h2"
+#line 1762 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -2866,7 +3015,7 @@ namespace regex {
         return true; 
     }
 
-#line 1848 "regex.h2"
+#line 1929 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -2999,7 +3148,7 @@ namespace regex {
         return true; 
     }
 
-#line 1980 "regex.h2"
+#line 2061 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3007,7 +3156,7 @@ namespace regex {
         return true; 
     }
 
-#line 1987 "regex.h2"
+#line 2068 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3071,7 +3220,7 @@ namespace regex {
         return true; 
     }
 
-#line 2050 "regex.h2"
+#line 2131 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3108,7 +3257,7 @@ namespace regex {
         return true; 
     }
 
-#line 2086 "regex.h2"
+#line 2167 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3131,22 +3280,56 @@ namespace regex {
         }
     }
 
-#line 2108 "regex.h2"
+#line 2189 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
+        std::string res {"get_named_group_index: (name) -> int = {\n"};
+
+        // Generate if selection.
+        std::string sep {""};
+        for ( auto const& cur : named_groups ) {
+            res += (cpp2::to_string(sep) + "if name == \"" + cpp2::to_string(cur.first) + "\" { return " + cpp2::to_string(cur.second) + "; }");
+            sep = "else ";
+        }
+
+        // Generate else branch or return if list is empty.
+        if (CPP2_UFCS(empty)(named_groups)) {
+            res += "  _ = name;\n";
+            res += "  return -1;\n";
+        }
+        else {
+            res += "  else { return -1; }\n";
+        }
+        res += "}\n";
+        return res;
+    }
+
+#line 2211 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_until('\0');
 
         if (has_error) {return "Error"; }
 
-        auto named_groups_arg {create_named_groups_list()}; 
         auto inner {create_matcher_from_state()}; 
         auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false")}; 
         auto end {create_matcher("group_matcher_end_logic", "0")}; 
         auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
-        return   create_matcher("regular_expression", (cpp2::to_string(std::move(mod)) + ", " + cpp2::to_string(cur_branch_reset_state.cur_group) + ", " + cpp2::to_string(alternatives_count) + ", " + cpp2::to_string(std::move(named_groups_arg)) + ", " + cpp2::to_string(std::move(list)))); 
+
+        std::string res {"{\n"};
+        res += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
+        res += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
+        res += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
+        res += create_named_group_lookup();
+        res += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
+        res += ("    return " + cpp2::to_string(std::move(list)) + "::match(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
+        res += "  }\n";
+        res += "}\n";
+
+        std::cout << res << std::endl;
+        return res;
     }
 
-#line 2124 "regex.h2"
+#line 2237 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/reflect.h b/source/reflect.h
index b6863081b8..13831e94a7 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -39,7 +39,7 @@ class alias_declaration;
 #line 963 "reflect.h2"
 class value_member_info;
 
-#line 1562 "reflect.h2"
+#line 1563 "reflect.h2"
 }
 
 }
@@ -778,7 +778,7 @@ auto print(cpp2::in t) -> void;
 //
 auto regex_gen(meta::type_declaration& t) -> void;
 
-#line 1452 "reflect.h2"
+#line 1453 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  apply_metafunctions
@@ -789,7 +789,7 @@ auto regex_gen(meta::type_declaration& t) -> void;
     auto const& error
     ) -> bool;
 
-#line 1562 "reflect.h2"
+#line 1563 "reflect.h2"
 }
 
 }
@@ -2077,11 +2077,12 @@ auto regex_gen(meta::type_declaration& t) -> void
     for ( auto const& expr : std::move(expressions) ) {
         auto regular_expression {::cpp2::regex::generate_template(expr.second.first, expr.second.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
 
-        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": " + cpp2::to_string(std::move(regular_expression)) + " = ();"));
+        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(std::move(regular_expression))));
+        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression_with_matcher = ();"));
     }
 }
 
-#line 1456 "reflect.h2"
+#line 1457 "reflect.h2"
 [[nodiscard]] auto apply_metafunctions(
     declaration_node& n, 
     type_declaration& rtype, 
@@ -2187,7 +2188,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     return true; 
 }
 
-#line 1562 "reflect.h2"
+#line 1563 "reflect.h2"
 }
 
 }
diff --git a/source/reflect.h2 b/source/reflect.h2
index 45b65ad50e..edd92a5951 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1444,7 +1444,8 @@ regex_gen: (inout t: meta::type_declaration) =
     for expressions do (expr) {
         regular_expression:= ::cpp2::regex::generate_template(expr.second.first, expr.second.second, :(message: _) = t$.error(message););
 
-        t.add_member("public (expr.first)$: (regular_expression)$ = ();");
+        t.add_member("public (expr.first)$_matcher: type = (regular_expression)$");
+        t.add_member("public (expr.first)$: cpp2::regex::regular_expression_with_matcher = ();");
     }
 }
 
diff --git a/source/regex.h2 b/source/regex.h2
index c0218b7a5f..a5ad59976b 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1078,6 +1078,87 @@ regular_expression:  type = {
+
+    context:  type == match_context;
+    modifiers: type      == match_modifiers;
+
+    // TODO: Named multiple return has problems with templates.
+    search_return:  type = {
+        public matched: bool;
+        public ctx: context;
+
+        operator=:(out this, matched_: bool, ctx_: context) = {
+            matched = matched_;
+            ctx = ctx_;
+        }
+
+        group_number: (this) ctx.size();
+        group:        (this, g: int) ctx.get_group_string(g);
+        group_start:  (this, g: int) ctx.get_group_start(g);
+        group_end:    (this, g: int) ctx.get_group_end(g);
+
+        group:        (this, g: bstring) group(get_group_id(g));
+        group_start:  (this, g: bstring) group_start(get_group_id(g));
+        group_end:    (this, g: bstring) group_end(get_group_id(g));
+
+        private get_group_id: (this, g: bstring) -> _ = {
+            group_id := Matcher::get_named_group_index(g);
+            if -1 == group_id {
+                // TODO: Throw error.
+            }
+            return group_id;
+        }
+    }
+
+    match: (in this, str: bview)                 match(str.begin(), str.end());
+    match: (in this, str: bview, start)          match(get_iter(str, start), str.end());
+    match: (in this, str: bview, start, length)  match(get_iter(str, start), get_iter(str, start + length));
+    match:  (in this, start: Iter, end: Iter) -> search_return = {
+        ctx: context = (start, end);
+
+        r := Matcher::entry(start, ctx, modifiers());
+        return search_return(r.matched && r.pos == end, ctx);
+    }
+
+    search: (in this, str: bview)                 search(str.begin(), str.end());
+    search: (in this, str: bview, start)          search(get_iter(str, start), str.end());
+    search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
+    search:  (in this, start: Iter, end: Iter) -> search_return = {
+        matched := false;
+        ctx: context = (start, end);
+
+        cur:= start;
+        while true next (cur++) {
+            if Matcher::entry(cur, ctx, modifiers()).matched {
+                matched = true;
+                break;
+            }
+
+            if cur == ctx.end {
+                break;
+            }
+        }
+
+        return search_return(matched, ctx);
+    }
+
+    to_string: (in this) Matcher::to_string();
+
+    // Helper functions
+    //
+
+    private get_iter: (str: bview, pos) -> _ = {
+        if pos < str.size() {
+            return str.begin() + pos;
+        }
+        else {
+            return str.end();
+        }
+    }
+}
+
 //-----------------------------------------------------------------------
 //
 //  Parser for regular expression.
@@ -2105,20 +2186,52 @@ regex_parser:  type = {
         }
     }
 
+    create_named_group_lookup: (this) -> std::string = {
+        res: std::string = "get_named_group_index: (name) -> int = {\n";
+
+        // Generate if selection.
+        sep: std::string = "";
+        for named_groups do (cur) {
+            res += "(sep)$if name == \"(cur.first)$\" { return (cur.second)$; }";
+            sep = "else ";
+        }
+
+        // Generate else branch or return if list is empty.
+        if named_groups.empty() {
+            res += "  _ = name;\n";
+            res += "  return -1;\n";
+        }
+        else {
+            res += "  else { return -1; }\n";
+        }
+        res += "}\n";
+        return res;
+    }
+
     parse:(inout this) -> std::string = {
         mod   := parser_expression_modifiers();
         parse_until('\0');
 
         if has_error { return "Error"; }
 
-        named_groups_arg := create_named_groups_list();
         inner := create_matcher_from_state();
         start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false");
         end   := create_matcher("group_matcher_end_logic", "0");
         list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-        return   create_matcher("regular_expression", "(mod)$, (cur_branch_reset_state.cur_group)$, (alternatives_count)$, (named_groups_arg)$, (list)$");
-    }
 
+        res: std::string = "{\n";
+        res += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
+        res += "  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
+        res += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
+        res += create_named_group_lookup();
+        res += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
+        res += "    return (list)$::match(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
+        res += "  }\n";
+        res += "}\n";
+
+        std::cout << res << std::endl;
+        return res;
+    }
 }
 
 generate_template:  (regex: std::string_view, modifier: std::string_view, err: Err) -> std::string = {

From 97eb938d24c95a01a5312ec578022ce4471423c9 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 5 May 2024 12:14:25 +0200
Subject: [PATCH 095/161] Basic generation of char matchers.

---
 include/cpp2regex.h | 631 +++++++++++++++++++++++++-------------------
 source/regex.h2     | 106 ++++++--
 2 files changed, 444 insertions(+), 293 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 0343c55c39..754a016b73 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -98,83 +98,83 @@ template class branch_reset_matcher_logic;
 #line 472 "regex.h2"
 template class char_matcher_logic;
 
-#line 500 "regex.h2"
+#line 522 "regex.h2"
 template class class_matcher_logic;
 
-#line 549 "regex.h2"
+#line 571 "regex.h2"
 template class global_group_reset;
     
 
-#line 561 "regex.h2"
+#line 583 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 598 "regex.h2"
+#line 620 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 622 "regex.h2"
+#line 644 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 630 "regex.h2"
+#line 652 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 663 "regex.h2"
+#line 685 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 683 "regex.h2"
+#line 705 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 700 "regex.h2"
+#line 722 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 723 "regex.h2"
+#line 745 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 735 "regex.h2"
+#line 757 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 761 "regex.h2"
+#line 783 "regex.h2"
 template class range_matcher_logic;
 
-#line 914 "regex.h2"
+#line 936 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 933 "regex.h2"
+#line 955 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 984 "regex.h2"
+#line 1006 "regex.h2"
 template class group_name_list;
 
-#line 996 "regex.h2"
+#line 1018 "regex.h2"
 class group_name_list_end;
     
 
-#line 1001 "regex.h2"
+#line 1023 "regex.h2"
 template class regular_expression;
 
-#line 1082 "regex.h2"
+#line 1104 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1171 "regex.h2"
+#line 1193 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1178 "regex.h2"
+#line 1200 "regex.h2"
 class regex_parser_group_state;
 
-#line 1213 "regex.h2"
+#line 1235 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1240 "regex.h2"
+#line 1262 "regex.h2"
 template class regex_parser;
 
-#line 2244 "regex.h2"
+#line 2314 "regex.h2"
 }
 }
 
@@ -643,17 +643,19 @@ template class char_matcher_logic
 #line 495 "regex.h2"
 };
 
-#line 498 "regex.h2"
+template [[nodiscard]] auto match_char(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 520 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 521 "regex.h2"
+#line 543 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 533 "regex.h2"
+#line 555 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -662,7 +664,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 545 "regex.h2"
+#line 567 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -670,14 +672,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 555 "regex.h2"
+#line 577 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 557 "regex.h2"
+#line 579 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -685,23 +687,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 569 "regex.h2"
+#line 591 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 575 "regex.h2"
+#line 597 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 596 "regex.h2"
+#line 618 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 610 "regex.h2"
+#line 632 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -710,7 +712,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 620 "regex.h2"
+#line 642 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -721,7 +723,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 626 "regex.h2"
+#line 648 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -729,14 +731,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 657 "regex.h2"
+#line 679 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 659 "regex.h2"
+#line 681 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -745,14 +747,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 677 "regex.h2"
+#line 699 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 679 "regex.h2"
+#line 701 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -761,14 +763,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 694 "regex.h2"
+#line 716 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 696 "regex.h2"
+#line 718 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -777,14 +779,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 717 "regex.h2"
+#line 739 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 719 "regex.h2"
+#line 741 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -793,14 +795,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 728 "regex.h2"
+#line 750 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 730 "regex.h2"
+#line 752 "regex.h2"
 };
 
 // Named character classes
@@ -812,7 +814,7 @@ template                    void = delete;
 
 
-#line 737 "regex.h2"
+#line 759 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -822,7 +824,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 747 "regex.h2"
+#line 769 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -834,43 +836,43 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 760 "regex.h2"
+#line 782 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 775 "regex.h2"
+#line 797 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 803 "regex.h2"
+#line 825 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 808 "regex.h2"
+#line 830 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 813 "regex.h2"
+#line 835 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 819 "regex.h2"
+#line 841 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto;
 
-#line 834 "regex.h2"
+#line 856 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return;
 
-#line 862 "regex.h2"
+#line 884 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
 
-#line 886 "regex.h2"
+#line 908 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 910 "regex.h2"
+#line 932 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -883,7 +885,7 @@ template void = delete;
 
 
-#line 927 "regex.h2"
+#line 949 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -894,7 +896,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 964 "regex.h2"
+#line 986 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -902,10 +904,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 972 "regex.h2"
+#line 994 "regex.h2"
 };
 
-#line 975 "regex.h2"
+#line 997 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -923,7 +925,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 994 "regex.h2"
+#line 1016 "regex.h2"
 };
 
 class group_name_list_end {
@@ -932,7 +934,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 998 "regex.h2"
+#line 1020 "regex.h2"
 };
 
 // Regular expression implementation
@@ -948,7 +950,7 @@ template matched_, context const& ctx_);
 
-#line 1016 "regex.h2"
+#line 1038 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -963,7 +965,7 @@ template void = delete;
 
 
-#line 1032 "regex.h2"
+#line 1054 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -971,13 +973,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1044 "regex.h2"
+#line 1066 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1066 "regex.h2"
+#line 1088 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -989,7 +991,7 @@ template void = delete;
 
 
-#line 1079 "regex.h2"
+#line 1101 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1005,7 +1007,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1097 "regex.h2"
+#line 1119 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1020,7 +1022,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1113 "regex.h2"
+#line 1135 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1028,13 +1030,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1125 "regex.h2"
+#line 1147 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1147 "regex.h2"
+#line 1169 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1046,7 +1048,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1160 "regex.h2"
+#line 1182 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1077,15 +1079,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1194 "regex.h2"
+#line 1216 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1200 "regex.h2"
+#line 1222 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1209 "regex.h2"
+#line 1231 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1098,13 +1100,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1227 "regex.h2"
+#line 1249 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1232 "regex.h2"
+#line 1254 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1237 "regex.h2"
+#line 1259 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1121,155 +1123,164 @@ template class regex_parser {
     private: std::map named_groups {}; 
     private: bool has_error {false}; 
 
+    private: int parse_func {0};
+    private: std::string source {""};
+
     private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1262 "regex.h2"
+#line 1287 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1271 "regex.h2"
+#line 1296 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1275 "regex.h2"
+#line 1300 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1290 "regex.h2"
+#line 1315 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1296 "regex.h2"
+#line 1321 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1337 "regex.h2"
+#line 1362 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1349 "regex.h2"
+#line 1374 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1355 "regex.h2"
+#line 1380 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1362 "regex.h2"
+#line 1387 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1371 "regex.h2"
+#line 1396 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1379 "regex.h2"
+#line 1404 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1389 "regex.h2"
+#line 1414 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1413 "regex.h2"
+#line 1438 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1429 "regex.h2"
+#line 1454 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1449 "regex.h2"
+#line 1474 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1456 "regex.h2"
+#line 1481 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1468 "regex.h2"
+#line 1493 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1471 "regex.h2"
+#line 1496 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1481 "regex.h2"
+#line 1506 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1499 "regex.h2"
+#line 1524 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1509 "regex.h2"
+#line 1534 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1522 "regex.h2"
+#line 1547 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1558 "regex.h2"
+#line 1583 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1623 "regex.h2"
+#line 1648 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1634 "regex.h2"
+#line 1659 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1647 "regex.h2"
+#line 1672 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1655 "regex.h2"
+#line 1680 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1762 "regex.h2"
+#line 1787 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1929 "regex.h2"
+#line 1954 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2061 "regex.h2"
+#line 2086 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2068 "regex.h2"
+#line 2093 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2131 "regex.h2"
+#line 2156 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2167 "regex.h2"
+#line 2192 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2189 "regex.h2"
+#line 2214 "regex.h2"
+    public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
+
+#line 2238 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2211 "regex.h2"
+#line 2260 "regex.h2"
+    public: [[nodiscard]] auto generate_parse_func(auto const& matcher_list) & -> std::string;
+
+#line 2280 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2235 "regex.h2"
+#line 2305 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2244 "regex.h2"
+#line 2314 "regex.h2"
 }
 }
 
@@ -1653,7 +1664,30 @@ namespace regex {
 #line 494 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 502 "regex.h2"
+#line 497 "regex.h2"
+template [[nodiscard]] auto match_char(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+    if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+        if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
+            cur += 1;
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+    else {
+        if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
+            cur += 1;
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+}
+
+#line 524 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1673,7 +1707,7 @@ namespace regex {
         }
     }
 
-#line 521 "regex.h2"
+#line 543 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1686,10 +1720,10 @@ namespace regex {
         return r; 
     }
 
-#line 533 "regex.h2"
+#line 555 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 535 "regex.h2"
+#line 557 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1701,18 +1735,18 @@ namespace regex {
         return r; 
     }
 
-#line 550 "regex.h2"
+#line 572 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 555 "regex.h2"
+#line 577 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 556 "regex.h2"
+#line 578 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 562 "regex.h2"
+#line 584 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -1720,14 +1754,14 @@ namespace regex {
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 569 "regex.h2"
+#line 591 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 575 "regex.h2"
+#line 597 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1750,7 +1784,7 @@ namespace regex {
         }
     }
 
-#line 599 "regex.h2"
+#line 621 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -1762,10 +1796,10 @@ namespace regex {
         return r; 
     }
 
-#line 610 "regex.h2"
+#line 632 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 612 "regex.h2"
+#line 634 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -1775,14 +1809,14 @@ namespace regex {
         }
     }
 
-#line 623 "regex.h2"
+#line 645 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 624 "regex.h2"
+#line 646 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 625 "regex.h2"
+#line 647 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 631 "regex.h2"
+#line 653 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1809,12 +1843,12 @@ namespace regex {
         }
 
     }
-#line 657 "regex.h2"
+#line 679 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 658 "regex.h2"
+#line 680 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 665 "regex.h2"
+#line 687 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -1827,12 +1861,12 @@ namespace regex {
         }}
     }
 
-#line 677 "regex.h2"
+#line 699 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 678 "regex.h2"
+#line 700 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 685 "regex.h2"
+#line 707 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -1842,12 +1876,12 @@ namespace regex {
         }
 
     }
-#line 694 "regex.h2"
+#line 716 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 695 "regex.h2"
+#line 717 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 702 "regex.h2"
+#line 724 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -1863,21 +1897,21 @@ namespace regex {
         }
 
     }
-#line 717 "regex.h2"
+#line 739 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 718 "regex.h2"
+#line 740 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 725 "regex.h2"
+#line 747 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 728 "regex.h2"
+#line 750 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 729 "regex.h2"
+#line 751 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 763 "regex.h2"
+#line 785 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, end_func, tail); 
@@ -1890,10 +1924,10 @@ namespace regex {
         }}
     }
 
-#line 775 "regex.h2"
+#line 797 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 777 "regex.h2"
+#line 799 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
@@ -1920,26 +1954,26 @@ namespace regex {
       return r; 
     }
 
-#line 803 "regex.h2"
+#line 825 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 808 "regex.h2"
+#line 830 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 813 "regex.h2"
+#line 835 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 819 "regex.h2"
+#line 841 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -1955,7 +1989,7 @@ namespace regex {
         return res; 
     }
 
-#line 834 "regex.h2"
+#line 856 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (end_func)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, Other()); 
@@ -1984,7 +2018,7 @@ namespace regex {
         return r; 
     }
 
-#line 862 "regex.h2"
+#line 884 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, end_func, count)}; 
@@ -2009,7 +2043,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 886 "regex.h2"
+#line 908 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, end_func, count)}; 
@@ -2035,7 +2069,7 @@ namespace regex {
         return Other::match(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 916 "regex.h2"
+#line 938 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (kind == range_flags::not_greedy) {
@@ -2048,7 +2082,7 @@ namespace regex {
         return r; 
     }
 
-#line 935 "regex.h2"
+#line 957 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2078,9 +2112,9 @@ namespace regex {
         }
 
     }
-#line 964 "regex.h2"
+#line 986 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 965 "regex.h2"
+#line 987 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2089,7 +2123,7 @@ namespace regex {
         }
     }
 
-#line 986 "regex.h2"
+#line 1008 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2099,34 +2133,34 @@ namespace regex {
         }
     }
 
-#line 997 "regex.h2"
+#line 1019 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1011 "regex.h2"
+#line 1033 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1014 "regex.h2"
+#line 1036 "regex.h2"
         }
 
-#line 1016 "regex.h2"
+#line 1038 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1017 "regex.h2"
+#line 1039 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1018 "regex.h2"
+#line 1040 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1019 "regex.h2"
+#line 1041 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1021 "regex.h2"
+#line 1043 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1022 "regex.h2"
+#line 1044 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1023 "regex.h2"
+#line 1045 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1025 "regex.h2"
+#line 1047 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2135,13 +2169,13 @@ namespace regex {
             return group_id; 
         }
 
-#line 1034 "regex.h2"
+#line 1056 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1035 "regex.h2"
+#line 1057 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1036 "regex.h2"
+#line 1058 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1037 "regex.h2"
+#line 1059 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2149,13 +2183,13 @@ namespace regex {
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1044 "regex.h2"
+#line 1066 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1045 "regex.h2"
+#line 1067 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1046 "regex.h2"
+#line 1068 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1047 "regex.h2"
+#line 1069 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2175,10 +2209,10 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1066 "regex.h2"
+#line 1088 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1071 "regex.h2"
+#line 1093 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2188,31 +2222,31 @@ namespace regex {
         }
     }
 
-#line 1092 "regex.h2"
+#line 1114 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1095 "regex.h2"
+#line 1117 "regex.h2"
         }
 
-#line 1097 "regex.h2"
+#line 1119 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1098 "regex.h2"
+#line 1120 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1099 "regex.h2"
+#line 1121 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1100 "regex.h2"
+#line 1122 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1102 "regex.h2"
+#line 1124 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1103 "regex.h2"
+#line 1125 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1104 "regex.h2"
+#line 1126 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1106 "regex.h2"
+#line 1128 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)};
             if (-1 == group_id) {
@@ -2221,13 +2255,13 @@ namespace regex {
             return group_id;
         }
 
-#line 1115 "regex.h2"
+#line 1137 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1116 "regex.h2"
+#line 1138 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1117 "regex.h2"
+#line 1139 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1118 "regex.h2"
+#line 1140 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end};
 
@@ -2235,13 +2269,13 @@ namespace regex {
         return search_return(r.matched && r.pos == end, std::move(ctx));
     }
 
-#line 1125 "regex.h2"
+#line 1147 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1126 "regex.h2"
+#line 1148 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1127 "regex.h2"
+#line 1149 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1128 "regex.h2"
+#line 1150 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false};
         context ctx {start, end};
@@ -2261,10 +2295,10 @@ namespace regex {
         return search_return(std::move(matched), std::move(ctx));
     }
 
-#line 1147 "regex.h2"
+#line 1169 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1152 "regex.h2"
+#line 1174 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos;
@@ -2274,24 +2308,24 @@ namespace regex {
         }
     }
 
-#line 1188 "regex.h2"
+#line 1210 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1194 "regex.h2"
+#line 1216 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1200 "regex.h2"
+#line 1222 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1202 "regex.h2"
+#line 1224 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2299,10 +2333,10 @@ namespace regex {
         static_cast(std::move(last));
     }
 
-#line 1209 "regex.h2"
+#line 1231 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1219 "regex.h2"
+#line 1241 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2311,29 +2345,29 @@ namespace regex {
         return g; 
     }
 
-#line 1227 "regex.h2"
+#line 1249 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1232 "regex.h2"
+#line 1254 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1256 "regex.h2"
+#line 1281 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1260 "regex.h2"
+#line 1285 "regex.h2"
     }
 
-#line 1264 "regex.h2"
+#line 1289 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2341,12 +2375,12 @@ namespace regex {
         return old_state; 
     }
 
-#line 1271 "regex.h2"
+#line 1296 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1278 "regex.h2"
+#line 1303 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2359,14 +2393,14 @@ namespace regex {
         return old_state; 
     }
 
-#line 1290 "regex.h2"
+#line 1315 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1299 "regex.h2"
+#line 1324 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2405,7 +2439,7 @@ namespace regex {
         return cur; 
     }
 
-#line 1337 "regex.h2"
+#line 1362 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2418,14 +2452,14 @@ namespace regex {
         }
     }
 
-#line 1349 "regex.h2"
+#line 1374 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1350 "regex.h2"
+#line 1375 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1351 "regex.h2"
+#line 1376 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1355 "regex.h2"
+#line 1380 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2433,7 +2467,7 @@ namespace regex {
         return r; 
     }
 
-#line 1362 "regex.h2"
+#line 1387 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2443,7 +2477,7 @@ namespace regex {
         return r; 
     }
 
-#line 1371 "regex.h2"
+#line 1396 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2452,7 +2486,7 @@ namespace regex {
         }
     }
 
-#line 1379 "regex.h2"
+#line 1404 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2463,12 +2497,12 @@ namespace regex {
         }
     }
 
-#line 1389 "regex.h2"
+#line 1414 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1390 "regex.h2"
+#line 1415 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1392 "regex.h2"
+#line 1417 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2490,14 +2524,14 @@ namespace regex {
         }
     }
 
-#line 1413 "regex.h2"
+#line 1438 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1414 "regex.h2"
+#line 1439 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1415 "regex.h2"
+#line 1440 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1417 "regex.h2"
+#line 1442 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2510,7 +2544,7 @@ namespace regex {
         }
     }
 
-#line 1429 "regex.h2"
+#line 1454 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2531,13 +2565,13 @@ namespace regex {
         return std::move(r.value()); 
     }
 
-#line 1451 "regex.h2"
+#line 1476 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1456 "regex.h2"
+#line 1481 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2550,10 +2584,10 @@ namespace regex {
         return r; 
     }
 
-#line 1468 "regex.h2"
+#line 1493 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1474 "regex.h2"
+#line 1499 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2561,10 +2595,10 @@ namespace regex {
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1481 "regex.h2"
+#line 1506 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1483 "regex.h2"
+#line 1508 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -2581,7 +2615,7 @@ namespace regex {
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1499 "regex.h2"
+#line 1524 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2592,7 +2626,7 @@ namespace regex {
         return r; 
     }
 
-#line 1511 "regex.h2"
+#line 1536 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -2604,7 +2638,7 @@ namespace regex {
         return true; 
     }
 
-#line 1522 "regex.h2"
+#line 1547 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2641,7 +2675,7 @@ namespace regex {
         return r; 
     }
 
-#line 1558 "regex.h2"
+#line 1583 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2707,7 +2741,7 @@ namespace regex {
         return true; 
     }
 
-#line 1626 "regex.h2"
+#line 1651 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2716,7 +2750,7 @@ namespace regex {
         return true; 
     }
 
-#line 1634 "regex.h2"
+#line 1659 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2730,7 +2764,7 @@ namespace regex {
         return false; 
     }
 
-#line 1647 "regex.h2"
+#line 1672 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -2739,7 +2773,7 @@ namespace regex {
 
     }
 
-#line 1655 "regex.h2"
+#line 1680 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2847,7 +2881,7 @@ namespace regex {
         return true; 
     }
 
-#line 1762 "regex.h2"
+#line 1787 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3015,7 +3049,7 @@ namespace regex {
         return true; 
     }
 
-#line 1929 "regex.h2"
+#line 1954 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3148,7 +3182,7 @@ namespace regex {
         return true; 
     }
 
-#line 2061 "regex.h2"
+#line 2086 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3156,7 +3190,7 @@ namespace regex {
         return true; 
     }
 
-#line 2068 "regex.h2"
+#line 2093 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3220,7 +3254,7 @@ namespace regex {
         return true; 
     }
 
-#line 2131 "regex.h2"
+#line 2156 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3257,7 +3291,7 @@ namespace regex {
         return true; 
     }
 
-#line 2167 "regex.h2"
+#line 2192 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3280,7 +3314,32 @@ namespace regex {
         }
     }
 
-#line 2189 "regex.h2"
+#line 2214 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
+        char c {current()};
+        for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
+            if (c == term) {break; }
+
+            // if !has_error && is_alternative(c) { continue; }
+            // if !has_error && is_any(c) { continue; }
+            // if !has_error && is_class(c) { continue; }
+            // if !has_error && is_escape(c) { continue; }
+            // if !has_error && is_anchor(c) { continue; }
+            // if !has_error && is_group(c) { continue; }
+            // if !has_error && is_handle_special(c) { continue; }
+            // if !has_error && is_range(c) { continue; }
+            // if !has_error && is_special_range(c) { continue; }
+
+            if (has_error) {break; }
+
+            // No special char, push a character match
+            CPP2_UFCS(add)(cur_group_state, ("if !cpp2::regex::match_char(r.pos, ctx, modifiers) { r = ctx.fail(); return r; }\n"));
+        }
+
+        return generate_parse_func(cur_group_state.cur_match_list);
+    }
+
+#line 2238 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"};
 
@@ -3303,33 +3362,55 @@ namespace regex {
         return res;
     }
 
-#line 2211 "regex.h2"
+#line 2260 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::generate_parse_func(auto const& matcher_list) & -> std::string{
+        auto cur_id {parse_func};
+        parse_func += 1;
+        std::string name {"func_" + cpp2::to_string(std::move(cur_id))};
+
+        source += (cpp2::to_string(name) + ": type = {\n");
+        source += "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
+        source += "    r:= ctx.pass(cur);\n";
+        for ( auto const& matcher : matcher_list ) {
+            source += matcher;
+        }
+        source += "\n";
+        source += "    r = other(r.pos, ctx, modifiers);\n";
+        source += "    return r;\n";
+        source += "  }\n";
+        source += "}\n";
+
+        return name;
+    }
+
+#line 2280 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
-        parse_until('\0');
 
-        if (has_error) {return "Error"; }
+        source += "{\n";
+        source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
+        source += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
 
-        auto inner {create_matcher_from_state()}; 
-        auto start {create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false")}; 
-        auto end {create_matcher("group_matcher_end_logic", "0")}; 
-        auto list {create_matcher("matcher_list", (cpp2::to_string(std::move(start)) + ", " + cpp2::to_string(std::move(inner)) + ", " + cpp2::to_string(std::move(end))))}; 
-
-        std::string res {"{\n"};
-        res += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
-        res += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
-        res += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
-        res += create_named_group_lookup();
-        res += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
-        res += ("    return " + cpp2::to_string(std::move(list)) + "::match(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
-        res += "  }\n";
-        res += "}\n";
+        auto start_name {parse_until_new('\0')};
+        source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
+        source += "    ctx.set_group_start(0, cur);";
+        source += ("    r := " + cpp2::to_string(std::move(start_name)) + "()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
+        source += "    if r.matched { ctx.set_group_end(0, r.pos); }";
+        source += "    return r;\n";
+        source += "  }\n";
 
-        std::cout << res << std::endl;
-        return res;
+        source += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
+        source += create_named_group_lookup();
+        source += "}\n";
+
+#line 2300 "regex.h2"
+        std::cout << source << std::endl;
+        if (has_error) {return "Error"; }
+
+        return source;
     }
 
-#line 2237 "regex.h2"
+#line 2307 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index a5ad59976b..f316872d95 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -494,6 +494,28 @@ char_matcher_logic:  type =
     to_string:    ()  bstring(1, C);
 }
 
+match_char:  (inout cur, inout ctx, modifiers) -> bool = {
+    if modifiers.has_flag(expression_flags::case_insensitive) {
+        if cur != ctx.end && (cur* == L || cur* == U) {
+            cur += 1;
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+    else {
+        if cur != ctx.end && cur* == C {
+            cur += 1;
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+}
+
 
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
@@ -1250,6 +1272,9 @@ regex_parser:  type = {
     named_groups :          std::map = ();
     has_error:              bool = false;
 
+    parse_func: int = 0;
+    source: std::string = "";
+
     supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit");
 
@@ -2186,6 +2211,30 @@ regex_parser:  type = {
         }
     }
 
+    parse_until_new:(inout this, term: char) -> std::string = {
+        c: char = current();
+        while c != '\n' next _ = next(out c) {
+            if c == term { break; }
+
+            // if !has_error && is_alternative(c) { continue; }
+            // if !has_error && is_any(c) { continue; }
+            // if !has_error && is_class(c) { continue; }
+            // if !has_error && is_escape(c) { continue; }
+            // if !has_error && is_anchor(c) { continue; }
+            // if !has_error && is_group(c) { continue; }
+            // if !has_error && is_handle_special(c) { continue; }
+            // if !has_error && is_range(c) { continue; }
+            // if !has_error && is_special_range(c) { continue; }
+
+            if has_error { break; }
+
+            // No special char, push a character match
+            cur_group_state.add("if !cpp2::regex::match_char(r.pos, ctx, modifiers) { r = ctx.fail(); return r; }\n");
+        }
+
+        return generate_parse_func(cur_group_state.cur_match_list);
+    }
+
     create_named_group_lookup: (this) -> std::string = {
         res: std::string = "get_named_group_index: (name) -> int = {\n";
 
@@ -2208,29 +2257,50 @@ regex_parser:  type = {
         return res;
     }
 
+    generate_parse_func: (inout this, matcher_list) -> std::string = {
+        cur_id : = parse_func;
+        parse_func += 1;
+        name: std::string = "func_(cur_id)$";
+
+        source += "(name)$: type = {\n";
+        source += "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
+        source += "    r:= ctx.pass(cur);\n";
+        for matcher_list do (matcher) {
+            source += matcher;
+        }
+        source += "\n";
+        source += "    r = other(r.pos, ctx, modifiers);\n";
+        source += "    return r;\n";
+        source += "  }\n";
+        source += "}\n";
+
+        return name;
+    }
+
     parse:(inout this) -> std::string = {
         mod   := parser_expression_modifiers();
-        parse_until('\0');
 
-        if has_error { return "Error"; }
+        source += "{\n";
+        source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
+        source += "  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
 
-        inner := create_matcher_from_state();
-        start := create_matcher("group_matcher_start_logic", "0, ::cpp2::regex::match_modifiers_no_change, \"\", false");
-        end   := create_matcher("group_matcher_end_logic", "0");
-        list  := create_matcher("matcher_list", "(start)$, (inner)$, (end)$");
-
-        res: std::string = "{\n";
-        res += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
-        res += "  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
-        res += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
-        res += create_named_group_lookup();
-        res += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
-        res += "    return (list)$::match(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
-        res += "  }\n";
-        res += "}\n";
+        start_name := parse_until_new('\0');
+        source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
+        source += "    ctx.set_group_start(0, cur);";
+        source += "    r := (start_name)$()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
+        source += "    if r.matched { ctx.set_group_end(0, r.pos); }";
+        source += "    return r;\n";
+        source += "  }\n";
 
-        std::cout << res << std::endl;
-        return res;
+        source += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
+        source += create_named_group_lookup();
+        source += "}\n";
+
+
+        std::cout << source << std::endl;
+        if has_error { return "Error"; }
+
+        return source;
     }
 }
 

From 268cfb9cc7c9d9028bf13981c4d88bff78709399 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 5 May 2024 14:07:22 +0200
Subject: [PATCH 096/161] Basic code generation via regegx tokens.

---
 include/cpp2regex.h | 1076 +++++++++++++++++++++++++++----------------
 source/regex.h2     |  142 +++++-
 2 files changed, 800 insertions(+), 418 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 754a016b73..fd345db3f7 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -85,96 +85,114 @@ template class extract_position_helper;
 template class special_syntax_wrapper;
     
 
-#line 361 "regex.h2"
+#line 356 "regex.h2"
+class parse_context;
+
+
+#line 385 "regex.h2"
+class generation_context;
+
+#line 408 "regex.h2"
+class regex_token;
+
+#line 418 "regex.h2"
+class stateless_regex_token;
+
+
+#line 432 "regex.h2"
+class char_token;
+
+
+#line 467 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 445 "regex.h2"
+#line 551 "regex.h2"
 template class any_matcher_logic;
 
-#line 464 "regex.h2"
+#line 570 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 472 "regex.h2"
+#line 578 "regex.h2"
 template class char_matcher_logic;
 
-#line 522 "regex.h2"
+#line 628 "regex.h2"
 template class class_matcher_logic;
 
-#line 571 "regex.h2"
+#line 677 "regex.h2"
 template class global_group_reset;
     
 
-#line 583 "regex.h2"
+#line 689 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 620 "regex.h2"
+#line 726 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 644 "regex.h2"
+#line 750 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 652 "regex.h2"
+#line 758 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 685 "regex.h2"
+#line 791 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 705 "regex.h2"
+#line 811 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 722 "regex.h2"
+#line 828 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 745 "regex.h2"
+#line 851 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 757 "regex.h2"
+#line 863 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 783 "regex.h2"
+#line 889 "regex.h2"
 template class range_matcher_logic;
 
-#line 936 "regex.h2"
+#line 1042 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 955 "regex.h2"
+#line 1061 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1006 "regex.h2"
+#line 1112 "regex.h2"
 template class group_name_list;
 
-#line 1018 "regex.h2"
+#line 1124 "regex.h2"
 class group_name_list_end;
     
 
-#line 1023 "regex.h2"
+#line 1129 "regex.h2"
 template class regular_expression;
 
-#line 1104 "regex.h2"
+#line 1210 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1193 "regex.h2"
+#line 1299 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1200 "regex.h2"
+#line 1306 "regex.h2"
 class regex_parser_group_state;
 
-#line 1235 "regex.h2"
+#line 1341 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1262 "regex.h2"
+#line 1368 "regex.h2"
 template class regex_parser;
 
-#line 2314 "regex.h2"
+#line 2418 "regex.h2"
 }
 }
 
@@ -206,20 +224,14 @@ bool inline constexpr greedy_alternative = false;
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
-//-----------------------------------------------------------------------
-//
-//  Helper structures for the expression matching.
-//
-//-----------------------------------------------------------------------
-//
-
+#line 31 "regex.h2"
 class expression_flags {
-    public: static const int case_insensitive;// mod: i
-    public: static const int multiple_lines;  // mod: m
-    public: static const int single_line;     // mod: s
-    public: static const int no_group_captures;// mod: n
-    public: static const int perl_code_syntax;// mod: x
-    public: static const int perl_code_syntax_in_classes;// mod: xx
+    public: static const int case_insensitive;
+    public: static const int multiple_lines;
+    public: static const int single_line;
+    public: static const int no_group_captures;
+    public: static const int perl_code_syntax;
+    public: static const int perl_code_syntax_in_classes;
 
     public: expression_flags() = default;
     public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
@@ -227,9 +239,7 @@ class expression_flags {
 };
 #line 39 "regex.h2"
 
-// TODO: @enum as template parameter yields two error:
-//     error: type 'range_flags' of non-type template parameter is not a structural type
-//     error: non-type template parameter has incomplete type 'range_flags'
+#line 43 "regex.h2"
 class range_flags {
     public: static const int not_greedy;
     public: static const int greedy;
@@ -272,8 +282,7 @@ template cl
 #line 74 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-    // Getter and setter for groups
-    //
+#line 78 "regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
@@ -296,15 +305,12 @@ template cl
 #line 112 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-    // Getter and setter for alternatives
-
+#line 116 "regex.h2"
     public: [[nodiscard]] auto get_alternative_pos(auto const& alternative) const& -> auto;
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 122 "regex.h2"
-    // Misc functions
-    //
+#line 124 "regex.h2"
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
 #line 138 "regex.h2"
@@ -313,9 +319,7 @@ template cl
 
 };
 
-// Flag change for matching modifiers. Creates a new flag for match_modifiers.
-// See expression_flags for possible flags.
-//
+#line 146 "regex.h2"
 template class match_modifiers_state_change {
 
     public: static const bool reset;
@@ -336,32 +340,23 @@ template
 
 using match_modifiers_no_change = match_modifiers_state_change;
 
-// Current modifiers for the regular expression.
-// See expression_flags for possible flags.
-//
+#line 172 "regex.h2"
 template class match_modifiers {
 
     public: static const int flags;
 
-    // Push/pop management
-
+#line 178 "regex.h2"
     public: template [[nodiscard]] static auto push([[maybe_unused]] Change const& unnamed_param_1) -> auto;
     public: [[nodiscard]] static auto pop() -> auto;
     public: template [[nodiscard]] static auto replace([[maybe_unused]] Change const& unnamed_param_1) -> auto;
 
-    // Flag management
-    //
-
+#line 185 "regex.h2"
     public: [[nodiscard]] auto has_flag(cpp2::in f) const& -> bool;
 
 #line 188 "regex.h2"
 };
 
-//  Represents the remainder of the regular expression.
-//
-//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
-//  Otherwise the matcher can try a different alternative.
-//
+#line 195 "regex.h2"
 template class matcher_list {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
@@ -388,15 +383,7 @@ class true_end_func {
     public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto;
 };
 
-//-----------------------------------------------------------------------
-//
-//  Character classes for regular expressions.
-//
-//-----------------------------------------------------------------------
-//
-
-// Class syntax:  Example: a
-//
+#line 225 "regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
@@ -408,8 +395,7 @@ template class single_class_entry
 #line 229 "regex.h2"
 };
 
-// Class syntax: - Example: a-c
-//
+#line 233 "regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
@@ -421,8 +407,7 @@ template class range_class_entry
 #line 237 "regex.h2"
 };
 
-// Helper for combining two character classes
-//
+#line 241 "regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -433,8 +418,7 @@ template class combined_class_entry {
 #line 244 "regex.h2"
 };
 
-// Class syntax:   Example: abcd
-//
+#line 248 "regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -445,8 +429,7 @@ template class list_class_entry {
 #line 251 "regex.h2"
 };
 
-// Class syntax: [: class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -467,8 +450,7 @@ template class negated_class_entry: public Inner
 #line 263 "regex.h2"
 };
 
-// Short class syntax: \  Example: \w
-//
+#line 267 "regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -479,15 +461,12 @@ template class shorthand_clas
 #line 270 "regex.h2"
 };
 
-#line 273 "regex.h2"
-// Named basic character classes
-//
+#line 275 "regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-// Named other classes
-//
+#line 281 "regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -502,8 +481,7 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-// Shorthand class entries
-//
+#line 297 "regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
@@ -517,15 +495,7 @@ template                      using short_not_space_class = nega
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-//-----------------------------------------------------------------------
-//
-//  Helper matchers for regular expressions.
-//
-//-----------------------------------------------------------------------
-//
-
-// Regex syntax: none Example: -
-//
+#line 319 "regex.h2"
 template class empty_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
@@ -537,9 +507,7 @@ template class empty_matcher_logic {
 #line 323 "regex.h2"
 };
 
-#line 326 "regex.h2"
-// Helper for greedy alternatives
-//
+#line 328 "regex.h2"
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
@@ -553,9 +521,7 @@ template class extract_position_helper {
 #line 339 "regex.h2"
 };
 
-// Helper for standard matchers with special syntax
-//
-//
+#line 344 "regex.h2"
 template class special_syntax_wrapper: public base {
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -566,6 +532,108 @@ template class special_synta
 #line 347 "regex.h2"
 };
 
+#line 356 "regex.h2"
+class parse_context {
+    private: std::string_view regex;
+
+    private: size_t pos {0};
+
+    public: std::vector> cur_state {};
+
+    public: explicit parse_context(cpp2::in r);
+#line 363 "regex.h2"
+    public: auto operator=(cpp2::in r) -> parse_context& ;
+
+#line 367 "regex.h2"
+    public: auto add_token(cpp2::in> token) & -> void;
+
+#line 371 "regex.h2"
+    public: [[nodiscard]] auto current() const& -> char;
+
+    public: [[nodiscard]] auto has_next() const& -> bool;
+    public: [[nodiscard]] auto next() & -> bool;
+
+#line 381 "regex.h2"
+    public: [[nodiscard]] auto valid() const& -> bool;
+    public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(parse_context const&) -> void = delete;
+
+
+#line 384 "regex.h2"
+};
+class generation_context {
+
+    public: std::string code {""};
+    public: int tabs {2};
+
+    public: [[nodiscard]] auto match_parameters() const& -> std::string;
+
+    public: auto add_check(cpp2::in check) & -> void;
+
+#line 396 "regex.h2"
+    public: [[nodiscard]] auto gen_tabs() const& -> std::string;
+
+#line 406 "regex.h2"
+};
+
+class regex_token {
+
+#line 411 "regex.h2"
+    public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
+
+    public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
+    public: [[nodiscard]] virtual auto requires_state() const -> bool = 0;
+    public: [[nodiscard]] virtual auto to_string() const -> std::string = 0;
+    public: virtual ~regex_token() noexcept;
+
+    public: regex_token() = default;
+    public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token const&) -> void = delete;
+
+#line 416 "regex.h2"
+};
+
+class stateless_regex_token: public regex_token {
+
+#line 421 "regex.h2"
+    private: std::string string_rep;
+
+    public: explicit stateless_regex_token(cpp2::in str);
+
+#line 427 "regex.h2"
+    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+    public: [[nodiscard]] auto requires_state() const -> bool override;
+    public: [[nodiscard]] auto to_string() const -> std::string override;
+    public: virtual ~stateless_regex_token() noexcept;
+
+    public: stateless_regex_token(stateless_regex_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(stateless_regex_token const&) -> void = delete;
+
+#line 430 "regex.h2"
+};
+
+class char_token: public stateless_regex_token {
+
+#line 435 "regex.h2"
+    private: char token;
+
+    public: explicit char_token(cpp2::in t);
+
+#line 442 "regex.h2"
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> std::shared_ptr;
+
+#line 446 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~char_token() noexcept;
+
+    public: char_token(char_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(char_token const&) -> void = delete;
+
+
+#line 451 "regex.h2"
+};
+
+#line 455 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -573,7 +641,7 @@ template class special_synta
 //-----------------------------------------------------------------------
 //
 
-#line 357 "regex.h2"
+#line 463 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -582,20 +650,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 375 "regex.h2"
+#line 481 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 393 "regex.h2"
+#line 499 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 441 "regex.h2"
+#line 547 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -604,14 +672,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 458 "regex.h2"
+#line 564 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 460 "regex.h2"
+#line 566 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -624,7 +692,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 468 "regex.h2"
+#line 574 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -633,29 +701,29 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 493 "regex.h2"
+#line 599 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 495 "regex.h2"
+#line 601 "regex.h2"
 };
 
 template [[nodiscard]] auto match_char(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 520 "regex.h2"
+#line 626 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 543 "regex.h2"
+#line 649 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 555 "regex.h2"
+#line 661 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -664,7 +732,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 567 "regex.h2"
+#line 673 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -672,14 +740,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 577 "regex.h2"
+#line 683 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 579 "regex.h2"
+#line 685 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -687,23 +755,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 591 "regex.h2"
+#line 697 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 597 "regex.h2"
+#line 703 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 618 "regex.h2"
+#line 724 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 632 "regex.h2"
+#line 738 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -712,7 +780,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 642 "regex.h2"
+#line 748 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -723,7 +791,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 648 "regex.h2"
+#line 754 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -731,14 +799,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 679 "regex.h2"
+#line 785 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 681 "regex.h2"
+#line 787 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -747,14 +815,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 699 "regex.h2"
+#line 805 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 701 "regex.h2"
+#line 807 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -763,14 +831,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 716 "regex.h2"
+#line 822 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 718 "regex.h2"
+#line 824 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -779,14 +847,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 739 "regex.h2"
+#line 845 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 741 "regex.h2"
+#line 847 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -795,14 +863,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 750 "regex.h2"
+#line 856 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 752 "regex.h2"
+#line 858 "regex.h2"
 };
 
 // Named character classes
@@ -814,7 +882,7 @@ template                    void = delete;
 
 
-#line 759 "regex.h2"
+#line 865 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -824,7 +892,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 769 "regex.h2"
+#line 875 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -836,43 +904,43 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 782 "regex.h2"
+#line 888 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 797 "regex.h2"
+#line 903 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 825 "regex.h2"
+#line 931 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 830 "regex.h2"
+#line 936 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 835 "regex.h2"
+#line 941 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 841 "regex.h2"
+#line 947 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto;
 
-#line 856 "regex.h2"
+#line 962 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return;
 
-#line 884 "regex.h2"
+#line 990 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
 
-#line 908 "regex.h2"
+#line 1014 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 932 "regex.h2"
+#line 1038 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -885,7 +953,7 @@ template void = delete;
 
 
-#line 949 "regex.h2"
+#line 1055 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -896,7 +964,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 986 "regex.h2"
+#line 1092 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -904,10 +972,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 994 "regex.h2"
+#line 1100 "regex.h2"
 };
 
-#line 997 "regex.h2"
+#line 1103 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -925,7 +993,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1016 "regex.h2"
+#line 1122 "regex.h2"
 };
 
 class group_name_list_end {
@@ -934,7 +1002,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1020 "regex.h2"
+#line 1126 "regex.h2"
 };
 
 // Regular expression implementation
@@ -950,7 +1018,7 @@ template matched_, context const& ctx_);
 
-#line 1038 "regex.h2"
+#line 1144 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -965,7 +1033,7 @@ template void = delete;
 
 
-#line 1054 "regex.h2"
+#line 1160 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -973,13 +1041,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1066 "regex.h2"
+#line 1172 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1088 "regex.h2"
+#line 1194 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -991,7 +1059,7 @@ template void = delete;
 
 
-#line 1101 "regex.h2"
+#line 1207 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1007,7 +1075,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1119 "regex.h2"
+#line 1225 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1022,7 +1090,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1135 "regex.h2"
+#line 1241 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1030,13 +1098,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1147 "regex.h2"
+#line 1253 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1169 "regex.h2"
+#line 1275 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1048,7 +1116,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1182 "regex.h2"
+#line 1288 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1079,15 +1147,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1216 "regex.h2"
+#line 1322 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1222 "regex.h2"
+#line 1328 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1231 "regex.h2"
+#line 1337 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1100,13 +1168,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1249 "regex.h2"
+#line 1355 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1254 "regex.h2"
+#line 1360 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1259 "regex.h2"
+#line 1365 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1131,156 +1199,156 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1287 "regex.h2"
+#line 1393 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1296 "regex.h2"
+#line 1402 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1300 "regex.h2"
+#line 1406 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1315 "regex.h2"
+#line 1421 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1321 "regex.h2"
+#line 1427 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1362 "regex.h2"
+#line 1468 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1374 "regex.h2"
+#line 1480 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1380 "regex.h2"
+#line 1486 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1387 "regex.h2"
+#line 1493 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1396 "regex.h2"
+#line 1502 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1404 "regex.h2"
+#line 1510 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1414 "regex.h2"
+#line 1520 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1438 "regex.h2"
+#line 1544 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1454 "regex.h2"
+#line 1560 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1474 "regex.h2"
+#line 1580 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1481 "regex.h2"
+#line 1587 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1493 "regex.h2"
+#line 1599 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1496 "regex.h2"
+#line 1602 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1506 "regex.h2"
+#line 1612 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1524 "regex.h2"
+#line 1630 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1534 "regex.h2"
+#line 1640 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1547 "regex.h2"
+#line 1653 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1583 "regex.h2"
+#line 1689 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1648 "regex.h2"
+#line 1754 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1659 "regex.h2"
+#line 1765 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1672 "regex.h2"
+#line 1778 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1680 "regex.h2"
+#line 1786 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1787 "regex.h2"
+#line 1893 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 1954 "regex.h2"
+#line 2060 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2086 "regex.h2"
+#line 2192 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2093 "regex.h2"
+#line 2199 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2156 "regex.h2"
+#line 2262 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2192 "regex.h2"
+#line 2298 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2214 "regex.h2"
+#line 2320 "regex.h2"
     public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
 
-#line 2238 "regex.h2"
+#line 2340 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2260 "regex.h2"
-    public: [[nodiscard]] auto generate_parse_func(auto const& matcher_list) & -> std::string;
+#line 2362 "regex.h2"
+    public: [[nodiscard]] auto generate_parse_func(cpp2::in ctx) & -> std::string;
 
-#line 2280 "regex.h2"
+#line 2384 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2305 "regex.h2"
+#line 2409 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2314 "regex.h2"
+#line 2418 "regex.h2"
 }
 }
 
@@ -1294,15 +1362,27 @@ namespace cpp2 {
 
 namespace regex {
 
+#line 24 "regex.h2"
+//-----------------------------------------------------------------------
+//
+//  Helper structures for the expression matching.
+//
+//-----------------------------------------------------------------------
+//
+
 #line 32 "regex.h2"
-    inline CPP2_CONSTEXPR int expression_flags::case_insensitive = 1;
-    inline CPP2_CONSTEXPR int expression_flags::multiple_lines = 2;
-    inline CPP2_CONSTEXPR int expression_flags::single_line = 4;
-    inline CPP2_CONSTEXPR int expression_flags::no_group_captures = 8;
-    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax = 16;
-    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax_in_classes = 32;
-
-#line 44 "regex.h2"
+    inline CPP2_CONSTEXPR int expression_flags::case_insensitive = 1;// mod: i
+    inline CPP2_CONSTEXPR int expression_flags::multiple_lines = 2;// mod: m
+    inline CPP2_CONSTEXPR int expression_flags::single_line = 4;// mod: s
+    inline CPP2_CONSTEXPR int expression_flags::no_group_captures = 8;// mod: n
+    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax = 16;// mod: x
+    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax_in_classes = 32;// mod: xx
+
+#line 40 "regex.h2"
+// TODO: @enum as template parameter yields two error:
+//     error: type 'range_flags' of non-type template parameter is not a structural type
+//     error: non-type template parameter has incomplete type 'range_flags'
+
     inline CPP2_CONSTEXPR int range_flags::not_greedy = 1;
     inline CPP2_CONSTEXPR int range_flags::greedy = 2;
     inline CPP2_CONSTEXPR int range_flags::possessive = 3;
@@ -1342,6 +1422,8 @@ namespace regex {
                                    alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
+    // Getter and setter for groups
+    //
 #line 78 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
@@ -1386,6 +1468,8 @@ namespace regex {
 #line 112 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
+    // Getter and setter for alternatives
+
 #line 116 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
@@ -1394,6 +1478,8 @@ namespace regex {
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
+    // Misc functions
+    //
 #line 124 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
@@ -1414,6 +1500,11 @@ namespace regex {
 #line 139 "regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::in cur) const& -> auto { return match_return(true, cur);  }
 
+#line 143 "regex.h2"
+// Flag change for matching modifiers. Creates a new flag for match_modifiers.
+// See expression_flags for possible flags.
+//
+
 #line 148 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
@@ -1435,9 +1526,16 @@ namespace regex {
 #line 164 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
+#line 169 "regex.h2"
+// Current modifiers for the regular expression.
+// See expression_flags for possible flags.
+//
+
 #line 174 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
+    // Push/pop management
+
 #line 178 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
 #line 179 "regex.h2"
@@ -1445,11 +1543,21 @@ namespace regex {
 #line 180 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
+    // Flag management
+    //
+
 #line 185 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
+#line 190 "regex.h2"
+//  Represents the remainder of the regular expression.
+//
+//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
+//  Otherwise the matcher can try a different alternative.
+//
+
 #line 196 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return match_select(cur, ctx, modifiers, end_func);  }
 
@@ -1474,26 +1582,53 @@ namespace regex {
 #line 213 "regex.h2"
     [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
+#line 216 "regex.h2"
+//-----------------------------------------------------------------------
+//
+//  Character classes for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+// Class syntax:  Example: a
+//
+
 #line 227 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
 #line 228 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
+#line 231 "regex.h2"
+// Class syntax: - Example: a-c
+//
+
 #line 235 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
 #line 236 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
+#line 239 "regex.h2"
+// Helper for combining two character classes
+//
+
 #line 242 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
 #line 243 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
+#line 246 "regex.h2"
+// Class syntax:   Example: abcd
+//
+
 #line 249 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
 #line 250 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
+#line 253 "regex.h2"
+// Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
 #line 257 "regex.h2"
@@ -1502,11 +1637,38 @@ namespace regex {
 #line 262 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
+#line 265 "regex.h2"
+// Short class syntax: \  Example: \w
+//
+
 #line 268 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
 #line 269 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
 
+#line 273 "regex.h2"
+// Named basic character classes
+//
+
+#line 279 "regex.h2"
+// Named other classes
+//
+
+#line 295 "regex.h2"
+// Shorthand class entries
+//
+
+#line 310 "regex.h2"
+//-----------------------------------------------------------------------
+//
+//  Helper matchers for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+// Regex syntax: none Example: -
+//
+
 #line 320 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
 #line 321 "regex.h2"
@@ -1514,6 +1676,10 @@ namespace regex {
 #line 322 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
 
+#line 326 "regex.h2"
+// Helper for greedy alternatives
+//
+
 #line 329 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Other::match(cur, ctx, modifiers, end_func)}; 
@@ -1528,10 +1694,124 @@ namespace regex {
 #line 338 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
+#line 341 "regex.h2"
+// Helper for standard matchers with special syntax
+//
+//
+
 #line 346 "regex.h2"
     template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
 
+#line 349 "regex.h2"
+//-----------------------------------------------------------------------
+//
+// Matchers and generators for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
 #line 363 "regex.h2"
+    parse_context::parse_context(cpp2::in r)
+        : regex{ r }{
+
+#line 365 "regex.h2"
+    }
+#line 363 "regex.h2"
+    auto parse_context::operator=(cpp2::in r) -> parse_context& {
+        regex = r;
+        pos = 0;
+        cur_state = {};
+        return *this;
+
+#line 365 "regex.h2"
+    }
+
+#line 367 "regex.h2"
+    auto parse_context::add_token(cpp2::in> token) & -> void{
+        CPP2_UFCS(push_back)(cur_state, token);
+    }
+
+#line 371 "regex.h2"
+    [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
+
+#line 373 "regex.h2"
+    [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
+#line 374 "regex.h2"
+    [[nodiscard]] auto parse_context::next() & -> bool{
+        if (has_next()) {
+            pos += 1; return true;
+        }
+
+        return false;
+     }
+#line 381 "regex.h2"
+    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next(); }
+
+#line 390 "regex.h2"
+    [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
+
+#line 392 "regex.h2"
+    auto generation_context::add_check(cpp2::in check) & -> void{
+        code += (cpp2::to_string(gen_tabs()) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
+    }
+
+#line 396 "regex.h2"
+    [[nodiscard]] auto generation_context::gen_tabs() const& -> std::string{
+        std::string tab {"  "};
+        std::string res {""};
+
+        auto i {0};
+        for( ; cpp2::cmp_less(i,tabs); i += 1 ) {
+            res += tab;
+        }
+        return tab;
+    }
+
+    regex_token::~regex_token() noexcept{}
+
+#line 410 "regex.h2"
+    //parse: (inout ctx: parse_context) -> std::shared_ptr;
+
+#line 423 "regex.h2"
+    stateless_regex_token::stateless_regex_token(cpp2::in str)
+        : regex_token{  }
+        , string_rep{ str }{
+
+#line 425 "regex.h2"
+    }
+
+#line 427 "regex.h2"
+    [[nodiscard]] auto stateless_regex_token::get_groups() const -> std::vector{return {  }; }
+#line 428 "regex.h2"
+    [[nodiscard]] auto stateless_regex_token::requires_state() const -> bool{return false; }
+#line 429 "regex.h2"
+    [[nodiscard]] auto stateless_regex_token::to_string() const -> std::string{return string_rep; }
+
+    stateless_regex_token::~stateless_regex_token() noexcept{}
+
+#line 437 "regex.h2"
+    char_token::char_token(cpp2::in t)
+        : stateless_regex_token{ std::string(1, t) }
+        , token{ t }{
+
+#line 440 "regex.h2"
+    }
+
+#line 442 "regex.h2"
+    [[nodiscard]] auto char_token::parse(parse_context& ctx) -> std::shared_ptr{
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx));
+    }
+
+#line 446 "regex.h2"
+    auto char_token::generate_code(generation_context& ctx) const -> void{
+        auto upper {safe_toupper(token)};
+        auto lower {safe_tolower(token)};
+        CPP2_UFCS(add_check)(ctx, ("match_char(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+    }
+
+    char_token::~char_token() noexcept{}
+
+#line 469 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1544,12 +1824,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 375 "regex.h2"
+#line 481 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 376 "regex.h2"
+#line 482 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 378 "regex.h2"
+#line 484 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -1565,7 +1845,7 @@ namespace regex {
         }
     }
 
-#line 393 "regex.h2"
+#line 499 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -1581,7 +1861,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 409 "regex.h2"
+#line 515 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1593,7 +1873,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 421 "regex.h2"
+#line 527 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1615,7 +1895,7 @@ namespace regex {
         }
     }
 
-#line 447 "regex.h2"
+#line 553 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -1627,19 +1907,19 @@ namespace regex {
         }
     }
 
-#line 458 "regex.h2"
+#line 564 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 459 "regex.h2"
+#line 565 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 465 "regex.h2"
+#line 571 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 466 "regex.h2"
+#line 572 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 467 "regex.h2"
+#line 573 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 474 "regex.h2"
+#line 580 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1659,12 +1939,12 @@ namespace regex {
         }
 
     }
-#line 493 "regex.h2"
+#line 599 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 494 "regex.h2"
+#line 600 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 497 "regex.h2"
+#line 603 "regex.h2"
 template [[nodiscard]] auto match_char(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1687,7 +1967,7 @@ template [[nodiscard]] auto match_cha
 
 }
 
-#line 524 "regex.h2"
+#line 630 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1707,7 +1987,7 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 543 "regex.h2"
+#line 649 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -1720,10 +2000,10 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 555 "regex.h2"
+#line 661 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 557 "regex.h2"
+#line 663 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -1735,18 +2015,18 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 572 "regex.h2"
+#line 678 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 577 "regex.h2"
+#line 683 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 578 "regex.h2"
+#line 684 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 584 "regex.h2"
+#line 690 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -1754,14 +2034,14 @@ template [[nodiscard]] auto match_cha
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 591 "regex.h2"
+#line 697 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 597 "regex.h2"
+#line 703 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -1784,7 +2064,7 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 621 "regex.h2"
+#line 727 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -1796,10 +2076,10 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 632 "regex.h2"
+#line 738 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 634 "regex.h2"
+#line 740 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -1809,14 +2089,14 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 645 "regex.h2"
+#line 751 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 646 "regex.h2"
+#line 752 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 647 "regex.h2"
+#line 753 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 653 "regex.h2"
+#line 759 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -1843,12 +2123,12 @@ template [[nodiscard]] auto match_cha
         }
 
     }
-#line 679 "regex.h2"
+#line 785 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 680 "regex.h2"
+#line 786 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 687 "regex.h2"
+#line 793 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -1861,12 +2141,12 @@ template [[nodiscard]] auto match_cha
         }}
     }
 
-#line 699 "regex.h2"
+#line 805 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 700 "regex.h2"
+#line 806 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 707 "regex.h2"
+#line 813 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -1876,12 +2156,12 @@ template [[nodiscard]] auto match_cha
         }
 
     }
-#line 716 "regex.h2"
+#line 822 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 717 "regex.h2"
+#line 823 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 724 "regex.h2"
+#line 830 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -1897,21 +2177,21 @@ template [[nodiscard]] auto match_cha
         }
 
     }
-#line 739 "regex.h2"
+#line 845 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 740 "regex.h2"
+#line 846 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 747 "regex.h2"
+#line 853 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 750 "regex.h2"
+#line 856 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 751 "regex.h2"
+#line 857 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 785 "regex.h2"
+#line 891 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, end_func, tail); 
@@ -1924,10 +2204,10 @@ template [[nodiscard]] auto match_cha
         }}
     }
 
-#line 797 "regex.h2"
+#line 903 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 799 "regex.h2"
+#line 905 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
@@ -1954,26 +2234,26 @@ template [[nodiscard]] auto match_cha
       return r; 
     }
 
-#line 825 "regex.h2"
+#line 931 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 830 "regex.h2"
+#line 936 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 835 "regex.h2"
+#line 941 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 841 "regex.h2"
+#line 947 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -1989,7 +2269,7 @@ template [[nodiscard]] auto match_cha
         return res; 
     }
 
-#line 856 "regex.h2"
+#line 962 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (end_func)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, Other()); 
@@ -2018,7 +2298,7 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 884 "regex.h2"
+#line 990 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, end_func, count)}; 
@@ -2043,7 +2323,7 @@ template [[nodiscard]] auto match_cha
         return Other::match(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 908 "regex.h2"
+#line 1014 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, end_func, count)}; 
@@ -2069,7 +2349,7 @@ template [[nodiscard]] auto match_cha
         return Other::match(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 938 "regex.h2"
+#line 1044 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (kind == range_flags::not_greedy) {
@@ -2082,7 +2362,7 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 957 "regex.h2"
+#line 1063 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2112,9 +2392,9 @@ template [[nodiscard]] auto match_cha
         }
 
     }
-#line 986 "regex.h2"
+#line 1092 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 987 "regex.h2"
+#line 1093 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2123,7 +2403,7 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1008 "regex.h2"
+#line 1114 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2133,34 +2413,34 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1019 "regex.h2"
+#line 1125 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1033 "regex.h2"
+#line 1139 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1036 "regex.h2"
+#line 1142 "regex.h2"
         }
 
-#line 1038 "regex.h2"
+#line 1144 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1039 "regex.h2"
+#line 1145 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1040 "regex.h2"
+#line 1146 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1041 "regex.h2"
+#line 1147 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1043 "regex.h2"
+#line 1149 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1044 "regex.h2"
+#line 1150 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1045 "regex.h2"
+#line 1151 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1047 "regex.h2"
+#line 1153 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2169,13 +2449,13 @@ template [[nodiscard]] auto match_cha
             return group_id; 
         }
 
-#line 1056 "regex.h2"
+#line 1162 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1057 "regex.h2"
+#line 1163 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1058 "regex.h2"
+#line 1164 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1059 "regex.h2"
+#line 1165 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2183,13 +2463,13 @@ template [[nodiscard]] auto match_cha
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1066 "regex.h2"
+#line 1172 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1067 "regex.h2"
+#line 1173 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1068 "regex.h2"
+#line 1174 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1069 "regex.h2"
+#line 1175 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2209,10 +2489,10 @@ template [[nodiscard]] auto match_cha
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1088 "regex.h2"
+#line 1194 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1093 "regex.h2"
+#line 1199 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2222,31 +2502,31 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1114 "regex.h2"
+#line 1220 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1117 "regex.h2"
+#line 1223 "regex.h2"
         }
 
-#line 1119 "regex.h2"
+#line 1225 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1120 "regex.h2"
+#line 1226 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1121 "regex.h2"
+#line 1227 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1122 "regex.h2"
+#line 1228 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1124 "regex.h2"
+#line 1230 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1125 "regex.h2"
+#line 1231 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1126 "regex.h2"
+#line 1232 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1128 "regex.h2"
+#line 1234 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)};
             if (-1 == group_id) {
@@ -2255,13 +2535,13 @@ template [[nodiscard]] auto match_cha
             return group_id;
         }
 
-#line 1137 "regex.h2"
+#line 1243 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1138 "regex.h2"
+#line 1244 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1139 "regex.h2"
+#line 1245 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1140 "regex.h2"
+#line 1246 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end};
 
@@ -2269,13 +2549,13 @@ template [[nodiscard]] auto match_cha
         return search_return(r.matched && r.pos == end, std::move(ctx));
     }
 
-#line 1147 "regex.h2"
+#line 1253 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1148 "regex.h2"
+#line 1254 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1149 "regex.h2"
+#line 1255 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1150 "regex.h2"
+#line 1256 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false};
         context ctx {start, end};
@@ -2295,10 +2575,10 @@ template [[nodiscard]] auto match_cha
         return search_return(std::move(matched), std::move(ctx));
     }
 
-#line 1169 "regex.h2"
+#line 1275 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1174 "regex.h2"
+#line 1280 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos;
@@ -2308,24 +2588,24 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1210 "regex.h2"
+#line 1316 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1216 "regex.h2"
+#line 1322 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1222 "regex.h2"
+#line 1328 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1224 "regex.h2"
+#line 1330 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2333,10 +2613,10 @@ template [[nodiscard]] auto match_cha
         static_cast(std::move(last));
     }
 
-#line 1231 "regex.h2"
+#line 1337 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1241 "regex.h2"
+#line 1347 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2345,29 +2625,29 @@ template [[nodiscard]] auto match_cha
         return g; 
     }
 
-#line 1249 "regex.h2"
+#line 1355 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1254 "regex.h2"
+#line 1360 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1281 "regex.h2"
+#line 1387 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1285 "regex.h2"
+#line 1391 "regex.h2"
     }
 
-#line 1289 "regex.h2"
+#line 1395 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2375,12 +2655,12 @@ template [[nodiscard]] auto match_cha
         return old_state; 
     }
 
-#line 1296 "regex.h2"
+#line 1402 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1303 "regex.h2"
+#line 1409 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2393,14 +2673,14 @@ template [[nodiscard]] auto match_cha
         return old_state; 
     }
 
-#line 1315 "regex.h2"
+#line 1421 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1324 "regex.h2"
+#line 1430 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2439,7 +2719,7 @@ template [[nodiscard]] auto match_cha
         return cur; 
     }
 
-#line 1362 "regex.h2"
+#line 1468 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2452,14 +2732,14 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1374 "regex.h2"
+#line 1480 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1375 "regex.h2"
+#line 1481 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1376 "regex.h2"
+#line 1482 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1380 "regex.h2"
+#line 1486 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2467,7 +2747,7 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 1387 "regex.h2"
+#line 1493 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2477,7 +2757,7 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 1396 "regex.h2"
+#line 1502 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2486,7 +2766,7 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1404 "regex.h2"
+#line 1510 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2497,12 +2777,12 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1414 "regex.h2"
+#line 1520 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1415 "regex.h2"
+#line 1521 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1417 "regex.h2"
+#line 1523 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2524,14 +2804,14 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1438 "regex.h2"
+#line 1544 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1439 "regex.h2"
+#line 1545 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1440 "regex.h2"
+#line 1546 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1442 "regex.h2"
+#line 1548 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2544,7 +2824,7 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 1454 "regex.h2"
+#line 1560 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2565,13 +2845,13 @@ template [[nodiscard]] auto match_cha
         return std::move(r.value()); 
     }
 
-#line 1476 "regex.h2"
+#line 1582 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1481 "regex.h2"
+#line 1587 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2584,10 +2864,10 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 1493 "regex.h2"
+#line 1599 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1499 "regex.h2"
+#line 1605 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2595,10 +2875,10 @@ template [[nodiscard]] auto match_cha
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1506 "regex.h2"
+#line 1612 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1508 "regex.h2"
+#line 1614 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -2615,7 +2895,7 @@ template [[nodiscard]] auto match_cha
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1524 "regex.h2"
+#line 1630 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2626,7 +2906,7 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 1536 "regex.h2"
+#line 1642 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -2638,7 +2918,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 1547 "regex.h2"
+#line 1653 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2675,7 +2955,7 @@ template [[nodiscard]] auto match_cha
         return r; 
     }
 
-#line 1583 "regex.h2"
+#line 1689 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2741,7 +3021,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 1651 "regex.h2"
+#line 1757 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -2750,7 +3030,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 1659 "regex.h2"
+#line 1765 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -2764,7 +3044,7 @@ template [[nodiscard]] auto match_cha
         return false; 
     }
 
-#line 1672 "regex.h2"
+#line 1778 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -2773,7 +3053,7 @@ template [[nodiscard]] auto match_cha
 
     }
 
-#line 1680 "regex.h2"
+#line 1786 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -2881,7 +3161,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 1787 "regex.h2"
+#line 1893 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3049,7 +3329,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 1954 "regex.h2"
+#line 2060 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3182,7 +3462,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 2086 "regex.h2"
+#line 2192 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3190,7 +3470,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 2093 "regex.h2"
+#line 2199 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3254,7 +3534,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 2156 "regex.h2"
+#line 2262 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3291,7 +3571,7 @@ template [[nodiscard]] auto match_cha
         return true; 
     }
 
-#line 2192 "regex.h2"
+#line 2298 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3314,32 +3594,28 @@ template [[nodiscard]] auto match_cha
         }
     }
 
-#line 2214 "regex.h2"
+#line 2320 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
-        char c {current()};
-        for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
-            if (c == term) {break; }
+        parse_context parse_ctx {regex};
 
-            // if !has_error && is_alternative(c) { continue; }
-            // if !has_error && is_any(c) { continue; }
-            // if !has_error && is_class(c) { continue; }
-            // if !has_error && is_escape(c) { continue; }
-            // if !has_error && is_anchor(c) { continue; }
-            // if !has_error && is_group(c) { continue; }
-            // if !has_error && is_handle_special(c) { continue; }
-            // if !has_error && is_range(c) { continue; }
-            // if !has_error && is_special_range(c) { continue; }
+        std::shared_ptr cur_token {};
 
-            if (has_error) {break; }
+        for( ; CPP2_UFCS(valid)(parse_ctx); static_cast(CPP2_UFCS(next)(parse_ctx)) ) {
+            if (term == CPP2_UFCS(current)(parse_ctx)) {break; }
 
-            // No special char, push a character match
-            CPP2_UFCS(add)(cur_group_state, ("if !cpp2::regex::match_char(r.pos, ctx, modifiers) { r = ctx.fail(); return r; }\n"));
+            cur_token = char_token::parse(parse_ctx);
+
+            if (cur_token && CPP2_UFCS(valid)(parse_ctx)) {
+                CPP2_UFCS(add_token)(parse_ctx, cur_token);
+            }else {
+                // TODO: error(parse_ctx);
+            }
         }
 
-        return generate_parse_func(cur_group_state.cur_match_list);
+        return generate_parse_func(std::move(parse_ctx));
     }
 
-#line 2238 "regex.h2"
+#line 2340 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"};
 
@@ -3362,18 +3638,20 @@ template [[nodiscard]] auto match_cha
         return res;
     }
 
-#line 2260 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::generate_parse_func(auto const& matcher_list) & -> std::string{
+#line 2362 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::generate_parse_func(cpp2::in ctx) & -> std::string{
         auto cur_id {parse_func};
         parse_func += 1;
         std::string name {"func_" + cpp2::to_string(std::move(cur_id))};
+        generation_context gen_ctx {};
 
         source += (cpp2::to_string(name) + ": type = {\n");
         source += "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
         source += "    r:= ctx.pass(cur);\n";
-        for ( auto const& matcher : matcher_list ) {
-            source += matcher;
+        for ( auto const& matcher : ctx.cur_state ) {
+            CPP2_UFCS(generate_code)((*cpp2::assert_not_null(matcher)), gen_ctx);
         }
+        source += std::move(gen_ctx).code;
         source += "\n";
         source += "    r = other(r.pos, ctx, modifiers);\n";
         source += "    return r;\n";
@@ -3383,7 +3661,7 @@ template [[nodiscard]] auto match_cha
         return name;
     }
 
-#line 2280 "regex.h2"
+#line 2384 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
 
@@ -3403,14 +3681,14 @@ template [[nodiscard]] auto match_cha
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2300 "regex.h2"
+#line 2404 "regex.h2"
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
         return source;
     }
 
-#line 2307 "regex.h2"
+#line 2411 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index f316872d95..03a5edbe89 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -346,6 +346,112 @@ special_syntax_wrapper:  type = {
     to_string:    () syntax.str();
 }
 
+//-----------------------------------------------------------------------
+//
+// Matchers and generators for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
+
+parse_context: type = {
+    regex: std::string_view;
+
+    pos: size_t = 0;
+
+    public cur_state: std::vector> = ();
+
+    operator=:(out this, r: std::string_view) = {
+        regex = r;
+    }
+
+    add_token: (inout this, token: std::shared_ptr) = {
+        cur_state.push_back(token);
+    }
+
+    current: (this) -> char = { return regex[pos]; }
+
+    has_next: (this) -> bool = { return pos < regex.size(); }
+    next: (inout this) -> bool = {
+        if has_next() {
+            pos += 1; return true;
+        }
+
+        return false;
+     }
+    valid: (this) -> bool = { return has_next(); }
+
+
+}
+generation_context: @struct type = {
+
+    code: std::string = "";
+    tabs: int = 2;
+
+    match_parameters: (this) -> std::string = { return "r.pos, ctx, modifiers"; }
+
+    add_check: (inout this, check: std::string) = {
+        code += "(gen_tabs())$if !cpp2::regex::(check)$ { r = ctx.fail(); return r; }\n";
+    }
+
+    gen_tabs: (this) -> std::string = {
+        tab : std::string = "  ";
+        res : std::string = "";
+
+        i := 0;
+        while i < tabs next i += 1 {
+            res += tab;
+        }
+        return tab;
+    }
+}
+
+regex_token: @interface type = {
+
+    //parse: (inout ctx: parse_context) -> std::shared_ptr;
+    generate_code: (this, inout _: generation_context);
+
+    get_groups: (this) -> std::vector;
+    requires_state: (this) -> bool;
+    to_string: (this) -> std::string;
+}
+
+stateless_regex_token: @polymorphic_base type = {
+    this: regex_token = ();
+
+    string_rep: std::string;
+
+    operator=:(out this, str: std::string) = {
+        string_rep = str;
+    }
+
+    get_groups: (override this) -> std::vector = { return (); }
+    requires_state: (override this) -> bool         = { return false; }
+    to_string: (override this) -> std::string       = { return string_rep; }
+}
+
+char_token: @polymorphic_base type = {
+    this: stateless_regex_token;
+
+    token: char;
+
+    operator=: (out this, t: char) = {
+        stateless_regex_token = std::string(1, t);
+        token = t;
+    }
+
+    parse: (inout ctx: parse_context) -> std::shared_ptr = {
+        return shared.new(ctx.current());
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        upper: = safe_toupper(token);
+        lower: = safe_tolower(token);
+        ctx.add_check("match_char((ctx.match_parameters())$)");
+    }
+}
+
+
+
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -2212,27 +2318,23 @@ regex_parser:  type = {
     }
 
     parse_until_new:(inout this, term: char) -> std::string = {
-        c: char = current();
-        while c != '\n' next _ = next(out c) {
-            if c == term { break; }
+        parse_ctx: parse_context = (regex);
 
-            // if !has_error && is_alternative(c) { continue; }
-            // if !has_error && is_any(c) { continue; }
-            // if !has_error && is_class(c) { continue; }
-            // if !has_error && is_escape(c) { continue; }
-            // if !has_error && is_anchor(c) { continue; }
-            // if !has_error && is_group(c) { continue; }
-            // if !has_error && is_handle_special(c) { continue; }
-            // if !has_error && is_range(c) { continue; }
-            // if !has_error && is_special_range(c) { continue; }
+        cur_token: std::shared_ptr = ();
 
-            if has_error { break; }
+        while parse_ctx.valid() next _ = parse_ctx.next() {
+            if term == parse_ctx.current() { break; }
 
-            // No special char, push a character match
-            cur_group_state.add("if !cpp2::regex::match_char(r.pos, ctx, modifiers) { r = ctx.fail(); return r; }\n");
+            cur_token = char_token::parse(parse_ctx);
+
+            if cur_token && parse_ctx.valid() {
+                parse_ctx.add_token(cur_token);
+            } else {
+                // TODO: error(parse_ctx);
+            }
         }
 
-        return generate_parse_func(cur_group_state.cur_match_list);
+        return generate_parse_func(parse_ctx);
     }
 
     create_named_group_lookup: (this) -> std::string = {
@@ -2257,17 +2359,19 @@ regex_parser:  type = {
         return res;
     }
 
-    generate_parse_func: (inout this, matcher_list) -> std::string = {
+    generate_parse_func: (inout this, ctx: parse_context) -> std::string = {
         cur_id : = parse_func;
         parse_func += 1;
         name: std::string = "func_(cur_id)$";
+        gen_ctx: generation_context = ();
 
         source += "(name)$: type = {\n";
         source += "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
         source += "    r:= ctx.pass(cur);\n";
-        for matcher_list do (matcher) {
-            source += matcher;
+        for ctx.cur_state do (matcher) {
+            matcher*.generate_code(gen_ctx);
         }
+        source += gen_ctx.code;
         source += "\n";
         source += "    r = other(r.pos, ctx, modifiers);\n";
         source += "    return r;\n";

From 702aa6ae254626c73e8747cd36fd1c58c93d99ec Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 5 May 2024 14:10:18 +0200
Subject: [PATCH 097/161] Moved and renamed char token matcher.

---
 include/cpp2regex.h | 204 ++++++++++++++++++++++----------------------
 source/regex.h2     |  46 +++++-----
 2 files changed, 125 insertions(+), 125 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index fd345db3f7..6ae522055f 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -87,7 +87,7 @@ template class special_synta
 
 #line 356 "regex.h2"
 class parse_context;
-
+    
 
 #line 385 "regex.h2"
 class generation_context;
@@ -97,23 +97,23 @@ class regex_token;
 
 #line 418 "regex.h2"
 class stateless_regex_token;
-
+    
 
 #line 432 "regex.h2"
 class char_token;
+    
 
-
-#line 467 "regex.h2"
+#line 489 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 551 "regex.h2"
+#line 573 "regex.h2"
 template class any_matcher_logic;
 
-#line 570 "regex.h2"
+#line 592 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 578 "regex.h2"
+#line 600 "regex.h2"
 template class char_matcher_logic;
 
 #line 628 "regex.h2"
@@ -534,11 +534,11 @@ template class special_synta
 
 #line 356 "regex.h2"
 class parse_context {
-    private: std::string_view regex;
+    private: std::string_view regex; 
 
-    private: size_t pos {0};
+    private: size_t pos {0}; 
 
-    public: std::vector> cur_state {};
+    public: std::vector> cur_state {}; 
 
     public: explicit parse_context(cpp2::in r);
 #line 363 "regex.h2"
@@ -563,8 +563,8 @@ class parse_context {
 };
 class generation_context {
 
-    public: std::string code {""};
-    public: int tabs {2};
+    public: std::string code {""}; 
+    public: int tabs {2}; 
 
     public: [[nodiscard]] auto match_parameters() const& -> std::string;
 
@@ -596,7 +596,7 @@ class regex_token {
 class stateless_regex_token: public regex_token {
 
 #line 421 "regex.h2"
-    private: std::string string_rep;
+    private: std::string string_rep; 
 
     public: explicit stateless_regex_token(cpp2::in str);
 
@@ -615,7 +615,7 @@ class stateless_regex_token: public regex_token {
 class char_token: public stateless_regex_token {
 
 #line 435 "regex.h2"
-    private: char token;
+    private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
@@ -633,7 +633,9 @@ class char_token: public stateless_regex_token {
 #line 451 "regex.h2"
 };
 
-#line 455 "regex.h2"
+template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 477 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -641,7 +643,7 @@ class char_token: public stateless_regex_token {
 //-----------------------------------------------------------------------
 //
 
-#line 463 "regex.h2"
+#line 485 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -650,20 +652,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 481 "regex.h2"
+#line 503 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 499 "regex.h2"
+#line 521 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 547 "regex.h2"
+#line 569 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -672,14 +674,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 564 "regex.h2"
+#line 586 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 566 "regex.h2"
+#line 588 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -692,7 +694,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 574 "regex.h2"
+#line 596 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -701,18 +703,16 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 599 "regex.h2"
+#line 621 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 601 "regex.h2"
+#line 623 "regex.h2"
 };
 
-template [[nodiscard]] auto match_char(auto& cur, auto& ctx, auto const& modifiers) -> bool;
-
 #line 626 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
@@ -1070,8 +1070,8 @@ template class regular_expression_with_matcher
 
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
-        public: bool matched;
-        public: context ctx;
+        public: bool matched; 
+        public: context ctx; 
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
@@ -1191,8 +1191,8 @@ template class regex_parser {
     private: std::map named_groups {}; 
     private: bool has_error {false}; 
 
-    private: int parse_func {0};
-    private: std::string source {""};
+    private: int parse_func {0}; 
+    private: std::string source {""}; 
 
     private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
                                                    "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
@@ -1739,10 +1739,10 @@ namespace regex {
 #line 374 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
-            pos += 1; return true;
+            pos += 1; return true; 
         }
 
-        return false;
+        return false; 
      }
 #line 381 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next(); }
@@ -1757,14 +1757,14 @@ namespace regex {
 
 #line 396 "regex.h2"
     [[nodiscard]] auto generation_context::gen_tabs() const& -> std::string{
-        std::string tab {"  "};
-        std::string res {""};
+        std::string tab {"  "}; 
+        std::string res {""}; 
 
-        auto i {0};
+        auto i {0}; 
         for( ; cpp2::cmp_less(i,tabs); i += 1 ) {
             res += tab;
         }
-        return tab;
+        return tab; 
     }
 
     regex_token::~regex_token() noexcept{}
@@ -1799,19 +1799,42 @@ namespace regex {
 
 #line 442 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> std::shared_ptr{
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx));
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
 #line 446 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
-        auto upper {safe_toupper(token)};
-        auto lower {safe_tolower(token)};
-        CPP2_UFCS(add_check)(ctx, ("match_char(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        auto upper {safe_toupper(token)}; 
+        auto lower {safe_tolower(token)}; 
+        CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     char_token::~char_token() noexcept{}
 
-#line 469 "regex.h2"
+#line 453 "regex.h2"
+template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+    if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+        if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
+            cur += 1;
+            return true; 
+        }
+        else {
+            return false; 
+        }
+    }
+    else {
+        if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
+            cur += 1;
+            return true; 
+        }
+        else {
+            return false; 
+        }
+    }
+
+}
+
+#line 491 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1824,12 +1847,12 @@ namespace regex {
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 481 "regex.h2"
+#line 503 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 482 "regex.h2"
+#line 504 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 484 "regex.h2"
+#line 506 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -1845,7 +1868,7 @@ namespace regex {
         }
     }
 
-#line 499 "regex.h2"
+#line 521 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -1861,7 +1884,7 @@ namespace regex {
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 515 "regex.h2"
+#line 537 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1873,7 +1896,7 @@ namespace regex {
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 527 "regex.h2"
+#line 549 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1895,7 +1918,7 @@ namespace regex {
         }
     }
 
-#line 553 "regex.h2"
+#line 575 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -1907,19 +1930,19 @@ namespace regex {
         }
     }
 
-#line 564 "regex.h2"
+#line 586 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 565 "regex.h2"
+#line 587 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 571 "regex.h2"
+#line 593 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 572 "regex.h2"
+#line 594 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 573 "regex.h2"
+#line 595 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 580 "regex.h2"
+#line 602 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1939,34 +1962,11 @@ namespace regex {
         }
 
     }
-#line 599 "regex.h2"
+#line 621 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 600 "regex.h2"
+#line 622 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 603 "regex.h2"
-template [[nodiscard]] auto match_char(auto& cur, auto& ctx, auto const& modifiers) -> bool{
-    if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
-        if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
-            cur += 1;
-            return true;
-        }
-        else {
-            return false;
-        }
-    }
-    else {
-        if (cur != ctx.end && *cpp2::assert_not_null(cur) == C) {
-            cur += 1;
-            return true;
-        }
-        else {
-            return false;
-        }
-    }
-
-}
-
 #line 630 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
@@ -2528,11 +2528,11 @@ template [[nodiscard]] auto match_cha
 
 #line 1234 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
-            auto group_id {Matcher::get_named_group_index(g)};
+            auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
                 // TODO: Throw error.
             }
-            return group_id;
+            return group_id; 
         }
 
 #line 1243 "regex.h2"
@@ -2543,10 +2543,10 @@ template [[nodiscard]] auto match_cha
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
 #line 1246 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
-        context ctx {start, end};
+        context ctx {start, end}; 
 
-        auto r {Matcher::entry(start, ctx, modifiers())};
-        return search_return(r.matched && r.pos == end, std::move(ctx));
+        auto r {Matcher::entry(start, ctx, modifiers())}; 
+        return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
 #line 1253 "regex.h2"
@@ -2557,10 +2557,10 @@ template [[nodiscard]] auto match_cha
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
 #line 1256 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
-        auto matched {false};
-        context ctx {start, end};
+        auto matched {false}; 
+        context ctx {start, end}; 
 
-        auto cur {start};
+        auto cur {start}; 
         for( ; true; (++cur) ) {
             if (Matcher::entry(cur, ctx, modifiers()).matched) {
                 matched = true;
@@ -2572,7 +2572,7 @@ template [[nodiscard]] auto match_cha
             }
         }
 
-        return search_return(std::move(matched), std::move(ctx));
+        return search_return(std::move(matched), std::move(ctx)); 
     }
 
 #line 1275 "regex.h2"
@@ -2581,10 +2581,10 @@ template [[nodiscard]] auto match_cha
 #line 1280 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
-            return CPP2_UFCS(begin)(str) + pos;
+            return CPP2_UFCS(begin)(str) + pos; 
         }
         else {
-            return CPP2_UFCS(end)(str);
+            return CPP2_UFCS(end)(str); 
         }
     }
 
@@ -3596,9 +3596,9 @@ template [[nodiscard]] auto match_cha
 
 #line 2320 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
-        parse_context parse_ctx {regex};
+        parse_context parse_ctx {regex}; 
 
-        std::shared_ptr cur_token {};
+        std::shared_ptr cur_token {}; 
 
         for( ; CPP2_UFCS(valid)(parse_ctx); static_cast(CPP2_UFCS(next)(parse_ctx)) ) {
             if (term == CPP2_UFCS(current)(parse_ctx)) {break; }
@@ -3612,15 +3612,15 @@ template [[nodiscard]] auto match_cha
             }
         }
 
-        return generate_parse_func(std::move(parse_ctx));
+        return generate_parse_func(std::move(parse_ctx)); 
     }
 
 #line 2340 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
-        std::string res {"get_named_group_index: (name) -> int = {\n"};
+        std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
         // Generate if selection.
-        std::string sep {""};
+        std::string sep {""}; 
         for ( auto const& cur : named_groups ) {
             res += (cpp2::to_string(sep) + "if name == \"" + cpp2::to_string(cur.first) + "\" { return " + cpp2::to_string(cur.second) + "; }");
             sep = "else ";
@@ -3635,15 +3635,15 @@ template [[nodiscard]] auto match_cha
             res += "  else { return -1; }\n";
         }
         res += "}\n";
-        return res;
+        return res; 
     }
 
 #line 2362 "regex.h2"
     template  [[nodiscard]] auto regex_parser::generate_parse_func(cpp2::in ctx) & -> std::string{
-        auto cur_id {parse_func};
+        auto cur_id {parse_func}; 
         parse_func += 1;
-        std::string name {"func_" + cpp2::to_string(std::move(cur_id))};
-        generation_context gen_ctx {};
+        std::string name {"func_" + cpp2::to_string(std::move(cur_id))}; 
+        generation_context gen_ctx {}; 
 
         source += (cpp2::to_string(name) + ": type = {\n");
         source += "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
@@ -3658,7 +3658,7 @@ template [[nodiscard]] auto match_cha
         source += "  }\n";
         source += "}\n";
 
-        return name;
+        return name; 
     }
 
 #line 2384 "regex.h2"
@@ -3669,7 +3669,7 @@ template [[nodiscard]] auto match_cha
         source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
         source += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
 
-        auto start_name {parse_until_new('\0')};
+        auto start_name {parse_until_new('\0')}; 
         source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
         source += "    ctx.set_group_start(0, cur);";
         source += ("    r := " + cpp2::to_string(std::move(start_name)) + "()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
@@ -3685,7 +3685,7 @@ template [[nodiscard]] auto match_cha
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
-        return source;
+        return source; 
     }
 
 #line 2411 "regex.h2"
diff --git a/source/regex.h2 b/source/regex.h2
index 03a5edbe89..c089c17edd 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -446,10 +446,32 @@ char_token: @polymorphic_base type = {
     generate_code: (override this, inout ctx: generation_context) = {
         upper: = safe_toupper(token);
         lower: = safe_tolower(token);
-        ctx.add_check("match_char((ctx.match_parameters())$)");
+        ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
     }
 }
 
+char_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
+    if modifiers.has_flag(expression_flags::case_insensitive) {
+        if cur != ctx.end && (cur* == L || cur* == U) {
+            cur += 1;
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+    else {
+        if cur != ctx.end && cur* == C {
+            cur += 1;
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+}
+
 
 
 //-----------------------------------------------------------------------
@@ -600,28 +622,6 @@ char_matcher_logic:  type =
     to_string:    ()  bstring(1, C);
 }
 
-match_char:  (inout cur, inout ctx, modifiers) -> bool = {
-    if modifiers.has_flag(expression_flags::case_insensitive) {
-        if cur != ctx.end && (cur* == L || cur* == U) {
-            cur += 1;
-            return true;
-        }
-        else {
-            return false;
-        }
-    }
-    else {
-        if cur != ctx.end && cur* == C {
-            cur += 1;
-            return true;
-        }
-        else {
-            return false;
-        }
-    }
-
-}
-
 
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //

From 586788a762bb5149099cda9ae8a3738ccfce7f45 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 5 May 2024 16:25:40 +0200
Subject: [PATCH 098/161] Parsing of ranges.

---
 include/cpp2regex.h | 1035 +++++++++++++++++++++++++++----------------
 source/regex.h2     |  253 ++++++++++-
 2 files changed, 889 insertions(+), 399 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 6ae522055f..22df701144 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -89,110 +89,114 @@ template class special_synta
 class parse_context;
     
 
-#line 385 "regex.h2"
+#line 485 "regex.h2"
 class generation_context;
 
-#line 408 "regex.h2"
+#line 508 "regex.h2"
 class regex_token;
 
-#line 418 "regex.h2"
-class stateless_regex_token;
+#line 526 "regex.h2"
+class regex_token_base;
     
 
-#line 432 "regex.h2"
+#line 536 "regex.h2"
 class char_token;
     
 
-#line 489 "regex.h2"
+#line 578 "regex.h2"
+class range_token;
+    
+
+#line 696 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 573 "regex.h2"
+#line 780 "regex.h2"
 template class any_matcher_logic;
 
-#line 592 "regex.h2"
+#line 799 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 600 "regex.h2"
+#line 807 "regex.h2"
 template class char_matcher_logic;
 
-#line 628 "regex.h2"
+#line 835 "regex.h2"
 template class class_matcher_logic;
 
-#line 677 "regex.h2"
+#line 884 "regex.h2"
 template class global_group_reset;
     
 
-#line 689 "regex.h2"
+#line 896 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 726 "regex.h2"
+#line 933 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 750 "regex.h2"
+#line 957 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 758 "regex.h2"
+#line 965 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 791 "regex.h2"
+#line 998 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 811 "regex.h2"
+#line 1018 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 828 "regex.h2"
+#line 1035 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 851 "regex.h2"
+#line 1058 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 863 "regex.h2"
+#line 1070 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 889 "regex.h2"
-template class range_matcher_logic;
+#line 1096 "regex.h2"
+template class range_matcher_logic;
 
-#line 1042 "regex.h2"
-template class special_range_matcher_logic;
+#line 1249 "regex.h2"
+template class special_range_matcher_logic;
     
 
-#line 1061 "regex.h2"
+#line 1268 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1112 "regex.h2"
+#line 1319 "regex.h2"
 template class group_name_list;
 
-#line 1124 "regex.h2"
+#line 1331 "regex.h2"
 class group_name_list_end;
     
 
-#line 1129 "regex.h2"
+#line 1336 "regex.h2"
 template class regular_expression;
 
-#line 1210 "regex.h2"
+#line 1417 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1299 "regex.h2"
+#line 1506 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1306 "regex.h2"
+#line 1513 "regex.h2"
 class regex_parser_group_state;
 
-#line 1341 "regex.h2"
+#line 1548 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1368 "regex.h2"
+#line 1575 "regex.h2"
 template class regex_parser;
 
-#line 2418 "regex.h2"
+#line 2627 "regex.h2"
 }
 }
 
@@ -538,28 +542,55 @@ class parse_context {
 
     private: size_t pos {0}; 
 
+    private: std::string error_text {""}; 
+
     public: std::vector> cur_state {}; 
 
     public: explicit parse_context(cpp2::in r);
-#line 363 "regex.h2"
+#line 365 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 367 "regex.h2"
+#line 369 "regex.h2"
     public: auto add_token(cpp2::in> token) & -> void;
 
-#line 371 "regex.h2"
+#line 373 "regex.h2"
+    public: [[nodiscard]] auto has_token() const& -> bool;
+
+#line 377 "regex.h2"
+    public: [[nodiscard]] auto pop_token() & -> std::shared_ptr;
+
+#line 387 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     public: [[nodiscard]] auto has_next() const& -> bool;
     public: [[nodiscard]] auto next() & -> bool;
 
-#line 381 "regex.h2"
+#line 398 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
+
+    public: [[nodiscard]] auto error(cpp2::in err) & -> std::shared_ptr;
+
+#line 405 "regex.h2"
+    private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
+
+#line 445 "regex.h2"
+    private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
+
+#line 466 "regex.h2"
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
+    public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
+
+    private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
+
+#line 480 "regex.h2"
+    public: [[nodiscard]] auto peek() const& -> auto;
+    public: [[nodiscard]] auto peek_in_class() const& -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 384 "regex.h2"
+#line 484 "regex.h2"
 };
 class generation_context {
 
@@ -570,59 +601,59 @@ class generation_context {
 
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 396 "regex.h2"
+#line 496 "regex.h2"
     public: [[nodiscard]] auto gen_tabs() const& -> std::string;
 
-#line 406 "regex.h2"
+#line 506 "regex.h2"
 };
 
 class regex_token {
 
-#line 411 "regex.h2"
+    public: bool needs_state; 
+    public: std::string string_rep; 
+
+    public: explicit regex_token(cpp2::in state, cpp2::in str);
+
+#line 519 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
-    public: [[nodiscard]] virtual auto requires_state() const -> bool = 0;
-    public: [[nodiscard]] virtual auto to_string() const -> std::string = 0;
+    public: [[nodiscard]] auto requires_state() const& -> bool;
+    public: [[nodiscard]] auto to_string() const& -> std::string;
     public: virtual ~regex_token() noexcept;
 
-    public: regex_token() = default;
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 416 "regex.h2"
+#line 524 "regex.h2"
 };
 
-class stateless_regex_token: public regex_token {
-
-#line 421 "regex.h2"
-    private: std::string string_rep; 
+class regex_token_base: public regex_token {
 
-    public: explicit stateless_regex_token(cpp2::in str);
+#line 529 "regex.h2"
+    public: explicit regex_token_base(cpp2::in state, cpp2::in str);
 
-#line 427 "regex.h2"
+#line 533 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
-    public: [[nodiscard]] auto requires_state() const -> bool override;
-    public: [[nodiscard]] auto to_string() const -> std::string override;
-    public: virtual ~stateless_regex_token() noexcept;
+    public: virtual ~regex_token_base() noexcept;
 
-    public: stateless_regex_token(stateless_regex_token const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(stateless_regex_token const&) -> void = delete;
+    public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 430 "regex.h2"
+#line 534 "regex.h2"
 };
 
-class char_token: public stateless_regex_token {
+class char_token: public regex_token_base {
 
-#line 435 "regex.h2"
+#line 539 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 442 "regex.h2"
+#line 546 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> std::shared_ptr;
 
-#line 446 "regex.h2"
+#line 550 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -630,12 +661,40 @@ class char_token: public stateless_regex_token {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 451 "regex.h2"
+#line 555 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 477 "regex.h2"
+#line 578 "regex.h2"
+class range_token: public regex_token {
+
+#line 581 "regex.h2"
+    private: int min_count {-1}; 
+    private: int max_count {-1}; 
+    private: int kind {range_flags::greedy}; 
+    private: std::shared_ptr inner_token {nullptr}; 
+
+    public: explicit range_token();
+
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> std::shared_ptr;
+
+#line 651 "regex.h2"
+    public: [[nodiscard]] auto gen_string() const& -> std::string;
+
+#line 675 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+
+#line 681 "regex.h2"
+    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+    public: virtual ~range_token() noexcept;
+
+    public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(range_token const&) -> void = delete;
+
+#line 682 "regex.h2"
+};
+
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -643,7 +702,7 @@ template [[nodiscard]] auto char_toke
 //-----------------------------------------------------------------------
 //
 
-#line 485 "regex.h2"
+#line 692 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -652,20 +711,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 503 "regex.h2"
+#line 710 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 521 "regex.h2"
+#line 728 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 569 "regex.h2"
+#line 776 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -674,14 +733,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 586 "regex.h2"
+#line 793 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 588 "regex.h2"
+#line 795 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -694,7 +753,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 596 "regex.h2"
+#line 803 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -703,27 +762,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 621 "regex.h2"
+#line 828 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 623 "regex.h2"
+#line 830 "regex.h2"
 };
 
-#line 626 "regex.h2"
+#line 833 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 649 "regex.h2"
+#line 856 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 661 "regex.h2"
+#line 868 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -732,7 +791,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 673 "regex.h2"
+#line 880 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -740,14 +799,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 683 "regex.h2"
+#line 890 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 685 "regex.h2"
+#line 892 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -755,23 +814,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 697 "regex.h2"
+#line 904 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 703 "regex.h2"
+#line 910 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 724 "regex.h2"
+#line 931 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 738 "regex.h2"
+#line 945 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -780,7 +839,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 748 "regex.h2"
+#line 955 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -791,7 +850,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 754 "regex.h2"
+#line 961 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -799,14 +858,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 785 "regex.h2"
+#line 992 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 787 "regex.h2"
+#line 994 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -815,14 +874,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 805 "regex.h2"
+#line 1012 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 807 "regex.h2"
+#line 1014 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -831,14 +890,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 822 "regex.h2"
+#line 1029 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 824 "regex.h2"
+#line 1031 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -847,14 +906,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 845 "regex.h2"
+#line 1052 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 847 "regex.h2"
+#line 1054 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -863,14 +922,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 856 "regex.h2"
+#line 1063 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 858 "regex.h2"
+#line 1065 "regex.h2"
 };
 
 // Named character classes
@@ -882,7 +941,7 @@ template                    void = delete;
 
 
-#line 865 "regex.h2"
+#line 1072 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -892,7 +951,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 875 "regex.h2"
+#line 1082 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -904,48 +963,48 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 888 "regex.h2"
+#line 1095 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
-template class range_matcher_logic {
+template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 903 "regex.h2"
+#line 1110 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 931 "regex.h2"
+#line 1138 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 936 "regex.h2"
+#line 1143 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 941 "regex.h2"
+#line 1148 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 947 "regex.h2"
+#line 1154 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto;
 
-#line 962 "regex.h2"
+#line 1169 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return;
 
-#line 990 "regex.h2"
+#line 1197 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
 
-#line 1014 "regex.h2"
+#line 1221 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 1038 "regex.h2"
+#line 1245 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
-template class special_range_matcher_logic: public range_matcher_logic {
+template class special_range_matcher_logic: public range_matcher_logic {
 
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: special_range_matcher_logic() = default;
@@ -953,7 +1012,7 @@ template void = delete;
 
 
-#line 1055 "regex.h2"
+#line 1262 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -964,7 +1023,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1092 "regex.h2"
+#line 1299 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -972,10 +1031,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1100 "regex.h2"
+#line 1307 "regex.h2"
 };
 
-#line 1103 "regex.h2"
+#line 1310 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -993,7 +1052,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1122 "regex.h2"
+#line 1329 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1002,7 +1061,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1126 "regex.h2"
+#line 1333 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1018,7 +1077,7 @@ template matched_, context const& ctx_);
 
-#line 1144 "regex.h2"
+#line 1351 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1033,7 +1092,7 @@ template void = delete;
 
 
-#line 1160 "regex.h2"
+#line 1367 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1041,13 +1100,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1172 "regex.h2"
+#line 1379 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1194 "regex.h2"
+#line 1401 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1059,7 +1118,7 @@ template void = delete;
 
 
-#line 1207 "regex.h2"
+#line 1414 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1075,7 +1134,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1225 "regex.h2"
+#line 1432 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1090,7 +1149,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1241 "regex.h2"
+#line 1448 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1098,13 +1157,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1253 "regex.h2"
+#line 1460 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1275 "regex.h2"
+#line 1482 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1116,7 +1175,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1288 "regex.h2"
+#line 1495 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1147,15 +1206,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1322 "regex.h2"
+#line 1529 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1328 "regex.h2"
+#line 1535 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1337 "regex.h2"
+#line 1544 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1168,13 +1227,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1355 "regex.h2"
+#line 1562 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1360 "regex.h2"
+#line 1567 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1365 "regex.h2"
+#line 1572 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1199,156 +1258,156 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1393 "regex.h2"
+#line 1600 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1402 "regex.h2"
+#line 1609 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1406 "regex.h2"
+#line 1613 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1421 "regex.h2"
+#line 1628 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1427 "regex.h2"
+#line 1634 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1468 "regex.h2"
+#line 1675 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1480 "regex.h2"
+#line 1687 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1486 "regex.h2"
+#line 1693 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1493 "regex.h2"
+#line 1700 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1502 "regex.h2"
+#line 1709 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1510 "regex.h2"
+#line 1717 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1520 "regex.h2"
+#line 1727 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1544 "regex.h2"
+#line 1751 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1560 "regex.h2"
+#line 1767 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1580 "regex.h2"
+#line 1787 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1587 "regex.h2"
+#line 1794 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1599 "regex.h2"
+#line 1806 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1602 "regex.h2"
+#line 1809 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1612 "regex.h2"
+#line 1819 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1630 "regex.h2"
+#line 1837 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1640 "regex.h2"
+#line 1847 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1653 "regex.h2"
+#line 1860 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1689 "regex.h2"
+#line 1896 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1754 "regex.h2"
+#line 1961 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1765 "regex.h2"
+#line 1972 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1778 "regex.h2"
+#line 1985 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1786 "regex.h2"
+#line 1993 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 1893 "regex.h2"
+#line 2100 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2060 "regex.h2"
+#line 2267 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2192 "regex.h2"
+#line 2399 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2199 "regex.h2"
+#line 2406 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2262 "regex.h2"
+#line 2469 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2298 "regex.h2"
+#line 2505 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2320 "regex.h2"
+#line 2527 "regex.h2"
     public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
 
-#line 2340 "regex.h2"
+#line 2549 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2362 "regex.h2"
+#line 2571 "regex.h2"
     public: [[nodiscard]] auto generate_parse_func(cpp2::in ctx) & -> std::string;
 
-#line 2384 "regex.h2"
+#line 2593 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2409 "regex.h2"
+#line 2618 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2418 "regex.h2"
+#line 2627 "regex.h2"
 }
 }
 
@@ -1710,52 +1769,161 @@ namespace regex {
 //-----------------------------------------------------------------------
 //
 
-#line 363 "regex.h2"
+#line 365 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 365 "regex.h2"
+#line 367 "regex.h2"
     }
-#line 363 "regex.h2"
+#line 365 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
+        error_text = "";
         cur_state = {};
         return *this;
 
-#line 365 "regex.h2"
+#line 367 "regex.h2"
     }
 
-#line 367 "regex.h2"
+#line 369 "regex.h2"
     auto parse_context::add_token(cpp2::in> token) & -> void{
         CPP2_UFCS(push_back)(cur_state, token);
     }
 
-#line 371 "regex.h2"
+#line 373 "regex.h2"
+    [[nodiscard]] auto parse_context::has_token() const& -> bool{
+        return !(CPP2_UFCS(empty)(cur_state)); 
+    }
+
+#line 377 "regex.h2"
+    [[nodiscard]] auto parse_context::pop_token() & -> std::shared_ptr{
+        std::shared_ptr r {nullptr}; 
+        if (has_token()) {
+            r = CPP2_UFCS(back)(cur_state);
+            CPP2_UFCS(pop_back)(cur_state);
+        }
+
+        return r; 
+    }
+
+#line 387 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 373 "regex.h2"
+#line 389 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 374 "regex.h2"
+#line 390 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
             pos += 1; return true; 
         }
 
         return false; 
-     }
-#line 381 "regex.h2"
-    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next(); }
+    }
 
-#line 390 "regex.h2"
+#line 398 "regex.h2"
+    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
+
+#line 400 "regex.h2"
+    [[nodiscard]] auto parse_context::error(cpp2::in err) & -> std::shared_ptr{
+        error_text = err;
+        return nullptr; 
+    }
+
+#line 405 "regex.h2"
+    [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
+        auto perl_syntax {false}; 
+        if (!(no_skip)) {
+            // TODO: 
+            // if in_class {
+            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
+            // }
+            // else {
+            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax;
+            // }
+        }
+        auto cur {pos + 1}; 
+        if (std::move(perl_syntax)) {
+            for( ; cpp2::cmp_less(cur,CPP2_UFCS(size)(regex)); (cur += 1) ) {
+                auto n {CPP2_ASSERT_IN_BOUNDS(regex, cur)}; 
+
+                if (space_class::includes(n)) {
+                    continue;
+                }
+                else {if (!(in_class) && '#' == std::move(n)) {
+                    cur = CPP2_UFCS(find)(regex, "\n", cur);
+                    if (std::string::npos == cur) {
+                        // No new line, comment runs until the end of the pattern
+                        cur = CPP2_UFCS(size)(regex);
+                    }
+                }
+                else { // None space none comment char
+                    break;
+                }}
+            }
+        }
+
+        // Check for end of file.
+        if (cpp2::cmp_greater(cur,CPP2_UFCS(size)(regex))) {
+            cur = CPP2_UFCS(size)(regex);
+        }
+        return cur; 
+    }
+
+#line 445 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
+        auto start {pos}; 
+        auto end {pos}; 
+        if (any) {
+            end = CPP2_UFCS(find_first_of)(regex, e, pos);
+        }
+        else {
+            end = CPP2_UFCS(find)(regex, e, pos);
+        }
+
+        if (end != std::string_view::npos) {
+            r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
+            pos = std::move(end);
+            return true; 
+        }
+        else {
+            r.construct("");
+            return false; 
+        }
+    }
+
+#line 466 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
+#line 467 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+#line 468 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
+
+#line 470 "regex.h2"
+    [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
+        auto next_pos {get_next_position(in_class, false)}; 
+        if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
+            return CPP2_ASSERT_IN_BOUNDS(regex, std::move(next_pos)); 
+        }
+        else {
+            return '\0'; 
+        }
+    }
+
+#line 480 "regex.h2"
+    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
+#line 481 "regex.h2"
+    [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
+
+#line 490 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 392 "regex.h2"
+#line 492 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         code += (cpp2::to_string(gen_tabs()) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 396 "regex.h2"
+#line 496 "regex.h2"
     [[nodiscard]] auto generation_context::gen_tabs() const& -> std::string{
         std::string tab {"  "}; 
         std::string res {""}; 
@@ -1767,42 +1935,49 @@ namespace regex {
         return tab; 
     }
 
-    regex_token::~regex_token() noexcept{}
+#line 513 "regex.h2"
+    regex_token::regex_token(cpp2::in state, cpp2::in str)
+        : needs_state{ state }
+        , string_rep{ str }{
+
+#line 516 "regex.h2"
+    }
 
-#line 410 "regex.h2"
     //parse: (inout ctx: parse_context) -> std::shared_ptr;
 
-#line 423 "regex.h2"
-    stateless_regex_token::stateless_regex_token(cpp2::in str)
-        : regex_token{  }
-        , string_rep{ str }{
+#line 522 "regex.h2"
+    [[nodiscard]] auto regex_token::requires_state() const& -> bool{return needs_state; }
+#line 523 "regex.h2"
+    [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
+
+    regex_token::~regex_token() noexcept{}
+
+#line 529 "regex.h2"
+    regex_token_base::regex_token_base(cpp2::in state, cpp2::in str)
+        : regex_token{ state, str }{
 
-#line 425 "regex.h2"
+#line 531 "regex.h2"
     }
 
-#line 427 "regex.h2"
-    [[nodiscard]] auto stateless_regex_token::get_groups() const -> std::vector{return {  }; }
-#line 428 "regex.h2"
-    [[nodiscard]] auto stateless_regex_token::requires_state() const -> bool{return false; }
-#line 429 "regex.h2"
-    [[nodiscard]] auto stateless_regex_token::to_string() const -> std::string{return string_rep; }
+#line 533 "regex.h2"
+    [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
-    stateless_regex_token::~stateless_regex_token() noexcept{}
+    regex_token_base::~regex_token_base() noexcept{}
 
-#line 437 "regex.h2"
+#line 541 "regex.h2"
     char_token::char_token(cpp2::in t)
-        : stateless_regex_token{ std::string(1, t) }
+        : regex_token_base{ false, std::string(1, t) }
         , token{ t }{
 
-#line 440 "regex.h2"
+#line 544 "regex.h2"
     }
 
-#line 442 "regex.h2"
+#line 546 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> std::shared_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 446 "regex.h2"
+#line 550 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -1811,7 +1986,7 @@ namespace regex {
 
     char_token::~char_token() noexcept{}
 
-#line 453 "regex.h2"
+#line 557 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1831,10 +2006,114 @@ template [[nodiscard]] auto char_toke
             return false; 
         }
     }
-
 }
 
-#line 491 "regex.h2"
+#line 586 "regex.h2"
+    range_token::range_token()
+                             : regex_token{ true, "" }{}
+
+#line 588 "regex.h2"
+    [[nodiscard]] auto range_token::parse(parse_context& ctx) -> std::shared_ptr{
+        std::shared_ptr r {}; 
+        if (CPP2_UFCS(current)(ctx) == '{') {
+            if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, "'{' without previous element."); }
+
+            std::string inner {""}; 
+            if (!(CPP2_UFCS(grab_until)(ctx, '}', cpp2::out(&inner)))) {return CPP2_UFCS(error)(ctx, "Missing closing bracket '}'."); }
+
+            inner = trim_copy(CPP2_UFCS(substr)(inner, 1));// Remove '{' and white spaces.
+            if (CPP2_UFCS(empty)(inner)) {return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
+
+#line 600 "regex.h2"
+            if (CPP2_UFCS(peek)(ctx) == '?') {
+                (*cpp2::assert_not_null(r)).kind = range_flags::not_greedy;
+                static_cast(CPP2_UFCS(next)(ctx));
+            }
+            else {if (CPP2_UFCS(peek)(ctx) == '+') {
+                (*cpp2::assert_not_null(r)).kind = range_flags::possessive;
+                static_cast(CPP2_UFCS(next)(ctx));
+            }}
+
+            std::string min_count_str {"-1"}; 
+            std::string max_count_str {"-1"}; 
+
+            size_t sep {CPP2_UFCS(find)(inner, ",")}; 
+            if (sep == std::string::npos) {
+                min_count_str = inner;
+                max_count_str = inner;
+                if (!(string_to_int(std::move(inner), (*cpp2::assert_not_null(r)).min_count))) {return CPP2_UFCS(error)(ctx, "Could not convert range to number."); }
+                (*cpp2::assert_not_null(r)).max_count = (*cpp2::assert_not_null(r)).min_count;
+            }
+            else {
+                std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; 
+                std::string inner_last {trim_copy(CPP2_UFCS(substr)(std::move(inner), std::move(sep) + 1))}; 
+
+                if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) {
+                    return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); 
+                }
+
+                if (!(CPP2_UFCS(empty)(inner_first))) {
+                    min_count_str = inner_first;
+                    if (!(string_to_int(std::move(inner_first), (*cpp2::assert_not_null(r)).min_count))) {return CPP2_UFCS(error)(ctx, "Could not convert range to number."); }
+                }
+                if (!(CPP2_UFCS(empty)(inner_last))) {
+                    max_count_str = inner_last;
+                    if (!(string_to_int(std::move(inner_last), (*cpp2::assert_not_null(r)).max_count))) {return CPP2_UFCS(error)(ctx, "Could not convert range to number."); }
+                }
+            }
+
+            if (!(([_0 = 0, _1 = (*cpp2::assert_not_null(r)).min_count, _2 = (*cpp2::assert_not_null(r)).max_count]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) {
+                return CPP2_UFCS(error)(ctx, ("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::assert_not_null(r)).max_count))); 
+            }
+
+#line 642 "regex.h2"
+            (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
+            (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + CPP2_UFCS(gen_string)((*cpp2::assert_not_null(r)));
+
+            return r; 
+        }
+
+        return nullptr; 
+    }
+
+#line 651 "regex.h2"
+    [[nodiscard]] auto range_token::gen_string() const& -> std::string{
+        std::string r {""}; 
+        if (min_count == max_count) {
+            r += ("{" + cpp2::to_string(min_count) + "}");
+        }
+        else {if (min_count == -1) {
+            r += ("{," + cpp2::to_string(max_count) + "}");
+        }
+        else {if (max_count == -1) {
+            r += ("{" + cpp2::to_string(min_count) + ",}");
+        }
+        else {
+            r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}");
+        }}}
+
+        if (kind == range_flags::not_greedy) {
+            r += "?";
+        }
+        else {if (kind == range_flags::possessive) {
+            r += "+";
+        }}
+        return r; 
+    }
+
+#line 675 "regex.h2"
+    auto range_token::generate_code(generation_context& ctx) const -> void{
+        static_cast(ctx);
+        //ctx.add_statefull("range_matcher_logic::match((ctx.get_arguments())$, (ctx.get_tail())$)")
+
+    }
+
+#line 681 "regex.h2"
+    [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
+
+    range_token::~range_token() noexcept{}// TODO: Implement
+
+#line 698 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -1847,12 +2126,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 503 "regex.h2"
+#line 710 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 504 "regex.h2"
+#line 711 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 506 "regex.h2"
+#line 713 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -1868,7 +2147,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 521 "regex.h2"
+#line 728 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -1884,7 +2163,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 537 "regex.h2"
+#line 744 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -1896,7 +2175,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 549 "regex.h2"
+#line 756 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -1918,7 +2197,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 575 "regex.h2"
+#line 782 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -1930,19 +2209,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 586 "regex.h2"
+#line 793 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 587 "regex.h2"
+#line 794 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 593 "regex.h2"
+#line 800 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 594 "regex.h2"
+#line 801 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 595 "regex.h2"
+#line 802 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 602 "regex.h2"
+#line 809 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -1962,12 +2241,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 621 "regex.h2"
+#line 828 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 622 "regex.h2"
+#line 829 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 630 "regex.h2"
+#line 837 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -1987,7 +2266,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 649 "regex.h2"
+#line 856 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2000,10 +2279,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 661 "regex.h2"
+#line 868 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 663 "regex.h2"
+#line 870 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2015,18 +2294,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 678 "regex.h2"
+#line 885 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 683 "regex.h2"
+#line 890 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 684 "regex.h2"
+#line 891 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 690 "regex.h2"
+#line 897 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2034,14 +2313,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 697 "regex.h2"
+#line 904 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 703 "regex.h2"
+#line 910 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2064,7 +2343,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 727 "regex.h2"
+#line 934 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2076,10 +2355,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 738 "regex.h2"
+#line 945 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 740 "regex.h2"
+#line 947 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2089,14 +2368,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 751 "regex.h2"
+#line 958 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 752 "regex.h2"
+#line 959 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 753 "regex.h2"
+#line 960 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 759 "regex.h2"
+#line 966 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2123,12 +2402,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 785 "regex.h2"
+#line 992 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 786 "regex.h2"
+#line 993 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 793 "regex.h2"
+#line 1000 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2141,12 +2420,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 805 "regex.h2"
+#line 1012 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 806 "regex.h2"
+#line 1013 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 813 "regex.h2"
+#line 1020 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2156,12 +2435,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 822 "regex.h2"
+#line 1029 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 823 "regex.h2"
+#line 1030 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 830 "regex.h2"
+#line 1037 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2177,22 +2456,22 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 845 "regex.h2"
+#line 1052 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 846 "regex.h2"
+#line 1053 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 853 "regex.h2"
+#line 1060 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 856 "regex.h2"
+#line 1063 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 857 "regex.h2"
+#line 1064 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 891 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
+#line 1098 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, end_func, tail); 
         }
@@ -2204,11 +2483,11 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 903 "regex.h2"
-    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
+#line 1110 "regex.h2"
+    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 905 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
+#line 1112 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
       if (min_count == max_count) {
@@ -2234,27 +2513,27 @@ template [[nodiscard]] auto char_toke
       return r; 
     }
 
-#line 931 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
+#line 1138 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 936 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
+#line 1143 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 941 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
+#line 1148 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 947 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+#line 1154 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
 
@@ -2269,8 +2548,8 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 962 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{
+#line 1169 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (end_func)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, Other()); 
         }}; 
@@ -2298,8 +2577,8 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 990 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
+#line 1197 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, end_func, count)}; 
 
@@ -2323,8 +2602,8 @@ template [[nodiscard]] auto char_toke
         return Other::match(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1014 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
+#line 1221 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, end_func, count)}; 
         if (!(start.matched)) {
@@ -2349,8 +2628,8 @@ template [[nodiscard]] auto char_toke
         return Other::match(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1044 "regex.h2"
-    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
+#line 1251 "regex.h2"
+    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (kind == range_flags::not_greedy) {
             r += "?";
@@ -2362,7 +2641,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1063 "regex.h2"
+#line 1270 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2392,9 +2671,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1092 "regex.h2"
+#line 1299 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1093 "regex.h2"
+#line 1300 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2403,7 +2682,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1114 "regex.h2"
+#line 1321 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2413,34 +2692,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1125 "regex.h2"
+#line 1332 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1139 "regex.h2"
+#line 1346 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1142 "regex.h2"
+#line 1349 "regex.h2"
         }
 
-#line 1144 "regex.h2"
+#line 1351 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1145 "regex.h2"
+#line 1352 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1146 "regex.h2"
+#line 1353 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1147 "regex.h2"
+#line 1354 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1149 "regex.h2"
+#line 1356 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1150 "regex.h2"
+#line 1357 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1151 "regex.h2"
+#line 1358 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1153 "regex.h2"
+#line 1360 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2449,13 +2728,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1162 "regex.h2"
+#line 1369 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1163 "regex.h2"
+#line 1370 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1164 "regex.h2"
+#line 1371 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1165 "regex.h2"
+#line 1372 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2463,13 +2742,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1172 "regex.h2"
+#line 1379 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1173 "regex.h2"
+#line 1380 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1174 "regex.h2"
+#line 1381 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1175 "regex.h2"
+#line 1382 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2489,10 +2768,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1194 "regex.h2"
+#line 1401 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1199 "regex.h2"
+#line 1406 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2502,31 +2781,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1220 "regex.h2"
+#line 1427 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1223 "regex.h2"
+#line 1430 "regex.h2"
         }
 
-#line 1225 "regex.h2"
+#line 1432 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1226 "regex.h2"
+#line 1433 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1227 "regex.h2"
+#line 1434 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1228 "regex.h2"
+#line 1435 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1230 "regex.h2"
+#line 1437 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1231 "regex.h2"
+#line 1438 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1232 "regex.h2"
+#line 1439 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1234 "regex.h2"
+#line 1441 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -2535,13 +2814,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1243 "regex.h2"
+#line 1450 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1244 "regex.h2"
+#line 1451 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1245 "regex.h2"
+#line 1452 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1246 "regex.h2"
+#line 1453 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2549,13 +2828,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1253 "regex.h2"
+#line 1460 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1254 "regex.h2"
+#line 1461 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1255 "regex.h2"
+#line 1462 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1256 "regex.h2"
+#line 1463 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2575,10 +2854,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1275 "regex.h2"
+#line 1482 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1280 "regex.h2"
+#line 1487 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2588,24 +2867,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1316 "regex.h2"
+#line 1523 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1322 "regex.h2"
+#line 1529 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1328 "regex.h2"
+#line 1535 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1330 "regex.h2"
+#line 1537 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2613,10 +2892,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1337 "regex.h2"
+#line 1544 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1347 "regex.h2"
+#line 1554 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2625,29 +2904,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1355 "regex.h2"
+#line 1562 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1360 "regex.h2"
+#line 1567 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1387 "regex.h2"
+#line 1594 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1391 "regex.h2"
+#line 1598 "regex.h2"
     }
 
-#line 1395 "regex.h2"
+#line 1602 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2655,12 +2934,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1402 "regex.h2"
+#line 1609 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1409 "regex.h2"
+#line 1616 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2673,14 +2952,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1421 "regex.h2"
+#line 1628 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1430 "regex.h2"
+#line 1637 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2719,7 +2998,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1468 "regex.h2"
+#line 1675 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2732,14 +3011,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1480 "regex.h2"
+#line 1687 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1481 "regex.h2"
+#line 1688 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1482 "regex.h2"
+#line 1689 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1486 "regex.h2"
+#line 1693 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -2747,7 +3026,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1493 "regex.h2"
+#line 1700 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2757,7 +3036,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1502 "regex.h2"
+#line 1709 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -2766,7 +3045,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1510 "regex.h2"
+#line 1717 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2777,12 +3056,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1520 "regex.h2"
+#line 1727 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1521 "regex.h2"
+#line 1728 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1523 "regex.h2"
+#line 1730 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2804,14 +3083,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1544 "regex.h2"
+#line 1751 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1545 "regex.h2"
+#line 1752 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1546 "regex.h2"
+#line 1753 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1548 "regex.h2"
+#line 1755 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2824,7 +3103,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1560 "regex.h2"
+#line 1767 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2845,13 +3124,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 1582 "regex.h2"
+#line 1789 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1587 "regex.h2"
+#line 1794 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2864,10 +3143,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1599 "regex.h2"
+#line 1806 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1605 "regex.h2"
+#line 1812 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2875,10 +3154,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1612 "regex.h2"
+#line 1819 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1614 "regex.h2"
+#line 1821 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -2895,7 +3174,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1630 "regex.h2"
+#line 1837 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -2906,7 +3185,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1642 "regex.h2"
+#line 1849 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -2918,7 +3197,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1653 "regex.h2"
+#line 1860 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -2955,7 +3234,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1689 "regex.h2"
+#line 1896 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3021,7 +3300,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1757 "regex.h2"
+#line 1964 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3030,7 +3309,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1765 "regex.h2"
+#line 1972 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3044,7 +3323,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 1778 "regex.h2"
+#line 1985 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3053,7 +3332,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 1786 "regex.h2"
+#line 1993 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3161,7 +3440,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1893 "regex.h2"
+#line 2100 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3329,7 +3608,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2060 "regex.h2"
+#line 2267 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3462,7 +3741,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2192 "regex.h2"
+#line 2399 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3470,7 +3749,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2199 "regex.h2"
+#line 2406 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3534,7 +3813,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2262 "regex.h2"
+#line 2469 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3571,7 +3850,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2298 "regex.h2"
+#line 2505 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3594,7 +3873,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2320 "regex.h2"
+#line 2527 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
         parse_context parse_ctx {regex}; 
 
@@ -3603,7 +3882,9 @@ template [[nodiscard]] auto char_toke
         for( ; CPP2_UFCS(valid)(parse_ctx); static_cast(CPP2_UFCS(next)(parse_ctx)) ) {
             if (term == CPP2_UFCS(current)(parse_ctx)) {break; }
 
-            cur_token = char_token::parse(parse_ctx);
+            cur_token = nullptr;
+            if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = range_token::parse(parse_ctx); }
+            if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = char_token::parse(parse_ctx); }
 
             if (cur_token && CPP2_UFCS(valid)(parse_ctx)) {
                 CPP2_UFCS(add_token)(parse_ctx, cur_token);
@@ -3615,7 +3896,7 @@ template [[nodiscard]] auto char_toke
         return generate_parse_func(std::move(parse_ctx)); 
     }
 
-#line 2340 "regex.h2"
+#line 2549 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -3638,7 +3919,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2362 "regex.h2"
+#line 2571 "regex.h2"
     template  [[nodiscard]] auto regex_parser::generate_parse_func(cpp2::in ctx) & -> std::string{
         auto cur_id {parse_func}; 
         parse_func += 1;
@@ -3661,7 +3942,7 @@ template [[nodiscard]] auto char_toke
         return name; 
     }
 
-#line 2384 "regex.h2"
+#line 2593 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
 
@@ -3681,14 +3962,14 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2404 "regex.h2"
+#line 2613 "regex.h2"
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
         return source; 
     }
 
-#line 2411 "regex.h2"
+#line 2620 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index c089c17edd..2234c7011e 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -358,6 +358,8 @@ parse_context: type = {
 
     pos: size_t = 0;
 
+    error_text: std::string = "";
+
     public cur_state: std::vector> = ();
 
     operator=:(out this, r: std::string_view) = {
@@ -368,6 +370,20 @@ parse_context: type = {
         cur_state.push_back(token);
     }
 
+    has_token: (this) -> bool = {
+        return !cur_state.empty();
+    }
+
+    pop_token: (inout this) -> std::shared_ptr = {
+        r : std::shared_ptr = nullptr;
+        if has_token() {
+            r = cur_state.back();
+            cur_state.pop_back();
+        }
+
+        return r;
+    }
+
     current: (this) -> char = { return regex[pos]; }
 
     has_next: (this) -> bool = { return pos < regex.size(); }
@@ -377,8 +393,92 @@ parse_context: type = {
         }
 
         return false;
-     }
-    valid: (this) -> bool = { return has_next(); }
+    }
+
+    valid: (this) -> bool = { return has_next() && error_text.empty(); }
+
+    error: (inout this, err: std::string) -> std::shared_ptr = {
+        error_text = err;
+        return nullptr;
+    }
+
+    private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = {
+        perl_syntax := false;
+        if !no_skip {
+            // TODO:
+            // if in_class {
+            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
+            // }
+            // else {
+            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax;
+            // }
+        }
+        cur := pos + 1;
+        if perl_syntax {
+            while cur < regex.size() next (cur += 1) {
+                n: = regex[cur];
+
+                if space_class::includes(n) {
+                    continue;
+                }
+                else if !in_class && '#' == n {
+                    cur = regex.find("\n", cur);
+                    if std::string::npos == cur {
+                        // No new line, comment runs until the end of the pattern
+                        cur = regex.size();
+                    }
+                }
+                else { // None space none comment char
+                    break;
+                }
+            }
+        }
+
+        // Check for end of file.
+        if cur > regex.size() {
+            cur = regex.size();
+        }
+        return cur;
+    }
+
+
+    private grab_until_impl: (inout this, in e: std::string, out r: std::string, any: bool) -> bool = {
+        start := pos;
+        end:= pos;
+        if any {
+            end = regex.find_first_of(e, pos);
+        }
+        else {
+            end = regex.find(e, pos);
+        }
+
+        if end != std::string_view::npos {
+            r = regex.substr(start, end - pos);
+            pos = end;
+            return true;
+        }
+        else {
+            r = "";
+            return false;
+        }
+    }
+
+    grab_until: (inout this, in e: std::string, out r: std::string)        grab_until_impl(e, out r, false);
+    grab_until: (inout this, in e: char, out r: std::string)               grab_until_impl(std::string(1, e), out r, false);
+    grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true);
+
+    private peek_impl: (in this, in_class: bool) -> char = {
+        next_pos := get_next_position(in_class, false);
+        if next_pos < regex.size() {
+            return regex[next_pos];
+        }
+        else {
+            return '\0';
+        }
+    }
+
+    peek: (in this)          peek_impl(false);
+    peek_in_class: (in this) peek_impl(true);
 
 
 }
@@ -405,37 +505,41 @@ generation_context: @struct type = {
     }
 }
 
-regex_token: @interface type = {
+regex_token: @polymorphic_base type = {
+
+    public needs_state: bool;
+    public string_rep: std::string;
+
+    operator=:(out this, state: bool, str: std::string) = {
+        needs_state = state;
+        string_rep = str;
+    }
 
     //parse: (inout ctx: parse_context) -> std::shared_ptr;
-    generate_code: (this, inout _: generation_context);
+    generate_code: (virtual this, inout _: generation_context);
 
-    get_groups: (this) -> std::vector;
-    requires_state: (this) -> bool;
-    to_string: (this) -> std::string;
+    get_groups: (virtual this) -> std::vector;
+    requires_state: (this) -> bool = { return needs_state; }
+    to_string: (this) -> std::string = { return string_rep; }
 }
 
-stateless_regex_token: @polymorphic_base type = {
-    this: regex_token = ();
-
-    string_rep: std::string;
+regex_token_base: @polymorphic_base type = {
+    this: regex_token;
 
-    operator=:(out this, str: std::string) = {
-        string_rep = str;
+    operator=:(out this, state: bool, str: std::string) = {
+        regex_token = (state, str);
     }
 
     get_groups: (override this) -> std::vector = { return (); }
-    requires_state: (override this) -> bool         = { return false; }
-    to_string: (override this) -> std::string       = { return string_rep; }
 }
 
 char_token: @polymorphic_base type = {
-    this: stateless_regex_token;
+    this: regex_token_base;
 
     token: char;
 
     operator=: (out this, t: char) = {
-        stateless_regex_token = std::string(1, t);
+        regex_token_base = (false, std::string(1, t));
         token = t;
     }
 
@@ -469,10 +573,113 @@ char_token_matcher:  (inout cur, inout ctx,
             return false;
         }
     }
-
 }
 
+range_token: @polymorphic_base type = {
+    this: regex_token = (true, "");
+
+    min_count: int = -1;
+    max_count: int = -1;
+    kind:      int = range_flags::greedy;
+    inner_token: std::shared_ptr = nullptr;
+
+    operator=: (out this) = {}
+
+    parse: (inout ctx: parse_context) -> std::shared_ptr = {
+        r: std::shared_ptr = ();
+        if ctx.current() == '{' {
+            if !ctx.has_token() { return ctx.error("'{' without previous element."); }
+
+            inner: std::string = "";
+            if !ctx.grab_until('}', out inner) { return ctx.error("Missing closing bracket '}'."); }
+
+            inner = trim_copy(inner.substr(1)); // Remove '{' and white spaces.
+            if inner.empty() { return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
+
 
+            if ctx.peek() == '?' {
+                r*.kind = range_flags::not_greedy;
+                _ = ctx.next();
+            }
+            else if ctx.peek() == '+' {
+                r*.kind = range_flags::possessive;
+                _ = ctx.next();
+            }
+
+            min_count_str: std::string = "-1";
+            max_count_str: std::string = "-1";
+
+            sep: size_t = inner.find(",");
+            if sep == std::string::npos {
+                min_count_str = inner;
+                max_count_str = inner;
+                if !string_to_int(inner, r*.min_count) { return ctx.error("Could not convert range to number."); }
+                r*.max_count = r*.min_count;
+            }
+            else {
+                inner_first: std::string = trim_copy(inner.substr(0, sep));
+                inner_last: std::string = trim_copy(inner.substr(sep + 1));
+
+                if (inner_first.empty() && inner_last.empty()) {
+                    return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
+                }
+
+                if !inner_first.empty() {
+                    min_count_str = inner_first;
+                    if !string_to_int(inner_first, r*.min_count) { return ctx.error("Could not convert range to number."); }
+                }
+                if !inner_last.empty() {
+                    max_count_str = inner_last;
+                    if !string_to_int(inner_last, r*.max_count) { return ctx.error("Could not convert range to number."); }
+                }
+            }
+
+            if !(0 <= r*.min_count <= r*.max_count) {
+                return ctx.error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (r*.min_count)$ <= (r*.max_count)$");
+            }
+
+
+            r*.inner_token = ctx.pop_token();
+            r*.string_rep = r*.inner_token*.to_string() + r*.gen_string();
+
+            return r;
+        }
+
+        return nullptr;
+    }
+
+    gen_string: (this) -> std::string = {
+        r : std::string = "";
+        if min_count == max_count {
+            r += "{(min_count)$}";
+        }
+        else if min_count == -1 {
+            r += "{,(max_count)$}";
+        }
+        else if max_count == -1 {
+            r += "{(min_count)$,}";
+        }
+        else {
+            r += "{(min_count)$,(max_count)$}";
+        }
+
+        if kind == range_flags::not_greedy {
+            r += "?";
+        }
+        else if kind == range_flags::possessive {
+            r += "+";
+        }
+        return r;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        _ = ctx;
+        //ctx.add_statefull("range_matcher_logic::match((ctx.get_arguments())$, (ctx.get_tail())$)")
+
+    }
+
+    get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
+}
 
 //-----------------------------------------------------------------------
 //
@@ -886,7 +1093,7 @@ named_string_start:  type == special_syntax_wrapper{min, max}  Example: a{2,4}
-range_matcher_logic:  type = {
+range_matcher_logic:  type = {
 
     match:  (cur: Iter, inout ctx, modifiers, end_func, tail) -> _ = {
         if range_flags::possessive == kind {
@@ -1039,8 +1246,8 @@ range_matcher_logic:  type
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
-special_range_matcher_logic:  type = {
-    this: range_matcher_logic = ();
+special_range_matcher_logic:  type = {
+    this: range_matcher_logic = ();
     to_string: () -> bstring = {
         r := M::to_string() + symbol;
         if kind == range_flags::not_greedy {
@@ -2325,7 +2532,9 @@ regex_parser:  type = {
         while parse_ctx.valid() next _ = parse_ctx.next() {
             if term == parse_ctx.current() { break; }
 
-            cur_token = char_token::parse(parse_ctx);
+            cur_token = nullptr;
+            if !cur_token && parse_ctx.valid() { cur_token = range_token::parse(parse_ctx); }
+            if !cur_token && parse_ctx.valid() { cur_token = char_token::parse(parse_ctx); }
 
             if cur_token && parse_ctx.valid() {
                 parse_ctx.add_token(cur_token);

From 38ad020b1e0fd634663744ef886c0ba0476d80e5 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 09:28:00 +0200
Subject: [PATCH 099/161] Moved code generation to generation context.

---
 include/cpp2regex.h | 930 +++++++++++++++++++++++---------------------
 source/regex.h2     | 138 ++++---
 2 files changed, 576 insertions(+), 492 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 22df701144..f44df27400 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -86,117 +86,117 @@ template class special_synta
     
 
 #line 356 "regex.h2"
+class regex_token;
+
+#line 377 "regex.h2"
 class parse_context;
     
 
-#line 485 "regex.h2"
+#line 510 "regex.h2"
 class generation_context;
 
-#line 508 "regex.h2"
-class regex_token;
-
-#line 526 "regex.h2"
+#line 577 "regex.h2"
 class regex_token_base;
     
 
-#line 536 "regex.h2"
+#line 587 "regex.h2"
 class char_token;
     
 
-#line 578 "regex.h2"
+#line 629 "regex.h2"
 class range_token;
     
 
-#line 696 "regex.h2"
+#line 747 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 780 "regex.h2"
+#line 831 "regex.h2"
 template class any_matcher_logic;
 
-#line 799 "regex.h2"
+#line 850 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 807 "regex.h2"
+#line 858 "regex.h2"
 template class char_matcher_logic;
 
-#line 835 "regex.h2"
+#line 886 "regex.h2"
 template class class_matcher_logic;
 
-#line 884 "regex.h2"
+#line 935 "regex.h2"
 template class global_group_reset;
     
 
-#line 896 "regex.h2"
+#line 947 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 933 "regex.h2"
+#line 984 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 957 "regex.h2"
+#line 1008 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 965 "regex.h2"
+#line 1016 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 998 "regex.h2"
+#line 1049 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1018 "regex.h2"
+#line 1069 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1035 "regex.h2"
+#line 1086 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1058 "regex.h2"
+#line 1109 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1070 "regex.h2"
+#line 1121 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1096 "regex.h2"
+#line 1147 "regex.h2"
 template class range_matcher_logic;
 
-#line 1249 "regex.h2"
+#line 1300 "regex.h2"
 template class special_range_matcher_logic;
     
 
-#line 1268 "regex.h2"
+#line 1319 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1319 "regex.h2"
+#line 1370 "regex.h2"
 template class group_name_list;
 
-#line 1331 "regex.h2"
+#line 1382 "regex.h2"
 class group_name_list_end;
     
 
-#line 1336 "regex.h2"
+#line 1387 "regex.h2"
 template class regular_expression;
 
-#line 1417 "regex.h2"
+#line 1468 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1506 "regex.h2"
+#line 1557 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1513 "regex.h2"
+#line 1564 "regex.h2"
 class regex_parser_group_state;
 
-#line 1548 "regex.h2"
+#line 1599 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1575 "regex.h2"
+#line 1626 "regex.h2"
 template class regex_parser;
 
-#line 2627 "regex.h2"
+#line 2657 "regex.h2"
 }
 }
 
@@ -537,6 +537,30 @@ template class special_synta
 };
 
 #line 356 "regex.h2"
+class regex_token {
+
+    public: bool needs_state; 
+    public: std::string string_rep; 
+
+    public: explicit regex_token(cpp2::in state, cpp2::in str);
+
+#line 367 "regex.h2"
+    public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
+
+    public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
+    public: [[nodiscard]] auto requires_state() const& -> bool;
+    public: [[nodiscard]] auto to_string() const& -> std::string;
+    public: virtual ~regex_token() noexcept;
+
+    public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token const&) -> void = delete;
+
+#line 372 "regex.h2"
+};
+
+using token_ptr = std::shared_ptr;
+using token_vec = std::vector;
+
 class parse_context {
     private: std::string_view regex; 
 
@@ -544,116 +568,120 @@ class parse_context {
 
     private: std::string error_text {""}; 
 
-    public: std::vector> cur_state {}; 
+    public: token_vec cur_state {}; 
 
     public: explicit parse_context(cpp2::in r);
-#line 365 "regex.h2"
+#line 386 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 369 "regex.h2"
-    public: auto add_token(cpp2::in> token) & -> void;
+#line 390 "regex.h2"
+    public: auto add_token(cpp2::in token) & -> void;
 
-#line 373 "regex.h2"
+#line 394 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 377 "regex.h2"
-    public: [[nodiscard]] auto pop_token() & -> std::shared_ptr;
+#line 398 "regex.h2"
+    public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 387 "regex.h2"
+#line 408 "regex.h2"
+    public: [[nodiscard]] auto get_tokens() const& -> token_vec;
+
+#line 412 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     public: [[nodiscard]] auto has_next() const& -> bool;
     public: [[nodiscard]] auto next() & -> bool;
 
-#line 398 "regex.h2"
+#line 423 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
 
-    public: [[nodiscard]] auto error(cpp2::in err) & -> std::shared_ptr;
+    public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 405 "regex.h2"
+#line 430 "regex.h2"
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 445 "regex.h2"
+#line 470 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 466 "regex.h2"
+#line 491 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 480 "regex.h2"
+#line 505 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 484 "regex.h2"
+#line 509 "regex.h2"
 };
 class generation_context {
 
     public: std::string code {""}; 
-    public: int tabs {2}; 
+    public: std::string tabs {"    "}; 
+
+    public: bool new_state {true}; 
+    public: int matcher_func {0}; 
+    public: std::string entry_func {""}; 
 
     public: [[nodiscard]] auto match_parameters() const& -> std::string;
 
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 496 "regex.h2"
-    public: [[nodiscard]] auto gen_tabs() const& -> std::string;
-
-#line 506 "regex.h2"
-};
+#line 525 "regex.h2"
+    public: [[nodiscard]] auto generate_match_code(cpp2::in tokens) & -> std::string;
 
-class regex_token {
+#line 536 "regex.h2"
+    public: [[nodiscard]] auto start_func() & -> std::string;
 
-    public: bool needs_state; 
-    public: std::string string_rep; 
+#line 546 "regex.h2"
+    public: auto end_func() & -> void;
 
-    public: explicit regex_token(cpp2::in state, cpp2::in str);
+#line 555 "regex.h2"
+    public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 519 "regex.h2"
-    public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
+#line 559 "regex.h2"
+    public: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-    public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
-    public: [[nodiscard]] auto requires_state() const& -> bool;
-    public: [[nodiscard]] auto to_string() const& -> std::string;
-    public: virtual ~regex_token() noexcept;
+#line 565 "regex.h2"
+    public: auto add_tabs(cpp2::in c) & -> void;
 
-    public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regex_token const&) -> void = delete;
+#line 572 "regex.h2"
+    public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 524 "regex.h2"
+#line 575 "regex.h2"
 };
 
 class regex_token_base: public regex_token {
 
-#line 529 "regex.h2"
+#line 580 "regex.h2"
     public: explicit regex_token_base(cpp2::in state, cpp2::in str);
 
-#line 533 "regex.h2"
+#line 584 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 534 "regex.h2"
+#line 585 "regex.h2"
 };
 
 class char_token: public regex_token_base {
 
-#line 539 "regex.h2"
+#line 590 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 546 "regex.h2"
-    public: [[nodiscard]] static auto parse(parse_context& ctx) -> std::shared_ptr;
+#line 597 "regex.h2"
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 550 "regex.h2"
+#line 601 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -661,38 +689,38 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 555 "regex.h2"
+#line 606 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 578 "regex.h2"
+#line 629 "regex.h2"
 class range_token: public regex_token {
 
-#line 581 "regex.h2"
+#line 632 "regex.h2"
     private: int min_count {-1}; 
     private: int max_count {-1}; 
     private: int kind {range_flags::greedy}; 
-    private: std::shared_ptr inner_token {nullptr}; 
+    private: token_ptr inner_token {nullptr}; 
 
     public: explicit range_token();
 
-    public: [[nodiscard]] static auto parse(parse_context& ctx) -> std::shared_ptr;
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 651 "regex.h2"
+#line 702 "regex.h2"
     public: [[nodiscard]] auto gen_string() const& -> std::string;
 
-#line 675 "regex.h2"
+#line 726 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 681 "regex.h2"
+#line 732 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 682 "regex.h2"
+#line 733 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -702,7 +730,7 @@ class range_token: public regex_token {
 //-----------------------------------------------------------------------
 //
 
-#line 692 "regex.h2"
+#line 743 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -711,20 +739,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 710 "regex.h2"
+#line 761 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 728 "regex.h2"
+#line 779 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 776 "regex.h2"
+#line 827 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -733,14 +761,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 793 "regex.h2"
+#line 844 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 795 "regex.h2"
+#line 846 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -753,7 +781,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 803 "regex.h2"
+#line 854 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -762,27 +790,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 828 "regex.h2"
+#line 879 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 830 "regex.h2"
+#line 881 "regex.h2"
 };
 
-#line 833 "regex.h2"
+#line 884 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 856 "regex.h2"
+#line 907 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 868 "regex.h2"
+#line 919 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -791,7 +819,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 880 "regex.h2"
+#line 931 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -799,14 +827,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 890 "regex.h2"
+#line 941 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 892 "regex.h2"
+#line 943 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -814,23 +842,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 904 "regex.h2"
+#line 955 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 910 "regex.h2"
+#line 961 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 931 "regex.h2"
+#line 982 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 945 "regex.h2"
+#line 996 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -839,7 +867,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 955 "regex.h2"
+#line 1006 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -850,7 +878,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 961 "regex.h2"
+#line 1012 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -858,14 +886,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 992 "regex.h2"
+#line 1043 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 994 "regex.h2"
+#line 1045 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -874,14 +902,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1012 "regex.h2"
+#line 1063 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1014 "regex.h2"
+#line 1065 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -890,14 +918,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1029 "regex.h2"
+#line 1080 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1031 "regex.h2"
+#line 1082 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -906,14 +934,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1052 "regex.h2"
+#line 1103 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1054 "regex.h2"
+#line 1105 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -922,14 +950,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1063 "regex.h2"
+#line 1114 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1065 "regex.h2"
+#line 1116 "regex.h2"
 };
 
 // Named character classes
@@ -941,7 +969,7 @@ template                    void = delete;
 
 
-#line 1072 "regex.h2"
+#line 1123 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -951,7 +979,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1082 "regex.h2"
+#line 1133 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -963,43 +991,43 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 1095 "regex.h2"
+#line 1146 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 template class range_matcher_logic {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 1110 "regex.h2"
+#line 1161 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 1138 "regex.h2"
+#line 1189 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1143 "regex.h2"
+#line 1194 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1148 "regex.h2"
+#line 1199 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1154 "regex.h2"
+#line 1205 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto;
 
-#line 1169 "regex.h2"
+#line 1220 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return;
 
-#line 1197 "regex.h2"
+#line 1248 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
 
-#line 1221 "regex.h2"
+#line 1272 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 1245 "regex.h2"
+#line 1296 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
@@ -1012,7 +1040,7 @@ template void = delete;
 
 
-#line 1262 "regex.h2"
+#line 1313 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1023,7 +1051,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1299 "regex.h2"
+#line 1350 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1031,10 +1059,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1307 "regex.h2"
+#line 1358 "regex.h2"
 };
 
-#line 1310 "regex.h2"
+#line 1361 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1052,7 +1080,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1329 "regex.h2"
+#line 1380 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1061,7 +1089,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1333 "regex.h2"
+#line 1384 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1077,7 +1105,7 @@ template matched_, context const& ctx_);
 
-#line 1351 "regex.h2"
+#line 1402 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1092,7 +1120,7 @@ template void = delete;
 
 
-#line 1367 "regex.h2"
+#line 1418 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1100,13 +1128,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1379 "regex.h2"
+#line 1430 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1401 "regex.h2"
+#line 1452 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1118,7 +1146,7 @@ template void = delete;
 
 
-#line 1414 "regex.h2"
+#line 1465 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1134,7 +1162,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1432 "regex.h2"
+#line 1483 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1149,7 +1177,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1448 "regex.h2"
+#line 1499 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1157,13 +1185,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1460 "regex.h2"
+#line 1511 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1482 "regex.h2"
+#line 1533 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1175,7 +1203,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1495 "regex.h2"
+#line 1546 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1206,15 +1234,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1529 "regex.h2"
+#line 1580 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1535 "regex.h2"
+#line 1586 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1544 "regex.h2"
+#line 1595 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1227,13 +1255,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1562 "regex.h2"
+#line 1613 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1567 "regex.h2"
+#line 1618 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1572 "regex.h2"
+#line 1623 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1250,7 +1278,6 @@ template class regex_parser {
     private: std::map named_groups {}; 
     private: bool has_error {false}; 
 
-    private: int parse_func {0}; 
     private: std::string source {""}; 
 
     private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
@@ -1258,156 +1285,153 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1600 "regex.h2"
+#line 1650 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1609 "regex.h2"
+#line 1659 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1613 "regex.h2"
+#line 1663 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1628 "regex.h2"
+#line 1678 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1634 "regex.h2"
+#line 1684 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1675 "regex.h2"
+#line 1725 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1687 "regex.h2"
+#line 1737 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1693 "regex.h2"
+#line 1743 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1700 "regex.h2"
+#line 1750 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1709 "regex.h2"
+#line 1759 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1717 "regex.h2"
+#line 1767 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1727 "regex.h2"
+#line 1777 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1751 "regex.h2"
+#line 1801 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1767 "regex.h2"
+#line 1817 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1787 "regex.h2"
+#line 1837 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1794 "regex.h2"
+#line 1844 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1806 "regex.h2"
+#line 1856 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1809 "regex.h2"
+#line 1859 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1819 "regex.h2"
+#line 1869 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1837 "regex.h2"
+#line 1887 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1847 "regex.h2"
+#line 1897 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1860 "regex.h2"
+#line 1910 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1896 "regex.h2"
+#line 1946 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 1961 "regex.h2"
+#line 2011 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 1972 "regex.h2"
+#line 2022 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 1985 "regex.h2"
+#line 2035 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 1993 "regex.h2"
+#line 2043 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2100 "regex.h2"
+#line 2150 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2267 "regex.h2"
+#line 2317 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2399 "regex.h2"
+#line 2449 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2406 "regex.h2"
+#line 2456 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2469 "regex.h2"
+#line 2519 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2505 "regex.h2"
+#line 2555 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2527 "regex.h2"
+#line 2577 "regex.h2"
     public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
 
-#line 2549 "regex.h2"
+#line 2601 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2571 "regex.h2"
-    public: [[nodiscard]] auto generate_parse_func(cpp2::in ctx) & -> std::string;
-
-#line 2593 "regex.h2"
+#line 2623 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2618 "regex.h2"
+#line 2648 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2627 "regex.h2"
+#line 2657 "regex.h2"
 }
 }
 
@@ -1769,13 +1793,30 @@ namespace regex {
 //-----------------------------------------------------------------------
 //
 
-#line 365 "regex.h2"
+#line 361 "regex.h2"
+    regex_token::regex_token(cpp2::in state, cpp2::in str)
+        : needs_state{ state }
+        , string_rep{ str }{
+
+#line 364 "regex.h2"
+    }
+
+    //parse: (inout ctx: parse_context) -> token_ptr;
+
+#line 370 "regex.h2"
+    [[nodiscard]] auto regex_token::requires_state() const& -> bool{return needs_state; }
+#line 371 "regex.h2"
+    [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
+
+    regex_token::~regex_token() noexcept{}
+
+#line 386 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 367 "regex.h2"
+#line 388 "regex.h2"
     }
-#line 365 "regex.h2"
+#line 386 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -1783,22 +1824,22 @@ namespace regex {
         cur_state = {};
         return *this;
 
-#line 367 "regex.h2"
+#line 388 "regex.h2"
     }
 
-#line 369 "regex.h2"
-    auto parse_context::add_token(cpp2::in> token) & -> void{
+#line 390 "regex.h2"
+    auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(push_back)(cur_state, token);
     }
 
-#line 373 "regex.h2"
+#line 394 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_state)); 
     }
 
-#line 377 "regex.h2"
-    [[nodiscard]] auto parse_context::pop_token() & -> std::shared_ptr{
-        std::shared_ptr r {nullptr}; 
+#line 398 "regex.h2"
+    [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
+        token_ptr r {nullptr}; 
         if (has_token()) {
             r = CPP2_UFCS(back)(cur_state);
             CPP2_UFCS(pop_back)(cur_state);
@@ -1807,12 +1848,17 @@ namespace regex {
         return r; 
     }
 
-#line 387 "regex.h2"
+#line 408 "regex.h2"
+    [[nodiscard]] auto parse_context::get_tokens() const& -> token_vec{
+        return cur_state; 
+    }
+
+#line 412 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 389 "regex.h2"
+#line 414 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 390 "regex.h2"
+#line 415 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
             pos += 1; return true; 
@@ -1821,16 +1867,16 @@ namespace regex {
         return false; 
     }
 
-#line 398 "regex.h2"
+#line 423 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 400 "regex.h2"
-    [[nodiscard]] auto parse_context::error(cpp2::in err) & -> std::shared_ptr{
+#line 425 "regex.h2"
+    [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 405 "regex.h2"
+#line 430 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -1870,7 +1916,7 @@ namespace regex {
         return cur; 
     }
 
-#line 445 "regex.h2"
+#line 470 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -1892,14 +1938,14 @@ namespace regex {
         }
     }
 
-#line 466 "regex.h2"
+#line 491 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 467 "regex.h2"
+#line 492 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 468 "regex.h2"
+#line 493 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 470 "regex.h2"
+#line 495 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -1910,74 +1956,103 @@ namespace regex {
         }
     }
 
-#line 480 "regex.h2"
+#line 505 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 481 "regex.h2"
+#line 506 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 490 "regex.h2"
+#line 519 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 492 "regex.h2"
+#line 521 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
-        code += (cpp2::to_string(gen_tabs()) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
+        code += (cpp2::to_string(tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 496 "regex.h2"
-    [[nodiscard]] auto generation_context::gen_tabs() const& -> std::string{
-        std::string tab {"  "}; 
-        std::string res {""}; 
+#line 525 "regex.h2"
+    [[nodiscard]] auto generation_context::generate_match_code(cpp2::in tokens) & -> std::string{
+        entry_func = start_func();
+        for ( auto const& token : tokens ) {
 
-        auto i {0}; 
-        for( ; cpp2::cmp_less(i,tabs); i += 1 ) {
-            res += tab;
+            CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
         }
-        return tab; 
+        end_func();
+
+        return code; 
     }
 
-#line 513 "regex.h2"
-    regex_token::regex_token(cpp2::in state, cpp2::in str)
-        : needs_state{ state }
-        , string_rep{ str }{
+#line 536 "regex.h2"
+    [[nodiscard]] auto generation_context::start_func() & -> std::string{
+        auto name {gen_func_name()}; 
+        code += (cpp2::to_string(tabs) + cpp2::to_string(name) + ": type = {\n");
+        code += (cpp2::to_string(tabs) + "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n");
+        code += (cpp2::to_string(tabs) + "    r := ctx.pass(cur);\n");
+        add_tabs(2);
 
-#line 516 "regex.h2"
+        return name; 
     }
 
-    //parse: (inout ctx: parse_context) -> std::shared_ptr;
+#line 546 "regex.h2"
+    auto generation_context::end_func() & -> void{
+        remove_tabs(2);
+        code += "\n";
+        code += (cpp2::to_string(tabs) + "    r = other(r.pos, ctx, modifiers);\n");
+        code += (cpp2::to_string(tabs) + "    return r;\n");
+        code += (cpp2::to_string(tabs) + "  }\n");
+        code += (cpp2::to_string(tabs) + "}\n");
+    }
 
-#line 522 "regex.h2"
-    [[nodiscard]] auto regex_token::requires_state() const& -> bool{return needs_state; }
-#line 523 "regex.h2"
-    [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
+#line 555 "regex.h2"
+    [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
+        return entry_func; 
+    }
 
-    regex_token::~regex_token() noexcept{}
+#line 559 "regex.h2"
+    [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
+        auto cur_id {matcher_func}; 
+        matcher_func += 1;
+        return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
+    }
+
+#line 565 "regex.h2"
+    auto generation_context::add_tabs(cpp2::in c) & -> void{
+        int i {0}; 
+        for( ; cpp2::cmp_less(i,c); i += 1 ) {
+            tabs += "  ";
+        }
+    }
 
-#line 529 "regex.h2"
+#line 572 "regex.h2"
+    auto generation_context::remove_tabs(cpp2::in c) & -> void{
+        tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
+    }
+
+#line 580 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in state, cpp2::in str)
         : regex_token{ state, str }{
 
-#line 531 "regex.h2"
+#line 582 "regex.h2"
     }
 
-#line 533 "regex.h2"
+#line 584 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 541 "regex.h2"
+#line 592 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ false, std::string(1, t) }
         , token{ t }{
 
-#line 544 "regex.h2"
+#line 595 "regex.h2"
     }
 
-#line 546 "regex.h2"
-    [[nodiscard]] auto char_token::parse(parse_context& ctx) -> std::shared_ptr{
+#line 597 "regex.h2"
+    [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 550 "regex.h2"
+#line 601 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -1986,7 +2061,7 @@ namespace regex {
 
     char_token::~char_token() noexcept{}
 
-#line 557 "regex.h2"
+#line 608 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2008,12 +2083,12 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 586 "regex.h2"
+#line 637 "regex.h2"
     range_token::range_token()
                              : regex_token{ true, "" }{}
 
-#line 588 "regex.h2"
-    [[nodiscard]] auto range_token::parse(parse_context& ctx) -> std::shared_ptr{
+#line 639 "regex.h2"
+    [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         std::shared_ptr r {}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
             if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, "'{' without previous element."); }
@@ -2024,7 +2099,7 @@ template [[nodiscard]] auto char_toke
             inner = trim_copy(CPP2_UFCS(substr)(inner, 1));// Remove '{' and white spaces.
             if (CPP2_UFCS(empty)(inner)) {return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
-#line 600 "regex.h2"
+#line 651 "regex.h2"
             if (CPP2_UFCS(peek)(ctx) == '?') {
                 (*cpp2::assert_not_null(r)).kind = range_flags::not_greedy;
                 static_cast(CPP2_UFCS(next)(ctx));
@@ -2066,7 +2141,7 @@ template [[nodiscard]] auto char_toke
                 return CPP2_UFCS(error)(ctx, ("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::assert_not_null(r)).max_count))); 
             }
 
-#line 642 "regex.h2"
+#line 693 "regex.h2"
             (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
             (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + CPP2_UFCS(gen_string)((*cpp2::assert_not_null(r)));
 
@@ -2076,7 +2151,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 651 "regex.h2"
+#line 702 "regex.h2"
     [[nodiscard]] auto range_token::gen_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2101,19 +2176,19 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 675 "regex.h2"
+#line 726 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         static_cast(ctx);
         //ctx.add_statefull("range_matcher_logic::match((ctx.get_arguments())$, (ctx.get_tail())$)")
 
     }
 
-#line 681 "regex.h2"
+#line 732 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 698 "regex.h2"
+#line 749 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2126,12 +2201,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 710 "regex.h2"
+#line 761 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 711 "regex.h2"
+#line 762 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 713 "regex.h2"
+#line 764 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2147,7 +2222,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 728 "regex.h2"
+#line 779 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2163,7 +2238,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 744 "regex.h2"
+#line 795 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2175,7 +2250,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 756 "regex.h2"
+#line 807 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2197,7 +2272,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 782 "regex.h2"
+#line 833 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2209,19 +2284,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 793 "regex.h2"
+#line 844 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 794 "regex.h2"
+#line 845 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 800 "regex.h2"
+#line 851 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 801 "regex.h2"
+#line 852 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 802 "regex.h2"
+#line 853 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 809 "regex.h2"
+#line 860 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2241,12 +2316,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 828 "regex.h2"
+#line 879 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 829 "regex.h2"
+#line 880 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 837 "regex.h2"
+#line 888 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -2266,7 +2341,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 856 "regex.h2"
+#line 907 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2279,10 +2354,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 868 "regex.h2"
+#line 919 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 870 "regex.h2"
+#line 921 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2294,18 +2369,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 885 "regex.h2"
+#line 936 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 890 "regex.h2"
+#line 941 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 891 "regex.h2"
+#line 942 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 897 "regex.h2"
+#line 948 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2313,14 +2388,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 904 "regex.h2"
+#line 955 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 910 "regex.h2"
+#line 961 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2343,7 +2418,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 934 "regex.h2"
+#line 985 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2355,10 +2430,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 945 "regex.h2"
+#line 996 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 947 "regex.h2"
+#line 998 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2368,14 +2443,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 958 "regex.h2"
+#line 1009 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 959 "regex.h2"
+#line 1010 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 960 "regex.h2"
+#line 1011 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 966 "regex.h2"
+#line 1017 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2402,12 +2477,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 992 "regex.h2"
+#line 1043 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 993 "regex.h2"
+#line 1044 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1000 "regex.h2"
+#line 1051 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2420,12 +2495,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1012 "regex.h2"
+#line 1063 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1013 "regex.h2"
+#line 1064 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1020 "regex.h2"
+#line 1071 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2435,12 +2510,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1029 "regex.h2"
+#line 1080 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1030 "regex.h2"
+#line 1081 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1037 "regex.h2"
+#line 1088 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2456,21 +2531,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1052 "regex.h2"
+#line 1103 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1053 "regex.h2"
+#line 1104 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1060 "regex.h2"
+#line 1111 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1063 "regex.h2"
+#line 1114 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1064 "regex.h2"
+#line 1115 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1098 "regex.h2"
+#line 1149 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, end_func, tail); 
@@ -2483,10 +2558,10 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1110 "regex.h2"
+#line 1161 "regex.h2"
     template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 1112 "regex.h2"
+#line 1163 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
@@ -2513,26 +2588,26 @@ template [[nodiscard]] auto char_toke
       return r; 
     }
 
-#line 1138 "regex.h2"
+#line 1189 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1143 "regex.h2"
+#line 1194 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1148 "regex.h2"
+#line 1199 "regex.h2"
     template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1154 "regex.h2"
+#line 1205 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2548,7 +2623,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 1169 "regex.h2"
+#line 1220 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (end_func)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, Other()); 
@@ -2577,7 +2652,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1197 "regex.h2"
+#line 1248 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, end_func, count)}; 
@@ -2602,7 +2677,7 @@ template [[nodiscard]] auto char_toke
         return Other::match(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1221 "regex.h2"
+#line 1272 "regex.h2"
     template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, end_func, count)}; 
@@ -2628,7 +2703,7 @@ template [[nodiscard]] auto char_toke
         return Other::match(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1251 "regex.h2"
+#line 1302 "regex.h2"
     template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (kind == range_flags::not_greedy) {
@@ -2641,7 +2716,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1270 "regex.h2"
+#line 1321 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2671,9 +2746,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1299 "regex.h2"
+#line 1350 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1300 "regex.h2"
+#line 1351 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2682,7 +2757,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1321 "regex.h2"
+#line 1372 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2692,34 +2767,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1332 "regex.h2"
+#line 1383 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1346 "regex.h2"
+#line 1397 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1349 "regex.h2"
+#line 1400 "regex.h2"
         }
 
-#line 1351 "regex.h2"
+#line 1402 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1352 "regex.h2"
+#line 1403 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1353 "regex.h2"
+#line 1404 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1354 "regex.h2"
+#line 1405 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1356 "regex.h2"
+#line 1407 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1357 "regex.h2"
+#line 1408 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1358 "regex.h2"
+#line 1409 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1360 "regex.h2"
+#line 1411 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2728,13 +2803,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1369 "regex.h2"
+#line 1420 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1370 "regex.h2"
+#line 1421 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1371 "regex.h2"
+#line 1422 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1372 "regex.h2"
+#line 1423 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2742,13 +2817,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1379 "regex.h2"
+#line 1430 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1380 "regex.h2"
+#line 1431 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1381 "regex.h2"
+#line 1432 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1382 "regex.h2"
+#line 1433 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2768,10 +2843,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1401 "regex.h2"
+#line 1452 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1406 "regex.h2"
+#line 1457 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2781,31 +2856,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1427 "regex.h2"
+#line 1478 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1430 "regex.h2"
+#line 1481 "regex.h2"
         }
 
-#line 1432 "regex.h2"
+#line 1483 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1433 "regex.h2"
+#line 1484 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1434 "regex.h2"
+#line 1485 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1435 "regex.h2"
+#line 1486 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1437 "regex.h2"
+#line 1488 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1438 "regex.h2"
+#line 1489 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1439 "regex.h2"
+#line 1490 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1441 "regex.h2"
+#line 1492 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -2814,13 +2889,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1450 "regex.h2"
+#line 1501 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1451 "regex.h2"
+#line 1502 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1452 "regex.h2"
+#line 1503 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1453 "regex.h2"
+#line 1504 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2828,13 +2903,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1460 "regex.h2"
+#line 1511 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1461 "regex.h2"
+#line 1512 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1462 "regex.h2"
+#line 1513 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1463 "regex.h2"
+#line 1514 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2854,10 +2929,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1482 "regex.h2"
+#line 1533 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1487 "regex.h2"
+#line 1538 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2867,24 +2942,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1523 "regex.h2"
+#line 1574 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1529 "regex.h2"
+#line 1580 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1535 "regex.h2"
+#line 1586 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1537 "regex.h2"
+#line 1588 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2892,10 +2967,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1544 "regex.h2"
+#line 1595 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1554 "regex.h2"
+#line 1605 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2904,29 +2979,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1562 "regex.h2"
+#line 1613 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1567 "regex.h2"
+#line 1618 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1594 "regex.h2"
+#line 1644 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1598 "regex.h2"
+#line 1648 "regex.h2"
     }
 
-#line 1602 "regex.h2"
+#line 1652 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2934,12 +3009,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1609 "regex.h2"
+#line 1659 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1616 "regex.h2"
+#line 1666 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2952,14 +3027,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1628 "regex.h2"
+#line 1678 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1637 "regex.h2"
+#line 1687 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2998,7 +3073,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1675 "regex.h2"
+#line 1725 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3011,14 +3086,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1687 "regex.h2"
+#line 1737 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1688 "regex.h2"
+#line 1738 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1689 "regex.h2"
+#line 1739 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1693 "regex.h2"
+#line 1743 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3026,7 +3101,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1700 "regex.h2"
+#line 1750 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3036,7 +3111,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1709 "regex.h2"
+#line 1759 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3045,7 +3120,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1717 "regex.h2"
+#line 1767 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3056,12 +3131,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1727 "regex.h2"
+#line 1777 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1728 "regex.h2"
+#line 1778 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1730 "regex.h2"
+#line 1780 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3083,14 +3158,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1751 "regex.h2"
+#line 1801 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1752 "regex.h2"
+#line 1802 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1753 "regex.h2"
+#line 1803 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1755 "regex.h2"
+#line 1805 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3103,7 +3178,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1767 "regex.h2"
+#line 1817 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3124,13 +3199,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 1789 "regex.h2"
+#line 1839 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1794 "regex.h2"
+#line 1844 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3143,10 +3218,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1806 "regex.h2"
+#line 1856 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1812 "regex.h2"
+#line 1862 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3154,10 +3229,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1819 "regex.h2"
+#line 1869 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1821 "regex.h2"
+#line 1871 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3174,7 +3249,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1837 "regex.h2"
+#line 1887 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3185,7 +3260,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1849 "regex.h2"
+#line 1899 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3197,7 +3272,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1860 "regex.h2"
+#line 1910 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3234,7 +3309,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1896 "regex.h2"
+#line 1946 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3300,7 +3375,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1964 "regex.h2"
+#line 2014 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3309,7 +3384,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1972 "regex.h2"
+#line 2022 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3323,7 +3398,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 1985 "regex.h2"
+#line 2035 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3332,7 +3407,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 1993 "regex.h2"
+#line 2043 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3440,7 +3515,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2100 "regex.h2"
+#line 2150 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3608,7 +3683,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2267 "regex.h2"
+#line 2317 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3741,7 +3816,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2399 "regex.h2"
+#line 2449 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3749,7 +3824,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2406 "regex.h2"
+#line 2456 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3813,7 +3888,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2469 "regex.h2"
+#line 2519 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3850,7 +3925,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2505 "regex.h2"
+#line 2555 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3873,11 +3948,11 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2527 "regex.h2"
+#line 2577 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
         parse_context parse_ctx {regex}; 
 
-        std::shared_ptr cur_token {}; 
+        token_ptr cur_token {}; 
 
         for( ; CPP2_UFCS(valid)(parse_ctx); static_cast(CPP2_UFCS(next)(parse_ctx)) ) {
             if (term == CPP2_UFCS(current)(parse_ctx)) {break; }
@@ -3893,10 +3968,12 @@ template [[nodiscard]] auto char_toke
             }
         }
 
-        return generate_parse_func(std::move(parse_ctx)); 
+        generation_context gen_ctx {}; 
+        source += CPP2_UFCS(generate_match_code)(gen_ctx, CPP2_UFCS(get_tokens)(std::move(parse_ctx)));
+        return CPP2_UFCS(get_entry_func)(std::move(gen_ctx)); 
     }
 
-#line 2549 "regex.h2"
+#line 2601 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -3919,30 +3996,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2571 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::generate_parse_func(cpp2::in ctx) & -> std::string{
-        auto cur_id {parse_func}; 
-        parse_func += 1;
-        std::string name {"func_" + cpp2::to_string(std::move(cur_id))}; 
-        generation_context gen_ctx {}; 
-
-        source += (cpp2::to_string(name) + ": type = {\n");
-        source += "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
-        source += "    r:= ctx.pass(cur);\n";
-        for ( auto const& matcher : ctx.cur_state ) {
-            CPP2_UFCS(generate_code)((*cpp2::assert_not_null(matcher)), gen_ctx);
-        }
-        source += std::move(gen_ctx).code;
-        source += "\n";
-        source += "    r = other(r.pos, ctx, modifiers);\n";
-        source += "    return r;\n";
-        source += "  }\n";
-        source += "}\n";
-
-        return name; 
-    }
-
-#line 2593 "regex.h2"
+#line 2623 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
 
@@ -3962,14 +4016,14 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2613 "regex.h2"
+#line 2643 "regex.h2"
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
         return source; 
     }
 
-#line 2620 "regex.h2"
+#line 2650 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 2234c7011e..f41de8a934 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -353,6 +353,27 @@ special_syntax_wrapper:  type = {
 //-----------------------------------------------------------------------
 //
 
+regex_token: @polymorphic_base type = {
+
+    public needs_state: bool;
+    public string_rep: std::string;
+
+    operator=:(out this, state: bool, str: std::string) = {
+        needs_state = state;
+        string_rep = str;
+    }
+
+    //parse: (inout ctx: parse_context) -> token_ptr;
+    generate_code: (virtual this, inout _: generation_context);
+
+    get_groups: (virtual this) -> std::vector;
+    requires_state: (this) -> bool = { return needs_state; }
+    to_string: (this) -> std::string = { return string_rep; }
+}
+
+token_ptr : type == std::shared_ptr;
+token_vec: type == std::vector;
+
 parse_context: type = {
     regex: std::string_view;
 
@@ -360,13 +381,13 @@ parse_context: type = {
 
     error_text: std::string = "";
 
-    public cur_state: std::vector> = ();
+    public cur_state: token_vec = ();
 
     operator=:(out this, r: std::string_view) = {
         regex = r;
     }
 
-    add_token: (inout this, token: std::shared_ptr) = {
+    add_token: (inout this, token: token_ptr) = {
         cur_state.push_back(token);
     }
 
@@ -374,8 +395,8 @@ parse_context: type = {
         return !cur_state.empty();
     }
 
-    pop_token: (inout this) -> std::shared_ptr = {
-        r : std::shared_ptr = nullptr;
+    pop_token: (inout this) -> token_ptr = {
+        r : token_ptr = nullptr;
         if has_token() {
             r = cur_state.back();
             cur_state.pop_back();
@@ -384,6 +405,10 @@ parse_context: type = {
         return r;
     }
 
+    get_tokens: (this) -> token_vec = {
+        return cur_state;
+    }
+
     current: (this) -> char = { return regex[pos]; }
 
     has_next: (this) -> bool = { return pos < regex.size(); }
@@ -397,7 +422,7 @@ parse_context: type = {
 
     valid: (this) -> bool = { return has_next() && error_text.empty(); }
 
-    error: (inout this, err: std::string) -> std::shared_ptr = {
+    error: (inout this, err: std::string) -> token_ptr = {
         error_text = err;
         return nullptr;
     }
@@ -485,42 +510,68 @@ parse_context: type = {
 generation_context: @struct type = {
 
     code: std::string = "";
-    tabs: int = 2;
+    tabs: std::string = "    ";
+
+    new_state : bool = true;
+    matcher_func: int         = 0;
+    entry_func:   std::string = "";
 
     match_parameters: (this) -> std::string = { return "r.pos, ctx, modifiers"; }
 
     add_check: (inout this, check: std::string) = {
-        code += "(gen_tabs())$if !cpp2::regex::(check)$ { r = ctx.fail(); return r; }\n";
+        code += "(tabs)$if !cpp2::regex::(check)$ { r = ctx.fail(); return r; }\n";
     }
 
-    gen_tabs: (this) -> std::string = {
-        tab : std::string = "  ";
-        res : std::string = "";
+    generate_match_code: (inout this, tokens: token_vec) -> std::string = {
+        entry_func = start_func();
+        for tokens do (token) {
 
-        i := 0;
-        while i < tabs next i += 1 {
-            res += tab;
+            token*.generate_code(this);
         }
-        return tab;
+        end_func();
+
+        return code;
     }
-}
 
-regex_token: @polymorphic_base type = {
+    start_func: (inout this) -> std::string = {
+        name := gen_func_name();
+        code += "(tabs)$(name)$: type = {\n";
+        code += "(tabs)$  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
+        code += "(tabs)$    r := ctx.pass(cur);\n";
+        add_tabs(2);
 
-    public needs_state: bool;
-    public string_rep: std::string;
+        return name;
+    }
 
-    operator=:(out this, state: bool, str: std::string) = {
-        needs_state = state;
-        string_rep = str;
+    end_func: (inout this) = {
+        remove_tabs(2);
+        code += "\n";
+        code += "(tabs)$    r = other(r.pos, ctx, modifiers);\n";
+        code += "(tabs)$    return r;\n";
+        code += "(tabs)$  }\n";
+        code += "(tabs)$}\n";
     }
 
-    //parse: (inout ctx: parse_context) -> std::shared_ptr;
-    generate_code: (virtual this, inout _: generation_context);
+    get_entry_func: (this) -> std::string = {
+        return entry_func;
+    }
 
-    get_groups: (virtual this) -> std::vector;
-    requires_state: (this) -> bool = { return needs_state; }
-    to_string: (this) -> std::string = { return string_rep; }
+    gen_func_name: (inout this) -> std::string = {
+        cur_id : = matcher_func;
+        matcher_func += 1;
+        return "func_(cur_id)$";
+    }
+
+    add_tabs: (inout this, c: int) = {
+        i: int = 0;
+        while i < c next i += 1 {
+            tabs += "  ";
+        }
+    }
+
+    remove_tabs: (inout this, c: int) = {
+        tabs = tabs.substr(0, c * 2);
+    }
 }
 
 regex_token_base: @polymorphic_base type = {
@@ -543,7 +594,7 @@ char_token: @polymorphic_base type = {
         token = t;
     }
 
-    parse: (inout ctx: parse_context) -> std::shared_ptr = {
+    parse: (inout ctx: parse_context) -> token_ptr = {
         return shared.new(ctx.current());
     }
 
@@ -581,11 +632,11 @@ range_token: @polymorphic_base type = {
     min_count: int = -1;
     max_count: int = -1;
     kind:      int = range_flags::greedy;
-    inner_token: std::shared_ptr = nullptr;
+    inner_token: token_ptr = nullptr;
 
     operator=: (out this) = {}
 
-    parse: (inout ctx: parse_context) -> std::shared_ptr = {
+    parse: (inout ctx: parse_context) -> token_ptr = {
         r: std::shared_ptr = ();
         if ctx.current() == '{' {
             if !ctx.has_token() { return ctx.error("'{' without previous element."); }
@@ -1585,7 +1636,6 @@ regex_parser:  type = {
     named_groups :          std::map = ();
     has_error:              bool = false;
 
-    parse_func: int = 0;
     source: std::string = "";
 
     supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
@@ -2527,7 +2577,7 @@ regex_parser:  type = {
     parse_until_new:(inout this, term: char) -> std::string = {
         parse_ctx: parse_context = (regex);
 
-        cur_token: std::shared_ptr = ();
+        cur_token: token_ptr = ();
 
         while parse_ctx.valid() next _ = parse_ctx.next() {
             if term == parse_ctx.current() { break; }
@@ -2543,7 +2593,9 @@ regex_parser:  type = {
             }
         }
 
-        return generate_parse_func(parse_ctx);
+        gen_ctx: generation_context = ();
+        source += gen_ctx.generate_match_code(parse_ctx.get_tokens());
+        return gen_ctx.get_entry_func();
     }
 
     create_named_group_lookup: (this) -> std::string = {
@@ -2568,28 +2620,6 @@ regex_parser:  type = {
         return res;
     }
 
-    generate_parse_func: (inout this, ctx: parse_context) -> std::string = {
-        cur_id : = parse_func;
-        parse_func += 1;
-        name: std::string = "func_(cur_id)$";
-        gen_ctx: generation_context = ();
-
-        source += "(name)$: type = {\n";
-        source += "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
-        source += "    r:= ctx.pass(cur);\n";
-        for ctx.cur_state do (matcher) {
-            matcher*.generate_code(gen_ctx);
-        }
-        source += gen_ctx.code;
-        source += "\n";
-        source += "    r = other(r.pos, ctx, modifiers);\n";
-        source += "    return r;\n";
-        source += "  }\n";
-        source += "}\n";
-
-        return name;
-    }
-
     parse:(inout this) -> std::string = {
         mod   := parser_expression_modifiers();
 

From bd830191ad8014301f38b6ad7c65994f01a40371 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 13:12:14 +0200
Subject: [PATCH 100/161] Generation of statefull matcher.

---
 include/cpp2regex.h | 1061 +++++++++++++++++++++++++------------------
 source/regex.h2     |  217 ++++++---
 2 files changed, 775 insertions(+), 503 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index f44df27400..35ad0306f9 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -85,118 +85,126 @@ template class extract_position_helper;
 template class special_syntax_wrapper;
     
 
-#line 356 "regex.h2"
+#line 357 "regex.h2"
+class no_reset;
+    
+
+#line 361 "regex.h2"
 class regex_token;
 
-#line 377 "regex.h2"
+#line 382 "regex.h2"
 class parse_context;
     
 
-#line 510 "regex.h2"
+#line 516 "regex.h2"
+class generation_function_context;
+    
+
+#line 532 "regex.h2"
 class generation_context;
 
-#line 577 "regex.h2"
+#line 672 "regex.h2"
 class regex_token_base;
     
 
-#line 587 "regex.h2"
+#line 682 "regex.h2"
 class char_token;
     
 
-#line 629 "regex.h2"
+#line 724 "regex.h2"
 class range_token;
     
 
-#line 747 "regex.h2"
+#line 855 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 831 "regex.h2"
+#line 939 "regex.h2"
 template class any_matcher_logic;
 
-#line 850 "regex.h2"
+#line 958 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 858 "regex.h2"
+#line 966 "regex.h2"
 template class char_matcher_logic;
 
-#line 886 "regex.h2"
+#line 994 "regex.h2"
 template class class_matcher_logic;
 
-#line 935 "regex.h2"
+#line 1043 "regex.h2"
 template class global_group_reset;
     
 
-#line 947 "regex.h2"
+#line 1055 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 984 "regex.h2"
+#line 1092 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1008 "regex.h2"
+#line 1116 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1016 "regex.h2"
+#line 1124 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1049 "regex.h2"
+#line 1157 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1069 "regex.h2"
+#line 1177 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1086 "regex.h2"
+#line 1194 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1109 "regex.h2"
+#line 1217 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1121 "regex.h2"
+#line 1229 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1147 "regex.h2"
-template class range_matcher_logic;
+#line 1255 "regex.h2"
+template class range_matcher_logic;
 
-#line 1300 "regex.h2"
-template class special_range_matcher_logic;
+#line 1408 "regex.h2"
+template class special_range_matcher_logic;
     
 
-#line 1319 "regex.h2"
+#line 1427 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1370 "regex.h2"
+#line 1478 "regex.h2"
 template class group_name_list;
 
-#line 1382 "regex.h2"
+#line 1490 "regex.h2"
 class group_name_list_end;
     
 
-#line 1387 "regex.h2"
+#line 1495 "regex.h2"
 template class regular_expression;
 
-#line 1468 "regex.h2"
+#line 1576 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1557 "regex.h2"
+#line 1665 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1564 "regex.h2"
+#line 1672 "regex.h2"
 class regex_parser_group_state;
 
-#line 1599 "regex.h2"
+#line 1707 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1626 "regex.h2"
+#line 1734 "regex.h2"
 template class regex_parser;
 
-#line 2657 "regex.h2"
+#line 2766 "regex.h2"
 }
 }
 
@@ -536,7 +544,11 @@ template class special_synta
 #line 347 "regex.h2"
 };
 
-#line 356 "regex.h2"
+#line 357 "regex.h2"
+class no_reset {
+    public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
+};
+
 class regex_token {
 
     public: bool needs_state; 
@@ -544,7 +556,7 @@ class regex_token {
 
     public: explicit regex_token(cpp2::in state, cpp2::in str);
 
-#line 367 "regex.h2"
+#line 372 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
@@ -555,7 +567,7 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 372 "regex.h2"
+#line 377 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
@@ -566,122 +578,162 @@ class parse_context {
 
     private: size_t pos {0}; 
 
-    private: std::string error_text {""}; 
+    public: std::string error_text {""}; 
 
-    public: token_vec cur_state {}; 
+    private: token_vec cur_state {}; 
 
     public: explicit parse_context(cpp2::in r);
-#line 386 "regex.h2"
+#line 391 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 390 "regex.h2"
+#line 395 "regex.h2"
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 394 "regex.h2"
+#line 399 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 398 "regex.h2"
+#line 403 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 408 "regex.h2"
+#line 413 "regex.h2"
     public: [[nodiscard]] auto get_tokens() const& -> token_vec;
 
-#line 412 "regex.h2"
+#line 417 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     public: [[nodiscard]] auto has_next() const& -> bool;
     public: [[nodiscard]] auto next() & -> bool;
 
-#line 423 "regex.h2"
+#line 428 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 430 "regex.h2"
+#line 435 "regex.h2"
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 470 "regex.h2"
+#line 475 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 491 "regex.h2"
+#line 496 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 505 "regex.h2"
+#line 510 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 509 "regex.h2"
+#line 514 "regex.h2"
 };
-class generation_context {
 
+class generation_function_context {
     public: std::string code {""}; 
-    public: std::string tabs {"    "}; 
+    public: std::string tabs {""}; 
+
+    public: auto add_tabs(cpp2::in c) & -> void;
+
+#line 527 "regex.h2"
+    public: auto remove_tabs(cpp2::in c) & -> void;
+
+#line 530 "regex.h2"
+};
+
+class generation_context {
+
+    public: std::vector gen_stack {1}; 
 
     public: bool new_state {true}; 
     public: int matcher_func {0}; 
+    public: int reset_func {0}; 
     public: std::string entry_func {""}; 
 
     public: [[nodiscard]] auto match_parameters() const& -> std::string;
 
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 525 "regex.h2"
-    public: [[nodiscard]] auto generate_match_code(cpp2::in tokens) & -> std::string;
+#line 548 "regex.h2"
+    public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
+
+#line 554 "regex.h2"
+    public: [[nodiscard]] auto run(cpp2::in tokens) & -> std::string;
+
+#line 560 "regex.h2"
+    public: [[nodiscard]] auto generate_func(cpp2::in tokens) & -> std::string;
+
+#line 570 "regex.h2"
+    public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 536 "regex.h2"
+#line 578 "regex.h2"
+    public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
+
+#line 600 "regex.h2"
+    public: [[nodiscard]] auto get_current() & -> generation_function_context*;
+
+#line 604 "regex.h2"
+    public: [[nodiscard]] auto get_base() & -> generation_function_context*;
+
+#line 608 "regex.h2"
+    public: auto start_func_named(cpp2::in name) & -> void;
+
+#line 617 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 546 "regex.h2"
+#line 623 "regex.h2"
+    public: auto end_func_statefull(cpp2::in s) & -> void;
+
+#line 635 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 555 "regex.h2"
+#line 639 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 559 "regex.h2"
+#line 643 "regex.h2"
     public: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 565 "regex.h2"
-    public: auto add_tabs(cpp2::in c) & -> void;
+#line 649 "regex.h2"
+    public: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 572 "regex.h2"
-    public: auto remove_tabs(cpp2::in c) & -> void;
+#line 655 "regex.h2"
+    public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 575 "regex.h2"
+#line 663 "regex.h2"
+    public: auto finish_context() & -> void;
+
+#line 670 "regex.h2"
 };
 
 class regex_token_base: public regex_token {
 
-#line 580 "regex.h2"
+#line 675 "regex.h2"
     public: explicit regex_token_base(cpp2::in state, cpp2::in str);
 
-#line 584 "regex.h2"
+#line 679 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 585 "regex.h2"
+#line 680 "regex.h2"
 };
 
 class char_token: public regex_token_base {
 
-#line 590 "regex.h2"
+#line 685 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 597 "regex.h2"
+#line 692 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 601 "regex.h2"
+#line 696 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -689,15 +741,15 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 606 "regex.h2"
+#line 701 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 629 "regex.h2"
+#line 724 "regex.h2"
 class range_token: public regex_token {
 
-#line 632 "regex.h2"
+#line 727 "regex.h2"
     private: int min_count {-1}; 
     private: int max_count {-1}; 
     private: int kind {range_flags::greedy}; 
@@ -707,20 +759,20 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 702 "regex.h2"
+#line 808 "regex.h2"
     public: [[nodiscard]] auto gen_string() const& -> std::string;
 
-#line 726 "regex.h2"
+#line 832 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 732 "regex.h2"
+#line 840 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 733 "regex.h2"
+#line 841 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -730,7 +782,7 @@ class range_token: public regex_token {
 //-----------------------------------------------------------------------
 //
 
-#line 743 "regex.h2"
+#line 851 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -739,20 +791,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 761 "regex.h2"
+#line 869 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 779 "regex.h2"
+#line 887 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 827 "regex.h2"
+#line 935 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -761,14 +813,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 844 "regex.h2"
+#line 952 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 846 "regex.h2"
+#line 954 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -781,7 +833,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 854 "regex.h2"
+#line 962 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -790,27 +842,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 879 "regex.h2"
+#line 987 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 881 "regex.h2"
+#line 989 "regex.h2"
 };
 
-#line 884 "regex.h2"
+#line 992 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 907 "regex.h2"
+#line 1015 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 919 "regex.h2"
+#line 1027 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -819,7 +871,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 931 "regex.h2"
+#line 1039 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -827,14 +879,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 941 "regex.h2"
+#line 1049 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 943 "regex.h2"
+#line 1051 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -842,23 +894,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 955 "regex.h2"
+#line 1063 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 961 "regex.h2"
+#line 1069 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 982 "regex.h2"
+#line 1090 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 996 "regex.h2"
+#line 1104 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -867,7 +919,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1006 "regex.h2"
+#line 1114 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -878,7 +930,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1012 "regex.h2"
+#line 1120 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -886,14 +938,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1043 "regex.h2"
+#line 1151 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1045 "regex.h2"
+#line 1153 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -902,14 +954,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1063 "regex.h2"
+#line 1171 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1065 "regex.h2"
+#line 1173 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -918,14 +970,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1080 "regex.h2"
+#line 1188 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1082 "regex.h2"
+#line 1190 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -934,14 +986,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1103 "regex.h2"
+#line 1211 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1105 "regex.h2"
+#line 1213 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -950,14 +1002,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1114 "regex.h2"
+#line 1222 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1116 "regex.h2"
+#line 1224 "regex.h2"
 };
 
 // Named character classes
@@ -969,7 +1021,7 @@ template                    void = delete;
 
 
-#line 1123 "regex.h2"
+#line 1231 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -979,7 +1031,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1133 "regex.h2"
+#line 1241 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -991,48 +1043,48 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 1146 "regex.h2"
+#line 1254 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
-template class range_matcher_logic {
+template class range_matcher_logic {
 
-    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1161 "regex.h2"
+#line 1269 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
 
-#line 1189 "regex.h2"
+#line 1297 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1194 "regex.h2"
+#line 1302 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1199 "regex.h2"
+#line 1307 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1205 "regex.h2"
+#line 1313 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto;
 
-#line 1220 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return;
+#line 1328 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 1248 "regex.h2"
-    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
+#line 1356 "regex.h2"
+    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return;
 
-#line 1272 "regex.h2"
-    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return;
+#line 1380 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return;
     public: range_matcher_logic() = default;
     public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_matcher_logic const&) -> void = delete;
 
 
-#line 1296 "regex.h2"
+#line 1404 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
-template class special_range_matcher_logic: public range_matcher_logic {
+template class special_range_matcher_logic: public range_matcher_logic {
 
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: special_range_matcher_logic() = default;
@@ -1040,7 +1092,7 @@ template void = delete;
 
 
-#line 1313 "regex.h2"
+#line 1421 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1051,7 +1103,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1350 "regex.h2"
+#line 1458 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1059,10 +1111,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1358 "regex.h2"
+#line 1466 "regex.h2"
 };
 
-#line 1361 "regex.h2"
+#line 1469 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1080,7 +1132,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1380 "regex.h2"
+#line 1488 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1089,7 +1141,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1384 "regex.h2"
+#line 1492 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1105,7 +1157,7 @@ template matched_, context const& ctx_);
 
-#line 1402 "regex.h2"
+#line 1510 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1120,7 +1172,7 @@ template void = delete;
 
 
-#line 1418 "regex.h2"
+#line 1526 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1128,13 +1180,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1430 "regex.h2"
+#line 1538 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1452 "regex.h2"
+#line 1560 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1146,7 +1198,7 @@ template void = delete;
 
 
-#line 1465 "regex.h2"
+#line 1573 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1162,7 +1214,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1483 "regex.h2"
+#line 1591 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1177,7 +1229,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1499 "regex.h2"
+#line 1607 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1185,13 +1237,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1511 "regex.h2"
+#line 1619 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1533 "regex.h2"
+#line 1641 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1203,7 +1255,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1546 "regex.h2"
+#line 1654 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1234,15 +1286,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1580 "regex.h2"
+#line 1688 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1586 "regex.h2"
+#line 1694 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1595 "regex.h2"
+#line 1703 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1255,13 +1307,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1613 "regex.h2"
+#line 1721 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1618 "regex.h2"
+#line 1726 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1623 "regex.h2"
+#line 1731 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1285,153 +1337,153 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1650 "regex.h2"
+#line 1758 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1659 "regex.h2"
+#line 1767 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1663 "regex.h2"
+#line 1771 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1678 "regex.h2"
+#line 1786 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1684 "regex.h2"
+#line 1792 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1725 "regex.h2"
+#line 1833 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1737 "regex.h2"
+#line 1845 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1743 "regex.h2"
+#line 1851 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1750 "regex.h2"
+#line 1858 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1759 "regex.h2"
+#line 1867 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1767 "regex.h2"
+#line 1875 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1777 "regex.h2"
+#line 1885 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1801 "regex.h2"
+#line 1909 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1817 "regex.h2"
+#line 1925 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1837 "regex.h2"
+#line 1945 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1844 "regex.h2"
+#line 1952 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1856 "regex.h2"
+#line 1964 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1859 "regex.h2"
+#line 1967 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1869 "regex.h2"
+#line 1977 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1887 "regex.h2"
+#line 1995 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1897 "regex.h2"
+#line 2005 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1910 "regex.h2"
+#line 2018 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 1946 "regex.h2"
+#line 2054 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2011 "regex.h2"
+#line 2119 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2022 "regex.h2"
+#line 2130 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2035 "regex.h2"
+#line 2143 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2043 "regex.h2"
+#line 2151 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2150 "regex.h2"
+#line 2258 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2317 "regex.h2"
+#line 2425 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2449 "regex.h2"
+#line 2557 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2456 "regex.h2"
+#line 2564 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2519 "regex.h2"
+#line 2627 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2555 "regex.h2"
+#line 2663 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2577 "regex.h2"
+#line 2685 "regex.h2"
     public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
 
-#line 2601 "regex.h2"
+#line 2710 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2623 "regex.h2"
+#line 2732 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2648 "regex.h2"
+#line 2757 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2657 "regex.h2"
+#line 2766 "regex.h2"
 }
 }
 
@@ -1793,30 +1845,33 @@ namespace regex {
 //-----------------------------------------------------------------------
 //
 
-#line 361 "regex.h2"
+#line 358 "regex.h2"
+    auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
+
+#line 366 "regex.h2"
     regex_token::regex_token(cpp2::in state, cpp2::in str)
         : needs_state{ state }
         , string_rep{ str }{
 
-#line 364 "regex.h2"
+#line 369 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
 
-#line 370 "regex.h2"
+#line 375 "regex.h2"
     [[nodiscard]] auto regex_token::requires_state() const& -> bool{return needs_state; }
-#line 371 "regex.h2"
+#line 376 "regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
 
     regex_token::~regex_token() noexcept{}
 
-#line 386 "regex.h2"
+#line 391 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 388 "regex.h2"
+#line 393 "regex.h2"
     }
-#line 386 "regex.h2"
+#line 391 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -1824,20 +1879,20 @@ namespace regex {
         cur_state = {};
         return *this;
 
-#line 388 "regex.h2"
+#line 393 "regex.h2"
     }
 
-#line 390 "regex.h2"
+#line 395 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(push_back)(cur_state, token);
     }
 
-#line 394 "regex.h2"
+#line 399 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_state)); 
     }
 
-#line 398 "regex.h2"
+#line 403 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -1848,17 +1903,17 @@ namespace regex {
         return r; 
     }
 
-#line 408 "regex.h2"
+#line 413 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() const& -> token_vec{
         return cur_state; 
     }
 
-#line 412 "regex.h2"
+#line 417 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 414 "regex.h2"
+#line 419 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 415 "regex.h2"
+#line 420 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
             pos += 1; return true; 
@@ -1867,16 +1922,16 @@ namespace regex {
         return false; 
     }
 
-#line 423 "regex.h2"
+#line 428 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 425 "regex.h2"
+#line 430 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 430 "regex.h2"
+#line 435 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -1916,7 +1971,7 @@ namespace regex {
         return cur; 
     }
 
-#line 470 "regex.h2"
+#line 475 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -1938,14 +1993,14 @@ namespace regex {
         }
     }
 
-#line 491 "regex.h2"
+#line 496 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 492 "regex.h2"
+#line 497 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 493 "regex.h2"
+#line 498 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 495 "regex.h2"
+#line 500 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -1956,103 +2011,197 @@ namespace regex {
         }
     }
 
-#line 505 "regex.h2"
+#line 510 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 506 "regex.h2"
+#line 511 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 519 "regex.h2"
+#line 520 "regex.h2"
+    auto generation_function_context::add_tabs(cpp2::in c) & -> void{
+        int i {0}; 
+        for( ; cpp2::cmp_less(i,c); i += 1 ) {
+            tabs += "  ";
+        }
+    }
+
+#line 527 "regex.h2"
+    auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
+        tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
+    }
+
+#line 541 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 521 "regex.h2"
+#line 543 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
-        code += (cpp2::to_string(tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
+        auto cur {get_current()}; 
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 525 "regex.h2"
-    [[nodiscard]] auto generation_context::generate_match_code(cpp2::in tokens) & -> std::string{
-        entry_func = start_func();
-        for ( auto const& token : tokens ) {
+#line 548 "regex.h2"
+    auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
+        end_func_statefull(c);
+
+        start_func_named(next_func);
+    }
 
+#line 554 "regex.h2"
+    [[nodiscard]] auto generation_context::run(cpp2::in tokens) & -> std::string{
+        entry_func = generate_func(tokens);
+
+        return (*cpp2::assert_not_null(get_base())).code; 
+    }
+
+#line 560 "regex.h2"
+    [[nodiscard]] auto generation_context::generate_func(cpp2::in tokens) & -> std::string{
+        auto name {start_func()}; 
+        for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
         }
         end_func();
 
-        return code; 
+        return name; 
+    }
+
+#line 570 "regex.h2"
+    [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
+        auto name {start_func()}; 
+        CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
+        end_func();
+
+        return name; 
+    }
+
+#line 578 "regex.h2"
+    [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
+        if (CPP2_UFCS(empty)(groups)) {
+            return "cpp2::regex::no_reset"; 
+        }
+
+        auto name {gen_reset_func_name()}; 
+        auto cur {new_context()}; 
+
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
+        (*cpp2::assert_not_null(cur)).code += "(cur*.tabs)  operator(): (this, inout ctx) = {\n";
+        for ( auto const& g : groups ) {
+            (*cpp2::assert_not_null(cur)).code += ("(cur*.tabs)  ctx.set_group_invalid(" + cpp2::to_string(g) + ");\n");
+        }
+        (*cpp2::assert_not_null(cur)).code += "(cur*.tabs)  }\n";
+        (*cpp2::assert_not_null(cur)).code += "(cur*.tabs)}\n";
+
+        finish_context();
+
+        return name; 
+    }
+
+#line 600 "regex.h2"
+    [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
+        return &CPP2_UFCS(back)(gen_stack); 
+    }
+
+#line 604 "regex.h2"
+    [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
+        return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
+    }
+
+#line 608 "regex.h2"
+    auto generation_context::start_func_named(cpp2::in name) & -> void{
+        auto cur {new_context()}; 
+
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n");
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "    r := ctx.pass(cur);\n");
+        CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 536 "regex.h2"
+#line 617 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
-        code += (cpp2::to_string(tabs) + cpp2::to_string(name) + ": type = {\n");
-        code += (cpp2::to_string(tabs) + "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n");
-        code += (cpp2::to_string(tabs) + "    r := ctx.pass(cur);\n");
-        add_tabs(2);
-
+        start_func_named(name);
         return name; 
     }
 
-#line 546 "regex.h2"
+#line 623 "regex.h2"
+    auto generation_context::end_func_statefull(cpp2::in s) & -> void{
+        auto cur {get_current()}; 
+        CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
+        (*cpp2::assert_not_null(cur)).code += "\n";
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "    r = " + cpp2::to_string(s) + ";\n");
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "    return r;\n");
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "  }\n");
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "}\n");
+
+        finish_context();
+    }
+
+#line 635 "regex.h2"
     auto generation_context::end_func() & -> void{
-        remove_tabs(2);
-        code += "\n";
-        code += (cpp2::to_string(tabs) + "    r = other(r.pos, ctx, modifiers);\n");
-        code += (cpp2::to_string(tabs) + "    return r;\n");
-        code += (cpp2::to_string(tabs) + "  }\n");
-        code += (cpp2::to_string(tabs) + "}\n");
+        end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 555 "regex.h2"
+#line 639 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 559 "regex.h2"
+#line 643 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 565 "regex.h2"
-    auto generation_context::add_tabs(cpp2::in c) & -> void{
-        int i {0}; 
-        for( ; cpp2::cmp_less(i,c); i += 1 ) {
-            tabs += "  ";
-        }
+#line 649 "regex.h2"
+    [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
+        auto cur_id {reset_func}; 
+        reset_func += 1;
+        return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 572 "regex.h2"
-    auto generation_context::remove_tabs(cpp2::in c) & -> void{
-        tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
+#line 655 "regex.h2"
+    [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
+        CPP2_UFCS(push_back)(gen_stack, generation_function_context());
+        auto cur {get_current()}; 
+        (*cpp2::assert_not_null(cur)).tabs = "    ";
+
+        return cur; 
+    }
+
+#line 663 "regex.h2"
+    auto generation_context::finish_context() & -> void{
+        auto cur {get_current()}; 
+        auto base {get_base()}; 
+        (*cpp2::assert_not_null(base)).code += (*cpp2::assert_not_null(std::move(cur))).code;
+
+        CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 580 "regex.h2"
+#line 675 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in state, cpp2::in str)
         : regex_token{ state, str }{
 
-#line 582 "regex.h2"
+#line 677 "regex.h2"
     }
 
-#line 584 "regex.h2"
+#line 679 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 592 "regex.h2"
+#line 687 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ false, std::string(1, t) }
         , token{ t }{
 
-#line 595 "regex.h2"
+#line 690 "regex.h2"
     }
 
-#line 597 "regex.h2"
+#line 692 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 601 "regex.h2"
+#line 696 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2061,7 +2210,7 @@ namespace regex {
 
     char_token::~char_token() noexcept{}
 
-#line 608 "regex.h2"
+#line 703 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2083,13 +2232,13 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 637 "regex.h2"
+#line 732 "regex.h2"
     range_token::range_token()
                              : regex_token{ true, "" }{}
 
-#line 639 "regex.h2"
+#line 734 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
-        std::shared_ptr r {}; 
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
             if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, "'{' without previous element."); }
 
@@ -2099,7 +2248,7 @@ template [[nodiscard]] auto char_toke
             inner = trim_copy(CPP2_UFCS(substr)(inner, 1));// Remove '{' and white spaces.
             if (CPP2_UFCS(empty)(inner)) {return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
-#line 651 "regex.h2"
+#line 746 "regex.h2"
             if (CPP2_UFCS(peek)(ctx) == '?') {
                 (*cpp2::assert_not_null(r)).kind = range_flags::not_greedy;
                 static_cast(CPP2_UFCS(next)(ctx));
@@ -2137,11 +2286,22 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
-            if (!(([_0 = 0, _1 = (*cpp2::assert_not_null(r)).min_count, _2 = (*cpp2::assert_not_null(r)).max_count]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) {
-                return CPP2_UFCS(error)(ctx, ("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::assert_not_null(r)).max_count))); 
+            if (-1 != (*cpp2::assert_not_null(r)).min_count) {
+                if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
+                    return CPP2_UFCS(error)(ctx, ("Min value in range is negative. Have " + cpp2::to_string((*cpp2::assert_not_null(r)).min_count) + ")")); 
+                }
+            }
+            if (-1 != (*cpp2::assert_not_null(r)).max_count) {
+                if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).max_count)))) {
+                    return CPP2_UFCS(error)(ctx, ("Max value in range is negative. Have " + cpp2::to_string((*cpp2::assert_not_null(r)).max_count) + ")")); 
+                }
+                if (-1 != (*cpp2::assert_not_null(r)).min_count) {
+                    if (!((cpp2::cmp_less_eq((*cpp2::assert_not_null(r)).min_count,(*cpp2::assert_not_null(r)).max_count)))) {
+                        return CPP2_UFCS(error)(ctx, ("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::assert_not_null(r)).max_count))); 
+                    }
+                }
             }
 
-#line 693 "regex.h2"
             (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
             (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + CPP2_UFCS(gen_string)((*cpp2::assert_not_null(r)));
 
@@ -2151,7 +2311,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 702 "regex.h2"
+#line 808 "regex.h2"
     [[nodiscard]] auto range_token::gen_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2176,19 +2336,21 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 726 "regex.h2"
+#line 832 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
-        static_cast(ctx);
-        //ctx.add_statefull("range_matcher_logic::match((ctx.get_arguments())$, (ctx.get_tail())$)")
+        auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
+        auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
 
+        auto next_name {CPP2_UFCS(gen_func_name)(ctx)}; 
+        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_matcher_logic::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
     }
 
-#line 732 "regex.h2"
+#line 840 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 749 "regex.h2"
+#line 857 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2201,12 +2363,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 761 "regex.h2"
+#line 869 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 762 "regex.h2"
+#line 870 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 764 "regex.h2"
+#line 872 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2222,7 +2384,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 779 "regex.h2"
+#line 887 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2238,7 +2400,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 795 "regex.h2"
+#line 903 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2250,7 +2412,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 807 "regex.h2"
+#line 915 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2272,7 +2434,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 833 "regex.h2"
+#line 941 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2284,19 +2446,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 844 "regex.h2"
+#line 952 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 845 "regex.h2"
+#line 953 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 851 "regex.h2"
+#line 959 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 852 "regex.h2"
+#line 960 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 853 "regex.h2"
+#line 961 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 860 "regex.h2"
+#line 968 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2316,12 +2478,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 879 "regex.h2"
+#line 987 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 880 "regex.h2"
+#line 988 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 888 "regex.h2"
+#line 996 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -2341,7 +2503,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 907 "regex.h2"
+#line 1015 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2354,10 +2516,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 919 "regex.h2"
+#line 1027 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 921 "regex.h2"
+#line 1029 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2369,18 +2531,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 936 "regex.h2"
+#line 1044 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 941 "regex.h2"
+#line 1049 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 942 "regex.h2"
+#line 1050 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 948 "regex.h2"
+#line 1056 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2388,14 +2550,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 955 "regex.h2"
+#line 1063 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 961 "regex.h2"
+#line 1069 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2418,7 +2580,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 985 "regex.h2"
+#line 1093 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2430,10 +2592,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 996 "regex.h2"
+#line 1104 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 998 "regex.h2"
+#line 1106 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2443,14 +2605,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1009 "regex.h2"
+#line 1117 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1010 "regex.h2"
+#line 1118 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1011 "regex.h2"
+#line 1119 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1017 "regex.h2"
+#line 1125 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2477,12 +2639,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1043 "regex.h2"
+#line 1151 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1044 "regex.h2"
+#line 1152 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1051 "regex.h2"
+#line 1159 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2495,12 +2657,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1063 "regex.h2"
+#line 1171 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1064 "regex.h2"
+#line 1172 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1071 "regex.h2"
+#line 1179 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2510,12 +2672,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1080 "regex.h2"
+#line 1188 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1081 "regex.h2"
+#line 1189 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1088 "regex.h2"
+#line 1196 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2531,38 +2693,38 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1103 "regex.h2"
+#line 1211 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1104 "regex.h2"
+#line 1212 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1111 "regex.h2"
+#line 1219 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1114 "regex.h2"
+#line 1222 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1115 "regex.h2"
+#line 1223 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1149 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
+#line 1257 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, end_func, tail); 
         }
         else {if (range_flags::greedy == kind) {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, end_func, tail); 
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, reset_func, end_func, tail); 
         }
         else { // range_flags::not_greedy == kind
             return match_not_greedy(cur, ctx, modifiers, end_func, tail); 
         }}
     }
 
-#line 1161 "regex.h2"
-    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
+#line 1269 "regex.h2"
+    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
 
-#line 1163 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
+#line 1271 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
       bstring r {M::to_string()}; 
 
       if (min_count == max_count) {
@@ -2588,32 +2750,32 @@ template [[nodiscard]] auto char_toke
       return r; 
     }
 
-#line 1189 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
+#line 1297 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1194 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
+#line 1302 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1199 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
+#line 1307 "regex.h2"
+    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1205 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+#line 1313 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
 
         while( is_below_lower_bound(count) && res.matched ) {
-            res = M::match(res.pos, ctx, modifiers, end_func, no_tail());
+            res = M()(res.pos, ctx, modifiers, end_func);
             if (res.matched) {
                 count += 1;
             }
@@ -2623,28 +2785,28 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 1220 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_7) -> match_return{
-        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (end_func)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
-            return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, Other()); 
+#line 1328 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
+        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
+            return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
         }}; 
         auto is_m_valid {true}; 
         auto r {CPP2_UFCS(fail)(ctx)}; 
         if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = M::match(cur, ctx, modifiers, std::move(inner_call), no_tail());
+            r = M()(cur, ctx, modifiers, std::move(inner_call));
         }
 
         if (!(r.matched) && is_in_range(count)) {
             // The recursion did not yield a match try now the tail
-            r = Other::match(cur, ctx, modifiers, end_func);
+            r = other(cur, ctx, modifiers, end_func);
 
             if (r.matched && !(std::move(is_m_valid))) {
                 // We have a match rematch M if required
-                M::reset_ranges(ctx);
+                reset_func(ctx);
 
                 if (cpp2::cmp_greater(count,0)) {
-                    static_cast(M::match(last_valid, ctx, modifiers, end_func, no_tail()));
+                    static_cast(M()(last_valid, ctx, modifiers, end_func));
                 }
             }
         }
@@ -2652,8 +2814,8 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1248 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
+#line 1356 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, end_func, count)}; 
 
@@ -2663,7 +2825,7 @@ template [[nodiscard]] auto char_toke
 
         auto pos {r.pos}; 
         while( r.matched && is_below_upper_bound(count) ) {
-            r = M::match(pos, ctx, modifiers, true_end_func(), no_tail());
+            r = M()(pos, ctx, modifiers, true_end_func());
 
             if (pos == r.pos) {
                 break; // Break infinite loop.
@@ -2674,11 +2836,11 @@ template [[nodiscard]] auto char_toke
             }
         }
 
-        return Other::match(std::move(pos), ctx, modifiers, end_func); 
+        return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1272 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> match_return{
+#line 1380 "regex.h2"
+    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, end_func, count)}; 
         if (!(start.matched)) {
@@ -2687,12 +2849,12 @@ template [[nodiscard]] auto char_toke
 
         auto pos {std::move(start).pos}; 
         while( is_below_upper_bound(count) ) {
-            auto o {Other::match(pos, ctx, modifiers, end_func)}; 
+            auto o {other(pos, ctx, modifiers, end_func)}; 
             if (o.matched) {
                 return o; 
             }
 
-            auto r {M::match(pos, ctx, modifiers, end_func, no_tail())}; 
+            auto r {M()(pos, ctx, modifiers, end_func)}; 
             if (!(r.matched)) {
                 return CPP2_UFCS(fail)(ctx); 
             }
@@ -2700,11 +2862,11 @@ template [[nodiscard]] auto char_toke
             pos = std::move(r).pos;
         }
 
-        return Other::match(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
+        return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1302 "regex.h2"
-    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
+#line 1410 "regex.h2"
+    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
         auto r {M::to_string() + symbol}; 
         if (kind == range_flags::not_greedy) {
             r += "?";
@@ -2716,7 +2878,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1321 "regex.h2"
+#line 1429 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2746,9 +2908,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1350 "regex.h2"
+#line 1458 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1351 "regex.h2"
+#line 1459 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2757,7 +2919,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1372 "regex.h2"
+#line 1480 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2767,34 +2929,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1383 "regex.h2"
+#line 1491 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1397 "regex.h2"
+#line 1505 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1400 "regex.h2"
+#line 1508 "regex.h2"
         }
 
-#line 1402 "regex.h2"
+#line 1510 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1403 "regex.h2"
+#line 1511 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1404 "regex.h2"
+#line 1512 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1405 "regex.h2"
+#line 1513 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1407 "regex.h2"
+#line 1515 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1408 "regex.h2"
+#line 1516 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1409 "regex.h2"
+#line 1517 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1411 "regex.h2"
+#line 1519 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2803,13 +2965,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1420 "regex.h2"
+#line 1528 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1421 "regex.h2"
+#line 1529 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1422 "regex.h2"
+#line 1530 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1423 "regex.h2"
+#line 1531 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2817,13 +2979,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1430 "regex.h2"
+#line 1538 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1431 "regex.h2"
+#line 1539 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1432 "regex.h2"
+#line 1540 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1433 "regex.h2"
+#line 1541 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2843,10 +3005,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1452 "regex.h2"
+#line 1560 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1457 "regex.h2"
+#line 1565 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2856,31 +3018,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1478 "regex.h2"
+#line 1586 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1481 "regex.h2"
+#line 1589 "regex.h2"
         }
 
-#line 1483 "regex.h2"
+#line 1591 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1484 "regex.h2"
+#line 1592 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1485 "regex.h2"
+#line 1593 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1486 "regex.h2"
+#line 1594 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1488 "regex.h2"
+#line 1596 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1489 "regex.h2"
+#line 1597 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1490 "regex.h2"
+#line 1598 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1492 "regex.h2"
+#line 1600 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -2889,13 +3051,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1501 "regex.h2"
+#line 1609 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1502 "regex.h2"
+#line 1610 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1503 "regex.h2"
+#line 1611 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1504 "regex.h2"
+#line 1612 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2903,13 +3065,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1511 "regex.h2"
+#line 1619 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1512 "regex.h2"
+#line 1620 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1513 "regex.h2"
+#line 1621 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1514 "regex.h2"
+#line 1622 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2929,10 +3091,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1533 "regex.h2"
+#line 1641 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1538 "regex.h2"
+#line 1646 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2942,24 +3104,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1574 "regex.h2"
+#line 1682 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1580 "regex.h2"
+#line 1688 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1586 "regex.h2"
+#line 1694 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1588 "regex.h2"
+#line 1696 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -2967,10 +3129,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1595 "regex.h2"
+#line 1703 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1605 "regex.h2"
+#line 1713 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2979,29 +3141,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1613 "regex.h2"
+#line 1721 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1618 "regex.h2"
+#line 1726 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1644 "regex.h2"
+#line 1752 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1648 "regex.h2"
+#line 1756 "regex.h2"
     }
 
-#line 1652 "regex.h2"
+#line 1760 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3009,12 +3171,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1659 "regex.h2"
+#line 1767 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1666 "regex.h2"
+#line 1774 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3027,14 +3189,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1678 "regex.h2"
+#line 1786 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1687 "regex.h2"
+#line 1795 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3073,7 +3235,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1725 "regex.h2"
+#line 1833 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3086,14 +3248,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1737 "regex.h2"
+#line 1845 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1738 "regex.h2"
+#line 1846 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1739 "regex.h2"
+#line 1847 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1743 "regex.h2"
+#line 1851 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3101,7 +3263,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1750 "regex.h2"
+#line 1858 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3111,7 +3273,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1759 "regex.h2"
+#line 1867 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3120,7 +3282,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1767 "regex.h2"
+#line 1875 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3131,12 +3293,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1777 "regex.h2"
+#line 1885 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1778 "regex.h2"
+#line 1886 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1780 "regex.h2"
+#line 1888 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3158,14 +3320,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1801 "regex.h2"
+#line 1909 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1802 "regex.h2"
+#line 1910 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1803 "regex.h2"
+#line 1911 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1805 "regex.h2"
+#line 1913 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3178,7 +3340,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1817 "regex.h2"
+#line 1925 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3199,13 +3361,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 1839 "regex.h2"
+#line 1947 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1844 "regex.h2"
+#line 1952 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3218,10 +3380,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1856 "regex.h2"
+#line 1964 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1862 "regex.h2"
+#line 1970 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3229,10 +3391,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1869 "regex.h2"
+#line 1977 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1871 "regex.h2"
+#line 1979 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3249,7 +3411,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1887 "regex.h2"
+#line 1995 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3260,7 +3422,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1899 "regex.h2"
+#line 2007 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3272,7 +3434,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1910 "regex.h2"
+#line 2018 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3309,7 +3471,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1946 "regex.h2"
+#line 2054 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3375,7 +3537,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2014 "regex.h2"
+#line 2122 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3384,7 +3546,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2022 "regex.h2"
+#line 2130 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3398,7 +3560,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2035 "regex.h2"
+#line 2143 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3407,7 +3569,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2043 "regex.h2"
+#line 2151 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3515,7 +3677,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2150 "regex.h2"
+#line 2258 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3683,7 +3845,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2317 "regex.h2"
+#line 2425 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3816,7 +3978,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2449 "regex.h2"
+#line 2557 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3824,7 +3986,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2456 "regex.h2"
+#line 2564 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -3888,7 +4050,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2519 "regex.h2"
+#line 2627 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -3925,7 +4087,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2555 "regex.h2"
+#line 2663 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -3948,7 +4110,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2577 "regex.h2"
+#line 2685 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
         parse_context parse_ctx {regex}; 
 
@@ -3964,16 +4126,17 @@ template [[nodiscard]] auto char_toke
             if (cur_token && CPP2_UFCS(valid)(parse_ctx)) {
                 CPP2_UFCS(add_token)(parse_ctx, cur_token);
             }else {
-                // TODO: error(parse_ctx);
+                error(parse_ctx.error_text);
+                return ""; 
             }
         }
 
         generation_context gen_ctx {}; 
-        source += CPP2_UFCS(generate_match_code)(gen_ctx, CPP2_UFCS(get_tokens)(std::move(parse_ctx)));
+        source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(std::move(parse_ctx)));
         return CPP2_UFCS(get_entry_func)(std::move(gen_ctx)); 
     }
 
-#line 2601 "regex.h2"
+#line 2710 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -3996,7 +4159,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2623 "regex.h2"
+#line 2732 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
 
@@ -4016,14 +4179,14 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2643 "regex.h2"
+#line 2752 "regex.h2"
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
         return source; 
     }
 
-#line 2650 "regex.h2"
+#line 2759 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index f41de8a934..32b661afc5 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -353,6 +353,11 @@ special_syntax_wrapper:  type = {
 //-----------------------------------------------------------------------
 //
 
+
+no_reset: @struct type = {
+    operator(): (this, inout _:) = {}
+}
+
 regex_token: @polymorphic_base type = {
 
     public needs_state: bool;
@@ -379,9 +384,9 @@ parse_context: type = {
 
     pos: size_t = 0;
 
-    error_text: std::string = "";
+    public error_text: std::string = "";
 
-    public cur_state: token_vec = ();
+    cur_state: token_vec = ();
 
     operator=:(out this, r: std::string_view) = {
         regex = r;
@@ -507,49 +512,128 @@ parse_context: type = {
 
 
 }
-generation_context: @struct type = {
 
+generation_function_context: @struct type = {
     code: std::string = "";
-    tabs: std::string = "    ";
+    tabs: std::string = "";
+
+    add_tabs: (inout this, c: int) = {
+        i: int = 0;
+        while i < c next i += 1 {
+            tabs += "  ";
+        }
+    }
+
+    remove_tabs: (inout this, c: int) = {
+        tabs = tabs.substr(0, c * 2);
+    }
+}
+
+generation_context: @struct type = {
+
+    gen_stack: std::vector = (1);
 
     new_state : bool = true;
     matcher_func: int         = 0;
+    reset_func:   int         = 0;
     entry_func:   std::string = "";
 
     match_parameters: (this) -> std::string = { return "r.pos, ctx, modifiers"; }
 
     add_check: (inout this, check: std::string) = {
-        code += "(tabs)$if !cpp2::regex::(check)$ { r = ctx.fail(); return r; }\n";
+        cur := get_current();
+        cur*.code += "(cur*.tabs)$if !cpp2::regex::(check)$ { r = ctx.fail(); return r; }\n";
     }
 
-    generate_match_code: (inout this, tokens: token_vec) -> std::string = {
-        entry_func = start_func();
-        for tokens do (token) {
+    add_statefull: (inout this, next_func: std::string, c: std::string) = {
+        end_func_statefull(c);
+
+        start_func_named(next_func);
+    }
+
+    run: (inout this, tokens: token_vec) -> std::string = {
+        entry_func = generate_func(tokens);
 
+        return get_base()*.code;
+    }
+
+    generate_func: (inout this, tokens: token_vec) -> std::string = {
+        name := start_func();
+        for tokens do (token) {
             token*.generate_code(this);
         }
         end_func();
 
-        return code;
+        return name;
+    }
+
+    generate_func: (inout this, token: token_ptr) -> std::string = {
+        name := start_func();
+        token*.generate_code(this);
+        end_func();
+
+        return name;
+    }
+
+    generate_reset: (inout this, groups: std::vector) -> std::string = {
+        if groups.empty() {
+            return "cpp2::regex::no_reset";
+        }
+
+        name := gen_reset_func_name();
+        cur := new_context();
+
+        cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
+        cur*.code += "(cur*.tabs)  operator(): (this, inout ctx) = {\n";
+        for groups do (g) {
+            cur*.code += "(cur*.tabs)  ctx.set_group_invalid((g)$);\n";
+        }
+        cur*.code += "(cur*.tabs)  }\n";
+        cur*.code += "(cur*.tabs)}\n";
+
+        finish_context();
+
+        return name;
+    }
+
+
+    get_current: (inout this) -> *generation_function_context = {
+        return gen_stack.back()&;
+    }
+
+    get_base: (inout this) -> *generation_function_context = {
+        return gen_stack[0]&;
+    }
+
+    start_func_named: (inout this, name: std::string) = {
+        cur := new_context();
+
+        cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
+        cur*.code += "(cur*.tabs)$  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
+        cur*.code += "(cur*.tabs)$    r := ctx.pass(cur);\n";
+        cur*.add_tabs(2);
     }
 
     start_func: (inout this) -> std::string = {
         name := gen_func_name();
-        code += "(tabs)$(name)$: type = {\n";
-        code += "(tabs)$  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
-        code += "(tabs)$    r := ctx.pass(cur);\n";
-        add_tabs(2);
-
+        start_func_named(name);
         return name;
     }
 
+    end_func_statefull: (inout this, s: std::string) = {
+        cur := get_current();
+        cur*.remove_tabs(2);
+        cur*.code += "\n";
+        cur*.code += "(cur*.tabs)$    r = (s)$;\n";
+        cur*.code += "(cur*.tabs)$    return r;\n";
+        cur*.code += "(cur*.tabs)$  }\n";
+        cur*.code += "(cur*.tabs)$}\n";
+
+        finish_context();
+    }
+
     end_func: (inout this) = {
-        remove_tabs(2);
-        code += "\n";
-        code += "(tabs)$    r = other(r.pos, ctx, modifiers);\n";
-        code += "(tabs)$    return r;\n";
-        code += "(tabs)$  }\n";
-        code += "(tabs)$}\n";
+        end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
     get_entry_func: (this) -> std::string = {
@@ -562,15 +646,26 @@ generation_context: @struct type = {
         return "func_(cur_id)$";
     }
 
-    add_tabs: (inout this, c: int) = {
-        i: int = 0;
-        while i < c next i += 1 {
-            tabs += "  ";
-        }
+    gen_reset_func_name: (inout this) -> std::string = {
+        cur_id : = reset_func;
+        reset_func += 1;
+        return "reset_(cur_id)$";
     }
 
-    remove_tabs: (inout this, c: int) = {
-        tabs = tabs.substr(0, c * 2);
+    new_context: (inout this) -> *generation_function_context = {
+        gen_stack.push_back(generation_function_context());
+        cur := get_current();
+        cur*.tabs = "    ";
+
+        return cur;
+    }
+
+    finish_context: (inout this) = {
+        cur := get_current();
+        base := get_base();
+        base*.code += cur*.code;
+
+        gen_stack.pop_back();
     }
 }
 
@@ -637,7 +732,7 @@ range_token: @polymorphic_base type = {
     operator=: (out this) = {}
 
     parse: (inout ctx: parse_context) -> token_ptr = {
-        r: std::shared_ptr = ();
+        r := shared.new();
         if ctx.current() == '{' {
             if !ctx.has_token() { return ctx.error("'{' without previous element."); }
 
@@ -685,10 +780,21 @@ range_token: @polymorphic_base type = {
                 }
             }
 
-            if !(0 <= r*.min_count <= r*.max_count) {
-                return ctx.error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (r*.min_count)$ <= (r*.max_count)$");
+            if -1 != r*.min_count {
+                if !(0 <= r*.min_count) {
+                    return ctx.error("Min value in range is negative. Have (r*.min_count)$)");
+                }
+            }
+            if -1 != r*.max_count {
+                if !(0 <= r*.max_count) {
+                    return ctx.error("Max value in range is negative. Have (r*.max_count)$)");
+                }
+                if -1 != r*.min_count {
+                    if !(r*.min_count <= r*.max_count) {
+                        return ctx.error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (r*.min_count)$ <= (r*.max_count)$");
+                    }
+                }
             }
-
 
             r*.inner_token = ctx.pop_token();
             r*.string_rep = r*.inner_token*.to_string() + r*.gen_string();
@@ -724,9 +830,11 @@ range_token: @polymorphic_base type = {
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        _ = ctx;
-        //ctx.add_statefull("range_matcher_logic::match((ctx.get_arguments())$, (ctx.get_tail())$)")
+        inner_name := ctx.generate_func(inner_token);
+        reset_name := ctx.generate_reset(inner_token*.get_groups());
 
+        next_name := ctx.gen_func_name();
+        ctx.add_statefull(next_name, "cpp2::regex::range_matcher_logic::match((ctx.match_parameters())$, (reset_name)$(), other, (next_name)$())");
     }
 
     get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
@@ -1144,14 +1252,14 @@ named_string_start:  type == special_syntax_wrapper{min, max}  Example: a{2,4}
-range_matcher_logic:  type = {
+range_matcher_logic:  type = {
 
-    match:  (cur: Iter, inout ctx, modifiers, end_func, tail) -> _ = {
+    match:  (cur: Iter, inout ctx, modifiers, reset_func, end_func, tail) -> _ = {
         if range_flags::possessive == kind {
             return match_possessive(cur, ctx, modifiers, end_func, tail);
         }
         else if range_flags::greedy == kind {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, end_func, tail);
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, reset_func, end_func, tail);
         }
         else { // range_flags::not_greedy == kind
             return match_not_greedy(cur, ctx, modifiers, end_func, tail);
@@ -1207,7 +1315,7 @@ range_matcher_logic:  ty
         count := 0;
 
         while is_below_lower_bound(count) && res.matched {
-            res = M::match(res.pos, ctx, modifiers, end_func, no_tail());
+            res = M()(res.pos, ctx, modifiers, end_func);
             if res.matched {
                 count += 1;
             }
@@ -1217,27 +1325,27 @@ range_matcher_logic:  ty
         return res;
     }
 
-    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, end_func, _ : Other) -> match_return = {
+    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, reset_func, end_func, other) -> match_return = {
         inner_call := :(tail_cur, inout tail_ctx, _ /* ignore new modifiers */) -> _ == {
-            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (modifiers)$, (end_func)$, Other());
+            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (modifiers)$, (reset_func)$, (end_func)$, (other)$);
         };
         is_m_valid := true;
         r := ctx.fail();
         if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = M::match(cur, ctx, modifiers, inner_call, no_tail());
+            r = M()(cur, ctx, modifiers, inner_call);
         }
 
         if !r.matched && is_in_range(count) {
             // The recursion did not yield a match try now the tail
-            r = Other::match(cur, ctx, modifiers, end_func);
+            r = other(cur, ctx, modifiers, end_func);
 
             if r.matched && !is_m_valid{
                 // We have a match rematch M if required
-                M::reset_ranges(ctx);
+                reset_func(ctx);
 
                 if count > 0 {
-                    _ = M::match(last_valid, ctx, modifiers, end_func, no_tail());
+                    _ = M()(last_valid, ctx, modifiers, end_func);
                 }
             }
         }
@@ -1245,7 +1353,7 @@ range_matcher_logic:  ty
         return r;
     }
 
-    private match_possessive:  (cur: Iter, inout ctx, modifiers, end_func, _ : Other) -> match_return = {
+    private match_possessive: (cur: Iter, inout ctx, modifiers, end_func, other) -> match_return = {
         count :=0;
         r := match_min_count(cur, ctx, modifiers, end_func, count);
 
@@ -1255,7 +1363,7 @@ range_matcher_logic:  ty
 
         pos := r.pos;
         while r.matched && is_below_upper_bound(count) {
-            r = M::match(pos, ctx, modifiers, true_end_func(), no_tail());
+            r = M()(pos, ctx, modifiers, true_end_func());
 
             if pos == r.pos {
                 break; // Break infinite loop.
@@ -1266,10 +1374,10 @@ range_matcher_logic:  ty
             }
         }
 
-        return Other::match(pos, ctx, modifiers, end_func);
+        return other(pos, ctx, modifiers, end_func);
     }
 
-    private match_not_greedy:  (cur: Iter, inout ctx, modifiers, end_func, _ : Other) -> match_return = {
+    private match_not_greedy:  (cur: Iter, inout ctx, modifiers, end_func, other) -> match_return = {
         count := 0;
         start := match_min_count(cur, ctx, modifiers, end_func, count);
         if !start.matched {
@@ -1278,12 +1386,12 @@ range_matcher_logic:  ty
 
         pos := start.pos;
         while is_below_upper_bound(count) {
-            o:= Other::match(pos, ctx, modifiers, end_func);
+            o:= other(pos, ctx, modifiers, end_func);
             if o.matched {
                 return o;
             }
 
-            r:= M::match(pos, ctx, modifiers, end_func, no_tail());
+            r:= M()(pos, ctx, modifiers, end_func);
             if !r.matched {
                 return ctx.fail();
             }
@@ -1291,14 +1399,14 @@ range_matcher_logic:  ty
             pos = r.pos;
         }
 
-        return Other::match(pos, ctx, modifiers, end_func); // Upper bound reached.
+        return other(pos, ctx, modifiers, end_func); // Upper bound reached.
     }
 }
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
-special_range_matcher_logic:  type = {
-    this: range_matcher_logic = ();
+special_range_matcher_logic:  type = {
+    this: range_matcher_logic = ();
     to_string: () -> bstring = {
         r := M::to_string() + symbol;
         if kind == range_flags::not_greedy {
@@ -2589,12 +2697,13 @@ regex_parser:  type = {
             if cur_token && parse_ctx.valid() {
                 parse_ctx.add_token(cur_token);
             } else {
-                // TODO: error(parse_ctx);
+                error(parse_ctx.error_text);
+                return "";
             }
         }
 
         gen_ctx: generation_context = ();
-        source += gen_ctx.generate_match_code(parse_ctx.get_tokens());
+        source += gen_ctx.run(parse_ctx.get_tokens());
         return gen_ctx.get_entry_func();
     }
 

From 1321d8bab78801c61f76ac816456216519400e80 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 13:29:05 +0200
Subject: [PATCH 101/161] Cleanup of ranger matcher implementation.

---
 include/cpp2regex.h | 943 +++++++++++++++++++++-----------------------
 source/regex.h2     | 312 +++++++--------
 2 files changed, 590 insertions(+), 665 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 35ad0306f9..0545944837 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -115,96 +115,92 @@ class char_token;
 class range_token;
     
 
-#line 855 "regex.h2"
+#line 844 "regex.h2"
+template class range_token_matcher;
+
+#line 980 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 939 "regex.h2"
+#line 1064 "regex.h2"
 template class any_matcher_logic;
 
-#line 958 "regex.h2"
+#line 1083 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 966 "regex.h2"
+#line 1091 "regex.h2"
 template class char_matcher_logic;
 
-#line 994 "regex.h2"
+#line 1119 "regex.h2"
 template class class_matcher_logic;
 
-#line 1043 "regex.h2"
+#line 1168 "regex.h2"
 template class global_group_reset;
     
 
-#line 1055 "regex.h2"
+#line 1180 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1092 "regex.h2"
+#line 1217 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1116 "regex.h2"
+#line 1241 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1124 "regex.h2"
+#line 1249 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1157 "regex.h2"
+#line 1282 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1177 "regex.h2"
+#line 1302 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1194 "regex.h2"
+#line 1319 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1217 "regex.h2"
+#line 1342 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1229 "regex.h2"
+#line 1354 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1255 "regex.h2"
-template class range_matcher_logic;
-
-#line 1408 "regex.h2"
-template class special_range_matcher_logic;
-    
-
-#line 1427 "regex.h2"
+#line 1399 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1478 "regex.h2"
+#line 1450 "regex.h2"
 template class group_name_list;
 
-#line 1490 "regex.h2"
+#line 1462 "regex.h2"
 class group_name_list_end;
     
 
-#line 1495 "regex.h2"
+#line 1467 "regex.h2"
 template class regular_expression;
 
-#line 1576 "regex.h2"
+#line 1548 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1665 "regex.h2"
+#line 1637 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1672 "regex.h2"
+#line 1644 "regex.h2"
 class regex_parser_group_state;
 
-#line 1707 "regex.h2"
+#line 1679 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1734 "regex.h2"
+#line 1706 "regex.h2"
 template class regex_parser;
 
-#line 2766 "regex.h2"
+#line 2738 "regex.h2"
 }
 }
 
@@ -775,6 +771,40 @@ class range_token: public regex_token {
 #line 841 "regex.h2"
 };
 
+// Regex syntax: {min, max}  Example: a{2,4}
+template class range_token_matcher {
+
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
+
+#line 858 "regex.h2"
+    private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
+
+#line 863 "regex.h2"
+    private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
+
+#line 868 "regex.h2"
+    private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
+
+#line 874 "regex.h2"
+    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
+
+#line 889 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
+
+#line 917 "regex.h2"
+    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
+
+#line 941 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
+    public: range_token_matcher() = default;
+    public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(range_token_matcher const&) -> void = delete;
+
+
+#line 965 "regex.h2"
+};
+
+#line 968 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -782,7 +812,7 @@ class range_token: public regex_token {
 //-----------------------------------------------------------------------
 //
 
-#line 851 "regex.h2"
+#line 976 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -791,20 +821,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 869 "regex.h2"
+#line 994 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 887 "regex.h2"
+#line 1012 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 935 "regex.h2"
+#line 1060 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -813,14 +843,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 952 "regex.h2"
+#line 1077 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 954 "regex.h2"
+#line 1079 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -833,7 +863,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 962 "regex.h2"
+#line 1087 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -842,27 +872,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 987 "regex.h2"
+#line 1112 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 989 "regex.h2"
+#line 1114 "regex.h2"
 };
 
-#line 992 "regex.h2"
+#line 1117 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1015 "regex.h2"
+#line 1140 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1027 "regex.h2"
+#line 1152 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -871,7 +901,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1039 "regex.h2"
+#line 1164 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -879,14 +909,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1049 "regex.h2"
+#line 1174 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1051 "regex.h2"
+#line 1176 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -894,23 +924,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1063 "regex.h2"
+#line 1188 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1069 "regex.h2"
+#line 1194 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1090 "regex.h2"
+#line 1215 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1104 "regex.h2"
+#line 1229 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -919,7 +949,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1114 "regex.h2"
+#line 1239 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -930,7 +960,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1120 "regex.h2"
+#line 1245 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -938,14 +968,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1151 "regex.h2"
+#line 1276 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1153 "regex.h2"
+#line 1278 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -954,14 +984,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1171 "regex.h2"
+#line 1296 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1173 "regex.h2"
+#line 1298 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -970,14 +1000,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1188 "regex.h2"
+#line 1313 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1190 "regex.h2"
+#line 1315 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -986,14 +1016,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1211 "regex.h2"
+#line 1336 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1213 "regex.h2"
+#line 1338 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1002,14 +1032,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1222 "regex.h2"
+#line 1347 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1224 "regex.h2"
+#line 1349 "regex.h2"
 };
 
 // Named character classes
@@ -1021,7 +1051,7 @@ template                    void = delete;
 
 
-#line 1231 "regex.h2"
+#line 1356 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1031,7 +1061,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1241 "regex.h2"
+#line 1366 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1043,57 +1073,23 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 1254 "regex.h2"
-// Regex syntax: {min, max}  Example: a{2,4}
-template class range_matcher_logic {
-
-    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
-
-#line 1269 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
-
-    public: [[nodiscard]] static auto to_string() -> bstring;
-
-#line 1297 "regex.h2"
-    private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
-
-#line 1302 "regex.h2"
-    private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
-
-#line 1307 "regex.h2"
-    private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
-
-#line 1313 "regex.h2"
-    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto;
-
-#line 1328 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
-
-#line 1356 "regex.h2"
-    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return;
-
-#line 1380 "regex.h2"
-    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return;
-    public: range_matcher_logic() = default;
-    public: range_matcher_logic(range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(range_matcher_logic const&) -> void = delete;
-
-
-#line 1404 "regex.h2"
-};
-
-// Regex syntax: *, +, or ?  Example: aa*
-//
-template class special_range_matcher_logic: public range_matcher_logic {
-
-    public: [[nodiscard]] static auto to_string() -> bstring;
-    public: special_range_matcher_logic() = default;
-    public: special_range_matcher_logic(special_range_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(special_range_matcher_logic const&) -> void = delete;
-
-
-#line 1421 "regex.h2"
-};
+#line 1378 "regex.h2"
+// // Regex syntax: *, +, or ?  Example: aa*
+// //
+// special_range_matcher_logic:  type = {
+//     this: range_matcher_logic = ();
+//     to_string: () -> bstring = {
+//         r := M::to_string() + symbol;
+//         if kind == range_flags::not_greedy {
+//             r += "?";
+//         }
+//         else if kind == range_flags::possessive {
+//             r += "+";
+//         }
+
+//         return r;
+//     }
+// }
 
 // Regex syntax: \b or \B  Example: \bword\b
 //
@@ -1103,7 +1099,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1458 "regex.h2"
+#line 1430 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1111,10 +1107,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1466 "regex.h2"
+#line 1438 "regex.h2"
 };
 
-#line 1469 "regex.h2"
+#line 1441 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1132,7 +1128,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1488 "regex.h2"
+#line 1460 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1141,7 +1137,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1492 "regex.h2"
+#line 1464 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1157,7 +1153,7 @@ template matched_, context const& ctx_);
 
-#line 1510 "regex.h2"
+#line 1482 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1172,7 +1168,7 @@ template void = delete;
 
 
-#line 1526 "regex.h2"
+#line 1498 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1180,13 +1176,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1538 "regex.h2"
+#line 1510 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1560 "regex.h2"
+#line 1532 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1198,7 +1194,7 @@ template void = delete;
 
 
-#line 1573 "regex.h2"
+#line 1545 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1214,7 +1210,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1591 "regex.h2"
+#line 1563 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1229,7 +1225,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1607 "regex.h2"
+#line 1579 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1237,13 +1233,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1619 "regex.h2"
+#line 1591 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1641 "regex.h2"
+#line 1613 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1255,7 +1251,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1654 "regex.h2"
+#line 1626 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1286,15 +1282,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1688 "regex.h2"
+#line 1660 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1694 "regex.h2"
+#line 1666 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1703 "regex.h2"
+#line 1675 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1307,13 +1303,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1721 "regex.h2"
+#line 1693 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1726 "regex.h2"
+#line 1698 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1731 "regex.h2"
+#line 1703 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1337,153 +1333,153 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1758 "regex.h2"
+#line 1730 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1767 "regex.h2"
+#line 1739 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1771 "regex.h2"
+#line 1743 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1786 "regex.h2"
+#line 1758 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1792 "regex.h2"
+#line 1764 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1833 "regex.h2"
+#line 1805 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1845 "regex.h2"
+#line 1817 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1851 "regex.h2"
+#line 1823 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1858 "regex.h2"
+#line 1830 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1867 "regex.h2"
+#line 1839 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1875 "regex.h2"
+#line 1847 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1885 "regex.h2"
+#line 1857 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1909 "regex.h2"
+#line 1881 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1925 "regex.h2"
+#line 1897 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1945 "regex.h2"
+#line 1917 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1952 "regex.h2"
+#line 1924 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1964 "regex.h2"
+#line 1936 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1967 "regex.h2"
+#line 1939 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1977 "regex.h2"
+#line 1949 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1995 "regex.h2"
+#line 1967 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2005 "regex.h2"
+#line 1977 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2018 "regex.h2"
+#line 1990 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2054 "regex.h2"
+#line 2026 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2119 "regex.h2"
+#line 2091 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2130 "regex.h2"
+#line 2102 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2143 "regex.h2"
+#line 2115 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2151 "regex.h2"
+#line 2123 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2258 "regex.h2"
+#line 2230 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2425 "regex.h2"
+#line 2397 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2557 "regex.h2"
+#line 2529 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2564 "regex.h2"
+#line 2536 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2627 "regex.h2"
+#line 2599 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2663 "regex.h2"
+#line 2635 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2685 "regex.h2"
+#line 2657 "regex.h2"
     public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
 
-#line 2710 "regex.h2"
+#line 2682 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2732 "regex.h2"
+#line 2704 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2757 "regex.h2"
+#line 2729 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2766 "regex.h2"
+#line 2738 "regex.h2"
 }
 }
 
@@ -2342,7 +2338,7 @@ template [[nodiscard]] auto char_toke
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
 
         auto next_name {CPP2_UFCS(gen_func_name)(ctx)}; 
-        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_matcher_logic::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
+        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + "(), " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
     }
 
 #line 840 "regex.h2"
@@ -2350,7 +2346,135 @@ template [[nodiscard]] auto char_toke
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 857 "regex.h2"
+#line 846 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
+        if (range_flags::possessive == kind) {
+            return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
+        }
+        else {if (range_flags::greedy == kind) {
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, inner, reset_func, end_func, tail); 
+        }
+        else { // range_flags::not_greedy == kind
+            return match_not_greedy(cur, ctx, modifiers, inner, end_func, tail); 
+        }}
+    }
+
+#line 858 "regex.h2"
+    template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
+        if (-1 == max_count) {return true; }
+        else {return cpp2::cmp_less(count,max_count); }
+    }
+
+#line 863 "regex.h2"
+    template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
+        if (-1 == min_count) {return false; }
+        else {return cpp2::cmp_less(count,min_count); }
+    }
+
+#line 868 "regex.h2"
+    template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
+        if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
+        if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
+        return true; 
+    }
+
+#line 874 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+        auto res {CPP2_UFCS(pass)(ctx, cur)}; 
+        auto count {0}; 
+
+        while( is_below_lower_bound(count) && res.matched ) {
+            res = inner(res.pos, ctx, modifiers, end_func);
+            if (res.matched) {
+                count += 1;
+            }
+        }
+
+        count_r = std::move(count);
+        return res; 
+    }
+
+#line 889 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
+        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
+            return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
+        }}; 
+        auto is_m_valid {true}; 
+        auto r {CPP2_UFCS(fail)(ctx)}; 
+        if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
+            is_m_valid = false;  // Group ranges in M are invalidated through the call.
+            r = inner(cur, ctx, modifiers, std::move(inner_call));
+        }
+
+        if (!(r.matched) && is_in_range(count)) {
+            // The recursion did not yield a match try now the tail
+            r = other(cur, ctx, modifiers, end_func);
+
+            if (r.matched && !(std::move(is_m_valid))) {
+                // We have a match rematch M if required
+                reset_func(ctx);
+
+                if (cpp2::cmp_greater(count,0)) {
+                    static_cast(inner(last_valid, ctx, modifiers, end_func));
+                }
+            }
+        }
+
+        return r; 
+    }
+
+#line 917 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
+        auto count {0}; 
+        auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
+
+        if (!(r.matched)) {
+          return r; 
+        }
+
+        auto pos {r.pos}; 
+        while( r.matched && is_below_upper_bound(count) ) {
+            r = inner(pos, ctx, modifiers, true_end_func());
+
+            if (pos == r.pos) {
+                break; // Break infinite loop.
+            }
+            if (r.matched) {
+                count += 1;
+                pos = r.pos;
+            }
+        }
+
+        return other(std::move(pos), ctx, modifiers, end_func); 
+    }
+
+#line 941 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
+        auto count {0}; 
+        auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
+        if (!(start.matched)) {
+          return start; 
+        }
+
+        auto pos {std::move(start).pos}; 
+        while( is_below_upper_bound(count) ) {
+            auto o {other(pos, ctx, modifiers, end_func)}; 
+            if (o.matched) {
+                return o; 
+            }
+
+            auto r {inner(pos, ctx, modifiers, end_func)}; 
+            if (!(r.matched)) {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+            count += 1;
+            pos = std::move(r).pos;
+        }
+
+        return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
+    }
+
+#line 982 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2363,12 +2487,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 869 "regex.h2"
+#line 994 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 870 "regex.h2"
+#line 995 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 872 "regex.h2"
+#line 997 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2384,7 +2508,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 887 "regex.h2"
+#line 1012 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2400,7 +2524,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 903 "regex.h2"
+#line 1028 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2412,7 +2536,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 915 "regex.h2"
+#line 1040 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2434,7 +2558,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 941 "regex.h2"
+#line 1066 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2446,19 +2570,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 952 "regex.h2"
+#line 1077 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 953 "regex.h2"
+#line 1078 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 959 "regex.h2"
+#line 1084 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 960 "regex.h2"
+#line 1085 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 961 "regex.h2"
+#line 1086 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 968 "regex.h2"
+#line 1093 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2478,12 +2602,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 987 "regex.h2"
+#line 1112 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 988 "regex.h2"
+#line 1113 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 996 "regex.h2"
+#line 1121 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -2503,7 +2627,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1015 "regex.h2"
+#line 1140 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2516,10 +2640,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1027 "regex.h2"
+#line 1152 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1029 "regex.h2"
+#line 1154 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2531,18 +2655,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1044 "regex.h2"
+#line 1169 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1049 "regex.h2"
+#line 1174 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1050 "regex.h2"
+#line 1175 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1056 "regex.h2"
+#line 1181 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2550,14 +2674,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1063 "regex.h2"
+#line 1188 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1069 "regex.h2"
+#line 1194 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2580,7 +2704,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1093 "regex.h2"
+#line 1218 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2592,10 +2716,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1104 "regex.h2"
+#line 1229 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1106 "regex.h2"
+#line 1231 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2605,14 +2729,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1117 "regex.h2"
+#line 1242 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1118 "regex.h2"
+#line 1243 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1119 "regex.h2"
+#line 1244 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1125 "regex.h2"
+#line 1250 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2639,12 +2763,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1151 "regex.h2"
+#line 1276 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1152 "regex.h2"
+#line 1277 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1159 "regex.h2"
+#line 1284 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2657,12 +2781,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1171 "regex.h2"
+#line 1296 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1172 "regex.h2"
+#line 1297 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1179 "regex.h2"
+#line 1304 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2672,12 +2796,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1188 "regex.h2"
+#line 1313 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1189 "regex.h2"
+#line 1314 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1196 "regex.h2"
+#line 1321 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2693,192 +2817,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1211 "regex.h2"
+#line 1336 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1212 "regex.h2"
+#line 1337 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1219 "regex.h2"
+#line 1344 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1222 "regex.h2"
+#line 1347 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1223 "regex.h2"
+#line 1348 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1257 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
-        if (range_flags::possessive == kind) {
-            return match_possessive(cur, ctx, modifiers, end_func, tail); 
-        }
-        else {if (range_flags::greedy == kind) {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, reset_func, end_func, tail); 
-        }
-        else { // range_flags::not_greedy == kind
-            return match_not_greedy(cur, ctx, modifiers, end_func, tail); 
-        }}
-    }
-
-#line 1269 "regex.h2"
-    template  auto range_matcher_logic::reset_ranges(auto& ctx) -> void { M::reset_ranges(ctx); }
-
-#line 1271 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::to_string() -> bstring{
-      bstring r {M::to_string()}; 
-
-      if (min_count == max_count) {
-        r += ("{" + cpp2::to_string(min_count) + "}");
-      }
-      else {if (min_count == -1) {
-        r += ("{," + cpp2::to_string(max_count) + "}");
-      }
-      else {if (max_count == -1) {
-        r += ("{" + cpp2::to_string(min_count) + ",}");
-      }
-      else {
-        r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}");
-      }}}
-
-      if (kind == range_flags::not_greedy) {
-        r += "?";
-      }
-      else {if (kind == range_flags::possessive) {
-        r += "+";
-      }}
-
-      return r; 
-    }
-
-#line 1297 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_upper_bound(cpp2::in count) -> bool{
-        if (-1 == max_count) {return true; }
-        else {return cpp2::cmp_less(count,max_count); }
-    }
-
-#line 1302 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_below_lower_bound(cpp2::in count) -> bool{
-        if (-1 == min_count) {return false; }
-        else {return cpp2::cmp_less(count,min_count); }
-    }
-
-#line 1307 "regex.h2"
-    template  [[nodiscard]] auto range_matcher_logic::is_in_range(cpp2::in count) -> bool{
-        if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
-        if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
-        return true; 
-    }
-
-#line 1313 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
-        auto res {CPP2_UFCS(pass)(ctx, cur)}; 
-        auto count {0}; 
-
-        while( is_below_lower_bound(count) && res.matched ) {
-            res = M()(res.pos, ctx, modifiers, end_func);
-            if (res.matched) {
-                count += 1;
-            }
-        }
-
-        count_r = std::move(count);
-        return res; 
-    }
-
-#line 1328 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
-        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
-            return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
-        }}; 
-        auto is_m_valid {true}; 
-        auto r {CPP2_UFCS(fail)(ctx)}; 
-        if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
-            is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = M()(cur, ctx, modifiers, std::move(inner_call));
-        }
-
-        if (!(r.matched) && is_in_range(count)) {
-            // The recursion did not yield a match try now the tail
-            r = other(cur, ctx, modifiers, end_func);
-
-            if (r.matched && !(std::move(is_m_valid))) {
-                // We have a match rematch M if required
-                reset_func(ctx);
-
-                if (cpp2::cmp_greater(count,0)) {
-                    static_cast(M()(last_valid, ctx, modifiers, end_func));
-                }
-            }
-        }
-
-        return r; 
-    }
-
-#line 1356 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return{
-        auto count {0}; 
-        auto r {match_min_count(cur, ctx, modifiers, end_func, count)}; 
-
-        if (!(r.matched)) {
-          return r; 
-        }
-
-        auto pos {r.pos}; 
-        while( r.matched && is_below_upper_bound(count) ) {
-            r = M()(pos, ctx, modifiers, true_end_func());
-
-            if (pos == r.pos) {
-                break; // Break infinite loop.
-            }
-            if (r.matched) {
-                count += 1;
-                pos = r.pos;
-            }
-        }
-
-        return other(std::move(pos), ctx, modifiers, end_func); 
-    }
-
-#line 1380 "regex.h2"
-    template  template [[nodiscard]] auto range_matcher_logic::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& other) -> match_return{
-        auto count {0}; 
-        auto start {match_min_count(cur, ctx, modifiers, end_func, count)}; 
-        if (!(start.matched)) {
-          return start; 
-        }
-
-        auto pos {std::move(start).pos}; 
-        while( is_below_upper_bound(count) ) {
-            auto o {other(pos, ctx, modifiers, end_func)}; 
-            if (o.matched) {
-                return o; 
-            }
-
-            auto r {M()(pos, ctx, modifiers, end_func)}; 
-            if (!(r.matched)) {
-                return CPP2_UFCS(fail)(ctx); 
-            }
-            count += 1;
-            pos = std::move(r).pos;
-        }
-
-        return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
-    }
-
-#line 1410 "regex.h2"
-    template  [[nodiscard]] auto special_range_matcher_logic::to_string() -> bstring{
-        auto r {M::to_string() + symbol}; 
-        if (kind == range_flags::not_greedy) {
-            r += "?";
-        }
-        else {if (kind == range_flags::possessive) {
-            r += "+";
-        }}
-
-        return r; 
-    }
-
-#line 1429 "regex.h2"
+#line 1401 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2908,9 +2861,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1458 "regex.h2"
+#line 1430 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1459 "regex.h2"
+#line 1431 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2919,7 +2872,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1480 "regex.h2"
+#line 1452 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2929,34 +2882,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1491 "regex.h2"
+#line 1463 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1505 "regex.h2"
+#line 1477 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1508 "regex.h2"
+#line 1480 "regex.h2"
         }
 
-#line 1510 "regex.h2"
+#line 1482 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1511 "regex.h2"
+#line 1483 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1512 "regex.h2"
+#line 1484 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1513 "regex.h2"
+#line 1485 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1515 "regex.h2"
+#line 1487 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1516 "regex.h2"
+#line 1488 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1517 "regex.h2"
+#line 1489 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1519 "regex.h2"
+#line 1491 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2965,13 +2918,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1528 "regex.h2"
+#line 1500 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1529 "regex.h2"
+#line 1501 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1530 "regex.h2"
+#line 1502 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1531 "regex.h2"
+#line 1503 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2979,13 +2932,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1538 "regex.h2"
+#line 1510 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1539 "regex.h2"
+#line 1511 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1540 "regex.h2"
+#line 1512 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1541 "regex.h2"
+#line 1513 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3005,10 +2958,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1560 "regex.h2"
+#line 1532 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1565 "regex.h2"
+#line 1537 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3018,31 +2971,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1586 "regex.h2"
+#line 1558 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1589 "regex.h2"
+#line 1561 "regex.h2"
         }
 
-#line 1591 "regex.h2"
+#line 1563 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1592 "regex.h2"
+#line 1564 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1593 "regex.h2"
+#line 1565 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1594 "regex.h2"
+#line 1566 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1596 "regex.h2"
+#line 1568 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1597 "regex.h2"
+#line 1569 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1598 "regex.h2"
+#line 1570 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1600 "regex.h2"
+#line 1572 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3051,13 +3004,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1609 "regex.h2"
+#line 1581 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1610 "regex.h2"
+#line 1582 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1611 "regex.h2"
+#line 1583 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1612 "regex.h2"
+#line 1584 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3065,13 +3018,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1619 "regex.h2"
+#line 1591 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1620 "regex.h2"
+#line 1592 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1621 "regex.h2"
+#line 1593 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1622 "regex.h2"
+#line 1594 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3091,10 +3044,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1641 "regex.h2"
+#line 1613 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1646 "regex.h2"
+#line 1618 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3104,24 +3057,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1682 "regex.h2"
+#line 1654 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1688 "regex.h2"
+#line 1660 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1694 "regex.h2"
+#line 1666 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1696 "regex.h2"
+#line 1668 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3129,10 +3082,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1703 "regex.h2"
+#line 1675 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1713 "regex.h2"
+#line 1685 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3141,29 +3094,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1721 "regex.h2"
+#line 1693 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1726 "regex.h2"
+#line 1698 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1752 "regex.h2"
+#line 1724 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1756 "regex.h2"
+#line 1728 "regex.h2"
     }
 
-#line 1760 "regex.h2"
+#line 1732 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3171,12 +3124,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1767 "regex.h2"
+#line 1739 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1774 "regex.h2"
+#line 1746 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3189,14 +3142,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1786 "regex.h2"
+#line 1758 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1795 "regex.h2"
+#line 1767 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3235,7 +3188,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1833 "regex.h2"
+#line 1805 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3248,14 +3201,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1845 "regex.h2"
+#line 1817 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1846 "regex.h2"
+#line 1818 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1847 "regex.h2"
+#line 1819 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1851 "regex.h2"
+#line 1823 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3263,7 +3216,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1858 "regex.h2"
+#line 1830 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3273,7 +3226,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1867 "regex.h2"
+#line 1839 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3282,7 +3235,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1875 "regex.h2"
+#line 1847 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3293,12 +3246,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1885 "regex.h2"
+#line 1857 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1886 "regex.h2"
+#line 1858 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1888 "regex.h2"
+#line 1860 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3320,14 +3273,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1909 "regex.h2"
+#line 1881 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1910 "regex.h2"
+#line 1882 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1911 "regex.h2"
+#line 1883 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1913 "regex.h2"
+#line 1885 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3340,7 +3293,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1925 "regex.h2"
+#line 1897 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3361,13 +3314,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 1947 "regex.h2"
+#line 1919 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1952 "regex.h2"
+#line 1924 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3380,10 +3333,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1964 "regex.h2"
+#line 1936 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1970 "regex.h2"
+#line 1942 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3391,10 +3344,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1977 "regex.h2"
+#line 1949 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1979 "regex.h2"
+#line 1951 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3411,7 +3364,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1995 "regex.h2"
+#line 1967 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3422,7 +3375,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2007 "regex.h2"
+#line 1979 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3434,7 +3387,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2018 "regex.h2"
+#line 1990 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3471,7 +3424,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2054 "regex.h2"
+#line 2026 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3537,7 +3490,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2122 "regex.h2"
+#line 2094 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3546,7 +3499,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2130 "regex.h2"
+#line 2102 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3560,7 +3513,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2143 "regex.h2"
+#line 2115 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3569,7 +3522,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2151 "regex.h2"
+#line 2123 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3677,7 +3630,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2258 "regex.h2"
+#line 2230 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3845,7 +3798,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2425 "regex.h2"
+#line 2397 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3978,7 +3931,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2557 "regex.h2"
+#line 2529 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3986,7 +3939,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2564 "regex.h2"
+#line 2536 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -4050,7 +4003,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2627 "regex.h2"
+#line 2599 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -4087,7 +4040,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2663 "regex.h2"
+#line 2635 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4110,7 +4063,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2685 "regex.h2"
+#line 2657 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
         parse_context parse_ctx {regex}; 
 
@@ -4136,7 +4089,7 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS(get_entry_func)(std::move(gen_ctx)); 
     }
 
-#line 2710 "regex.h2"
+#line 2682 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4159,7 +4112,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2732 "regex.h2"
+#line 2704 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
 
@@ -4179,14 +4132,14 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2752 "regex.h2"
+#line 2724 "regex.h2"
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
         return source; 
     }
 
-#line 2759 "regex.h2"
+#line 2731 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 32b661afc5..f403e6d762 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -834,12 +834,137 @@ range_token: @polymorphic_base type = {
         reset_name := ctx.generate_reset(inner_token*.get_groups());
 
         next_name := ctx.gen_func_name();
-        ctx.add_statefull(next_name, "cpp2::regex::range_matcher_logic::match((ctx.match_parameters())$, (reset_name)$(), other, (next_name)$())");
+        ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match((ctx.match_parameters())$, (inner_name)$(), (reset_name)$(), other, (next_name)$())");
     }
 
     get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
 }
 
+// Regex syntax: {min, max}  Example: a{2,4}
+range_token_matcher:  type = {
+
+    match:  (cur: Iter, inout ctx, modifiers, inner, reset_func, end_func, tail) -> _ = {
+        if range_flags::possessive == kind {
+            return match_possessive(cur, ctx, modifiers, inner, end_func, tail);
+        }
+        else if range_flags::greedy == kind {
+            return match_greedy(0, cur, ctx.end, ctx, modifiers, inner, reset_func, end_func, tail);
+        }
+        else { // range_flags::not_greedy == kind
+            return match_not_greedy(cur, ctx, modifiers, inner, end_func, tail);
+        }
+    }
+
+    private is_below_upper_bound: (count: int) -> bool = {
+        if -1 == max_count { return true; }
+        else { return count < max_count; }
+    }
+
+    private is_below_lower_bound: (count: int) -> bool = {
+        if -1 == min_count { return false; }
+        else { return count < min_count; }
+    }
+
+    private is_in_range: (count: int) -> bool = {
+        if -1 != min_count && count < min_count { return false; }
+        if -1 != max_count && count > max_count { return false; }
+        return true;
+    }
+
+    private match_min_count:  (cur: Iter, inout ctx, modifiers, inner, end_func, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
+        res := ctx.pass(cur);
+        count := 0;
+
+        while is_below_lower_bound(count) && res.matched {
+            res = inner(res.pos, ctx, modifiers, end_func);
+            if res.matched {
+                count += 1;
+            }
+        }
+
+        count_r = count;
+        return res;
+    }
+
+    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, inner, reset_func, end_func, other) -> match_return = {
+        inner_call := :(tail_cur, inout tail_ctx, _ /* ignore new modifiers */) -> _ == {
+            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (modifiers)$, (inner)$, (reset_func)$, (end_func)$, (other)$);
+        };
+        is_m_valid := true;
+        r := ctx.fail();
+        if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) {
+            is_m_valid = false;  // Group ranges in M are invalidated through the call.
+            r = inner(cur, ctx, modifiers, inner_call);
+        }
+
+        if !r.matched && is_in_range(count) {
+            // The recursion did not yield a match try now the tail
+            r = other(cur, ctx, modifiers, end_func);
+
+            if r.matched && !is_m_valid{
+                // We have a match rematch M if required
+                reset_func(ctx);
+
+                if count > 0 {
+                    _ = inner(last_valid, ctx, modifiers, end_func);
+                }
+            }
+        }
+
+        return r;
+    }
+
+    private match_possessive: (cur: Iter, inout ctx, modifiers, inner, end_func, other) -> match_return = {
+        count :=0;
+        r := match_min_count(cur, ctx, modifiers, inner, end_func, count);
+
+        if !r.matched {
+          return r;
+        }
+
+        pos := r.pos;
+        while r.matched && is_below_upper_bound(count) {
+            r = inner(pos, ctx, modifiers, true_end_func());
+
+            if pos == r.pos {
+                break; // Break infinite loop.
+            }
+            if r.matched {
+                count += 1;
+                pos = r.pos;
+            }
+        }
+
+        return other(pos, ctx, modifiers, end_func);
+    }
+
+    private match_not_greedy:  (cur: Iter, inout ctx, modifiers, inner, end_func, other) -> match_return = {
+        count := 0;
+        start := match_min_count(cur, ctx, modifiers, inner, end_func, count);
+        if !start.matched {
+          return start;
+        }
+
+        pos := start.pos;
+        while is_below_upper_bound(count) {
+            o:= other(pos, ctx, modifiers, end_func);
+            if o.matched {
+                return o;
+            }
+
+            r:= inner(pos, ctx, modifiers, end_func);
+            if !r.matched {
+                return ctx.fail();
+            }
+            count += 1;
+            pos = r.pos;
+        }
+
+        return other(pos, ctx, modifiers, end_func); // Upper bound reached.
+    }
+}
+
+
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1250,175 +1375,22 @@ named_string_end:  type   == special_syntax_wrapper type == special_syntax_wrapper>;
 
 
-
-// Regex syntax: {min, max}  Example: a{2,4}
-range_matcher_logic:  type = {
-
-    match:  (cur: Iter, inout ctx, modifiers, reset_func, end_func, tail) -> _ = {
-        if range_flags::possessive == kind {
-            return match_possessive(cur, ctx, modifiers, end_func, tail);
-        }
-        else if range_flags::greedy == kind {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, reset_func, end_func, tail);
-        }
-        else { // range_flags::not_greedy == kind
-            return match_not_greedy(cur, ctx, modifiers, end_func, tail);
-        }
-    }
-
-    reset_ranges: (inout ctx)     = M::reset_ranges(ctx);
-
-    to_string: () -> bstring = {
-      r: bstring = M::to_string();
-
-      if min_count == max_count {
-        r += "{(min_count)$}";
-      }
-      else if min_count == -1 {
-        r += "{,(max_count)$}";
-      }
-      else if max_count == -1 {
-        r += "{(min_count)$,}";
-      }
-      else {
-        r += "{(min_count)$,(max_count)$}";
-      }
-
-      if kind == range_flags::not_greedy {
-        r += "?";
-      }
-      else if kind == range_flags::possessive {
-        r += "+";
-      }
-
-      return r;
-    }
-
-    private is_below_upper_bound: (count: int) -> bool = {
-        if -1 == max_count { return true; }
-        else { return count < max_count; }
-    }
-
-    private is_below_lower_bound: (count: int) -> bool = {
-        if -1 == min_count { return false; }
-        else { return count < min_count; }
-    }
-
-    private is_in_range: (count: int) -> bool = {
-        if -1 != min_count && count < min_count { return false; }
-        if -1 != max_count && count > max_count { return false; }
-        return true;
-    }
-
-    private match_min_count:  (cur: Iter, inout ctx, modifiers, end_func, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
-        res := ctx.pass(cur);
-        count := 0;
-
-        while is_below_lower_bound(count) && res.matched {
-            res = M()(res.pos, ctx, modifiers, end_func);
-            if res.matched {
-                count += 1;
-            }
-        }
-
-        count_r = count;
-        return res;
-    }
-
-    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, reset_func, end_func, other) -> match_return = {
-        inner_call := :(tail_cur, inout tail_ctx, _ /* ignore new modifiers */) -> _ == {
-            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (modifiers)$, (reset_func)$, (end_func)$, (other)$);
-        };
-        is_m_valid := true;
-        r := ctx.fail();
-        if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) {
-            is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = M()(cur, ctx, modifiers, inner_call);
-        }
-
-        if !r.matched && is_in_range(count) {
-            // The recursion did not yield a match try now the tail
-            r = other(cur, ctx, modifiers, end_func);
-
-            if r.matched && !is_m_valid{
-                // We have a match rematch M if required
-                reset_func(ctx);
-
-                if count > 0 {
-                    _ = M()(last_valid, ctx, modifiers, end_func);
-                }
-            }
-        }
-
-        return r;
-    }
-
-    private match_possessive: (cur: Iter, inout ctx, modifiers, end_func, other) -> match_return = {
-        count :=0;
-        r := match_min_count(cur, ctx, modifiers, end_func, count);
-
-        if !r.matched {
-          return r;
-        }
-
-        pos := r.pos;
-        while r.matched && is_below_upper_bound(count) {
-            r = M()(pos, ctx, modifiers, true_end_func());
-
-            if pos == r.pos {
-                break; // Break infinite loop.
-            }
-            if r.matched {
-                count += 1;
-                pos = r.pos;
-            }
-        }
-
-        return other(pos, ctx, modifiers, end_func);
-    }
-
-    private match_not_greedy:  (cur: Iter, inout ctx, modifiers, end_func, other) -> match_return = {
-        count := 0;
-        start := match_min_count(cur, ctx, modifiers, end_func, count);
-        if !start.matched {
-          return start;
-        }
-
-        pos := start.pos;
-        while is_below_upper_bound(count) {
-            o:= other(pos, ctx, modifiers, end_func);
-            if o.matched {
-                return o;
-            }
-
-            r:= M()(pos, ctx, modifiers, end_func);
-            if !r.matched {
-                return ctx.fail();
-            }
-            count += 1;
-            pos = r.pos;
-        }
-
-        return other(pos, ctx, modifiers, end_func); // Upper bound reached.
-    }
-}
-
-// Regex syntax: *, +, or ?  Example: aa*
-//
-special_range_matcher_logic:  type = {
-    this: range_matcher_logic = ();
-    to_string: () -> bstring = {
-        r := M::to_string() + symbol;
-        if kind == range_flags::not_greedy {
-            r += "?";
-        }
-        else if kind == range_flags::possessive {
-            r += "+";
-        }
-
-        return r;
-    }
-}
+// // Regex syntax: *, +, or ?  Example: aa*
+// //
+// special_range_matcher_logic:  type = {
+//     this: range_matcher_logic = ();
+//     to_string: () -> bstring = {
+//         r := M::to_string() + symbol;
+//         if kind == range_flags::not_greedy {
+//             r += "?";
+//         }
+//         else if kind == range_flags::possessive {
+//             r += "+";
+//         }
+
+//         return r;
+//     }
+// }
 
 // Regex syntax: \b or \B  Example: \bword\b
 //

From ef7c931e7c67bdb653c67d5a38d0c1b83293a86b Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 14:02:38 +0200
Subject: [PATCH 102/161] Added special range matching.

---
 include/cpp2regex.h | 703 ++++++++++++++++++++++++--------------------
 source/regex.h2     | 107 ++++---
 2 files changed, 464 insertions(+), 346 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 0545944837..5855b4d5fe 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -111,96 +111,100 @@ class regex_token_base;
 class char_token;
     
 
-#line 724 "regex.h2"
+#line 725 "regex.h2"
 class range_token;
     
 
-#line 844 "regex.h2"
+#line 863 "regex.h2"
+class special_range_token;
+    
+
+#line 897 "regex.h2"
 template class range_token_matcher;
 
-#line 980 "regex.h2"
+#line 1033 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 1064 "regex.h2"
+#line 1117 "regex.h2"
 template class any_matcher_logic;
 
-#line 1083 "regex.h2"
+#line 1136 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1091 "regex.h2"
+#line 1144 "regex.h2"
 template class char_matcher_logic;
 
-#line 1119 "regex.h2"
+#line 1172 "regex.h2"
 template class class_matcher_logic;
 
-#line 1168 "regex.h2"
+#line 1221 "regex.h2"
 template class global_group_reset;
     
 
-#line 1180 "regex.h2"
+#line 1233 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1217 "regex.h2"
+#line 1270 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1241 "regex.h2"
+#line 1294 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1249 "regex.h2"
+#line 1302 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1282 "regex.h2"
+#line 1335 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1302 "regex.h2"
+#line 1355 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1319 "regex.h2"
+#line 1372 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1342 "regex.h2"
+#line 1395 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1354 "regex.h2"
+#line 1407 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1399 "regex.h2"
+#line 1452 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1450 "regex.h2"
+#line 1503 "regex.h2"
 template class group_name_list;
 
-#line 1462 "regex.h2"
+#line 1515 "regex.h2"
 class group_name_list_end;
     
 
-#line 1467 "regex.h2"
+#line 1520 "regex.h2"
 template class regular_expression;
 
-#line 1548 "regex.h2"
+#line 1601 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1637 "regex.h2"
+#line 1690 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1644 "regex.h2"
+#line 1697 "regex.h2"
 class regex_parser_group_state;
 
-#line 1679 "regex.h2"
+#line 1732 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1706 "regex.h2"
+#line 1759 "regex.h2"
 template class regex_parser;
 
-#line 2738 "regex.h2"
+#line 2792 "regex.h2"
 }
 }
 
@@ -743,68 +747,88 @@ class char_token: public regex_token_base {
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
 #line 724 "regex.h2"
+// Regex syntax: {min, max}  Example: a{2,4}
 class range_token: public regex_token {
 
-#line 727 "regex.h2"
-    private: int min_count {-1}; 
-    private: int max_count {-1}; 
-    private: int kind {range_flags::greedy}; 
-    private: token_ptr inner_token {nullptr}; 
+#line 728 "regex.h2"
+    protected: int min_count {-1}; 
+    protected: int max_count {-1}; 
+    protected: int kind {range_flags::greedy}; 
+    protected: token_ptr inner_token {nullptr}; 
 
     public: explicit range_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 808 "regex.h2"
-    public: [[nodiscard]] auto gen_string() const& -> std::string;
+#line 805 "regex.h2"
+    public: auto parse_modifier(parse_context& ctx) & -> void;
+
+#line 816 "regex.h2"
+    public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
+
+#line 828 "regex.h2"
+    public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 832 "regex.h2"
+#line 852 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 840 "regex.h2"
+#line 860 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 841 "regex.h2"
+#line 861 "regex.h2"
+};
+
+class special_range_token: public range_token {
+
+#line 866 "regex.h2"
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+    public: virtual ~special_range_token() noexcept;
+
+    public: special_range_token() = default;
+    public: special_range_token(special_range_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(special_range_token const&) -> void = delete;
+
+
+#line 895 "regex.h2"
 };
 
-// Regex syntax: {min, max}  Example: a{2,4}
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 858 "regex.h2"
+#line 911 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 863 "regex.h2"
+#line 916 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 868 "regex.h2"
+#line 921 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 874 "regex.h2"
+#line 927 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 889 "regex.h2"
+#line 942 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 917 "regex.h2"
+#line 970 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 941 "regex.h2"
+#line 994 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 965 "regex.h2"
+#line 1018 "regex.h2"
 };
 
-#line 968 "regex.h2"
+#line 1021 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -812,7 +836,7 @@ template class range_tok
 //-----------------------------------------------------------------------
 //
 
-#line 976 "regex.h2"
+#line 1029 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -821,20 +845,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 994 "regex.h2"
+#line 1047 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 1012 "regex.h2"
+#line 1065 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 1060 "regex.h2"
+#line 1113 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -843,14 +867,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1077 "regex.h2"
+#line 1130 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 1079 "regex.h2"
+#line 1132 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -863,7 +887,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1087 "regex.h2"
+#line 1140 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -872,27 +896,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1112 "regex.h2"
+#line 1165 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1114 "regex.h2"
+#line 1167 "regex.h2"
 };
 
-#line 1117 "regex.h2"
+#line 1170 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1140 "regex.h2"
+#line 1193 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1152 "regex.h2"
+#line 1205 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -901,7 +925,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1164 "regex.h2"
+#line 1217 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -909,14 +933,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1174 "regex.h2"
+#line 1227 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1176 "regex.h2"
+#line 1229 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -924,23 +948,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1188 "regex.h2"
+#line 1241 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1194 "regex.h2"
+#line 1247 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1215 "regex.h2"
+#line 1268 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1229 "regex.h2"
+#line 1282 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -949,7 +973,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1239 "regex.h2"
+#line 1292 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -960,7 +984,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1245 "regex.h2"
+#line 1298 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -968,14 +992,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1276 "regex.h2"
+#line 1329 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1278 "regex.h2"
+#line 1331 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -984,14 +1008,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1296 "regex.h2"
+#line 1349 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1298 "regex.h2"
+#line 1351 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -1000,14 +1024,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1313 "regex.h2"
+#line 1366 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1315 "regex.h2"
+#line 1368 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1016,14 +1040,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1336 "regex.h2"
+#line 1389 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1338 "regex.h2"
+#line 1391 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1032,14 +1056,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1347 "regex.h2"
+#line 1400 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1349 "regex.h2"
+#line 1402 "regex.h2"
 };
 
 // Named character classes
@@ -1051,7 +1075,7 @@ template                    void = delete;
 
 
-#line 1356 "regex.h2"
+#line 1409 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1061,7 +1085,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1366 "regex.h2"
+#line 1419 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1073,7 +1097,7 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 1378 "regex.h2"
+#line 1431 "regex.h2"
 // // Regex syntax: *, +, or ?  Example: aa*
 // //
 // special_range_matcher_logic:  type = {
@@ -1099,7 +1123,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1430 "regex.h2"
+#line 1483 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1107,10 +1131,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1438 "regex.h2"
+#line 1491 "regex.h2"
 };
 
-#line 1441 "regex.h2"
+#line 1494 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1128,7 +1152,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1460 "regex.h2"
+#line 1513 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1137,7 +1161,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1464 "regex.h2"
+#line 1517 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1153,7 +1177,7 @@ template matched_, context const& ctx_);
 
-#line 1482 "regex.h2"
+#line 1535 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1168,7 +1192,7 @@ template void = delete;
 
 
-#line 1498 "regex.h2"
+#line 1551 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1176,13 +1200,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1510 "regex.h2"
+#line 1563 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1532 "regex.h2"
+#line 1585 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1194,7 +1218,7 @@ template void = delete;
 
 
-#line 1545 "regex.h2"
+#line 1598 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1210,7 +1234,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1563 "regex.h2"
+#line 1616 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1225,7 +1249,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1579 "regex.h2"
+#line 1632 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1233,13 +1257,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1591 "regex.h2"
+#line 1644 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1613 "regex.h2"
+#line 1666 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1251,7 +1275,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1626 "regex.h2"
+#line 1679 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1282,15 +1306,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1660 "regex.h2"
+#line 1713 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1666 "regex.h2"
+#line 1719 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1675 "regex.h2"
+#line 1728 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1303,13 +1327,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1693 "regex.h2"
+#line 1746 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1698 "regex.h2"
+#line 1751 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1703 "regex.h2"
+#line 1756 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1333,153 +1357,153 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1730 "regex.h2"
+#line 1783 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1739 "regex.h2"
+#line 1792 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1743 "regex.h2"
+#line 1796 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1758 "regex.h2"
+#line 1811 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1764 "regex.h2"
+#line 1817 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1805 "regex.h2"
+#line 1858 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1817 "regex.h2"
+#line 1870 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1823 "regex.h2"
+#line 1876 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1830 "regex.h2"
+#line 1883 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1839 "regex.h2"
+#line 1892 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1847 "regex.h2"
+#line 1900 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1857 "regex.h2"
+#line 1910 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1881 "regex.h2"
+#line 1934 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1897 "regex.h2"
+#line 1950 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1917 "regex.h2"
+#line 1970 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1924 "regex.h2"
+#line 1977 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1936 "regex.h2"
+#line 1989 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1939 "regex.h2"
+#line 1992 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1949 "regex.h2"
+#line 2002 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 1967 "regex.h2"
+#line 2020 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 1977 "regex.h2"
+#line 2030 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 1990 "regex.h2"
+#line 2043 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2026 "regex.h2"
+#line 2079 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2091 "regex.h2"
+#line 2144 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2102 "regex.h2"
+#line 2155 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2115 "regex.h2"
+#line 2168 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2123 "regex.h2"
+#line 2176 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2230 "regex.h2"
+#line 2283 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2397 "regex.h2"
+#line 2450 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2529 "regex.h2"
+#line 2582 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2536 "regex.h2"
+#line 2589 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2599 "regex.h2"
+#line 2652 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2635 "regex.h2"
+#line 2688 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2657 "regex.h2"
+#line 2710 "regex.h2"
     public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
 
-#line 2682 "regex.h2"
+#line 2736 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2704 "regex.h2"
+#line 2758 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2729 "regex.h2"
+#line 2783 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2738 "regex.h2"
+#line 2792 "regex.h2"
 }
 }
 
@@ -2228,11 +2252,11 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 732 "regex.h2"
+#line 733 "regex.h2"
     range_token::range_token()
                              : regex_token{ true, "" }{}
 
-#line 734 "regex.h2"
+#line 735 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -2244,16 +2268,10 @@ template [[nodiscard]] auto char_toke
             inner = trim_copy(CPP2_UFCS(substr)(inner, 1));// Remove '{' and white spaces.
             if (CPP2_UFCS(empty)(inner)) {return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
-#line 746 "regex.h2"
-            if (CPP2_UFCS(peek)(ctx) == '?') {
-                (*cpp2::assert_not_null(r)).kind = range_flags::not_greedy;
-                static_cast(CPP2_UFCS(next)(ctx));
-            }
-            else {if (CPP2_UFCS(peek)(ctx) == '+') {
-                (*cpp2::assert_not_null(r)).kind = range_flags::possessive;
-                static_cast(CPP2_UFCS(next)(ctx));
-            }}
+            // Non-greedy or possessive
+            CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
+            // Get range arguments
             std::string min_count_str {"-1"}; 
             std::string max_count_str {"-1"}; 
 
@@ -2282,6 +2300,8 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
+#line 779 "regex.h2"
+            // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
                     return CPP2_UFCS(error)(ctx, ("Min value in range is negative. Have " + cpp2::to_string((*cpp2::assert_not_null(r)).min_count) + ")")); 
@@ -2299,7 +2319,7 @@ template [[nodiscard]] auto char_toke
             }
 
             (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
-            (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + CPP2_UFCS(gen_string)((*cpp2::assert_not_null(r)));
+            (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + CPP2_UFCS(gen_range_string)((*cpp2::assert_not_null(r))) + CPP2_UFCS(gen_mod_string)((*cpp2::assert_not_null(r)));
 
             return r; 
         }
@@ -2307,8 +2327,33 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 808 "regex.h2"
-    [[nodiscard]] auto range_token::gen_string() const& -> std::string{
+#line 805 "regex.h2"
+    auto range_token::parse_modifier(parse_context& ctx) & -> void{
+        if (CPP2_UFCS(peek)(ctx) == '?') {
+            kind = range_flags::not_greedy;
+            static_cast(CPP2_UFCS(next)(ctx));
+        }
+        else {if (CPP2_UFCS(peek)(ctx) == '+') {
+            kind = range_flags::possessive;
+            static_cast(CPP2_UFCS(next)(ctx));
+        }}
+    }
+
+#line 816 "regex.h2"
+    [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
+        if (kind == range_flags::not_greedy) {
+            return "?"; 
+        }
+        else {if (kind == range_flags::possessive) {
+            return "+"; 
+        }
+        else {
+            return ""; 
+        }}
+    }
+
+#line 828 "regex.h2"
+    [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
             r += ("{" + cpp2::to_string(min_count) + "}");
@@ -2332,7 +2377,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 832 "regex.h2"
+#line 852 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -2341,12 +2386,45 @@ template [[nodiscard]] auto char_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + "(), " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
     }
 
-#line 840 "regex.h2"
+#line 860 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 846 "regex.h2"
+#line 866 "regex.h2"
+    [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
+        char symbol {'\0'}; 
+        if (CPP2_UFCS(current)(ctx) == '*') {
+            (*cpp2::assert_not_null(r)).min_count = 0;
+            (*cpp2::assert_not_null(r)).max_count = -1;
+            symbol = '*';
+        }
+        else {if (CPP2_UFCS(current)(ctx) == '+') {
+            (*cpp2::assert_not_null(r)).min_count = 1;
+            (*cpp2::assert_not_null(r)).max_count = -1;
+            symbol = '+';
+        }else {if (CPP2_UFCS(current)(ctx) == '?') {
+            (*cpp2::assert_not_null(r)).min_count = 0;
+            (*cpp2::assert_not_null(r)).max_count = 1;
+            symbol = '?';
+        }else {
+            return nullptr; 
+        }}}
+
+        if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
+
+#line 889 "regex.h2"
+        CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
+
+        (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
+        (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + std::move(symbol) + CPP2_UFCS(gen_mod_string)((*cpp2::assert_not_null(r)));
+        return r; 
+    }
+
+    special_range_token::~special_range_token() noexcept{}
+
+#line 899 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -2359,26 +2437,26 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 858 "regex.h2"
+#line 911 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 863 "regex.h2"
+#line 916 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 868 "regex.h2"
+#line 921 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 874 "regex.h2"
+#line 927 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2394,7 +2472,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 889 "regex.h2"
+#line 942 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -2423,7 +2501,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 917 "regex.h2"
+#line 970 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2448,7 +2526,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 941 "regex.h2"
+#line 994 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2474,7 +2552,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 982 "regex.h2"
+#line 1035 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2487,12 +2565,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 994 "regex.h2"
+#line 1047 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 995 "regex.h2"
+#line 1048 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 997 "regex.h2"
+#line 1050 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2508,7 +2586,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1012 "regex.h2"
+#line 1065 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2524,7 +2602,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 1028 "regex.h2"
+#line 1081 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2536,7 +2614,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 1040 "regex.h2"
+#line 1093 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2558,7 +2636,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1066 "regex.h2"
+#line 1119 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2570,19 +2648,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1077 "regex.h2"
+#line 1130 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1078 "regex.h2"
+#line 1131 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 1084 "regex.h2"
+#line 1137 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1085 "regex.h2"
+#line 1138 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1086 "regex.h2"
+#line 1139 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1093 "regex.h2"
+#line 1146 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2602,12 +2680,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1112 "regex.h2"
+#line 1165 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1113 "regex.h2"
+#line 1166 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1121 "regex.h2"
+#line 1174 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -2627,7 +2705,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1140 "regex.h2"
+#line 1193 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2640,10 +2718,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1152 "regex.h2"
+#line 1205 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1154 "regex.h2"
+#line 1207 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2655,18 +2733,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1169 "regex.h2"
+#line 1222 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1174 "regex.h2"
+#line 1227 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1175 "regex.h2"
+#line 1228 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1181 "regex.h2"
+#line 1234 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2674,14 +2752,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1188 "regex.h2"
+#line 1241 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1194 "regex.h2"
+#line 1247 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2704,7 +2782,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1218 "regex.h2"
+#line 1271 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2716,10 +2794,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1229 "regex.h2"
+#line 1282 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1231 "regex.h2"
+#line 1284 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2729,14 +2807,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1242 "regex.h2"
+#line 1295 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1243 "regex.h2"
+#line 1296 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1244 "regex.h2"
+#line 1297 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1250 "regex.h2"
+#line 1303 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2763,12 +2841,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1276 "regex.h2"
+#line 1329 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1277 "regex.h2"
+#line 1330 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1284 "regex.h2"
+#line 1337 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2781,12 +2859,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1296 "regex.h2"
+#line 1349 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1297 "regex.h2"
+#line 1350 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1304 "regex.h2"
+#line 1357 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2796,12 +2874,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1313 "regex.h2"
+#line 1366 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1314 "regex.h2"
+#line 1367 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1321 "regex.h2"
+#line 1374 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2817,21 +2895,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1336 "regex.h2"
+#line 1389 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1337 "regex.h2"
+#line 1390 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1344 "regex.h2"
+#line 1397 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1347 "regex.h2"
+#line 1400 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1348 "regex.h2"
+#line 1401 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1401 "regex.h2"
+#line 1454 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2861,9 +2939,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1430 "regex.h2"
+#line 1483 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1431 "regex.h2"
+#line 1484 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2872,7 +2950,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1452 "regex.h2"
+#line 1505 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2882,34 +2960,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1463 "regex.h2"
+#line 1516 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1477 "regex.h2"
+#line 1530 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1480 "regex.h2"
+#line 1533 "regex.h2"
         }
 
-#line 1482 "regex.h2"
+#line 1535 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1483 "regex.h2"
+#line 1536 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1484 "regex.h2"
+#line 1537 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1485 "regex.h2"
+#line 1538 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1487 "regex.h2"
+#line 1540 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1488 "regex.h2"
+#line 1541 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1489 "regex.h2"
+#line 1542 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1491 "regex.h2"
+#line 1544 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2918,13 +2996,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1500 "regex.h2"
+#line 1553 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1501 "regex.h2"
+#line 1554 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1502 "regex.h2"
+#line 1555 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1503 "regex.h2"
+#line 1556 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2932,13 +3010,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1510 "regex.h2"
+#line 1563 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1511 "regex.h2"
+#line 1564 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1512 "regex.h2"
+#line 1565 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1513 "regex.h2"
+#line 1566 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -2958,10 +3036,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1532 "regex.h2"
+#line 1585 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1537 "regex.h2"
+#line 1590 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -2971,31 +3049,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1558 "regex.h2"
+#line 1611 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1561 "regex.h2"
+#line 1614 "regex.h2"
         }
 
-#line 1563 "regex.h2"
+#line 1616 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1564 "regex.h2"
+#line 1617 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1565 "regex.h2"
+#line 1618 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1566 "regex.h2"
+#line 1619 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1568 "regex.h2"
+#line 1621 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1569 "regex.h2"
+#line 1622 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1570 "regex.h2"
+#line 1623 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1572 "regex.h2"
+#line 1625 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3004,13 +3082,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1581 "regex.h2"
+#line 1634 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1582 "regex.h2"
+#line 1635 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1583 "regex.h2"
+#line 1636 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1584 "regex.h2"
+#line 1637 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3018,13 +3096,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1591 "regex.h2"
+#line 1644 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1592 "regex.h2"
+#line 1645 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1593 "regex.h2"
+#line 1646 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1594 "regex.h2"
+#line 1647 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3044,10 +3122,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1613 "regex.h2"
+#line 1666 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1618 "regex.h2"
+#line 1671 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3057,24 +3135,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1654 "regex.h2"
+#line 1707 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1660 "regex.h2"
+#line 1713 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1666 "regex.h2"
+#line 1719 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1668 "regex.h2"
+#line 1721 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3082,10 +3160,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1675 "regex.h2"
+#line 1728 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1685 "regex.h2"
+#line 1738 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3094,29 +3172,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1693 "regex.h2"
+#line 1746 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1698 "regex.h2"
+#line 1751 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1724 "regex.h2"
+#line 1777 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1728 "regex.h2"
+#line 1781 "regex.h2"
     }
 
-#line 1732 "regex.h2"
+#line 1785 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3124,12 +3202,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1739 "regex.h2"
+#line 1792 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1746 "regex.h2"
+#line 1799 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3142,14 +3220,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1758 "regex.h2"
+#line 1811 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1767 "regex.h2"
+#line 1820 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3188,7 +3266,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1805 "regex.h2"
+#line 1858 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3201,14 +3279,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1817 "regex.h2"
+#line 1870 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1818 "regex.h2"
+#line 1871 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1819 "regex.h2"
+#line 1872 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1823 "regex.h2"
+#line 1876 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3216,7 +3294,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1830 "regex.h2"
+#line 1883 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3226,7 +3304,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1839 "regex.h2"
+#line 1892 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3235,7 +3313,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1847 "regex.h2"
+#line 1900 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3246,12 +3324,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1857 "regex.h2"
+#line 1910 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1858 "regex.h2"
+#line 1911 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1860 "regex.h2"
+#line 1913 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3273,14 +3351,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1881 "regex.h2"
+#line 1934 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1882 "regex.h2"
+#line 1935 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1883 "regex.h2"
+#line 1936 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1885 "regex.h2"
+#line 1938 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3293,7 +3371,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1897 "regex.h2"
+#line 1950 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3314,13 +3392,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 1919 "regex.h2"
+#line 1972 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1924 "regex.h2"
+#line 1977 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3333,10 +3411,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1936 "regex.h2"
+#line 1989 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1942 "regex.h2"
+#line 1995 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3344,10 +3422,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1949 "regex.h2"
+#line 2002 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1951 "regex.h2"
+#line 2004 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3364,7 +3442,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 1967 "regex.h2"
+#line 2020 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3375,7 +3453,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1979 "regex.h2"
+#line 2032 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3387,7 +3465,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 1990 "regex.h2"
+#line 2043 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3424,7 +3502,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2026 "regex.h2"
+#line 2079 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3490,7 +3568,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2094 "regex.h2"
+#line 2147 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3499,7 +3577,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2102 "regex.h2"
+#line 2155 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3513,7 +3591,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2115 "regex.h2"
+#line 2168 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3522,7 +3600,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2123 "regex.h2"
+#line 2176 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3630,7 +3708,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2230 "regex.h2"
+#line 2283 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3798,7 +3876,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2397 "regex.h2"
+#line 2450 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3931,7 +4009,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2529 "regex.h2"
+#line 2582 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -3939,7 +4017,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2536 "regex.h2"
+#line 2589 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -4003,7 +4081,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2599 "regex.h2"
+#line 2652 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -4040,7 +4118,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2635 "regex.h2"
+#line 2688 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4063,7 +4141,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2657 "regex.h2"
+#line 2710 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
         parse_context parse_ctx {regex}; 
 
@@ -4074,6 +4152,7 @@ template [[nodiscard]] auto char_toke
 
             cur_token = nullptr;
             if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = range_token::parse(parse_ctx); }
+            if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = special_range_token::parse(parse_ctx); }
             if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = char_token::parse(parse_ctx); }
 
             if (cur_token && CPP2_UFCS(valid)(parse_ctx)) {
@@ -4089,7 +4168,7 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS(get_entry_func)(std::move(gen_ctx)); 
     }
 
-#line 2682 "regex.h2"
+#line 2736 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4112,7 +4191,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2704 "regex.h2"
+#line 2758 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
 
@@ -4132,14 +4211,14 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2724 "regex.h2"
+#line 2778 "regex.h2"
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
         return source; 
     }
 
-#line 2731 "regex.h2"
+#line 2785 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index f403e6d762..1249c37375 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -721,13 +721,15 @@ char_token_matcher:  (inout cur, inout ctx,
     }
 }
 
+// Regex syntax: {min, max}  Example: a{2,4}
+//
 range_token: @polymorphic_base type = {
     this: regex_token = (true, "");
 
-    min_count: int = -1;
-    max_count: int = -1;
-    kind:      int = range_flags::greedy;
-    inner_token: token_ptr = nullptr;
+    protected min_count: int = -1;
+    protected max_count: int = -1;
+    protected kind:      int = range_flags::greedy;
+    protected inner_token: token_ptr = nullptr;
 
     operator=: (out this) = {}
 
@@ -742,16 +744,10 @@ range_token: @polymorphic_base type = {
             inner = trim_copy(inner.substr(1)); // Remove '{' and white spaces.
             if inner.empty() { return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
+            // Non-greedy or possessive
+            r*.parse_modifier(ctx);
 
-            if ctx.peek() == '?' {
-                r*.kind = range_flags::not_greedy;
-                _ = ctx.next();
-            }
-            else if ctx.peek() == '+' {
-                r*.kind = range_flags::possessive;
-                _ = ctx.next();
-            }
-
+            // Get range arguments
             min_count_str: std::string = "-1";
             max_count_str: std::string = "-1";
 
@@ -780,6 +776,8 @@ range_token: @polymorphic_base type = {
                 }
             }
 
+
+            // Check validity of the range.
             if -1 != r*.min_count {
                 if !(0 <= r*.min_count) {
                     return ctx.error("Min value in range is negative. Have (r*.min_count)$)");
@@ -797,7 +795,7 @@ range_token: @polymorphic_base type = {
             }
 
             r*.inner_token = ctx.pop_token();
-            r*.string_rep = r*.inner_token*.to_string() + r*.gen_string();
+            r*.string_rep = r*.inner_token*.to_string() + r*.gen_range_string() + r*.gen_mod_string();
 
             return r;
         }
@@ -805,7 +803,30 @@ range_token: @polymorphic_base type = {
         return nullptr;
     }
 
-    gen_string: (this) -> std::string = {
+    parse_modifier: (inout this, inout ctx: parse_context) = {
+        if ctx.peek() == '?' {
+            kind = range_flags::not_greedy;
+            _ = ctx.next();
+        }
+        else if ctx.peek() == '+' {
+            kind = range_flags::possessive;
+            _ = ctx.next();
+        }
+    }
+
+    gen_mod_string: (this) -> std::string = {
+        if kind == range_flags::not_greedy {
+            return "?";
+        }
+        else if kind == range_flags::possessive {
+            return "+";
+        }
+        else {
+            return "";
+        }
+    }
+
+    gen_range_string: (this) -> std::string = {
         r : std::string = "";
         if min_count == max_count {
             r += "{(min_count)$}";
@@ -840,7 +861,6 @@ range_token: @polymorphic_base type = {
     get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
 }
 
-// Regex syntax: {min, max}  Example: a{2,4}
 range_token_matcher:  type = {
 
     match:  (cur: Iter, inout ctx, modifiers, inner, reset_func, end_func, tail) -> _ = {
@@ -964,6 +984,42 @@ range_token_matcher:  type = {
     }
 }
 
+// Regex syntax: *, +, or ?  Example: aa*
+//
+special_range_token: @polymorphic_base type = {
+    this : range_token = ();
+
+    parse: (inout ctx: parse_context) -> token_ptr = {
+        r := shared.new();
+        symbol: char = '\0';
+        if ctx.current() == '*' {
+            r*.min_count = 0;
+            r*.max_count = -1;
+            symbol = '*';
+        }
+        else if ctx.current() == '+' {
+            r*.min_count = 1;
+            r*.max_count = -1;
+            symbol = '+';
+        } else if ctx.current() == '?' {
+            r*.min_count = 0;
+            r*.max_count = 1;
+            symbol = '?';
+        } else {
+            return nullptr;
+        }
+
+        if !ctx.has_token() { return ctx.error("'(ctx.current())$' without previous element."); }
+
+
+        r*.parse_modifier(ctx);
+
+        r*.inner_token = ctx.pop_token();
+        r*.string_rep = r*.inner_token*.to_string() + symbol + r*.gen_mod_string();
+        return r;
+    }
+}
+
 
 //-----------------------------------------------------------------------
 //
@@ -1374,24 +1430,6 @@ named_string_end_or_before_new_line_at_end:  type  == special_syntax_wrap
 named_string_end:  type   == special_syntax_wrapper>;
 named_string_start:  type == special_syntax_wrapper>;
 
-
-// // Regex syntax: *, +, or ?  Example: aa*
-// //
-// special_range_matcher_logic:  type = {
-//     this: range_matcher_logic = ();
-//     to_string: () -> bstring = {
-//         r := M::to_string() + symbol;
-//         if kind == range_flags::not_greedy {
-//             r += "?";
-//         }
-//         else if kind == range_flags::possessive {
-//             r += "+";
-//         }
-
-//         return r;
-//     }
-// }
-
 // Regex syntax: \b or \B  Example: \bword\b
 //
 // Matches the start end end of word boundaries.
@@ -2664,6 +2702,7 @@ regex_parser:  type = {
 
             cur_token = nullptr;
             if !cur_token && parse_ctx.valid() { cur_token = range_token::parse(parse_ctx); }
+            if !cur_token && parse_ctx.valid() { cur_token = special_range_token::parse(parse_ctx); }
             if !cur_token && parse_ctx.valid() { cur_token = char_token::parse(parse_ctx); }
 
             if cur_token && parse_ctx.valid() {

From b2fc15f07db70f246e8932c6be243b687eb302ea Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 14:13:55 +0200
Subject: [PATCH 103/161] Removed old range parsers.

---
 include/cpp2regex.h | 715 ++++++++++++++++++++++----------------------
 source/regex.h2     | 101 -------
 2 files changed, 350 insertions(+), 466 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 5855b4d5fe..21d3eca711 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -111,100 +111,100 @@ class regex_token_base;
 class char_token;
     
 
-#line 725 "regex.h2"
+#line 726 "regex.h2"
 class range_token;
     
 
-#line 863 "regex.h2"
+#line 864 "regex.h2"
+template class range_token_matcher;
+
+#line 989 "regex.h2"
 class special_range_token;
     
 
-#line 897 "regex.h2"
-template class range_token_matcher;
-
-#line 1033 "regex.h2"
+#line 1036 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 1117 "regex.h2"
+#line 1120 "regex.h2"
 template class any_matcher_logic;
 
-#line 1136 "regex.h2"
+#line 1139 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1144 "regex.h2"
+#line 1147 "regex.h2"
 template class char_matcher_logic;
 
-#line 1172 "regex.h2"
+#line 1175 "regex.h2"
 template class class_matcher_logic;
 
-#line 1221 "regex.h2"
+#line 1224 "regex.h2"
 template class global_group_reset;
     
 
-#line 1233 "regex.h2"
+#line 1236 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1270 "regex.h2"
+#line 1273 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1294 "regex.h2"
+#line 1297 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1302 "regex.h2"
+#line 1305 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1335 "regex.h2"
+#line 1338 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1355 "regex.h2"
+#line 1358 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1372 "regex.h2"
+#line 1375 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1395 "regex.h2"
+#line 1398 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1407 "regex.h2"
+#line 1410 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1452 "regex.h2"
+#line 1437 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1503 "regex.h2"
+#line 1488 "regex.h2"
 template class group_name_list;
 
-#line 1515 "regex.h2"
+#line 1500 "regex.h2"
 class group_name_list_end;
     
 
-#line 1520 "regex.h2"
+#line 1505 "regex.h2"
 template class regular_expression;
 
-#line 1601 "regex.h2"
+#line 1586 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1690 "regex.h2"
+#line 1675 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1697 "regex.h2"
+#line 1682 "regex.h2"
 class regex_parser_group_state;
 
-#line 1732 "regex.h2"
+#line 1717 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1759 "regex.h2"
+#line 1744 "regex.h2"
 template class regex_parser;
 
-#line 2792 "regex.h2"
+#line 2777 "regex.h2"
 }
 }
 
@@ -748,9 +748,10 @@ template [[nodiscard]] auto char_toke
 
 #line 724 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
+//
 class range_token: public regex_token {
 
-#line 728 "regex.h2"
+#line 729 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -760,75 +761,77 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 805 "regex.h2"
+#line 806 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 816 "regex.h2"
+#line 817 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 828 "regex.h2"
+#line 829 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 852 "regex.h2"
+#line 853 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 860 "regex.h2"
+#line 861 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 861 "regex.h2"
-};
-
-class special_range_token: public range_token {
-
-#line 866 "regex.h2"
-    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
-    public: virtual ~special_range_token() noexcept;
-
-    public: special_range_token() = default;
-    public: special_range_token(special_range_token const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(special_range_token const&) -> void = delete;
-
-
-#line 895 "regex.h2"
+#line 862 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 911 "regex.h2"
+#line 878 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 916 "regex.h2"
+#line 883 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 921 "regex.h2"
+#line 888 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 927 "regex.h2"
+#line 894 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 942 "regex.h2"
+#line 909 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 970 "regex.h2"
+#line 937 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 994 "regex.h2"
+#line 961 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1018 "regex.h2"
+#line 985 "regex.h2"
 };
 
+// Regex syntax: *, +, or ?  Example: aa*
+//
+class special_range_token: public range_token {
+
+#line 992 "regex.h2"
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+    public: virtual ~special_range_token() noexcept;
+
+    public: special_range_token() = default;
+    public: special_range_token(special_range_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(special_range_token const&) -> void = delete;
+
+
 #line 1021 "regex.h2"
+};
+
+#line 1024 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -836,7 +839,7 @@ template class range_tok
 //-----------------------------------------------------------------------
 //
 
-#line 1029 "regex.h2"
+#line 1032 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -845,20 +848,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 1047 "regex.h2"
+#line 1050 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 1065 "regex.h2"
+#line 1068 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 1113 "regex.h2"
+#line 1116 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -867,14 +870,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1130 "regex.h2"
+#line 1133 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 1132 "regex.h2"
+#line 1135 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -887,7 +890,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1140 "regex.h2"
+#line 1143 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -896,27 +899,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1165 "regex.h2"
+#line 1168 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1167 "regex.h2"
+#line 1170 "regex.h2"
 };
 
-#line 1170 "regex.h2"
+#line 1173 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1193 "regex.h2"
+#line 1196 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1205 "regex.h2"
+#line 1208 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -925,7 +928,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1217 "regex.h2"
+#line 1220 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -933,14 +936,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1227 "regex.h2"
+#line 1230 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1229 "regex.h2"
+#line 1232 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -948,23 +951,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1241 "regex.h2"
+#line 1244 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1247 "regex.h2"
+#line 1250 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1268 "regex.h2"
+#line 1271 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1282 "regex.h2"
+#line 1285 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -973,7 +976,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1292 "regex.h2"
+#line 1295 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -984,7 +987,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1298 "regex.h2"
+#line 1301 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -992,14 +995,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1329 "regex.h2"
+#line 1332 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1331 "regex.h2"
+#line 1334 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -1008,14 +1011,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1349 "regex.h2"
+#line 1352 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1351 "regex.h2"
+#line 1354 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -1024,14 +1027,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1366 "regex.h2"
+#line 1369 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1368 "regex.h2"
+#line 1371 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1040,14 +1043,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1389 "regex.h2"
+#line 1392 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1391 "regex.h2"
+#line 1394 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1056,14 +1059,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1400 "regex.h2"
+#line 1403 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1402 "regex.h2"
+#line 1405 "regex.h2"
 };
 
 // Named character classes
@@ -1075,7 +1078,7 @@ template                    void = delete;
 
 
-#line 1409 "regex.h2"
+#line 1412 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1085,7 +1088,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1419 "regex.h2"
+#line 1422 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1097,24 +1100,6 @@ template                                     using named_string_
 template           using named_string_end = special_syntax_wrapper>;
 template using named_string_start = special_syntax_wrapper>;
 
-#line 1431 "regex.h2"
-// // Regex syntax: *, +, or ?  Example: aa*
-// //
-// special_range_matcher_logic:  type = {
-//     this: range_matcher_logic = ();
-//     to_string: () -> bstring = {
-//         r := M::to_string() + symbol;
-//         if kind == range_flags::not_greedy {
-//             r += "?";
-//         }
-//         else if kind == range_flags::possessive {
-//             r += "+";
-//         }
-
-//         return r;
-//     }
-// }
-
 // Regex syntax: \b or \B  Example: \bword\b
 //
 // Matches the start end end of word boundaries.
@@ -1123,7 +1108,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1483 "regex.h2"
+#line 1468 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1131,10 +1116,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1491 "regex.h2"
+#line 1476 "regex.h2"
 };
 
-#line 1494 "regex.h2"
+#line 1479 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1152,7 +1137,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1513 "regex.h2"
+#line 1498 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1161,7 +1146,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1517 "regex.h2"
+#line 1502 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1177,7 +1162,7 @@ template matched_, context const& ctx_);
 
-#line 1535 "regex.h2"
+#line 1520 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1192,7 +1177,7 @@ template void = delete;
 
 
-#line 1551 "regex.h2"
+#line 1536 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1200,13 +1185,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1563 "regex.h2"
+#line 1548 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1585 "regex.h2"
+#line 1570 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1218,7 +1203,7 @@ template void = delete;
 
 
-#line 1598 "regex.h2"
+#line 1583 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1234,7 +1219,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1616 "regex.h2"
+#line 1601 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1249,7 +1234,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1632 "regex.h2"
+#line 1617 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1257,13 +1242,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1644 "regex.h2"
+#line 1629 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1666 "regex.h2"
+#line 1651 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1275,7 +1260,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1679 "regex.h2"
+#line 1664 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1306,15 +1291,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1713 "regex.h2"
+#line 1698 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1719 "regex.h2"
+#line 1704 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1728 "regex.h2"
+#line 1713 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1327,13 +1312,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1746 "regex.h2"
+#line 1731 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1751 "regex.h2"
+#line 1736 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1756 "regex.h2"
+#line 1741 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1357,153 +1342,153 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1783 "regex.h2"
+#line 1768 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1792 "regex.h2"
+#line 1777 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1796 "regex.h2"
+#line 1781 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1811 "regex.h2"
+#line 1796 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1817 "regex.h2"
+#line 1802 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1858 "regex.h2"
+#line 1843 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1870 "regex.h2"
+#line 1855 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1876 "regex.h2"
+#line 1861 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1883 "regex.h2"
+#line 1868 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1892 "regex.h2"
+#line 1877 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1900 "regex.h2"
+#line 1885 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1910 "regex.h2"
+#line 1895 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1934 "regex.h2"
+#line 1919 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1950 "regex.h2"
+#line 1935 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1970 "regex.h2"
+#line 1955 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1977 "regex.h2"
+#line 1962 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1989 "regex.h2"
+#line 1974 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1992 "regex.h2"
+#line 1977 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2002 "regex.h2"
+#line 1987 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2020 "regex.h2"
+#line 2005 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2030 "regex.h2"
+#line 2015 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2043 "regex.h2"
+#line 2028 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2079 "regex.h2"
+#line 2064 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2144 "regex.h2"
+#line 2129 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2155 "regex.h2"
+#line 2140 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2168 "regex.h2"
+#line 2153 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2176 "regex.h2"
+#line 2161 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2283 "regex.h2"
+#line 2268 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2450 "regex.h2"
+#line 2435 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2582 "regex.h2"
+#line 2567 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2589 "regex.h2"
+#line 2574 "regex.h2"
     public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
 
-#line 2652 "regex.h2"
+#line 2637 "regex.h2"
     public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
 
-#line 2688 "regex.h2"
+#line 2673 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2710 "regex.h2"
+#line 2695 "regex.h2"
     public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
 
-#line 2736 "regex.h2"
+#line 2721 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2758 "regex.h2"
+#line 2743 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2783 "regex.h2"
+#line 2768 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2792 "regex.h2"
+#line 2777 "regex.h2"
 }
 }
 
@@ -2252,11 +2237,11 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 733 "regex.h2"
+#line 734 "regex.h2"
     range_token::range_token()
                              : regex_token{ true, "" }{}
 
-#line 735 "regex.h2"
+#line 736 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -2300,7 +2285,7 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
-#line 779 "regex.h2"
+#line 780 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -2327,7 +2312,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 805 "regex.h2"
+#line 806 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -2339,7 +2324,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 816 "regex.h2"
+#line 817 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -2352,7 +2337,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 828 "regex.h2"
+#line 829 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2377,7 +2362,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 852 "regex.h2"
+#line 853 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -2386,45 +2371,12 @@ template [[nodiscard]] auto char_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + "(), " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
     }
 
-#line 860 "regex.h2"
+#line 861 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
 #line 866 "regex.h2"
-    [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
-        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
-        char symbol {'\0'}; 
-        if (CPP2_UFCS(current)(ctx) == '*') {
-            (*cpp2::assert_not_null(r)).min_count = 0;
-            (*cpp2::assert_not_null(r)).max_count = -1;
-            symbol = '*';
-        }
-        else {if (CPP2_UFCS(current)(ctx) == '+') {
-            (*cpp2::assert_not_null(r)).min_count = 1;
-            (*cpp2::assert_not_null(r)).max_count = -1;
-            symbol = '+';
-        }else {if (CPP2_UFCS(current)(ctx) == '?') {
-            (*cpp2::assert_not_null(r)).min_count = 0;
-            (*cpp2::assert_not_null(r)).max_count = 1;
-            symbol = '?';
-        }else {
-            return nullptr; 
-        }}}
-
-        if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
-
-#line 889 "regex.h2"
-        CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
-
-        (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
-        (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + std::move(symbol) + CPP2_UFCS(gen_mod_string)((*cpp2::assert_not_null(r)));
-        return r; 
-    }
-
-    special_range_token::~special_range_token() noexcept{}
-
-#line 899 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -2437,26 +2389,26 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 911 "regex.h2"
+#line 878 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 916 "regex.h2"
+#line 883 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 921 "regex.h2"
+#line 888 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 927 "regex.h2"
+#line 894 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2472,7 +2424,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 942 "regex.h2"
+#line 909 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -2501,7 +2453,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 970 "regex.h2"
+#line 937 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2526,7 +2478,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 994 "regex.h2"
+#line 961 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2552,7 +2504,40 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1035 "regex.h2"
+#line 992 "regex.h2"
+    [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
+        char symbol {'\0'}; 
+        if (CPP2_UFCS(current)(ctx) == '*') {
+            (*cpp2::assert_not_null(r)).min_count = 0;
+            (*cpp2::assert_not_null(r)).max_count = -1;
+            symbol = '*';
+        }
+        else {if (CPP2_UFCS(current)(ctx) == '+') {
+            (*cpp2::assert_not_null(r)).min_count = 1;
+            (*cpp2::assert_not_null(r)).max_count = -1;
+            symbol = '+';
+        }else {if (CPP2_UFCS(current)(ctx) == '?') {
+            (*cpp2::assert_not_null(r)).min_count = 0;
+            (*cpp2::assert_not_null(r)).max_count = 1;
+            symbol = '?';
+        }else {
+            return nullptr; 
+        }}}
+
+        if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
+
+#line 1015 "regex.h2"
+        CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
+
+        (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
+        (*cpp2::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner_token))) + std::move(symbol) + CPP2_UFCS(gen_mod_string)((*cpp2::assert_not_null(r)));
+        return r; 
+    }
+
+    special_range_token::~special_range_token() noexcept{}
+
+#line 1038 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2565,12 +2550,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 1047 "regex.h2"
+#line 1050 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 1048 "regex.h2"
+#line 1051 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 1050 "regex.h2"
+#line 1053 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2586,7 +2571,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1065 "regex.h2"
+#line 1068 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2602,7 +2587,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 1081 "regex.h2"
+#line 1084 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2614,7 +2599,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 1093 "regex.h2"
+#line 1096 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2636,7 +2621,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1119 "regex.h2"
+#line 1122 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2648,19 +2633,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1130 "regex.h2"
+#line 1133 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1131 "regex.h2"
+#line 1134 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 1137 "regex.h2"
+#line 1140 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1138 "regex.h2"
+#line 1141 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1139 "regex.h2"
+#line 1142 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1146 "regex.h2"
+#line 1149 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2680,12 +2665,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1165 "regex.h2"
+#line 1168 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1166 "regex.h2"
+#line 1169 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1174 "regex.h2"
+#line 1177 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -2705,7 +2690,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1193 "regex.h2"
+#line 1196 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2718,10 +2703,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1205 "regex.h2"
+#line 1208 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1207 "regex.h2"
+#line 1210 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2733,18 +2718,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1222 "regex.h2"
+#line 1225 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1227 "regex.h2"
+#line 1230 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1228 "regex.h2"
+#line 1231 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1234 "regex.h2"
+#line 1237 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2752,14 +2737,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1241 "regex.h2"
+#line 1244 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1247 "regex.h2"
+#line 1250 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2782,7 +2767,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1271 "regex.h2"
+#line 1274 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2794,10 +2779,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1282 "regex.h2"
+#line 1285 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1284 "regex.h2"
+#line 1287 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2807,14 +2792,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1295 "regex.h2"
+#line 1298 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1296 "regex.h2"
+#line 1299 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1297 "regex.h2"
+#line 1300 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1303 "regex.h2"
+#line 1306 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2841,12 +2826,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1329 "regex.h2"
+#line 1332 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1330 "regex.h2"
+#line 1333 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1337 "regex.h2"
+#line 1340 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2859,12 +2844,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1349 "regex.h2"
+#line 1352 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1350 "regex.h2"
+#line 1353 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1357 "regex.h2"
+#line 1360 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2874,12 +2859,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1366 "regex.h2"
+#line 1369 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1367 "regex.h2"
+#line 1370 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1374 "regex.h2"
+#line 1377 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2895,21 +2880,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1389 "regex.h2"
+#line 1392 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1390 "regex.h2"
+#line 1393 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1397 "regex.h2"
+#line 1400 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1400 "regex.h2"
+#line 1403 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1401 "regex.h2"
+#line 1404 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1454 "regex.h2"
+#line 1439 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2939,9 +2924,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1483 "regex.h2"
+#line 1468 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1484 "regex.h2"
+#line 1469 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2950,7 +2935,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1505 "regex.h2"
+#line 1490 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2960,34 +2945,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1516 "regex.h2"
+#line 1501 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1530 "regex.h2"
+#line 1515 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1533 "regex.h2"
+#line 1518 "regex.h2"
         }
 
-#line 1535 "regex.h2"
+#line 1520 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1536 "regex.h2"
+#line 1521 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1537 "regex.h2"
+#line 1522 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1538 "regex.h2"
+#line 1523 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1540 "regex.h2"
+#line 1525 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1541 "regex.h2"
+#line 1526 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1542 "regex.h2"
+#line 1527 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1544 "regex.h2"
+#line 1529 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2996,13 +2981,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1553 "regex.h2"
+#line 1538 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1554 "regex.h2"
+#line 1539 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1555 "regex.h2"
+#line 1540 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1556 "regex.h2"
+#line 1541 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3010,13 +2995,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1563 "regex.h2"
+#line 1548 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1564 "regex.h2"
+#line 1549 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1565 "regex.h2"
+#line 1550 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1566 "regex.h2"
+#line 1551 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3036,10 +3021,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1585 "regex.h2"
+#line 1570 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1590 "regex.h2"
+#line 1575 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3049,31 +3034,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1611 "regex.h2"
+#line 1596 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1614 "regex.h2"
+#line 1599 "regex.h2"
         }
 
-#line 1616 "regex.h2"
+#line 1601 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1617 "regex.h2"
+#line 1602 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1618 "regex.h2"
+#line 1603 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1619 "regex.h2"
+#line 1604 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1621 "regex.h2"
+#line 1606 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1622 "regex.h2"
+#line 1607 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1623 "regex.h2"
+#line 1608 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1625 "regex.h2"
+#line 1610 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3082,13 +3067,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1634 "regex.h2"
+#line 1619 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1635 "regex.h2"
+#line 1620 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1636 "regex.h2"
+#line 1621 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1637 "regex.h2"
+#line 1622 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3096,13 +3081,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1644 "regex.h2"
+#line 1629 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1645 "regex.h2"
+#line 1630 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1646 "regex.h2"
+#line 1631 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1647 "regex.h2"
+#line 1632 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3122,10 +3107,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1666 "regex.h2"
+#line 1651 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1671 "regex.h2"
+#line 1656 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3135,24 +3120,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1707 "regex.h2"
+#line 1692 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1713 "regex.h2"
+#line 1698 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1719 "regex.h2"
+#line 1704 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1721 "regex.h2"
+#line 1706 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3160,10 +3145,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1728 "regex.h2"
+#line 1713 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1738 "regex.h2"
+#line 1723 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3172,29 +3157,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1746 "regex.h2"
+#line 1731 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1751 "regex.h2"
+#line 1736 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1777 "regex.h2"
+#line 1762 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1781 "regex.h2"
+#line 1766 "regex.h2"
     }
 
-#line 1785 "regex.h2"
+#line 1770 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3202,12 +3187,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1792 "regex.h2"
+#line 1777 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1799 "regex.h2"
+#line 1784 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3220,14 +3205,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1811 "regex.h2"
+#line 1796 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1820 "regex.h2"
+#line 1805 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3266,7 +3251,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1858 "regex.h2"
+#line 1843 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3279,14 +3264,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1870 "regex.h2"
+#line 1855 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1871 "regex.h2"
+#line 1856 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1872 "regex.h2"
+#line 1857 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1876 "regex.h2"
+#line 1861 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3294,7 +3279,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1883 "regex.h2"
+#line 1868 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3304,7 +3289,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1892 "regex.h2"
+#line 1877 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3313,7 +3298,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1900 "regex.h2"
+#line 1885 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3324,12 +3309,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1910 "regex.h2"
+#line 1895 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1911 "regex.h2"
+#line 1896 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1913 "regex.h2"
+#line 1898 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3351,14 +3336,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1934 "regex.h2"
+#line 1919 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1935 "regex.h2"
+#line 1920 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1936 "regex.h2"
+#line 1921 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1938 "regex.h2"
+#line 1923 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3371,7 +3356,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1950 "regex.h2"
+#line 1935 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3392,13 +3377,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 1972 "regex.h2"
+#line 1957 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1977 "regex.h2"
+#line 1962 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3411,10 +3396,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1989 "regex.h2"
+#line 1974 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1995 "regex.h2"
+#line 1980 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3422,10 +3407,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2002 "regex.h2"
+#line 1987 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2004 "regex.h2"
+#line 1989 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3442,7 +3427,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2020 "regex.h2"
+#line 2005 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3453,7 +3438,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2032 "regex.h2"
+#line 2017 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3465,7 +3450,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2043 "regex.h2"
+#line 2028 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3502,7 +3487,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2079 "regex.h2"
+#line 2064 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3568,7 +3553,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2147 "regex.h2"
+#line 2132 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3577,7 +3562,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2155 "regex.h2"
+#line 2140 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3591,7 +3576,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2168 "regex.h2"
+#line 2153 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3600,7 +3585,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2176 "regex.h2"
+#line 2161 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3708,7 +3693,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2283 "regex.h2"
+#line 2268 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3876,7 +3861,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2450 "regex.h2"
+#line 2435 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -4009,7 +3994,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2582 "regex.h2"
+#line 2567 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4017,7 +4002,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2589 "regex.h2"
+#line 2574 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
 
         if (c != '{') {return false; }
@@ -4081,7 +4066,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2652 "regex.h2"
+#line 2637 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
         std::string min_range {"0"}; 
         std::string max_range {"-1"}; 
@@ -4118,7 +4103,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2688 "regex.h2"
+#line 2673 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4141,7 +4126,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2710 "regex.h2"
+#line 2695 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
         parse_context parse_ctx {regex}; 
 
@@ -4168,7 +4153,7 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS(get_entry_func)(std::move(gen_ctx)); 
     }
 
-#line 2736 "regex.h2"
+#line 2721 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4191,7 +4176,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2758 "regex.h2"
+#line 2743 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
 
@@ -4211,14 +4196,14 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2778 "regex.h2"
+#line 2763 "regex.h2"
         std::cout << source << std::endl;
         if (has_error) {return "Error"; }
 
         return source; 
     }
 
-#line 2785 "regex.h2"
+#line 2770 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 1249c37375..9ecdc18a79 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -2571,105 +2571,6 @@ regex_parser:  type = {
         return true;
     }
 
-    is_range: (inout this, c: char) -> bool = {
-
-        if c != '{' { return false; }
-        if cur_group_state.empty() { error("'{' without previous element.");  return false; }
-        if !skip() { error("End of regex before closing '}'."); return false; }
-
-        inner: std::string = "";
-        if !grab_until('}', out inner) { error("Missing closing bracket."); return false; }
-
-        inner = trim_copy(inner);
-        if inner.empty() { error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
-
-        kind := range_flags::greedy;
-        if peek() == '?' {
-            kind = range_flags::not_greedy;
-            _ = skip();
-        }
-        else if peek() == '+' {
-            kind = range_flags::possessive;
-            _ = skip();
-        }
-
-        min_count: std::string = "-1";
-        min_count_number: int  = 0;
-        max_count: std::string = "-1";
-        max_count_number: int  = std::numeric_limits::max();
-
-        sep: size_t = inner.find(",");
-        if sep == std::string::npos {
-            min_count = inner;
-            max_count = inner;
-            if !string_to_int(inner, min_count_number) { error("Could not convert range to number."); return false; }
-            max_count_number = min_count_number;
-        }
-        else {
-            inner_first: std::string = trim_copy(inner.substr(0, sep));
-            inner_last: std::string = trim_copy(inner.substr(sep + 1));
-
-            if (inner_first.empty() && inner_last.empty()) {
-                error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
-                return false;
-            }
-
-            if !inner_first.empty() {
-                min_count = inner_first;
-                if !string_to_int(inner, min_count_number) { error("Could not convert range to number."); return false; }
-            }
-            if !inner_last.empty() {
-                max_count = inner_last;
-                if !string_to_int(inner, max_count_number) { error("Could not convert range to number."); return false; }
-            }
-        }
-
-        if !(0 <= min_count_number <= max_count_number) {
-            error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (min_count_number)$ <= (max_count_number)$");
-            return false;
-        }
-
-        cur_group_state.wrap_last( :(inner) -> _ == create_matcher("range_matcher_logic", "(inner)$, (min_count$)$, (max_count$)$, (kind)$"));
-
-        return true;
-    }
-
-    is_special_range: (inout this, c: char) -> bool = {
-        min_range: std::string = "0";
-        max_range: std::string = "-1";
-        if c == '*' {
-            min_range = "0";
-        }
-        else if c == '+' {
-            min_range = "1";
-        }
-        else if c == '?' {
-            min_range = "0";
-            max_range = "1";
-        }
-        else {
-            return false;
-        }
-
-        kind := range_flags::greedy;
-        if peek() == '?' {
-            kind = range_flags::not_greedy;
-            _ = skip();
-        }
-        else if peek() == '+' {
-            kind = range_flags::possessive;
-            _ = skip();
-        }
-
-        if cur_group_state.empty() {
-            error("'(c)$' without previous element.");
-            return false;
-        }
-
-        cur_group_state.wrap_last(:(inner) -> _ == create_matcher("special_range_matcher_logic", "(inner)$, (min_range$)$, (max_range$)$, (kind)$, '(c$)$'"));
-        return true;
-    }
-
     parse_until:(inout this, term: char) = {
         c: char = current();
         while c != '\n' next _ = next(out c) {
@@ -2682,8 +2583,6 @@ regex_parser:  type = {
             if !has_error && is_anchor(c) { continue; }
             if !has_error && is_group(c) { continue; }
             if !has_error && is_handle_special(c) { continue; }
-            if !has_error && is_range(c) { continue; }
-            if !has_error && is_special_range(c) { continue; }
 
             if has_error { return; }
 

From 84716a358337d06ec778ea7de80bedcd08191903 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 14:36:25 +0200
Subject: [PATCH 104/161] Moved parse_until into parser context.

---
 include/cpp2regex.h | 1085 ++++++++++++++++++++-----------------------
 source/regex.h2     |  131 +++---
 2 files changed, 592 insertions(+), 624 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 21d3eca711..8861ead206 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -92,119 +92,123 @@ class no_reset;
 #line 361 "regex.h2"
 class regex_token;
 
-#line 382 "regex.h2"
+#line 379 "regex.h2"
 class parse_context;
     
 
-#line 516 "regex.h2"
+#line 536 "regex.h2"
 class generation_function_context;
     
 
-#line 532 "regex.h2"
+#line 552 "regex.h2"
 class generation_context;
 
-#line 672 "regex.h2"
+#line 682 "regex.h2"
+class regex_token_list;
+    
+
+#line 718 "regex.h2"
 class regex_token_base;
     
 
-#line 682 "regex.h2"
+#line 728 "regex.h2"
 class char_token;
     
 
-#line 726 "regex.h2"
+#line 772 "regex.h2"
 class range_token;
     
 
-#line 864 "regex.h2"
+#line 910 "regex.h2"
 template class range_token_matcher;
 
-#line 989 "regex.h2"
+#line 1035 "regex.h2"
 class special_range_token;
     
 
-#line 1036 "regex.h2"
+#line 1082 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 1120 "regex.h2"
+#line 1166 "regex.h2"
 template class any_matcher_logic;
 
-#line 1139 "regex.h2"
+#line 1185 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1147 "regex.h2"
+#line 1193 "regex.h2"
 template class char_matcher_logic;
 
-#line 1175 "regex.h2"
+#line 1221 "regex.h2"
 template class class_matcher_logic;
 
-#line 1224 "regex.h2"
+#line 1270 "regex.h2"
 template class global_group_reset;
     
 
-#line 1236 "regex.h2"
+#line 1282 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1273 "regex.h2"
+#line 1319 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1297 "regex.h2"
+#line 1343 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1305 "regex.h2"
+#line 1351 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1338 "regex.h2"
+#line 1384 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1358 "regex.h2"
+#line 1404 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1375 "regex.h2"
+#line 1421 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1398 "regex.h2"
+#line 1444 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1410 "regex.h2"
+#line 1456 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1437 "regex.h2"
+#line 1483 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1488 "regex.h2"
+#line 1534 "regex.h2"
 template class group_name_list;
 
-#line 1500 "regex.h2"
+#line 1546 "regex.h2"
 class group_name_list_end;
     
 
-#line 1505 "regex.h2"
+#line 1551 "regex.h2"
 template class regular_expression;
 
-#line 1586 "regex.h2"
+#line 1632 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1675 "regex.h2"
+#line 1721 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1682 "regex.h2"
+#line 1728 "regex.h2"
 class regex_parser_group_state;
 
-#line 1717 "regex.h2"
+#line 1763 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1744 "regex.h2"
+#line 1790 "regex.h2"
 template class regex_parser;
 
-#line 2777 "regex.h2"
+#line 2701 "regex.h2"
 }
 }
 
@@ -551,23 +555,21 @@ class no_reset {
 
 class regex_token {
 
-    public: bool needs_state; 
     public: std::string string_rep; 
 
-    public: explicit regex_token(cpp2::in state, cpp2::in str);
+    public: explicit regex_token(cpp2::in str);
 
-#line 372 "regex.h2"
+#line 370 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
-    public: [[nodiscard]] auto requires_state() const& -> bool;
     public: [[nodiscard]] auto to_string() const& -> std::string;
     public: virtual ~regex_token() noexcept;
 
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 377 "regex.h2"
+#line 374 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
@@ -583,53 +585,58 @@ class parse_context {
     private: token_vec cur_state {}; 
 
     public: explicit parse_context(cpp2::in r);
-#line 391 "regex.h2"
+#line 388 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 395 "regex.h2"
+#line 392 "regex.h2"
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 399 "regex.h2"
+#line 396 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 403 "regex.h2"
+#line 400 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 413 "regex.h2"
-    public: [[nodiscard]] auto get_tokens() const& -> token_vec;
+#line 410 "regex.h2"
+    public: [[nodiscard]] auto get_tokens() const& -> token_ptr;
 
-#line 417 "regex.h2"
+#line 414 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     public: [[nodiscard]] auto has_next() const& -> bool;
     public: [[nodiscard]] auto next() & -> bool;
 
-#line 428 "regex.h2"
+#line 425 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 435 "regex.h2"
+#line 432 "regex.h2"
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 475 "regex.h2"
+#line 472 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 496 "regex.h2"
+#line 493 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 510 "regex.h2"
+#line 507 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
+
+    public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
+
+#line 531 "regex.h2"
+    public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 514 "regex.h2"
+#line 534 "regex.h2"
 };
 
 class generation_function_context {
@@ -638,10 +645,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 527 "regex.h2"
+#line 547 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 530 "regex.h2"
+#line 550 "regex.h2"
 };
 
 class generation_context {
@@ -657,83 +664,105 @@ class generation_context {
 
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 548 "regex.h2"
+#line 568 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 554 "regex.h2"
-    public: [[nodiscard]] auto run(cpp2::in tokens) & -> std::string;
-
-#line 560 "regex.h2"
-    public: [[nodiscard]] auto generate_func(cpp2::in tokens) & -> std::string;
+#line 574 "regex.h2"
+    public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 570 "regex.h2"
+#line 580 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 578 "regex.h2"
+#line 588 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 600 "regex.h2"
+#line 610 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 604 "regex.h2"
+#line 614 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 608 "regex.h2"
+#line 618 "regex.h2"
     public: auto start_func_named(cpp2::in name) & -> void;
 
-#line 617 "regex.h2"
+#line 627 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 623 "regex.h2"
+#line 633 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 635 "regex.h2"
+#line 645 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 639 "regex.h2"
+#line 649 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 643 "regex.h2"
+#line 653 "regex.h2"
     public: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 649 "regex.h2"
+#line 659 "regex.h2"
     public: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 655 "regex.h2"
+#line 665 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 663 "regex.h2"
+#line 673 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 670 "regex.h2"
+#line 680 "regex.h2"
 };
 
+class regex_token_list: public regex_token {
+
+#line 685 "regex.h2"
+    public: token_vec tokens; 
+
+    public: explicit regex_token_list(cpp2::in t);
+
+#line 692 "regex.h2"
+    public: virtual auto generate_code(generation_context& ctx) const -> void;
+
+#line 698 "regex.h2"
+    public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
+
+#line 708 "regex.h2"
+    public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
+    public: virtual ~regex_token_list() noexcept;
+
+    public: regex_token_list(regex_token_list const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_list const&) -> void = delete;
+
+
+#line 715 "regex.h2"
+};
+
+#line 718 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 675 "regex.h2"
-    public: explicit regex_token_base(cpp2::in state, cpp2::in str);
+#line 721 "regex.h2"
+    public: explicit regex_token_base(cpp2::in str);
 
-#line 679 "regex.h2"
+#line 725 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 680 "regex.h2"
+#line 726 "regex.h2"
 };
 
 class char_token: public regex_token_base {
 
-#line 685 "regex.h2"
+#line 731 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 692 "regex.h2"
+#line 738 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 696 "regex.h2"
+#line 742 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -741,17 +770,17 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 701 "regex.h2"
+#line 747 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 724 "regex.h2"
+#line 770 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 729 "regex.h2"
+#line 775 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -761,65 +790,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 806 "regex.h2"
+#line 852 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 817 "regex.h2"
+#line 863 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 829 "regex.h2"
+#line 875 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 853 "regex.h2"
+#line 899 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 861 "regex.h2"
+#line 907 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 862 "regex.h2"
+#line 908 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 878 "regex.h2"
+#line 924 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 883 "regex.h2"
+#line 929 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 888 "regex.h2"
+#line 934 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 894 "regex.h2"
+#line 940 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 909 "regex.h2"
+#line 955 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 937 "regex.h2"
+#line 983 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 961 "regex.h2"
+#line 1007 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 985 "regex.h2"
+#line 1031 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 992 "regex.h2"
+#line 1038 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -828,10 +857,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1021 "regex.h2"
+#line 1067 "regex.h2"
 };
 
-#line 1024 "regex.h2"
+#line 1070 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -839,7 +868,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1032 "regex.h2"
+#line 1078 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -848,20 +877,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 1050 "regex.h2"
+#line 1096 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 1068 "regex.h2"
+#line 1114 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 1116 "regex.h2"
+#line 1162 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -870,14 +899,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1133 "regex.h2"
+#line 1179 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 1135 "regex.h2"
+#line 1181 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -890,7 +919,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1143 "regex.h2"
+#line 1189 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -899,27 +928,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1168 "regex.h2"
+#line 1214 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1170 "regex.h2"
+#line 1216 "regex.h2"
 };
 
-#line 1173 "regex.h2"
+#line 1219 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1196 "regex.h2"
+#line 1242 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1208 "regex.h2"
+#line 1254 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -928,7 +957,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1220 "regex.h2"
+#line 1266 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -936,14 +965,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1230 "regex.h2"
+#line 1276 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1232 "regex.h2"
+#line 1278 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -951,23 +980,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1244 "regex.h2"
+#line 1290 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1250 "regex.h2"
+#line 1296 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1271 "regex.h2"
+#line 1317 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1285 "regex.h2"
+#line 1331 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -976,7 +1005,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1295 "regex.h2"
+#line 1341 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -987,7 +1016,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1301 "regex.h2"
+#line 1347 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -995,14 +1024,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1332 "regex.h2"
+#line 1378 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1334 "regex.h2"
+#line 1380 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -1011,14 +1040,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1352 "regex.h2"
+#line 1398 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1354 "regex.h2"
+#line 1400 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -1027,14 +1056,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1369 "regex.h2"
+#line 1415 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1371 "regex.h2"
+#line 1417 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1043,14 +1072,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1392 "regex.h2"
+#line 1438 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1394 "regex.h2"
+#line 1440 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1059,14 +1088,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1403 "regex.h2"
+#line 1449 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1405 "regex.h2"
+#line 1451 "regex.h2"
 };
 
 // Named character classes
@@ -1078,7 +1107,7 @@ template                    void = delete;
 
 
-#line 1412 "regex.h2"
+#line 1458 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1088,7 +1117,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1422 "regex.h2"
+#line 1468 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1108,7 +1137,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1468 "regex.h2"
+#line 1514 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1116,10 +1145,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1476 "regex.h2"
+#line 1522 "regex.h2"
 };
 
-#line 1479 "regex.h2"
+#line 1525 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1137,7 +1166,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1498 "regex.h2"
+#line 1544 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1146,7 +1175,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1502 "regex.h2"
+#line 1548 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1162,7 +1191,7 @@ template matched_, context const& ctx_);
 
-#line 1520 "regex.h2"
+#line 1566 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1177,7 +1206,7 @@ template void = delete;
 
 
-#line 1536 "regex.h2"
+#line 1582 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1185,13 +1214,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1548 "regex.h2"
+#line 1594 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1570 "regex.h2"
+#line 1616 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1203,7 +1232,7 @@ template void = delete;
 
 
-#line 1583 "regex.h2"
+#line 1629 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1219,7 +1248,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1601 "regex.h2"
+#line 1647 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1234,7 +1263,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1617 "regex.h2"
+#line 1663 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1242,13 +1271,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1629 "regex.h2"
+#line 1675 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1651 "regex.h2"
+#line 1697 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1260,7 +1289,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1664 "regex.h2"
+#line 1710 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1291,15 +1320,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1698 "regex.h2"
+#line 1744 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1704 "regex.h2"
+#line 1750 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1713 "regex.h2"
+#line 1759 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1312,13 +1341,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1731 "regex.h2"
+#line 1777 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1736 "regex.h2"
+#line 1782 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1741 "regex.h2"
+#line 1787 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1342,153 +1371,144 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1768 "regex.h2"
+#line 1814 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1777 "regex.h2"
+#line 1823 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1781 "regex.h2"
+#line 1827 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1796 "regex.h2"
+#line 1842 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1802 "regex.h2"
+#line 1848 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1843 "regex.h2"
+#line 1889 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1855 "regex.h2"
+#line 1901 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1861 "regex.h2"
+#line 1907 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1868 "regex.h2"
+#line 1914 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1877 "regex.h2"
+#line 1923 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1885 "regex.h2"
+#line 1931 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1895 "regex.h2"
+#line 1941 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1919 "regex.h2"
+#line 1965 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1935 "regex.h2"
+#line 1981 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 1955 "regex.h2"
+#line 2001 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 1962 "regex.h2"
+#line 2008 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 1974 "regex.h2"
+#line 2020 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 1977 "regex.h2"
+#line 2023 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 1987 "regex.h2"
+#line 2033 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2005 "regex.h2"
+#line 2051 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2015 "regex.h2"
+#line 2061 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2028 "regex.h2"
+#line 2074 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2064 "regex.h2"
+#line 2110 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2129 "regex.h2"
+#line 2175 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2140 "regex.h2"
+#line 2186 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2153 "regex.h2"
+#line 2199 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2161 "regex.h2"
+#line 2207 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2268 "regex.h2"
+#line 2314 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2435 "regex.h2"
+#line 2481 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2567 "regex.h2"
+#line 2613 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2574 "regex.h2"
-    public: [[nodiscard]] auto is_range(cpp2::in c) & -> bool;
-
-#line 2637 "regex.h2"
-    public: [[nodiscard]] auto is_special_range(cpp2::in c) & -> bool;
-
-#line 2673 "regex.h2"
+#line 2620 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2695 "regex.h2"
-    public: [[nodiscard]] auto parse_until_new(cpp2::in term) & -> std::string;
-
-#line 2721 "regex.h2"
+#line 2640 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2743 "regex.h2"
+#line 2662 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2768 "regex.h2"
+#line 2692 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2777 "regex.h2"
+#line 2701 "regex.h2"
 }
 }
 
@@ -1853,30 +1873,27 @@ namespace regex {
 #line 358 "regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 366 "regex.h2"
-    regex_token::regex_token(cpp2::in state, cpp2::in str)
-        : needs_state{ state }
-        , string_rep{ str }{
+#line 365 "regex.h2"
+    regex_token::regex_token(cpp2::in str)
+        : string_rep{ str }{
 
-#line 369 "regex.h2"
+#line 367 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
 
-#line 375 "regex.h2"
-    [[nodiscard]] auto regex_token::requires_state() const& -> bool{return needs_state; }
-#line 376 "regex.h2"
+#line 373 "regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
 
     regex_token::~regex_token() noexcept{}
 
-#line 391 "regex.h2"
+#line 388 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 393 "regex.h2"
+#line 390 "regex.h2"
     }
-#line 391 "regex.h2"
+#line 388 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -1884,20 +1901,20 @@ namespace regex {
         cur_state = {};
         return *this;
 
-#line 393 "regex.h2"
+#line 390 "regex.h2"
     }
 
-#line 395 "regex.h2"
+#line 392 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(push_back)(cur_state, token);
     }
 
-#line 399 "regex.h2"
+#line 396 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_state)); 
     }
 
-#line 403 "regex.h2"
+#line 400 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -1908,17 +1925,17 @@ namespace regex {
         return r; 
     }
 
-#line 413 "regex.h2"
-    [[nodiscard]] auto parse_context::get_tokens() const& -> token_vec{
-        return cur_state; 
+#line 410 "regex.h2"
+    [[nodiscard]] auto parse_context::get_tokens() const& -> token_ptr{
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_state); 
     }
 
-#line 417 "regex.h2"
+#line 414 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 419 "regex.h2"
+#line 416 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 420 "regex.h2"
+#line 417 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
             pos += 1; return true; 
@@ -1927,16 +1944,16 @@ namespace regex {
         return false; 
     }
 
-#line 428 "regex.h2"
+#line 425 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 430 "regex.h2"
+#line 427 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 435 "regex.h2"
+#line 432 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -1976,7 +1993,7 @@ namespace regex {
         return cur; 
     }
 
-#line 475 "regex.h2"
+#line 472 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -1998,14 +2015,14 @@ namespace regex {
         }
     }
 
-#line 496 "regex.h2"
+#line 493 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 497 "regex.h2"
+#line 494 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 498 "regex.h2"
+#line 495 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 500 "regex.h2"
+#line 497 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2016,12 +2033,37 @@ namespace regex {
         }
     }
 
-#line 510 "regex.h2"
+#line 507 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 511 "regex.h2"
+#line 508 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 520 "regex.h2"
+#line 510 "regex.h2"
+    [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
+        token_ptr cur_token {}; 
+
+        for( ; valid(); static_cast(next()) ) {
+            if (term == current()) {break; }
+
+            cur_token = nullptr;
+            if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = char_token::parse((*this)); }
+
+            if (cur_token && valid()) {
+                add_token(cur_token);
+            }else {
+                return false; 
+            }
+        }
+
+        return true; 
+    }
+
+#line 531 "regex.h2"
+    [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
+
+#line 540 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2029,46 +2071,35 @@ namespace regex {
         }
     }
 
-#line 527 "regex.h2"
+#line 547 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 541 "regex.h2"
+#line 561 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 543 "regex.h2"
+#line 563 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 548 "regex.h2"
+#line 568 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
         start_func_named(next_func);
     }
 
-#line 554 "regex.h2"
-    [[nodiscard]] auto generation_context::run(cpp2::in tokens) & -> std::string{
-        entry_func = generate_func(tokens);
+#line 574 "regex.h2"
+    [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
+        entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 560 "regex.h2"
-    [[nodiscard]] auto generation_context::generate_func(cpp2::in tokens) & -> std::string{
-        auto name {start_func()}; 
-        for ( auto const& token : tokens ) {
-            CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
-        }
-        end_func();
-
-        return name; 
-    }
-
-#line 570 "regex.h2"
+#line 580 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2077,7 +2108,7 @@ namespace regex {
         return name; 
     }
 
-#line 578 "regex.h2"
+#line 588 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset"; 
@@ -2099,17 +2130,17 @@ namespace regex {
         return name; 
     }
 
-#line 600 "regex.h2"
+#line 610 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 604 "regex.h2"
+#line 614 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 608 "regex.h2"
+#line 618 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2119,14 +2150,14 @@ namespace regex {
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 617 "regex.h2"
+#line 627 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return name; 
     }
 
-#line 623 "regex.h2"
+#line 633 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2139,31 +2170,31 @@ namespace regex {
         finish_context();
     }
 
-#line 635 "regex.h2"
+#line 645 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 639 "regex.h2"
+#line 649 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 643 "regex.h2"
+#line 653 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 649 "regex.h2"
+#line 659 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 655 "regex.h2"
+#line 665 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2172,7 +2203,7 @@ namespace regex {
         return cur; 
     }
 
-#line 663 "regex.h2"
+#line 673 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2181,32 +2212,69 @@ namespace regex {
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 675 "regex.h2"
-    regex_token_base::regex_token_base(cpp2::in state, cpp2::in str)
-        : regex_token{ state, str }{
+#line 687 "regex.h2"
+    regex_token_list::regex_token_list(cpp2::in t)
+        : regex_token{ gen_string(t) }
+        , tokens{ t }{
+
+#line 690 "regex.h2"
+    }
+
+#line 692 "regex.h2"
+    auto regex_token_list::generate_code(generation_context& ctx) const -> void{
+        for ( auto const& token : tokens ) {
+            CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
+        }
+    }
+
+#line 698 "regex.h2"
+    [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
+        std::vector r {}; 
+        for ( auto const& token : tokens ) {
+            auto c {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(token)))}; 
+            static_cast(CPP2_UFCS(insert)(r, CPP2_UFCS(end)(r), CPP2_UFCS(begin)(c), CPP2_UFCS(end)(std::move(c))));
+        }
+
+        return r; 
+    }
+
+#line 708 "regex.h2"
+    [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
+        std::string r {""}; 
+        for ( auto const& token : vec ) {
+            r += CPP2_UFCS(to_string)((*cpp2::assert_not_null(token)));
+        }
+        return r; 
+    }
+
+    regex_token_list::~regex_token_list() noexcept{}
 
-#line 677 "regex.h2"
+#line 721 "regex.h2"
+    regex_token_base::regex_token_base(cpp2::in str)
+        : regex_token{ str }{
+
+#line 723 "regex.h2"
     }
 
-#line 679 "regex.h2"
+#line 725 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 687 "regex.h2"
+#line 733 "regex.h2"
     char_token::char_token(cpp2::in t)
-        : regex_token_base{ false, std::string(1, t) }
+        : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 690 "regex.h2"
+#line 736 "regex.h2"
     }
 
-#line 692 "regex.h2"
+#line 738 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 696 "regex.h2"
+#line 742 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2215,7 +2283,7 @@ namespace regex {
 
     char_token::~char_token() noexcept{}
 
-#line 703 "regex.h2"
+#line 749 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2237,11 +2305,11 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 734 "regex.h2"
+#line 780 "regex.h2"
     range_token::range_token()
-                             : regex_token{ true, "" }{}
+                             : regex_token{ "" }{}
 
-#line 736 "regex.h2"
+#line 782 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -2285,7 +2353,7 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
-#line 780 "regex.h2"
+#line 826 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -2312,7 +2380,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 806 "regex.h2"
+#line 852 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -2324,7 +2392,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 817 "regex.h2"
+#line 863 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -2337,7 +2405,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 829 "regex.h2"
+#line 875 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2362,7 +2430,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 853 "regex.h2"
+#line 899 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -2371,12 +2439,12 @@ template [[nodiscard]] auto char_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + "(), " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
     }
 
-#line 861 "regex.h2"
+#line 907 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 866 "regex.h2"
+#line 912 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -2389,26 +2457,26 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 878 "regex.h2"
+#line 924 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 883 "regex.h2"
+#line 929 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 888 "regex.h2"
+#line 934 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 894 "regex.h2"
+#line 940 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2424,7 +2492,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 909 "regex.h2"
+#line 955 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -2453,7 +2521,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 937 "regex.h2"
+#line 983 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2478,7 +2546,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 961 "regex.h2"
+#line 1007 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2504,7 +2572,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 992 "regex.h2"
+#line 1038 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -2527,7 +2595,7 @@ template [[nodiscard]] auto char_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1015 "regex.h2"
+#line 1061 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -2537,7 +2605,7 @@ template [[nodiscard]] auto char_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1038 "regex.h2"
+#line 1084 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2550,12 +2618,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 1050 "regex.h2"
+#line 1096 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 1051 "regex.h2"
+#line 1097 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 1053 "regex.h2"
+#line 1099 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2571,7 +2639,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1068 "regex.h2"
+#line 1114 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2587,7 +2655,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 1084 "regex.h2"
+#line 1130 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2599,7 +2667,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 1096 "regex.h2"
+#line 1142 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2621,7 +2689,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1122 "regex.h2"
+#line 1168 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2633,19 +2701,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1133 "regex.h2"
+#line 1179 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1134 "regex.h2"
+#line 1180 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 1140 "regex.h2"
+#line 1186 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1141 "regex.h2"
+#line 1187 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1142 "regex.h2"
+#line 1188 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1149 "regex.h2"
+#line 1195 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2665,12 +2733,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1168 "regex.h2"
+#line 1214 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1169 "regex.h2"
+#line 1215 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1177 "regex.h2"
+#line 1223 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -2690,7 +2758,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1196 "regex.h2"
+#line 1242 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2703,10 +2771,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1208 "regex.h2"
+#line 1254 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1210 "regex.h2"
+#line 1256 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2718,18 +2786,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1225 "regex.h2"
+#line 1271 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1230 "regex.h2"
+#line 1276 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1231 "regex.h2"
+#line 1277 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1237 "regex.h2"
+#line 1283 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2737,14 +2805,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1244 "regex.h2"
+#line 1290 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1250 "regex.h2"
+#line 1296 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2767,7 +2835,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1274 "regex.h2"
+#line 1320 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2779,10 +2847,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1285 "regex.h2"
+#line 1331 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1287 "regex.h2"
+#line 1333 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2792,14 +2860,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1298 "regex.h2"
+#line 1344 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1299 "regex.h2"
+#line 1345 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1300 "regex.h2"
+#line 1346 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1306 "regex.h2"
+#line 1352 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2826,12 +2894,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1332 "regex.h2"
+#line 1378 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1333 "regex.h2"
+#line 1379 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1340 "regex.h2"
+#line 1386 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2844,12 +2912,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1352 "regex.h2"
+#line 1398 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1353 "regex.h2"
+#line 1399 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1360 "regex.h2"
+#line 1406 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2859,12 +2927,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1369 "regex.h2"
+#line 1415 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1370 "regex.h2"
+#line 1416 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1377 "regex.h2"
+#line 1423 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2880,21 +2948,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1392 "regex.h2"
+#line 1438 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1393 "regex.h2"
+#line 1439 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1400 "regex.h2"
+#line 1446 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1403 "regex.h2"
+#line 1449 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1404 "regex.h2"
+#line 1450 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1439 "regex.h2"
+#line 1485 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2924,9 +2992,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1468 "regex.h2"
+#line 1514 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1469 "regex.h2"
+#line 1515 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -2935,7 +3003,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1490 "regex.h2"
+#line 1536 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -2945,34 +3013,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1501 "regex.h2"
+#line 1547 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1515 "regex.h2"
+#line 1561 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1518 "regex.h2"
+#line 1564 "regex.h2"
         }
 
-#line 1520 "regex.h2"
+#line 1566 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1521 "regex.h2"
+#line 1567 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1522 "regex.h2"
+#line 1568 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1523 "regex.h2"
+#line 1569 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1525 "regex.h2"
+#line 1571 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1526 "regex.h2"
+#line 1572 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1527 "regex.h2"
+#line 1573 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1529 "regex.h2"
+#line 1575 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -2981,13 +3049,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1538 "regex.h2"
+#line 1584 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1539 "regex.h2"
+#line 1585 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1540 "regex.h2"
+#line 1586 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1541 "regex.h2"
+#line 1587 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -2995,13 +3063,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1548 "regex.h2"
+#line 1594 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1549 "regex.h2"
+#line 1595 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1550 "regex.h2"
+#line 1596 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1551 "regex.h2"
+#line 1597 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3021,10 +3089,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1570 "regex.h2"
+#line 1616 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1575 "regex.h2"
+#line 1621 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3034,31 +3102,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1596 "regex.h2"
+#line 1642 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1599 "regex.h2"
+#line 1645 "regex.h2"
         }
 
-#line 1601 "regex.h2"
+#line 1647 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1602 "regex.h2"
+#line 1648 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1603 "regex.h2"
+#line 1649 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1604 "regex.h2"
+#line 1650 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1606 "regex.h2"
+#line 1652 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1607 "regex.h2"
+#line 1653 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1608 "regex.h2"
+#line 1654 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1610 "regex.h2"
+#line 1656 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3067,13 +3135,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1619 "regex.h2"
+#line 1665 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1620 "regex.h2"
+#line 1666 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1621 "regex.h2"
+#line 1667 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1622 "regex.h2"
+#line 1668 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3081,13 +3149,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1629 "regex.h2"
+#line 1675 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1630 "regex.h2"
+#line 1676 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1631 "regex.h2"
+#line 1677 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1632 "regex.h2"
+#line 1678 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3107,10 +3175,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1651 "regex.h2"
+#line 1697 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1656 "regex.h2"
+#line 1702 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3120,24 +3188,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1692 "regex.h2"
+#line 1738 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1698 "regex.h2"
+#line 1744 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1704 "regex.h2"
+#line 1750 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1706 "regex.h2"
+#line 1752 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3145,10 +3213,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1713 "regex.h2"
+#line 1759 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1723 "regex.h2"
+#line 1769 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3157,29 +3225,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1731 "regex.h2"
+#line 1777 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1736 "regex.h2"
+#line 1782 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1762 "regex.h2"
+#line 1808 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1766 "regex.h2"
+#line 1812 "regex.h2"
     }
 
-#line 1770 "regex.h2"
+#line 1816 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3187,12 +3255,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1777 "regex.h2"
+#line 1823 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1784 "regex.h2"
+#line 1830 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3205,14 +3273,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1796 "regex.h2"
+#line 1842 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1805 "regex.h2"
+#line 1851 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3251,7 +3319,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1843 "regex.h2"
+#line 1889 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3264,14 +3332,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1855 "regex.h2"
+#line 1901 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1856 "regex.h2"
+#line 1902 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1857 "regex.h2"
+#line 1903 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1861 "regex.h2"
+#line 1907 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3279,7 +3347,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1868 "regex.h2"
+#line 1914 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3289,7 +3357,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1877 "regex.h2"
+#line 1923 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3298,7 +3366,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1885 "regex.h2"
+#line 1931 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3309,12 +3377,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1895 "regex.h2"
+#line 1941 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1896 "regex.h2"
+#line 1942 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1898 "regex.h2"
+#line 1944 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3336,14 +3404,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1919 "regex.h2"
+#line 1965 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1920 "regex.h2"
+#line 1966 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1921 "regex.h2"
+#line 1967 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1923 "regex.h2"
+#line 1969 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3356,7 +3424,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1935 "regex.h2"
+#line 1981 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3377,13 +3445,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 1957 "regex.h2"
+#line 2003 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 1962 "regex.h2"
+#line 2008 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3396,10 +3464,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1974 "regex.h2"
+#line 2020 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 1980 "regex.h2"
+#line 2026 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3407,10 +3475,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 1987 "regex.h2"
+#line 2033 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 1989 "regex.h2"
+#line 2035 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3427,7 +3495,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2005 "regex.h2"
+#line 2051 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3438,7 +3506,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2017 "regex.h2"
+#line 2063 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3450,7 +3518,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2028 "regex.h2"
+#line 2074 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3487,7 +3555,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2064 "regex.h2"
+#line 2110 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3553,7 +3621,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2132 "regex.h2"
+#line 2178 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3562,7 +3630,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2140 "regex.h2"
+#line 2186 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3576,7 +3644,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2153 "regex.h2"
+#line 2199 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3585,7 +3653,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2161 "regex.h2"
+#line 2207 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3693,7 +3761,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2268 "regex.h2"
+#line 2314 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3861,7 +3929,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2435 "regex.h2"
+#line 2481 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -3994,7 +4062,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2567 "regex.h2"
+#line 2613 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4002,108 +4070,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2574 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_range(cpp2::in c) & -> bool{
-
-        if (c != '{') {return false; }
-        if (CPP2_UFCS(empty)(cur_group_state)) {error("'{' without previous element.");return false; }
-        if (!(skip())) {error("End of regex before closing '}'."); return false; }
-
-        std::string inner {""}; 
-        if (!(grab_until('}', cpp2::out(&inner)))) {error("Missing closing bracket."); return false; }
-
-        inner = trim_copy(inner);
-        if (CPP2_UFCS(empty)(inner)) {error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); return false; }
-
-        auto kind {range_flags::greedy}; 
-        if (peek() == '?') {
-            kind = range_flags::not_greedy;
-            static_cast(skip());
-        }
-        else {if (peek() == '+') {
-            kind = range_flags::possessive;
-            static_cast(skip());
-        }}
-
-        std::string min_count {"-1"}; 
-        int min_count_number {0}; 
-        std::string max_count {"-1"}; 
-        int max_count_number {std::numeric_limits::max()}; 
-
-        size_t sep {CPP2_UFCS(find)(inner, ",")}; 
-        if (sep == std::string::npos) {
-            min_count = inner;
-            max_count = inner;
-            if (!(string_to_int(std::move(inner), min_count_number))) {error("Could not convert range to number."); return false; }
-            max_count_number = min_count_number;
-        }
-        else {
-            std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; 
-            std::string inner_last {trim_copy(CPP2_UFCS(substr)(inner, std::move(sep) + 1))}; 
-
-            if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) {
-                error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
-                return false; 
-            }
-
-            if (!(CPP2_UFCS(empty)(inner_first))) {
-                min_count = std::move(inner_first);
-                if (!(string_to_int(inner, min_count_number))) {error("Could not convert range to number."); return false; }
-            }
-            if (!(CPP2_UFCS(empty)(inner_last))) {
-                max_count = std::move(inner_last);
-                if (!(string_to_int(std::move(inner), max_count_number))) {error("Could not convert range to number."); return false; }
-            }
-        }
-
-        if (!(([_0 = 0, _1 = min_count_number, _2 = max_count_number]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()))) {
-            error(("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string(std::move(min_count_number)) + " <= " + cpp2::to_string(std::move(max_count_number))));
-            return false; 
-        }
-
-        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_count), _2 = std::move(max_count)](auto const& inner) -> auto { return create_matcher("range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(kind)));  });
-
-        return true; 
-    }
-
-#line 2637 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_special_range(cpp2::in c) & -> bool{
-        std::string min_range {"0"}; 
-        std::string max_range {"-1"}; 
-        if (c == '*') {
-            min_range = "0";
-        }
-        else {if (c == '+') {
-            min_range = "1";
-        }
-        else {if (c == '?') {
-            min_range = "0";
-            max_range = "1";
-        }
-        else {
-            return false; 
-        }}}
-
-        auto kind {range_flags::greedy}; 
-        if (peek() == '?') {
-            kind = range_flags::not_greedy;
-            static_cast(skip());
-        }
-        else {if (peek() == '+') {
-            kind = range_flags::possessive;
-            static_cast(skip());
-        }}
-
-        if (CPP2_UFCS(empty)(cur_group_state)) {
-            error(("'" + cpp2::to_string(c) + "' without previous element."));
-            return false; 
-        }
-
-        CPP2_UFCS(wrap_last)(cur_group_state, [&, _1 = std::move(min_range), _2 = std::move(max_range), _3 = c](auto const& inner) -> auto { return create_matcher("special_range_matcher_logic", (cpp2::to_string(inner) + ", " + cpp2::to_string(_1) + ", " + cpp2::to_string(_2) + ", " + cpp2::to_string(kind) + ", '" + cpp2::to_string(_3) + "'"));  });
-        return true; 
-    }
-
-#line 2673 "regex.h2"
+#line 2620 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4116,8 +4083,6 @@ template [[nodiscard]] auto char_toke
             if (!(has_error) && is_anchor(c)) {continue; }
             if (!(has_error) && is_group(c)) {continue; }
             if (!(has_error) && is_handle_special(c)) {continue; }
-            if (!(has_error) && is_range(c)) {continue; }
-            if (!(has_error) && is_special_range(c)) {continue; }
 
             if (has_error) {return ; }
 
@@ -4126,34 +4091,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2695 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse_until_new(cpp2::in term) & -> std::string{
-        parse_context parse_ctx {regex}; 
-
-        token_ptr cur_token {}; 
-
-        for( ; CPP2_UFCS(valid)(parse_ctx); static_cast(CPP2_UFCS(next)(parse_ctx)) ) {
-            if (term == CPP2_UFCS(current)(parse_ctx)) {break; }
-
-            cur_token = nullptr;
-            if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = range_token::parse(parse_ctx); }
-            if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = special_range_token::parse(parse_ctx); }
-            if (!(cur_token) && CPP2_UFCS(valid)(parse_ctx)) {cur_token = char_token::parse(parse_ctx); }
-
-            if (cur_token && CPP2_UFCS(valid)(parse_ctx)) {
-                CPP2_UFCS(add_token)(parse_ctx, cur_token);
-            }else {
-                error(parse_ctx.error_text);
-                return ""; 
-            }
-        }
-
-        generation_context gen_ctx {}; 
-        source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(std::move(parse_ctx)));
-        return CPP2_UFCS(get_entry_func)(std::move(gen_ctx)); 
-    }
-
-#line 2721 "regex.h2"
+#line 2640 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4176,19 +4114,25 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2743 "regex.h2"
+#line 2662 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
+        parse_context parse_ctx {regex}; 
+        if (!(CPP2_UFCS(parse)(parse_ctx))) {
+            error(parse_ctx.error_text);
+            return "Error"; 
+        }
 
         source += "{\n";
         source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
         source += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
 
-        auto start_name {parse_until_new('\0')}; 
+        generation_context gen_ctx {}; 
+        source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(std::move(parse_ctx)));
         source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
-        source += "    ctx.set_group_start(0, cur);";
-        source += ("    r := " + cpp2::to_string(std::move(start_name)) + "()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
-        source += "    if r.matched { ctx.set_group_end(0, r.pos); }";
+        source += "    ctx.set_group_start(0, cur);\n";
+        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(std::move(gen_ctx))) + "()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
+        source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
@@ -4196,14 +4140,13 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2763 "regex.h2"
+#line 2688 "regex.h2"
         std::cout << source << std::endl;
-        if (has_error) {return "Error"; }
 
         return source; 
     }
 
-#line 2770 "regex.h2"
+#line 2694 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 9ecdc18a79..4452d94f92 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -360,11 +360,9 @@ no_reset: @struct type = {
 
 regex_token: @polymorphic_base type = {
 
-    public needs_state: bool;
     public string_rep: std::string;
 
-    operator=:(out this, state: bool, str: std::string) = {
-        needs_state = state;
+    operator=:(out this, str: std::string) = {
         string_rep = str;
     }
 
@@ -372,7 +370,6 @@ regex_token: @polymorphic_base type = {
     generate_code: (virtual this, inout _: generation_context);
 
     get_groups: (virtual this) -> std::vector;
-    requires_state: (this) -> bool = { return needs_state; }
     to_string: (this) -> std::string = { return string_rep; }
 }
 
@@ -410,8 +407,8 @@ parse_context: type = {
         return r;
     }
 
-    get_tokens: (this) -> token_vec = {
-        return cur_state;
+    get_tokens: (this) -> token_ptr = {
+        return shared.new(cur_state);
     }
 
     current: (this) -> char = { return regex[pos]; }
@@ -510,6 +507,29 @@ parse_context: type = {
     peek: (in this)          peek_impl(false);
     peek_in_class: (in this) peek_impl(true);
 
+    parse_until:(inout this, term: char) -> bool = {
+        cur_token: token_ptr = ();
+
+        while valid() next _ = next() {
+            if term == current() { break; }
+
+            cur_token = nullptr;
+            if !cur_token && valid() { cur_token = range_token::parse(this); }
+            if !cur_token && valid() { cur_token = special_range_token::parse(this); }
+            if !cur_token && valid() { cur_token = char_token::parse(this); }
+
+            if cur_token && valid() {
+                add_token(cur_token);
+            } else {
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    parse: (inout this) parse_until('\0');
+
 
 }
 
@@ -551,22 +571,12 @@ generation_context: @struct type = {
         start_func_named(next_func);
     }
 
-    run: (inout this, tokens: token_vec) -> std::string = {
-        entry_func = generate_func(tokens);
+    run: (inout this, token: token_ptr) -> std::string = {
+        entry_func = generate_func(token);
 
         return get_base()*.code;
     }
 
-    generate_func: (inout this, tokens: token_vec) -> std::string = {
-        name := start_func();
-        for tokens do (token) {
-            token*.generate_code(this);
-        }
-        end_func();
-
-        return name;
-    }
-
     generate_func: (inout this, token: token_ptr) -> std::string = {
         name := start_func();
         token*.generate_code(this);
@@ -669,11 +679,47 @@ generation_context: @struct type = {
     }
 }
 
+regex_token_list: @polymorphic_base type = {
+    this: regex_token;
+
+    public tokens: token_vec;
+
+    operator=:(out this, t: token_vec) = {
+        regex_token = (gen_string(t));
+        tokens = t;
+    }
+
+    generate_code: (virtual this, inout ctx: generation_context) = {
+        for tokens do (token) {
+            token*.generate_code(ctx);
+        }
+    }
+
+    get_groups: (virtual this) -> std::vector = {
+        r : std::vector = ();
+        for tokens do (token) {
+            c := token*.get_groups();
+            _ = r.insert(r.end(), c.begin(), c.end());
+        }
+
+        return r;
+    }
+
+    gen_string: (vec: token_vec) -> std::string = {
+        r : std::string = "";
+        for vec do (token) {
+            r += token*.to_string();
+        }
+        return r;
+    }
+}
+
+
 regex_token_base: @polymorphic_base type = {
     this: regex_token;
 
-    operator=:(out this, state: bool, str: std::string) = {
-        regex_token = (state, str);
+    operator=:(out this, str: std::string) = {
+        regex_token = (str);
     }
 
     get_groups: (override this) -> std::vector = { return (); }
@@ -685,7 +731,7 @@ char_token: @polymorphic_base type = {
     token: char;
 
     operator=: (out this, t: char) = {
-        regex_token_base = (false, std::string(1, t));
+        regex_token_base = (std::string(1, t));
         token = t;
     }
 
@@ -724,7 +770,7 @@ char_token_matcher:  (inout cur, inout ctx,
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 range_token: @polymorphic_base type = {
-    this: regex_token = (true, "");
+    this: regex_token = ("");
 
     protected min_count: int = -1;
     protected max_count: int = -1;
@@ -2591,32 +2637,6 @@ regex_parser:  type = {
         }
     }
 
-    parse_until_new:(inout this, term: char) -> std::string = {
-        parse_ctx: parse_context = (regex);
-
-        cur_token: token_ptr = ();
-
-        while parse_ctx.valid() next _ = parse_ctx.next() {
-            if term == parse_ctx.current() { break; }
-
-            cur_token = nullptr;
-            if !cur_token && parse_ctx.valid() { cur_token = range_token::parse(parse_ctx); }
-            if !cur_token && parse_ctx.valid() { cur_token = special_range_token::parse(parse_ctx); }
-            if !cur_token && parse_ctx.valid() { cur_token = char_token::parse(parse_ctx); }
-
-            if cur_token && parse_ctx.valid() {
-                parse_ctx.add_token(cur_token);
-            } else {
-                error(parse_ctx.error_text);
-                return "";
-            }
-        }
-
-        gen_ctx: generation_context = ();
-        source += gen_ctx.run(parse_ctx.get_tokens());
-        return gen_ctx.get_entry_func();
-    }
-
     create_named_group_lookup: (this) -> std::string = {
         res: std::string = "get_named_group_index: (name) -> int = {\n";
 
@@ -2641,16 +2661,22 @@ regex_parser:  type = {
 
     parse:(inout this) -> std::string = {
         mod   := parser_expression_modifiers();
+        parse_ctx: parse_context = (regex);
+        if !parse_ctx.parse() {
+            error(parse_ctx.error_text);
+            return "Error";
+        }
 
         source += "{\n";
         source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
         source += "  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
 
-        start_name := parse_until_new('\0');
+        gen_ctx: generation_context = ();
+        source += gen_ctx.run(parse_ctx.get_tokens());
         source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
-        source += "    ctx.set_group_start(0, cur);";
-        source += "    r := (start_name)$()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
-        source += "    if r.matched { ctx.set_group_end(0, r.pos); }";
+        source += "    ctx.set_group_start(0, cur);\n";
+        source += "    r := (gen_ctx.get_entry_func())$()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
+        source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
@@ -2660,7 +2686,6 @@ regex_parser:  type = {
 
 
         std::cout << source << std::endl;
-        if has_error { return "Error"; }
 
         return source;
     }

From c889182dcf731e63a153ed16207a9f19295eda02 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 14:40:29 +0200
Subject: [PATCH 105/161] Added to_string output.

---
 include/cpp2regex.h | 15 ++++++++-------
 source/regex.h2     |  3 ++-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 8861ead206..cba7e775b6 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -208,7 +208,7 @@ class regex_branch_reset_state;
 #line 1790 "regex.h2"
 template class regex_parser;
 
-#line 2701 "regex.h2"
+#line 2702 "regex.h2"
 }
 }
 
@@ -1503,12 +1503,12 @@ template class regex_parser {
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2692 "regex.h2"
+#line 2693 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2701 "regex.h2"
+#line 2702 "regex.h2"
 }
 }
 
@@ -4128,7 +4128,7 @@ template [[nodiscard]] auto char_toke
         source += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
 
         generation_context gen_ctx {}; 
-        source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(std::move(parse_ctx)));
+        source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(parse_ctx));
         source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
         source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(std::move(gen_ctx))) + "()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
@@ -4136,17 +4136,18 @@ template [[nodiscard]] auto char_toke
         source += "    return r;\n";
         source += "  }\n";
 
-        source += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
+        auto string {CPP2_UFCS(to_string)((*cpp2::assert_not_null(CPP2_UFCS(get_tokens)(std::move(parse_ctx)))))}; 
+        source += ("  to_string: () -> std::string = { return \"" + cpp2::to_string(std::move(string)) + "\"; }\n");
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2688 "regex.h2"
+#line 2689 "regex.h2"
         std::cout << source << std::endl;
 
         return source; 
     }
 
-#line 2694 "regex.h2"
+#line 2695 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 4452d94f92..981814752c 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -2680,7 +2680,8 @@ regex_parser:  type = {
         source += "    return r;\n";
         source += "  }\n";
 
-        source += "  to_string: () \"TODO\";\n"; // (regex)$\";\n";
+        string := parse_ctx.get_tokens()*.to_string();
+        source += "  to_string: () -> std::string = { return \"(string)$\"; }\n";
         source += create_named_group_lookup();
         source += "}\n";
 

From 3abd68cf2485d374cbb8b97816378e1aec29c125 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 6 May 2024 16:28:17 +0200
Subject: [PATCH 106/161] Added group handling.

---
 include/cpp2regex.h | 1084 ++++++++++++++++++++++++++-----------------
 source/regex.h2     |  164 ++++++-
 2 files changed, 816 insertions(+), 432 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index cba7e775b6..7eaac34dd6 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -90,125 +90,135 @@ class no_reset;
     
 
 #line 361 "regex.h2"
+template class on_return;
+
+#line 376 "regex.h2"
 class regex_token;
 
-#line 379 "regex.h2"
+#line 400 "regex.h2"
+class parse_context_group_state;
+
+#line 432 "regex.h2"
 class parse_context;
     
 
-#line 536 "regex.h2"
+#line 613 "regex.h2"
 class generation_function_context;
     
 
-#line 552 "regex.h2"
+#line 629 "regex.h2"
 class generation_context;
 
-#line 682 "regex.h2"
+#line 771 "regex.h2"
 class regex_token_list;
     
 
-#line 718 "regex.h2"
+#line 807 "regex.h2"
 class regex_token_base;
     
 
-#line 728 "regex.h2"
+#line 817 "regex.h2"
 class char_token;
     
 
-#line 772 "regex.h2"
+#line 859 "regex.h2"
+class group_token;
+    
+
+#line 912 "regex.h2"
 class range_token;
     
 
-#line 910 "regex.h2"
+#line 1050 "regex.h2"
 template class range_token_matcher;
 
-#line 1035 "regex.h2"
+#line 1175 "regex.h2"
 class special_range_token;
     
 
-#line 1082 "regex.h2"
+#line 1222 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 1166 "regex.h2"
+#line 1306 "regex.h2"
 template class any_matcher_logic;
 
-#line 1185 "regex.h2"
+#line 1325 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1193 "regex.h2"
+#line 1333 "regex.h2"
 template class char_matcher_logic;
 
-#line 1221 "regex.h2"
+#line 1361 "regex.h2"
 template class class_matcher_logic;
 
-#line 1270 "regex.h2"
+#line 1410 "regex.h2"
 template class global_group_reset;
     
 
-#line 1282 "regex.h2"
+#line 1422 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1319 "regex.h2"
+#line 1459 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1343 "regex.h2"
+#line 1483 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1351 "regex.h2"
+#line 1491 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1384 "regex.h2"
+#line 1524 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1404 "regex.h2"
+#line 1544 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1421 "regex.h2"
+#line 1561 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1444 "regex.h2"
+#line 1584 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1456 "regex.h2"
+#line 1596 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1483 "regex.h2"
+#line 1623 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1534 "regex.h2"
+#line 1674 "regex.h2"
 template class group_name_list;
 
-#line 1546 "regex.h2"
+#line 1686 "regex.h2"
 class group_name_list_end;
     
 
-#line 1551 "regex.h2"
+#line 1691 "regex.h2"
 template class regular_expression;
 
-#line 1632 "regex.h2"
+#line 1772 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1721 "regex.h2"
+#line 1861 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1728 "regex.h2"
+#line 1868 "regex.h2"
 class regex_parser_group_state;
 
-#line 1763 "regex.h2"
+#line 1903 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1790 "regex.h2"
+#line 1930 "regex.h2"
 template class regex_parser;
 
-#line 2702 "regex.h2"
+#line 2842 "regex.h2"
 }
 }
 
@@ -553,28 +563,76 @@ class no_reset {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
 
+template class on_return {
+
+    private: Func func; 
+
+    public: explicit on_return(Func const& f);
+#line 365 "regex.h2"
+    public: auto operator=(Func const& f) -> on_return& ;
+
+#line 369 "regex.h2"
+    public: ~on_return() noexcept;
+    public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(on_return const&) -> void = delete;
+
+
+#line 372 "regex.h2"
+};
+
+template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
+
 class regex_token {
 
     public: std::string string_rep; 
 
     public: explicit regex_token(cpp2::in str);
 
-#line 370 "regex.h2"
+#line 384 "regex.h2"
+    public: explicit regex_token();
+
+#line 389 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
     public: [[nodiscard]] auto to_string() const& -> std::string;
+    public: auto set_string(cpp2::in s) & -> void;
     public: virtual ~regex_token() noexcept;
 
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 374 "regex.h2"
+#line 394 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
 using token_vec = std::vector;
 
+// State of the current group. See '()'
+class parse_context_group_state {
+
+    // Current list of matchers
+    public: token_vec cur_match_list {}; 
+
+    // List of alternate matcher lists. E.g. ab|cd|xy
+    public: token_vec alternate_match_lists {}; 
+
+    //modifiers : parse_context_modifier_state = (); // TODO:
+
+    public: auto next_alternative() & -> void;
+
+#line 416 "regex.h2"
+    public: auto swap(parse_context_group_state& t) & -> void;
+
+#line 422 "regex.h2"
+    public: [[nodiscard]] auto get_tokens() const& -> token_ptr;
+
+#line 427 "regex.h2"
+    public: auto add(cpp2::in token) & -> void;
+
+    public: [[nodiscard]] auto empty() const& -> bool;
+};
+
 class parse_context {
     private: std::string_view regex; 
 
@@ -582,61 +640,74 @@ class parse_context {
 
     public: std::string error_text {""}; 
 
-    private: token_vec cur_state {}; 
+    public: int group_count {1}; // Root group.
+
+    private: parse_context_group_state cur_group_state {}; 
 
+    public: [[nodiscard]] auto next_group() & -> int;
+
+#line 449 "regex.h2"
     public: explicit parse_context(cpp2::in r);
-#line 388 "regex.h2"
+#line 449 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 392 "regex.h2"
+#line 453 "regex.h2"
+    // State management functions
+    //
+    public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
+
+#line 462 "regex.h2"
+    public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
+
+#line 468 "regex.h2"
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 396 "regex.h2"
+#line 472 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 400 "regex.h2"
+#line 476 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 410 "regex.h2"
+#line 486 "regex.h2"
     public: [[nodiscard]] auto get_tokens() const& -> token_ptr;
 
-#line 414 "regex.h2"
+#line 490 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     public: [[nodiscard]] auto has_next() const& -> bool;
     public: [[nodiscard]] auto next() & -> bool;
 
-#line 425 "regex.h2"
+#line 501 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 432 "regex.h2"
+#line 508 "regex.h2"
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 472 "regex.h2"
+#line 548 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 493 "regex.h2"
+#line 569 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 507 "regex.h2"
+#line 583 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 531 "regex.h2"
+#line 608 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 534 "regex.h2"
+#line 611 "regex.h2"
 };
 
 class generation_function_context {
@@ -645,10 +716,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 547 "regex.h2"
+#line 624 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 550 "regex.h2"
+#line 627 "regex.h2"
 };
 
 class generation_context {
@@ -658,74 +729,81 @@ class generation_context {
     public: bool new_state {true}; 
     public: int matcher_func {0}; 
     public: int reset_func {0}; 
+    public: int temp_name {0}; 
     public: std::string entry_func {""}; 
 
     public: [[nodiscard]] auto match_parameters() const& -> std::string;
 
+    public: auto add(cpp2::in s) & -> void;
+
+#line 646 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 568 "regex.h2"
+#line 651 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 574 "regex.h2"
+#line 657 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 580 "regex.h2"
+#line 663 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 588 "regex.h2"
+#line 671 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 610 "regex.h2"
+#line 693 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 614 "regex.h2"
+#line 697 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 618 "regex.h2"
+#line 701 "regex.h2"
     public: auto start_func_named(cpp2::in name) & -> void;
 
-#line 627 "regex.h2"
+#line 710 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 633 "regex.h2"
+#line 716 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 645 "regex.h2"
+#line 728 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 649 "regex.h2"
+#line 732 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 653 "regex.h2"
+#line 736 "regex.h2"
     public: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 659 "regex.h2"
+#line 742 "regex.h2"
     public: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 665 "regex.h2"
+#line 748 "regex.h2"
+    public: [[nodiscard]] auto gen_temp() & -> std::string;
+
+#line 754 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 673 "regex.h2"
+#line 762 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 680 "regex.h2"
+#line 769 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 685 "regex.h2"
+#line 774 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 692 "regex.h2"
+#line 781 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 698 "regex.h2"
+#line 787 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 708 "regex.h2"
+#line 797 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -733,36 +811,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 715 "regex.h2"
+#line 804 "regex.h2"
 };
 
-#line 718 "regex.h2"
+#line 807 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 721 "regex.h2"
+#line 810 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 725 "regex.h2"
+#line 814 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 726 "regex.h2"
+#line 815 "regex.h2"
 };
 
 class char_token: public regex_token_base {
 
-#line 731 "regex.h2"
+#line 820 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 738 "regex.h2"
+#line 827 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 742 "regex.h2"
+#line 831 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -770,17 +848,40 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 747 "regex.h2"
+#line 836 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 770 "regex.h2"
+#line 859 "regex.h2"
+class group_token: public regex_token {
+
+#line 862 "regex.h2"
+    private: int number {-1}; 
+    private: token_ptr inner {nullptr}; 
+
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+
+#line 883 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+
+#line 900 "regex.h2"
+    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+    public: virtual ~group_token() noexcept;
+
+    public: group_token() = default;
+    public: group_token(group_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_token const&) -> void = delete;
+
+
+#line 908 "regex.h2"
+};
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 775 "regex.h2"
+#line 915 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -790,65 +891,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 852 "regex.h2"
+#line 992 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 863 "regex.h2"
+#line 1003 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 875 "regex.h2"
+#line 1015 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 899 "regex.h2"
+#line 1039 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 907 "regex.h2"
+#line 1047 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 908 "regex.h2"
+#line 1048 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 924 "regex.h2"
+#line 1064 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 929 "regex.h2"
+#line 1069 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 934 "regex.h2"
+#line 1074 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 940 "regex.h2"
+#line 1080 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 955 "regex.h2"
+#line 1095 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 983 "regex.h2"
+#line 1123 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 1007 "regex.h2"
+#line 1147 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1031 "regex.h2"
+#line 1171 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 1038 "regex.h2"
+#line 1178 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -857,10 +958,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1067 "regex.h2"
+#line 1207 "regex.h2"
 };
 
-#line 1070 "regex.h2"
+#line 1210 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -868,7 +969,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1078 "regex.h2"
+#line 1218 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -877,20 +978,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 1096 "regex.h2"
+#line 1236 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 1114 "regex.h2"
+#line 1254 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 1162 "regex.h2"
+#line 1302 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -899,14 +1000,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1179 "regex.h2"
+#line 1319 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 1181 "regex.h2"
+#line 1321 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -919,7 +1020,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1189 "regex.h2"
+#line 1329 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -928,27 +1029,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1214 "regex.h2"
+#line 1354 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1216 "regex.h2"
+#line 1356 "regex.h2"
 };
 
-#line 1219 "regex.h2"
+#line 1359 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1242 "regex.h2"
+#line 1382 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1254 "regex.h2"
+#line 1394 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -957,7 +1058,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1266 "regex.h2"
+#line 1406 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -965,14 +1066,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1276 "regex.h2"
+#line 1416 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1278 "regex.h2"
+#line 1418 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -980,23 +1081,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1290 "regex.h2"
+#line 1430 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1296 "regex.h2"
+#line 1436 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1317 "regex.h2"
+#line 1457 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1331 "regex.h2"
+#line 1471 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1005,7 +1106,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1341 "regex.h2"
+#line 1481 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -1016,7 +1117,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1347 "regex.h2"
+#line 1487 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -1024,14 +1125,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1378 "regex.h2"
+#line 1518 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1380 "regex.h2"
+#line 1520 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -1040,14 +1141,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1398 "regex.h2"
+#line 1538 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1400 "regex.h2"
+#line 1540 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -1056,14 +1157,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1415 "regex.h2"
+#line 1555 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1417 "regex.h2"
+#line 1557 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1072,14 +1173,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1438 "regex.h2"
+#line 1578 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1440 "regex.h2"
+#line 1580 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1088,14 +1189,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1449 "regex.h2"
+#line 1589 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1451 "regex.h2"
+#line 1591 "regex.h2"
 };
 
 // Named character classes
@@ -1107,7 +1208,7 @@ template                    void = delete;
 
 
-#line 1458 "regex.h2"
+#line 1598 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1117,7 +1218,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1468 "regex.h2"
+#line 1608 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1137,7 +1238,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1514 "regex.h2"
+#line 1654 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1145,10 +1246,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1522 "regex.h2"
+#line 1662 "regex.h2"
 };
 
-#line 1525 "regex.h2"
+#line 1665 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1166,7 +1267,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1544 "regex.h2"
+#line 1684 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1175,7 +1276,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1548 "regex.h2"
+#line 1688 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1191,7 +1292,7 @@ template matched_, context const& ctx_);
 
-#line 1566 "regex.h2"
+#line 1706 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1206,7 +1307,7 @@ template void = delete;
 
 
-#line 1582 "regex.h2"
+#line 1722 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1214,13 +1315,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1594 "regex.h2"
+#line 1734 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1616 "regex.h2"
+#line 1756 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1232,7 +1333,7 @@ template void = delete;
 
 
-#line 1629 "regex.h2"
+#line 1769 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1248,7 +1349,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1647 "regex.h2"
+#line 1787 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1263,7 +1364,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1663 "regex.h2"
+#line 1803 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1271,13 +1372,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1675 "regex.h2"
+#line 1815 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1697 "regex.h2"
+#line 1837 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1289,7 +1390,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1710 "regex.h2"
+#line 1850 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1320,15 +1421,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1744 "regex.h2"
+#line 1884 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1750 "regex.h2"
+#line 1890 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1759 "regex.h2"
+#line 1899 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1341,13 +1442,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1777 "regex.h2"
+#line 1917 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1782 "regex.h2"
+#line 1922 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1787 "regex.h2"
+#line 1927 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1371,144 +1472,144 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1814 "regex.h2"
+#line 1954 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1823 "regex.h2"
+#line 1963 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1827 "regex.h2"
+#line 1967 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1842 "regex.h2"
+#line 1982 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1848 "regex.h2"
+#line 1988 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 1889 "regex.h2"
+#line 2029 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 1901 "regex.h2"
+#line 2041 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 1907 "regex.h2"
+#line 2047 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 1914 "regex.h2"
+#line 2054 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 1923 "regex.h2"
+#line 2063 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 1931 "regex.h2"
+#line 2071 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 1941 "regex.h2"
+#line 2081 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 1965 "regex.h2"
+#line 2105 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 1981 "regex.h2"
+#line 2121 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 2001 "regex.h2"
+#line 2141 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2008 "regex.h2"
+#line 2148 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2020 "regex.h2"
+#line 2160 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2023 "regex.h2"
+#line 2163 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2033 "regex.h2"
+#line 2173 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2051 "regex.h2"
+#line 2191 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2061 "regex.h2"
+#line 2201 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2074 "regex.h2"
+#line 2214 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2110 "regex.h2"
+#line 2250 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2175 "regex.h2"
+#line 2315 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2186 "regex.h2"
+#line 2326 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2199 "regex.h2"
+#line 2339 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2207 "regex.h2"
+#line 2347 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2314 "regex.h2"
+#line 2454 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2481 "regex.h2"
+#line 2621 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2613 "regex.h2"
+#line 2753 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2620 "regex.h2"
+#line 2760 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2640 "regex.h2"
+#line 2780 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2662 "regex.h2"
+#line 2802 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2693 "regex.h2"
+#line 2833 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2702 "regex.h2"
+#line 2842 "regex.h2"
 }
 }
 
@@ -1874,68 +1975,148 @@ namespace regex {
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
 #line 365 "regex.h2"
+    template  on_return::on_return(Func const& f)
+        : func{ f }{
+
+#line 367 "regex.h2"
+    }
+#line 365 "regex.h2"
+    template  auto on_return::operator=(Func const& f) -> on_return& {
+        func = f;
+        return *this;
+
+#line 367 "regex.h2"
+    }
+
+#line 369 "regex.h2"
+    template  on_return::~on_return() noexcept{
+        std::move(*this).func();
+    }
+
+#line 374 "regex.h2"
+template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
+
+#line 380 "regex.h2"
     regex_token::regex_token(cpp2::in str)
         : string_rep{ str }{
 
-#line 367 "regex.h2"
+#line 382 "regex.h2"
+    }
+
+#line 384 "regex.h2"
+    regex_token::regex_token()
+        : string_rep{ "" }{
+
+#line 386 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
 
-#line 373 "regex.h2"
+#line 392 "regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
+#line 393 "regex.h2"
+    auto regex_token::set_string(cpp2::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}
 
-#line 388 "regex.h2"
+#line 410 "regex.h2"
+    auto parse_context_group_state::next_alternative() & -> void{
+        token_vec new_list {}; 
+        std::swap(new_list, cur_match_list);
+        static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(new_list))));
+    }
+
+#line 416 "regex.h2"
+    auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
+        std::swap(cur_match_list, t.cur_match_list);
+        std::swap(alternate_match_lists, t.alternate_match_lists);
+        //std::swap(modifiers, t.modifiers); // TODO:
+    }
+
+#line 422 "regex.h2"
+    [[nodiscard]] auto parse_context_group_state::get_tokens() const& -> token_ptr{
+        // TODO: Check alternatives
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
+    }
+
+#line 427 "regex.h2"
+    auto parse_context_group_state::add(cpp2::in token) & -> void { CPP2_UFCS(push_back)(cur_match_list, token);  }
+
+#line 429 "regex.h2"
+    [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
+
+#line 443 "regex.h2"
+    [[nodiscard]] auto parse_context::next_group() & -> int{
+        auto id {group_count}; 
+        group_count += 1;
+        return id; 
+    }
+
+#line 449 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 390 "regex.h2"
+#line 451 "regex.h2"
     }
-#line 388 "regex.h2"
+#line 449 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
         error_text = "";
-        cur_state = {};
+        group_count = 1;
+        cur_group_state = {};
         return *this;
 
-#line 390 "regex.h2"
+#line 451 "regex.h2"
     }
 
-#line 392 "regex.h2"
+#line 455 "regex.h2"
+    [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
+        parse_context_group_state old_state {}; 
+        CPP2_UFCS(swap)(old_state, cur_group_state);
+
+        return old_state; 
+    }
+
+#line 462 "regex.h2"
+    [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
+        auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
+        cur_group_state = old_state;
+        return inner; 
+    }
+
+#line 468 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
-        CPP2_UFCS(push_back)(cur_state, token);
+        CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 396 "regex.h2"
+#line 472 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
-        return !(CPP2_UFCS(empty)(cur_state)); 
+        return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 400 "regex.h2"
+#line 476 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
-            r = CPP2_UFCS(back)(cur_state);
-            CPP2_UFCS(pop_back)(cur_state);
+            r = CPP2_UFCS(back)(cur_group_state.cur_match_list);
+            CPP2_UFCS(pop_back)(cur_group_state.cur_match_list);
         }
 
         return r; 
     }
 
-#line 410 "regex.h2"
+#line 486 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() const& -> token_ptr{
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_state); 
+        return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 414 "regex.h2"
+#line 490 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 416 "regex.h2"
+#line 492 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 417 "regex.h2"
+#line 493 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
             pos += 1; return true; 
@@ -1944,16 +2125,16 @@ namespace regex {
         return false; 
     }
 
-#line 425 "regex.h2"
+#line 501 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 427 "regex.h2"
+#line 503 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 432 "regex.h2"
+#line 508 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -1993,7 +2174,7 @@ namespace regex {
         return cur; 
     }
 
-#line 472 "regex.h2"
+#line 548 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2015,14 +2196,14 @@ namespace regex {
         }
     }
 
-#line 493 "regex.h2"
+#line 569 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 494 "regex.h2"
+#line 570 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 495 "regex.h2"
+#line 571 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 497 "regex.h2"
+#line 573 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2033,12 +2214,12 @@ namespace regex {
         }
     }
 
-#line 507 "regex.h2"
+#line 583 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 508 "regex.h2"
+#line 584 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 510 "regex.h2"
+#line 586 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2046,6 +2227,7 @@ namespace regex {
             if (term == current()) {break; }
 
             cur_token = nullptr;
+            if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = char_token::parse((*this)); }
@@ -2060,10 +2242,10 @@ namespace regex {
         return true; 
     }
 
-#line 531 "regex.h2"
+#line 608 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 540 "regex.h2"
+#line 617 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2071,35 +2253,41 @@ namespace regex {
         }
     }
 
-#line 547 "regex.h2"
+#line 624 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 561 "regex.h2"
+#line 639 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 563 "regex.h2"
+#line 641 "regex.h2"
+    auto generation_context::add(cpp2::in s) & -> void{
+        auto cur {get_current()}; 
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
+    }
+
+#line 646 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 568 "regex.h2"
+#line 651 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
         start_func_named(next_func);
     }
 
-#line 574 "regex.h2"
+#line 657 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 580 "regex.h2"
+#line 663 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2108,7 +2296,7 @@ namespace regex {
         return name; 
     }
 
-#line 588 "regex.h2"
+#line 671 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset"; 
@@ -2118,29 +2306,29 @@ namespace regex {
         auto cur {new_context()}; 
 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
-        (*cpp2::assert_not_null(cur)).code += "(cur*.tabs)  operator(): (this, inout ctx) = {\n";
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "  operator(): (this, inout ctx) = {\n");
         for ( auto const& g : groups ) {
-            (*cpp2::assert_not_null(cur)).code += ("(cur*.tabs)  ctx.set_group_invalid(" + cpp2::to_string(g) + ");\n");
+            (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "  ctx.set_group_invalid(" + cpp2::to_string(g) + ");\n");
         }
-        (*cpp2::assert_not_null(cur)).code += "(cur*.tabs)  }\n";
-        (*cpp2::assert_not_null(cur)).code += "(cur*.tabs)}\n";
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "  }\n");
+        (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "}\n");
 
         finish_context();
 
         return name; 
     }
 
-#line 610 "regex.h2"
+#line 693 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 614 "regex.h2"
+#line 697 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 618 "regex.h2"
+#line 701 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2150,14 +2338,14 @@ namespace regex {
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 627 "regex.h2"
+#line 710 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return name; 
     }
 
-#line 633 "regex.h2"
+#line 716 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2170,31 +2358,38 @@ namespace regex {
         finish_context();
     }
 
-#line 645 "regex.h2"
+#line 728 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 649 "regex.h2"
+#line 732 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 653 "regex.h2"
+#line 736 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 659 "regex.h2"
+#line 742 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 665 "regex.h2"
+#line 748 "regex.h2"
+    [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
+        auto cur_id {temp_name}; 
+        temp_name += 1;
+        return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
+    }
+
+#line 754 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2203,7 +2398,7 @@ namespace regex {
         return cur; 
     }
 
-#line 673 "regex.h2"
+#line 762 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2212,22 +2407,22 @@ namespace regex {
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 687 "regex.h2"
+#line 776 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 690 "regex.h2"
+#line 779 "regex.h2"
     }
 
-#line 692 "regex.h2"
+#line 781 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 698 "regex.h2"
+#line 787 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2238,7 +2433,7 @@ namespace regex {
         return r; 
     }
 
-#line 708 "regex.h2"
+#line 797 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2249,32 +2444,32 @@ namespace regex {
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 721 "regex.h2"
+#line 810 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 723 "regex.h2"
+#line 812 "regex.h2"
     }
 
-#line 725 "regex.h2"
+#line 814 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 733 "regex.h2"
+#line 822 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 736 "regex.h2"
+#line 825 "regex.h2"
     }
 
-#line 738 "regex.h2"
+#line 827 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 742 "regex.h2"
+#line 831 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2283,7 +2478,7 @@ namespace regex {
 
     char_token::~char_token() noexcept{}
 
-#line 749 "regex.h2"
+#line 838 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2305,11 +2500,60 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 780 "regex.h2"
+#line 865 "regex.h2"
+    [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
+        if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
+
+        if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "No closing bracket for group."); }
+
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
+
+#line 873 "regex.h2"
+        (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
+
+        auto old_state {CPP2_UFCS(start_group)(ctx)}; 
+        if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
+        (*cpp2::assert_not_null(r)).inner = CPP2_UFCS(end_group)(ctx, std::move(old_state));
+        CPP2_UFCS(set_string)((*cpp2::assert_not_null(r)), ("(" + cpp2::to_string(CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner)))) + ")"));
+
+        return r; 
+    }
+
+#line 883 "regex.h2"
+    auto group_token::generate_code(generation_context& ctx) const -> void{
+        if (-1 != number) {
+            CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
+        }
+        CPP2_UFCS(generate_code)((*cpp2::assert_not_null(inner)), ctx);
+        if (-1 != number) {
+            CPP2_UFCS(add)(ctx, ("ctx.set_group_end(" + cpp2::to_string(number) + ", r.pos);"));
+            auto tmp_name {CPP2_UFCS(gen_temp)(ctx)}; 
+            CPP2_UFCS(add)(ctx, (cpp2::to_string(tmp_name) + " :=  cpp2::regex::make_on_return(:() = {"));
+            CPP2_UFCS(add)(ctx, "  if !r&$*.matched {");
+            CPP2_UFCS(add)(ctx, ("    ctx&$*.set_group_invalid(" + cpp2::to_string(number) + ");"));
+            CPP2_UFCS(add)(ctx, "  }");
+            CPP2_UFCS(add)(ctx, "});");
+            CPP2_UFCS(add)(ctx, ("_ = " + cpp2::to_string(std::move(tmp_name)) + ";"));// TODO: Guard object problem.
+        }
+    }
+
+#line 900 "regex.h2"
+    [[nodiscard]] auto group_token::get_groups() const -> std::vector{
+        if (-1 == number) {
+            return {  }; 
+        }
+        else {
+            return { number }; 
+        }
+    }
+
+    group_token::~group_token() noexcept{}
+
+#line 920 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 782 "regex.h2"
+#line 922 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -2353,7 +2597,7 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
-#line 826 "regex.h2"
+#line 966 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -2380,7 +2624,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 852 "regex.h2"
+#line 992 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -2392,7 +2636,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 863 "regex.h2"
+#line 1003 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -2405,7 +2649,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 875 "regex.h2"
+#line 1015 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2430,7 +2674,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 899 "regex.h2"
+#line 1039 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -2439,12 +2683,12 @@ template [[nodiscard]] auto char_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + "(), " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
     }
 
-#line 907 "regex.h2"
+#line 1047 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 912 "regex.h2"
+#line 1052 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -2457,26 +2701,26 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 924 "regex.h2"
+#line 1064 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 929 "regex.h2"
+#line 1069 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 934 "regex.h2"
+#line 1074 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 940 "regex.h2"
+#line 1080 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2492,7 +2736,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 955 "regex.h2"
+#line 1095 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -2521,7 +2765,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 983 "regex.h2"
+#line 1123 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2546,7 +2790,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1007 "regex.h2"
+#line 1147 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2572,7 +2816,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1038 "regex.h2"
+#line 1178 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -2595,7 +2839,7 @@ template [[nodiscard]] auto char_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1061 "regex.h2"
+#line 1201 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -2605,7 +2849,7 @@ template [[nodiscard]] auto char_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1084 "regex.h2"
+#line 1224 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2618,12 +2862,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 1096 "regex.h2"
+#line 1236 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 1097 "regex.h2"
+#line 1237 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 1099 "regex.h2"
+#line 1239 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2639,7 +2883,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1114 "regex.h2"
+#line 1254 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2655,7 +2899,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 1130 "regex.h2"
+#line 1270 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2667,7 +2911,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 1142 "regex.h2"
+#line 1282 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2689,7 +2933,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1168 "regex.h2"
+#line 1308 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2701,19 +2945,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1179 "regex.h2"
+#line 1319 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1180 "regex.h2"
+#line 1320 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 1186 "regex.h2"
+#line 1326 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1187 "regex.h2"
+#line 1327 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1188 "regex.h2"
+#line 1328 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1195 "regex.h2"
+#line 1335 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2733,12 +2977,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1214 "regex.h2"
+#line 1354 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1215 "regex.h2"
+#line 1355 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1223 "regex.h2"
+#line 1363 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -2758,7 +3002,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1242 "regex.h2"
+#line 1382 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2771,10 +3015,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1254 "regex.h2"
+#line 1394 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1256 "regex.h2"
+#line 1396 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -2786,18 +3030,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1271 "regex.h2"
+#line 1411 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1276 "regex.h2"
+#line 1416 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1277 "regex.h2"
+#line 1417 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1283 "regex.h2"
+#line 1423 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -2805,14 +3049,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1290 "regex.h2"
+#line 1430 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1296 "regex.h2"
+#line 1436 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -2835,7 +3079,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1320 "regex.h2"
+#line 1460 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -2847,10 +3091,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1331 "regex.h2"
+#line 1471 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1333 "regex.h2"
+#line 1473 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -2860,14 +3104,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1344 "regex.h2"
+#line 1484 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1345 "regex.h2"
+#line 1485 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1346 "regex.h2"
+#line 1486 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1352 "regex.h2"
+#line 1492 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2894,12 +3138,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1378 "regex.h2"
+#line 1518 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1379 "regex.h2"
+#line 1519 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1386 "regex.h2"
+#line 1526 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2912,12 +3156,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1398 "regex.h2"
+#line 1538 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1399 "regex.h2"
+#line 1539 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1406 "regex.h2"
+#line 1546 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -2927,12 +3171,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1415 "regex.h2"
+#line 1555 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1416 "regex.h2"
+#line 1556 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1423 "regex.h2"
+#line 1563 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -2948,21 +3192,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1438 "regex.h2"
+#line 1578 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1439 "regex.h2"
+#line 1579 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1446 "regex.h2"
+#line 1586 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1449 "regex.h2"
+#line 1589 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1450 "regex.h2"
+#line 1590 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1485 "regex.h2"
+#line 1625 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -2992,9 +3236,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1514 "regex.h2"
+#line 1654 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1515 "regex.h2"
+#line 1655 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -3003,7 +3247,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1536 "regex.h2"
+#line 1676 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -3013,34 +3257,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1547 "regex.h2"
+#line 1687 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1561 "regex.h2"
+#line 1701 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1564 "regex.h2"
+#line 1704 "regex.h2"
         }
 
-#line 1566 "regex.h2"
+#line 1706 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1567 "regex.h2"
+#line 1707 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1568 "regex.h2"
+#line 1708 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1569 "regex.h2"
+#line 1709 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1571 "regex.h2"
+#line 1711 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1572 "regex.h2"
+#line 1712 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1573 "regex.h2"
+#line 1713 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1575 "regex.h2"
+#line 1715 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -3049,13 +3293,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1584 "regex.h2"
+#line 1724 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1585 "regex.h2"
+#line 1725 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1586 "regex.h2"
+#line 1726 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1587 "regex.h2"
+#line 1727 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3063,13 +3307,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1594 "regex.h2"
+#line 1734 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1595 "regex.h2"
+#line 1735 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1596 "regex.h2"
+#line 1736 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1597 "regex.h2"
+#line 1737 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3089,10 +3333,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1616 "regex.h2"
+#line 1756 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1621 "regex.h2"
+#line 1761 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3102,31 +3346,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1642 "regex.h2"
+#line 1782 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1645 "regex.h2"
+#line 1785 "regex.h2"
         }
 
-#line 1647 "regex.h2"
+#line 1787 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1648 "regex.h2"
+#line 1788 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1649 "regex.h2"
+#line 1789 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1650 "regex.h2"
+#line 1790 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1652 "regex.h2"
+#line 1792 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1653 "regex.h2"
+#line 1793 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1654 "regex.h2"
+#line 1794 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1656 "regex.h2"
+#line 1796 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3135,13 +3379,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1665 "regex.h2"
+#line 1805 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1666 "regex.h2"
+#line 1806 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1667 "regex.h2"
+#line 1807 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1668 "regex.h2"
+#line 1808 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3149,13 +3393,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1675 "regex.h2"
+#line 1815 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1676 "regex.h2"
+#line 1816 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1677 "regex.h2"
+#line 1817 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1678 "regex.h2"
+#line 1818 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3175,10 +3419,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1697 "regex.h2"
+#line 1837 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1702 "regex.h2"
+#line 1842 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3188,24 +3432,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1738 "regex.h2"
+#line 1878 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1744 "regex.h2"
+#line 1884 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1750 "regex.h2"
+#line 1890 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1752 "regex.h2"
+#line 1892 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3213,10 +3457,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1759 "regex.h2"
+#line 1899 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1769 "regex.h2"
+#line 1909 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3225,29 +3469,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1777 "regex.h2"
+#line 1917 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1782 "regex.h2"
+#line 1922 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1808 "regex.h2"
+#line 1948 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1812 "regex.h2"
+#line 1952 "regex.h2"
     }
 
-#line 1816 "regex.h2"
+#line 1956 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3255,12 +3499,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1823 "regex.h2"
+#line 1963 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1830 "regex.h2"
+#line 1970 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3273,14 +3517,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1842 "regex.h2"
+#line 1982 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1851 "regex.h2"
+#line 1991 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3319,7 +3563,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 1889 "regex.h2"
+#line 2029 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3332,14 +3576,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1901 "regex.h2"
+#line 2041 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 1902 "regex.h2"
+#line 2042 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 1903 "regex.h2"
+#line 2043 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 1907 "regex.h2"
+#line 2047 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3347,7 +3591,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1914 "regex.h2"
+#line 2054 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3357,7 +3601,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1923 "regex.h2"
+#line 2063 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3366,7 +3610,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1931 "regex.h2"
+#line 2071 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3377,12 +3621,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1941 "regex.h2"
+#line 2081 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 1942 "regex.h2"
+#line 2082 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 1944 "regex.h2"
+#line 2084 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3404,14 +3648,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1965 "regex.h2"
+#line 2105 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 1966 "regex.h2"
+#line 2106 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 1967 "regex.h2"
+#line 2107 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 1969 "regex.h2"
+#line 2109 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3424,7 +3668,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1981 "regex.h2"
+#line 2121 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3445,13 +3689,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 2003 "regex.h2"
+#line 2143 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2008 "regex.h2"
+#line 2148 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3464,10 +3708,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2020 "regex.h2"
+#line 2160 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2026 "regex.h2"
+#line 2166 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3475,10 +3719,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2033 "regex.h2"
+#line 2173 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2035 "regex.h2"
+#line 2175 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3495,7 +3739,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2051 "regex.h2"
+#line 2191 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3506,7 +3750,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2063 "regex.h2"
+#line 2203 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3518,7 +3762,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2074 "regex.h2"
+#line 2214 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3555,7 +3799,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2110 "regex.h2"
+#line 2250 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3621,7 +3865,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2178 "regex.h2"
+#line 2318 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3630,7 +3874,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2186 "regex.h2"
+#line 2326 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3644,7 +3888,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2199 "regex.h2"
+#line 2339 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3653,7 +3897,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2207 "regex.h2"
+#line 2347 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -3761,7 +4005,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2314 "regex.h2"
+#line 2454 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -3929,7 +4173,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2481 "regex.h2"
+#line 2621 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -4062,7 +4306,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2613 "regex.h2"
+#line 2753 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4070,7 +4314,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2620 "regex.h2"
+#line 2760 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4091,7 +4335,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2640 "regex.h2"
+#line 2780 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4114,7 +4358,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2662 "regex.h2"
+#line 2802 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4124,7 +4368,7 @@ template [[nodiscard]] auto char_toke
         }
 
         source += "{\n";
-        source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
+        source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
         source += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
 
         generation_context gen_ctx {}; 
@@ -4141,13 +4385,13 @@ template [[nodiscard]] auto char_toke
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2689 "regex.h2"
+#line 2829 "regex.h2"
         std::cout << source << std::endl;
 
         return source; 
     }
 
-#line 2695 "regex.h2"
+#line 2835 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 981814752c..3ef8bf6eb4 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -358,6 +358,21 @@ no_reset: @struct type = {
     operator(): (this, inout _:) = {}
 }
 
+on_return:  type = {
+
+    func: Func;
+
+    operator=: (out this, f: Func) = {
+        func = f;
+    }
+
+    operator=: (move this) = {
+        func();
+    }
+}
+
+make_on_return:  (func: Func) on_return(func);
+
 regex_token: @polymorphic_base type = {
 
     public string_rep: std::string;
@@ -366,16 +381,54 @@ regex_token: @polymorphic_base type = {
         string_rep = str;
     }
 
+    operator=:(out this) = {
+        string_rep = "";
+    }
+
     //parse: (inout ctx: parse_context) -> token_ptr;
     generate_code: (virtual this, inout _: generation_context);
 
     get_groups: (virtual this) -> std::vector;
-    to_string: (this) -> std::string = { return string_rep; }
+    to_string: (this) -> std::string         = { return string_rep; }
+    set_string: (inout this, s: std::string) = { string_rep = s; }
 }
 
 token_ptr : type == std::shared_ptr;
 token_vec: type == std::vector;
 
+// State of the current group. See '()'
+parse_context_group_state: @struct type = {
+
+    // Current list of matchers
+    cur_match_list: token_vec = ();
+
+    // List of alternate matcher lists. E.g. ab|cd|xy
+    alternate_match_lists: token_vec = ();
+
+    //modifiers : parse_context_modifier_state = (); // TODO:
+
+    next_alternative: (inout this) = {
+        new_list: token_vec = ();
+        std::swap(new_list, cur_match_list);
+        _ = alternate_match_lists.insert(alternate_match_lists.end(), shared.new(new_list));
+    }
+
+    swap: (inout this, inout t: parse_context_group_state) = {
+        std::swap(cur_match_list, t.cur_match_list);
+        std::swap(alternate_match_lists, t.alternate_match_lists);
+        //std::swap(modifiers, t.modifiers); // TODO:
+    }
+
+    get_tokens: (this) -> token_ptr = {
+        // TODO: Check alternatives
+        return shared.new(cur_match_list);
+    }
+
+    add: (inout this, token: token_ptr) = cur_match_list.push_back(token);
+
+    empty: (this) -> bool = cur_match_list.empty();
+}
+
 parse_context: type = {
     regex: std::string_view;
 
@@ -383,32 +436,55 @@ parse_context: type = {
 
     public error_text: std::string = "";
 
-    cur_state: token_vec = ();
+    public group_count: int = 1; // Root group.
+
+    cur_group_state:        parse_context_group_state = ();
+
+    next_group: (inout this) -> int = {
+        id := group_count;
+        group_count += 1;
+        return id;
+    }
 
     operator=:(out this, r: std::string_view) = {
         regex = r;
     }
 
+    // State management functions
+    //
+    start_group: (inout this) -> parse_context_group_state = {
+        old_state: parse_context_group_state = ();
+        old_state.swap(cur_group_state);
+
+        return old_state;
+    }
+
+    end_group: (inout this, old_state: parse_context_group_state) -> token_ptr = {
+        inner := cur_group_state.get_tokens();
+        cur_group_state = old_state;
+        return inner;
+    }
+
     add_token: (inout this, token: token_ptr) = {
-        cur_state.push_back(token);
+        cur_group_state.add(token);
     }
 
     has_token: (this) -> bool = {
-        return !cur_state.empty();
+        return !cur_group_state.empty();
     }
 
     pop_token: (inout this) -> token_ptr = {
         r : token_ptr = nullptr;
         if has_token() {
-            r = cur_state.back();
-            cur_state.pop_back();
+            r = cur_group_state.cur_match_list.back();
+            cur_group_state.cur_match_list.pop_back();
         }
 
         return r;
     }
 
     get_tokens: (this) -> token_ptr = {
-        return shared.new(cur_state);
+        return cur_group_state.get_tokens();
     }
 
     current: (this) -> char = { return regex[pos]; }
@@ -514,6 +590,7 @@ parse_context: type = {
             if term == current() { break; }
 
             cur_token = nullptr;
+            if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
             if !cur_token && valid() { cur_token = char_token::parse(this); }
@@ -556,10 +633,16 @@ generation_context: @struct type = {
     new_state : bool = true;
     matcher_func: int         = 0;
     reset_func:   int         = 0;
+    temp_name:    int         = 0;
     entry_func:   std::string = "";
 
     match_parameters: (this) -> std::string = { return "r.pos, ctx, modifiers"; }
 
+    add: (inout this, s: std::string) = {
+        cur := get_current();
+        cur*.code += "(cur*.tabs)$(s)$\n";
+    }
+
     add_check: (inout this, check: std::string) = {
         cur := get_current();
         cur*.code += "(cur*.tabs)$if !cpp2::regex::(check)$ { r = ctx.fail(); return r; }\n";
@@ -594,12 +677,12 @@ generation_context: @struct type = {
         cur := new_context();
 
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
-        cur*.code += "(cur*.tabs)  operator(): (this, inout ctx) = {\n";
+        cur*.code += "(cur*.tabs)$  operator(): (this, inout ctx) = {\n";
         for groups do (g) {
-            cur*.code += "(cur*.tabs)  ctx.set_group_invalid((g)$);\n";
+            cur*.code += "(cur*.tabs)$  ctx.set_group_invalid((g)$);\n";
         }
-        cur*.code += "(cur*.tabs)  }\n";
-        cur*.code += "(cur*.tabs)}\n";
+        cur*.code += "(cur*.tabs)$  }\n";
+        cur*.code += "(cur*.tabs)$}\n";
 
         finish_context();
 
@@ -662,6 +745,12 @@ generation_context: @struct type = {
         return "reset_(cur_id)$";
     }
 
+    gen_temp: (inout this) -> std::string = {
+        cur_id := temp_name;
+        temp_name += 1;
+        return "tmp_(cur_id)$";
+    }
+
     new_context: (inout this) -> *generation_function_context = {
         gen_stack.push_back(generation_function_context());
         cur := get_current();
@@ -767,6 +856,57 @@ char_token_matcher:  (inout cur, inout ctx,
     }
 }
 
+group_token: @polymorphic_base type = {
+    this: regex_token = ();
+
+    number: int      = -1;
+    inner: token_ptr = nullptr;
+
+    parse: (inout ctx: parse_context) -> token_ptr = {
+        if ctx.current() != '(' { return nullptr; }
+
+        if !ctx.next() { return ctx.error("No closing bracket for group."); }
+
+        r := shared.new();
+
+
+        r*.number = ctx.next_group();
+
+        old_state: _ = ctx.start_group();
+        if !ctx.parse_until(')') { return nullptr; }
+        r*.inner = ctx.end_group(old_state);
+        r*.set_string("((r*.inner*.to_string())$)");
+
+        return r;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        if -1 != number {
+            ctx.add("ctx.set_group_start((number)$, r.pos);");
+        }
+        inner*.generate_code(ctx);
+        if -1 != number {
+            ctx.add("ctx.set_group_end((number)$, r.pos);");
+            tmp_name := ctx.gen_temp();
+            ctx.add("(tmp_name)$ :=  cpp2::regex::make_on_return(:() = {");
+            ctx.add("  if !r&$*.matched {");
+            ctx.add("    ctx&$*.set_group_invalid((number)$);");
+            ctx.add("  }");
+            ctx.add("});");
+            ctx.add("_ = (tmp_name)$;"); // TODO: Guard object problem.
+        }
+    }
+
+    get_groups: (override this) -> std::vector = {
+        if -1 == number {
+            return ();
+        }
+        else {
+            return (number);
+        }
+    }
+}
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 range_token: @polymorphic_base type = {
@@ -2668,7 +2808,7 @@ regex_parser:  type = {
         }
 
         source += "{\n";
-        source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
+        source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
         source += "  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
 
         gen_ctx: generation_context = ();

From c3e7435d7b24db75d92b265afc10c422c464c625 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 7 May 2024 11:00:12 +0200
Subject: [PATCH 107/161] Added logic for alternative.

---
 include/cpp2regex.h | 1108 +++++++++++++++++++++++++------------------
 source/regex.h2     |  149 +++++-
 2 files changed, 792 insertions(+), 465 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 7eaac34dd6..2d54e96f7e 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -98,127 +98,138 @@ class regex_token;
 #line 400 "regex.h2"
 class parse_context_group_state;
 
-#line 432 "regex.h2"
+#line 437 "regex.h2"
 class parse_context;
     
 
-#line 613 "regex.h2"
+#line 627 "regex.h2"
 class generation_function_context;
     
 
-#line 629 "regex.h2"
+#line 643 "regex.h2"
 class generation_context;
 
-#line 771 "regex.h2"
+#line 790 "regex.h2"
 class regex_token_list;
     
 
-#line 807 "regex.h2"
+#line 826 "regex.h2"
 class regex_token_base;
     
 
-#line 817 "regex.h2"
+#line 844 "regex.h2"
+class alternative_token;
+    
+
+#line 862 "regex.h2"
+class alternative_token_gen;
+    
+
+#line 911 "regex.h2"
+template class alternative_token_matcher;
+
+#line 936 "regex.h2"
 class char_token;
     
 
-#line 859 "regex.h2"
+#line 978 "regex.h2"
 class group_token;
     
 
-#line 912 "regex.h2"
+#line 1031 "regex.h2"
 class range_token;
     
 
-#line 1050 "regex.h2"
+#line 1169 "regex.h2"
 template class range_token_matcher;
 
-#line 1175 "regex.h2"
+#line 1294 "regex.h2"
 class special_range_token;
     
 
-#line 1222 "regex.h2"
+#line 1341 "regex.h2"
 template class alternative_matcher_logic;
 
-#line 1306 "regex.h2"
+#line 1425 "regex.h2"
 template class any_matcher_logic;
 
-#line 1325 "regex.h2"
+#line 1444 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1333 "regex.h2"
+#line 1452 "regex.h2"
 template class char_matcher_logic;
 
-#line 1361 "regex.h2"
+#line 1480 "regex.h2"
 template class class_matcher_logic;
 
-#line 1410 "regex.h2"
+#line 1529 "regex.h2"
 template class global_group_reset;
     
 
-#line 1422 "regex.h2"
+#line 1541 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1459 "regex.h2"
+#line 1578 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1483 "regex.h2"
+#line 1602 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1491 "regex.h2"
+#line 1610 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1524 "regex.h2"
+#line 1643 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1544 "regex.h2"
+#line 1663 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1561 "regex.h2"
+#line 1680 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1584 "regex.h2"
+#line 1703 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1596 "regex.h2"
+#line 1715 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1623 "regex.h2"
+#line 1742 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1674 "regex.h2"
+#line 1793 "regex.h2"
 template class group_name_list;
 
-#line 1686 "regex.h2"
+#line 1805 "regex.h2"
 class group_name_list_end;
     
 
-#line 1691 "regex.h2"
+#line 1810 "regex.h2"
 template class regular_expression;
 
-#line 1772 "regex.h2"
+#line 1891 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1861 "regex.h2"
+#line 1980 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1868 "regex.h2"
+#line 1987 "regex.h2"
 class regex_parser_group_state;
 
-#line 1903 "regex.h2"
+#line 2022 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1930 "regex.h2"
+#line 2049 "regex.h2"
 template class regex_parser;
 
-#line 2842 "regex.h2"
+#line 2963 "regex.h2"
 }
 }
 
@@ -625,9 +636,9 @@ class parse_context_group_state {
     public: auto swap(parse_context_group_state& t) & -> void;
 
 #line 422 "regex.h2"
-    public: [[nodiscard]] auto get_tokens() const& -> token_ptr;
+    public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 427 "regex.h2"
+#line 432 "regex.h2"
     public: auto add(cpp2::in token) & -> void;
 
     public: [[nodiscard]] auto empty() const& -> bool;
@@ -646,68 +657,71 @@ class parse_context {
 
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 449 "regex.h2"
+#line 454 "regex.h2"
     public: explicit parse_context(cpp2::in r);
-#line 449 "regex.h2"
+#line 454 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 453 "regex.h2"
+#line 458 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 462 "regex.h2"
+#line 467 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
 
-#line 468 "regex.h2"
+#line 473 "regex.h2"
+    public: auto next_alternative() & -> void;
+
+#line 478 "regex.h2"
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 472 "regex.h2"
+#line 482 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 476 "regex.h2"
+#line 486 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 486 "regex.h2"
-    public: [[nodiscard]] auto get_tokens() const& -> token_ptr;
+#line 496 "regex.h2"
+    public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 490 "regex.h2"
+#line 500 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     public: [[nodiscard]] auto has_next() const& -> bool;
     public: [[nodiscard]] auto next() & -> bool;
 
-#line 501 "regex.h2"
+#line 511 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 508 "regex.h2"
+#line 518 "regex.h2"
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 548 "regex.h2"
+#line 558 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 569 "regex.h2"
+#line 579 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 583 "regex.h2"
+#line 593 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 608 "regex.h2"
+#line 622 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 611 "regex.h2"
+#line 625 "regex.h2"
 };
 
 class generation_function_context {
@@ -716,94 +730,101 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 624 "regex.h2"
+#line 638 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 627 "regex.h2"
+#line 641 "regex.h2"
 };
 
 class generation_context {
 
-    public: std::vector gen_stack {1}; 
+    private: std::vector gen_stack {1}; 
 
-    public: bool new_state {true}; 
-    public: int matcher_func {0}; 
-    public: int reset_func {0}; 
-    public: int temp_name {0}; 
-    public: std::string entry_func {""}; 
+    private: bool new_state {true}; 
+    private: int matcher_func {0}; 
+    private: int reset_func {0}; 
+    private: int temp_name {0}; 
+    private: std::string entry_func {""}; 
 
     public: [[nodiscard]] auto match_parameters() const& -> std::string;
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 646 "regex.h2"
+#line 660 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 651 "regex.h2"
+#line 665 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 657 "regex.h2"
+#line 672 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 663 "regex.h2"
+#line 678 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 671 "regex.h2"
+#line 686 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 693 "regex.h2"
+#line 708 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 697 "regex.h2"
+#line 712 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 701 "regex.h2"
-    public: auto start_func_named(cpp2::in name) & -> void;
+#line 716 "regex.h2"
+    public: [[nodiscard]] auto next_func_name() & -> std::string;
+
+#line 720 "regex.h2"
+    protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 710 "regex.h2"
+#line 729 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 716 "regex.h2"
+#line 735 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 728 "regex.h2"
+#line 747 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 732 "regex.h2"
+#line 751 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 736 "regex.h2"
-    public: [[nodiscard]] auto gen_func_name() & -> std::string;
+#line 755 "regex.h2"
+    protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 742 "regex.h2"
-    public: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
+#line 761 "regex.h2"
+    protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 748 "regex.h2"
+#line 767 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 754 "regex.h2"
+#line 773 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 762 "regex.h2"
+#line 781 "regex.h2"
     public: auto finish_context() & -> void;
+    public: generation_context() = default;
+    public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(generation_context const&) -> void = delete;
 
-#line 769 "regex.h2"
+
+#line 788 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 774 "regex.h2"
+#line 793 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 781 "regex.h2"
+#line 800 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 787 "regex.h2"
+#line 806 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 797 "regex.h2"
+#line 816 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -811,36 +832,100 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 804 "regex.h2"
+#line 823 "regex.h2"
 };
 
-#line 807 "regex.h2"
+#line 826 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 810 "regex.h2"
+#line 829 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 814 "regex.h2"
+#line 833 "regex.h2"
+    public: explicit regex_token_base();
+
+#line 837 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 815 "regex.h2"
+#line 838 "regex.h2"
+};
+
+//  Regex syntax: |  Example: ab|ba
+//
+//  Non greedy implementation. First alternative that matches is chosen. 
+//
+class alternative_token: public regex_token_base {
+
+#line 847 "regex.h2"
+    public: explicit alternative_token();
+
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+
+#line 857 "regex.h2"
+    public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
+    public: virtual ~alternative_token() noexcept;
+
+    public: alternative_token(alternative_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(alternative_token const&) -> void = delete;
+
+
+#line 860 "regex.h2"
+};
+
+class alternative_token_gen: public regex_token {
+
+#line 866 "regex.h2"
+    private: token_vec alternatives; 
+
+    public: explicit alternative_token_gen(cpp2::in a);
+
+#line 873 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+
+#line 887 "regex.h2"
+    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+
+#line 898 "regex.h2"
+    public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
+    public: virtual ~alternative_token_gen() noexcept;
+
+    public: alternative_token_gen(alternative_token_gen const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(alternative_token_gen const&) -> void = delete;
+
+
+#line 909 "regex.h2"
 };
 
+template class alternative_token_matcher {
+
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
+
+#line 916 "regex.h2"
+    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
+    public: alternative_token_matcher() = default;
+    public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(alternative_token_matcher const&) -> void = delete;
+
+
+#line 933 "regex.h2"
+};
+
+#line 936 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 820 "regex.h2"
+#line 939 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 827 "regex.h2"
+#line 946 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 831 "regex.h2"
+#line 950 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -848,24 +933,24 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 836 "regex.h2"
+#line 955 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 859 "regex.h2"
+#line 978 "regex.h2"
 class group_token: public regex_token {
 
-#line 862 "regex.h2"
+#line 981 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 883 "regex.h2"
+#line 1002 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 900 "regex.h2"
+#line 1019 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -874,14 +959,14 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 908 "regex.h2"
+#line 1027 "regex.h2"
 };
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 915 "regex.h2"
+#line 1034 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -891,65 +976,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 992 "regex.h2"
+#line 1111 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1003 "regex.h2"
+#line 1122 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1015 "regex.h2"
+#line 1134 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1039 "regex.h2"
+#line 1158 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1047 "regex.h2"
+#line 1166 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 1048 "regex.h2"
+#line 1167 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1064 "regex.h2"
+#line 1183 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1069 "regex.h2"
+#line 1188 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1074 "regex.h2"
+#line 1193 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1080 "regex.h2"
+#line 1199 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 1095 "regex.h2"
+#line 1214 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 1123 "regex.h2"
+#line 1242 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 1147 "regex.h2"
+#line 1266 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1171 "regex.h2"
+#line 1290 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 1178 "regex.h2"
+#line 1297 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -958,10 +1043,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1207 "regex.h2"
+#line 1326 "regex.h2"
 };
 
-#line 1210 "regex.h2"
+#line 1329 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -969,7 +1054,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1218 "regex.h2"
+#line 1337 "regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen. 
@@ -978,20 +1063,20 @@ template class alternative
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
 
-#line 1236 "regex.h2"
+#line 1355 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
 
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
 
-#line 1254 "regex.h2"
+#line 1373 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
     public: alternative_matcher_logic() = default;
     public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_matcher_logic const&) -> void = delete;
 
 
-#line 1302 "regex.h2"
+#line 1421 "regex.h2"
 };
 
 //  Regex syntax: .
@@ -1000,14 +1085,14 @@ template class any_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1319 "regex.h2"
+#line 1438 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: any_matcher_logic() = default;
     public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_matcher_logic const&) -> void = delete;
 
-#line 1321 "regex.h2"
+#line 1440 "regex.h2"
 };
 
 // Regex syntax: none Example: -
@@ -1020,7 +1105,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1329 "regex.h2"
+#line 1448 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1029,27 +1114,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1354 "regex.h2"
+#line 1473 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1356 "regex.h2"
+#line 1475 "regex.h2"
 };
 
-#line 1359 "regex.h2"
+#line 1478 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1382 "regex.h2"
+#line 1501 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1394 "regex.h2"
+#line 1513 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1058,7 +1143,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1406 "regex.h2"
+#line 1525 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1066,14 +1151,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1416 "regex.h2"
+#line 1535 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1418 "regex.h2"
+#line 1537 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -1081,23 +1166,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1430 "regex.h2"
+#line 1549 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1436 "regex.h2"
+#line 1555 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1457 "regex.h2"
+#line 1576 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1471 "regex.h2"
+#line 1590 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1106,7 +1191,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1481 "regex.h2"
+#line 1600 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -1117,7 +1202,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1487 "regex.h2"
+#line 1606 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -1125,14 +1210,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1518 "regex.h2"
+#line 1637 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1520 "regex.h2"
+#line 1639 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -1141,14 +1226,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1538 "regex.h2"
+#line 1657 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1540 "regex.h2"
+#line 1659 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -1157,14 +1242,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1555 "regex.h2"
+#line 1674 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1557 "regex.h2"
+#line 1676 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1173,14 +1258,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1578 "regex.h2"
+#line 1697 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1580 "regex.h2"
+#line 1699 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1189,14 +1274,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1589 "regex.h2"
+#line 1708 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1591 "regex.h2"
+#line 1710 "regex.h2"
 };
 
 // Named character classes
@@ -1208,7 +1293,7 @@ template                    void = delete;
 
 
-#line 1598 "regex.h2"
+#line 1717 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1218,7 +1303,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1608 "regex.h2"
+#line 1727 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1238,7 +1323,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1654 "regex.h2"
+#line 1773 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1246,10 +1331,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1662 "regex.h2"
+#line 1781 "regex.h2"
 };
 
-#line 1665 "regex.h2"
+#line 1784 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1267,7 +1352,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1684 "regex.h2"
+#line 1803 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1276,7 +1361,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1688 "regex.h2"
+#line 1807 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1292,7 +1377,7 @@ template matched_, context const& ctx_);
 
-#line 1706 "regex.h2"
+#line 1825 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1307,7 +1392,7 @@ template void = delete;
 
 
-#line 1722 "regex.h2"
+#line 1841 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1315,13 +1400,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1734 "regex.h2"
+#line 1853 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1756 "regex.h2"
+#line 1875 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1333,7 +1418,7 @@ template void = delete;
 
 
-#line 1769 "regex.h2"
+#line 1888 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1349,7 +1434,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1787 "regex.h2"
+#line 1906 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1364,7 +1449,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1803 "regex.h2"
+#line 1922 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1372,13 +1457,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1815 "regex.h2"
+#line 1934 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1837 "regex.h2"
+#line 1956 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1390,7 +1475,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1850 "regex.h2"
+#line 1969 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1421,15 +1506,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1884 "regex.h2"
+#line 2003 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1890 "regex.h2"
+#line 2009 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1899 "regex.h2"
+#line 2018 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1442,13 +1527,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1917 "regex.h2"
+#line 2036 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1922 "regex.h2"
+#line 2041 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1927 "regex.h2"
+#line 2046 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1472,144 +1557,144 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1954 "regex.h2"
+#line 2073 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 1963 "regex.h2"
+#line 2082 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 1967 "regex.h2"
+#line 2086 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 1982 "regex.h2"
+#line 2101 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 1988 "regex.h2"
+#line 2107 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2029 "regex.h2"
+#line 2148 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2041 "regex.h2"
+#line 2160 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2047 "regex.h2"
+#line 2166 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2054 "regex.h2"
+#line 2173 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2063 "regex.h2"
+#line 2182 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2071 "regex.h2"
+#line 2190 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2081 "regex.h2"
+#line 2200 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 2105 "regex.h2"
+#line 2224 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 2121 "regex.h2"
+#line 2240 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 2141 "regex.h2"
+#line 2260 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2148 "regex.h2"
+#line 2267 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2160 "regex.h2"
+#line 2279 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2163 "regex.h2"
+#line 2282 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2173 "regex.h2"
+#line 2292 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2191 "regex.h2"
+#line 2310 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2201 "regex.h2"
+#line 2320 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2214 "regex.h2"
+#line 2333 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2250 "regex.h2"
+#line 2369 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2315 "regex.h2"
+#line 2434 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2326 "regex.h2"
+#line 2445 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2339 "regex.h2"
+#line 2458 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2347 "regex.h2"
+#line 2466 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2454 "regex.h2"
+#line 2573 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2621 "regex.h2"
+#line 2740 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2753 "regex.h2"
+#line 2872 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2760 "regex.h2"
+#line 2879 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2780 "regex.h2"
+#line 2899 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2802 "regex.h2"
+#line 2921 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2833 "regex.h2"
+#line 2954 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2842 "regex.h2"
+#line 2963 "regex.h2"
 }
 }
 
@@ -2034,31 +2119,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     }
 
 #line 422 "regex.h2"
-    [[nodiscard]] auto parse_context_group_state::get_tokens() const& -> token_ptr{
-        // TODO: Check alternatives
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
+    [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
+        if (CPP2_UFCS(empty)(alternate_match_lists)) {
+            return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
+        }
+        else {
+            next_alternative();
+            return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, alternate_match_lists); 
+        }
     }
 
-#line 427 "regex.h2"
+#line 432 "regex.h2"
     auto parse_context_group_state::add(cpp2::in token) & -> void { CPP2_UFCS(push_back)(cur_match_list, token);  }
 
-#line 429 "regex.h2"
+#line 434 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 443 "regex.h2"
+#line 448 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         auto id {group_count}; 
         group_count += 1;
         return id; 
     }
 
-#line 449 "regex.h2"
+#line 454 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 451 "regex.h2"
+#line 456 "regex.h2"
     }
-#line 449 "regex.h2"
+#line 454 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -2067,10 +2157,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         cur_group_state = {};
         return *this;
 
-#line 451 "regex.h2"
+#line 456 "regex.h2"
     }
 
-#line 455 "regex.h2"
+#line 460 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2078,24 +2168,30 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 462 "regex.h2"
+#line 467 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 468 "regex.h2"
+#line 473 "regex.h2"
+    auto parse_context::next_alternative() & -> void{
+        CPP2_UFCS(next_alternative)(cur_group_state);
+        //cur_branch_reset_state.next_alternative(); // TODO:
+    }
+
+#line 478 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 472 "regex.h2"
+#line 482 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 476 "regex.h2"
+#line 486 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2106,17 +2202,17 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 486 "regex.h2"
-    [[nodiscard]] auto parse_context::get_tokens() const& -> token_ptr{
+#line 496 "regex.h2"
+    [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 490 "regex.h2"
+#line 500 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 492 "regex.h2"
+#line 502 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 493 "regex.h2"
+#line 503 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
             pos += 1; return true; 
@@ -2125,20 +2221,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return false; 
     }
 
-#line 501 "regex.h2"
+#line 511 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 503 "regex.h2"
+#line 513 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 508 "regex.h2"
+#line 518 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
-            // TODO: 
+            // TODO:
             // if in_class {
             //     perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
             // }
@@ -2174,7 +2270,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 548 "regex.h2"
+#line 558 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2196,14 +2292,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 569 "regex.h2"
+#line 579 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 570 "regex.h2"
+#line 580 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 571 "regex.h2"
+#line 581 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 573 "regex.h2"
+#line 583 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2214,12 +2310,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 583 "regex.h2"
+#line 593 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 584 "regex.h2"
+#line 594 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 586 "regex.h2"
+#line 596 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2227,9 +2323,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if (term == current()) {break; }
 
             cur_token = nullptr;
+
+            if (!(cur_token) && valid()) {cur_token = alternative_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
+
+            // Everything else is matched as it is.
             if (!(cur_token) && valid()) {cur_token = char_token::parse((*this)); }
 
             if (cur_token && valid()) {
@@ -2242,10 +2342,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 608 "regex.h2"
+#line 622 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 617 "regex.h2"
+#line 631 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2253,41 +2353,42 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 624 "regex.h2"
+#line 638 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 639 "regex.h2"
+#line 653 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 641 "regex.h2"
+#line 655 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 646 "regex.h2"
+#line 660 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 651 "regex.h2"
+#line 665 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
-        start_func_named(next_func);
+        auto name {CPP2_UFCS(substr)(next_func, 0, CPP2_UFCS(ssize)(next_func) - 2)}; 
+        start_func_named(std::move(name));
     }
 
-#line 657 "regex.h2"
+#line 672 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 663 "regex.h2"
+#line 678 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2296,10 +2397,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 671 "regex.h2"
+#line 686 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
-            return "cpp2::regex::no_reset"; 
+            return "cpp2::regex::no_reset()"; 
         }
 
         auto name {gen_reset_func_name()}; 
@@ -2315,20 +2416,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
         finish_context();
 
-        return name; 
+        return std::move(name) + "()"; 
     }
 
-#line 693 "regex.h2"
+#line 708 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 697 "regex.h2"
+#line 712 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 701 "regex.h2"
+#line 716 "regex.h2"
+    [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
+        return gen_func_name() + "()"; 
+    }
+
+#line 720 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2338,14 +2444,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 710 "regex.h2"
+#line 729 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
-        return name; 
+        return std::move(name) + "()"; 
     }
 
-#line 716 "regex.h2"
+#line 735 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2358,38 +2464,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 728 "regex.h2"
+#line 747 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 732 "regex.h2"
+#line 751 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 736 "regex.h2"
+#line 755 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 742 "regex.h2"
+#line 761 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 748 "regex.h2"
+#line 767 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 754 "regex.h2"
+#line 773 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2398,7 +2504,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 762 "regex.h2"
+#line 781 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2407,22 +2513,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 776 "regex.h2"
+#line 795 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 779 "regex.h2"
+#line 798 "regex.h2"
     }
 
-#line 781 "regex.h2"
+#line 800 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 787 "regex.h2"
+#line 806 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2433,7 +2539,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 797 "regex.h2"
+#line 816 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2444,32 +2550,132 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 810 "regex.h2"
+#line 829 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 812 "regex.h2"
+#line 831 "regex.h2"
     }
 
-#line 814 "regex.h2"
+#line 833 "regex.h2"
+    regex_token_base::regex_token_base()
+        : regex_token{  }{
+
+#line 835 "regex.h2"
+    }
+
+#line 837 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 822 "regex.h2"
+#line 847 "regex.h2"
+    alternative_token::alternative_token()
+                            : regex_token_base{  }{}
+
+#line 849 "regex.h2"
+    [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
+        if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
+
+        if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, "Alternative with no content."); }
+        CPP2_UFCS(next_alternative)(ctx);
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
+    }
+
+#line 857 "regex.h2"
+    auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
+        // No code gen here. alternative_token_gen is created in the parse_context
+    }
+
+    alternative_token::~alternative_token() noexcept{}
+
+#line 868 "regex.h2"
+    alternative_token_gen::alternative_token_gen(cpp2::in a)
+        : regex_token{ gen_string(a) }
+        , alternatives{ a }{
+
+#line 871 "regex.h2"
+    }
+
+#line 873 "regex.h2"
+    auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
+        std::string functions {""}; 
+
+        int i {0}; 
+        for( ; cpp2::cmp_less(i,CPP2_UFCS(ssize)(alternatives)); i += 1 ) {
+            functions += ", " + CPP2_UFCS(generate_func)(ctx, CPP2_ASSERT_IN_BOUNDS(alternatives, i));
+            functions += ", " + CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(CPP2_ASSERT_IN_BOUNDS(alternatives, i)))));
+        }
+
+        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
+
+        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
+    }
+
+#line 887 "regex.h2"
+    [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
+        std::vector r {}; 
+
+        for ( auto const& cur : alternatives ) {
+            auto t {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(cur)))}; 
+            static_cast(CPP2_UFCS(insert)(r, CPP2_UFCS(end)(r), CPP2_UFCS(begin)(t), CPP2_UFCS(end)(std::move(t))));
+        }
+
+        return r; 
+    }
+
+#line 898 "regex.h2"
+    [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
+        std::string r {""}; 
+        std::string sep {""}; 
+
+        for ( auto const& cur : a ) {
+            r += sep + CPP2_UFCS(to_string)((*cpp2::assert_not_null(cur)));
+            sep = "|";
+        }
+
+        return r; 
+    }
+
+    alternative_token_gen::~alternative_token_gen() noexcept{}
+
+#line 913 "regex.h2"
+    template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
+        return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
+    }
+#line 916 "regex.h2"
+    template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
+        auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
+            return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
+        }}; 
+        auto r {cur_func(cur, ctx, modifiers, std::move(inner_call))}; 
+        if (r.matched) {
+            return r; 
+        }else {
+            cur_reset(ctx);
+
+            if constexpr (0 != sizeof...(Other)) {
+                return match_first(cur, ctx, modifiers, end_func, tail, other...); 
+            }else {
+                return CPP2_UFCS(fail)(ctx); 
+            }
+        }
+    }
+
+#line 941 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 825 "regex.h2"
+#line 944 "regex.h2"
     }
 
-#line 827 "regex.h2"
+#line 946 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 831 "regex.h2"
+#line 950 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2478,7 +2684,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     char_token::~char_token() noexcept{}
 
-#line 838 "regex.h2"
+#line 957 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2500,7 +2706,7 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 865 "regex.h2"
+#line 984 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -2508,7 +2714,7 @@ template [[nodiscard]] auto char_toke
 
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
 
-#line 873 "regex.h2"
+#line 992 "regex.h2"
         (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
 
         auto old_state {CPP2_UFCS(start_group)(ctx)}; 
@@ -2519,7 +2725,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 883 "regex.h2"
+#line 1002 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -2537,7 +2743,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 900 "regex.h2"
+#line 1019 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         if (-1 == number) {
             return {  }; 
@@ -2549,11 +2755,11 @@ template [[nodiscard]] auto char_toke
 
     group_token::~group_token() noexcept{}
 
-#line 920 "regex.h2"
+#line 1039 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 922 "regex.h2"
+#line 1041 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -2597,7 +2803,7 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
-#line 966 "regex.h2"
+#line 1085 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -2624,7 +2830,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 992 "regex.h2"
+#line 1111 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -2636,7 +2842,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1003 "regex.h2"
+#line 1122 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -2649,7 +2855,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1015 "regex.h2"
+#line 1134 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2674,21 +2880,21 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1039 "regex.h2"
+#line 1158 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
 
-        auto next_name {CPP2_UFCS(gen_func_name)(ctx)}; 
-        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + "(), " + cpp2::to_string(std::move(reset_name)) + "(), other, " + cpp2::to_string(next_name) + "())"));
+        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
+        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1047 "regex.h2"
+#line 1166 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 1052 "regex.h2"
+#line 1171 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -2701,26 +2907,26 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1064 "regex.h2"
+#line 1183 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1069 "regex.h2"
+#line 1188 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1074 "regex.h2"
+#line 1193 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1080 "regex.h2"
+#line 1199 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2736,7 +2942,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 1095 "regex.h2"
+#line 1214 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -2765,7 +2971,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1123 "regex.h2"
+#line 1242 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2790,7 +2996,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1147 "regex.h2"
+#line 1266 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2816,7 +3022,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1178 "regex.h2"
+#line 1297 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -2839,7 +3045,7 @@ template [[nodiscard]] auto char_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1201 "regex.h2"
+#line 1320 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -2849,7 +3055,7 @@ template [[nodiscard]] auto char_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1224 "regex.h2"
+#line 1343 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
         if constexpr (greedy_alternative) {
             auto max_overall_length {0}; 
@@ -2862,12 +3068,12 @@ template [[nodiscard]] auto char_toke
             return match_first(cur, ctx, modifiers, end_func, tail); 
         }
     }
-#line 1236 "regex.h2"
+#line 1355 "regex.h2"
     template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 1237 "regex.h2"
+#line 1356 "regex.h2"
     template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
 
-#line 1239 "regex.h2"
+#line 1358 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
         if (r.matched) {
@@ -2883,7 +3089,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1254 "regex.h2"
+#line 1373 "regex.h2"
     template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
         auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
 
@@ -2899,7 +3105,7 @@ template [[nodiscard]] auto char_toke
         auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
         max_overall_length = std::max(max_overall_length, my_overall_length);
 
-#line 1270 "regex.h2"
+#line 1389 "regex.h2"
         // Check if someone other has something larker
         auto o {CPP2_UFCS(fail)(ctx)}; 
         if constexpr (0 != sizeof...(Next)) {
@@ -2911,7 +3117,7 @@ template [[nodiscard]] auto char_toke
             max_current_length = std::max(max_current_length, my_current_length);
         }
 
-#line 1282 "regex.h2"
+#line 1401 "regex.h2"
         if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
             // We are the longest. Check now if we are also the longest in this alternative.
             if (std::move(my_current_length) == max_current_length) {
@@ -2933,7 +3139,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1308 "regex.h2"
+#line 1427 "regex.h2"
     template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur != ctx.end && 
           (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
@@ -2945,19 +3151,19 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1319 "regex.h2"
+#line 1438 "regex.h2"
     template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1320 "regex.h2"
+#line 1439 "regex.h2"
     template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
 
-#line 1326 "regex.h2"
+#line 1445 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1327 "regex.h2"
+#line 1446 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1328 "regex.h2"
+#line 1447 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1335 "regex.h2"
+#line 1454 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2977,12 +3183,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1354 "regex.h2"
+#line 1473 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1355 "regex.h2"
+#line 1474 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1363 "regex.h2"
+#line 1482 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3002,7 +3208,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1382 "regex.h2"
+#line 1501 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3015,10 +3221,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1394 "regex.h2"
+#line 1513 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1396 "regex.h2"
+#line 1515 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -3030,18 +3236,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1411 "regex.h2"
+#line 1530 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1416 "regex.h2"
+#line 1535 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1417 "regex.h2"
+#line 1536 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1423 "regex.h2"
+#line 1542 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -3049,14 +3255,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1430 "regex.h2"
+#line 1549 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1436 "regex.h2"
+#line 1555 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -3079,7 +3285,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1460 "regex.h2"
+#line 1579 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -3091,10 +3297,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1471 "regex.h2"
+#line 1590 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1473 "regex.h2"
+#line 1592 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -3104,14 +3310,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1484 "regex.h2"
+#line 1603 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1485 "regex.h2"
+#line 1604 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1486 "regex.h2"
+#line 1605 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1492 "regex.h2"
+#line 1611 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3138,12 +3344,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1518 "regex.h2"
+#line 1637 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1519 "regex.h2"
+#line 1638 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1526 "regex.h2"
+#line 1645 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -3156,12 +3362,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1538 "regex.h2"
+#line 1657 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1539 "regex.h2"
+#line 1658 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1546 "regex.h2"
+#line 1665 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -3171,12 +3377,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1555 "regex.h2"
+#line 1674 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1556 "regex.h2"
+#line 1675 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1563 "regex.h2"
+#line 1682 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -3192,21 +3398,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1578 "regex.h2"
+#line 1697 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1579 "regex.h2"
+#line 1698 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1586 "regex.h2"
+#line 1705 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1589 "regex.h2"
+#line 1708 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1590 "regex.h2"
+#line 1709 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1625 "regex.h2"
+#line 1744 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -3236,9 +3442,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1654 "regex.h2"
+#line 1773 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1655 "regex.h2"
+#line 1774 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -3247,7 +3453,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1676 "regex.h2"
+#line 1795 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -3257,34 +3463,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1687 "regex.h2"
+#line 1806 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1701 "regex.h2"
+#line 1820 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1704 "regex.h2"
+#line 1823 "regex.h2"
         }
 
-#line 1706 "regex.h2"
+#line 1825 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1707 "regex.h2"
+#line 1826 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1708 "regex.h2"
+#line 1827 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1709 "regex.h2"
+#line 1828 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1711 "regex.h2"
+#line 1830 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1712 "regex.h2"
+#line 1831 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1713 "regex.h2"
+#line 1832 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1715 "regex.h2"
+#line 1834 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -3293,13 +3499,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1724 "regex.h2"
+#line 1843 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1725 "regex.h2"
+#line 1844 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1726 "regex.h2"
+#line 1845 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1727 "regex.h2"
+#line 1846 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3307,13 +3513,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1734 "regex.h2"
+#line 1853 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1735 "regex.h2"
+#line 1854 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1736 "regex.h2"
+#line 1855 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1737 "regex.h2"
+#line 1856 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3333,10 +3539,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1756 "regex.h2"
+#line 1875 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1761 "regex.h2"
+#line 1880 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3346,31 +3552,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1782 "regex.h2"
+#line 1901 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1785 "regex.h2"
+#line 1904 "regex.h2"
         }
 
-#line 1787 "regex.h2"
+#line 1906 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1788 "regex.h2"
+#line 1907 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1789 "regex.h2"
+#line 1908 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1790 "regex.h2"
+#line 1909 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1792 "regex.h2"
+#line 1911 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1793 "regex.h2"
+#line 1912 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1794 "regex.h2"
+#line 1913 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1796 "regex.h2"
+#line 1915 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3379,13 +3585,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1805 "regex.h2"
+#line 1924 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1806 "regex.h2"
+#line 1925 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1807 "regex.h2"
+#line 1926 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1808 "regex.h2"
+#line 1927 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3393,13 +3599,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1815 "regex.h2"
+#line 1934 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1816 "regex.h2"
+#line 1935 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1817 "regex.h2"
+#line 1936 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1818 "regex.h2"
+#line 1937 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3419,10 +3625,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1837 "regex.h2"
+#line 1956 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1842 "regex.h2"
+#line 1961 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3432,24 +3638,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1878 "regex.h2"
+#line 1997 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1884 "regex.h2"
+#line 2003 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1890 "regex.h2"
+#line 2009 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1892 "regex.h2"
+#line 2011 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3457,10 +3663,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1899 "regex.h2"
+#line 2018 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1909 "regex.h2"
+#line 2028 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3469,29 +3675,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1917 "regex.h2"
+#line 2036 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1922 "regex.h2"
+#line 2041 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1948 "regex.h2"
+#line 2067 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1952 "regex.h2"
+#line 2071 "regex.h2"
     }
 
-#line 1956 "regex.h2"
+#line 2075 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3499,12 +3705,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1963 "regex.h2"
+#line 2082 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 1970 "regex.h2"
+#line 2089 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3517,14 +3723,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 1982 "regex.h2"
+#line 2101 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 1991 "regex.h2"
+#line 2110 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3563,7 +3769,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 2029 "regex.h2"
+#line 2148 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3576,14 +3782,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2041 "regex.h2"
+#line 2160 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2042 "regex.h2"
+#line 2161 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2043 "regex.h2"
+#line 2162 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2047 "regex.h2"
+#line 2166 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3591,7 +3797,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2054 "regex.h2"
+#line 2173 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3601,7 +3807,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2063 "regex.h2"
+#line 2182 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3610,7 +3816,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2071 "regex.h2"
+#line 2190 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3621,12 +3827,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2081 "regex.h2"
+#line 2200 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2082 "regex.h2"
+#line 2201 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2084 "regex.h2"
+#line 2203 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3648,14 +3854,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2105 "regex.h2"
+#line 2224 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 2106 "regex.h2"
+#line 2225 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 2107 "regex.h2"
+#line 2226 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 2109 "regex.h2"
+#line 2228 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3668,7 +3874,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2121 "regex.h2"
+#line 2240 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3689,13 +3895,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 2143 "regex.h2"
+#line 2262 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2148 "regex.h2"
+#line 2267 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3708,10 +3914,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2160 "regex.h2"
+#line 2279 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2166 "regex.h2"
+#line 2285 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3719,10 +3925,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2173 "regex.h2"
+#line 2292 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2175 "regex.h2"
+#line 2294 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3739,7 +3945,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2191 "regex.h2"
+#line 2310 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3750,7 +3956,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2203 "regex.h2"
+#line 2322 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3762,7 +3968,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2214 "regex.h2"
+#line 2333 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3799,7 +4005,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2250 "regex.h2"
+#line 2369 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3865,7 +4071,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2318 "regex.h2"
+#line 2437 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3874,7 +4080,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2326 "regex.h2"
+#line 2445 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -3888,7 +4094,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2339 "regex.h2"
+#line 2458 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -3897,7 +4103,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2347 "regex.h2"
+#line 2466 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -4005,7 +4211,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2454 "regex.h2"
+#line 2573 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -4173,7 +4379,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2621 "regex.h2"
+#line 2740 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -4306,7 +4512,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2753 "regex.h2"
+#line 2872 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4314,7 +4520,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2760 "regex.h2"
+#line 2879 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4335,7 +4541,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2780 "regex.h2"
+#line 2899 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4358,7 +4564,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2802 "regex.h2"
+#line 2921 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4375,23 +4581,25 @@ template [[nodiscard]] auto char_toke
         source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(parse_ctx));
         source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
-        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(std::move(gen_ctx))) + "()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
+        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(std::move(gen_ctx))) + "(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
         source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
-        auto string {CPP2_UFCS(to_string)((*cpp2::assert_not_null(CPP2_UFCS(get_tokens)(std::move(parse_ctx)))))}; 
+        auto string {CPP2_UFCS(to_string)((*cpp2::assert_not_null(CPP2_UFCS(get_tokens)(parse_ctx))))}; 
         source += ("  to_string: () -> std::string = { return \"" + cpp2::to_string(std::move(string)) + "\"; }\n");
         source += create_named_group_lookup();
         source += "}\n";
 
-#line 2829 "regex.h2"
+        static_cast(std::move(parse_ctx));
+
+#line 2950 "regex.h2"
         std::cout << source << std::endl;
 
         return source; 
     }
 
-#line 2835 "regex.h2"
+#line 2956 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 3ef8bf6eb4..41e2700782 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -419,9 +419,14 @@ parse_context_group_state: @struct type = {
         //std::swap(modifiers, t.modifiers); // TODO:
     }
 
-    get_tokens: (this) -> token_ptr = {
-        // TODO: Check alternatives
-        return shared.new(cur_match_list);
+    get_tokens: (inout this) -> token_ptr = {
+        if alternate_match_lists.empty() {
+            return shared.new(cur_match_list);
+        }
+        else {
+            next_alternative();
+            return shared.new(alternate_match_lists);
+        }
     }
 
     add: (inout this, token: token_ptr) = cur_match_list.push_back(token);
@@ -465,6 +470,11 @@ parse_context: type = {
         return inner;
     }
 
+    next_alternative: (inout this) = {
+        cur_group_state.next_alternative();
+        //cur_branch_reset_state.next_alternative(); // TODO:
+    }
+
     add_token: (inout this, token: token_ptr) = {
         cur_group_state.add(token);
     }
@@ -483,7 +493,7 @@ parse_context: type = {
         return r;
     }
 
-    get_tokens: (this) -> token_ptr = {
+    get_tokens: (inout this) -> token_ptr = {
         return cur_group_state.get_tokens();
     }
 
@@ -590,9 +600,13 @@ parse_context: type = {
             if term == current() { break; }
 
             cur_token = nullptr;
+
+            if !cur_token && valid() { cur_token = alternative_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
+
+            // Everything else is matched as it is.
             if !cur_token && valid() { cur_token = char_token::parse(this); }
 
             if cur_token && valid() {
@@ -626,7 +640,7 @@ generation_function_context: @struct type = {
     }
 }
 
-generation_context: @struct type = {
+generation_context: type = {
 
     gen_stack: std::vector = (1);
 
@@ -651,7 +665,8 @@ generation_context: @struct type = {
     add_statefull: (inout this, next_func: std::string, c: std::string) = {
         end_func_statefull(c);
 
-        start_func_named(next_func);
+        name := next_func.substr(0, next_func.ssize() - 2);
+        start_func_named(name);
     }
 
     run: (inout this, token: token_ptr) -> std::string = {
@@ -670,7 +685,7 @@ generation_context: @struct type = {
 
     generate_reset: (inout this, groups: std::vector) -> std::string = {
         if groups.empty() {
-            return "cpp2::regex::no_reset";
+            return "cpp2::regex::no_reset()";
         }
 
         name := gen_reset_func_name();
@@ -686,7 +701,7 @@ generation_context: @struct type = {
 
         finish_context();
 
-        return name;
+        return name + "()";
     }
 
 
@@ -698,7 +713,11 @@ generation_context: @struct type = {
         return gen_stack[0]&;
     }
 
-    start_func_named: (inout this, name: std::string) = {
+    next_func_name: (inout this) -> std::string = {
+        return gen_func_name() + "()";
+    }
+
+    protected start_func_named: (inout this, name: std::string) = {
         cur := new_context();
 
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
@@ -710,7 +729,7 @@ generation_context: @struct type = {
     start_func: (inout this) -> std::string = {
         name := gen_func_name();
         start_func_named(name);
-        return name;
+        return name + "()";
     }
 
     end_func_statefull: (inout this, s: std::string) = {
@@ -733,13 +752,13 @@ generation_context: @struct type = {
         return entry_func;
     }
 
-    gen_func_name: (inout this) -> std::string = {
+    protected gen_func_name: (inout this) -> std::string = {
         cur_id : = matcher_func;
         matcher_func += 1;
         return "func_(cur_id)$";
     }
 
-    gen_reset_func_name: (inout this) -> std::string = {
+    protected gen_reset_func_name: (inout this) -> std::string = {
         cur_id : = reset_func;
         reset_func += 1;
         return "reset_(cur_id)$";
@@ -811,9 +830,108 @@ regex_token_base: @polymorphic_base type = {
         regex_token = (str);
     }
 
+    operator=:(out this) = {
+        regex_token = ();
+    }
+
     get_groups: (override this) -> std::vector = { return (); }
 }
 
+//  Regex syntax: |  Example: ab|ba
+//
+//  Non greedy implementation. First alternative that matches is chosen.
+//
+alternative_token: @polymorphic_base type = {
+    this: regex_token_base = ();
+
+    operator=:(out this) = {}
+
+    parse: (inout ctx: parse_context) -> token_ptr = {
+        if ctx.current() != '|' { return nullptr; }
+
+        if !ctx.has_token() { return ctx.error("Alternative with no content."); }
+        ctx.next_alternative();
+        return shared.new();
+    }
+
+    generate_code: (override this, inout _: generation_context) = {
+        // No code gen here. alternative_token_gen is created in the parse_context
+    }
+}
+
+alternative_token_gen: @polymorphic_base type = {
+    this: regex_token;
+
+
+    alternatives: token_vec;
+
+    operator=: (out this, a: token_vec) = {
+        regex_token = gen_string(a);
+        alternatives = a;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        functions: std::string = "";
+
+        i: int = 0;
+        while i < alternatives.ssize() next i += 1 {
+            functions += ", " + ctx.generate_func(alternatives[i]);
+            functions += ", " + ctx.generate_reset(alternatives[i]*.get_groups());
+        }
+
+        next_name := ctx.next_func_name();
+
+        ctx.add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match((ctx.match_parameters())$, other, (next_name)$ (functions)$)");
+    }
+
+    get_groups: (override this) -> std::vector = {
+        r: std::vector = ();
+
+        for alternatives do (cur) {
+            t := cur*.get_groups();
+            _ = r.insert(r.end(), t.begin(), t.end());
+        }
+
+        return r;
+    }
+
+    gen_string: (a: token_vec) -> std::string = {
+        r: std::string = "";
+        sep: std::string = "";
+
+        for a do (cur) {
+            r += sep + cur*.to_string();
+            sep = "|";
+        }
+
+        return r;
+    }
+}
+
+alternative_token_matcher:  type = {
+
+    match: (cur, inout ctx, modifiers, end_func, tail, functions ...) -> _ = {
+        return match_first(cur, ctx, modifiers, end_func, tail, functions...);
+    }
+    private match_first:  (cur, inout ctx, modifiers, end_func, tail, cur_func, cur_reset, other ...: Other) -> _ = {
+        inner_call := :(tail_cur, inout tail_ctx, tail_modifiers) -> _ == {
+            return (tail)$(tail_cur, tail_ctx, tail_modifiers, (end_func)$);
+        };
+        r := cur_func(cur, ctx, modifiers, inner_call);
+        if r.matched {
+            return r;
+        } else {
+            cur_reset(ctx);
+
+            if constexpr 0 != sizeof...(Other) {
+                return match_first(cur, ctx, modifiers, end_func, tail, other...);
+            } else {
+                return ctx.fail();
+            }
+        }
+    }
+}
+
 char_token: @polymorphic_base type = {
     this: regex_token_base;
 
@@ -1040,8 +1158,8 @@ range_token: @polymorphic_base type = {
         inner_name := ctx.generate_func(inner_token);
         reset_name := ctx.generate_reset(inner_token*.get_groups());
 
-        next_name := ctx.gen_func_name();
-        ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match((ctx.match_parameters())$, (inner_name)$(), (reset_name)$(), other, (next_name)$())");
+        next_name := ctx.next_func_name();
+        ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match((ctx.match_parameters())$, (inner_name)$, (reset_name)$, other, (next_name)$)");
     }
 
     get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
@@ -2815,7 +2933,7 @@ regex_parser:  type = {
         source += gen_ctx.run(parse_ctx.get_tokens());
         source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
-        source += "    r := (gen_ctx.get_entry_func())$()(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
+        source += "    r := (gen_ctx.get_entry_func())$(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
         source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
@@ -2825,6 +2943,7 @@ regex_parser:  type = {
         source += create_named_group_lookup();
         source += "}\n";
 
+        _ = parse_ctx;
 
         std::cout << source << std::endl;
 

From c2e94b5540e354688a0eba8e0a8f0d506593f5dc Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 7 May 2024 11:11:51 +0200
Subject: [PATCH 108/161] Added '.' regex expression.

---
 include/cpp2regex.h | 993 ++++++++++++++++++++------------------------
 source/regex.h2     | 135 ++----
 2 files changed, 481 insertions(+), 647 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 2d54e96f7e..1cbd8300a6 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -102,134 +102,132 @@ class parse_context_group_state;
 class parse_context;
     
 
-#line 627 "regex.h2"
+#line 628 "regex.h2"
 class generation_function_context;
     
 
-#line 643 "regex.h2"
+#line 644 "regex.h2"
 class generation_context;
 
-#line 790 "regex.h2"
+#line 791 "regex.h2"
 class regex_token_list;
     
 
-#line 826 "regex.h2"
+#line 827 "regex.h2"
 class regex_token_base;
     
 
-#line 844 "regex.h2"
+#line 845 "regex.h2"
 class alternative_token;
     
 
-#line 862 "regex.h2"
+#line 863 "regex.h2"
 class alternative_token_gen;
     
 
-#line 911 "regex.h2"
+#line 912 "regex.h2"
 template class alternative_token_matcher;
 
-#line 936 "regex.h2"
+#line 938 "regex.h2"
+class any_token;
+
+
+#line 965 "regex.h2"
 class char_token;
     
 
-#line 978 "regex.h2"
+#line 1007 "regex.h2"
 class group_token;
     
 
-#line 1031 "regex.h2"
+#line 1060 "regex.h2"
 class range_token;
     
 
-#line 1169 "regex.h2"
+#line 1198 "regex.h2"
 template class range_token_matcher;
 
-#line 1294 "regex.h2"
+#line 1323 "regex.h2"
 class special_range_token;
     
 
-#line 1341 "regex.h2"
-template class alternative_matcher_logic;
-
-#line 1425 "regex.h2"
-template class any_matcher_logic;
-
-#line 1444 "regex.h2"
+#line 1368 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1452 "regex.h2"
+#line 1376 "regex.h2"
 template class char_matcher_logic;
 
-#line 1480 "regex.h2"
+#line 1404 "regex.h2"
 template class class_matcher_logic;
 
-#line 1529 "regex.h2"
+#line 1453 "regex.h2"
 template class global_group_reset;
     
 
-#line 1541 "regex.h2"
+#line 1465 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1578 "regex.h2"
+#line 1502 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1602 "regex.h2"
+#line 1526 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1610 "regex.h2"
+#line 1534 "regex.h2"
 template class group_ref_matcher_logic;
     
 
-#line 1643 "regex.h2"
+#line 1567 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1663 "regex.h2"
+#line 1587 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1680 "regex.h2"
+#line 1604 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1703 "regex.h2"
+#line 1627 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1715 "regex.h2"
+#line 1639 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1742 "regex.h2"
+#line 1666 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1793 "regex.h2"
+#line 1717 "regex.h2"
 template class group_name_list;
 
-#line 1805 "regex.h2"
+#line 1729 "regex.h2"
 class group_name_list_end;
     
 
-#line 1810 "regex.h2"
+#line 1734 "regex.h2"
 template class regular_expression;
 
-#line 1891 "regex.h2"
+#line 1815 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1980 "regex.h2"
+#line 1904 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1987 "regex.h2"
+#line 1911 "regex.h2"
 class regex_parser_group_state;
 
-#line 2022 "regex.h2"
+#line 1946 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2049 "regex.h2"
+#line 1973 "regex.h2"
 template class regex_parser;
 
-#line 2963 "regex.h2"
+#line 2886 "regex.h2"
 }
 }
 
@@ -715,13 +713,13 @@ class parse_context {
 
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 622 "regex.h2"
+#line 623 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 625 "regex.h2"
+#line 626 "regex.h2"
 };
 
 class generation_function_context {
@@ -730,10 +728,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 638 "regex.h2"
+#line 639 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 641 "regex.h2"
+#line 642 "regex.h2"
 };
 
 class generation_context {
@@ -750,81 +748,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 660 "regex.h2"
+#line 661 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 665 "regex.h2"
+#line 666 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 672 "regex.h2"
+#line 673 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 678 "regex.h2"
+#line 679 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 686 "regex.h2"
+#line 687 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 708 "regex.h2"
+#line 709 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 712 "regex.h2"
+#line 713 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 716 "regex.h2"
+#line 717 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 720 "regex.h2"
+#line 721 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 729 "regex.h2"
+#line 730 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 735 "regex.h2"
+#line 736 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 747 "regex.h2"
+#line 748 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 751 "regex.h2"
+#line 752 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 755 "regex.h2"
+#line 756 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 761 "regex.h2"
+#line 762 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 767 "regex.h2"
+#line 768 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 773 "regex.h2"
+#line 774 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 781 "regex.h2"
+#line 782 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 788 "regex.h2"
+#line 789 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 793 "regex.h2"
+#line 794 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 800 "regex.h2"
+#line 801 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 806 "regex.h2"
+#line 807 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 816 "regex.h2"
+#line 817 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -832,40 +830,40 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 823 "regex.h2"
+#line 824 "regex.h2"
 };
 
-#line 826 "regex.h2"
+#line 827 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 829 "regex.h2"
+#line 830 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 833 "regex.h2"
+#line 834 "regex.h2"
     public: explicit regex_token_base();
 
-#line 837 "regex.h2"
+#line 838 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 838 "regex.h2"
+#line 839 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
 //
-//  Non greedy implementation. First alternative that matches is chosen. 
+//  Non greedy implementation. First alternative that matches is chosen.
 //
 class alternative_token: public regex_token_base {
 
-#line 847 "regex.h2"
+#line 848 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 857 "regex.h2"
+#line 858 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -873,23 +871,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 860 "regex.h2"
+#line 861 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 866 "regex.h2"
+#line 867 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 887 "regex.h2"
+#line 888 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 898 "regex.h2"
+#line 899 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -897,35 +895,57 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 909 "regex.h2"
+#line 910 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 916 "regex.h2"
+#line 917 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 933 "regex.h2"
+#line 934 "regex.h2"
+};
+
+//  Regex syntax: .
+//
+class any_token: public regex_token_base {
+
+#line 941 "regex.h2"
+    public: explicit any_token();
+
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+
+#line 949 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~any_token() noexcept;
+
+    public: any_token(any_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(any_token const&) -> void = delete;
+
+
+#line 952 "regex.h2"
 };
 
-#line 936 "regex.h2"
+template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 965 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 939 "regex.h2"
+#line 968 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 946 "regex.h2"
+#line 975 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 950 "regex.h2"
+#line 979 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -933,24 +953,24 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 955 "regex.h2"
+#line 984 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 978 "regex.h2"
+#line 1007 "regex.h2"
 class group_token: public regex_token {
 
-#line 981 "regex.h2"
+#line 1010 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1002 "regex.h2"
+#line 1031 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1019 "regex.h2"
+#line 1048 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -959,14 +979,14 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1027 "regex.h2"
+#line 1056 "regex.h2"
 };
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1034 "regex.h2"
+#line 1063 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -976,65 +996,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1111 "regex.h2"
+#line 1140 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1122 "regex.h2"
+#line 1151 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1134 "regex.h2"
+#line 1163 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1158 "regex.h2"
+#line 1187 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1166 "regex.h2"
+#line 1195 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 1167 "regex.h2"
+#line 1196 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1183 "regex.h2"
+#line 1212 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1188 "regex.h2"
+#line 1217 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1193 "regex.h2"
+#line 1222 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1199 "regex.h2"
+#line 1228 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 1214 "regex.h2"
+#line 1243 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 1242 "regex.h2"
+#line 1271 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 1266 "regex.h2"
+#line 1295 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1290 "regex.h2"
+#line 1319 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 1297 "regex.h2"
+#line 1326 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1043,10 +1063,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1326 "regex.h2"
+#line 1355 "regex.h2"
 };
 
-#line 1329 "regex.h2"
+#line 1358 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1054,47 +1074,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1337 "regex.h2"
-//  Regex syntax: |  Example: ab|ba
-//
-//  Non greedy implementation. First alternative that matches is chosen. 
-//
-template class alternative_matcher_logic {
-
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto;
-
-#line 1355 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-
-    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto;
-
-#line 1373 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto;
-    public: alternative_matcher_logic() = default;
-    public: alternative_matcher_logic(alternative_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(alternative_matcher_logic const&) -> void = delete;
-
-
-#line 1421 "regex.h2"
-};
-
-//  Regex syntax: .
-//
-template class any_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 1438 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: any_matcher_logic() = default;
-    public: any_matcher_logic(any_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(any_matcher_logic const&) -> void = delete;
-
-#line 1440 "regex.h2"
-};
-
+#line 1366 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1105,7 +1085,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1448 "regex.h2"
+#line 1372 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1114,27 +1094,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1473 "regex.h2"
+#line 1397 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1475 "regex.h2"
+#line 1399 "regex.h2"
 };
 
-#line 1478 "regex.h2"
+#line 1402 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1501 "regex.h2"
+#line 1425 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1513 "regex.h2"
+#line 1437 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1143,7 +1123,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1525 "regex.h2"
+#line 1449 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1151,14 +1131,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1535 "regex.h2"
+#line 1459 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1537 "regex.h2"
+#line 1461 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -1166,23 +1146,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1549 "regex.h2"
+#line 1473 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1555 "regex.h2"
+#line 1479 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1576 "regex.h2"
+#line 1500 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1590 "regex.h2"
+#line 1514 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1191,7 +1171,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1600 "regex.h2"
+#line 1524 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -1202,7 +1182,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1606 "regex.h2"
+#line 1530 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -1210,14 +1190,14 @@ template class special_group_end_logic {
 template class group_ref_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1637 "regex.h2"
+#line 1561 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: group_ref_matcher_logic() = default;
     public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
 
-#line 1639 "regex.h2"
+#line 1563 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -1226,14 +1206,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1657 "regex.h2"
+#line 1581 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1659 "regex.h2"
+#line 1583 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -1242,14 +1222,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1674 "regex.h2"
+#line 1598 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1676 "regex.h2"
+#line 1600 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1258,14 +1238,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1697 "regex.h2"
+#line 1621 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1699 "regex.h2"
+#line 1623 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1274,14 +1254,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1708 "regex.h2"
+#line 1632 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1710 "regex.h2"
+#line 1634 "regex.h2"
 };
 
 // Named character classes
@@ -1293,7 +1273,7 @@ template                    void = delete;
 
 
-#line 1717 "regex.h2"
+#line 1641 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1303,7 +1283,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1727 "regex.h2"
+#line 1651 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1323,7 +1303,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1773 "regex.h2"
+#line 1697 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1331,10 +1311,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1781 "regex.h2"
+#line 1705 "regex.h2"
 };
 
-#line 1784 "regex.h2"
+#line 1708 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1352,7 +1332,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1803 "regex.h2"
+#line 1727 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1361,7 +1341,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1807 "regex.h2"
+#line 1731 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1377,7 +1357,7 @@ template matched_, context const& ctx_);
 
-#line 1825 "regex.h2"
+#line 1749 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1392,7 +1372,7 @@ template void = delete;
 
 
-#line 1841 "regex.h2"
+#line 1765 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1400,13 +1380,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1853 "regex.h2"
+#line 1777 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1875 "regex.h2"
+#line 1799 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1418,7 +1398,7 @@ template void = delete;
 
 
-#line 1888 "regex.h2"
+#line 1812 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1434,7 +1414,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1906 "regex.h2"
+#line 1830 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1449,7 +1429,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1922 "regex.h2"
+#line 1846 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1457,13 +1437,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1934 "regex.h2"
+#line 1858 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1956 "regex.h2"
+#line 1880 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1475,7 +1455,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1969 "regex.h2"
+#line 1893 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1506,15 +1486,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2003 "regex.h2"
+#line 1927 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2009 "regex.h2"
+#line 1933 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2018 "regex.h2"
+#line 1942 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1527,13 +1507,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2036 "regex.h2"
+#line 1960 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2041 "regex.h2"
+#line 1965 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2046 "regex.h2"
+#line 1970 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1557,144 +1537,144 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2073 "regex.h2"
+#line 1997 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2082 "regex.h2"
+#line 2006 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2086 "regex.h2"
+#line 2010 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2101 "regex.h2"
+#line 2025 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2107 "regex.h2"
+#line 2031 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2148 "regex.h2"
+#line 2072 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2160 "regex.h2"
+#line 2084 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2166 "regex.h2"
+#line 2090 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2173 "regex.h2"
+#line 2097 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2182 "regex.h2"
+#line 2106 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2190 "regex.h2"
+#line 2114 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2200 "regex.h2"
+#line 2124 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 2224 "regex.h2"
+#line 2148 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 2240 "regex.h2"
+#line 2164 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 2260 "regex.h2"
+#line 2184 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2267 "regex.h2"
+#line 2191 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2279 "regex.h2"
+#line 2203 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2282 "regex.h2"
+#line 2206 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2292 "regex.h2"
+#line 2216 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2310 "regex.h2"
+#line 2234 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2320 "regex.h2"
+#line 2244 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2333 "regex.h2"
+#line 2257 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2369 "regex.h2"
+#line 2293 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2434 "regex.h2"
+#line 2358 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2445 "regex.h2"
+#line 2369 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2458 "regex.h2"
+#line 2382 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2466 "regex.h2"
+#line 2390 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2573 "regex.h2"
+#line 2497 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2740 "regex.h2"
+#line 2664 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2872 "regex.h2"
+#line 2796 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2879 "regex.h2"
+#line 2803 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2899 "regex.h2"
+#line 2823 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2921 "regex.h2"
+#line 2845 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2954 "regex.h2"
+#line 2877 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2963 "regex.h2"
+#line 2886 "regex.h2"
 }
 }
 
@@ -2325,6 +2305,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             cur_token = nullptr;
 
             if (!(cur_token) && valid()) {cur_token = alternative_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = any_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
@@ -2342,10 +2323,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 622 "regex.h2"
+#line 623 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 631 "regex.h2"
+#line 632 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2353,27 +2334,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 638 "regex.h2"
+#line 639 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 653 "regex.h2"
+#line 654 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 655 "regex.h2"
+#line 656 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 660 "regex.h2"
+#line 661 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 665 "regex.h2"
+#line 666 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2381,14 +2362,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 672 "regex.h2"
+#line 673 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 678 "regex.h2"
+#line 679 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2397,7 +2378,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 686 "regex.h2"
+#line 687 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2419,22 +2400,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 708 "regex.h2"
+#line 709 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 712 "regex.h2"
+#line 713 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 716 "regex.h2"
+#line 717 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 720 "regex.h2"
+#line 721 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2444,14 +2425,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 729 "regex.h2"
+#line 730 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 735 "regex.h2"
+#line 736 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2464,38 +2445,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 747 "regex.h2"
+#line 748 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 751 "regex.h2"
+#line 752 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 755 "regex.h2"
+#line 756 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 761 "regex.h2"
+#line 762 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 767 "regex.h2"
+#line 768 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 773 "regex.h2"
+#line 774 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2504,7 +2485,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 781 "regex.h2"
+#line 782 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2513,22 +2494,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 795 "regex.h2"
+#line 796 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 798 "regex.h2"
+#line 799 "regex.h2"
     }
 
-#line 800 "regex.h2"
+#line 801 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 806 "regex.h2"
+#line 807 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2539,7 +2520,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 816 "regex.h2"
+#line 817 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2550,30 +2531,30 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 829 "regex.h2"
+#line 830 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 831 "regex.h2"
+#line 832 "regex.h2"
     }
 
-#line 833 "regex.h2"
+#line 834 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 835 "regex.h2"
+#line 836 "regex.h2"
     }
 
-#line 837 "regex.h2"
+#line 838 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 847 "regex.h2"
+#line 848 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 849 "regex.h2"
+#line 850 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2582,22 +2563,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 857 "regex.h2"
+#line 858 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 868 "regex.h2"
+#line 869 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 871 "regex.h2"
+#line 872 "regex.h2"
     }
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2612,7 +2593,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 887 "regex.h2"
+#line 888 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2624,7 +2605,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 898 "regex.h2"
+#line 899 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2639,11 +2620,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 913 "regex.h2"
+#line 914 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 916 "regex.h2"
+#line 917 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -2663,19 +2644,49 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     }
 
 #line 941 "regex.h2"
+    any_token::any_token()
+                            : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
+
+#line 943 "regex.h2"
+    [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
+        if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
+
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared);
+    }
+
+#line 949 "regex.h2"
+    auto any_token::generate_code(generation_context& ctx) const -> void{
+        CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+    }
+
+    any_token::~any_token() noexcept{}
+
+#line 954 "regex.h2"
+template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+    if (cur != ctx.end // Any char except the end
+        && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
+        cur += 1;
+        return true;
+    }
+    else {
+        return false;
+    }
+}
+
+#line 970 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 944 "regex.h2"
+#line 973 "regex.h2"
     }
 
-#line 946 "regex.h2"
+#line 975 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 950 "regex.h2"
+#line 979 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2684,7 +2695,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     char_token::~char_token() noexcept{}
 
-#line 957 "regex.h2"
+#line 986 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2706,7 +2717,7 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 984 "regex.h2"
+#line 1013 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -2714,7 +2725,7 @@ template [[nodiscard]] auto char_toke
 
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
 
-#line 992 "regex.h2"
+#line 1021 "regex.h2"
         (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
 
         auto old_state {CPP2_UFCS(start_group)(ctx)}; 
@@ -2725,7 +2736,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1002 "regex.h2"
+#line 1031 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -2743,7 +2754,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1019 "regex.h2"
+#line 1048 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         if (-1 == number) {
             return {  }; 
@@ -2755,11 +2766,11 @@ template [[nodiscard]] auto char_toke
 
     group_token::~group_token() noexcept{}
 
-#line 1039 "regex.h2"
+#line 1068 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1041 "regex.h2"
+#line 1070 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -2803,7 +2814,7 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
-#line 1085 "regex.h2"
+#line 1114 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -2830,7 +2841,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 1111 "regex.h2"
+#line 1140 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -2842,7 +2853,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1122 "regex.h2"
+#line 1151 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -2855,7 +2866,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1134 "regex.h2"
+#line 1163 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2880,7 +2891,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1158 "regex.h2"
+#line 1187 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -2889,12 +2900,12 @@ template [[nodiscard]] auto char_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1166 "regex.h2"
+#line 1195 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 1171 "regex.h2"
+#line 1200 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -2907,26 +2918,26 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1183 "regex.h2"
+#line 1212 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1188 "regex.h2"
+#line 1217 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1193 "regex.h2"
+#line 1222 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1199 "regex.h2"
+#line 1228 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2942,7 +2953,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 1214 "regex.h2"
+#line 1243 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -2971,7 +2982,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1242 "regex.h2"
+#line 1271 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -2996,7 +3007,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1266 "regex.h2"
+#line 1295 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3022,7 +3033,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1297 "regex.h2"
+#line 1326 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3045,7 +3056,7 @@ template [[nodiscard]] auto char_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1320 "regex.h2"
+#line 1349 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3055,115 +3066,14 @@ template [[nodiscard]] auto char_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1343 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, Tail const& tail) -> auto{
-        if constexpr (greedy_alternative) {
-            auto max_overall_length {0}; 
-            auto max_current_length {0}; 
-            auto r {match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, tail)}; 
-            static_cast(std::move(max_overall_length));
-            static_cast(std::move(max_current_length));
-            return r; 
-        }else {
-            return match_first(cur, ctx, modifiers, end_func, tail); 
-        }
-    }
-#line 1355 "regex.h2"
-    template  auto alternative_matcher_logic::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...); }
-#line 1356 "regex.h2"
-    template  [[nodiscard]] auto alternative_matcher_logic::to_string() -> auto { return CPP2_UFCS(substr)((bstring() + ... + ("|" + List::to_string())), 1); }// substr: Remove first '|'.
-
-#line 1358 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail) -> auto{
-        auto r {First::match(cur, ctx, modifiers, end_func, tail)}; 
-        if (r.matched) {
-            return r; 
-        }else {
-            First::reset_ranges(ctx);
-
-            if constexpr (0 != sizeof...(Next)) {
-                return match_first(cur, ctx, modifiers, end_func, tail); 
-            }else {
-                return CPP2_UFCS(fail)(ctx); 
-            }
-        }
-    }
-
-#line 1373 "regex.h2"
-    template  template [[nodiscard]] auto alternative_matcher_logic::match_greedy(auto const& cur, auto& max_overall_length, auto& max_current_length, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Tail const& unnamed_param_7) -> auto{
-        auto r {First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()))}; 
-
-        // Get the end position of First.
-        auto end_overall_pos {cur}; 
-        auto end_current_pos {cur}; 
-        if (r.matched) {
-            end_overall_pos = r.pos;
-            end_current_pos = CPP2_UFCS(get_alternative_pos)(ctx, alternative);
-        }
-
-        // Compute the new max length and our max length.
-        auto my_overall_length {unsafe_narrow(std::distance(cur, std::move(end_overall_pos)))}; 
-        max_overall_length = std::max(max_overall_length, my_overall_length);
-
-#line 1389 "regex.h2"
-        // Check if someone other has something larker
-        auto o {CPP2_UFCS(fail)(ctx)}; 
-        if constexpr (0 != sizeof...(Next)) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, Tail());
-        }
-
-        auto my_current_length {unsafe_narrow(std::distance(cur, std::move(end_current_pos)))}; 
-        if (max_overall_length == my_overall_length) {
-            max_current_length = std::max(max_current_length, my_current_length);
-        }
-
-#line 1401 "regex.h2"
-        if (std::move(r).matched && std::move(my_overall_length) == max_overall_length) {
-            // We are the longest. Check now if we are also the longest in this alternative.
-            if (std::move(my_current_length) == max_current_length) {
-                // Yes we are. Reset all groups by matching again.
-                (Next::reset_ranges(ctx), ...);  // Reset all other ranges.
-                return First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper())); 
-            }
-            else {
-                // We are not, so there was an other match.
-                First::reset_ranges(ctx);
-
-                return o; 
-            }
-        }else {
-            // We are not the largest one.
-            First::reset_ranges(ctx);
-
-            return o; 
-        }
-    }
-
-#line 1427 "regex.h2"
-    template  template [[nodiscard]] auto any_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        if (cur != ctx.end && 
-          (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || 
-           *cpp2::assert_not_null(cur) != '\n')) {
-            return Other::match(cur + 1, ctx, modifiers, end_func); 
-        }
-        else {
-            return CPP2_UFCS(fail)(ctx); 
-        }
-    }
-
-#line 1438 "regex.h2"
-    template  auto any_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1439 "regex.h2"
-    template  [[nodiscard]] auto any_matcher_logic::to_string() -> auto { return bstring(1, '.'); }
-
-#line 1445 "regex.h2"
+#line 1369 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1446 "regex.h2"
+#line 1370 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1447 "regex.h2"
+#line 1371 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1454 "regex.h2"
+#line 1378 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3183,12 +3093,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1473 "regex.h2"
+#line 1397 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1474 "regex.h2"
+#line 1398 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1482 "regex.h2"
+#line 1406 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3208,7 +3118,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1501 "regex.h2"
+#line 1425 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3221,10 +3131,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1513 "regex.h2"
+#line 1437 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1515 "regex.h2"
+#line 1439 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -3236,18 +3146,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1530 "regex.h2"
+#line 1454 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1535 "regex.h2"
+#line 1459 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1536 "regex.h2"
+#line 1460 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1542 "regex.h2"
+#line 1466 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -3255,14 +3165,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1549 "regex.h2"
+#line 1473 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1555 "regex.h2"
+#line 1479 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -3285,7 +3195,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1579 "regex.h2"
+#line 1503 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -3297,10 +3207,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1590 "regex.h2"
+#line 1514 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1592 "regex.h2"
+#line 1516 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -3310,14 +3220,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1603 "regex.h2"
+#line 1527 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1604 "regex.h2"
+#line 1528 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1605 "regex.h2"
+#line 1529 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1611 "regex.h2"
+#line 1535 "regex.h2"
     template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3344,12 +3254,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1637 "regex.h2"
+#line 1561 "regex.h2"
     template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1638 "regex.h2"
+#line 1562 "regex.h2"
     template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
 
-#line 1645 "regex.h2"
+#line 1569 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -3362,12 +3272,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1657 "regex.h2"
+#line 1581 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1658 "regex.h2"
+#line 1582 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1665 "regex.h2"
+#line 1589 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -3377,12 +3287,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1674 "regex.h2"
+#line 1598 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1675 "regex.h2"
+#line 1599 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1682 "regex.h2"
+#line 1606 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -3398,21 +3308,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1697 "regex.h2"
+#line 1621 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1698 "regex.h2"
+#line 1622 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1705 "regex.h2"
+#line 1629 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1708 "regex.h2"
+#line 1632 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1709 "regex.h2"
+#line 1633 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1744 "regex.h2"
+#line 1668 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -3442,9 +3352,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1773 "regex.h2"
+#line 1697 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1774 "regex.h2"
+#line 1698 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -3453,7 +3363,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1795 "regex.h2"
+#line 1719 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -3463,34 +3373,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1806 "regex.h2"
+#line 1730 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1820 "regex.h2"
+#line 1744 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1823 "regex.h2"
+#line 1747 "regex.h2"
         }
 
-#line 1825 "regex.h2"
+#line 1749 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1826 "regex.h2"
+#line 1750 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1827 "regex.h2"
+#line 1751 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1828 "regex.h2"
+#line 1752 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1830 "regex.h2"
+#line 1754 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1831 "regex.h2"
+#line 1755 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1832 "regex.h2"
+#line 1756 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1834 "regex.h2"
+#line 1758 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -3499,13 +3409,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1843 "regex.h2"
+#line 1767 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1844 "regex.h2"
+#line 1768 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1845 "regex.h2"
+#line 1769 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1846 "regex.h2"
+#line 1770 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3513,13 +3423,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1853 "regex.h2"
+#line 1777 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1854 "regex.h2"
+#line 1778 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1855 "regex.h2"
+#line 1779 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1856 "regex.h2"
+#line 1780 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3539,10 +3449,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1875 "regex.h2"
+#line 1799 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1880 "regex.h2"
+#line 1804 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3552,31 +3462,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1901 "regex.h2"
+#line 1825 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1904 "regex.h2"
+#line 1828 "regex.h2"
         }
 
-#line 1906 "regex.h2"
+#line 1830 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1907 "regex.h2"
+#line 1831 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1908 "regex.h2"
+#line 1832 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1909 "regex.h2"
+#line 1833 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1911 "regex.h2"
+#line 1835 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1912 "regex.h2"
+#line 1836 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1913 "regex.h2"
+#line 1837 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1915 "regex.h2"
+#line 1839 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3585,13 +3495,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1924 "regex.h2"
+#line 1848 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1925 "regex.h2"
+#line 1849 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1926 "regex.h2"
+#line 1850 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1927 "regex.h2"
+#line 1851 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3599,13 +3509,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1934 "regex.h2"
+#line 1858 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1935 "regex.h2"
+#line 1859 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1936 "regex.h2"
+#line 1860 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1937 "regex.h2"
+#line 1861 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3625,10 +3535,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1956 "regex.h2"
+#line 1880 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1961 "regex.h2"
+#line 1885 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3638,24 +3548,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1997 "regex.h2"
+#line 1921 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2003 "regex.h2"
+#line 1927 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2009 "regex.h2"
+#line 1933 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2011 "regex.h2"
+#line 1935 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3663,10 +3573,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 2018 "regex.h2"
+#line 1942 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2028 "regex.h2"
+#line 1952 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3675,29 +3585,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 2036 "regex.h2"
+#line 1960 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2041 "regex.h2"
+#line 1965 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2067 "regex.h2"
+#line 1991 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2071 "regex.h2"
+#line 1995 "regex.h2"
     }
 
-#line 2075 "regex.h2"
+#line 1999 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3705,12 +3615,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 2082 "regex.h2"
+#line 2006 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2089 "regex.h2"
+#line 2013 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3723,14 +3633,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 2101 "regex.h2"
+#line 2025 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2110 "regex.h2"
+#line 2034 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3769,7 +3679,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 2148 "regex.h2"
+#line 2072 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3782,14 +3692,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2160 "regex.h2"
+#line 2084 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2161 "regex.h2"
+#line 2085 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2162 "regex.h2"
+#line 2086 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2166 "regex.h2"
+#line 2090 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3797,7 +3707,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2173 "regex.h2"
+#line 2097 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3807,7 +3717,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2182 "regex.h2"
+#line 2106 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3816,7 +3726,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2190 "regex.h2"
+#line 2114 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3827,12 +3737,12 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2200 "regex.h2"
+#line 2124 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2201 "regex.h2"
+#line 2125 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2203 "regex.h2"
+#line 2127 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -3854,14 +3764,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2224 "regex.h2"
+#line 2148 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 2225 "regex.h2"
+#line 2149 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 2226 "regex.h2"
+#line 2150 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 2228 "regex.h2"
+#line 2152 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -3874,7 +3784,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2240 "regex.h2"
+#line 2164 "regex.h2"
     template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -3895,13 +3805,13 @@ template [[nodiscard]] auto char_toke
         return std::move(r.value()); 
     }
 
-#line 2262 "regex.h2"
+#line 2186 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2267 "regex.h2"
+#line 2191 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3914,10 +3824,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2279 "regex.h2"
+#line 2203 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2285 "regex.h2"
+#line 2209 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3925,10 +3835,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2292 "regex.h2"
+#line 2216 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2294 "regex.h2"
+#line 2218 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3945,7 +3855,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2310 "regex.h2"
+#line 2234 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3956,7 +3866,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2322 "regex.h2"
+#line 2246 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3968,7 +3878,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2333 "regex.h2"
+#line 2257 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4005,7 +3915,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2369 "regex.h2"
+#line 2293 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -4071,7 +3981,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2437 "regex.h2"
+#line 2361 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -4080,7 +3990,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2445 "regex.h2"
+#line 2369 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -4094,7 +4004,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2458 "regex.h2"
+#line 2382 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -4103,7 +4013,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2466 "regex.h2"
+#line 2390 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -4211,7 +4121,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2573 "regex.h2"
+#line 2497 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -4379,7 +4289,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2740 "regex.h2"
+#line 2664 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -4512,7 +4422,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2872 "regex.h2"
+#line 2796 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4520,7 +4430,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2879 "regex.h2"
+#line 2803 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4541,7 +4451,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2899 "regex.h2"
+#line 2823 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4564,7 +4474,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2921 "regex.h2"
+#line 2845 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4593,13 +4503,12 @@ template [[nodiscard]] auto char_toke
 
         static_cast(std::move(parse_ctx));
 
-#line 2950 "regex.h2"
         std::cout << source << std::endl;
 
         return source; 
     }
 
-#line 2956 "regex.h2"
+#line 2879 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 41e2700782..9e0d7327d2 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -602,6 +602,7 @@ parse_context: type = {
             cur_token = nullptr;
 
             if !cur_token && valid() { cur_token = alternative_token::parse(this); }
+            if !cur_token && valid() { cur_token = any_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
@@ -932,6 +933,35 @@ alternative_token_matcher:  type = {
     }
 }
 
+//  Regex syntax: .
+//
+any_token: @polymorphic_base type = {
+    this: regex_token_base = (".");
+
+    operator=:(out this) = {} // TODO: Base class constructor is ignored.
+
+    parse: (inout ctx: parse_context) -> token_ptr = {
+        if '.' != ctx.current() { return nullptr;}
+
+        return shared.new();
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx.add_check("any_token_matcher((ctx.match_parameters())$)");
+    }
+}
+
+any_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
+    if cur != ctx.end // Any char except the end
+        && (modifiers.has_flag(expression_flags::single_line) || cur* != '\n') { // Do not match new lines in multi line mode.
+        cur += 1;
+        return true;
+    }
+    else {
+        return false;
+    }
+}
+
 char_token: @polymorphic_base type = {
     this: regex_token_base;
 
@@ -1333,111 +1363,6 @@ special_range_token: @polymorphic_base type = {
 //
 
 
-//  Regex syntax: |  Example: ab|ba
-//
-//  Non greedy implementation. First alternative that matches is chosen. 
-//
-alternative_matcher_logic:  type = {
-
-    match:  (cur, inout ctx, modifiers, end_func, tail: Tail) -> _ = {
-        if constexpr greedy_alternative {
-            max_overall_length: = 0;
-            max_current_length: = 0;
-            r := match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, tail);
-            _ = max_overall_length;
-            _ = max_current_length;
-            return r;
-        } else {
-            return match_first(cur, ctx, modifiers, end_func, tail);
-        }
-    }
-    reset_ranges: (inout ctx)     = (List::reset_ranges(ctx) , ...);
-    to_string: ()                   (bstring() + ... + ("|" + List::to_string())).substr(1); // substr: Remove first '|'.
-
-    private match_first:  (cur, inout ctx, modifiers, end_func, tail) -> _ = {
-        r := First::match(cur, ctx, modifiers, end_func, tail);
-        if r.matched {
-            return r;
-        } else {
-            First::reset_ranges(ctx);
-
-            if constexpr 0 != sizeof...(Next) {
-                return match_first(cur, ctx, modifiers, end_func, tail);
-            } else {
-                return ctx.fail();
-            }
-        }
-    }
-
-    private match_greedy:  (cur, inout max_overall_length, inout max_current_length, inout ctx, modifiers, end_func, _: Tail) -> _ = {
-        r := First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()));
-
-        // Get the end position of First.
-        end_overall_pos := cur;
-        end_current_pos := cur;
-        if r.matched {
-            end_overall_pos = r.pos;
-            end_current_pos = ctx.get_alternative_pos(alternative);
-        }
-
-        // Compute the new max length and our max length.
-        my_overall_length := unsafe_narrow(std::distance(cur, end_overall_pos));
-        max_overall_length = std::max(max_overall_length, my_overall_length);
-
-
-        // Check if someone other has something larker
-        o := ctx.fail();
-        if constexpr 0 != sizeof...(Next) {
-            o = match_greedy(cur, max_overall_length, max_current_length, ctx, modifiers, end_func, Tail());
-        }
-
-        my_current_length := unsafe_narrow(std::distance(cur, end_current_pos));
-        if max_overall_length == my_overall_length {
-            max_current_length = std::max(max_current_length, my_current_length);
-        }
-
-
-        if r.matched && my_overall_length == max_overall_length {
-            // We are the longest. Check now if we are also the longest in this alternative.
-            if my_current_length == max_current_length {
-                // Yes we are. Reset all groups by matching again.
-                (Next::reset_ranges(ctx) , ...); // Reset all other ranges.
-                return First::match(cur, ctx, modifiers, end_func, Tail::prepend(extract_position_helper()));
-            }
-            else {
-                // We are not, so there was an other match.
-                First::reset_ranges(ctx);
-
-                return o;
-            }
-        } else {
-            // We are not the largest one.
-            First::reset_ranges(ctx);
-
-            return o;
-        }
-    }
-}
-
-//  Regex syntax: .
-//
-any_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        if cur != ctx.end &&
-          (modifiers.has_flag(expression_flags::single_line) ||
-           cur* != '\n') {
-            return Other::match(cur + 1, ctx, modifiers, end_func);
-        }
-        else {
-            return ctx.fail();
-        }
-    }
-
-    reset_ranges: (_) = {}
-    to_string:    ()          bstring(1, '.');
-}
-
 // Regex syntax: none Example: -
 //
 branch_reset_matcher_logic:  type = {

From 9b78205bdc6e1f72e61bd115f7857b3205d99847 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 7 May 2024 13:39:26 +0200
Subject: [PATCH 109/161] Added group reference matchers.

---
 include/cpp2regex.h | 1405 +++++++++++++++++++++++--------------------
 source/regex.h2     |  423 +++++++------
 2 files changed, 1004 insertions(+), 824 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 1cbd8300a6..8c0581a49e 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -98,136 +98,140 @@ class regex_token;
 #line 400 "regex.h2"
 class parse_context_group_state;
 
-#line 437 "regex.h2"
+#line 438 "regex.h2"
+class parse_context_branch_reset_state;
+    
+
+#line 471 "regex.h2"
 class parse_context;
     
 
-#line 628 "regex.h2"
+#line 726 "regex.h2"
 class generation_function_context;
     
 
-#line 644 "regex.h2"
+#line 742 "regex.h2"
 class generation_context;
 
-#line 791 "regex.h2"
+#line 889 "regex.h2"
 class regex_token_list;
     
 
-#line 827 "regex.h2"
+#line 925 "regex.h2"
 class regex_token_base;
     
 
-#line 845 "regex.h2"
+#line 943 "regex.h2"
 class alternative_token;
     
 
-#line 863 "regex.h2"
+#line 961 "regex.h2"
 class alternative_token_gen;
     
 
-#line 912 "regex.h2"
+#line 1010 "regex.h2"
 template class alternative_token_matcher;
 
-#line 938 "regex.h2"
+#line 1036 "regex.h2"
 class any_token;
+    
 
-
-#line 965 "regex.h2"
+#line 1063 "regex.h2"
 class char_token;
     
 
-#line 1007 "regex.h2"
+#line 1111 "regex.h2"
+class group_ref_token;
+    
+
+#line 1243 "regex.h2"
 class group_token;
     
 
-#line 1060 "regex.h2"
+#line 1296 "regex.h2"
 class range_token;
     
 
-#line 1198 "regex.h2"
+#line 1434 "regex.h2"
 template class range_token_matcher;
 
-#line 1323 "regex.h2"
+#line 1559 "regex.h2"
 class special_range_token;
     
 
-#line 1368 "regex.h2"
+#line 1604 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1376 "regex.h2"
+#line 1612 "regex.h2"
 template class char_matcher_logic;
 
-#line 1404 "regex.h2"
+#line 1640 "regex.h2"
 template class class_matcher_logic;
 
-#line 1453 "regex.h2"
+#line 1689 "regex.h2"
 template class global_group_reset;
     
 
-#line 1465 "regex.h2"
+#line 1701 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1502 "regex.h2"
+#line 1738 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1526 "regex.h2"
+#line 1762 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1534 "regex.h2"
-template class group_ref_matcher_logic;
-    
-
-#line 1567 "regex.h2"
+#line 1770 "regex.h2"
 template class line_end_matcher_logic;
 
-#line 1587 "regex.h2"
+#line 1790 "regex.h2"
 template class line_start_matcher_logic;
 
-#line 1604 "regex.h2"
+#line 1807 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1627 "regex.h2"
+#line 1830 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1639 "regex.h2"
+#line 1842 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1666 "regex.h2"
+#line 1869 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1717 "regex.h2"
+#line 1920 "regex.h2"
 template class group_name_list;
 
-#line 1729 "regex.h2"
+#line 1932 "regex.h2"
 class group_name_list_end;
     
 
-#line 1734 "regex.h2"
+#line 1937 "regex.h2"
 template class regular_expression;
 
-#line 1815 "regex.h2"
+#line 2018 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 1904 "regex.h2"
+#line 2107 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 1911 "regex.h2"
+#line 2114 "regex.h2"
 class regex_parser_group_state;
 
-#line 1946 "regex.h2"
+#line 2149 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 1973 "regex.h2"
+#line 2176 "regex.h2"
 template class regex_parser;
 
-#line 2886 "regex.h2"
+#line 2957 "regex.h2"
 }
 }
 
@@ -642,6 +646,27 @@ class parse_context_group_state {
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
+// State for the branch reset. Takes care of the group numbering. See '(|)'.
+class parse_context_branch_reset_state {
+    public: bool is_active {false}; 
+    public: int cur_group {1}; // Global capture group.
+    public: int max_group {1}; 
+    public: int from {1}; 
+
+    public: [[nodiscard]] auto next() & -> int;
+
+#line 452 "regex.h2"
+    public: auto set_next(cpp2::in g) & -> void;
+
+#line 457 "regex.h2"
+    public: auto next_alternative() & -> void;
+
+#line 463 "regex.h2"
+    public: auto set_active_reset(cpp2::in restart) & -> void;
+
+#line 469 "regex.h2"
+};
+
 class parse_context {
     private: std::string_view regex; 
 
@@ -649,77 +674,99 @@ class parse_context {
 
     public: std::string error_text {""}; 
 
-    public: int group_count {1}; // Root group.
-
     private: parse_context_group_state cur_group_state {}; 
+    private: parse_context_branch_reset_state cur_branch_reset_state {}; 
+    private: std::map named_groups {}; 
 
-    public: [[nodiscard]] auto next_group() & -> int;
-
-#line 454 "regex.h2"
     public: explicit parse_context(cpp2::in r);
-#line 454 "regex.h2"
+#line 482 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 458 "regex.h2"
+#line 486 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 467 "regex.h2"
+#line 495 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
 
-#line 473 "regex.h2"
+#line 501 "regex.h2"
+    // Branch reset management functions
+    //
+
+    public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
+
+#line 512 "regex.h2"
+    public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
+
+#line 519 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 478 "regex.h2"
+#line 524 "regex.h2"
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 482 "regex.h2"
+#line 528 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 486 "regex.h2"
+#line 532 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 496 "regex.h2"
+#line 542 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 500 "regex.h2"
+#line 546 "regex.h2"
+    // Group management
+    public: [[nodiscard]] auto get_cur_group() const& -> int;
+
+#line 551 "regex.h2"
+    public: [[nodiscard]] auto next_group() & -> int;
+
+#line 555 "regex.h2"
+    public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
+
+#line 565 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     public: [[nodiscard]] auto has_next() const& -> bool;
     public: [[nodiscard]] auto next() & -> bool;
 
-#line 511 "regex.h2"
+#line 576 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 518 "regex.h2"
+#line 583 "regex.h2"
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 558 "regex.h2"
+#line 623 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 579 "regex.h2"
+#line 644 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
+    public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
+
+#line 660 "regex.h2"
+    public: [[nodiscard]] auto grab_number() & -> std::string;
+
+#line 680 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 593 "regex.h2"
+#line 690 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 623 "regex.h2"
+#line 721 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 626 "regex.h2"
+#line 724 "regex.h2"
 };
 
 class generation_function_context {
@@ -728,10 +775,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 639 "regex.h2"
+#line 737 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 642 "regex.h2"
+#line 740 "regex.h2"
 };
 
 class generation_context {
@@ -748,81 +795,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 661 "regex.h2"
+#line 759 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 666 "regex.h2"
+#line 764 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 673 "regex.h2"
+#line 771 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 679 "regex.h2"
+#line 777 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 687 "regex.h2"
+#line 785 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 709 "regex.h2"
+#line 807 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 713 "regex.h2"
+#line 811 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 717 "regex.h2"
+#line 815 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 721 "regex.h2"
+#line 819 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 730 "regex.h2"
+#line 828 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 736 "regex.h2"
+#line 834 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 748 "regex.h2"
+#line 846 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 752 "regex.h2"
+#line 850 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 756 "regex.h2"
+#line 854 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 762 "regex.h2"
+#line 860 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 768 "regex.h2"
+#line 866 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 774 "regex.h2"
+#line 872 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 782 "regex.h2"
+#line 880 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 789 "regex.h2"
+#line 887 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 794 "regex.h2"
+#line 892 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 801 "regex.h2"
+#line 899 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 807 "regex.h2"
+#line 905 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 817 "regex.h2"
+#line 915 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -830,26 +877,26 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 824 "regex.h2"
+#line 922 "regex.h2"
 };
 
-#line 827 "regex.h2"
+#line 925 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 830 "regex.h2"
+#line 928 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 834 "regex.h2"
+#line 932 "regex.h2"
     public: explicit regex_token_base();
 
-#line 838 "regex.h2"
+#line 936 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 839 "regex.h2"
+#line 937 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -858,12 +905,12 @@ class regex_token_base: public regex_token {
 //
 class alternative_token: public regex_token_base {
 
-#line 848 "regex.h2"
+#line 946 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 858 "regex.h2"
+#line 956 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -871,23 +918,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 861 "regex.h2"
+#line 959 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 867 "regex.h2"
+#line 965 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 874 "regex.h2"
+#line 972 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 888 "regex.h2"
+#line 986 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 899 "regex.h2"
+#line 997 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -895,33 +942,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 910 "regex.h2"
+#line 1008 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 917 "regex.h2"
+#line 1015 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 934 "regex.h2"
+#line 1032 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 941 "regex.h2"
+#line 1039 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 949 "regex.h2"
+#line 1047 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -929,23 +976,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 952 "regex.h2"
+#line 1050 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 965 "regex.h2"
+#line 1063 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 968 "regex.h2"
+#line 1066 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 975 "regex.h2"
+#line 1073 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 979 "regex.h2"
+#line 1077 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -953,24 +1000,54 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 984 "regex.h2"
+#line 1082 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1007 "regex.h2"
+#line 1105 "regex.h2"
+// Regex syntax: \  Example: \1
+//               \g{name_or_number}
+//               \k{name_or_number}
+//               \k
+//               \k'name_or_number'
+//
+class group_ref_token: public regex_token_base {
+
+#line 1114 "regex.h2"
+    private: int id; 
+
+    public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
+
+#line 1121 "regex.h2"
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+
+#line 1213 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~group_ref_token() noexcept;
+
+    public: group_ref_token(group_ref_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(group_ref_token const&) -> void = delete;
+
+
+#line 1216 "regex.h2"
+};
+
+template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 1243 "regex.h2"
 class group_token: public regex_token {
 
-#line 1010 "regex.h2"
+#line 1246 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1031 "regex.h2"
+#line 1267 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1048 "regex.h2"
+#line 1284 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -979,14 +1056,14 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1056 "regex.h2"
+#line 1292 "regex.h2"
 };
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1063 "regex.h2"
+#line 1299 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -996,65 +1073,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1140 "regex.h2"
+#line 1376 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1151 "regex.h2"
+#line 1387 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1163 "regex.h2"
+#line 1399 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1187 "regex.h2"
+#line 1423 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1195 "regex.h2"
+#line 1431 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 1196 "regex.h2"
+#line 1432 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1212 "regex.h2"
+#line 1448 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1217 "regex.h2"
+#line 1453 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1222 "regex.h2"
+#line 1458 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1228 "regex.h2"
+#line 1464 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 1243 "regex.h2"
+#line 1479 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 1271 "regex.h2"
+#line 1507 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 1295 "regex.h2"
+#line 1531 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1319 "regex.h2"
+#line 1555 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 1326 "regex.h2"
+#line 1562 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1063,10 +1140,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1355 "regex.h2"
+#line 1591 "regex.h2"
 };
 
-#line 1358 "regex.h2"
+#line 1594 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1074,7 +1151,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1366 "regex.h2"
+#line 1602 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1085,7 +1162,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1372 "regex.h2"
+#line 1608 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1094,27 +1171,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1397 "regex.h2"
+#line 1633 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1399 "regex.h2"
+#line 1635 "regex.h2"
 };
 
-#line 1402 "regex.h2"
+#line 1638 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1425 "regex.h2"
+#line 1661 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1437 "regex.h2"
+#line 1673 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1123,7 +1200,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1449 "regex.h2"
+#line 1685 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1131,14 +1208,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1459 "regex.h2"
+#line 1695 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1461 "regex.h2"
+#line 1697 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -1146,23 +1223,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1473 "regex.h2"
+#line 1709 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1479 "regex.h2"
+#line 1715 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1500 "regex.h2"
+#line 1736 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1514 "regex.h2"
+#line 1750 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1171,7 +1248,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1524 "regex.h2"
+#line 1760 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -1182,22 +1259,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1530 "regex.h2"
-};
-
-// Regex syntax: \  Example: \1
-//
-template class group_ref_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 1561 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: group_ref_matcher_logic() = default;
-    public: group_ref_matcher_logic(group_ref_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(group_ref_matcher_logic const&) -> void = delete;
-
-#line 1563 "regex.h2"
+#line 1766 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
@@ -1206,14 +1268,14 @@ template cl
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1581 "regex.h2"
+#line 1784 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_end_matcher_logic() = default;
     public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_end_matcher_logic const&) -> void = delete;
 
-#line 1583 "regex.h2"
+#line 1786 "regex.h2"
 };
 
 // Regex syntax: ^  Example: ^aa
@@ -1222,14 +1284,14 @@ template class line_start_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1598 "regex.h2"
+#line 1801 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: line_start_matcher_logic() = default;
     public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(line_start_matcher_logic const&) -> void = delete;
 
-#line 1600 "regex.h2"
+#line 1803 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1238,14 +1300,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1621 "regex.h2"
+#line 1824 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1623 "regex.h2"
+#line 1826 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1254,14 +1316,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1632 "regex.h2"
+#line 1835 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1634 "regex.h2"
+#line 1837 "regex.h2"
 };
 
 // Named character classes
@@ -1273,7 +1335,7 @@ template                    void = delete;
 
 
-#line 1641 "regex.h2"
+#line 1844 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1283,7 +1345,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1651 "regex.h2"
+#line 1854 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1303,7 +1365,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1697 "regex.h2"
+#line 1900 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1311,10 +1373,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1705 "regex.h2"
+#line 1908 "regex.h2"
 };
 
-#line 1708 "regex.h2"
+#line 1911 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1332,7 +1394,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1727 "regex.h2"
+#line 1930 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1341,7 +1403,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1731 "regex.h2"
+#line 1934 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1357,7 +1419,7 @@ template matched_, context const& ctx_);
 
-#line 1749 "regex.h2"
+#line 1952 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1372,7 +1434,7 @@ template void = delete;
 
 
-#line 1765 "regex.h2"
+#line 1968 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1380,13 +1442,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1777 "regex.h2"
+#line 1980 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1799 "regex.h2"
+#line 2002 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1398,7 +1460,7 @@ template void = delete;
 
 
-#line 1812 "regex.h2"
+#line 2015 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1414,7 +1476,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 1830 "regex.h2"
+#line 2033 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1429,7 +1491,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 1846 "regex.h2"
+#line 2049 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1437,13 +1499,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1858 "regex.h2"
+#line 2061 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1880 "regex.h2"
+#line 2083 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1455,7 +1517,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 1893 "regex.h2"
+#line 2096 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1486,15 +1548,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 1927 "regex.h2"
+#line 2130 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 1933 "regex.h2"
+#line 2136 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 1942 "regex.h2"
+#line 2145 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1507,13 +1569,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 1960 "regex.h2"
+#line 2163 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 1965 "regex.h2"
+#line 2168 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 1970 "regex.h2"
+#line 2173 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1537,144 +1599,131 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 1997 "regex.h2"
+#line 2200 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2006 "regex.h2"
+#line 2209 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2010 "regex.h2"
+#line 2213 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2025 "regex.h2"
+#line 2228 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2031 "regex.h2"
+#line 2234 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2072 "regex.h2"
+#line 2275 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2084 "regex.h2"
+#line 2287 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2090 "regex.h2"
+#line 2293 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2097 "regex.h2"
+#line 2300 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2106 "regex.h2"
+#line 2309 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2114 "regex.h2"
+#line 2317 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2124 "regex.h2"
+#line 2327 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
-    private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
-
-#line 2148 "regex.h2"
-    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
-    public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
-    public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
-
-    public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
-
-#line 2164 "regex.h2"
-    public: [[nodiscard]] auto grab_number() & -> std::string;
-
-#line 2184 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2191 "regex.h2"
+#line 2337 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2203 "regex.h2"
+#line 2349 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2206 "regex.h2"
+#line 2352 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2216 "regex.h2"
+#line 2362 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2234 "regex.h2"
+#line 2380 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2244 "regex.h2"
+#line 2390 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2257 "regex.h2"
+#line 2403 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2293 "regex.h2"
+#line 2439 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2358 "regex.h2"
+#line 2504 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
 
-#line 2369 "regex.h2"
+#line 2515 "regex.h2"
     public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
 
-#line 2382 "regex.h2"
+#line 2528 "regex.h2"
     public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
 
-#line 2390 "regex.h2"
+#line 2536 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2497 "regex.h2"
+#line 2643 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2664 "regex.h2"
+#line 2737 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2796 "regex.h2"
+#line 2869 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2803 "regex.h2"
+#line 2876 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2823 "regex.h2"
+#line 2894 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2845 "regex.h2"
+#line 2916 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2877 "regex.h2"
+#line 2948 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2886 "regex.h2"
+#line 2957 "regex.h2"
 }
 }
 
@@ -2115,32 +2164,56 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 #line 434 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 448 "regex.h2"
-    [[nodiscard]] auto parse_context::next_group() & -> int{
-        auto id {group_count}; 
-        group_count += 1;
-        return id; 
+#line 444 "regex.h2"
+    [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
+        auto g {cur_group}; 
+        cur_group += 1;
+        max_group = max(max_group, cur_group);
+
+        return g; 
     }
 
-#line 454 "regex.h2"
+#line 452 "regex.h2"
+    auto parse_context_branch_reset_state::set_next(cpp2::in g) & -> void{
+        cur_group = g;
+        max_group = max(max_group, g);
+    }
+
+#line 457 "regex.h2"
+    auto parse_context_branch_reset_state::next_alternative() & -> void{
+        if (is_active) {
+            cur_group = from;
+        }
+    }
+
+#line 463 "regex.h2"
+    auto parse_context_branch_reset_state::set_active_reset(cpp2::in restart) & -> void{
+        is_active = true;
+        cur_group = restart;
+        from      = restart;
+        max_group = restart;
+    }
+
+#line 482 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 456 "regex.h2"
+#line 484 "regex.h2"
     }
-#line 454 "regex.h2"
+#line 482 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
         error_text = "";
-        group_count = 1;
         cur_group_state = {};
+        cur_branch_reset_state = {};
+        named_groups = {};
         return *this;
 
-#line 456 "regex.h2"
+#line 484 "regex.h2"
     }
 
-#line 460 "regex.h2"
+#line 488 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2148,30 +2221,46 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 467 "regex.h2"
+#line 495 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 473 "regex.h2"
+#line 504 "regex.h2"
+    [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
+        parse_context_branch_reset_state old_state {}; 
+        std::swap(old_state, cur_branch_reset_state);
+
+        CPP2_UFCS(set_active_reset)(cur_branch_reset_state, old_state.cur_group);
+        return old_state; 
+    }
+
+#line 512 "regex.h2"
+    auto parse_context::branch_reset_restore_state(cpp2::in old_state) & -> void{
+        auto max_group {cur_branch_reset_state.max_group}; 
+        cur_branch_reset_state = old_state;
+        CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(max_group));
+    }
+
+#line 519 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
-        //cur_branch_reset_state.next_alternative(); // TODO:
+        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 478 "regex.h2"
+#line 524 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 482 "regex.h2"
+#line 528 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 486 "regex.h2"
+#line 532 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2182,17 +2271,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 496 "regex.h2"
+#line 542 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 500 "regex.h2"
+#line 547 "regex.h2"
+    [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
+        return cur_branch_reset_state.cur_group; 
+    }
+
+#line 551 "regex.h2"
+    [[nodiscard]] auto parse_context::next_group() & -> int{
+        return CPP2_UFCS(next)(cur_branch_reset_state); 
+    }
+
+#line 555 "regex.h2"
+    [[nodiscard]] auto parse_context::get_named_group(cpp2::in name) const& -> int{
+        auto iter {CPP2_UFCS(find)(named_groups, name)}; 
+        if (iter == CPP2_UFCS(end)(named_groups)) {
+             return -1; 
+        }
+        else {
+            return (*cpp2::assert_not_null(std::move(iter))).second; 
+        }
+    }
+
+#line 565 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 502 "regex.h2"
+#line 567 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 503 "regex.h2"
+#line 568 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> bool{
         if (has_next()) {
             pos += 1; return true; 
@@ -2201,16 +2311,16 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return false; 
     }
 
-#line 511 "regex.h2"
+#line 576 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 513 "regex.h2"
+#line 578 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 518 "regex.h2"
+#line 583 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2250,7 +2360,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 558 "regex.h2"
+#line 623 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2272,14 +2382,48 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 579 "regex.h2"
+#line 644 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 580 "regex.h2"
+#line 645 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 581 "regex.h2"
+#line 646 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 583 "regex.h2"
+#line 648 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_n(cpp2::in n, cpp2::out r) & -> bool{
+        if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
+            r.construct(CPP2_UFCS(substr)(regex, pos, n));
+            pos += n - 1;
+            return true; 
+        }
+        else {
+            r.construct("");
+            return false; 
+        }
+    }
+
+#line 660 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_number() & -> std::string{
+        auto start {pos}; 
+        auto start_search {pos}; 
+        if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
+            start_search += 1;
+        }
+        auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", std::move(start_search))}; 
+
+        cpp2::deferred_init r; 
+        if (end != std::string::npos) {
+            r.construct(CPP2_UFCS(substr)(regex, start, end - start));
+            pos = std::move(end) - 1;
+        }
+        else {
+            r.construct(CPP2_UFCS(substr)(regex, std::move(start)));
+            pos = CPP2_UFCS(size)(regex) - 1;
+        }
+        return std::move(r.value()); 
+    }
+
+#line 680 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2290,12 +2434,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 593 "regex.h2"
+#line 690 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 594 "regex.h2"
+#line 691 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 596 "regex.h2"
+#line 693 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2306,6 +2450,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
             if (!(cur_token) && valid()) {cur_token = alternative_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = any_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = group_ref_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
@@ -2323,10 +2468,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 623 "regex.h2"
+#line 721 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 632 "regex.h2"
+#line 730 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2334,27 +2479,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 639 "regex.h2"
+#line 737 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 654 "regex.h2"
+#line 752 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 656 "regex.h2"
+#line 754 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 661 "regex.h2"
+#line 759 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 666 "regex.h2"
+#line 764 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2362,14 +2507,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 673 "regex.h2"
+#line 771 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 679 "regex.h2"
+#line 777 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2378,7 +2523,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 687 "regex.h2"
+#line 785 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2400,22 +2545,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 709 "regex.h2"
+#line 807 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 713 "regex.h2"
+#line 811 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 717 "regex.h2"
+#line 815 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 721 "regex.h2"
+#line 819 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2425,14 +2570,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 730 "regex.h2"
+#line 828 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 736 "regex.h2"
+#line 834 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2445,38 +2590,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 748 "regex.h2"
+#line 846 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 752 "regex.h2"
+#line 850 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 756 "regex.h2"
+#line 854 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 762 "regex.h2"
+#line 860 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 768 "regex.h2"
+#line 866 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 774 "regex.h2"
+#line 872 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2485,7 +2630,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 782 "regex.h2"
+#line 880 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2494,22 +2639,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 796 "regex.h2"
+#line 894 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 799 "regex.h2"
+#line 897 "regex.h2"
     }
 
-#line 801 "regex.h2"
+#line 899 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 807 "regex.h2"
+#line 905 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2520,7 +2665,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 817 "regex.h2"
+#line 915 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2531,30 +2676,30 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 830 "regex.h2"
+#line 928 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 832 "regex.h2"
+#line 930 "regex.h2"
     }
 
-#line 834 "regex.h2"
+#line 932 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 836 "regex.h2"
+#line 934 "regex.h2"
     }
 
-#line 838 "regex.h2"
+#line 936 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 848 "regex.h2"
+#line 946 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 850 "regex.h2"
+#line 948 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2563,22 +2708,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 858 "regex.h2"
+#line 956 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 869 "regex.h2"
+#line 967 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 872 "regex.h2"
+#line 970 "regex.h2"
     }
 
-#line 874 "regex.h2"
+#line 972 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2593,7 +2738,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 888 "regex.h2"
+#line 986 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2605,7 +2750,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 899 "regex.h2"
+#line 997 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2620,11 +2765,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 914 "regex.h2"
+#line 1012 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 917 "regex.h2"
+#line 1015 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -2643,50 +2788,50 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 941 "regex.h2"
+#line 1039 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 943 "regex.h2"
+#line 1041 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared);
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 949 "regex.h2"
+#line 1047 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 954 "regex.h2"
+#line 1052 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
         cur += 1;
-        return true;
+        return true; 
     }
     else {
-        return false;
+        return false; 
     }
 }
 
-#line 970 "regex.h2"
+#line 1068 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 973 "regex.h2"
+#line 1071 "regex.h2"
     }
 
-#line 975 "regex.h2"
+#line 1073 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 979 "regex.h2"
+#line 1077 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2695,7 +2840,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 986 "regex.h2"
+#line 1084 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2717,7 +2862,141 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1013 "regex.h2"
+#line 1116 "regex.h2"
+    group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
+        : regex_token_base{ str }
+        , id{ id_ }{
+
+#line 1119 "regex.h2"
+    }
+
+#line 1121 "regex.h2"
+    [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
+        if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+
+        std::string str {"\\\\"}; 
+        std::string group {""}; 
+
+        if ([_0 = '0', _1 = CPP2_UFCS(peek)(ctx), _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
+            static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+            group = CPP2_UFCS(grab_number)(ctx);
+            if (cpp2::cmp_greater_eq(CPP2_UFCS(ssize)(group),3)) {
+                // Octal syntax (\000) not a group ref matcher.
+                auto number {0}; 
+                if (!(string_to_int(group, number, 8))) {return CPP2_UFCS(error)(ctx, "Could not convert octal to int."); }
+
+                char number_as_char {unsafe_narrow(std::move(number))}; 
+
+                auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char)}; 
+                CPP2_UFCS(set_string)((*cpp2::assert_not_null(token)), ("\\" + cpp2::to_string(int_to_string(cpp2::as_(std::move(number_as_char)), 8))));
+
+                return token; 
+            }
+
+            str += group;
+            // Regular group ref
+        }
+        else {if ('g' == CPP2_UFCS(peek)(ctx)) {
+            static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+            if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group escape without a following char."); }// Skip g
+
+            str += "g";
+
+            if (CPP2_UFCS(current)(ctx) == '{') {
+                str += "{";
+                if (!((CPP2_UFCS(next)(ctx) && CPP2_UFCS(grab_until)(ctx, '}', cpp2::out(&group))))) {return CPP2_UFCS(error)(ctx, "No ending bracket."); }
+
+                str += group + "}";
+            }
+            else {
+                group = CPP2_UFCS(grab_number)(ctx);
+                str += group;
+            }
+        }
+        else {if ('k' == CPP2_UFCS(peek)(ctx)) {
+            static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+            if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group escape without a following char."); }// Skip k
+
+            str += "k";
+
+            auto term_char {'\0'}; 
+            if (CPP2_UFCS(current)(ctx) == '{') {term_char = '}'; }
+            else {if (CPP2_UFCS(current)(ctx) == '<') {term_char = '>'; }
+            else {if (CPP2_UFCS(current)(ctx) == '\'') {term_char = '\''; }
+            else {
+                return CPP2_UFCS(error)(ctx, "Group escape has wrong operator."); 
+            }}}
+
+            str += CPP2_UFCS(current)(ctx);
+
+            if (!((CPP2_UFCS(next)(ctx) && CPP2_UFCS(grab_until)(ctx, term_char, cpp2::out(&group))))) {return CPP2_UFCS(error)(ctx, "No ending bracket."); }
+
+            str += group + std::move(term_char);
+        }
+        else {
+            // No group ref matcher
+            return nullptr; 
+        }}}
+
+        // Parse the group
+        group = trim_copy(group);
+        int group_id {0}; 
+        if (string_to_int(group, group_id)) {
+            if (cpp2::cmp_less(group_id,0)) {
+                group_id = CPP2_UFCS(get_cur_group)(ctx) + group_id;
+
+                if (cpp2::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
+                    return CPP2_UFCS(error)(ctx, ("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)")); 
+                }
+            }
+
+            if (cpp2::cmp_greater_eq(group_id,CPP2_UFCS(get_cur_group)(ctx))) {
+                return CPP2_UFCS(error)(ctx, "Group reference is used before the group is declared."); 
+            }
+        }
+        else {
+            // Named group
+            group_id = CPP2_UFCS(get_named_group)(ctx, group);
+            if (-1 == group_id) {return CPP2_UFCS(error)(ctx, ("Group names does not exist. (Name is: " + cpp2::to_string(std::move(group)) + ")")); }
+        }
+
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
+    }
+
+#line 1213 "regex.h2"
+    auto group_ref_token::generate_code(generation_context& ctx) const -> void{
+        CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+    }
+
+    group_ref_token::~group_ref_token() noexcept{}
+
+#line 1218 "regex.h2"
+template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+    auto g {CPP2_UFCS(get_group)(ctx, group)}; 
+
+    auto group_pos {g.start}; 
+    for( ; group_pos != g.end && cur != ctx.end; (++group_pos, ++cur) ) {
+        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+            if (safe_tolower(*cpp2::assert_not_null(group_pos)) != safe_tolower(*cpp2::assert_not_null(cur))) {
+                return false; 
+            }
+        }
+        else {
+            if (*cpp2::assert_not_null(group_pos) != *cpp2::assert_not_null(cur)) {
+                return false; 
+            }
+        }
+    }
+
+    if (std::move(group_pos) == std::move(g).end) {
+        return true; 
+    }
+    else {
+        return false; 
+    }
+}
+
+#line 1249 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -2725,7 +3004,7 @@ template [[nodiscard]] auto char_toke
 
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
 
-#line 1021 "regex.h2"
+#line 1257 "regex.h2"
         (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
 
         auto old_state {CPP2_UFCS(start_group)(ctx)}; 
@@ -2736,7 +3015,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1031 "regex.h2"
+#line 1267 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -2754,7 +3033,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1048 "regex.h2"
+#line 1284 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         if (-1 == number) {
             return {  }; 
@@ -2766,11 +3045,11 @@ template [[nodiscard]] auto char_toke
 
     group_token::~group_token() noexcept{}
 
-#line 1068 "regex.h2"
+#line 1304 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1070 "regex.h2"
+#line 1306 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -2814,7 +3093,7 @@ template [[nodiscard]] auto char_toke
                 }
             }
 
-#line 1114 "regex.h2"
+#line 1350 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -2841,7 +3120,7 @@ template [[nodiscard]] auto char_toke
         return nullptr; 
     }
 
-#line 1140 "regex.h2"
+#line 1376 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -2853,7 +3132,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1151 "regex.h2"
+#line 1387 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -2866,7 +3145,7 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1163 "regex.h2"
+#line 1399 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -2891,7 +3170,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1187 "regex.h2"
+#line 1423 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -2900,12 +3179,12 @@ template [[nodiscard]] auto char_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1195 "regex.h2"
+#line 1431 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 1200 "regex.h2"
+#line 1436 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -2918,26 +3197,26 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1212 "regex.h2"
+#line 1448 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1217 "regex.h2"
+#line 1453 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1222 "regex.h2"
+#line 1458 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1228 "regex.h2"
+#line 1464 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -2953,7 +3232,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 1243 "regex.h2"
+#line 1479 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -2982,7 +3261,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1271 "regex.h2"
+#line 1507 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3007,7 +3286,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1295 "regex.h2"
+#line 1531 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3033,7 +3312,7 @@ template [[nodiscard]] auto char_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1326 "regex.h2"
+#line 1562 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3056,7 +3335,7 @@ template [[nodiscard]] auto char_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1349 "regex.h2"
+#line 1585 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3066,14 +3345,14 @@ template [[nodiscard]] auto char_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1369 "regex.h2"
+#line 1605 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1370 "regex.h2"
+#line 1606 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1371 "regex.h2"
+#line 1607 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1378 "regex.h2"
+#line 1614 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3093,12 +3372,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1397 "regex.h2"
+#line 1633 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1398 "regex.h2"
+#line 1634 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1406 "regex.h2"
+#line 1642 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3118,7 +3397,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1425 "regex.h2"
+#line 1661 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3131,10 +3410,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1437 "regex.h2"
+#line 1673 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1439 "regex.h2"
+#line 1675 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -3146,18 +3425,18 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1454 "regex.h2"
+#line 1690 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1459 "regex.h2"
+#line 1695 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1460 "regex.h2"
+#line 1696 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1466 "regex.h2"
+#line 1702 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -3165,14 +3444,14 @@ template [[nodiscard]] auto char_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1473 "regex.h2"
+#line 1709 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1479 "regex.h2"
+#line 1715 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -3195,7 +3474,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1503 "regex.h2"
+#line 1739 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -3207,10 +3486,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1514 "regex.h2"
+#line 1750 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1516 "regex.h2"
+#line 1752 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -3220,46 +3499,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1527 "regex.h2"
+#line 1763 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1528 "regex.h2"
+#line 1764 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1529 "regex.h2"
+#line 1765 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1535 "regex.h2"
-    template  template [[nodiscard]] auto group_ref_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        auto g {CPP2_UFCS(get_group)(ctx, group)}; 
-
-        auto pos {cur}; 
-        auto group_pos {g.start}; 
-        for( ; group_pos != g.end && pos != ctx.end; (++group_pos, ++pos) ) {
-            if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
-                if (safe_tolower(*cpp2::assert_not_null(group_pos)) != safe_tolower(*cpp2::assert_not_null(pos))) {
-                    return CPP2_UFCS(fail)(ctx); 
-                }
-            }
-            else {
-                if (*cpp2::assert_not_null(group_pos) != *cpp2::assert_not_null(pos)) {
-                    return CPP2_UFCS(fail)(ctx); 
-                }
-            }
-        }
-
-        if (std::move(group_pos) == std::move(g).end) {
-            return Other::match(std::move(pos), ctx, modifiers, end_func); 
-        }
-        else {
-            return CPP2_UFCS(fail)(ctx); 
-        }
-
-    }
-#line 1561 "regex.h2"
-    template  auto group_ref_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1562 "regex.h2"
-    template  [[nodiscard]] auto group_ref_matcher_logic::to_string() -> auto { return CPP2_UFCS(str)(symbol); }
-
-#line 1569 "regex.h2"
+#line 1772 "regex.h2"
     template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -3272,12 +3519,12 @@ template [[nodiscard]] auto char_toke
         }}
     }
 
-#line 1581 "regex.h2"
+#line 1784 "regex.h2"
     template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1582 "regex.h2"
+#line 1785 "regex.h2"
     template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
 
-#line 1589 "regex.h2"
+#line 1792 "regex.h2"
     template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
             return Other::match(cur, ctx, modifiers, end_func); 
@@ -3287,12 +3534,12 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1598 "regex.h2"
+#line 1801 "regex.h2"
     template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1599 "regex.h2"
+#line 1802 "regex.h2"
     template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
 
-#line 1606 "regex.h2"
+#line 1809 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -3308,21 +3555,21 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1621 "regex.h2"
+#line 1824 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1622 "regex.h2"
+#line 1825 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1629 "regex.h2"
+#line 1832 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1632 "regex.h2"
+#line 1835 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1633 "regex.h2"
+#line 1836 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1668 "regex.h2"
+#line 1871 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -3352,9 +3599,9 @@ template [[nodiscard]] auto char_toke
         }
 
     }
-#line 1697 "regex.h2"
+#line 1900 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1698 "regex.h2"
+#line 1901 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -3363,7 +3610,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1719 "regex.h2"
+#line 1922 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -3373,34 +3620,34 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1730 "regex.h2"
+#line 1933 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1744 "regex.h2"
+#line 1947 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1747 "regex.h2"
+#line 1950 "regex.h2"
         }
 
-#line 1749 "regex.h2"
+#line 1952 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1750 "regex.h2"
+#line 1953 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1751 "regex.h2"
+#line 1954 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1752 "regex.h2"
+#line 1955 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1754 "regex.h2"
+#line 1957 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1755 "regex.h2"
+#line 1958 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1756 "regex.h2"
+#line 1959 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1758 "regex.h2"
+#line 1961 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -3409,13 +3656,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1767 "regex.h2"
+#line 1970 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1768 "regex.h2"
+#line 1971 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1769 "regex.h2"
+#line 1972 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1770 "regex.h2"
+#line 1973 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3423,13 +3670,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1777 "regex.h2"
+#line 1980 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1778 "regex.h2"
+#line 1981 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1779 "regex.h2"
+#line 1982 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1780 "regex.h2"
+#line 1983 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3449,10 +3696,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1799 "regex.h2"
+#line 2002 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1804 "regex.h2"
+#line 2007 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3462,31 +3709,31 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1825 "regex.h2"
+#line 2028 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1828 "regex.h2"
+#line 2031 "regex.h2"
         }
 
-#line 1830 "regex.h2"
+#line 2033 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1831 "regex.h2"
+#line 2034 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1832 "regex.h2"
+#line 2035 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1833 "regex.h2"
+#line 2036 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1835 "regex.h2"
+#line 2038 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1836 "regex.h2"
+#line 2039 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1837 "regex.h2"
+#line 2040 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1839 "regex.h2"
+#line 2042 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3495,13 +3742,13 @@ template [[nodiscard]] auto char_toke
             return group_id; 
         }
 
-#line 1848 "regex.h2"
+#line 2051 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1849 "regex.h2"
+#line 2052 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1850 "regex.h2"
+#line 2053 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1851 "regex.h2"
+#line 2054 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3509,13 +3756,13 @@ template [[nodiscard]] auto char_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1858 "regex.h2"
+#line 2061 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1859 "regex.h2"
+#line 2062 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1860 "regex.h2"
+#line 2063 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1861 "regex.h2"
+#line 2064 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3535,10 +3782,10 @@ template [[nodiscard]] auto char_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 1880 "regex.h2"
+#line 2083 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 1885 "regex.h2"
+#line 2088 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3548,24 +3795,24 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1921 "regex.h2"
+#line 2124 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 1927 "regex.h2"
+#line 2130 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 1933 "regex.h2"
+#line 2136 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 1935 "regex.h2"
+#line 2138 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3573,10 +3820,10 @@ template [[nodiscard]] auto char_toke
         static_cast(std::move(last));
     }
 
-#line 1942 "regex.h2"
+#line 2145 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 1952 "regex.h2"
+#line 2155 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3585,29 +3832,29 @@ template [[nodiscard]] auto char_toke
         return g; 
     }
 
-#line 1960 "regex.h2"
+#line 2163 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 1965 "regex.h2"
+#line 2168 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 1991 "regex.h2"
+#line 2194 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 1995 "regex.h2"
+#line 2198 "regex.h2"
     }
 
-#line 1999 "regex.h2"
+#line 2202 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3615,12 +3862,12 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 2006 "regex.h2"
+#line 2209 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2013 "regex.h2"
+#line 2216 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3633,14 +3880,14 @@ template [[nodiscard]] auto char_toke
         return old_state; 
     }
 
-#line 2025 "regex.h2"
+#line 2228 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2034 "regex.h2"
+#line 2237 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3679,7 +3926,7 @@ template [[nodiscard]] auto char_toke
         return cur; 
     }
 
-#line 2072 "regex.h2"
+#line 2275 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3692,14 +3939,14 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2084 "regex.h2"
+#line 2287 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2085 "regex.h2"
+#line 2288 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2086 "regex.h2"
+#line 2289 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2090 "regex.h2"
+#line 2293 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3707,7 +3954,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2097 "regex.h2"
+#line 2300 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3717,7 +3964,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2106 "regex.h2"
+#line 2309 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3726,7 +3973,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2114 "regex.h2"
+#line 2317 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3737,81 +3984,18 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2124 "regex.h2"
+#line 2327 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2125 "regex.h2"
+#line 2328 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2127 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
-        auto start {pos}; 
-        auto end {pos}; 
-        if (any) {
-            end = CPP2_UFCS(find_first_of)(regex, e, pos);
-        }
-        else {
-            end = CPP2_UFCS(find)(regex, e, pos);
-        }
-
-        if (end != std::string_view::npos) {
-            r.construct(CPP2_UFCS(substr)(regex, std::move(start), end - pos));
-            pos = std::move(end);
-            return true; 
-        }
-        else {
-            r.construct("");
-            return false; 
-        }
-    }
-
-#line 2148 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 2149 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 2150 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
-
-#line 2152 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_n(cpp2::in n, cpp2::out r) & -> bool{
-        if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
-            r.construct(CPP2_UFCS(substr)(regex, pos, n));
-            pos += n - 1;
-            return true; 
-        }
-        else {
-            r.construct("");
-            return false; 
-        }
-    }
-
-#line 2164 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::grab_number() & -> std::string{
-        auto start {pos}; 
-        auto start_search {pos}; 
-        if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
-            start_search += 1;
-        }
-        auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", std::move(start_search))}; 
-
-        cpp2::deferred_init r; 
-        if (end != std::string::npos) {
-            r.construct(CPP2_UFCS(substr)(regex, start, end - start));
-            pos = std::move(end) - 1;
-        }
-        else {
-            r.construct(CPP2_UFCS(substr)(regex, std::move(start)));
-            pos = CPP2_UFCS(size)(regex) - 1;
-        }
-        return std::move(r.value()); 
-    }
-
-#line 2186 "regex.h2"
+#line 2332 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2191 "regex.h2"
+#line 2337 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -3824,10 +4008,10 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2203 "regex.h2"
+#line 2349 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2209 "regex.h2"
+#line 2355 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3835,10 +4019,10 @@ template [[nodiscard]] auto char_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2216 "regex.h2"
+#line 2362 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2218 "regex.h2"
+#line 2364 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -3855,7 +4039,7 @@ template [[nodiscard]] auto char_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2234 "regex.h2"
+#line 2380 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -3866,7 +4050,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2246 "regex.h2"
+#line 2392 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -3878,7 +4062,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2257 "regex.h2"
+#line 2403 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -3915,7 +4099,7 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 2293 "regex.h2"
+#line 2439 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -3981,7 +4165,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2361 "regex.h2"
+#line 2507 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
         if (c != '|') {return false; }
 
@@ -3990,7 +4174,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2369 "regex.h2"
+#line 2515 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
         if (c == '^') {
             CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
@@ -4004,7 +4188,7 @@ template [[nodiscard]] auto char_toke
         return false; 
     }
 
-#line 2382 "regex.h2"
+#line 2528 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
         if (c != '.') {return false; }
 
@@ -4013,7 +4197,7 @@ template [[nodiscard]] auto char_toke
 
     }
 
-#line 2390 "regex.h2"
+#line 2536 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -4121,60 +4305,14 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2497 "regex.h2"
+#line 2643 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
-        auto start {pos}; // Keep start for group matchers.
         auto c_next {'\0'}; 
         if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
 
-        auto add_group_matcher {[&, _1 = std::move(start), _2 = (&pos)](cpp2::in name) mutable -> bool{
-
-            auto name_trim {trim_copy(name)}; 
-            int group_id {0}; 
-            if (string_to_int(name_trim, group_id)) {
-                if (cpp2::cmp_less(group_id,0)) {
-                    group_id = cur_branch_reset_state.cur_group + group_id;
-
-                    if (cpp2::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
-                        error(("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)"));
-                        return false; 
-                    }
-                }
-
-                if (cpp2::cmp_greater_eq(group_id,cur_branch_reset_state.cur_group)) {error("Group reference is used before the group is declared."); return false; }
-            }
-            else {
-                // Named group
-                auto iter {CPP2_UFCS(find)(named_groups, std::move(name_trim))}; 
-                if (iter == CPP2_UFCS(end)(named_groups)) {error(("Group names does not exist. (Name is: " + cpp2::to_string(name) + ")")); return false; }
-
-                group_id = (*cpp2::assert_not_null(std::move(iter))).second;
-            }
-            CPP2_UFCS(add)(cur_group_state, create_matcher("group_ref_matcher_logic", (cpp2::to_string(std::move(group_id)) + ", \"\\" + cpp2::to_string(CPP2_UFCS(substr)(regex, _1, *cpp2::assert_not_null(_2) - _1 + 1)) + "\"")));
-
-            return true; 
-        }}; 
-
-        if ([_0 = '0', _1 = c_next, _2 = '9']{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }()) {
-            auto group {grab_number()}; 
-            if (cpp2::cmp_greater_eq(CPP2_UFCS(ssize)(group),3)) {
-                // \000 syntax
-                auto number {0}; 
-                if (!(string_to_int(std::move(group), number, 8))) {error("Could not convert octal to int."); return false; }
-
-                char number_as_char {unsafe_narrow(std::move(number))}; 
-
-                std::string syntax {"\\" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8))}; 
-                auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
-                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
-            }
-            else {
-                if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
-            }
-        }
-        else {if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae^.[]$()*{}?+|"), c_next)) {
+        if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae^.[]$()*{}?+|"), c_next)) {
             if (c_next == '$') {
                 // TODO: Provide proper escape for cppfront capture
                 CPP2_UFCS(add)(cur_group_state, create_matcher("line_end_matcher_logic", "true, true"));
@@ -4188,33 +4326,6 @@ template [[nodiscard]] auto char_toke
             auto inner {create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'")}; 
             CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\\\\\\", " + cpp2::to_string(std::move(inner)))));
         }
-        else {if ('g' == c_next) {
-            if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
-
-            std::string group {""}; 
-            if (c_next == '{') {
-                if (!((next(cpp2::out(&c_next)) && grab_until('}', cpp2::out(&group))))) {error("No ending bracket."); return false; }
-            }
-            else {
-                group = grab_number();
-            }
-            if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
-        }
-        else {if ('k' == c_next) {
-            if (!(next(cpp2::out(&c_next)))) {error("Group escape without a following char."); return false; }
-
-            auto term_char {'\0'}; 
-            if (c_next == '{') {term_char = '}'; }
-            else {if (c_next == '<') {term_char = '>'; }
-            else {if (c_next == '\'') {term_char = '\''; }
-            else {
-                error("Group escape has wrong operator."); return false; 
-            }}}
-
-            std::string group {""}; 
-            if (!((next(cpp2::out(&c_next)) && grab_until(std::move(term_char), cpp2::out(&group))))) {error("No ending bracket."); return false; }
-            if (!(std::move(add_group_matcher)(std::move(group)))) {return false; }
-        }
         else {if ('K' == c_next) {
             CPP2_UFCS(add)(cur_group_state, create_matcher("global_group_reset", ""));
         }
@@ -4284,12 +4395,12 @@ template [[nodiscard]] auto char_toke
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}}}}}}}}}}}
+        }}}}}}}}}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 2664 "regex.h2"
+#line 2737 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -4422,7 +4533,7 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2796 "regex.h2"
+#line 2869 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4430,14 +4541,12 @@ template [[nodiscard]] auto char_toke
         return true; 
     }
 
-#line 2803 "regex.h2"
+#line 2876 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
             if (c == term) {return ; }
 
-            if (!(has_error) && is_alternative(c)) {continue; }
-            if (!(has_error) && is_any(c)) {continue; }
             if (!(has_error) && is_class(c)) {continue; }
             if (!(has_error) && is_escape(c)) {continue; }
             if (!(has_error) && is_anchor(c)) {continue; }
@@ -4451,7 +4560,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 2823 "regex.h2"
+#line 2894 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4474,7 +4583,7 @@ template [[nodiscard]] auto char_toke
         return res; 
     }
 
-#line 2845 "regex.h2"
+#line 2916 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4484,7 +4593,7 @@ template [[nodiscard]] auto char_toke
         }
 
         source += "{\n";
-        source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
+        source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
         source += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
 
         generation_context gen_ctx {}; 
@@ -4508,7 +4617,7 @@ template [[nodiscard]] auto char_toke
         return source; 
     }
 
-#line 2879 "regex.h2"
+#line 2950 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 9e0d7327d2..fa3f9af5ed 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -434,6 +434,40 @@ parse_context_group_state: @struct type = {
     empty: (this) -> bool = cur_match_list.empty();
 }
 
+// State for the branch reset. Takes care of the group numbering. See '(|)'.
+parse_context_branch_reset_state: @struct type = {
+    is_active : bool = false;
+    cur_group : int  = 1; // Global capture group.
+    max_group : int  = 1;
+    from      : int  = 1;
+
+    next: (inout this) -> int = {
+        g := cur_group;
+        cur_group += 1;
+        max_group = max(max_group, cur_group);
+
+        return g;
+    }
+
+    set_next: (inout this, g: int) = {
+        cur_group = g;
+        max_group = max(max_group, g);
+    }
+
+    next_alternative: (inout this) = {
+        if is_active {
+            cur_group = from;
+        }
+    }
+
+    set_active_reset: (inout this, restart: int) = {
+        is_active = true;
+        cur_group = restart;
+        from      = restart;
+        max_group = restart;
+    }
+}
+
 parse_context: type = {
     regex: std::string_view;
 
@@ -441,15 +475,9 @@ parse_context: type = {
 
     public error_text: std::string = "";
 
-    public group_count: int = 1; // Root group.
-
     cur_group_state:        parse_context_group_state = ();
-
-    next_group: (inout this) -> int = {
-        id := group_count;
-        group_count += 1;
-        return id;
-    }
+    cur_branch_reset_state: parse_context_branch_reset_state = ();
+    named_groups :          std::map = ();
 
     operator=:(out this, r: std::string_view) = {
         regex = r;
@@ -470,9 +498,27 @@ parse_context: type = {
         return inner;
     }
 
+    // Branch reset management functions
+    //
+
+    branch_reset_new_state: (inout this) -> parse_context_branch_reset_state = {
+        old_state: parse_context_branch_reset_state = ();
+        std::swap(old_state, cur_branch_reset_state);
+
+        cur_branch_reset_state.set_active_reset(old_state.cur_group);
+        return old_state;
+    }
+
+    branch_reset_restore_state: (inout this, old_state: parse_context_branch_reset_state) = {
+        max_group := cur_branch_reset_state.max_group;
+        cur_branch_reset_state = old_state;
+        cur_branch_reset_state.set_next(max_group);
+    }
+
+
     next_alternative: (inout this) = {
         cur_group_state.next_alternative();
-        //cur_branch_reset_state.next_alternative(); // TODO:
+        cur_branch_reset_state.next_alternative();
     }
 
     add_token: (inout this, token: token_ptr) = {
@@ -497,6 +543,25 @@ parse_context: type = {
         return cur_group_state.get_tokens();
     }
 
+    // Group management
+    get_cur_group: (this) -> int = {
+        return cur_branch_reset_state.cur_group;
+    }
+
+    next_group: (inout this) -> int = {
+        return cur_branch_reset_state.next();
+    }
+
+    get_named_group: (this, name: std::string) -> int = {
+        iter := named_groups.find(name);
+        if iter == named_groups.end() {
+             return -1;
+        }
+        else {
+            return iter*.second;
+        }
+    }
+
     current: (this) -> char = { return regex[pos]; }
 
     has_next: (this) -> bool = { return pos < regex.size(); }
@@ -580,6 +645,38 @@ parse_context: type = {
     grab_until: (inout this, in e: char, out r: std::string)               grab_until_impl(std::string(1, e), out r, false);
     grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true);
 
+    grab_n: (inout this, in n: int, out r: std::string) -> bool = {
+        if pos + n <= regex.size() {
+            r = regex.substr(pos, n);
+            pos += n - 1;
+            return true;
+        }
+        else {
+            r = "";
+            return false;
+        }
+    }
+
+    grab_number: (inout this) -> std::string = {
+        start := pos;
+        start_search := pos;
+        if regex[start_search] == '-' {
+            start_search += 1;
+        }
+        end := regex.find_first_not_of("1234567890", start_search);
+
+        r : std::string;
+        if end != std::string::npos {
+            r = regex.substr(start, end - start);
+            pos = end - 1;
+        }
+        else {
+            r = regex.substr(start);
+            pos = regex.size() - 1;
+        }
+        return r;
+    }
+
     private peek_impl: (in this, in_class: bool) -> char = {
         next_pos := get_next_position(in_class, false);
         if next_pos < regex.size() {
@@ -603,6 +700,7 @@ parse_context: type = {
 
             if !cur_token && valid() { cur_token = alternative_token::parse(this); }
             if !cur_token && valid() { cur_token = any_token::parse(this); }
+            if !cur_token && valid() { cur_token = group_ref_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
@@ -1004,6 +1102,144 @@ char_token_matcher:  (inout cur, inout ctx,
     }
 }
 
+// Regex syntax: \  Example: \1
+//               \g{name_or_number}
+//               \k{name_or_number}
+//               \k
+//               \k'name_or_number'
+//
+group_ref_token: @polymorphic_base type = {
+    this: regex_token_base = ();
+
+    id: int;
+
+    operator=:(out this, id_: int, str: std::string) = {
+        regex_token_base = str;
+        id = id_;
+    }
+
+    parse: (inout ctx: parse_context) -> token_ptr = {
+        if ctx.current() != '\\' { return nullptr; }
+
+        str : std::string = "\\\\";
+        group : std::string = "";
+
+        if '0' <= ctx.peek() <= '9' {
+            _ = ctx.next(); // Skip escape
+            group = ctx.grab_number();
+            if group.ssize() >= 3 {
+                // Octal syntax (\000) not a group ref matcher.
+                number := 0;
+                if !string_to_int(group, number, 8) { return ctx.error("Could not convert octal to int."); }
+
+                number_as_char : char = unsafe_narrow(number);
+
+                token := shared.new(number_as_char);
+                token*.set_string("\\(int_to_string(number_as_char as int, 8))$");
+
+                return token;
+            }
+
+            str += group;
+            // Regular group ref
+        }
+        else if 'g' == ctx.peek() {
+            _ = ctx.next(); // Skip escape
+            if !ctx.next() { return ctx.error("Group escape without a following char."); } // Skip g
+
+            str += "g";
+
+            if ctx.current() == '{' {
+                str += "{";
+                if !(ctx.next() && ctx.grab_until('}', out group)) { return ctx.error("No ending bracket."); }
+
+                str += group + "}";
+            }
+            else {
+                group = ctx.grab_number();
+                str += group;
+            }
+        }
+        else if 'k' == ctx.peek() {
+            _ = ctx.next(); // Skip escape
+            if !ctx.next() { return ctx.error("Group escape without a following char."); } // Skip k
+
+            str += "k";
+
+            term_char := '\0';
+            if ctx.current() == '{' { term_char = '}'; }
+            else if ctx.current() == '<' { term_char = '>'; }
+            else if ctx.current() == '\'' { term_char = '\''; }
+            else {
+                return ctx.error("Group escape has wrong operator.");
+            }
+
+            str += ctx.current();
+
+            if !(ctx.next() && ctx.grab_until(term_char, out group)) { return ctx.error("No ending bracket."); }
+
+            str += group + term_char;
+        }
+        else {
+            // No group ref matcher
+            return nullptr;
+        }
+
+        // Parse the group
+        group = trim_copy(group);
+        group_id : int = 0;
+        if string_to_int(group, group_id) {
+            if group_id < 0 {
+                group_id = ctx.get_cur_group() + group_id;
+
+                if group_id < 1 { // Negative and zero are no valid groups.
+                    return ctx.error("Relative group reference does not reference a valid group. (Would be (group_id)$.)");
+                }
+            }
+
+            if group_id >= ctx.get_cur_group() {
+                return ctx.error("Group reference is used before the group is declared.");
+            }
+        }
+        else {
+            // Named group
+            group_id = ctx.get_named_group(group);
+            if -1 == group_id { return ctx.error("Group names does not exist. (Name is: (group)$)");}
+        }
+
+        return shared.new(group_id, str);
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx.add_check("group_ref_token_matcher((ctx.match_parameters())$)");
+    }
+}
+
+group_ref_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
+    g := ctx.get_group(group);
+
+    group_pos := g.start;
+    while group_pos != g.end && cur != ctx.end next (group_pos++, cur++) {
+        if modifiers.has_flag(expression_flags::case_insensitive) {
+            if safe_tolower(group_pos*) != safe_tolower(cur*) {
+                return false;
+            }
+        }
+        else {
+            if group_pos* != cur* {
+                return false;
+            }
+        }
+    }
+
+    if group_pos == g.end {
+        return true;
+    }
+    else {
+        return false;
+    }
+}
+
 group_token: @polymorphic_base type = {
     this: regex_token = ();
 
@@ -1529,39 +1765,6 @@ special_group_end_logic:  type = {
     to_string:    ()  bstring(")");
 }
 
-// Regex syntax: \  Example: \1
-//
-group_ref_matcher_logic:  type = {
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        g := ctx.get_group(group);
-
-        pos := cur;
-        group_pos := g.start;
-        while group_pos != g.end && pos != ctx.end next (group_pos++, pos++) {
-            if modifiers.has_flag(expression_flags::case_insensitive) {
-                if safe_tolower(group_pos*) != safe_tolower(pos*) {
-                    return ctx.fail();
-                }
-            }
-            else {
-                if group_pos* != pos* {
-                    return ctx.fail();
-                }
-            }
-        }
-
-        if group_pos == g.end {
-            return Other::match(pos, ctx, modifiers, end_func);
-        }
-        else {
-            return ctx.fail();
-        }
-
-    }
-    reset_ranges: (_) = {}
-    to_string:    ()  symbol.str();
-}
-
 // Regex syntax: $  Example: aa$
 //
 line_end_matcher_logic:  type =
@@ -2124,63 +2327,6 @@ regex_parser:  type = {
     peek: (in this)          peek_impl(false);
     peek_in_class: (in this) peek_impl(true);
 
-    private grab_until_impl: (inout this, in e: std::string, out r: std::string, any: bool) -> bool = {
-        start := pos;
-        end:= pos;
-        if any {
-            end = regex.find_first_of(e, pos);
-        }
-        else {
-            end = regex.find(e, pos);
-        }
-
-        if end != std::string_view::npos {
-            r = regex.substr(start, end - pos);
-            pos = end;
-            return true;
-        }
-        else {
-            r = "";
-            return false;
-        }
-    }
-
-    grab_until: (inout this, in e: std::string, out r: std::string)        grab_until_impl(e, out r, false);
-    grab_until: (inout this, in e: char, out r: std::string)               grab_until_impl(std::string(1, e), out r, false);
-    grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true);
-
-    grab_n: (inout this, in n: int, out r: std::string) -> bool = {
-        if pos + n <= regex.size() {
-            r = regex.substr(pos, n);
-            pos += n - 1;
-            return true;
-        }
-        else {
-            r = "";
-            return false;
-        }
-    }
-
-    grab_number: (inout this) -> std::string = {
-        start := pos;
-        start_search := pos;
-        if regex[start_search] == '-' {
-            start_search += 1;
-        }
-        end := regex.find_first_not_of("1234567890", start_search);
-
-        r : std::string;
-        if end != std::string::npos {
-            r = regex.substr(start, end - start);
-            pos = end - 1;
-        }
-        else {
-            r = regex.substr(start);
-            pos = regex.size() - 1;
-        }
-        return r;
-    }
-
     // Misc functions
     //
     error:(inout this, message: std::string) = {
@@ -2497,56 +2643,10 @@ regex_parser:  type = {
     is_escape: (inout this, c: char) -> bool = {
         if c != '\\' { return false; }
 
-        start := pos; // Keep start for group matchers.
         c_next := '\0';
         if !next(out c_next) { error("Escape without a following character."); return false; }
 
-        add_group_matcher:= :(name: std::string) -> bool = {
-
-            name_trim := trim_copy(name);
-            group_id : int = 0;
-            if string_to_int(name_trim, group_id) {
-                if group_id < 0 {
-                    group_id = cur_branch_reset_state.cur_group + group_id;
-
-                    if group_id < 1 { // Negative and zero are no valid groups.
-                        error("Relative group reference does not reference a valid group. (Would be (group_id)$.)");
-                        return false;
-                    }
-                }
-
-                if group_id >= cur_branch_reset_state.cur_group { error("Group reference is used before the group is declared."); return false; }
-            }
-            else {
-                // Named group
-                iter := named_groups.find(name_trim);
-                if iter == named_groups.end() { error("Group names does not exist. (Name is: (name)$)"); return false; }
-
-                group_id = iter*.second;
-            }
-            cur_group_state.add(create_matcher("group_ref_matcher_logic", "(group_id)$, \"\\(regex.substr(start$, pos&$* - start$ + 1))$\""));
-
-            return true;
-        };
-
-        if '0' <= c_next <= '9' {
-            group := grab_number();
-            if group.ssize() >= 3 {
-                // \000 syntax
-                number := 0;
-                if !string_to_int(group, number, 8) { error("Could not convert octal to int."); return false; }
-
-                number_as_char : char = unsafe_narrow(number);
-
-                syntax: std::string = "\\(int_to_string(number_as_char as int, 8))$";
-                char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-                cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
-            }
-            else {
-                if !add_group_matcher(group) { return false; }
-            }
-        }
-        else if std::string::npos != std::string("tnrfae^.[]$()*{}?+|").find(c_next) {
+        if std::string::npos != std::string("tnrfae^.[]$()*{}?+|").find(c_next) {
             if c_next == '$' {
                 // TODO: Provide proper escape for cppfront capture
                 cur_group_state.add(create_matcher("line_end_matcher_logic", "true, true"));
@@ -2560,33 +2660,6 @@ regex_parser:  type = {
             inner := create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'");
             cur_group_state.add(create_matcher("special_syntax_wrapper", "\"\\\\\\\\\", (inner)$"));
         }
-        else if 'g' == c_next {
-            if !next(out c_next) {error("Group escape without a following char."); return false; }
-
-            group : std::string = "";
-            if c_next == '{' {
-                if !(next(out c_next) && grab_until('}', out group)) { error("No ending bracket."); return false; }
-            }
-            else {
-                group = grab_number();
-            }
-            if !add_group_matcher(group) { return false; }
-        }
-        else if 'k' == c_next {
-            if !next(out c_next) {error("Group escape without a following char."); return false; }
-
-            term_char := '\0';
-            if c_next == '{' { term_char = '}'; }
-            else if c_next == '<' { term_char = '>'; }
-            else if c_next == '\'' { term_char = '\''; }
-            else {
-                error("Group escape has wrong operator."); return false;
-            }
-
-            group : std::string = "";
-            if !(next(out c_next) && grab_until(term_char, out group)) { error("No ending bracket."); return false; }
-            if !add_group_matcher(group) { return false; }
-        }
         else if 'K' == c_next {
             cur_group_state.add(create_matcher("global_group_reset", ""));
         }
@@ -2805,8 +2878,6 @@ regex_parser:  type = {
         while c != '\n' next _ = next(out c) {
             if c == term { return; }
 
-            if !has_error && is_alternative(c) { continue; }
-            if !has_error && is_any(c) { continue; }
             if !has_error && is_class(c) { continue; }
             if !has_error && is_escape(c) { continue; }
             if !has_error && is_anchor(c) { continue; }
@@ -2851,7 +2922,7 @@ regex_parser:  type = {
         }
 
         source += "{\n";
-        source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
+        source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
         source += "  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
 
         gen_ctx: generation_context = ();

From 84b028017c1a624606e2d8a3d592d0d3859bad45 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 8 May 2024 10:03:46 +0200
Subject: [PATCH 110/161] Added anchor matchers.

---
 include/cpp2regex.h | 966 +++++++++++++++++++++-----------------------
 source/regex.h2     | 124 +++---
 2 files changed, 525 insertions(+), 565 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 8c0581a49e..bfeda28ee3 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,132 +106,130 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 726 "regex.h2"
+#line 728 "regex.h2"
 class generation_function_context;
     
 
-#line 742 "regex.h2"
+#line 744 "regex.h2"
 class generation_context;
 
-#line 889 "regex.h2"
+#line 891 "regex.h2"
 class regex_token_list;
     
 
-#line 925 "regex.h2"
+#line 927 "regex.h2"
 class regex_token_base;
     
 
-#line 943 "regex.h2"
+#line 941 "regex.h2"
+class regex_token_check;
+    
+
+#line 960 "regex.h2"
 class alternative_token;
     
 
-#line 961 "regex.h2"
+#line 978 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1010 "regex.h2"
+#line 1027 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1036 "regex.h2"
+#line 1053 "regex.h2"
 class any_token;
     
 
-#line 1063 "regex.h2"
+#line 1080 "regex.h2"
 class char_token;
     
 
-#line 1111 "regex.h2"
+#line 1128 "regex.h2"
 class group_ref_token;
     
 
-#line 1243 "regex.h2"
+#line 1260 "regex.h2"
 class group_token;
     
 
-#line 1296 "regex.h2"
+#line 1347 "regex.h2"
 class range_token;
     
 
-#line 1434 "regex.h2"
+#line 1485 "regex.h2"
 template class range_token_matcher;
 
-#line 1559 "regex.h2"
+#line 1610 "regex.h2"
 class special_range_token;
     
 
-#line 1604 "regex.h2"
+#line 1655 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1612 "regex.h2"
+#line 1663 "regex.h2"
 template class char_matcher_logic;
 
-#line 1640 "regex.h2"
+#line 1691 "regex.h2"
 template class class_matcher_logic;
 
-#line 1689 "regex.h2"
+#line 1740 "regex.h2"
 template class global_group_reset;
     
 
-#line 1701 "regex.h2"
+#line 1752 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1738 "regex.h2"
+#line 1789 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1762 "regex.h2"
+#line 1813 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1770 "regex.h2"
-template class line_end_matcher_logic;
-
-#line 1790 "regex.h2"
-template class line_start_matcher_logic;
-
-#line 1807 "regex.h2"
+#line 1821 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1830 "regex.h2"
+#line 1844 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1842 "regex.h2"
+#line 1856 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1869 "regex.h2"
+#line 1883 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1920 "regex.h2"
+#line 1934 "regex.h2"
 template class group_name_list;
 
-#line 1932 "regex.h2"
+#line 1946 "regex.h2"
 class group_name_list_end;
     
 
-#line 1937 "regex.h2"
+#line 1951 "regex.h2"
 template class regular_expression;
 
-#line 2018 "regex.h2"
+#line 2032 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2107 "regex.h2"
+#line 2121 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2114 "regex.h2"
+#line 2128 "regex.h2"
 class regex_parser_group_state;
 
-#line 2149 "regex.h2"
+#line 2163 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2176 "regex.h2"
+#line 2190 "regex.h2"
 template class regex_parser;
 
-#line 2957 "regex.h2"
+#line 2941 "regex.h2"
 }
 }
 
@@ -760,13 +758,13 @@ class parse_context {
 
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 721 "regex.h2"
+#line 723 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 724 "regex.h2"
+#line 726 "regex.h2"
 };
 
 class generation_function_context {
@@ -775,10 +773,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 737 "regex.h2"
+#line 739 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 740 "regex.h2"
+#line 742 "regex.h2"
 };
 
 class generation_context {
@@ -795,81 +793,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 759 "regex.h2"
+#line 761 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 764 "regex.h2"
+#line 766 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 771 "regex.h2"
+#line 773 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 777 "regex.h2"
+#line 779 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 785 "regex.h2"
+#line 787 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 807 "regex.h2"
+#line 809 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 811 "regex.h2"
+#line 813 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 815 "regex.h2"
+#line 817 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 819 "regex.h2"
+#line 821 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 828 "regex.h2"
+#line 830 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 834 "regex.h2"
+#line 836 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 846 "regex.h2"
+#line 848 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 850 "regex.h2"
+#line 852 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 854 "regex.h2"
+#line 856 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 860 "regex.h2"
+#line 862 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 866 "regex.h2"
+#line 868 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 872 "regex.h2"
+#line 874 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 880 "regex.h2"
+#line 882 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 887 "regex.h2"
+#line 889 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 892 "regex.h2"
+#line 894 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 899 "regex.h2"
+#line 901 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 905 "regex.h2"
+#line 907 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 915 "regex.h2"
+#line 917 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -877,26 +875,44 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 922 "regex.h2"
+#line 924 "regex.h2"
 };
 
-#line 925 "regex.h2"
+#line 927 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 928 "regex.h2"
+#line 930 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 932 "regex.h2"
+#line 934 "regex.h2"
     public: explicit regex_token_base();
 
-#line 936 "regex.h2"
+#line 938 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 937 "regex.h2"
+#line 939 "regex.h2"
+};
+
+class regex_token_check: public regex_token_base {
+
+#line 944 "regex.h2"
+    private: std::string check; 
+
+    public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
+
+#line 951 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~regex_token_check() noexcept;
+
+    public: regex_token_check(regex_token_check const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_check const&) -> void = delete;
+
+
+#line 954 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -905,12 +921,12 @@ class regex_token_base: public regex_token {
 //
 class alternative_token: public regex_token_base {
 
-#line 946 "regex.h2"
+#line 963 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 956 "regex.h2"
+#line 973 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -918,23 +934,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 959 "regex.h2"
+#line 976 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 965 "regex.h2"
+#line 982 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 972 "regex.h2"
+#line 989 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 986 "regex.h2"
+#line 1003 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 997 "regex.h2"
+#line 1014 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -942,33 +958,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1008 "regex.h2"
+#line 1025 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1015 "regex.h2"
+#line 1032 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1032 "regex.h2"
+#line 1049 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1039 "regex.h2"
+#line 1056 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1047 "regex.h2"
+#line 1064 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -976,23 +992,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1050 "regex.h2"
+#line 1067 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1063 "regex.h2"
+#line 1080 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1066 "regex.h2"
+#line 1083 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1073 "regex.h2"
+#line 1090 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1077 "regex.h2"
+#line 1094 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1000,12 +1016,12 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1082 "regex.h2"
+#line 1099 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1105 "regex.h2"
+#line 1122 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1014,15 +1030,15 @@ template [[nodiscard]] auto char_toke
 //
 class group_ref_token: public regex_token_base {
 
-#line 1114 "regex.h2"
+#line 1131 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1121 "regex.h2"
+#line 1138 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1213 "regex.h2"
+#line 1230 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1030,24 +1046,24 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1216 "regex.h2"
+#line 1233 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1243 "regex.h2"
+#line 1260 "regex.h2"
 class group_token: public regex_token {
 
-#line 1246 "regex.h2"
+#line 1263 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1267 "regex.h2"
+#line 1284 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1284 "regex.h2"
+#line 1301 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1056,14 +1072,30 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1292 "regex.h2"
+#line 1309 "regex.h2"
 };
 
+// Regex syntax: $  Example: aa$
+//
+[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 1320 "regex.h2"
+template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 1332 "regex.h2"
+// Regex syntax: ^  Example: ^aa
+//
+[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 1340 "regex.h2"
+template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 1345 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1299 "regex.h2"
+#line 1350 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1073,65 +1105,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1376 "regex.h2"
+#line 1427 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1387 "regex.h2"
+#line 1438 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1399 "regex.h2"
+#line 1450 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1423 "regex.h2"
+#line 1474 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1431 "regex.h2"
+#line 1482 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 1432 "regex.h2"
+#line 1483 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1448 "regex.h2"
+#line 1499 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1453 "regex.h2"
+#line 1504 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1458 "regex.h2"
+#line 1509 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1464 "regex.h2"
+#line 1515 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 1479 "regex.h2"
+#line 1530 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 1507 "regex.h2"
+#line 1558 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 1531 "regex.h2"
+#line 1582 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1555 "regex.h2"
+#line 1606 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 1562 "regex.h2"
+#line 1613 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1140,10 +1172,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1591 "regex.h2"
+#line 1642 "regex.h2"
 };
 
-#line 1594 "regex.h2"
+#line 1645 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1151,7 +1183,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1602 "regex.h2"
+#line 1653 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1162,7 +1194,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1608 "regex.h2"
+#line 1659 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1171,27 +1203,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1633 "regex.h2"
+#line 1684 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1635 "regex.h2"
+#line 1686 "regex.h2"
 };
 
-#line 1638 "regex.h2"
+#line 1689 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1661 "regex.h2"
+#line 1712 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1673 "regex.h2"
+#line 1724 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1200,7 +1232,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1685 "regex.h2"
+#line 1736 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1208,14 +1240,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1695 "regex.h2"
+#line 1746 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1697 "regex.h2"
+#line 1748 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -1223,23 +1255,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1709 "regex.h2"
+#line 1760 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1715 "regex.h2"
+#line 1766 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1736 "regex.h2"
+#line 1787 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1750 "regex.h2"
+#line 1801 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1248,7 +1280,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1760 "regex.h2"
+#line 1811 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -1259,39 +1291,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1766 "regex.h2"
-};
-
-// Regex syntax: $  Example: aa$
-//
-template class line_end_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 1784 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: line_end_matcher_logic() = default;
-    public: line_end_matcher_logic(line_end_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(line_end_matcher_logic const&) -> void = delete;
-
-#line 1786 "regex.h2"
-};
-
-// Regex syntax: ^  Example: ^aa
-//
-template class line_start_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 1801 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: line_start_matcher_logic() = default;
-    public: line_start_matcher_logic(line_start_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(line_start_matcher_logic const&) -> void = delete;
-
-#line 1803 "regex.h2"
+#line 1817 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1300,14 +1300,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1824 "regex.h2"
+#line 1838 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1826 "regex.h2"
+#line 1840 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1316,14 +1316,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1835 "regex.h2"
+#line 1849 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1837 "regex.h2"
+#line 1851 "regex.h2"
 };
 
 // Named character classes
@@ -1335,7 +1335,7 @@ template                    void = delete;
 
 
-#line 1844 "regex.h2"
+#line 1858 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1345,7 +1345,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1854 "regex.h2"
+#line 1868 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1353,9 +1353,9 @@ template using named_class_not_ver_space = named_class_matcher_l
 template                     using named_class_not_word = named_class_matcher_logic>;
 
 // Other named matchers
-template                                     using named_string_end_or_before_new_line_at_end = special_syntax_wrapper>;
-template           using named_string_end = special_syntax_wrapper>;
-template using named_string_start = special_syntax_wrapper>;
+// named_string_end_or_before_new_line_at_end:  type  == special_syntax_wrapper>;
+// named_string_end:  type   == special_syntax_wrapper>;
+// named_string_start:  type == special_syntax_wrapper>;
 
 // Regex syntax: \b or \B  Example: \bword\b
 //
@@ -1365,7 +1365,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1900 "regex.h2"
+#line 1914 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1373,10 +1373,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1908 "regex.h2"
+#line 1922 "regex.h2"
 };
 
-#line 1911 "regex.h2"
+#line 1925 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1394,7 +1394,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1930 "regex.h2"
+#line 1944 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1403,7 +1403,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1934 "regex.h2"
+#line 1948 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1419,7 +1419,7 @@ template matched_, context const& ctx_);
 
-#line 1952 "regex.h2"
+#line 1966 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1434,7 +1434,7 @@ template void = delete;
 
 
-#line 1968 "regex.h2"
+#line 1982 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1442,13 +1442,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1980 "regex.h2"
+#line 1994 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2002 "regex.h2"
+#line 2016 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1460,7 +1460,7 @@ template void = delete;
 
 
-#line 2015 "regex.h2"
+#line 2029 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1476,7 +1476,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2033 "regex.h2"
+#line 2047 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1491,7 +1491,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2049 "regex.h2"
+#line 2063 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1499,13 +1499,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2061 "regex.h2"
+#line 2075 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2083 "regex.h2"
+#line 2097 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1517,7 +1517,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2096 "regex.h2"
+#line 2110 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1548,15 +1548,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2130 "regex.h2"
+#line 2144 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2136 "regex.h2"
+#line 2150 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2145 "regex.h2"
+#line 2159 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1569,13 +1569,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2163 "regex.h2"
+#line 2177 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2168 "regex.h2"
+#line 2182 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2173 "regex.h2"
+#line 2187 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1599,50 +1599,50 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2200 "regex.h2"
+#line 2214 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2209 "regex.h2"
+#line 2223 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2213 "regex.h2"
+#line 2227 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2228 "regex.h2"
+#line 2242 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2234 "regex.h2"
+#line 2248 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2275 "regex.h2"
+#line 2289 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2287 "regex.h2"
+#line 2301 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2293 "regex.h2"
+#line 2307 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2300 "regex.h2"
+#line 2314 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2309 "regex.h2"
+#line 2323 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2317 "regex.h2"
+#line 2331 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2327 "regex.h2"
+#line 2341 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1650,80 +1650,71 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2337 "regex.h2"
+#line 2351 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2349 "regex.h2"
+#line 2363 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2352 "regex.h2"
+#line 2366 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2362 "regex.h2"
+#line 2376 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2380 "regex.h2"
+#line 2394 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2390 "regex.h2"
+#line 2404 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2403 "regex.h2"
+#line 2417 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2439 "regex.h2"
+#line 2453 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2504 "regex.h2"
+#line 2518 "regex.h2"
     // Parsing functions
     //
 
-    public: [[nodiscard]] auto is_alternative(cpp2::in c) & -> bool;
-
-#line 2515 "regex.h2"
-    public: [[nodiscard]] auto is_anchor(cpp2::in c) & -> bool;
-
-#line 2528 "regex.h2"
-    public: [[nodiscard]] auto is_any(cpp2::in c) & -> bool;
-
-#line 2536 "regex.h2"
     public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
 
-#line 2643 "regex.h2"
+#line 2628 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2737 "regex.h2"
+#line 2722 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2869 "regex.h2"
+#line 2854 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2876 "regex.h2"
+#line 2861 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2894 "regex.h2"
+#line 2878 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2916 "regex.h2"
+#line 2900 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2948 "regex.h2"
+#line 2932 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2957 "regex.h2"
+#line 2941 "regex.h2"
 }
 }
 
@@ -2452,6 +2443,8 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if (!(cur_token) && valid()) {cur_token = any_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_ref_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = line_end_token_parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = line_start_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
 
@@ -2468,10 +2461,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 721 "regex.h2"
+#line 723 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 730 "regex.h2"
+#line 732 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2479,27 +2472,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 737 "regex.h2"
+#line 739 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 752 "regex.h2"
+#line 754 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 754 "regex.h2"
+#line 756 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 759 "regex.h2"
+#line 761 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 764 "regex.h2"
+#line 766 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2507,14 +2500,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 771 "regex.h2"
+#line 773 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 777 "regex.h2"
+#line 779 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2523,7 +2516,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 785 "regex.h2"
+#line 787 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2545,22 +2538,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 807 "regex.h2"
+#line 809 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 811 "regex.h2"
+#line 813 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 815 "regex.h2"
+#line 817 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 819 "regex.h2"
+#line 821 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2570,14 +2563,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 828 "regex.h2"
+#line 830 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 834 "regex.h2"
+#line 836 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2590,38 +2583,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 846 "regex.h2"
+#line 848 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 850 "regex.h2"
+#line 852 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 854 "regex.h2"
+#line 856 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 860 "regex.h2"
+#line 862 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 866 "regex.h2"
+#line 868 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 872 "regex.h2"
+#line 874 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2630,7 +2623,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 880 "regex.h2"
+#line 882 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2639,22 +2632,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 894 "regex.h2"
+#line 896 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 897 "regex.h2"
+#line 899 "regex.h2"
     }
 
-#line 899 "regex.h2"
+#line 901 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 905 "regex.h2"
+#line 907 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2665,7 +2658,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 915 "regex.h2"
+#line 917 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2676,30 +2669,45 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 928 "regex.h2"
+#line 930 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 930 "regex.h2"
+#line 932 "regex.h2"
     }
 
-#line 932 "regex.h2"
+#line 934 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 934 "regex.h2"
+#line 936 "regex.h2"
     }
 
-#line 936 "regex.h2"
+#line 938 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
 #line 946 "regex.h2"
+    regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
+        : regex_token_base{ str }
+        , check{ check_ }{
+
+#line 949 "regex.h2"
+    }
+
+#line 951 "regex.h2"
+    auto regex_token_check::generate_code(generation_context& ctx) const -> void{
+        CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
+    }
+
+    regex_token_check::~regex_token_check() noexcept{}
+
+#line 963 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 948 "regex.h2"
+#line 965 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2708,22 +2716,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 956 "regex.h2"
+#line 973 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 967 "regex.h2"
+#line 984 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 970 "regex.h2"
+#line 987 "regex.h2"
     }
 
-#line 972 "regex.h2"
+#line 989 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2738,7 +2746,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 986 "regex.h2"
+#line 1003 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2750,7 +2758,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 997 "regex.h2"
+#line 1014 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2765,11 +2773,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1012 "regex.h2"
+#line 1029 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1015 "regex.h2"
+#line 1032 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -2788,25 +2796,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1039 "regex.h2"
+#line 1056 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1041 "regex.h2"
+#line 1058 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1047 "regex.h2"
+#line 1064 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1052 "regex.h2"
+#line 1069 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2818,20 +2826,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1068 "regex.h2"
+#line 1085 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1071 "regex.h2"
+#line 1088 "regex.h2"
     }
 
-#line 1073 "regex.h2"
+#line 1090 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1077 "regex.h2"
+#line 1094 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2840,7 +2848,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1084 "regex.h2"
+#line 1101 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2862,15 +2870,15 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1116 "regex.h2"
+#line 1133 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1119 "regex.h2"
+#line 1136 "regex.h2"
     }
 
-#line 1121 "regex.h2"
+#line 1138 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -2963,14 +2971,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1213 "regex.h2"
+#line 1230 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1218 "regex.h2"
+#line 1235 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -2996,7 +3004,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1249 "regex.h2"
+#line 1266 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3004,7 +3012,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
 
-#line 1257 "regex.h2"
+#line 1274 "regex.h2"
         (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
 
         auto old_state {CPP2_UFCS(start_group)(ctx)}; 
@@ -3015,7 +3023,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1267 "regex.h2"
+#line 1284 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3033,7 +3041,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1284 "regex.h2"
+#line 1301 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         if (-1 == number) {
             return {  }; 
@@ -3045,11 +3053,45 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1304 "regex.h2"
+#line 1313 "regex.h2"
+[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
+    if (CPP2_UFCS(current)(ctx) != '$' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$'))) {return nullptr; }
+
+    if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\$", "line_end_token_matcher"); 
+}
+
+#line 1320 "regex.h2"
+template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
+    if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
+        return true; 
+    }
+    else {if (match_new_line_before_end && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end.
+        return true; 
+    }
+    else {
+        return false; 
+    }}
+}
+
+#line 1334 "regex.h2"
+[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
+    if (CPP2_UFCS(current)(ctx) != '^') {return nullptr; }
+
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
+}
+
+#line 1340 "regex.h2"
+template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
+    return cur == ctx.begin || // Start of string
+           (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
+}
+
+#line 1355 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1306 "regex.h2"
+#line 1357 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3093,7 +3135,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
                 }
             }
 
-#line 1350 "regex.h2"
+#line 1401 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3120,7 +3162,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return nullptr; 
     }
 
-#line 1376 "regex.h2"
+#line 1427 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3132,7 +3174,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }}
     }
 
-#line 1387 "regex.h2"
+#line 1438 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3145,7 +3187,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }}
     }
 
-#line 1399 "regex.h2"
+#line 1450 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3170,7 +3212,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1423 "regex.h2"
+#line 1474 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3179,12 +3221,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1431 "regex.h2"
+#line 1482 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 1436 "regex.h2"
+#line 1487 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3197,26 +3239,26 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }}
     }
 
-#line 1448 "regex.h2"
+#line 1499 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1453 "regex.h2"
+#line 1504 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1458 "regex.h2"
+#line 1509 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1464 "regex.h2"
+#line 1515 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3232,7 +3274,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return res; 
     }
 
-#line 1479 "regex.h2"
+#line 1530 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3261,7 +3303,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1507 "regex.h2"
+#line 1558 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3286,7 +3328,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1531 "regex.h2"
+#line 1582 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3312,7 +3354,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1562 "regex.h2"
+#line 1613 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3335,7 +3377,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1585 "regex.h2"
+#line 1636 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3345,14 +3387,14 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1605 "regex.h2"
+#line 1656 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1606 "regex.h2"
+#line 1657 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1607 "regex.h2"
+#line 1658 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1614 "regex.h2"
+#line 1665 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3372,12 +3414,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
 
     }
-#line 1633 "regex.h2"
+#line 1684 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1634 "regex.h2"
+#line 1685 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1642 "regex.h2"
+#line 1693 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3397,7 +3439,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1661 "regex.h2"
+#line 1712 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3410,10 +3452,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1673 "regex.h2"
+#line 1724 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1675 "regex.h2"
+#line 1726 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -3425,18 +3467,18 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1690 "regex.h2"
+#line 1741 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1695 "regex.h2"
+#line 1746 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1696 "regex.h2"
+#line 1747 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1702 "regex.h2"
+#line 1753 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -3444,14 +3486,14 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1709 "regex.h2"
+#line 1760 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1715 "regex.h2"
+#line 1766 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -3474,7 +3516,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1739 "regex.h2"
+#line 1790 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -3486,10 +3528,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1750 "regex.h2"
+#line 1801 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1752 "regex.h2"
+#line 1803 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -3499,47 +3541,14 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1763 "regex.h2"
+#line 1814 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1764 "regex.h2"
+#line 1815 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1765 "regex.h2"
+#line 1816 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1772 "regex.h2"
-    template  template [[nodiscard]] auto line_end_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
-            return Other::match(cur, ctx, modifiers, end_func); 
-        }
-        else {if (match_new_line_before_end && (*cpp2::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end.
-            return Other::match(cur, ctx, modifiers, end_func); 
-        }
-        else {
-            return CPP2_UFCS(fail)(ctx); 
-        }}
-    }
-
-#line 1784 "regex.h2"
-    template  auto line_end_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1785 "regex.h2"
-    template  [[nodiscard]] auto line_end_matcher_logic::to_string() -> auto { return bstring("\\$"); }
-
-#line 1792 "regex.h2"
-    template  template [[nodiscard]] auto line_start_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        if (cur == ctx.begin || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n')) {
-            return Other::match(cur, ctx, modifiers, end_func); 
-        }
-        else {
-            return CPP2_UFCS(fail)(ctx); 
-        }
-
-    }
-#line 1801 "regex.h2"
-    template  auto line_start_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1802 "regex.h2"
-    template  [[nodiscard]] auto line_start_matcher_logic::to_string() -> auto { return bstring(1, '^'); }
-
-#line 1809 "regex.h2"
+#line 1823 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -3555,21 +3564,21 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
 
     }
-#line 1824 "regex.h2"
+#line 1838 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1825 "regex.h2"
+#line 1839 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1832 "regex.h2"
+#line 1846 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1835 "regex.h2"
+#line 1849 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1836 "regex.h2"
+#line 1850 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1871 "regex.h2"
+#line 1885 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -3599,9 +3608,9 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
 
     }
-#line 1900 "regex.h2"
+#line 1914 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1901 "regex.h2"
+#line 1915 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -3610,7 +3619,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1922 "regex.h2"
+#line 1936 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -3620,34 +3629,34 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1933 "regex.h2"
+#line 1947 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1947 "regex.h2"
+#line 1961 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1950 "regex.h2"
+#line 1964 "regex.h2"
         }
 
-#line 1952 "regex.h2"
+#line 1966 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1953 "regex.h2"
+#line 1967 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1954 "regex.h2"
+#line 1968 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1955 "regex.h2"
+#line 1969 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1957 "regex.h2"
+#line 1971 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1958 "regex.h2"
+#line 1972 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1959 "regex.h2"
+#line 1973 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1961 "regex.h2"
+#line 1975 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -3656,13 +3665,13 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             return group_id; 
         }
 
-#line 1970 "regex.h2"
+#line 1984 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1971 "regex.h2"
+#line 1985 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1972 "regex.h2"
+#line 1986 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1973 "regex.h2"
+#line 1987 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3670,13 +3679,13 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1980 "regex.h2"
+#line 1994 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1981 "regex.h2"
+#line 1995 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1982 "regex.h2"
+#line 1996 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1983 "regex.h2"
+#line 1997 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3696,10 +3705,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2002 "regex.h2"
+#line 2016 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2007 "regex.h2"
+#line 2021 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3709,31 +3718,31 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 2028 "regex.h2"
+#line 2042 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2031 "regex.h2"
+#line 2045 "regex.h2"
         }
 
-#line 2033 "regex.h2"
+#line 2047 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2034 "regex.h2"
+#line 2048 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2035 "regex.h2"
+#line 2049 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2036 "regex.h2"
+#line 2050 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2038 "regex.h2"
+#line 2052 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2039 "regex.h2"
+#line 2053 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2040 "regex.h2"
+#line 2054 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2042 "regex.h2"
+#line 2056 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3742,13 +3751,13 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             return group_id; 
         }
 
-#line 2051 "regex.h2"
+#line 2065 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2052 "regex.h2"
+#line 2066 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2053 "regex.h2"
+#line 2067 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2054 "regex.h2"
+#line 2068 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3756,13 +3765,13 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2061 "regex.h2"
+#line 2075 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2062 "regex.h2"
+#line 2076 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2063 "regex.h2"
+#line 2077 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2064 "regex.h2"
+#line 2078 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3782,10 +3791,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2083 "regex.h2"
+#line 2097 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2088 "regex.h2"
+#line 2102 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3795,24 +3804,24 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 2124 "regex.h2"
+#line 2138 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2130 "regex.h2"
+#line 2144 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2136 "regex.h2"
+#line 2150 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2138 "regex.h2"
+#line 2152 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3820,10 +3829,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         static_cast(std::move(last));
     }
 
-#line 2145 "regex.h2"
+#line 2159 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2155 "regex.h2"
+#line 2169 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3832,29 +3841,29 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return g; 
     }
 
-#line 2163 "regex.h2"
+#line 2177 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2168 "regex.h2"
+#line 2182 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2194 "regex.h2"
+#line 2208 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2198 "regex.h2"
+#line 2212 "regex.h2"
     }
 
-#line 2202 "regex.h2"
+#line 2216 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3862,12 +3871,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return old_state; 
     }
 
-#line 2209 "regex.h2"
+#line 2223 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2216 "regex.h2"
+#line 2230 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3880,14 +3889,14 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return old_state; 
     }
 
-#line 2228 "regex.h2"
+#line 2242 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2237 "regex.h2"
+#line 2251 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3926,7 +3935,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return cur; 
     }
 
-#line 2275 "regex.h2"
+#line 2289 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3939,14 +3948,14 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 2287 "regex.h2"
+#line 2301 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2288 "regex.h2"
+#line 2302 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2289 "regex.h2"
+#line 2303 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2293 "regex.h2"
+#line 2307 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3954,7 +3963,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 2300 "regex.h2"
+#line 2314 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3964,7 +3973,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 2309 "regex.h2"
+#line 2323 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3973,7 +3982,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 2317 "regex.h2"
+#line 2331 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3984,18 +3993,18 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 2327 "regex.h2"
+#line 2341 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2328 "regex.h2"
+#line 2342 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2332 "regex.h2"
+#line 2346 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2337 "regex.h2"
+#line 2351 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4008,10 +4017,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 2349 "regex.h2"
+#line 2363 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2355 "regex.h2"
+#line 2369 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4019,10 +4028,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2362 "regex.h2"
+#line 2376 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2364 "regex.h2"
+#line 2378 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4039,7 +4048,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2380 "regex.h2"
+#line 2394 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4050,7 +4059,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 2392 "regex.h2"
+#line 2406 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4062,7 +4071,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return true; 
     }
 
-#line 2403 "regex.h2"
+#line 2417 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4099,7 +4108,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 2439 "regex.h2"
+#line 2453 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -4165,39 +4174,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return true; 
     }
 
-#line 2507 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_alternative(cpp2::in c) & -> bool{
-        if (c != '|') {return false; }
-
-        CPP2_UFCS(next_alternative)(cur_group_state);
-        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
-        return true; 
-    }
-
-#line 2515 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_anchor(cpp2::in c) & -> bool{
-        if (c == '^') {
-            CPP2_UFCS(add)(cur_group_state, create_matcher("line_start_matcher_logic", "true"));
-            return true; 
-        }
-        else {if (c == '$') {
-            CPP2_UFCS(add)(cur_group_state, create_matcher("line_end_matcher_logic", "true, true"));
-            return true; 
-        }}
-
-        return false; 
-    }
-
-#line 2528 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_any(cpp2::in c) & -> bool{
-        if (c != '.') {return false; }
-
-        CPP2_UFCS(add)(cur_group_state, create_matcher("any_matcher_logic", ""));
-        return true; 
-
-    }
-
-#line 2536 "regex.h2"
+#line 2521 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
         if (c != '[') {return false; }
 
@@ -4305,7 +4282,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return true; 
     }
 
-#line 2643 "regex.h2"
+#line 2628 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -4400,7 +4377,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return true; 
     }
 
-#line 2737 "regex.h2"
+#line 2722 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -4533,7 +4510,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return true; 
     }
 
-#line 2869 "regex.h2"
+#line 2854 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4541,7 +4518,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return true; 
     }
 
-#line 2876 "regex.h2"
+#line 2861 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4549,7 +4526,6 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
             if (!(has_error) && is_class(c)) {continue; }
             if (!(has_error) && is_escape(c)) {continue; }
-            if (!(has_error) && is_anchor(c)) {continue; }
             if (!(has_error) && is_group(c)) {continue; }
             if (!(has_error) && is_handle_special(c)) {continue; }
 
@@ -4560,7 +4536,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 2894 "regex.h2"
+#line 2878 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4583,7 +4559,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return res; 
     }
 
-#line 2916 "regex.h2"
+#line 2900 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4617,7 +4593,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return source; 
     }
 
-#line 2950 "regex.h2"
+#line 2934 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index fa3f9af5ed..7dd94aed89 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -702,6 +702,8 @@ parse_context: type = {
             if !cur_token && valid() { cur_token = any_token::parse(this); }
             if !cur_token && valid() { cur_token = group_ref_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
+            if !cur_token && valid() { cur_token = line_end_token_parse(this); }
+            if !cur_token && valid() { cur_token = line_start_token_parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
 
@@ -936,6 +938,21 @@ regex_token_base: @polymorphic_base type = {
     get_groups: (override this) -> std::vector = { return (); }
 }
 
+regex_token_check: @polymorphic_base type = {
+    this: regex_token_base;
+
+    check: std::string;
+
+    operator=:(out this, str: std::string, check_: std::string) = {
+        regex_token_base = (str);
+        check = check_;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx.add_check(check + "(" + ctx.match_parameters() + ")");
+    }
+}
+
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen.
@@ -1291,6 +1308,40 @@ group_token: @polymorphic_base type = {
     }
 }
 
+// Regex syntax: $  Example: aa$
+//
+line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if ctx.current() != '$' && !(ctx.current() == '\\' && ctx.peek() == '$') { return nullptr; }
+
+    if (ctx.current() == '\\') { _ = ctx.next(); } // Skip escape
+    return shared.new("\\$", "line_end_token_matcher");
+}
+
+line_end_token_matcher:  (cur, inout ctx, modifiers) -> bool = {
+    if cur == ctx.end || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines) && cur* == '\n') {
+        return true;
+    }
+    else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end.
+        return true;
+    }
+    else {
+        return false;
+    }
+}
+
+// Regex syntax: ^  Example: ^aa
+//
+line_start_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if ctx.current() != '^' { return nullptr; }
+
+    return shared.new("^", "line_start_token_matcher");
+}
+
+line_start_token_matcher:  (cur, inout ctx, modifiers) -> bool = {
+    return cur == ctx.begin || // Start of string
+           (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n'); // Start of new line
+}
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 range_token: @polymorphic_base type = {
@@ -1765,43 +1816,6 @@ special_group_end_logic:  type = {
     to_string:    ()  bstring(")");
 }
 
-// Regex syntax: $  Example: aa$
-//
-line_end_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        if cur == ctx.end || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines) && cur* == '\n') {
-            return Other::match(cur, ctx, modifiers, end_func);
-        }
-        else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end.
-            return Other::match(cur, ctx, modifiers, end_func);
-        }
-        else {
-            return ctx.fail();
-        }
-    }
-
-    reset_ranges: (_) = {}
-    to_string:    ()  bstring("\\$");
-}
-
-// Regex syntax: ^  Example: ^aa
-//
-line_start_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        if cur == ctx.begin || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n') {
-            return Other::match(cur, ctx, modifiers, end_func);
-        }
-        else {
-            return ctx.fail();
-        }
-
-    }
-    reset_ranges: (_) = {}
-    to_string:    ()  bstring(1, '^');
-}
-
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 lookahead_matcher_logic:  type =
@@ -1858,9 +1872,9 @@ named_class_not_ver_space :  type == named_class_matcher_logic type == named_class_matcher_logic>;
 
 // Other named matchers
-named_string_end_or_before_new_line_at_end:  type  == special_syntax_wrapper>;
-named_string_end:  type   == special_syntax_wrapper>;
-named_string_start:  type == special_syntax_wrapper>;
+// named_string_end_or_before_new_line_at_end:  type  == special_syntax_wrapper>;
+// named_string_end:  type   == special_syntax_wrapper>;
+// named_string_start:  type == special_syntax_wrapper>;
 
 // Regex syntax: \b or \B  Example: \bword\b
 //
@@ -2504,35 +2518,6 @@ regex_parser:  type = {
     // Parsing functions
     //
 
-    is_alternative: (inout this, c: char) -> bool = {
-        if c != '|' { return false; }
-
-        cur_group_state.next_alternative();
-        cur_branch_reset_state.next_alternative();
-        return true;
-    }
-
-    is_anchor: (inout this, c: char) -> bool = {
-        if c == '^' {
-            cur_group_state.add(create_matcher("line_start_matcher_logic", "true"));
-            return true;
-        }
-        else if c == '$' {
-            cur_group_state.add(create_matcher("line_end_matcher_logic", "true, true"));
-            return true;
-        }
-
-        return false;
-    }
-
-    is_any: (inout this, c: char) -> bool = {
-        if c != '.' { return false; }
-
-        cur_group_state.add(create_matcher("any_matcher_logic", ""));
-        return true;
-
-    }
-
     is_class: (inout this, c: char) -> bool = {
         if c != '[' { return false; }
 
@@ -2880,7 +2865,6 @@ regex_parser:  type = {
 
             if !has_error && is_class(c) { continue; }
             if !has_error && is_escape(c) { continue; }
-            if !has_error && is_anchor(c) { continue; }
             if !has_error && is_group(c) { continue; }
             if !has_error && is_handle_special(c) { continue; }
 

From b009a27d4685aa610d296f06501b45339267f37c Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 8 May 2024 11:08:39 +0200
Subject: [PATCH 111/161] Added class matchers.

---
 include/cpp2regex.h | 1309 ++++++++++++++++++++++++-------------------
 source/regex.h2     |  349 ++++++++----
 2 files changed, 979 insertions(+), 679 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index bfeda28ee3..17326ccb71 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,130 +106,137 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 728 "regex.h2"
+#line 770 "regex.h2"
 class generation_function_context;
     
 
-#line 744 "regex.h2"
+#line 786 "regex.h2"
 class generation_context;
 
-#line 891 "regex.h2"
+#line 933 "regex.h2"
 class regex_token_list;
     
 
-#line 927 "regex.h2"
+#line 969 "regex.h2"
 class regex_token_base;
     
 
-#line 941 "regex.h2"
+#line 983 "regex.h2"
 class regex_token_check;
     
 
-#line 960 "regex.h2"
+#line 1002 "regex.h2"
 class alternative_token;
     
 
-#line 978 "regex.h2"
+#line 1020 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1027 "regex.h2"
+#line 1069 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1053 "regex.h2"
+#line 1095 "regex.h2"
 class any_token;
     
 
-#line 1080 "regex.h2"
+#line 1122 "regex.h2"
 class char_token;
     
 
-#line 1128 "regex.h2"
+#line 1166 "regex.h2"
+class class_token;
+    
+
+#line 1298 "regex.h2"
+template class class_token_matcher;
+
+#line 1352 "regex.h2"
 class group_ref_token;
     
 
-#line 1260 "regex.h2"
+#line 1484 "regex.h2"
 class group_token;
     
 
-#line 1347 "regex.h2"
+#line 1571 "regex.h2"
 class range_token;
     
 
-#line 1485 "regex.h2"
+#line 1709 "regex.h2"
 template class range_token_matcher;
 
-#line 1610 "regex.h2"
+#line 1834 "regex.h2"
 class special_range_token;
     
 
-#line 1655 "regex.h2"
+#line 1879 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1663 "regex.h2"
+#line 1887 "regex.h2"
 template class char_matcher_logic;
 
-#line 1691 "regex.h2"
+#line 1915 "regex.h2"
 template class class_matcher_logic;
 
-#line 1740 "regex.h2"
+#line 1964 "regex.h2"
 template class global_group_reset;
     
 
-#line 1752 "regex.h2"
+#line 1976 "regex.h2"
 template class group_matcher_start_logic;
     
 
-#line 1789 "regex.h2"
+#line 2013 "regex.h2"
 template class group_matcher_end_logic;
     
 
-#line 1813 "regex.h2"
+#line 2037 "regex.h2"
 template class special_group_end_logic;
     
 
-#line 1821 "regex.h2"
+#line 2045 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 1844 "regex.h2"
+#line 2068 "regex.h2"
 template class modifier_matcher_logic;
 
-#line 1856 "regex.h2"
+#line 2080 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 1883 "regex.h2"
+#line 2107 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 1934 "regex.h2"
+#line 2158 "regex.h2"
 template class group_name_list;
 
-#line 1946 "regex.h2"
+#line 2170 "regex.h2"
 class group_name_list_end;
     
 
-#line 1951 "regex.h2"
+#line 2175 "regex.h2"
 template class regular_expression;
 
-#line 2032 "regex.h2"
+#line 2256 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2121 "regex.h2"
+#line 2345 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2128 "regex.h2"
+#line 2352 "regex.h2"
 class regex_parser_group_state;
 
-#line 2163 "regex.h2"
+#line 2387 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2190 "regex.h2"
+#line 2414 "regex.h2"
 template class regex_parser;
 
-#line 2941 "regex.h2"
+#line 3056 "regex.h2"
 }
 }
 
@@ -683,88 +690,112 @@ class parse_context {
 #line 486 "regex.h2"
     // State management functions
     //
+
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 495 "regex.h2"
+#line 496 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
 
-#line 501 "regex.h2"
+#line 502 "regex.h2"
+    public: [[nodiscard]] auto get_modifiers() const& -> regex_parser_modifier_state;
+
+#line 506 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 512 "regex.h2"
+#line 517 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 519 "regex.h2"
+#line 523 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 524 "regex.h2"
+#line 528 "regex.h2"
+    // Position management functions
+    //
+
+    public: [[nodiscard]] auto get_pos() const& -> auto;
+
+    public: [[nodiscard]] auto get_range(cpp2::in start, cpp2::in end) const& -> auto;
+
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 528 "regex.h2"
+#line 539 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 532 "regex.h2"
+#line 543 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 542 "regex.h2"
+#line 553 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 546 "regex.h2"
+#line 557 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 551 "regex.h2"
+#line 562 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 555 "regex.h2"
+#line 566 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
 
-#line 565 "regex.h2"
+#line 576 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
+    private: [[nodiscard]] auto next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool;
+
+#line 588 "regex.h2"
+    public: [[nodiscard]] auto next() & -> auto;
+    public: [[nodiscard]] auto next_in_class() & -> auto;
+    public: [[nodiscard]] auto next_no_skip() & -> auto;
+
+    public: [[nodiscard]] auto next_n(cpp2::in n) & -> bool;
+
+#line 601 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
-    public: [[nodiscard]] auto next() & -> bool;
 
-#line 576 "regex.h2"
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 583 "regex.h2"
+#line 610 "regex.h2"
+    public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
+
+#line 622 "regex.h2"
+    public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
+
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 623 "regex.h2"
+#line 664 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 644 "regex.h2"
+#line 685 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 660 "regex.h2"
+#line 701 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 680 "regex.h2"
+#line 721 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 690 "regex.h2"
+#line 731 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 723 "regex.h2"
+#line 765 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 726 "regex.h2"
+#line 768 "regex.h2"
 };
 
 class generation_function_context {
@@ -773,10 +804,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 739 "regex.h2"
+#line 781 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 742 "regex.h2"
+#line 784 "regex.h2"
 };
 
 class generation_context {
@@ -793,81 +824,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 761 "regex.h2"
+#line 803 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 766 "regex.h2"
+#line 808 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 773 "regex.h2"
+#line 815 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 779 "regex.h2"
+#line 821 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 787 "regex.h2"
+#line 829 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 809 "regex.h2"
+#line 851 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 813 "regex.h2"
+#line 855 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 817 "regex.h2"
+#line 859 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 821 "regex.h2"
+#line 863 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 830 "regex.h2"
+#line 872 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 836 "regex.h2"
+#line 878 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 848 "regex.h2"
+#line 890 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 852 "regex.h2"
+#line 894 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 856 "regex.h2"
+#line 898 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 862 "regex.h2"
+#line 904 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 868 "regex.h2"
+#line 910 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 874 "regex.h2"
+#line 916 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 882 "regex.h2"
+#line 924 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 889 "regex.h2"
+#line 931 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 894 "regex.h2"
+#line 936 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 901 "regex.h2"
+#line 943 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 907 "regex.h2"
+#line 949 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 917 "regex.h2"
+#line 959 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -875,36 +906,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 924 "regex.h2"
+#line 966 "regex.h2"
 };
 
-#line 927 "regex.h2"
+#line 969 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 930 "regex.h2"
+#line 972 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 934 "regex.h2"
+#line 976 "regex.h2"
     public: explicit regex_token_base();
 
-#line 938 "regex.h2"
+#line 980 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 939 "regex.h2"
+#line 981 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 944 "regex.h2"
+#line 986 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 951 "regex.h2"
+#line 993 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -912,7 +943,7 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 954 "regex.h2"
+#line 996 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -921,12 +952,12 @@ class regex_token_check: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 963 "regex.h2"
+#line 1005 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 973 "regex.h2"
+#line 1015 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -934,23 +965,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 976 "regex.h2"
+#line 1018 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 982 "regex.h2"
+#line 1024 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 989 "regex.h2"
+#line 1031 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1003 "regex.h2"
+#line 1045 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 1014 "regex.h2"
+#line 1056 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -958,33 +989,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1025 "regex.h2"
+#line 1067 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1032 "regex.h2"
+#line 1074 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1049 "regex.h2"
+#line 1091 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1056 "regex.h2"
+#line 1098 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1064 "regex.h2"
+#line 1106 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -992,23 +1023,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1067 "regex.h2"
+#line 1109 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1080 "regex.h2"
+#line 1122 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1083 "regex.h2"
+#line 1125 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1090 "regex.h2"
+#line 1132 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1094 "regex.h2"
+#line 1136 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1016,12 +1047,66 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1099 "regex.h2"
+#line 1141 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1122 "regex.h2"
+#line 1164 "regex.h2"
+// Regex syntax: []  Example: [abcx-y[:digits:]]
+//
+class class_token: public regex_token_base {
+
+#line 1169 "regex.h2"
+    private: bool negate; 
+    private: std::string class_str; 
+
+    public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
+
+#line 1178 "regex.h2"
+    // TODO: Rework class generation: Generate check functions for classes.
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+
+#line 1285 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+
+#line 1290 "regex.h2"
+    private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
+    public: virtual ~class_token() noexcept;
+
+    public: class_token(class_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(class_token const&) -> void = delete;
+
+
+#line 1296 "regex.h2"
+};
+
+template class class_token_matcher
+ {
+    public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 1321 "regex.h2"
+    private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
+    public: class_token_matcher() = default;
+    public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(class_token_matcher const&) -> void = delete;
+
+
+#line 1333 "regex.h2"
+    // TODO: Implement proper to string
+    // to_string: () -> bstring = {
+    //     r: bstring = "[";
+    //     if negate {
+    //         r += "^";
+    //     }
+    //     r += (bstring() + ... + List::to_string());
+    //     r += "]";
+
+    //     return r;
+    // }
+#line 1344 "regex.h2"
+};
+
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1030,15 +1115,15 @@ template [[nodiscard]] auto char_toke
 //
 class group_ref_token: public regex_token_base {
 
-#line 1131 "regex.h2"
+#line 1355 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1138 "regex.h2"
+#line 1362 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1230 "regex.h2"
+#line 1454 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1046,24 +1131,24 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1233 "regex.h2"
+#line 1457 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1260 "regex.h2"
+#line 1484 "regex.h2"
 class group_token: public regex_token {
 
-#line 1263 "regex.h2"
+#line 1487 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1284 "regex.h2"
+#line 1508 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1301 "regex.h2"
+#line 1525 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1072,30 +1157,30 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1309 "regex.h2"
+#line 1533 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1320 "regex.h2"
+#line 1544 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1332 "regex.h2"
+#line 1556 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1340 "regex.h2"
+#line 1564 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1345 "regex.h2"
+#line 1569 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1350 "regex.h2"
+#line 1574 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1105,65 +1190,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1427 "regex.h2"
+#line 1651 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1438 "regex.h2"
+#line 1662 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1450 "regex.h2"
+#line 1674 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1474 "regex.h2"
+#line 1698 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1482 "regex.h2"
+#line 1706 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 1483 "regex.h2"
+#line 1707 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1499 "regex.h2"
+#line 1723 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1504 "regex.h2"
+#line 1728 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1509 "regex.h2"
+#line 1733 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1515 "regex.h2"
+#line 1739 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 1530 "regex.h2"
+#line 1754 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 1558 "regex.h2"
+#line 1782 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 1582 "regex.h2"
+#line 1806 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1606 "regex.h2"
+#line 1830 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 1613 "regex.h2"
+#line 1837 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1172,10 +1257,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1642 "regex.h2"
+#line 1866 "regex.h2"
 };
 
-#line 1645 "regex.h2"
+#line 1869 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1183,7 +1268,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1653 "regex.h2"
+#line 1877 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1194,7 +1279,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1659 "regex.h2"
+#line 1883 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1203,27 +1288,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1684 "regex.h2"
+#line 1908 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1686 "regex.h2"
+#line 1910 "regex.h2"
 };
 
-#line 1689 "regex.h2"
+#line 1913 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1712 "regex.h2"
+#line 1936 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1724 "regex.h2"
+#line 1948 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1232,7 +1317,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1736 "regex.h2"
+#line 1960 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1240,14 +1325,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1746 "regex.h2"
+#line 1970 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1748 "regex.h2"
+#line 1972 "regex.h2"
 };
 
 // Regex syntax: () Example: (.*)
@@ -1255,23 +1340,23 @@ template class global_group_reset {
 template class group_matcher_start_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1760 "regex.h2"
+#line 1984 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
 
-#line 1766 "regex.h2"
+#line 1990 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: group_matcher_start_logic() = default;
     public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_matcher_start_logic const&) -> void = delete;
 
 
-#line 1787 "regex.h2"
+#line 2011 "regex.h2"
 };
 
 template class group_matcher_end_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1801 "regex.h2"
+#line 2025 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1280,7 +1365,7 @@ template class group_matcher_end_logic {
     public: auto operator=(group_matcher_end_logic const&) -> void = delete;
 
 
-#line 1811 "regex.h2"
+#line 2035 "regex.h2"
 };
 
 template class special_group_end_logic {
@@ -1291,7 +1376,7 @@ template class special_group_end_logic {
     public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_group_end_logic const&) -> void = delete;
 
-#line 1817 "regex.h2"
+#line 2041 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1300,14 +1385,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1838 "regex.h2"
+#line 2062 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 1840 "regex.h2"
+#line 2064 "regex.h2"
 };
 
 // Regex syntax: (?)  Example: (?i)
@@ -1316,14 +1401,14 @@ template class modifier_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1849 "regex.h2"
+#line 2073 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: modifier_matcher_logic() = default;
     public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(modifier_matcher_logic const&) -> void = delete;
 
-#line 1851 "regex.h2"
+#line 2075 "regex.h2"
 };
 
 // Named character classes
@@ -1335,7 +1420,7 @@ template                    void = delete;
 
 
-#line 1858 "regex.h2"
+#line 2082 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1345,7 +1430,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 1868 "regex.h2"
+#line 2092 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1365,7 +1450,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1914 "regex.h2"
+#line 2138 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1373,10 +1458,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 1922 "regex.h2"
+#line 2146 "regex.h2"
 };
 
-#line 1925 "regex.h2"
+#line 2149 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1394,7 +1479,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 1944 "regex.h2"
+#line 2168 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1403,7 +1488,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 1948 "regex.h2"
+#line 2172 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1419,7 +1504,7 @@ template matched_, context const& ctx_);
 
-#line 1966 "regex.h2"
+#line 2190 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1434,7 +1519,7 @@ template void = delete;
 
 
-#line 1982 "regex.h2"
+#line 2206 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1442,13 +1527,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 1994 "regex.h2"
+#line 2218 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2016 "regex.h2"
+#line 2240 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1460,7 +1545,7 @@ template void = delete;
 
 
-#line 2029 "regex.h2"
+#line 2253 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1476,7 +1561,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2047 "regex.h2"
+#line 2271 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1491,7 +1576,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2063 "regex.h2"
+#line 2287 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1499,13 +1584,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2075 "regex.h2"
+#line 2299 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2097 "regex.h2"
+#line 2321 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1517,7 +1602,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2110 "regex.h2"
+#line 2334 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1548,15 +1633,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2144 "regex.h2"
+#line 2368 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2150 "regex.h2"
+#line 2374 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2159 "regex.h2"
+#line 2383 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1569,13 +1654,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2177 "regex.h2"
+#line 2401 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2182 "regex.h2"
+#line 2406 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2187 "regex.h2"
+#line 2411 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1594,55 +1679,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-    private: std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
-                                                   "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
-
+#line 2431 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2214 "regex.h2"
+#line 2437 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2223 "regex.h2"
+#line 2446 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2227 "regex.h2"
+#line 2450 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2242 "regex.h2"
+#line 2465 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2248 "regex.h2"
+#line 2471 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2289 "regex.h2"
+#line 2512 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2301 "regex.h2"
+#line 2524 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2307 "regex.h2"
+#line 2530 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2314 "regex.h2"
+#line 2537 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2323 "regex.h2"
+#line 2546 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2331 "regex.h2"
+#line 2554 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2341 "regex.h2"
+#line 2564 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1650,71 +1733,68 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2351 "regex.h2"
+#line 2574 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2363 "regex.h2"
+#line 2586 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2366 "regex.h2"
+#line 2589 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2376 "regex.h2"
+#line 2599 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2394 "regex.h2"
+#line 2617 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2404 "regex.h2"
+#line 2627 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2417 "regex.h2"
+#line 2640 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2453 "regex.h2"
+#line 2676 "regex.h2"
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 2518 "regex.h2"
+#line 2741 "regex.h2"
     // Parsing functions
     //
 
-    public: [[nodiscard]] auto is_class(cpp2::in c) & -> bool;
-
-#line 2628 "regex.h2"
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2722 "regex.h2"
+#line 2838 "regex.h2"
     public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
 
-#line 2854 "regex.h2"
+#line 2970 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2861 "regex.h2"
+#line 2977 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2878 "regex.h2"
+#line 2993 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2900 "regex.h2"
+#line 3015 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2932 "regex.h2"
+#line 3047 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2941 "regex.h2"
+#line 3056 "regex.h2"
 }
 }
 
@@ -2204,7 +2284,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 #line 484 "regex.h2"
     }
 
-#line 488 "regex.h2"
+#line 489 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2212,14 +2292,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 495 "regex.h2"
+#line 496 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 504 "regex.h2"
+#line 502 "regex.h2"
+    [[nodiscard]] auto parse_context::get_modifiers() const& -> regex_parser_modifier_state{
+        return {  }; // TODO:
+    }
+
+#line 509 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2228,30 +2313,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 512 "regex.h2"
+#line 517 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(max_group));
     }
 
-#line 519 "regex.h2"
+#line 523 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 524 "regex.h2"
+#line 531 "regex.h2"
+    [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
+
+#line 533 "regex.h2"
+    [[nodiscard]] auto parse_context::get_range(cpp2::in start, cpp2::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
+
+#line 535 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 528 "regex.h2"
+#line 539 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 532 "regex.h2"
+#line 543 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2262,22 +2353,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 542 "regex.h2"
+#line 553 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 547 "regex.h2"
+#line 558 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 551 "regex.h2"
+#line 562 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 555 "regex.h2"
+#line 566 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
@@ -2288,30 +2379,66 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 565 "regex.h2"
+#line 576 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 567 "regex.h2"
-    [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
-#line 568 "regex.h2"
-    [[nodiscard]] auto parse_context::next() & -> bool{
-        if (has_next()) {
-            pos += 1; return true; 
+#line 578 "regex.h2"
+    [[nodiscard]] auto parse_context::next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool{
+        pos = get_next_position(in_class, no_skip);
+        if (pos != CPP2_UFCS(size)(regex)) {
+            return true; 
         }
+        else {
+            return false; 
+        }
+    }
 
-        return false; 
+#line 588 "regex.h2"
+    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
+#line 589 "regex.h2"
+    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+#line 590 "regex.h2"
+    [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
+
+#line 592 "regex.h2"
+    [[nodiscard]] auto parse_context::next_n(cpp2::in n) & -> bool{
+        auto r {true}; 
+        auto cur {0}; 
+        for( ; r && cpp2::cmp_less(cur,n); (r = next()) ) {
+            cur += 1;
+        }
+        return r; 
     }
 
-#line 576 "regex.h2"
+#line 601 "regex.h2"
+    [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
+
+#line 603 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 578 "regex.h2"
+#line 605 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 583 "regex.h2"
+#line 610 "regex.h2"
+    [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
+        std::string r {""}; 
+
+        std::string separator {""}; 
+        for ( auto const& cur : list ) {
+            r += separator + func(cur);
+            separator = ", ";
+        }
+
+        return r; 
+    }
+
+#line 622 "regex.h2"
+    [[nodiscard]] auto parse_context::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
+
+#line 624 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2351,7 +2478,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 623 "regex.h2"
+#line 664 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2373,14 +2500,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 644 "regex.h2"
+#line 685 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 645 "regex.h2"
+#line 686 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 646 "regex.h2"
+#line 687 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 648 "regex.h2"
+#line 689 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2393,7 +2520,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 660 "regex.h2"
+#line 701 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2414,7 +2541,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(r.value()); 
     }
 
-#line 680 "regex.h2"
+#line 721 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2425,12 +2552,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 690 "regex.h2"
+#line 731 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 691 "regex.h2"
+#line 732 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 693 "regex.h2"
+#line 734 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2441,6 +2568,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
             if (!(cur_token) && valid()) {cur_token = alternative_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = any_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = class_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_ref_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = line_end_token_parse((*this)); }
@@ -2461,10 +2589,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 723 "regex.h2"
+#line 765 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 732 "regex.h2"
+#line 774 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2472,27 +2600,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 739 "regex.h2"
+#line 781 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 754 "regex.h2"
+#line 796 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 756 "regex.h2"
+#line 798 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 761 "regex.h2"
+#line 803 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 766 "regex.h2"
+#line 808 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2500,14 +2628,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 773 "regex.h2"
+#line 815 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 779 "regex.h2"
+#line 821 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2516,7 +2644,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 787 "regex.h2"
+#line 829 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2538,22 +2666,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 809 "regex.h2"
+#line 851 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 813 "regex.h2"
+#line 855 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 817 "regex.h2"
+#line 859 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 821 "regex.h2"
+#line 863 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2563,14 +2691,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 830 "regex.h2"
+#line 872 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 836 "regex.h2"
+#line 878 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2583,38 +2711,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 848 "regex.h2"
+#line 890 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 852 "regex.h2"
+#line 894 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 856 "regex.h2"
+#line 898 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 862 "regex.h2"
+#line 904 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 868 "regex.h2"
+#line 910 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 874 "regex.h2"
+#line 916 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2623,7 +2751,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 882 "regex.h2"
+#line 924 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2632,22 +2760,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 896 "regex.h2"
+#line 938 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 899 "regex.h2"
+#line 941 "regex.h2"
     }
 
-#line 901 "regex.h2"
+#line 943 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 907 "regex.h2"
+#line 949 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2658,7 +2786,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 917 "regex.h2"
+#line 959 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2669,45 +2797,45 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 930 "regex.h2"
+#line 972 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 932 "regex.h2"
+#line 974 "regex.h2"
     }
 
-#line 934 "regex.h2"
+#line 976 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 936 "regex.h2"
+#line 978 "regex.h2"
     }
 
-#line 938 "regex.h2"
+#line 980 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 946 "regex.h2"
+#line 988 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 949 "regex.h2"
+#line 991 "regex.h2"
     }
 
-#line 951 "regex.h2"
+#line 993 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 963 "regex.h2"
+#line 1005 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 965 "regex.h2"
+#line 1007 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2716,22 +2844,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 973 "regex.h2"
+#line 1015 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 984 "regex.h2"
+#line 1026 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 987 "regex.h2"
+#line 1029 "regex.h2"
     }
 
-#line 989 "regex.h2"
+#line 1031 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2746,7 +2874,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1003 "regex.h2"
+#line 1045 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2758,7 +2886,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1014 "regex.h2"
+#line 1056 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2773,11 +2901,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1029 "regex.h2"
+#line 1071 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1032 "regex.h2"
+#line 1074 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -2796,25 +2924,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1056 "regex.h2"
+#line 1098 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1058 "regex.h2"
+#line 1100 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1064 "regex.h2"
+#line 1106 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1069 "regex.h2"
+#line 1111 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2826,20 +2954,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1085 "regex.h2"
+#line 1127 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1088 "regex.h2"
+#line 1130 "regex.h2"
     }
 
-#line 1090 "regex.h2"
+#line 1132 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1094 "regex.h2"
+#line 1136 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2848,7 +2976,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1101 "regex.h2"
+#line 1143 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2870,15 +2998,181 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1133 "regex.h2"
+#line 1172 "regex.h2"
+    class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
+        : regex_token_base{ str }
+        , negate{ negate_ }
+        , class_str{ class_str_ }{
+
+#line 1176 "regex.h2"
+    }
+
+#line 1179 "regex.h2"
+    [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
+        if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
+
+        auto start_pos {CPP2_UFCS(get_pos)(ctx)}; 
+
+        std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
+                                                       "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
+
+        std::vector classes {}; 
+
+        // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
+        auto is_negate {false}; 
+        auto first {true}; 
+        auto range {false}; 
+        while( CPP2_UFCS(next_in_class)(ctx) & (CPP2_UFCS(current)(ctx) != ']' || first) ) {
+            if (CPP2_UFCS(current)(ctx) == '^') {
+                is_negate = true;
+                continue; // Skip rest of the loop. Also the first update.
+            }
+            if (CPP2_UFCS(current)(ctx) == '[' && CPP2_UFCS(peek_in_class)(ctx) == ':') {
+                // We have a character class.
+                static_cast(CPP2_UFCS(next_n)(ctx, 2));// Skip [:
+
+                std::string name {""}; 
+                if (!(CPP2_UFCS(grab_until)(ctx, ":]", cpp2::out(&name)))) {return CPP2_UFCS(error)(ctx, "Could not find end of character class."); }
+                if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
+                    return CPP2_UFCS(error)(ctx, ("Unsupported character class. Supported ones are: " + cpp2::to_string(CPP2_UFCS(join)(ctx, supported_classes)))); 
+                }
+
+                CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
+
+                static_cast(CPP2_UFCS(next)(ctx));// Skip ':' pointing to the ending ']'.
+            }
+            else {if (CPP2_UFCS(current)(ctx) == '\\') {
+                if (CPP2_UFCS(next_no_skip)(ctx) && (CPP2_UFCS(current)(ctx) != ']')) {
+                    if ( ' ' == CPP2_UFCS(current)(ctx) && CPP2_UFCS(get_modifiers)(ctx).perl_code_syntax && CPP2_UFCS(get_modifiers)(ctx).perl_code_syntax_in_classes) {
+                        CPP2_UFCS(push_back)(classes, std::string(1, CPP2_UFCS(current)(ctx)));// TODO: UFCS error with char as argument.
+                    }
+                    else {
+                        auto name {""}; 
+                            if ('d' == CPP2_UFCS(current)(ctx)) {name = "short_digits"; }
+                        else {if ('D' == CPP2_UFCS(current)(ctx)) {name = "short_not_digits"; }
+                        else {if ('h' == CPP2_UFCS(current)(ctx)) {name = "short_hor_space"; }
+                        else {if ('H' == CPP2_UFCS(current)(ctx)) {name = "short_not_hor_space"; }
+                        else {if ('s' == CPP2_UFCS(current)(ctx)) {name = "short_space"; }
+                        else {if ('S' == CPP2_UFCS(current)(ctx)) {name = "short_not_space"; }
+                        else {if ('v' == CPP2_UFCS(current)(ctx)) {name = "short_ver_space"; }
+                        else {if ('V' == CPP2_UFCS(current)(ctx)) {name = "short_not_ver_space"; }
+                        else {if ('w' == CPP2_UFCS(current)(ctx)) {name = "short_word"; }
+                        else {if ('W' == CPP2_UFCS(current)(ctx)) {name = "short_not_word"; }
+                        else {
+                            return CPP2_UFCS(error)(ctx, "Unknown group escape."); 
+                        }}}}}}}}}}
+                        CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
+                    }
+                }else {
+                    return CPP2_UFCS(error)(ctx, "Escape without a following character."); 
+                }
+            }
+            else {if (CPP2_UFCS(current)(ctx) == '-') {
+                if (first) {// Literal if first entry.
+                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(CPP2_UFCS(current)(ctx))));
+                }else {
+                    range = true;
+                }
+            }
+            else {
+                if (range) {// Modify last element to be a range.
+                    CPP2_UFCS(back)(classes) += ("-" + cpp2::to_string(CPP2_UFCS(current)(ctx)));
+                    range = false;
+                }
+                else {
+                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(CPP2_UFCS(current)(ctx))));
+                }
+            }}}
+
+            first = false;
+        }
+
+        if (CPP2_UFCS(current)(ctx) != ']') {
+            return CPP2_UFCS(error)(ctx, "Error end of character class definition before terminating ']'."); 
+        }
+        auto end_pos {CPP2_UFCS(get_pos)(ctx)}; 
+
+        if (std::move(range)) {// If '-' is last entry treat it as a literal char.
+            CPP2_UFCS(push_back)(classes, "-");
+        }
+
+        // Second step: Wrap the item on the class stack with corresponding class implementation.
+        for ( auto& cur : classes ) {
+            if (CPP2_UFCS(starts_with)(cur, "[:")) {
+                auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; 
+                cur = create_matcher((cpp2::to_string(std::move(name)) + "_class"), "");
+            }
+            else {if (1 != CPP2_UFCS(size)(cur)) {
+                cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"));
+            }
+            else {
+                cur = create_matcher("single_class_entry", ("'" + cpp2::to_string(cur) + "'"));
+            }}
+        }
+
+        auto inner {CPP2_UFCS(join)(ctx, std::move(classes))}; 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
+    }
+
+#line 1285 "regex.h2"
+    auto class_token::generate_code(generation_context& ctx) const -> void{
+        CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+    }
+
+#line 1290 "regex.h2"
+    [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
+        auto sep {", "}; 
+        if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
+
+        return { "::cpp2::regex::" + cpp2::to_string(name) + "" }; 
+    }
+
+    class_token::~class_token() noexcept{}
+
+#line 1300 "regex.h2"
+    template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+            if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
+                cur += 1;
+                return true; 
+            }
+            else {
+                return false; 
+            }
+        }
+        else {
+            if (cur != ctx.end && negate != match_any(*cpp2::assert_not_null(cur))) {
+                cur += 1;
+                return true; 
+            }
+            else {
+                return false; 
+            }
+        }
+    }
+
+#line 1321 "regex.h2"
+    template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
+        bool r {First::includes(c)}; 
+
+        if (!(r)) {
+            if constexpr (0 != sizeof...(Other)) {
+                r = match_any(c);
+            }
+        }
+
+        return r; 
+    }
+
+#line 1357 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1136 "regex.h2"
+#line 1360 "regex.h2"
     }
 
-#line 1138 "regex.h2"
+#line 1362 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -2971,14 +3265,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1230 "regex.h2"
+#line 1454 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1235 "regex.h2"
+#line 1459 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3004,7 +3298,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1266 "regex.h2"
+#line 1490 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3012,7 +3306,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
 
-#line 1274 "regex.h2"
+#line 1498 "regex.h2"
         (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
 
         auto old_state {CPP2_UFCS(start_group)(ctx)}; 
@@ -3023,7 +3317,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1284 "regex.h2"
+#line 1508 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3041,7 +3335,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1301 "regex.h2"
+#line 1525 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         if (-1 == number) {
             return {  }; 
@@ -3053,15 +3347,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1313 "regex.h2"
+#line 1537 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '$' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$'))) {return nullptr; }
 
     if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\$", "line_end_token_matcher"); 
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", "line_end_token_matcher"); 
 }
 
-#line 1320 "regex.h2"
+#line 1544 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3074,24 +3368,24 @@ template [[
     }}
 }
 
-#line 1334 "regex.h2"
+#line 1558 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^') {return nullptr; }
 
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
 }
 
-#line 1340 "regex.h2"
+#line 1564 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1355 "regex.h2"
+#line 1579 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1357 "regex.h2"
+#line 1581 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3135,7 +3429,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 1401 "regex.h2"
+#line 1625 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3162,7 +3456,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 1427 "regex.h2"
+#line 1651 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3174,7 +3468,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1438 "regex.h2"
+#line 1662 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3187,7 +3481,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1450 "regex.h2"
+#line 1674 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3212,7 +3506,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1474 "regex.h2"
+#line 1698 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3221,12 +3515,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1482 "regex.h2"
+#line 1706 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 1487 "regex.h2"
+#line 1711 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3239,26 +3533,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1499 "regex.h2"
+#line 1723 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1504 "regex.h2"
+#line 1728 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1509 "regex.h2"
+#line 1733 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1515 "regex.h2"
+#line 1739 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3274,7 +3568,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 1530 "regex.h2"
+#line 1754 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3303,7 +3597,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1558 "regex.h2"
+#line 1782 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3328,7 +3622,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1582 "regex.h2"
+#line 1806 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3354,7 +3648,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1613 "regex.h2"
+#line 1837 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3377,7 +3671,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1636 "regex.h2"
+#line 1860 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3387,14 +3681,14 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1656 "regex.h2"
+#line 1880 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1657 "regex.h2"
+#line 1881 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1658 "regex.h2"
+#line 1882 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1665 "regex.h2"
+#line 1889 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3414,12 +3708,12 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 1684 "regex.h2"
+#line 1908 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1685 "regex.h2"
+#line 1909 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1693 "regex.h2"
+#line 1917 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3439,7 +3733,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 1712 "regex.h2"
+#line 1936 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3452,10 +3746,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1724 "regex.h2"
+#line 1948 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1726 "regex.h2"
+#line 1950 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -3467,18 +3761,18 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1741 "regex.h2"
+#line 1965 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1746 "regex.h2"
+#line 1970 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1747 "regex.h2"
+#line 1971 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1753 "regex.h2"
+#line 1977 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_start)(ctx, group, cur);
@@ -3486,14 +3780,14 @@ template [[nodiscard]] auto line_start_toke
         return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
     }
 
-#line 1760 "regex.h2"
+#line 1984 "regex.h2"
     template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
         if (-1 != group) {
             CPP2_UFCS(set_group_invalid)(ctx, group);
         }
     }
 
-#line 1766 "regex.h2"
+#line 1990 "regex.h2"
     template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
         if (group != 0) {
             if (0 != CPP2_UFCS(size)(name)) {
@@ -3516,7 +3810,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 1790 "regex.h2"
+#line 2014 "regex.h2"
     template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (-1 != group) {
             CPP2_UFCS(set_group_end)(ctx, group, cur);
@@ -3528,10 +3822,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1801 "regex.h2"
+#line 2025 "regex.h2"
     template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1803 "regex.h2"
+#line 2027 "regex.h2"
     template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
         if (group != 0) {
             return ")"; 
@@ -3541,14 +3835,14 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 1814 "regex.h2"
+#line 2038 "regex.h2"
     template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1815 "regex.h2"
+#line 2039 "regex.h2"
     template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1816 "regex.h2"
+#line 2040 "regex.h2"
     template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
 
-#line 1823 "regex.h2"
+#line 2047 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -3564,21 +3858,21 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 1838 "regex.h2"
+#line 2062 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 1839 "regex.h2"
+#line 2063 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 1846 "regex.h2"
+#line 2070 "regex.h2"
     template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
     }
-#line 1849 "regex.h2"
+#line 2073 "regex.h2"
     template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1850 "regex.h2"
+#line 2074 "regex.h2"
     template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
 
-#line 1885 "regex.h2"
+#line 2109 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -3608,9 +3902,9 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 1914 "regex.h2"
+#line 2138 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1915 "regex.h2"
+#line 2139 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -3619,7 +3913,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 1936 "regex.h2"
+#line 2160 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -3629,34 +3923,34 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 1947 "regex.h2"
+#line 2171 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 1961 "regex.h2"
+#line 2185 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 1964 "regex.h2"
+#line 2188 "regex.h2"
         }
 
-#line 1966 "regex.h2"
+#line 2190 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 1967 "regex.h2"
+#line 2191 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 1968 "regex.h2"
+#line 2192 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 1969 "regex.h2"
+#line 2193 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 1971 "regex.h2"
+#line 2195 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 1972 "regex.h2"
+#line 2196 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 1973 "regex.h2"
+#line 2197 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 1975 "regex.h2"
+#line 2199 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -3665,13 +3959,13 @@ template [[nodiscard]] auto line_start_toke
             return group_id; 
         }
 
-#line 1984 "regex.h2"
+#line 2208 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1985 "regex.h2"
+#line 2209 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1986 "regex.h2"
+#line 2210 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 1987 "regex.h2"
+#line 2211 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3679,13 +3973,13 @@ template [[nodiscard]] auto line_start_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 1994 "regex.h2"
+#line 2218 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 1995 "regex.h2"
+#line 2219 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 1996 "regex.h2"
+#line 2220 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 1997 "regex.h2"
+#line 2221 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3705,10 +3999,10 @@ template [[nodiscard]] auto line_start_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2016 "regex.h2"
+#line 2240 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2021 "regex.h2"
+#line 2245 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3718,31 +4012,31 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2042 "regex.h2"
+#line 2266 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2045 "regex.h2"
+#line 2269 "regex.h2"
         }
 
-#line 2047 "regex.h2"
+#line 2271 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2048 "regex.h2"
+#line 2272 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2049 "regex.h2"
+#line 2273 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2050 "regex.h2"
+#line 2274 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2052 "regex.h2"
+#line 2276 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2053 "regex.h2"
+#line 2277 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2054 "regex.h2"
+#line 2278 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2056 "regex.h2"
+#line 2280 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3751,13 +4045,13 @@ template [[nodiscard]] auto line_start_toke
             return group_id; 
         }
 
-#line 2065 "regex.h2"
+#line 2289 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2066 "regex.h2"
+#line 2290 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2067 "regex.h2"
+#line 2291 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2068 "regex.h2"
+#line 2292 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3765,13 +4059,13 @@ template [[nodiscard]] auto line_start_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2075 "regex.h2"
+#line 2299 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2076 "regex.h2"
+#line 2300 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2077 "regex.h2"
+#line 2301 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2078 "regex.h2"
+#line 2302 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3791,10 +4085,10 @@ template [[nodiscard]] auto line_start_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2097 "regex.h2"
+#line 2321 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2102 "regex.h2"
+#line 2326 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -3804,24 +4098,24 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2138 "regex.h2"
+#line 2362 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2144 "regex.h2"
+#line 2368 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2150 "regex.h2"
+#line 2374 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2152 "regex.h2"
+#line 2376 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -3829,10 +4123,10 @@ template [[nodiscard]] auto line_start_toke
         static_cast(std::move(last));
     }
 
-#line 2159 "regex.h2"
+#line 2383 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2169 "regex.h2"
+#line 2393 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -3841,29 +4135,29 @@ template [[nodiscard]] auto line_start_toke
         return g; 
     }
 
-#line 2177 "regex.h2"
+#line 2401 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2182 "regex.h2"
+#line 2406 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2208 "regex.h2"
+#line 2431 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2212 "regex.h2"
+#line 2435 "regex.h2"
     }
 
-#line 2216 "regex.h2"
+#line 2439 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -3871,12 +4165,12 @@ template [[nodiscard]] auto line_start_toke
         return old_state; 
     }
 
-#line 2223 "regex.h2"
+#line 2446 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2230 "regex.h2"
+#line 2453 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -3889,14 +4183,14 @@ template [[nodiscard]] auto line_start_toke
         return old_state; 
     }
 
-#line 2242 "regex.h2"
+#line 2465 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2251 "regex.h2"
+#line 2474 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -3935,7 +4229,7 @@ template [[nodiscard]] auto line_start_toke
         return cur; 
     }
 
-#line 2289 "regex.h2"
+#line 2512 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -3948,14 +4242,14 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2301 "regex.h2"
+#line 2524 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2302 "regex.h2"
+#line 2525 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2303 "regex.h2"
+#line 2526 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2307 "regex.h2"
+#line 2530 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -3963,7 +4257,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2314 "regex.h2"
+#line 2537 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -3973,7 +4267,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2323 "regex.h2"
+#line 2546 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -3982,7 +4276,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2331 "regex.h2"
+#line 2554 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -3993,18 +4287,18 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2341 "regex.h2"
+#line 2564 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2342 "regex.h2"
+#line 2565 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2346 "regex.h2"
+#line 2569 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2351 "regex.h2"
+#line 2574 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4017,10 +4311,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2363 "regex.h2"
+#line 2586 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2369 "regex.h2"
+#line 2592 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4028,10 +4322,10 @@ template [[nodiscard]] auto line_start_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2376 "regex.h2"
+#line 2599 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2378 "regex.h2"
+#line 2601 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4048,7 +4342,7 @@ template [[nodiscard]] auto line_start_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2394 "regex.h2"
+#line 2617 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4059,7 +4353,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2406 "regex.h2"
+#line 2629 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4071,7 +4365,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2417 "regex.h2"
+#line 2640 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4108,7 +4402,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2453 "regex.h2"
+#line 2676 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -4174,115 +4468,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2521 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_class(cpp2::in c) & -> bool{
-        if (c != '[') {return false; }
-
-        std::vector classes {}; 
-
-        char c_cur {current()}; 
-
-        // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
-        auto negate {false}; 
-        auto first {true}; 
-        auto range {false}; 
-        while( next_in_class(cpp2::out(&c_cur)) & (c_cur != ']' || first) ) {
-            if (c_cur == '^') {
-                negate = true;
-                continue; // Skip rest of the loop. Also the first update.
-            }
-            if (c_cur == '[' && peek_in_class() == ':') {
-                // We have a character class.
-                static_cast(skip_n(2));// Skip [:
-
-                std::string name {""}; 
-                if (!(grab_until(":]", cpp2::out(&name)))) {error("Could not find end of character class."); return false; }
-                if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
-                    error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes))));
-                    return false; 
-                }
-
-                CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
-
-                static_cast(skip());// Skip ':' pointing to the ending ']'.
-            }
-            else {if (c_cur == '\\') {
-                if (next_no_skip(cpp2::out(&c_cur)) && (c_cur != ']')) {
-                    if ( ' ' == c_cur && cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes) {
-                        CPP2_UFCS(push_back)(classes, std::string(1, c_cur));// TODO: UFCS error with char as argument.
-                    }
-                    else {
-                        auto name {""}; 
-                            if ('d' == c_cur) {name = "short_digits"; }
-                        else {if ('D' == c_cur) {name = "short_not_digits"; }
-                        else {if ('h' == c_cur) {name = "short_hor_space"; }
-                        else {if ('H' == c_cur) {name = "short_not_hor_space"; }
-                        else {if ('s' == c_cur) {name = "short_space"; }
-                        else {if ('S' == c_cur) {name = "short_not_space"; }
-                        else {if ('v' == c_cur) {name = "short_ver_space"; }
-                        else {if ('V' == c_cur) {name = "short_not_ver_space"; }
-                        else {if ('w' == c_cur) {name = "short_word"; }
-                        else {if ('W' == c_cur) {name = "short_not_word"; }
-                        else {
-                            error("Unknown group escape.");
-                            return false; 
-                        }}}}}}}}}}
-                        CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(std::move(name)) + ":]"));
-                    }
-                }else {
-                    error("Escape without a following character.");
-                    return false; 
-                }
-            }
-            else {if (c_cur == '-') {
-                if (first) {// Literal if first entry.
-                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(c_cur)));
-                }else {
-                    range = true;
-                }
-            }
-            else {
-                if (range) {// Modify last element to be a range.
-                    CPP2_UFCS(back)(classes) += ("-" + cpp2::to_string(c_cur));
-                    range = false;
-                }
-                else {
-                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(c_cur)));
-                }
-            }}}
-
-            first = false;
-        }
-
-        if (std::move(c_cur) != ']') {
-            error("Error end of character class definition before terminating ']'.");
-            return false; 
-        }
-
-        if (std::move(range)) {// If '-' is last entry treat it as a literal char.
-            CPP2_UFCS(push_back)(classes, "-");
-        }
-
-        // Second step: Wrap the item on the class stack with corresponding class implementation.
-        for ( auto& cur : classes ) {
-            if (CPP2_UFCS(starts_with)(cur, "[:")) {
-                auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; 
-                cur = create_matcher((cpp2::to_string(std::move(name)) + "_class"), "");
-            }
-            else {if (1 != CPP2_UFCS(size)(cur)) {
-                cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"));
-            }
-            else {
-                cur = create_matcher("single_class_entry", ("'" + cpp2::to_string(cur) + "'"));
-            }}
-        }
-
-        auto inner {join(std::move(classes))}; 
-        CPP2_UFCS(add)(cur_group_state, create_matcher("class_matcher_logic", (cpp2::to_string(std::move(negate)) + ", " + cpp2::to_string(std::move(inner)))));
-        return true; 
-    }
-
-#line 2628 "regex.h2"
+#line 2744 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -4377,7 +4563,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2722 "regex.h2"
+#line 2838 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
         if (c != '(') {return false; }
 
@@ -4510,7 +4696,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2854 "regex.h2"
+#line 2970 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4518,13 +4704,12 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2861 "regex.h2"
+#line 2977 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
             if (c == term) {return ; }
 
-            if (!(has_error) && is_class(c)) {continue; }
             if (!(has_error) && is_escape(c)) {continue; }
             if (!(has_error) && is_group(c)) {continue; }
             if (!(has_error) && is_handle_special(c)) {continue; }
@@ -4536,7 +4721,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2878 "regex.h2"
+#line 2993 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4559,7 +4744,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2900 "regex.h2"
+#line 3015 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4593,7 +4778,7 @@ template [[nodiscard]] auto line_start_toke
         return source; 
     }
 
-#line 2934 "regex.h2"
+#line 3049 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 7dd94aed89..c3cf87eacf 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -485,6 +485,7 @@ parse_context: type = {
 
     // State management functions
     //
+
     start_group: (inout this) -> parse_context_group_state = {
         old_state: parse_context_group_state = ();
         old_state.swap(cur_group_state);
@@ -498,6 +499,10 @@ parse_context: type = {
         return inner;
     }
 
+    get_modifiers: (this) -> regex_parser_modifier_state = {
+        return (); // TODO:
+    }
+
     // Branch reset management functions
     //
 
@@ -515,12 +520,18 @@ parse_context: type = {
         cur_branch_reset_state.set_next(max_group);
     }
 
-
     next_alternative: (inout this) = {
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
+    // Position management functions
+    //
+
+    get_pos: (this) pos;
+
+    get_range: (this, start: int, end: int) std::string(regex.substr(start, end - start + 1));
+
     add_token: (inout this, token: token_ptr) = {
         cur_group_state.add(token);
     }
@@ -564,15 +575,31 @@ parse_context: type = {
 
     current: (this) -> char = { return regex[pos]; }
 
-    has_next: (this) -> bool = { return pos < regex.size(); }
-    next: (inout this) -> bool = {
-        if has_next() {
-            pos += 1; return true;
+    private next_impl: (inout this, in_class: bool, no_skip: bool) -> bool = {
+        pos = get_next_position(in_class, no_skip);
+        if pos != regex.size() {
+            return true;
         }
+        else {
+            return false;
+        }
+    }
 
-        return false;
+    next: (inout this)          next_impl(false, false);
+    next_in_class: (inout this) next_impl(true, false);
+    next_no_skip: (inout this)  next_impl(false, true);
+
+    next_n: (inout this, n: int) -> bool = {
+        r := true;
+        cur := 0;
+        while r && cur < n next (r = next()) {
+            cur += 1;
+        }
+        return r;
     }
 
+    has_next: (this) -> bool = { return pos < regex.size(); }
+
     valid: (this) -> bool = { return has_next() && error_text.empty(); }
 
     error: (inout this, err: std::string) -> token_ptr = {
@@ -580,6 +607,20 @@ parse_context: type = {
         return nullptr;
     }
 
+    join: (list, func) -> std::string = {
+        r: std::string = "";
+
+        separator: std::string = "";
+        for list do (cur) {
+            r += separator + func(cur);
+            separator = ", ";
+        }
+
+        return r;
+    }
+
+    join: (list: std::vector) join(list, :(arg) -> _ == arg); // Todo: Shorthand syntax for const lambda
+
     private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = {
         perl_syntax := false;
         if !no_skip {
@@ -700,6 +741,7 @@ parse_context: type = {
 
             if !cur_token && valid() { cur_token = alternative_token::parse(this); }
             if !cur_token && valid() { cur_token = any_token::parse(this); }
+            if !cur_token && valid() { cur_token = class_token::parse(this); }
             if !cur_token && valid() { cur_token = group_ref_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = line_end_token_parse(this); }
@@ -1119,6 +1161,188 @@ char_token_matcher:  (inout cur, inout ctx,
     }
 }
 
+// Regex syntax: []  Example: [abcx-y[:digits:]]
+//
+class_token: @polymorphic_base type = {
+    this: regex_token_base = ();
+
+    negate: bool;
+    class_str: std::string;
+
+    operator=: (out this, negate_: bool, class_str_: std::string, str: std::string) = {
+        regex_token_base = str;
+        negate = negate_;
+        class_str = class_str_;
+    }
+
+    // TODO: Rework class generation: Generate check functions for classes.
+    parse: (inout ctx: parse_context) -> token_ptr = {
+        if ctx.current() != '[' { return nullptr; }
+
+        start_pos := ctx.get_pos();
+
+        supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
+                                                       "lower", "print", "punct", "space", "upper", "word", "xdigit");
+
+        classes: std::vector = ();
+
+        // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
+        is_negate:= false;
+        first:= true;
+        range:= false;
+        while ctx.next_in_class() & (ctx.current() != ']' || first) {
+            if ctx.current() == '^' {
+                is_negate = true;
+                continue; // Skip rest of the loop. Also the first update.
+            }
+            if ctx.current() == '[' && ctx.peek_in_class() == ':' {
+                // We have a character class.
+                _ = ctx.next_n(2);  // Skip [:
+
+                name: std::string = "";
+                if !ctx.grab_until(":]", out name) { return ctx.error("Could not find end of character class."); }
+                if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) {
+                    return ctx.error("Unsupported character class. Supported ones are: (ctx.join(supported_classes))$");
+                }
+
+                classes.push_back("[:(name)$:]");
+
+                _ = ctx.next(); // Skip ':' pointing to the ending ']'.
+            }
+            else if ctx.current() == '\\' {
+                if ctx.next_no_skip()  && (ctx.current() != ']') {
+                    if  ' ' == ctx.current() && ctx.get_modifiers().perl_code_syntax && ctx.get_modifiers().perl_code_syntax_in_classes {
+                        classes.push_back(std::string(1, ctx.current())); // TODO: UFCS error with char as argument.
+                    }
+                    else {
+                        name := "";
+                            if 'd' == ctx.current() { name = "short_digits"; }
+                        else if 'D' == ctx.current() { name = "short_not_digits"; }
+                        else if 'h' == ctx.current() { name = "short_hor_space"; }
+                        else if 'H' == ctx.current() { name = "short_not_hor_space"; }
+                        else if 's' == ctx.current() { name = "short_space"; }
+                        else if 'S' == ctx.current() { name = "short_not_space"; }
+                        else if 'v' == ctx.current() { name = "short_ver_space"; }
+                        else if 'V' == ctx.current() { name = "short_not_ver_space"; }
+                        else if 'w' == ctx.current() { name = "short_word"; }
+                        else if 'W' == ctx.current() { name = "short_not_word"; }
+                        else {
+                            return ctx.error("Unknown group escape.");
+                        }
+                        classes.push_back("[:(name)$:]");
+                    }
+                } else {
+                    return ctx.error("Escape without a following character.");
+                }
+            }
+            else if ctx.current() == '-' {
+                if first { // Literal if first entry.
+                    classes.push_back("(ctx.current())$");
+                } else {
+                    range = true;
+                }
+            }
+            else {
+                if range { // Modify last element to be a range.
+                    classes.back() += "-(ctx.current())$";
+                    range = false;
+                }
+                else {
+                    classes.push_back("(ctx.current())$");
+                }
+            }
+
+            first = false;
+        }
+
+        if ctx.current() != ']' {
+            return ctx.error("Error end of character class definition before terminating ']'.");
+        }
+        end_pos := ctx.get_pos();
+
+        if range { // If '-' is last entry treat it as a literal char.
+            classes.push_back("-");
+        }
+
+        // Second step: Wrap the item on the class stack with corresponding class implementation.
+        for classes do (inout cur) {
+            if cur.starts_with("[:") {
+                name := cur.substr(2, cur.size() - 4);
+                cur = create_matcher("(name)$_class", "");
+            }
+            else if 1 != cur.size() {
+                cur = create_matcher("range_class_entry", "'(cur[0])$', '(cur[2])$'");
+            }
+            else {
+                cur = create_matcher("single_class_entry", "'(cur)$'");
+            }
+        }
+
+        inner := ctx.join(classes);
+        return shared.new(is_negate, inner, ctx.get_range(start_pos, end_pos));
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx.add_check("class_token_matcher::match((ctx.match_parameters())$)");
+    }
+
+
+    private create_matcher: (name: std::string, template_arguments: std::string) -> std::string = {
+        sep := ", ";
+        if template_arguments.empty() { sep = ""; }
+
+        return "::cpp2::regex::(name)$";
+    }
+}
+
+class_token_matcher:  type =
+{
+    match: (inout cur, inout ctx, modifiers) -> bool = {
+        if modifiers.has_flag(expression_flags::case_insensitive) {
+            if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
+                cur += 1;
+                return true;
+            }
+            else {
+                return false;
+            }
+        }
+        else {
+            if cur != ctx.end && negate != match_any(cur*) {
+                cur += 1;
+                return true;
+            }
+            else {
+                return false;
+            }
+        }
+    }
+
+    private match_any:  (c: CharT) -> bool = {
+        r: bool = First::includes(c);
+
+        if !r {
+            if constexpr 0 != sizeof...(Other) {
+                r = match_any(c);
+            }
+        }
+
+        return r;
+    }
+
+    // TODO: Implement proper to string
+    // to_string: () -> bstring = {
+    //     r: bstring = "[";
+    //     if negate {
+    //         r += "^";
+    //     }
+    //     r += (bstring() + ... + List::to_string());
+    //     r += "]";
+
+    //     return r;
+    // }
+}
+
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1314,7 +1538,7 @@ line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
     if ctx.current() != '$' && !(ctx.current() == '\\' && ctx.peek() == '$') { return nullptr; }
 
     if (ctx.current() == '\\') { _ = ctx.next(); } // Skip escape
-    return shared.new("\\$", "line_end_token_matcher");
+    return shared.new("\\\\$", "line_end_token_matcher");
 }
 
 line_end_token_matcher:  (cur, inout ctx, modifiers) -> bool = {
@@ -2202,8 +2426,7 @@ regex_parser:  type = {
 
     source: std::string = "";
 
-    supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
-                                                   "lower", "print", "punct", "space", "upper", "word", "xdigit");
+
 
     operator=: (out this, r: std::string_view, m: std::string_view, e: Error_out) = {
         this.regex = r;
@@ -2518,113 +2741,6 @@ regex_parser:  type = {
     // Parsing functions
     //
 
-    is_class: (inout this, c: char) -> bool = {
-        if c != '[' { return false; }
-
-        classes: std::vector = ();
-
-        c_cur: char = current();
-
-        // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
-        negate:= false;
-        first:= true;
-        range:= false;
-        while next_in_class(out c_cur) & (c_cur != ']' || first) {
-            if c_cur == '^' {
-                negate = true;
-                continue; // Skip rest of the loop. Also the first update.
-            }
-            if c_cur == '[' && peek_in_class() == ':' {
-                // We have a character class.
-                _ = skip_n(2);  // Skip [:
-
-                name: std::string = "";
-                if !grab_until(":]", out name) { error("Could not find end of character class."); return false; }
-                if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) {
-                    error("Unsupported character class. Supported ones are: (join(supported_classes))$");
-                    return false;
-                }
-
-                classes.push_back("[:(name)$:]");
-
-                _ = skip(); // Skip ':' pointing to the ending ']'.
-            }
-            else if c_cur == '\\' {
-                if next_no_skip(out c_cur)  && (c_cur != ']') {
-                    if  ' ' == c_cur && cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes {
-                        classes.push_back(std::string(1, c_cur)); // TODO: UFCS error with char as argument.
-                    }
-                    else {
-                        name := "";
-                            if 'd' == c_cur { name = "short_digits"; }
-                        else if 'D' == c_cur { name = "short_not_digits"; }
-                        else if 'h' == c_cur { name = "short_hor_space"; }
-                        else if 'H' == c_cur { name = "short_not_hor_space"; }
-                        else if 's' == c_cur { name = "short_space"; }
-                        else if 'S' == c_cur { name = "short_not_space"; }
-                        else if 'v' == c_cur { name = "short_ver_space"; }
-                        else if 'V' == c_cur { name = "short_not_ver_space"; }
-                        else if 'w' == c_cur { name = "short_word"; }
-                        else if 'W' == c_cur { name = "short_not_word"; }
-                        else {
-                            error("Unknown group escape.");
-                            return false;
-                        }
-                        classes.push_back("[:(name)$:]");
-                    }
-                } else {
-                    error("Escape without a following character.");
-                    return false;
-                }
-            }
-            else if c_cur == '-' {
-                if first { // Literal if first entry.
-                    classes.push_back("(c_cur)$");
-                } else {
-                    range = true;
-                }
-            }
-            else {
-                if range { // Modify last element to be a range.
-                    classes.back() += "-(c_cur)$";
-                    range = false;
-                }
-                else {
-                    classes.push_back("(c_cur)$");
-                }
-            }
-
-            first = false;
-        }
-
-        if c_cur != ']' {
-            error("Error end of character class definition before terminating ']'.");
-            return false;
-        }
-
-        if range { // If '-' is last entry treat it as a literal char.
-            classes.push_back("-");
-        }
-
-        // Second step: Wrap the item on the class stack with corresponding class implementation.
-        for classes do (inout cur) {
-            if cur.starts_with("[:") {
-                name := cur.substr(2, cur.size() - 4);
-                cur = create_matcher("(name)$_class", "");
-            }
-            else if 1 != cur.size() {
-                cur = create_matcher("range_class_entry", "'(cur[0])$', '(cur[2])$'");
-            }
-            else {
-                cur = create_matcher("single_class_entry", "'(cur)$'");
-            }
-        }
-
-        inner := join(classes);
-        cur_group_state.add(create_matcher("class_matcher_logic", "(negate)$, (inner)$"));
-        return true;
-    }
-
     is_escape: (inout this, c: char) -> bool = {
         if c != '\\' { return false; }
 
@@ -2863,7 +2979,6 @@ regex_parser:  type = {
         while c != '\n' next _ = next(out c) {
             if c == term { return; }
 
-            if !has_error && is_class(c) { continue; }
             if !has_error && is_escape(c) { continue; }
             if !has_error && is_group(c) { continue; }
             if !has_error && is_handle_special(c) { continue; }

From 590ee3c5f4f3528fb7786b3fc444b43821bf0069 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 8 May 2024 14:12:08 +0200
Subject: [PATCH 112/161] Added full group matcher parsing.

---
 include/cpp2regex.h | 1594 +++++++++++++++++++++----------------------
 source/regex.h2     |  552 +++++++--------
 2 files changed, 1048 insertions(+), 1098 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 17326ccb71..bcfc3c9240 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,137 +106,136 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 770 "regex.h2"
+#line 845 "regex.h2"
 class generation_function_context;
     
 
-#line 786 "regex.h2"
+#line 861 "regex.h2"
 class generation_context;
 
-#line 933 "regex.h2"
+#line 1008 "regex.h2"
 class regex_token_list;
     
 
-#line 969 "regex.h2"
+#line 1044 "regex.h2"
 class regex_token_base;
     
 
-#line 983 "regex.h2"
+#line 1058 "regex.h2"
 class regex_token_check;
     
 
-#line 1002 "regex.h2"
+#line 1074 "regex.h2"
+class regex_token_empty;
+    
+
+#line 1090 "regex.h2"
 class alternative_token;
     
 
-#line 1020 "regex.h2"
+#line 1108 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1069 "regex.h2"
+#line 1157 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1095 "regex.h2"
+#line 1183 "regex.h2"
 class any_token;
     
 
-#line 1122 "regex.h2"
+#line 1210 "regex.h2"
 class char_token;
     
 
-#line 1166 "regex.h2"
+#line 1254 "regex.h2"
 class class_token;
     
 
-#line 1298 "regex.h2"
+#line 1386 "regex.h2"
 template class class_token_matcher;
 
-#line 1352 "regex.h2"
+#line 1440 "regex.h2"
 class group_ref_token;
     
 
-#line 1484 "regex.h2"
+#line 1572 "regex.h2"
 class group_token;
     
 
-#line 1571 "regex.h2"
+#line 1752 "regex.h2"
+class modifier_token;
+    
+
+#line 1768 "regex.h2"
+template class apply_modifiers_matcher;
+
+#line 1780 "regex.h2"
+template class pop_modifiers_matcher;
+
+#line 1823 "regex.h2"
 class range_token;
     
 
-#line 1709 "regex.h2"
+#line 1961 "regex.h2"
 template class range_token_matcher;
 
-#line 1834 "regex.h2"
+#line 2086 "regex.h2"
 class special_range_token;
     
 
-#line 1879 "regex.h2"
+#line 2131 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 1887 "regex.h2"
+#line 2139 "regex.h2"
 template class char_matcher_logic;
 
-#line 1915 "regex.h2"
+#line 2167 "regex.h2"
 template class class_matcher_logic;
 
-#line 1964 "regex.h2"
+#line 2216 "regex.h2"
 template class global_group_reset;
     
 
-#line 1976 "regex.h2"
-template class group_matcher_start_logic;
-    
-
-#line 2013 "regex.h2"
-template class group_matcher_end_logic;
-    
-
-#line 2037 "regex.h2"
-template class special_group_end_logic;
-    
-
-#line 2045 "regex.h2"
+#line 2228 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 2068 "regex.h2"
-template class modifier_matcher_logic;
-
-#line 2080 "regex.h2"
+#line 2252 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 2107 "regex.h2"
+#line 2279 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 2158 "regex.h2"
+#line 2330 "regex.h2"
 template class group_name_list;
 
-#line 2170 "regex.h2"
+#line 2342 "regex.h2"
 class group_name_list_end;
     
 
-#line 2175 "regex.h2"
+#line 2347 "regex.h2"
 template class regular_expression;
 
-#line 2256 "regex.h2"
+#line 2428 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2345 "regex.h2"
+#line 2517 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2352 "regex.h2"
+#line 2524 "regex.h2"
 class regex_parser_group_state;
 
-#line 2387 "regex.h2"
+#line 2559 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2414 "regex.h2"
+#line 2586 "regex.h2"
 template class regex_parser;
 
-#line 3056 "regex.h2"
+#line 3030 "regex.h2"
 }
 }
 
@@ -700,18 +699,21 @@ class parse_context {
     public: [[nodiscard]] auto get_modifiers() const& -> regex_parser_modifier_state;
 
 #line 506 "regex.h2"
+    public: auto set_modifiers(cpp2::in mod) & -> void;
+
+#line 510 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 517 "regex.h2"
+#line 521 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 523 "regex.h2"
+#line 527 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 528 "regex.h2"
+#line 532 "regex.h2"
     // Position management functions
     //
 
@@ -721,81 +723,88 @@ class parse_context {
 
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 539 "regex.h2"
+#line 543 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 543 "regex.h2"
+#line 547 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 553 "regex.h2"
+#line 557 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 557 "regex.h2"
+#line 561 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 562 "regex.h2"
+#line 566 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 566 "regex.h2"
-    public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
+#line 570 "regex.h2"
+    public: auto set_named_group(cpp2::in name, cpp2::in id) & -> void;
 
 #line 576 "regex.h2"
+    public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
+
+#line 586 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 588 "regex.h2"
+#line 598 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::in n) & -> bool;
 
-#line 601 "regex.h2"
+#line 611 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 610 "regex.h2"
+#line 620 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 622 "regex.h2"
+#line 632 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 664 "regex.h2"
+#line 674 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 685 "regex.h2"
+#line 695 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 701 "regex.h2"
+#line 711 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 721 "regex.h2"
+#line 731 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 731 "regex.h2"
+#line 741 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
+    public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+                      regex_parser_modifier_state& parser_modifiers) & -> bool;
+
+#line 809 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 765 "regex.h2"
+#line 840 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 768 "regex.h2"
+#line 843 "regex.h2"
 };
 
 class generation_function_context {
@@ -804,10 +813,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 781 "regex.h2"
+#line 856 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 784 "regex.h2"
+#line 859 "regex.h2"
 };
 
 class generation_context {
@@ -824,81 +833,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 803 "regex.h2"
+#line 878 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 808 "regex.h2"
+#line 883 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 815 "regex.h2"
+#line 890 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 821 "regex.h2"
+#line 896 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 829 "regex.h2"
+#line 904 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 851 "regex.h2"
+#line 926 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 855 "regex.h2"
+#line 930 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 859 "regex.h2"
+#line 934 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 863 "regex.h2"
+#line 938 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 872 "regex.h2"
+#line 947 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 878 "regex.h2"
+#line 953 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 890 "regex.h2"
+#line 965 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 894 "regex.h2"
+#line 969 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 898 "regex.h2"
+#line 973 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 904 "regex.h2"
+#line 979 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 910 "regex.h2"
+#line 985 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 916 "regex.h2"
+#line 991 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 924 "regex.h2"
+#line 999 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 931 "regex.h2"
+#line 1006 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 936 "regex.h2"
+#line 1011 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 943 "regex.h2"
+#line 1018 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 949 "regex.h2"
+#line 1024 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 959 "regex.h2"
+#line 1034 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -906,36 +915,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 966 "regex.h2"
+#line 1041 "regex.h2"
 };
 
-#line 969 "regex.h2"
+#line 1044 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 972 "regex.h2"
+#line 1047 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 976 "regex.h2"
+#line 1051 "regex.h2"
     public: explicit regex_token_base();
 
-#line 980 "regex.h2"
+#line 1055 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 981 "regex.h2"
+#line 1056 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 986 "regex.h2"
+#line 1061 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 993 "regex.h2"
+#line 1068 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -943,7 +952,24 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 996 "regex.h2"
+#line 1071 "regex.h2"
+};
+
+#line 1074 "regex.h2"
+class regex_token_empty: public regex_token_base {
+
+#line 1077 "regex.h2"
+    public: explicit regex_token_empty(cpp2::in str);
+
+#line 1081 "regex.h2"
+    public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
+    public: virtual ~regex_token_empty() noexcept;
+
+    public: regex_token_empty(regex_token_empty const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_empty const&) -> void = delete;
+
+
+#line 1084 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -952,12 +978,12 @@ class regex_token_check: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1005 "regex.h2"
+#line 1093 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1015 "regex.h2"
+#line 1103 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -965,23 +991,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1018 "regex.h2"
+#line 1106 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1024 "regex.h2"
+#line 1112 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1031 "regex.h2"
+#line 1119 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1045 "regex.h2"
+#line 1133 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 1056 "regex.h2"
+#line 1144 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -989,33 +1015,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1067 "regex.h2"
+#line 1155 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1074 "regex.h2"
+#line 1162 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1091 "regex.h2"
+#line 1179 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1098 "regex.h2"
+#line 1186 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1106 "regex.h2"
+#line 1194 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1023,23 +1049,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1109 "regex.h2"
+#line 1197 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1122 "regex.h2"
+#line 1210 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1125 "regex.h2"
+#line 1213 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1132 "regex.h2"
+#line 1220 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1136 "regex.h2"
+#line 1224 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1047,30 +1073,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1141 "regex.h2"
+#line 1229 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1164 "regex.h2"
+#line 1252 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1169 "regex.h2"
+#line 1257 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1178 "regex.h2"
+#line 1266 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1285 "regex.h2"
+#line 1373 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1290 "regex.h2"
+#line 1378 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1078,21 +1104,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1296 "regex.h2"
+#line 1384 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1321 "regex.h2"
+#line 1409 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1333 "regex.h2"
+#line 1421 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1104,7 +1130,7 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1344 "regex.h2"
+#line 1432 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -1115,15 +1141,15 @@ template class class_token_matche
 //
 class group_ref_token: public regex_token_base {
 
-#line 1355 "regex.h2"
+#line 1443 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1362 "regex.h2"
+#line 1450 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1454 "regex.h2"
+#line 1542 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1131,24 +1157,28 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1457 "regex.h2"
+#line 1545 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1484 "regex.h2"
+#line 1572 "regex.h2"
 class group_token: public regex_token {
 
-#line 1487 "regex.h2"
+#line 1575 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
+    private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1508 "regex.h2"
+#line 1702 "regex.h2"
+    public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
+
+#line 1719 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1525 "regex.h2"
+#line 1743 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1157,30 +1187,70 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1533 "regex.h2"
+#line 1750 "regex.h2"
+};
+
+class modifier_token: public regex_token_base {
+
+#line 1755 "regex.h2"
+    private: std::string mod; 
+
+    public: explicit modifier_token(cpp2::in mod_);
+
+#line 1762 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~modifier_token() noexcept;
+
+    public: modifier_token(modifier_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(modifier_token const&) -> void = delete;
+
+
+#line 1766 "regex.h2"
+};
+
+template class apply_modifiers_matcher {
+
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto;
+    public: apply_modifiers_matcher() = default;
+    public: apply_modifiers_matcher(apply_modifiers_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
+
+
+#line 1778 "regex.h2"
+};
+
+template class pop_modifiers_matcher {
+
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto;
+    public: pop_modifiers_matcher() = default;
+    public: pop_modifiers_matcher(pop_modifiers_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
+
+
+#line 1785 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1544 "regex.h2"
+#line 1796 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1556 "regex.h2"
+#line 1808 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1564 "regex.h2"
+#line 1816 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1569 "regex.h2"
+#line 1821 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1574 "regex.h2"
+#line 1826 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1190,65 +1260,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1651 "regex.h2"
+#line 1903 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1662 "regex.h2"
+#line 1914 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1674 "regex.h2"
+#line 1926 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1698 "regex.h2"
+#line 1950 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1706 "regex.h2"
+#line 1958 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 1707 "regex.h2"
+#line 1959 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1723 "regex.h2"
+#line 1975 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1728 "regex.h2"
+#line 1980 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1733 "regex.h2"
+#line 1985 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1739 "regex.h2"
+#line 1991 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 1754 "regex.h2"
+#line 2006 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 1782 "regex.h2"
+#line 2034 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 1806 "regex.h2"
+#line 2058 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 1830 "regex.h2"
+#line 2082 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 1837 "regex.h2"
+#line 2089 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1257,10 +1327,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 1866 "regex.h2"
+#line 2118 "regex.h2"
 };
 
-#line 1869 "regex.h2"
+#line 2121 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1268,7 +1338,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 1877 "regex.h2"
+#line 2129 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1279,7 +1349,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 1883 "regex.h2"
+#line 2135 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1288,27 +1358,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1908 "regex.h2"
+#line 2160 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 1910 "regex.h2"
+#line 2162 "regex.h2"
 };
 
-#line 1913 "regex.h2"
+#line 2165 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1936 "regex.h2"
+#line 2188 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 1948 "regex.h2"
+#line 2200 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1317,7 +1387,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 1960 "regex.h2"
+#line 2212 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1325,58 +1395,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 1970 "regex.h2"
+#line 2222 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 1972 "regex.h2"
-};
-
-// Regex syntax: () Example: (.*)
-//
-template class group_matcher_start_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 1984 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
-
-#line 1990 "regex.h2"
-    public: [[nodiscard]] static auto to_string() -> bstring;
-    public: group_matcher_start_logic() = default;
-    public: group_matcher_start_logic(group_matcher_start_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(group_matcher_start_logic const&) -> void = delete;
-
-
-#line 2011 "regex.h2"
-};
-
-template class group_matcher_end_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 2025 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-
-    public: [[nodiscard]] static auto to_string() -> bstring;
-    public: group_matcher_end_logic() = default;
-    public: group_matcher_end_logic(group_matcher_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(group_matcher_end_logic const&) -> void = delete;
-
-
-#line 2035 "regex.h2"
-};
-
-template class special_group_end_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: special_group_end_logic() = default;
-    public: special_group_end_logic(special_group_end_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(special_group_end_logic const&) -> void = delete;
-
-#line 2041 "regex.h2"
+#line 2224 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1385,30 +1411,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2062 "regex.h2"
+#line 2245 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 2064 "regex.h2"
-};
-
-// Regex syntax: (?)  Example: (?i)
-//
-template class modifier_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 2073 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: modifier_matcher_logic() = default;
-    public: modifier_matcher_logic(modifier_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(modifier_matcher_logic const&) -> void = delete;
-
-#line 2075 "regex.h2"
+#line 2247 "regex.h2"
 };
 
 // Named character classes
@@ -1420,7 +1430,7 @@ template                    void = delete;
 
 
-#line 2082 "regex.h2"
+#line 2254 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1430,7 +1440,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 2092 "regex.h2"
+#line 2264 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1450,7 +1460,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2138 "regex.h2"
+#line 2310 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1458,10 +1468,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 2146 "regex.h2"
+#line 2318 "regex.h2"
 };
 
-#line 2149 "regex.h2"
+#line 2321 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1479,7 +1489,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2168 "regex.h2"
+#line 2340 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1488,7 +1498,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2172 "regex.h2"
+#line 2344 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1504,7 +1514,7 @@ template matched_, context const& ctx_);
 
-#line 2190 "regex.h2"
+#line 2362 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1519,7 +1529,7 @@ template void = delete;
 
 
-#line 2206 "regex.h2"
+#line 2378 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1527,13 +1537,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2218 "regex.h2"
+#line 2390 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2240 "regex.h2"
+#line 2412 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1545,7 +1555,7 @@ template void = delete;
 
 
-#line 2253 "regex.h2"
+#line 2425 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1561,7 +1571,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2271 "regex.h2"
+#line 2443 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1576,7 +1586,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2287 "regex.h2"
+#line 2459 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1584,13 +1594,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2299 "regex.h2"
+#line 2471 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2321 "regex.h2"
+#line 2493 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1602,7 +1612,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2334 "regex.h2"
+#line 2506 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1633,15 +1643,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2368 "regex.h2"
+#line 2540 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2374 "regex.h2"
+#line 2546 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2383 "regex.h2"
+#line 2555 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1654,13 +1664,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2401 "regex.h2"
+#line 2573 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2406 "regex.h2"
+#line 2578 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2411 "regex.h2"
+#line 2583 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1679,53 +1689,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2431 "regex.h2"
+#line 2603 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2437 "regex.h2"
+#line 2609 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2446 "regex.h2"
+#line 2618 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2450 "regex.h2"
+#line 2622 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2465 "regex.h2"
+#line 2637 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2471 "regex.h2"
+#line 2643 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2512 "regex.h2"
+#line 2684 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2524 "regex.h2"
+#line 2696 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2530 "regex.h2"
+#line 2702 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2537 "regex.h2"
+#line 2709 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2546 "regex.h2"
+#line 2718 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2554 "regex.h2"
+#line 2726 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2564 "regex.h2"
+#line 2736 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1733,68 +1743,61 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2574 "regex.h2"
+#line 2746 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2586 "regex.h2"
+#line 2758 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2589 "regex.h2"
+#line 2761 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2599 "regex.h2"
+#line 2771 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2617 "regex.h2"
+#line 2789 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2627 "regex.h2"
+#line 2799 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2640 "regex.h2"
+#line 2812 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2676 "regex.h2"
-    public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
-                      regex_parser_modifier_state& parser_modifiers) & -> bool;
-
-#line 2741 "regex.h2"
+#line 2848 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2838 "regex.h2"
-    public: [[nodiscard]] auto is_group(cpp2::in c) & -> bool;
-
-#line 2970 "regex.h2"
+#line 2945 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2977 "regex.h2"
+#line 2952 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2993 "regex.h2"
+#line 2967 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3015 "regex.h2"
+#line 2989 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3047 "regex.h2"
+#line 3021 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3056 "regex.h2"
+#line 3030 "regex.h2"
 }
 }
 
@@ -2304,7 +2307,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return {  }; // TODO:
     }
 
-#line 509 "regex.h2"
+#line 506 "regex.h2"
+    auto parse_context::set_modifiers(cpp2::in mod) & -> void{
+        static_cast(mod);
+    }
+
+#line 513 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2313,36 +2321,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 517 "regex.h2"
+#line 521 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(max_group));
     }
 
-#line 523 "regex.h2"
+#line 527 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 531 "regex.h2"
+#line 535 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 533 "regex.h2"
+#line 537 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::in start, cpp2::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
 
-#line 535 "regex.h2"
+#line 539 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 539 "regex.h2"
+#line 543 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 543 "regex.h2"
+#line 547 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2353,22 +2361,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 553 "regex.h2"
+#line 557 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 558 "regex.h2"
+#line 562 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 562 "regex.h2"
+#line 566 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 566 "regex.h2"
+#line 570 "regex.h2"
+    auto parse_context::set_named_group(cpp2::in name, cpp2::in id) & -> void{
+        if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
+            CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
+        }
+    }
+
+#line 576 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
@@ -2379,10 +2394,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 576 "regex.h2"
+#line 586 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 578 "regex.h2"
+#line 588 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2393,14 +2408,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 588 "regex.h2"
+#line 598 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 589 "regex.h2"
+#line 599 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 590 "regex.h2"
+#line 600 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 592 "regex.h2"
+#line 602 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2410,19 +2425,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 601 "regex.h2"
+#line 611 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
 
-#line 603 "regex.h2"
+#line 613 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 605 "regex.h2"
+#line 615 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 610 "regex.h2"
+#line 620 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2435,10 +2450,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 622 "regex.h2"
+#line 632 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 624 "regex.h2"
+#line 634 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2478,7 +2493,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 664 "regex.h2"
+#line 674 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2500,14 +2515,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 685 "regex.h2"
+#line 695 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 686 "regex.h2"
+#line 696 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 687 "regex.h2"
+#line 697 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 689 "regex.h2"
+#line 699 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2520,7 +2535,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 701 "regex.h2"
+#line 711 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2541,7 +2556,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(r.value()); 
     }
 
-#line 721 "regex.h2"
+#line 731 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2552,12 +2567,78 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 731 "regex.h2"
+#line 741 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 732 "regex.h2"
+#line 742 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 734 "regex.h2"
+#line 744 "regex.h2"
+    [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
+                      regex_parser_modifier_state& parser_modifiers) & -> bool{
+        auto is_negative {false}; 
+        auto is_reset {false}; 
+
+        auto add {0}; 
+        auto remove {0}; 
+
+        auto apply {[&, _1 = (&is_negative), _2 = (&remove), _3 = (&add)](cpp2::in flag) mutable -> void{
+            if (*cpp2::assert_not_null(_1)) {
+                *cpp2::assert_not_null(_2) |= flag;
+            }
+            else {
+                *cpp2::assert_not_null(_3) |= flag;
+            }
+        }}; 
+
+        auto iter {CPP2_UFCS(begin)(change_str)}; 
+        for( ; iter != CPP2_UFCS(end)(change_str); (++iter) ) {
+            auto cur {*cpp2::assert_not_null(iter)}; 
+            if (cur == '^') {
+                is_reset = true;
+            }
+            else {if (cur == '-') {
+                if (is_reset) {static_cast(error("No negative modifier allowed.")); return false; }
+                is_negative = true;
+            }
+            else {if (cur == 'i') {apply(expression_flags::case_insensitive); }
+            else {if (cur == 'm') {apply(expression_flags::multiple_lines); }
+            else {if (cur == 's') {apply(expression_flags::single_line); }
+            else {if (cur == 'n') {
+                apply(expression_flags::no_group_captures);
+                parser_modifiers.group_captures_have_numbers = is_negative;
+            }
+            else {if (cur == 'x') {
+                if ((iter + 1) == CPP2_UFCS(end)(change_str) || *cpp2::assert_not_null((iter + 1)) != 'x') {
+                    // x modifier
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !(is_negative);
+
+                    // Just x unsets xx and remove x also removes xx
+                    remove |= expression_flags::perl_code_syntax_in_classes;
+                    parser_modifiers.perl_code_syntax_in_classes = false;
+                }
+                else { // xx modifier
+                    // xx also sets or unsets x
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !(is_negative);
+
+                    apply(expression_flags::perl_code_syntax_in_classes);
+                    parser_modifiers.perl_code_syntax_in_classes = !(is_negative);
+
+                    ++iter; // Skip the second x
+                }
+            }
+            else {
+                static_cast(error(("Unknown modifier: " + cpp2::to_string(std::move(cur))))); return false; 
+            }}}}}}}
+        }
+
+        modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
+
+        return true; 
+    }
+
+#line 809 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2589,10 +2670,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 765 "regex.h2"
+#line 840 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 774 "regex.h2"
+#line 849 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2600,27 +2681,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 781 "regex.h2"
+#line 856 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 796 "regex.h2"
+#line 871 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 798 "regex.h2"
+#line 873 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 803 "regex.h2"
+#line 878 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 808 "regex.h2"
+#line 883 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2628,14 +2709,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 815 "regex.h2"
+#line 890 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 821 "regex.h2"
+#line 896 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2644,7 +2725,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 829 "regex.h2"
+#line 904 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2666,22 +2747,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 851 "regex.h2"
+#line 926 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 855 "regex.h2"
+#line 930 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 859 "regex.h2"
+#line 934 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 863 "regex.h2"
+#line 938 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2691,14 +2772,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 872 "regex.h2"
+#line 947 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 878 "regex.h2"
+#line 953 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2711,38 +2792,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 890 "regex.h2"
+#line 965 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 894 "regex.h2"
+#line 969 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 898 "regex.h2"
+#line 973 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 904 "regex.h2"
+#line 979 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 910 "regex.h2"
+#line 985 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 916 "regex.h2"
+#line 991 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2751,7 +2832,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 924 "regex.h2"
+#line 999 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2760,22 +2841,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 938 "regex.h2"
+#line 1013 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 941 "regex.h2"
+#line 1016 "regex.h2"
     }
 
-#line 943 "regex.h2"
+#line 1018 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 949 "regex.h2"
+#line 1024 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2786,7 +2867,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 959 "regex.h2"
+#line 1034 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2797,45 +2878,59 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 972 "regex.h2"
+#line 1047 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 974 "regex.h2"
+#line 1049 "regex.h2"
     }
 
-#line 976 "regex.h2"
+#line 1051 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 978 "regex.h2"
+#line 1053 "regex.h2"
     }
 
-#line 980 "regex.h2"
+#line 1055 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 988 "regex.h2"
+#line 1063 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 991 "regex.h2"
+#line 1066 "regex.h2"
     }
 
-#line 993 "regex.h2"
+#line 1068 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1005 "regex.h2"
+#line 1077 "regex.h2"
+    regex_token_empty::regex_token_empty(cpp2::in str)
+        : regex_token_base{ str }{
+
+#line 1079 "regex.h2"
+    }
+
+#line 1081 "regex.h2"
+    auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
+        // Nothing.
+    }
+
+    regex_token_empty::~regex_token_empty() noexcept{}
+
+#line 1093 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1007 "regex.h2"
+#line 1095 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2844,22 +2939,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1015 "regex.h2"
+#line 1103 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1026 "regex.h2"
+#line 1114 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1029 "regex.h2"
+#line 1117 "regex.h2"
     }
 
-#line 1031 "regex.h2"
+#line 1119 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2874,7 +2969,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1045 "regex.h2"
+#line 1133 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2886,7 +2981,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1056 "regex.h2"
+#line 1144 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2901,11 +2996,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1071 "regex.h2"
+#line 1159 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1074 "regex.h2"
+#line 1162 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -2924,25 +3019,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1098 "regex.h2"
+#line 1186 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1100 "regex.h2"
+#line 1188 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1106 "regex.h2"
+#line 1194 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1111 "regex.h2"
+#line 1199 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2954,20 +3049,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1127 "regex.h2"
+#line 1215 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1130 "regex.h2"
+#line 1218 "regex.h2"
     }
 
-#line 1132 "regex.h2"
+#line 1220 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1136 "regex.h2"
+#line 1224 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2976,7 +3071,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1143 "regex.h2"
+#line 1231 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2998,16 +3093,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1172 "regex.h2"
+#line 1260 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1176 "regex.h2"
+#line 1264 "regex.h2"
     }
 
-#line 1179 "regex.h2"
+#line 1267 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3114,12 +3209,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1285 "regex.h2"
+#line 1373 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1290 "regex.h2"
+#line 1378 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3129,7 +3224,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1300 "regex.h2"
+#line 1388 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3151,7 +3246,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1321 "regex.h2"
+#line 1409 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3164,15 +3259,15 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1357 "regex.h2"
+#line 1445 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1360 "regex.h2"
+#line 1448 "regex.h2"
     }
 
-#line 1362 "regex.h2"
+#line 1450 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3265,14 +3360,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1454 "regex.h2"
+#line 1542 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1459 "regex.h2"
+#line 1547 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3298,30 +3393,157 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1490 "regex.h2"
+#line 1579 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
-        if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "No closing bracket for group."); }
+        auto has_id {CPP2_UFCS(get_modifiers)(ctx).group_captures_have_numbers}; 
+        auto has_pattern {true}; 
+        std::string group_name {""}; 
+        auto group_name_brackets {true}; 
+        std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
+        std::string modifiers {""}; 
+
+        auto modifiers_change_to {CPP2_UFCS(get_modifiers)(ctx)}; 
+
+        // Skip the '('
+        if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group without closing bracket."); }
+        if (CPP2_UFCS(current)(ctx) == '?') {
+            // Special group
+            if (!(CPP2_UFCS(next_no_skip)(ctx))) {return CPP2_UFCS(error)(ctx, "Missing character after group opening."); }
+
+            if (CPP2_UFCS(current)(ctx) == '<' || CPP2_UFCS(current)(ctx) == '\'') {
+                // named group
+                auto end_char {CPP2_UFCS(current)(ctx)}; 
+                if (end_char == '<') {
+                    end_char = '>';
+                }else {
+                    group_name_brackets = false;
+                }
+                has_id = true; // Force id for named groups.
+                if (!(CPP2_UFCS(next)(ctx))) { return CPP2_UFCS(error)(ctx, "Missing ending bracket for named group."); }/* skip '<' */
+                if (!(CPP2_UFCS(grab_until)(ctx, std::move(end_char), cpp2::out(&group_name)))) {return CPP2_UFCS(error)(ctx, "Missing ending bracket for named group."); }
+                if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group without closing bracket."); }
+            }
+            else {if (CPP2_UFCS(current)(ctx) == '#') {
+                // Comment
+                std::string comment_str {""}; 
+                if (!(CPP2_UFCS(grab_until)(ctx, ")", cpp2::out(&comment_str)))) {return CPP2_UFCS(error)(ctx, "Group without closing bracket."); }
+                // Do not add comment. Has problems with ranges.
+
+                return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?#" + cpp2::to_string(std::move(comment_str)) + ")")); 
+            }
+            else {if (CPP2_UFCS(current)(ctx) == '|') {
+                // Branch reset group
 
-        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
+                if (!(CPP2_UFCS(next)(ctx))) { return CPP2_UFCS(error)(ctx, "Missing ending bracket for named group."); }/* skip '|' */
 
-#line 1498 "regex.h2"
-        (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
+                auto old_parser_state {CPP2_UFCS(start_group)(ctx)}; 
+                auto old_branch_state {CPP2_UFCS(branch_reset_new_state)(ctx)}; 
+                if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
+                CPP2_UFCS(branch_reset_restore_state)(ctx, std::move(old_branch_state));
+                auto inner_ {CPP2_UFCS(end_group)(ctx, std::move(old_parser_state))}; 
 
-        auto old_state {CPP2_UFCS(start_group)(ctx)}; 
-        if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
-        (*cpp2::assert_not_null(r)).inner = CPP2_UFCS(end_group)(ctx, std::move(old_state));
-        CPP2_UFCS(set_string)((*cpp2::assert_not_null(r)), ("(" + cpp2::to_string(CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner)))) + ")"));
+                token_vec list {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?|"), std::move(inner_), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ")")}; 
+                return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(list)); 
+            }
+            else {if (CPP2_UFCS(current)(ctx) == '=' || CPP2_UFCS(current)(ctx) == '!') {
+                static_cast(CPP2_UFCS(next)(ctx));// Skip '!'
+                // Positive or negative lookahead
+                // TODO: return parse_lookahead("?(ctx.current())$", ctx.current() == '=');
+                return nullptr; 
+            }
+            else {
+                // Simple modifier
+                has_id = false;
+                if (!(CPP2_UFCS(grab_until_one_of)(ctx, "):", cpp2::out(&modifiers)))) {return CPP2_UFCS(error)(ctx, "Missing ending bracket for group."); }
+                if (!(CPP2_UFCS(parser_group_modifiers)(ctx, modifiers, cpp2::out(&modifier_change), modifiers_change_to))) {
+                     return nullptr; 
+                }
 
-        return r; 
+                if (')' == CPP2_UFCS(current)(ctx)) {
+                    has_pattern = false;
+                }
+                else {
+                    if (!(CPP2_UFCS(next)(ctx))) { return CPP2_UFCS(error)(ctx, "Missing ending bracket for group."); }/* skip ':' */
+                }
+            }}}}
+        }
+        else {if (CPP2_UFCS(current)(ctx) == '*') {
+            // named pattern
+            static_cast(CPP2_UFCS(next)(ctx));// Skip *.
+            std::string name {""}; 
+            if (!(CPP2_UFCS(grab_until)(ctx, ':', cpp2::out(&name)))) {return CPP2_UFCS(error)(ctx, "Missing colon for named pattern."); }
+
+            if (name == "pla" || name == "positive_lookahead") {
+                // TODO: return parse_lookahead("*(name)$:", true);
+                return nullptr; 
+            }
+            else {if (name == "nla" || name == "negative_lookahead") {
+                // TODO: return parse_lookahead("*(name)$:", false);
+                return nullptr; 
+            }
+            else {
+                return CPP2_UFCS(error)(ctx, ("Unknown named group pattern: '" + cpp2::to_string(std::move(name)) + "'")); 
+            }}
+        }}
+
+        if (std::move(has_pattern)) {
+            // regular group
+
+            auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
+            if (std::move(has_id)) {
+                (*cpp2::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
+
+                if (0 != CPP2_UFCS(size)(group_name)) {
+                    CPP2_UFCS(set_named_group)(ctx, group_name, (*cpp2::assert_not_null(r)).number);
+                }
+            }
+
+            auto old_state {CPP2_UFCS(start_group)(ctx)}; 
+            CPP2_UFCS(set_modifiers)(ctx, std::move(modifiers_change_to));
+            if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
+            (*cpp2::assert_not_null(r)).inner = CPP2_UFCS(end_group)(ctx, std::move(old_state));
+            CPP2_UFCS(set_string)((*cpp2::assert_not_null(r)), gen_string(std::move(group_name), std::move(group_name_brackets), std::move(modifiers), (*cpp2::assert_not_null(r)).inner));
+            (*cpp2::assert_not_null(r)).mod = std::move(modifier_change);
+
+            return r; 
+        }
+        else {
+            // Only a modifier
+            CPP2_UFCS(set_modifiers)(ctx, std::move(modifiers_change_to));
+
+            return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(modifier_change)); 
+        }
+    }
+
+#line 1702 "regex.h2"
+    [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
+        std::string start {"("}; 
+        if (0 != CPP2_UFCS(size)(name)) {
+            if (name_brackets) {
+                start += ("?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">");
+            }
+            else {
+                start += ("?'" + cpp2::to_string(CPP2_UFCS(data)(name)) + "'");
+            }
+        }
+        else {if (!(CPP2_UFCS(empty)(modifiers))) {
+            start += "?" + modifiers + ":";
+        }}
+
+        return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1508 "regex.h2"
+#line 1719 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
         }
+
+        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
+        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
+
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(inner)), ctx);
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_end(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3333,21 +3555,54 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             CPP2_UFCS(add)(ctx, "});");
             CPP2_UFCS(add)(ctx, ("_ = " + cpp2::to_string(std::move(tmp_name)) + ";"));// TODO: Guard object problem.
         }
+
+        next_name = CPP2_UFCS(next_func_name)(ctx);
+        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1525 "regex.h2"
+#line 1743 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
-        if (-1 == number) {
-            return {  }; 
+        auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
+        if (-1 != number) {
+            CPP2_UFCS(push_back)(r, number);
+        }
+        return r; 
+    }
+
+    group_token::~group_token() noexcept{}
+
+#line 1757 "regex.h2"
+    modifier_token::modifier_token(cpp2::in mod_)
+        : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
+        , mod{ mod_ }{
+
+#line 1760 "regex.h2"
+    }
+
+#line 1762 "regex.h2"
+    auto modifier_token::generate_code(generation_context& ctx) const -> void{
+        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
+        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
+    }
+
+    modifier_token::~modifier_token() noexcept{}
+
+#line 1770 "regex.h2"
+    template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
+        if constexpr (push) {
+            return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
         }
         else {
-            return { number }; 
+            return tail(cur, ctx, Modifiers::replace(ModifierChange()), end_func); 
         }
     }
 
-    group_token::~group_token() noexcept{}
+#line 1782 "regex.h2"
+    template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
+        return tail(cur, ctx, Modifiers::pop(), end_func); 
+    }
 
-#line 1537 "regex.h2"
+#line 1789 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '$' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$'))) {return nullptr; }
 
@@ -3355,7 +3610,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", "line_end_token_matcher"); 
 }
 
-#line 1544 "regex.h2"
+#line 1796 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3368,24 +3623,24 @@ template [[
     }}
 }
 
-#line 1558 "regex.h2"
+#line 1810 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^') {return nullptr; }
 
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
 }
 
-#line 1564 "regex.h2"
+#line 1816 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1579 "regex.h2"
+#line 1831 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1581 "regex.h2"
+#line 1833 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3429,7 +3684,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 1625 "regex.h2"
+#line 1877 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3456,7 +3711,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 1651 "regex.h2"
+#line 1903 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3468,7 +3723,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1662 "regex.h2"
+#line 1914 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3481,7 +3736,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1674 "regex.h2"
+#line 1926 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3506,7 +3761,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1698 "regex.h2"
+#line 1950 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3515,12 +3770,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1706 "regex.h2"
+#line 1958 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 1711 "regex.h2"
+#line 1963 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3533,26 +3788,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1723 "regex.h2"
+#line 1975 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1728 "regex.h2"
+#line 1980 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1733 "regex.h2"
+#line 1985 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1739 "regex.h2"
+#line 1991 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3568,7 +3823,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 1754 "regex.h2"
+#line 2006 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3597,7 +3852,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1782 "regex.h2"
+#line 2034 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3622,7 +3877,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 1806 "regex.h2"
+#line 2058 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3648,7 +3903,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 1837 "regex.h2"
+#line 2089 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3671,7 +3926,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 1860 "regex.h2"
+#line 2112 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3681,14 +3936,14 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 1880 "regex.h2"
+#line 2132 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 1881 "regex.h2"
+#line 2133 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1882 "regex.h2"
+#line 2134 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 1889 "regex.h2"
+#line 2141 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3708,12 +3963,12 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 1908 "regex.h2"
+#line 2160 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1909 "regex.h2"
+#line 2161 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 1917 "regex.h2"
+#line 2169 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3733,7 +3988,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 1936 "regex.h2"
+#line 2188 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3746,10 +4001,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1948 "regex.h2"
+#line 2200 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 1950 "regex.h2"
+#line 2202 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -3761,88 +4016,18 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1965 "regex.h2"
+#line 2217 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 1970 "regex.h2"
+#line 2222 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 1971 "regex.h2"
+#line 2223 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 1977 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_start_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        if (-1 != group) {
-            CPP2_UFCS(set_group_start)(ctx, group, cur);
-        }
-        return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
-    }
-
-#line 1984 "regex.h2"
-    template  auto group_matcher_start_logic::reset_ranges(auto& ctx) -> void{
-        if (-1 != group) {
-            CPP2_UFCS(set_group_invalid)(ctx, group);
-        }
-    }
-
-#line 1990 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_start_logic::to_string() -> bstring{
-        if (group != 0) {
-            if (0 != CPP2_UFCS(size)(name)) {
-                if (name_brackets) {
-                    return { "(?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">" }; 
-                }
-                else {
-                    return { "(?'" + cpp2::to_string(CPP2_UFCS(data)(name)) + "'" }; 
-                }
-            }
-            else {if (ModifierChange::has_change) {
-                return { "(?" + cpp2::to_string(ModifierChange::to_string()) + ":" }; 
-            }
-            else {
-                return "("; 
-            }}
-        }
-        else {
-            return ""; 
-        }
-    }
-
-#line 2014 "regex.h2"
-    template  template [[nodiscard]] auto group_matcher_end_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        if (-1 != group) {
-            CPP2_UFCS(set_group_end)(ctx, group, cur);
-        }
-        auto r {Other::match(cur, ctx, Modifier::pop(), end_func)}; 
-        if (!(r.matched) && -1 != group) {
-            CPP2_UFCS(set_group_invalid)(ctx, group);
-        }
-        return r; 
-    }
-
-#line 2025 "regex.h2"
-    template  auto group_matcher_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-
-#line 2027 "regex.h2"
-    template  [[nodiscard]] auto group_matcher_end_logic::to_string() -> bstring{
-        if (group != 0) {
-            return ")"; 
-        }
-        else {
-            return ""; 
-        }
-    }
-
-#line 2038 "regex.h2"
-    template  template [[nodiscard]] auto special_group_end_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2039 "regex.h2"
-    template  auto special_group_end_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2040 "regex.h2"
-    template  [[nodiscard]] auto special_group_end_logic::to_string() -> auto { return bstring(")"); }
-
-#line 2047 "regex.h2"
+#line 2230 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -3858,21 +4043,12 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 2062 "regex.h2"
+#line 2245 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2063 "regex.h2"
+#line 2246 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 2070 "regex.h2"
-    template  template [[nodiscard]] auto modifier_matcher_logic::match(auto const& cur, auto& ctx, [[maybe_unused]] Modifier const& unnamed_param_3, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func); 
-    }
-#line 2073 "regex.h2"
-    template  auto modifier_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2074 "regex.h2"
-    template  [[nodiscard]] auto modifier_matcher_logic::to_string() -> auto { return "(?" + cpp2::to_string(ModifierChange::to_string()) + ")"; }
-
-#line 2109 "regex.h2"
+#line 2281 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -3902,9 +4078,9 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 2138 "regex.h2"
+#line 2310 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2139 "regex.h2"
+#line 2311 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -3913,7 +4089,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2160 "regex.h2"
+#line 2332 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -3923,34 +4099,34 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2171 "regex.h2"
+#line 2343 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2185 "regex.h2"
+#line 2357 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2188 "regex.h2"
+#line 2360 "regex.h2"
         }
 
-#line 2190 "regex.h2"
+#line 2362 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2191 "regex.h2"
+#line 2363 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2192 "regex.h2"
+#line 2364 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2193 "regex.h2"
+#line 2365 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2195 "regex.h2"
+#line 2367 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2196 "regex.h2"
+#line 2368 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2197 "regex.h2"
+#line 2369 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2199 "regex.h2"
+#line 2371 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -3959,13 +4135,13 @@ template [[nodiscard]] auto line_start_toke
             return group_id; 
         }
 
-#line 2208 "regex.h2"
+#line 2380 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2209 "regex.h2"
+#line 2381 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2210 "regex.h2"
+#line 2382 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2211 "regex.h2"
+#line 2383 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3973,13 +4149,13 @@ template [[nodiscard]] auto line_start_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2218 "regex.h2"
+#line 2390 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2219 "regex.h2"
+#line 2391 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2220 "regex.h2"
+#line 2392 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2221 "regex.h2"
+#line 2393 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3999,10 +4175,10 @@ template [[nodiscard]] auto line_start_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2240 "regex.h2"
+#line 2412 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2245 "regex.h2"
+#line 2417 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4012,31 +4188,31 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2266 "regex.h2"
+#line 2438 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2269 "regex.h2"
+#line 2441 "regex.h2"
         }
 
-#line 2271 "regex.h2"
+#line 2443 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2272 "regex.h2"
+#line 2444 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2273 "regex.h2"
+#line 2445 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2274 "regex.h2"
+#line 2446 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2276 "regex.h2"
+#line 2448 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2277 "regex.h2"
+#line 2449 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2278 "regex.h2"
+#line 2450 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2280 "regex.h2"
+#line 2452 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4045,13 +4221,13 @@ template [[nodiscard]] auto line_start_toke
             return group_id; 
         }
 
-#line 2289 "regex.h2"
+#line 2461 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2290 "regex.h2"
+#line 2462 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2291 "regex.h2"
+#line 2463 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2292 "regex.h2"
+#line 2464 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4059,13 +4235,13 @@ template [[nodiscard]] auto line_start_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2299 "regex.h2"
+#line 2471 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2300 "regex.h2"
+#line 2472 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2301 "regex.h2"
+#line 2473 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2302 "regex.h2"
+#line 2474 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4085,10 +4261,10 @@ template [[nodiscard]] auto line_start_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2321 "regex.h2"
+#line 2493 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2326 "regex.h2"
+#line 2498 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4098,24 +4274,24 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2362 "regex.h2"
+#line 2534 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2368 "regex.h2"
+#line 2540 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2374 "regex.h2"
+#line 2546 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2376 "regex.h2"
+#line 2548 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4123,10 +4299,10 @@ template [[nodiscard]] auto line_start_toke
         static_cast(std::move(last));
     }
 
-#line 2383 "regex.h2"
+#line 2555 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2393 "regex.h2"
+#line 2565 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4135,29 +4311,29 @@ template [[nodiscard]] auto line_start_toke
         return g; 
     }
 
-#line 2401 "regex.h2"
+#line 2573 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2406 "regex.h2"
+#line 2578 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2431 "regex.h2"
+#line 2603 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2435 "regex.h2"
+#line 2607 "regex.h2"
     }
 
-#line 2439 "regex.h2"
+#line 2611 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4165,12 +4341,12 @@ template [[nodiscard]] auto line_start_toke
         return old_state; 
     }
 
-#line 2446 "regex.h2"
+#line 2618 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2453 "regex.h2"
+#line 2625 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4183,14 +4359,14 @@ template [[nodiscard]] auto line_start_toke
         return old_state; 
     }
 
-#line 2465 "regex.h2"
+#line 2637 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2474 "regex.h2"
+#line 2646 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4229,7 +4405,7 @@ template [[nodiscard]] auto line_start_toke
         return cur; 
     }
 
-#line 2512 "regex.h2"
+#line 2684 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4242,14 +4418,14 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2524 "regex.h2"
+#line 2696 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2525 "regex.h2"
+#line 2697 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2526 "regex.h2"
+#line 2698 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2530 "regex.h2"
+#line 2702 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4257,7 +4433,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2537 "regex.h2"
+#line 2709 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4267,7 +4443,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2546 "regex.h2"
+#line 2718 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4276,7 +4452,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2554 "regex.h2"
+#line 2726 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4287,18 +4463,18 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2564 "regex.h2"
+#line 2736 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2565 "regex.h2"
+#line 2737 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2569 "regex.h2"
+#line 2741 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2574 "regex.h2"
+#line 2746 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4311,10 +4487,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2586 "regex.h2"
+#line 2758 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2592 "regex.h2"
+#line 2764 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4322,10 +4498,10 @@ template [[nodiscard]] auto line_start_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2599 "regex.h2"
+#line 2771 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2601 "regex.h2"
+#line 2773 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4342,7 +4518,7 @@ template [[nodiscard]] auto line_start_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2617 "regex.h2"
+#line 2789 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4353,7 +4529,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2629 "regex.h2"
+#line 2801 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4365,7 +4541,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2640 "regex.h2"
+#line 2812 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4402,73 +4578,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2676 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
-                      regex_parser_modifier_state& parser_modifiers) & -> bool{
-        auto is_negative {false}; 
-        auto is_reset {false}; 
-
-        auto add {0}; 
-        auto remove {0}; 
-
-        auto apply {[&, _1 = (&is_negative), _2 = (&remove), _3 = (&add)](cpp2::in flag) mutable -> void{
-            if (*cpp2::assert_not_null(_1)) {
-                *cpp2::assert_not_null(_2) |= flag;
-            }
-            else {
-                *cpp2::assert_not_null(_3) |= flag;
-            }
-        }}; 
-
-        auto iter {CPP2_UFCS(begin)(change_str)}; 
-        for( ; iter != CPP2_UFCS(end)(change_str); (++iter) ) {
-            auto cur {*cpp2::assert_not_null(iter)}; 
-            if (cur == '^') {
-                is_reset = true;
-            }
-            else {if (cur == '-') {
-                if (is_reset) {error("No negative modifier allowed."); return false; }
-                is_negative = true;
-            }
-            else {if (cur == 'i') {apply(expression_flags::case_insensitive); }
-            else {if (cur == 'm') {apply(expression_flags::multiple_lines); }
-            else {if (cur == 's') {apply(expression_flags::single_line); }
-            else {if (cur == 'n') {
-                apply(expression_flags::no_group_captures);
-                parser_modifiers.group_captures_have_numbers = is_negative;
-            }
-            else {if (cur == 'x') {
-                if ((iter + 1) == CPP2_UFCS(end)(change_str) || *cpp2::assert_not_null((iter + 1)) != 'x') {
-                    // x modifier
-                    apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !(is_negative);
-
-                    // Just x unsets xx and remove x also removes xx
-                    remove |= expression_flags::perl_code_syntax_in_classes;
-                    parser_modifiers.perl_code_syntax_in_classes = false;
-                }
-                else { // xx modifier
-                    // xx also sets or unsets x
-                    apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !(is_negative);
-
-                    apply(expression_flags::perl_code_syntax_in_classes);
-                    parser_modifiers.perl_code_syntax_in_classes = !(is_negative);
-
-                    ++iter; // Skip the second x
-                }
-            }
-            else {
-                error(("Unknown modifier: " + cpp2::to_string(std::move(cur)))); return false; 
-            }}}}}}}
-        }
-
-        modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
-
-        return true; 
-    }
-
-#line 2744 "regex.h2"
+#line 2851 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
@@ -4563,140 +4673,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2838 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_group(cpp2::in c) & -> bool{
-        if (c != '(') {return false; }
-
-        auto has_id {cur_group_state.modifiers.group_captures_have_numbers}; 
-        auto has_pattern {true}; 
-        std::string group_name {""}; 
-        auto group_name_brackets {true}; 
-        std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
-
-        auto modifiers_change_to {cur_group_state.modifiers}; 
-
-        char c_next {'\0'}; 
-        // Skip the '('
-        if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
-        if (c_next == '?') {
-            // Special group
-            if (!(next_no_skip(cpp2::out(&c_next)))) {error("Missing character after group opening."); return false; }
-
-            if (c_next == '<' || c_next == '\'') {
-                // named group
-                auto end_char {c_next}; 
-                if (end_char == '<') {
-                    end_char = '>';
-                }else {
-                    group_name_brackets = false;
-                }
-                has_id = true; // Force id for named groups.
-                if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '<' */
-                if (!(grab_until(std::move(end_char), cpp2::out(&group_name)))) {error("Missing ending bracket for named group."); return false; }
-                if (!(next(cpp2::out(&c_next)))) {error("Group without closing bracket."); return false; }
-            }
-            else {if (c_next == '#') {
-                // Comment
-                std::string comment_str {""}; 
-                if (!(grab_until(")", cpp2::out(&comment_str)))) {error("Group without closing bracket."); return false; }
-                // Do not add comment. Has problems with ranges.
-
-                return true; 
-            }
-            else {if (c_next == '|') {
-                // Branch reset group
-
-                if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for named group."); return false; }/* skip '|' */
-
-                auto old_parser_state {group_new_state()}; 
-                auto old_branch_state {branch_reset_new_state()}; 
-                parse_until(')');
-                auto inner {create_matcher_from_state()}; 
-                branch_reset_restore_state(std::move(old_branch_state));
-                group_restore_state(std::move(old_parser_state));
-
-                auto start_matcher {create_matcher("branch_reset_matcher_logic", "")}; 
-                auto end_matcher {create_matcher("special_group_end_logic", "")}; 
-
-                std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
-                CPP2_UFCS(add)(cur_group_state, create_matcher_from_list(std::move(v)));
-
-                return true; 
-            }
-            else {if (c_next == '=' || c_next == '!') {
-                static_cast(skip());// Skip '!'
-                // Positive or negative lookahead
-                return parse_lookahead(("?" + cpp2::to_string(c_next)), std::move(c_next) == '='); 
-            }
-            else {
-                // Simple modifier
-                has_id = false;
-                std::string change_str {""}; 
-                if (!(grab_until_one_of("):", cpp2::out(&change_str)))) {error("Missing ending bracket for group."); return false; }
-                if (!(parser_group_modifiers(std::move(change_str), cpp2::out(&modifier_change), modifiers_change_to))) {
-                     return false; 
-                }
-
-                if (')' == current()) {
-                    has_pattern = false;
-                }
-                else {
-                    if (!(next(cpp2::out(&c_next))))   { error("Missing ending bracket for group."); return false; }/* skip ':' */
-                }
-            }}}}
-        }
-        else {if (std::move(c_next) == '*') {
-            // named pattern
-            static_cast(skip());// Skip *.
-            std::string name {""}; 
-            if (!(grab_until(':', cpp2::out(&name)))) {error("Missing colon for named pattern."); return false; }
-
-            if (name == "pla" || name == "positive_lookahead") {
-                return parse_lookahead(("*" + cpp2::to_string(std::move(name)) + ":"), true); 
-            }
-            else {if (name == "nla" || name == "negative_lookahead") {
-                return parse_lookahead(("*" + cpp2::to_string(std::move(name)) + ":"), false); 
-            }
-            else {
-                error(("Unknown named group pattern: '" + cpp2::to_string(std::move(name)) + "'")); return false; 
-            }}
-        }}
-
-        if (std::move(has_pattern)) {
-            // regular group
-
-            auto group_number {-1}; 
-            if (std::move(has_id)) {
-                group_number = CPP2_UFCS(next)(cur_branch_reset_state);
-            }
-
-            auto old_state {group_new_state()}; 
-            cur_group_state.modifiers = std::move(modifiers_change_to);
-            parse_until(')');
-            auto inner {create_matcher_from_state()}; 
-            group_restore_state(std::move(old_state));
-
-            auto start_matcher {create_matcher("group_matcher_start_logic", (cpp2::to_string(group_number) + ", " + cpp2::to_string(std::move(modifier_change)) + ", \"" + cpp2::to_string(group_name) + "\", " + cpp2::to_string(std::move(group_name_brackets))))}; 
-            if (0 != CPP2_UFCS(size)(group_name)) {
-                if (!(CPP2_UFCS(contains)(named_groups, group_name))) {// Redefinition of group name is not an error. The left most one is retained.
-                    CPP2_ASSERT_IN_BOUNDS(named_groups, group_name) = group_number;
-                }
-            }
-            auto end_matcher {create_matcher("group_matcher_end_logic", (cpp2::to_string(std::move(group_number))))}; 
-
-            std::vector v {std::move(start_matcher), std::move(inner), std::move(end_matcher)}; 
-            CPP2_UFCS(add)(cur_group_state, create_matcher_from_list(std::move(v)));
-        }
-        else {
-            // Only a modifier
-            cur_group_state.modifiers = std::move(modifiers_change_to);
-            CPP2_UFCS(add)(cur_group_state, create_matcher("modifier_matcher_logic", (cpp2::to_string(std::move(modifier_change)))));
-        }
-
-        return true; 
-    }
-
-#line 2970 "regex.h2"
+#line 2945 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4704,14 +4681,13 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2977 "regex.h2"
+#line 2952 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
             if (c == term) {return ; }
 
             if (!(has_error) && is_escape(c)) {continue; }
-            if (!(has_error) && is_group(c)) {continue; }
             if (!(has_error) && is_handle_special(c)) {continue; }
 
             if (has_error) {return ; }
@@ -4721,7 +4697,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2993 "regex.h2"
+#line 2967 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4744,7 +4720,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 3015 "regex.h2"
+#line 2989 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4778,7 +4754,7 @@ template [[nodiscard]] auto line_start_toke
         return source; 
     }
 
-#line 3049 "regex.h2"
+#line 3023 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index c3cf87eacf..3c3ce00280 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -503,6 +503,10 @@ parse_context: type = {
         return (); // TODO:
     }
 
+    set_modifiers: (inout this, mod: regex_parser_modifier_state) = {
+        _ = mod;
+    }
+
     // Branch reset management functions
     //
 
@@ -563,6 +567,12 @@ parse_context: type = {
         return cur_branch_reset_state.next();
     }
 
+    set_named_group: (inout this, name: std::string, id: int) = {
+        if !named_groups.contains(name) { // Redefinition of group name is not an error. The left most one is retained.
+            named_groups[name] = id;
+        }
+    }
+
     get_named_group: (this, name: std::string) -> int = {
         iter := named_groups.find(name);
         if iter == named_groups.end() {
@@ -731,6 +741,71 @@ parse_context: type = {
     peek: (in this)          peek_impl(false);
     peek_in_class: (in this) peek_impl(true);
 
+    parser_group_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
+                      inout parser_modifiers: regex_parser_modifier_state) -> bool = {
+        is_negative := false;
+        is_reset    := false;
+
+        add    := 0;
+        remove := 0;
+
+        apply := :(flag: int) = {
+            if is_negative&$* {
+                remove&$* |= flag;
+            }
+            else {
+                add&$* |= flag;
+            }
+        };
+
+        iter := change_str.begin();
+        while iter != change_str.end() next (iter++) {
+            cur := iter*;
+            if cur == '^' {
+                is_reset = true;
+            }
+            else if cur == '-' {
+                if is_reset { _= error("No negative modifier allowed."); return false; }
+                is_negative = true;
+            }
+            else if cur == 'i' { apply(expression_flags::case_insensitive); }
+            else if cur == 'm' { apply(expression_flags::multiple_lines); }
+            else if cur == 's' { apply(expression_flags::single_line); }
+            else if cur == 'n' {
+                apply(expression_flags::no_group_captures);
+                parser_modifiers.group_captures_have_numbers = is_negative;
+            }
+            else if cur == 'x' {
+                if (iter + 1) == change_str.end() || (iter + 1)* != 'x' {
+                    // x modifier
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !is_negative;
+
+                    // Just x unsets xx and remove x also removes xx
+                    remove |= expression_flags::perl_code_syntax_in_classes;
+                    parser_modifiers.perl_code_syntax_in_classes = false;
+                }
+                else { // xx modifier
+                    // xx also sets or unsets x
+                    apply(expression_flags::perl_code_syntax);
+                    parser_modifiers.perl_code_syntax = !is_negative;
+
+                    apply(expression_flags::perl_code_syntax_in_classes);
+                    parser_modifiers.perl_code_syntax_in_classes = !is_negative;
+
+                    iter++; // Skip the second x
+                }
+            }
+            else {
+                _= error("Unknown modifier: (cur)$"); return false;
+            }
+        }
+
+        modifier_change = "::cpp2::regex::match_modifiers_state_change";
+
+        return true;
+    }
+
     parse_until:(inout this, term: char) -> bool = {
         cur_token: token_ptr = ();
 
@@ -995,6 +1070,19 @@ regex_token_check: @polymorphic_base type = {
     }
 }
 
+
+regex_token_empty: @polymorphic_base type = {
+    this: regex_token_base;
+
+    operator=:(out this, str: std::string) = {
+        regex_token_base = (str);
+    }
+
+    generate_code: (override this, inout _: generation_context) = {
+        // Nothing.
+    }
+}
+
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen.
@@ -1486,29 +1574,156 @@ group_token: @polymorphic_base type = {
 
     number: int      = -1;
     inner: token_ptr = nullptr;
+    mod: std::string = "::cpp2::regex::match_modifiers_no_change";
 
     parse: (inout ctx: parse_context) -> token_ptr = {
         if ctx.current() != '(' { return nullptr; }
 
-        if !ctx.next() { return ctx.error("No closing bracket for group."); }
+        has_id :=  ctx.get_modifiers().group_captures_have_numbers;
+        has_pattern := true;
+        group_name : std::string = "";
+        group_name_brackets := true;
+        modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
+        modifiers : std::string = "";
 
-        r := shared.new();
+        modifiers_change_to : =  ctx.get_modifiers();
 
+        // Skip the '('
+        if !ctx.next() { return ctx.error("Group without closing bracket."); }
+        if ctx.current() == '?' {
+            // Special group
+            if !ctx.next_no_skip() { return ctx.error("Missing character after group opening.");  }
 
-        r*.number = ctx.next_group();
+            if ctx.current() == '<' || ctx.current() == '\'' {
+                // named group
+                end_char := ctx.current();
+                if end_char == '<' {
+                    end_char = '>';
+                } else {
+                    group_name_brackets = false;
+                }
+                has_id = true; // Force id for named groups.
+                if !ctx.next() /* skip '<' */ { return ctx.error("Missing ending bracket for named group.");  }
+                if !ctx.grab_until(end_char, out group_name) { return ctx.error("Missing ending bracket for named group.");  }
+                if !ctx.next() { return ctx.error("Group without closing bracket."); }
+            }
+            else if ctx.current() == '#' {
+                // Comment
+                comment_str : std::string = "";
+                if !ctx.grab_until(")", out comment_str) { return ctx.error("Group without closing bracket."); }
+                // Do not add comment. Has problems with ranges.
 
-        old_state: _ = ctx.start_group();
-        if !ctx.parse_until(')') { return nullptr; }
-        r*.inner = ctx.end_group(old_state);
-        r*.set_string("((r*.inner*.to_string())$)");
+                return shared.new("(?#(comment_str)$)");
+            }
+            else if ctx.current() == '|' {
+                // Branch reset group
 
-        return r;
+                if !ctx.next() /* skip '|' */ { return ctx.error("Missing ending bracket for named group.");  }
+
+                old_parser_state := ctx.start_group();
+                old_branch_state  := ctx.branch_reset_new_state();
+                if !ctx.parse_until(')') { return nullptr; }
+                ctx.branch_reset_restore_state(old_branch_state);
+                inner_ := ctx.end_group(old_parser_state);
+
+                list: token_vec = (shared.new("(?|"), inner_, shared.new(")"));
+                return shared.new(list);
+            }
+            else if ctx.current() == '=' || ctx.current() == '!' {
+                _ = ctx.next(); // Skip '!'
+                // Positive or negative lookahead
+                // TODO: return parse_lookahead("?(ctx.current())$", ctx.current() == '=');
+                return nullptr;
+            }
+            else {
+                // Simple modifier
+                has_id = false;
+                if !ctx.grab_until_one_of("):", out modifiers) { return ctx.error("Missing ending bracket for group."); }
+                if !ctx.parser_group_modifiers(modifiers, out modifier_change, modifiers_change_to) {
+                     return nullptr;
+                }
+
+                if ')' == ctx.current() {
+                    has_pattern = false;
+                }
+                else {
+                    if !ctx.next() /* skip ':' */ { return ctx.error("Missing ending bracket for group.");  }
+                }
+            }
+        }
+        else if ctx.current() == '*' {
+            // named pattern
+            _ = ctx.next(); // Skip *.
+            name: std::string = "";
+            if !ctx.grab_until(':', out name) { return ctx.error("Missing colon for named pattern.");  }
+
+            if name == "pla" || name == "positive_lookahead" {
+                // TODO: return parse_lookahead("*(name)$:", true);
+                return nullptr;
+            }
+            else if name == "nla" || name == "negative_lookahead" {
+                // TODO: return parse_lookahead("*(name)$:", false);
+                return nullptr;
+            }
+            else {
+                return ctx.error("Unknown named group pattern: '(name)$'");
+            }
+        }
+
+        if has_pattern {
+            // regular group
+
+            r := shared.new();
+            if has_id {
+                r*.number = ctx.next_group();
+
+                if 0 != group_name.size() {
+                    ctx.set_named_group(group_name, r*.number);
+                }
+            }
+
+            old_state := ctx.start_group();
+            ctx.set_modifiers(modifiers_change_to);
+            if !ctx.parse_until(')') { return nullptr; }
+            r*.inner = ctx.end_group(old_state);
+            r*.set_string(gen_string(group_name, group_name_brackets, modifiers, r*.inner));
+            r*.mod = modifier_change;
+
+            return r;
+        }
+        else {
+            // Only a modifier
+            ctx.set_modifiers(modifiers_change_to);
+
+            return shared.new(modifier_change);
+        }
+    }
+
+    gen_string: (name: std::string, name_brackets: bool, modifiers: std::string, inner_: token_ptr) -> std::string = {
+        start : std::string = "(";
+        if 0 != name.size() {
+            if name_brackets {
+                start += "?<(name.data())$>";
+            }
+            else {
+                start += "?'(name.data())$'";
+            }
+        }
+        else if ! modifiers.empty() {
+            start += "?" + modifiers + ":";
+        }
+
+        return start + inner_*.to_string() + ")";
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
         if -1 != number {
             ctx.add("ctx.set_group_start((number)$, r.pos);");
         }
+
+        next_name := ctx.next_func_name();
+        ctx.add_statefull(next_name, "cpp2::regex::apply_modifiers_matcher::match((ctx.match_parameters())$, other, (next_name)$)");
+
         inner*.generate_code(ctx);
         if -1 != number {
             ctx.add("ctx.set_group_end((number)$, r.pos);");
@@ -1520,18 +1735,55 @@ group_token: @polymorphic_base type = {
             ctx.add("});");
             ctx.add("_ = (tmp_name)$;"); // TODO: Guard object problem.
         }
+
+        next_name = ctx.next_func_name();
+        ctx.add_statefull(next_name, "cpp2::regex::pop_modifiers_matcher::match((ctx.match_parameters())$, other, (next_name)$)");
     }
 
     get_groups: (override this) -> std::vector = {
-        if -1 == number {
-            return ();
+        r := inner*.get_groups();
+        if -1 != number {
+            r.push_back(number);
+        }
+        return r;
+    }
+}
+
+modifier_token: @polymorphic_base type = {
+    this: regex_token_base;
+
+    mod: std::string;
+
+    operator=: (out this, mod_: std::string) = {
+        regex_token_base = ("(?(mod_)$)");
+        mod = mod_;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        next_name := ctx.next_func_name();
+        ctx.add_statefull(next_name, "cpp2::regex::apply_modifiers_matcher::match((ctx.match_parameters())$, other, (next_name)$)");
+    }
+}
+
+apply_modifiers_matcher:  type = {
+
+    match:  (cur: Iter, inout ctx, _: Modifiers, end_func, tail) -> _ = {
+        if constexpr push {
+            return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func);
         }
         else {
-            return (number);
+            return tail(cur, ctx, Modifiers::replace(ModifierChange()), end_func);
         }
     }
 }
 
+pop_modifiers_matcher:  type = {
+
+    match:  (cur: Iter, inout ctx, _: Modifiers, end_func, tail) -> _ = {
+        return tail(cur, ctx, Modifiers::pop(), end_func);
+    }
+}
+
 // Regex syntax: $  Example: aa$
 //
 line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
@@ -1971,75 +2223,6 @@ global_group_reset:  type = {
     to_string:    ()  bstring("\\K");
 }
 
-// Regex syntax: () Example: (.*)
-//
-group_matcher_start_logic:  type = {
-    match:  (cur, inout ctx, _ : Modifiers, end_func, _ : Other) -> _ = {
-        if -1 != group {
-            ctx.set_group_start(group, cur);
-        }
-        return Other::match(cur, ctx, Modifiers::push(ModifierChange()), end_func);
-    }
-
-    reset_ranges: (inout ctx) = {
-        if -1 != group {
-            ctx.set_group_invalid(group);
-        }
-    }
-
-    to_string: () -> bstring = {
-        if group != 0 {
-            if 0 != name.size() {
-                if name_brackets {
-                    return "(?<(name.data())$>";
-                }
-                else {
-                    return "(?'(name.data())$'";
-                }
-            }
-            else if ModifierChange::has_change {
-                return "(?(ModifierChange::to_string())$:";
-            }
-            else {
-                return "(";
-            }
-        }
-        else {
-            return "";
-        }
-    }
-}
-
-group_matcher_end_logic:  type = {
-    match:  (cur, inout ctx, _: Modifier, end_func, _ : Other) -> _ = {
-        if -1 != group {
-            ctx.set_group_end(group, cur);
-        }
-        r := Other::match(cur, ctx, Modifier::pop(), end_func);
-        if !r.matched && -1 != group {
-            ctx.set_group_invalid(group);
-        }
-        return r;
-    }
-
-    reset_ranges: (_) = {}
-
-    to_string: () -> bstring = {
-        if group != 0 {
-            return ")";
-        }
-        else {
-            return "";
-        }
-    }
-}
-
-special_group_end_logic:  type = {
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) Other::match(cur, ctx, modifiers, end_func);
-    reset_ranges: (_) = {}
-    to_string:    ()  bstring(")");
-}
-
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 lookahead_matcher_logic:  type =
@@ -2063,17 +2246,6 @@ lookahead_matcher_logic:  ty
     to_string:    ()          "((name.data())$(Pattern::to_string())$)";
 }
 
-// Regex syntax: (?)  Example: (?i)
-//
-modifier_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, _: Modifier, end_func, _ : Other) -> _ = {
-        return Other::match(cur, ctx, Modifier::replace(ModifierChange()), end_func);
-    }
-    reset_ranges: (_) = {}
-    to_string:    ()  "(?(ModifierChange::to_string())$)";
-}
-
 // Named character classes
 //
 
@@ -2673,71 +2845,6 @@ regex_parser:  type = {
         return r;
     }
 
-    parser_group_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
-                      inout parser_modifiers: regex_parser_modifier_state) -> bool = {
-        is_negative := false;
-        is_reset    := false;
-
-        add    := 0;
-        remove := 0;
-
-        apply := :(flag: int) = {
-            if is_negative&$* {
-                remove&$* |= flag;
-            }
-            else {
-                add&$* |= flag;
-            }
-        };
-
-        iter := change_str.begin();
-        while iter != change_str.end() next (iter++) {
-            cur := iter*;
-            if cur == '^' {
-                is_reset = true;
-            }
-            else if cur == '-' {
-                if is_reset { error("No negative modifier allowed."); return false; }
-                is_negative = true;
-            }
-            else if cur == 'i' { apply(expression_flags::case_insensitive); }
-            else if cur == 'm' { apply(expression_flags::multiple_lines); }
-            else if cur == 's' { apply(expression_flags::single_line); }
-            else if cur == 'n' {
-                apply(expression_flags::no_group_captures);
-                parser_modifiers.group_captures_have_numbers = is_negative;
-            }
-            else if cur == 'x' {
-                if (iter + 1) == change_str.end() || (iter + 1)* != 'x' {
-                    // x modifier
-                    apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !is_negative;
-
-                    // Just x unsets xx and remove x also removes xx
-                    remove |= expression_flags::perl_code_syntax_in_classes;
-                    parser_modifiers.perl_code_syntax_in_classes = false;
-                }
-                else { // xx modifier
-                    // xx also sets or unsets x
-                    apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !is_negative;
-
-                    apply(expression_flags::perl_code_syntax_in_classes);
-                    parser_modifiers.perl_code_syntax_in_classes = !is_negative;
-
-                    iter++; // Skip the second x
-                }
-            }
-            else {
-                error("Unknown modifier: (cur)$"); return false;
-            }
-        }
-
-        modifier_change = "::cpp2::regex::match_modifiers_state_change";
-
-        return true;
-    }
-
     // Parsing functions
     //
 
@@ -2835,138 +2942,6 @@ regex_parser:  type = {
         return true;
     }
 
-    is_group: (inout this, c: char) -> bool = {
-        if c != '(' { return false; }
-
-        has_id := cur_group_state.modifiers.group_captures_have_numbers;
-        has_pattern := true;
-        group_name : std::string = "";
-        group_name_brackets := true;
-        modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
-
-        modifiers_change_to : = cur_group_state.modifiers;
-
-        c_next : char = '\0';
-        // Skip the '('
-        if !next(out c_next) { error("Group without closing bracket."); return false;}
-        if c_next == '?' {
-            // Special group
-            if !next_no_skip(out c_next) { error("Missing character after group opening."); return false; }
-
-            if c_next == '<' || c_next == '\'' {
-                // named group
-                end_char := c_next;
-                if end_char == '<' {
-                    end_char = '>';
-                } else {
-                    group_name_brackets = false;
-                }
-                has_id = true; // Force id for named groups.
-                if !next(out c_next) /* skip '<' */ { error("Missing ending bracket for named group."); return false; }
-                if !grab_until(end_char, out group_name) { error("Missing ending bracket for named group."); return false; }
-                if !next(out c_next) { error("Group without closing bracket."); return false;}
-            }
-            else if c_next == '#' {
-                // Comment
-                comment_str : std::string = "";
-                if !grab_until(")", out comment_str) { error("Group without closing bracket."); return false;}
-                // Do not add comment. Has problems with ranges.
-
-                return true;
-            }
-            else if c_next == '|' {
-                // Branch reset group
-
-                if !next(out c_next) /* skip '|' */ { error("Missing ending bracket for named group."); return false; }
-
-                old_parser_state: _ = group_new_state();
-                old_branch_state: _ = branch_reset_new_state();
-                parse_until(')');
-                inner:= create_matcher_from_state();
-                branch_reset_restore_state(old_branch_state);
-                group_restore_state(old_parser_state);
-
-                start_matcher := create_matcher("branch_reset_matcher_logic", "");
-                end_matcher := create_matcher("special_group_end_logic", "");
-
-                v: std::vector = (start_matcher, inner, end_matcher);
-                cur_group_state.add(create_matcher_from_list(v));
-
-                return true;
-            }
-            else if c_next == '=' || c_next == '!' {
-                _ = skip(); // Skip '!'
-                // Positive or negative lookahead
-                return parse_lookahead("?(c_next)$", c_next == '=');
-            }
-            else {
-                // Simple modifier
-                has_id = false;
-                change_str : std::string = "";
-                if !grab_until_one_of("):", out change_str) { error("Missing ending bracket for group."); return false; }
-                if !parser_group_modifiers(change_str, out modifier_change, modifiers_change_to) {
-                     return false;
-                }
-
-                if ')' == current() {
-                    has_pattern = false;
-                }
-                else {
-                    if !next(out c_next) /* skip ':' */ { error("Missing ending bracket for group."); return false; }
-                }
-            }
-        }
-        else if c_next == '*' {
-            // named pattern
-            _ = skip(); // Skip *.
-            name: std::string = "";
-            if !grab_until(':', out name) { error("Missing colon for named pattern."); return false; }
-
-            if name == "pla" || name == "positive_lookahead" {
-                return parse_lookahead("*(name)$:", true);
-            }
-            else if name == "nla" || name == "negative_lookahead" {
-                return parse_lookahead("*(name)$:", false);
-            }
-            else {
-                error("Unknown named group pattern: '(name)$'"); return false;
-            }
-        }
-
-        if has_pattern {
-            // regular group
-
-            group_number := -1;
-            if has_id {
-                group_number = cur_branch_reset_state.next();
-            }
-
-            old_state: _ = group_new_state();
-            cur_group_state.modifiers = modifiers_change_to;
-            parse_until(')');
-            inner:= create_matcher_from_state();
-            group_restore_state(old_state);
-
-            start_matcher := create_matcher("group_matcher_start_logic", "(group_number)$, (modifier_change)$, \"(group_name)$\", (group_name_brackets)$");
-            if 0 != group_name.size() {
-                if !named_groups.contains(group_name) { // Redefinition of group name is not an error. The left most one is retained.
-                    named_groups[group_name] = group_number;
-                }
-            }
-            end_matcher := create_matcher("group_matcher_end_logic", "(group_number)$");
-
-            v: std::vector = (start_matcher, inner, end_matcher);
-            cur_group_state.add(create_matcher_from_list(v));
-        }
-        else {
-            // Only a modifier
-            cur_group_state.modifiers = modifiers_change_to;
-            cur_group_state.add(create_matcher("modifier_matcher_logic", "(modifier_change)$"));
-        }
-
-        return true;
-    }
-
     is_handle_special: (inout this, c: char) -> bool = {
         if c != '\'' { return false; }
 
@@ -2980,7 +2955,6 @@ regex_parser:  type = {
             if c == term { return; }
 
             if !has_error && is_escape(c) { continue; }
-            if !has_error && is_group(c) { continue; }
             if !has_error && is_handle_special(c) { continue; }
 
             if has_error { return; }

From 459fdc7395131a36b5b7b430dafa3c22591e9929 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 8 May 2024 15:02:16 +0200
Subject: [PATCH 113/161] Added basic character escapes.

---
 include/cpp2regex.h | 902 +++++++++++++++++++++++---------------------
 source/regex.h2     |  60 ++-
 2 files changed, 526 insertions(+), 436 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index bcfc3c9240..9b9989a072 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,136 +106,140 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 845 "regex.h2"
+#line 846 "regex.h2"
 class generation_function_context;
     
 
-#line 861 "regex.h2"
+#line 862 "regex.h2"
 class generation_context;
 
-#line 1008 "regex.h2"
+#line 1009 "regex.h2"
 class regex_token_list;
     
 
-#line 1044 "regex.h2"
+#line 1045 "regex.h2"
 class regex_token_base;
     
 
-#line 1058 "regex.h2"
+#line 1059 "regex.h2"
 class regex_token_check;
     
 
-#line 1074 "regex.h2"
+#line 1075 "regex.h2"
 class regex_token_empty;
     
 
-#line 1090 "regex.h2"
+#line 1091 "regex.h2"
 class alternative_token;
     
 
-#line 1108 "regex.h2"
+#line 1109 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1157 "regex.h2"
+#line 1158 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1183 "regex.h2"
+#line 1184 "regex.h2"
 class any_token;
     
 
-#line 1210 "regex.h2"
+#line 1211 "regex.h2"
 class char_token;
     
 
-#line 1254 "regex.h2"
+#line 1255 "regex.h2"
 class class_token;
     
 
-#line 1386 "regex.h2"
+#line 1387 "regex.h2"
 template class class_token_matcher;
 
-#line 1440 "regex.h2"
+#line 1458 "regex.h2"
+class escaped_char_token;
+    
+
+#line 1483 "regex.h2"
 class group_ref_token;
     
 
-#line 1572 "regex.h2"
+#line 1615 "regex.h2"
 class group_token;
     
 
-#line 1752 "regex.h2"
+#line 1795 "regex.h2"
 class modifier_token;
     
 
-#line 1768 "regex.h2"
+#line 1811 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1780 "regex.h2"
+#line 1823 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1823 "regex.h2"
+#line 1866 "regex.h2"
 class range_token;
     
 
-#line 1961 "regex.h2"
+#line 2004 "regex.h2"
 template class range_token_matcher;
 
-#line 2086 "regex.h2"
+#line 2129 "regex.h2"
 class special_range_token;
     
 
-#line 2131 "regex.h2"
+#line 2174 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2139 "regex.h2"
+#line 2182 "regex.h2"
 template class char_matcher_logic;
 
-#line 2167 "regex.h2"
+#line 2210 "regex.h2"
 template class class_matcher_logic;
 
-#line 2216 "regex.h2"
+#line 2259 "regex.h2"
 template class global_group_reset;
     
 
-#line 2228 "regex.h2"
+#line 2271 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 2252 "regex.h2"
+#line 2295 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 2279 "regex.h2"
+#line 2322 "regex.h2"
 template class word_boundary_matcher_logic;
 
-#line 2330 "regex.h2"
+#line 2373 "regex.h2"
 template class group_name_list;
 
-#line 2342 "regex.h2"
+#line 2385 "regex.h2"
 class group_name_list_end;
     
 
-#line 2347 "regex.h2"
+#line 2390 "regex.h2"
 template class regular_expression;
 
-#line 2428 "regex.h2"
+#line 2471 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2517 "regex.h2"
+#line 2560 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2524 "regex.h2"
+#line 2567 "regex.h2"
 class regex_parser_group_state;
 
-#line 2559 "regex.h2"
+#line 2602 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2586 "regex.h2"
+#line 2629 "regex.h2"
 template class regex_parser;
 
-#line 3030 "regex.h2"
+#line 3060 "regex.h2"
 }
 }
 
@@ -798,13 +802,13 @@ class parse_context {
 #line 809 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 840 "regex.h2"
+#line 841 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 843 "regex.h2"
+#line 844 "regex.h2"
 };
 
 class generation_function_context {
@@ -813,10 +817,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 856 "regex.h2"
+#line 857 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 859 "regex.h2"
+#line 860 "regex.h2"
 };
 
 class generation_context {
@@ -833,81 +837,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 878 "regex.h2"
+#line 879 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 883 "regex.h2"
+#line 884 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 890 "regex.h2"
+#line 891 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 896 "regex.h2"
+#line 897 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 904 "regex.h2"
+#line 905 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 926 "regex.h2"
+#line 927 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 930 "regex.h2"
+#line 931 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 934 "regex.h2"
+#line 935 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 938 "regex.h2"
+#line 939 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 947 "regex.h2"
+#line 948 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 965 "regex.h2"
+#line 966 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 969 "regex.h2"
+#line 970 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 973 "regex.h2"
+#line 974 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 979 "regex.h2"
+#line 980 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 985 "regex.h2"
+#line 986 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 991 "regex.h2"
+#line 992 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 999 "regex.h2"
+#line 1000 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1006 "regex.h2"
+#line 1007 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1011 "regex.h2"
+#line 1012 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1018 "regex.h2"
+#line 1019 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1024 "regex.h2"
+#line 1025 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 1034 "regex.h2"
+#line 1035 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -915,36 +919,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1041 "regex.h2"
+#line 1042 "regex.h2"
 };
 
-#line 1044 "regex.h2"
+#line 1045 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1047 "regex.h2"
+#line 1048 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1051 "regex.h2"
+#line 1052 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1055 "regex.h2"
+#line 1056 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1056 "regex.h2"
+#line 1057 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1061 "regex.h2"
+#line 1062 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1068 "regex.h2"
+#line 1069 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -952,16 +956,16 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1071 "regex.h2"
+#line 1072 "regex.h2"
 };
 
-#line 1074 "regex.h2"
+#line 1075 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1077 "regex.h2"
+#line 1078 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1081 "regex.h2"
+#line 1082 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -969,7 +973,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1084 "regex.h2"
+#line 1085 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -978,12 +982,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1093 "regex.h2"
+#line 1094 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1103 "regex.h2"
+#line 1104 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -991,23 +995,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1106 "regex.h2"
+#line 1107 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1112 "regex.h2"
+#line 1113 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1119 "regex.h2"
+#line 1120 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1133 "regex.h2"
+#line 1134 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 1144 "regex.h2"
+#line 1145 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1015,33 +1019,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1155 "regex.h2"
+#line 1156 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1162 "regex.h2"
+#line 1163 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1179 "regex.h2"
+#line 1180 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1186 "regex.h2"
+#line 1187 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1194 "regex.h2"
+#line 1195 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1049,23 +1053,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1197 "regex.h2"
+#line 1198 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1210 "regex.h2"
+#line 1211 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1213 "regex.h2"
+#line 1214 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1220 "regex.h2"
+#line 1221 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1224 "regex.h2"
+#line 1225 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1073,30 +1077,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1229 "regex.h2"
+#line 1230 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1252 "regex.h2"
+#line 1253 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1257 "regex.h2"
+#line 1258 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1266 "regex.h2"
+#line 1267 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1373 "regex.h2"
+#line 1374 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1378 "regex.h2"
+#line 1379 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1104,21 +1108,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1384 "regex.h2"
+#line 1385 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1409 "regex.h2"
+#line 1410 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1421 "regex.h2"
+#line 1422 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1130,7 +1134,31 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1432 "regex.h2"
+#line 1433 "regex.h2"
+};
+
+[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 1458 "regex.h2"
+class escaped_char_token: public regex_token_base {
+
+#line 1461 "regex.h2"
+    private: char token; 
+
+    public: explicit escaped_char_token(cpp2::in t);
+
+#line 1468 "regex.h2"
+    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
+
+#line 1472 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~escaped_char_token() noexcept;
+
+    public: escaped_char_token(escaped_char_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(escaped_char_token const&) -> void = delete;
+
+
+#line 1475 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -1141,15 +1169,15 @@ template class class_token_matche
 //
 class group_ref_token: public regex_token_base {
 
-#line 1443 "regex.h2"
+#line 1486 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1450 "regex.h2"
+#line 1493 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1542 "regex.h2"
+#line 1585 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1157,28 +1185,28 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1545 "regex.h2"
+#line 1588 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1572 "regex.h2"
+#line 1615 "regex.h2"
 class group_token: public regex_token {
 
-#line 1575 "regex.h2"
+#line 1618 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1702 "regex.h2"
+#line 1745 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1719 "regex.h2"
+#line 1762 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1743 "regex.h2"
+#line 1786 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1187,17 +1215,17 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1750 "regex.h2"
+#line 1793 "regex.h2"
 };
 
 class modifier_token: public regex_token_base {
 
-#line 1755 "regex.h2"
+#line 1798 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1762 "regex.h2"
+#line 1805 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1205,7 +1233,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1766 "regex.h2"
+#line 1809 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1216,7 +1244,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1778 "regex.h2"
+#line 1821 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1227,30 +1255,30 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1785 "regex.h2"
+#line 1828 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1796 "regex.h2"
+#line 1839 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1808 "regex.h2"
+#line 1851 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1816 "regex.h2"
+#line 1859 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1821 "regex.h2"
+#line 1864 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1826 "regex.h2"
+#line 1869 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1260,65 +1288,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1903 "regex.h2"
+#line 1946 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1914 "regex.h2"
+#line 1957 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1926 "regex.h2"
+#line 1969 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1950 "regex.h2"
+#line 1993 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1958 "regex.h2"
+#line 2001 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 1959 "regex.h2"
+#line 2002 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 1975 "regex.h2"
+#line 2018 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 1980 "regex.h2"
+#line 2023 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 1985 "regex.h2"
+#line 2028 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 1991 "regex.h2"
+#line 2034 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2006 "regex.h2"
+#line 2049 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2034 "regex.h2"
+#line 2077 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2058 "regex.h2"
+#line 2101 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2082 "regex.h2"
+#line 2125 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2089 "regex.h2"
+#line 2132 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1327,10 +1355,10 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2118 "regex.h2"
+#line 2161 "regex.h2"
 };
 
-#line 2121 "regex.h2"
+#line 2164 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1338,7 +1366,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 2129 "regex.h2"
+#line 2172 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1349,7 +1377,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2135 "regex.h2"
+#line 2178 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1358,27 +1386,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2160 "regex.h2"
+#line 2203 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2162 "regex.h2"
+#line 2205 "regex.h2"
 };
 
-#line 2165 "regex.h2"
+#line 2208 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2188 "regex.h2"
+#line 2231 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2200 "regex.h2"
+#line 2243 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1387,7 +1415,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2212 "regex.h2"
+#line 2255 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1395,14 +1423,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2222 "regex.h2"
+#line 2265 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 2224 "regex.h2"
+#line 2267 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1411,14 +1439,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2245 "regex.h2"
+#line 2288 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 2247 "regex.h2"
+#line 2290 "regex.h2"
 };
 
 // Named character classes
@@ -1430,7 +1458,7 @@ template                    void = delete;
 
 
-#line 2254 "regex.h2"
+#line 2297 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1440,7 +1468,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 2264 "regex.h2"
+#line 2307 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1460,7 +1488,7 @@ template class word_boundary_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2310 "regex.h2"
+#line 2353 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> bstring;
     public: word_boundary_matcher_logic() = default;
@@ -1468,10 +1496,10 @@ template class word_boundary_matcher_logic
     public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
 
 
-#line 2318 "regex.h2"
+#line 2361 "regex.h2"
 };
 
-#line 2321 "regex.h2"
+#line 2364 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1489,7 +1517,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2340 "regex.h2"
+#line 2383 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1498,7 +1526,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2344 "regex.h2"
+#line 2387 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1514,7 +1542,7 @@ template matched_, context const& ctx_);
 
-#line 2362 "regex.h2"
+#line 2405 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1529,7 +1557,7 @@ template void = delete;
 
 
-#line 2378 "regex.h2"
+#line 2421 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1537,13 +1565,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2390 "regex.h2"
+#line 2433 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2412 "regex.h2"
+#line 2455 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1555,7 +1583,7 @@ template void = delete;
 
 
-#line 2425 "regex.h2"
+#line 2468 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1571,7 +1599,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2443 "regex.h2"
+#line 2486 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1586,7 +1614,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2459 "regex.h2"
+#line 2502 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1594,13 +1622,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2471 "regex.h2"
+#line 2514 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2493 "regex.h2"
+#line 2536 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1612,7 +1640,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2506 "regex.h2"
+#line 2549 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1643,15 +1671,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2540 "regex.h2"
+#line 2583 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2546 "regex.h2"
+#line 2589 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2555 "regex.h2"
+#line 2598 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1664,13 +1692,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2573 "regex.h2"
+#line 2616 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2578 "regex.h2"
+#line 2621 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2583 "regex.h2"
+#line 2626 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1689,53 +1717,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2603 "regex.h2"
+#line 2646 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2609 "regex.h2"
+#line 2652 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2618 "regex.h2"
+#line 2661 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2622 "regex.h2"
+#line 2665 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2637 "regex.h2"
+#line 2680 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2643 "regex.h2"
+#line 2686 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2684 "regex.h2"
+#line 2727 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2696 "regex.h2"
+#line 2739 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2702 "regex.h2"
+#line 2745 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2709 "regex.h2"
+#line 2752 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2718 "regex.h2"
+#line 2761 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2726 "regex.h2"
+#line 2769 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2736 "regex.h2"
+#line 2779 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1743,61 +1771,61 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2746 "regex.h2"
+#line 2789 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2758 "regex.h2"
+#line 2801 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2761 "regex.h2"
+#line 2804 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2771 "regex.h2"
+#line 2814 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2789 "regex.h2"
+#line 2832 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2799 "regex.h2"
+#line 2842 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2812 "regex.h2"
+#line 2855 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2848 "regex.h2"
+#line 2891 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2945 "regex.h2"
+#line 2975 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2952 "regex.h2"
+#line 2982 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2967 "regex.h2"
+#line 2997 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 2989 "regex.h2"
+#line 3019 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3021 "regex.h2"
+#line 3051 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3030 "regex.h2"
+#line 3060 "regex.h2"
 }
 }
 
@@ -2650,6 +2678,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if (!(cur_token) && valid()) {cur_token = alternative_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = any_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = class_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = escape_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_ref_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = line_end_token_parse((*this)); }
@@ -2670,10 +2699,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 840 "regex.h2"
+#line 841 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 849 "regex.h2"
+#line 850 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2681,27 +2710,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 856 "regex.h2"
+#line 857 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 871 "regex.h2"
+#line 872 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 878 "regex.h2"
+#line 879 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 883 "regex.h2"
+#line 884 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2709,14 +2738,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 890 "regex.h2"
+#line 891 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 896 "regex.h2"
+#line 897 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2725,7 +2754,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 904 "regex.h2"
+#line 905 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2747,22 +2776,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 926 "regex.h2"
+#line 927 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 930 "regex.h2"
+#line 931 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 934 "regex.h2"
+#line 935 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 938 "regex.h2"
+#line 939 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2772,14 +2801,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 947 "regex.h2"
+#line 948 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2792,38 +2821,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 965 "regex.h2"
+#line 966 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 969 "regex.h2"
+#line 970 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 973 "regex.h2"
+#line 974 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 979 "regex.h2"
+#line 980 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 985 "regex.h2"
+#line 986 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 991 "regex.h2"
+#line 992 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2832,7 +2861,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 999 "regex.h2"
+#line 1000 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2841,22 +2870,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1013 "regex.h2"
+#line 1014 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1016 "regex.h2"
+#line 1017 "regex.h2"
     }
 
-#line 1018 "regex.h2"
+#line 1019 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1024 "regex.h2"
+#line 1025 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2867,7 +2896,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1034 "regex.h2"
+#line 1035 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2878,59 +2907,59 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1047 "regex.h2"
+#line 1048 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1049 "regex.h2"
+#line 1050 "regex.h2"
     }
 
-#line 1051 "regex.h2"
+#line 1052 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1053 "regex.h2"
+#line 1054 "regex.h2"
     }
 
-#line 1055 "regex.h2"
+#line 1056 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1063 "regex.h2"
+#line 1064 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1066 "regex.h2"
+#line 1067 "regex.h2"
     }
 
-#line 1068 "regex.h2"
+#line 1069 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1077 "regex.h2"
+#line 1078 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1079 "regex.h2"
+#line 1080 "regex.h2"
     }
 
-#line 1081 "regex.h2"
+#line 1082 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1093 "regex.h2"
+#line 1094 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1095 "regex.h2"
+#line 1096 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2939,22 +2968,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1103 "regex.h2"
+#line 1104 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1114 "regex.h2"
+#line 1115 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1117 "regex.h2"
+#line 1118 "regex.h2"
     }
 
-#line 1119 "regex.h2"
+#line 1120 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2969,7 +2998,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1133 "regex.h2"
+#line 1134 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2981,7 +3010,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1144 "regex.h2"
+#line 1145 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2996,11 +3025,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1159 "regex.h2"
+#line 1160 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1162 "regex.h2"
+#line 1163 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3019,25 +3048,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1186 "regex.h2"
+#line 1187 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1188 "regex.h2"
+#line 1189 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1194 "regex.h2"
+#line 1195 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1199 "regex.h2"
+#line 1200 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3049,20 +3078,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1215 "regex.h2"
+#line 1216 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1218 "regex.h2"
+#line 1219 "regex.h2"
     }
 
-#line 1220 "regex.h2"
+#line 1221 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1224 "regex.h2"
+#line 1225 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3071,7 +3100,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1231 "regex.h2"
+#line 1232 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3093,16 +3122,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1260 "regex.h2"
+#line 1261 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1264 "regex.h2"
+#line 1265 "regex.h2"
     }
 
-#line 1267 "regex.h2"
+#line 1268 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3209,12 +3238,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1373 "regex.h2"
+#line 1374 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1378 "regex.h2"
+#line 1379 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3224,7 +3253,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1388 "regex.h2"
+#line 1389 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3246,7 +3275,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1409 "regex.h2"
+#line 1410 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3259,15 +3288,59 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1445 "regex.h2"
+#line 1435 "regex.h2"
+[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
+    if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+
+#line 1439 "regex.h2"
+    if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
+        return nullptr; 
+    }
+
+    static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+
+    if (std::string::npos != CPP2_UFCS(find)(std::string("afenrt"), CPP2_UFCS(current)(ctx))) {
+        // Escape of string special char
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
+    }else {
+        // Escape of regex special char
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx))}; 
+        CPP2_UFCS(set_string)((*cpp2::assert_not_null(r)), ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))));
+
+        return r; 
+    }
+
+}
+
+#line 1463 "regex.h2"
+    escaped_char_token::escaped_char_token(cpp2::in t)
+        : regex_token_base{ "\\\\" + cpp2::to_string(t) }
+        , token{ t }{
+
+#line 1466 "regex.h2"
+    }
+
+#line 1468 "regex.h2"
+    [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
+    }
+
+#line 1472 "regex.h2"
+    auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
+        CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+    }
+
+    escaped_char_token::~escaped_char_token() noexcept{}
+
+#line 1488 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1448 "regex.h2"
+#line 1491 "regex.h2"
     }
 
-#line 1450 "regex.h2"
+#line 1493 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3360,14 +3433,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1542 "regex.h2"
+#line 1585 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1547 "regex.h2"
+#line 1590 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3393,7 +3466,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1579 "regex.h2"
+#line 1622 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3517,7 +3590,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1702 "regex.h2"
+#line 1745 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3535,7 +3608,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1719 "regex.h2"
+#line 1762 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3560,7 +3633,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1743 "regex.h2"
+#line 1786 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
         if (-1 != number) {
@@ -3571,15 +3644,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1757 "regex.h2"
+#line 1800 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1760 "regex.h2"
+#line 1803 "regex.h2"
     }
 
-#line 1762 "regex.h2"
+#line 1805 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3587,7 +3660,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1770 "regex.h2"
+#line 1813 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3597,12 +3670,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1782 "regex.h2"
+#line 1825 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1789 "regex.h2"
+#line 1832 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '$' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$'))) {return nullptr; }
 
@@ -3610,7 +3683,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", "line_end_token_matcher"); 
 }
 
-#line 1796 "regex.h2"
+#line 1839 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3623,24 +3696,24 @@ template [[
     }}
 }
 
-#line 1810 "regex.h2"
+#line 1853 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^') {return nullptr; }
 
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
 }
 
-#line 1816 "regex.h2"
+#line 1859 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1831 "regex.h2"
+#line 1874 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1833 "regex.h2"
+#line 1876 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3684,7 +3757,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 1877 "regex.h2"
+#line 1920 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3711,7 +3784,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 1903 "regex.h2"
+#line 1946 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3723,7 +3796,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1914 "regex.h2"
+#line 1957 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3736,7 +3809,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1926 "regex.h2"
+#line 1969 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3761,7 +3834,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1950 "regex.h2"
+#line 1993 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3770,12 +3843,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1958 "regex.h2"
+#line 2001 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 1963 "regex.h2"
+#line 2006 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3788,26 +3861,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1975 "regex.h2"
+#line 2018 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 1980 "regex.h2"
+#line 2023 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 1985 "regex.h2"
+#line 2028 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 1991 "regex.h2"
+#line 2034 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3823,7 +3896,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2006 "regex.h2"
+#line 2049 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3852,7 +3925,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2034 "regex.h2"
+#line 2077 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3877,7 +3950,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2058 "regex.h2"
+#line 2101 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3903,7 +3976,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2089 "regex.h2"
+#line 2132 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3926,7 +3999,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2112 "regex.h2"
+#line 2155 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3936,14 +4009,14 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2132 "regex.h2"
+#line 2175 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2133 "regex.h2"
+#line 2176 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2134 "regex.h2"
+#line 2177 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2141 "regex.h2"
+#line 2184 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3963,12 +4036,12 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 2160 "regex.h2"
+#line 2203 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2161 "regex.h2"
+#line 2204 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2169 "regex.h2"
+#line 2212 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3988,7 +4061,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2188 "regex.h2"
+#line 2231 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4001,10 +4074,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2200 "regex.h2"
+#line 2243 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2202 "regex.h2"
+#line 2245 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4016,18 +4089,18 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2217 "regex.h2"
+#line 2260 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 2222 "regex.h2"
+#line 2265 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2223 "regex.h2"
+#line 2266 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 2230 "regex.h2"
+#line 2273 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -4043,12 +4116,12 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 2245 "regex.h2"
+#line 2288 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2246 "regex.h2"
+#line 2289 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 2281 "regex.h2"
+#line 2324 "regex.h2"
     template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         word_class words {}; 
         auto is_match {false}; 
@@ -4078,9 +4151,9 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 2310 "regex.h2"
+#line 2353 "regex.h2"
     template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2311 "regex.h2"
+#line 2354 "regex.h2"
     template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
         if (negate) {
             return "\\B"; 
@@ -4089,7 +4162,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2332 "regex.h2"
+#line 2375 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -4099,34 +4172,34 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2343 "regex.h2"
+#line 2386 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2357 "regex.h2"
+#line 2400 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2360 "regex.h2"
+#line 2403 "regex.h2"
         }
 
-#line 2362 "regex.h2"
+#line 2405 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2363 "regex.h2"
+#line 2406 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2364 "regex.h2"
+#line 2407 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2365 "regex.h2"
+#line 2408 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2367 "regex.h2"
+#line 2410 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2368 "regex.h2"
+#line 2411 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2369 "regex.h2"
+#line 2412 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2371 "regex.h2"
+#line 2414 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -4135,13 +4208,13 @@ template [[nodiscard]] auto line_start_toke
             return group_id; 
         }
 
-#line 2380 "regex.h2"
+#line 2423 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2381 "regex.h2"
+#line 2424 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2382 "regex.h2"
+#line 2425 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2383 "regex.h2"
+#line 2426 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4149,13 +4222,13 @@ template [[nodiscard]] auto line_start_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2390 "regex.h2"
+#line 2433 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2391 "regex.h2"
+#line 2434 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2392 "regex.h2"
+#line 2435 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2393 "regex.h2"
+#line 2436 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4175,10 +4248,10 @@ template [[nodiscard]] auto line_start_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2412 "regex.h2"
+#line 2455 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2417 "regex.h2"
+#line 2460 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4188,31 +4261,31 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2438 "regex.h2"
+#line 2481 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2441 "regex.h2"
+#line 2484 "regex.h2"
         }
 
-#line 2443 "regex.h2"
+#line 2486 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2444 "regex.h2"
+#line 2487 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2445 "regex.h2"
+#line 2488 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2446 "regex.h2"
+#line 2489 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2448 "regex.h2"
+#line 2491 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2449 "regex.h2"
+#line 2492 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2450 "regex.h2"
+#line 2493 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2452 "regex.h2"
+#line 2495 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4221,13 +4294,13 @@ template [[nodiscard]] auto line_start_toke
             return group_id; 
         }
 
-#line 2461 "regex.h2"
+#line 2504 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2462 "regex.h2"
+#line 2505 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2463 "regex.h2"
+#line 2506 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2464 "regex.h2"
+#line 2507 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4235,13 +4308,13 @@ template [[nodiscard]] auto line_start_toke
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2471 "regex.h2"
+#line 2514 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2472 "regex.h2"
+#line 2515 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2473 "regex.h2"
+#line 2516 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2474 "regex.h2"
+#line 2517 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4261,10 +4334,10 @@ template [[nodiscard]] auto line_start_toke
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2493 "regex.h2"
+#line 2536 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2498 "regex.h2"
+#line 2541 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4274,24 +4347,24 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2534 "regex.h2"
+#line 2577 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2540 "regex.h2"
+#line 2583 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2546 "regex.h2"
+#line 2589 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2548 "regex.h2"
+#line 2591 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4299,10 +4372,10 @@ template [[nodiscard]] auto line_start_toke
         static_cast(std::move(last));
     }
 
-#line 2555 "regex.h2"
+#line 2598 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2565 "regex.h2"
+#line 2608 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4311,29 +4384,29 @@ template [[nodiscard]] auto line_start_toke
         return g; 
     }
 
-#line 2573 "regex.h2"
+#line 2616 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2578 "regex.h2"
+#line 2621 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2603 "regex.h2"
+#line 2646 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2607 "regex.h2"
+#line 2650 "regex.h2"
     }
 
-#line 2611 "regex.h2"
+#line 2654 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4341,12 +4414,12 @@ template [[nodiscard]] auto line_start_toke
         return old_state; 
     }
 
-#line 2618 "regex.h2"
+#line 2661 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2625 "regex.h2"
+#line 2668 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4359,14 +4432,14 @@ template [[nodiscard]] auto line_start_toke
         return old_state; 
     }
 
-#line 2637 "regex.h2"
+#line 2680 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2646 "regex.h2"
+#line 2689 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4405,7 +4478,7 @@ template [[nodiscard]] auto line_start_toke
         return cur; 
     }
 
-#line 2684 "regex.h2"
+#line 2727 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4418,14 +4491,14 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2696 "regex.h2"
+#line 2739 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2697 "regex.h2"
+#line 2740 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2698 "regex.h2"
+#line 2741 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2702 "regex.h2"
+#line 2745 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4433,7 +4506,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2709 "regex.h2"
+#line 2752 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4443,7 +4516,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2718 "regex.h2"
+#line 2761 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4452,7 +4525,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2726 "regex.h2"
+#line 2769 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4463,18 +4536,18 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2736 "regex.h2"
+#line 2779 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2737 "regex.h2"
+#line 2780 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2741 "regex.h2"
+#line 2784 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2746 "regex.h2"
+#line 2789 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4487,10 +4560,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2758 "regex.h2"
+#line 2801 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2764 "regex.h2"
+#line 2807 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4498,10 +4571,10 @@ template [[nodiscard]] auto line_start_toke
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2771 "regex.h2"
+#line 2814 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2773 "regex.h2"
+#line 2816 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4518,7 +4591,7 @@ template [[nodiscard]] auto line_start_toke
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2789 "regex.h2"
+#line 2832 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4529,7 +4602,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2801 "regex.h2"
+#line 2844 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4541,7 +4614,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2812 "regex.h2"
+#line 2855 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4578,28 +4651,15 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2851 "regex.h2"
+#line 2894 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
         auto c_next {'\0'}; 
         if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
 
-        if (std::string::npos != CPP2_UFCS(find)(std::string("tnrfae^.[]$()*{}?+|"), c_next)) {
-            if (c_next == '$') {
-                // TODO: Provide proper escape for cppfront capture
-                CPP2_UFCS(add)(cur_group_state, create_matcher("line_end_matcher_logic", "true, true"));
-            }
-            else {
-                auto inner {create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "', '\\" + cpp2::to_string(c_next) + "'"))}; 
-                CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\" + cpp2::to_string(std::move(c_next)) + "\", " + cpp2::to_string(std::move(inner)))));
-            }
-        }
-        else {if ('\\' == c_next) {
-            auto inner {create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'")}; 
-            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"\\\\\\\\\", " + cpp2::to_string(std::move(inner)))));
-        }
-        else {if ('K' == c_next) {
+#line 2901 "regex.h2"
+        if ('K' == c_next) {
             CPP2_UFCS(add)(cur_group_state, create_matcher("global_group_reset", ""));
         }
         else {if ('x' == c_next) {
@@ -4668,12 +4728,12 @@ template [[nodiscard]] auto line_start_toke
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}}}}}}}}
+        }}}}}}}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 2945 "regex.h2"
+#line 2975 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4681,7 +4741,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2952 "regex.h2"
+#line 2982 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4697,7 +4757,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2967 "regex.h2"
+#line 2997 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4720,7 +4780,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2989 "regex.h2"
+#line 3019 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4754,7 +4814,7 @@ template [[nodiscard]] auto line_start_toke
         return source; 
     }
 
-#line 3023 "regex.h2"
+#line 3053 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 3c3ce00280..b2093d0e53 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -817,6 +817,7 @@ parse_context: type = {
             if !cur_token && valid() { cur_token = alternative_token::parse(this); }
             if !cur_token && valid() { cur_token = any_token::parse(this); }
             if !cur_token && valid() { cur_token = class_token::parse(this); }
+            if !cur_token && valid() { cur_token = escape_token_parse(this); }
             if !cur_token && valid() { cur_token = group_ref_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = line_end_token_parse(this); }
@@ -1431,6 +1432,48 @@ class_token_matcher:  type =
     // }
 }
 
+escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if ctx.current() != '\\' { return nullptr; }
+
+
+    if std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek()) {
+        return nullptr;
+    }
+
+    _ = ctx.next(); // Skip escape
+
+    if std::string::npos != std::string("afenrt").find(ctx.current()) {
+        // Escape of string special char
+        return shared.new(ctx.current());
+    } else {
+        // Escape of regex special char
+        r := shared.new(ctx.current());
+        r*.set_string("\\\\(ctx.current())$");
+
+        return r;
+    }
+
+}
+
+escaped_char_token: @polymorphic_base type = {
+    this: regex_token_base;
+
+    token: char;
+
+    operator=: (out this, t: char) = {
+        regex_token_base = "\\\\(t)$";
+        token = t;
+    }
+
+    parse: (inout ctx: parse_context) -> token_ptr = {
+        return shared.new(ctx.current());
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
+    }
+}
+
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -2854,21 +2897,8 @@ regex_parser:  type = {
         c_next := '\0';
         if !next(out c_next) { error("Escape without a following character."); return false; }
 
-        if std::string::npos != std::string("tnrfae^.[]$()*{}?+|").find(c_next) {
-            if c_next == '$' {
-                // TODO: Provide proper escape for cppfront capture
-                cur_group_state.add(create_matcher("line_end_matcher_logic", "true, true"));
-            }
-            else {
-                inner := create_matcher("char_matcher_logic", "'\\(c_next)$', '\\(c_next)$', '\\(c_next)$'");
-                cur_group_state.add(create_matcher("special_syntax_wrapper", "\"\\\\(c_next)$\", (inner)$"));
-            }
-        }
-        else if '\\' == c_next {
-            inner := create_matcher("char_matcher_logic", "'\\\\', '\\\\', '\\\\'");
-            cur_group_state.add(create_matcher("special_syntax_wrapper", "\"\\\\\\\\\", (inner)$"));
-        }
-        else if 'K' == c_next {
+
+        if 'K' == c_next {
             cur_group_state.add(create_matcher("global_group_reset", ""));
         }
         else if 'x' == c_next {

From c72670753c0dc9e1bd1974eb10f7e9158dacb76d Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 8 May 2024 15:23:49 +0200
Subject: [PATCH 114/161] Added word boundary matchers.

---
 include/cpp2regex.h | 693 ++++++++++++++++++++++----------------------
 source/regex.h2     |  94 +++---
 2 files changed, 386 insertions(+), 401 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 9b9989a072..daa223313c 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,112 +106,109 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 846 "regex.h2"
+#line 847 "regex.h2"
 class generation_function_context;
     
 
-#line 862 "regex.h2"
+#line 863 "regex.h2"
 class generation_context;
 
-#line 1009 "regex.h2"
+#line 1010 "regex.h2"
 class regex_token_list;
     
 
-#line 1045 "regex.h2"
+#line 1046 "regex.h2"
 class regex_token_base;
     
 
-#line 1059 "regex.h2"
+#line 1060 "regex.h2"
 class regex_token_check;
     
 
-#line 1075 "regex.h2"
+#line 1076 "regex.h2"
 class regex_token_empty;
     
 
-#line 1091 "regex.h2"
+#line 1092 "regex.h2"
 class alternative_token;
     
 
-#line 1109 "regex.h2"
+#line 1110 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1158 "regex.h2"
+#line 1159 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1184 "regex.h2"
+#line 1185 "regex.h2"
 class any_token;
     
 
-#line 1211 "regex.h2"
+#line 1212 "regex.h2"
 class char_token;
     
 
-#line 1255 "regex.h2"
+#line 1256 "regex.h2"
 class class_token;
     
 
-#line 1387 "regex.h2"
+#line 1388 "regex.h2"
 template class class_token_matcher;
 
-#line 1458 "regex.h2"
+#line 1459 "regex.h2"
 class escaped_char_token;
     
 
-#line 1483 "regex.h2"
+#line 1484 "regex.h2"
 class group_ref_token;
     
 
-#line 1615 "regex.h2"
+#line 1616 "regex.h2"
 class group_token;
     
 
-#line 1795 "regex.h2"
+#line 1796 "regex.h2"
 class modifier_token;
     
 
-#line 1811 "regex.h2"
+#line 1812 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1823 "regex.h2"
+#line 1824 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1866 "regex.h2"
+#line 1867 "regex.h2"
 class range_token;
     
 
-#line 2004 "regex.h2"
+#line 2005 "regex.h2"
 template class range_token_matcher;
 
-#line 2129 "regex.h2"
+#line 2130 "regex.h2"
 class special_range_token;
     
 
-#line 2174 "regex.h2"
+#line 2220 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2182 "regex.h2"
+#line 2228 "regex.h2"
 template class char_matcher_logic;
 
-#line 2210 "regex.h2"
+#line 2256 "regex.h2"
 template class class_matcher_logic;
 
-#line 2259 "regex.h2"
+#line 2305 "regex.h2"
 template class global_group_reset;
     
 
-#line 2271 "regex.h2"
+#line 2317 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 2295 "regex.h2"
+#line 2341 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 2322 "regex.h2"
-template class word_boundary_matcher_logic;
-
 #line 2373 "regex.h2"
 template class group_name_list;
 
@@ -239,7 +236,7 @@ class regex_branch_reset_state;
 #line 2629 "regex.h2"
 template class regex_parser;
 
-#line 3060 "regex.h2"
+#line 3058 "regex.h2"
 }
 }
 
@@ -802,13 +799,13 @@ class parse_context {
 #line 809 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 841 "regex.h2"
+#line 842 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 844 "regex.h2"
+#line 845 "regex.h2"
 };
 
 class generation_function_context {
@@ -817,10 +814,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 857 "regex.h2"
+#line 858 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 860 "regex.h2"
+#line 861 "regex.h2"
 };
 
 class generation_context {
@@ -837,81 +834,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 879 "regex.h2"
+#line 880 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 884 "regex.h2"
+#line 885 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 891 "regex.h2"
+#line 892 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 897 "regex.h2"
+#line 898 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 905 "regex.h2"
+#line 906 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 927 "regex.h2"
+#line 928 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 931 "regex.h2"
+#line 932 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 935 "regex.h2"
+#line 936 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 939 "regex.h2"
+#line 940 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 948 "regex.h2"
+#line 949 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 954 "regex.h2"
+#line 955 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 966 "regex.h2"
+#line 967 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 970 "regex.h2"
+#line 971 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 974 "regex.h2"
+#line 975 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 980 "regex.h2"
+#line 981 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 986 "regex.h2"
+#line 987 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 992 "regex.h2"
+#line 993 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1000 "regex.h2"
+#line 1001 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1007 "regex.h2"
+#line 1008 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1012 "regex.h2"
+#line 1013 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1019 "regex.h2"
+#line 1020 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1025 "regex.h2"
+#line 1026 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 1035 "regex.h2"
+#line 1036 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -919,36 +916,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1042 "regex.h2"
+#line 1043 "regex.h2"
 };
 
-#line 1045 "regex.h2"
+#line 1046 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1048 "regex.h2"
+#line 1049 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1052 "regex.h2"
+#line 1053 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1056 "regex.h2"
+#line 1057 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1057 "regex.h2"
+#line 1058 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1062 "regex.h2"
+#line 1063 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1069 "regex.h2"
+#line 1070 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -956,16 +953,16 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1072 "regex.h2"
+#line 1073 "regex.h2"
 };
 
-#line 1075 "regex.h2"
+#line 1076 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1078 "regex.h2"
+#line 1079 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1082 "regex.h2"
+#line 1083 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -973,7 +970,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1085 "regex.h2"
+#line 1086 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -982,12 +979,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1094 "regex.h2"
+#line 1095 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1104 "regex.h2"
+#line 1105 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -995,23 +992,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1107 "regex.h2"
+#line 1108 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1113 "regex.h2"
+#line 1114 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1120 "regex.h2"
+#line 1121 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1134 "regex.h2"
+#line 1135 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 1145 "regex.h2"
+#line 1146 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1019,33 +1016,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1156 "regex.h2"
+#line 1157 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1163 "regex.h2"
+#line 1164 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1180 "regex.h2"
+#line 1181 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1187 "regex.h2"
+#line 1188 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1195 "regex.h2"
+#line 1196 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1053,23 +1050,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1198 "regex.h2"
+#line 1199 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1211 "regex.h2"
+#line 1212 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1214 "regex.h2"
+#line 1215 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1221 "regex.h2"
+#line 1222 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1225 "regex.h2"
+#line 1226 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1077,30 +1074,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1230 "regex.h2"
+#line 1231 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1253 "regex.h2"
+#line 1254 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1258 "regex.h2"
+#line 1259 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1267 "regex.h2"
+#line 1268 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1374 "regex.h2"
+#line 1375 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1379 "regex.h2"
+#line 1380 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1108,21 +1105,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1385 "regex.h2"
+#line 1386 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1410 "regex.h2"
+#line 1411 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1422 "regex.h2"
+#line 1423 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1134,23 +1131,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1433 "regex.h2"
+#line 1434 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1458 "regex.h2"
+#line 1459 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1461 "regex.h2"
+#line 1462 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1468 "regex.h2"
+#line 1469 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1472 "regex.h2"
+#line 1473 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1158,7 +1155,7 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1475 "regex.h2"
+#line 1476 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -1169,15 +1166,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1486 "regex.h2"
+#line 1487 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1493 "regex.h2"
+#line 1494 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1585 "regex.h2"
+#line 1586 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1185,28 +1182,28 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1588 "regex.h2"
+#line 1589 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1615 "regex.h2"
+#line 1616 "regex.h2"
 class group_token: public regex_token {
 
-#line 1618 "regex.h2"
+#line 1619 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1745 "regex.h2"
+#line 1746 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1762 "regex.h2"
+#line 1763 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1786 "regex.h2"
+#line 1787 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1215,17 +1212,17 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1793 "regex.h2"
+#line 1794 "regex.h2"
 };
 
 class modifier_token: public regex_token_base {
 
-#line 1798 "regex.h2"
+#line 1799 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1805 "regex.h2"
+#line 1806 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1233,7 +1230,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1809 "regex.h2"
+#line 1810 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1244,7 +1241,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1821 "regex.h2"
+#line 1822 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1255,30 +1252,30 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1828 "regex.h2"
+#line 1829 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1839 "regex.h2"
+#line 1840 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1851 "regex.h2"
+#line 1852 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1859 "regex.h2"
+#line 1860 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1864 "regex.h2"
+#line 1865 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1869 "regex.h2"
+#line 1870 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1288,65 +1285,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1946 "regex.h2"
+#line 1947 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1957 "regex.h2"
+#line 1958 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1969 "regex.h2"
+#line 1970 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1993 "regex.h2"
+#line 1994 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2001 "regex.h2"
+#line 2002 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 2002 "regex.h2"
+#line 2003 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2018 "regex.h2"
+#line 2019 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2023 "regex.h2"
+#line 2024 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2028 "regex.h2"
+#line 2029 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2034 "regex.h2"
+#line 2035 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2049 "regex.h2"
+#line 2050 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2077 "regex.h2"
+#line 2078 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2101 "regex.h2"
+#line 2102 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2125 "regex.h2"
+#line 2126 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2132 "regex.h2"
+#line 2133 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1355,10 +1352,19 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2161 "regex.h2"
+#line 2162 "regex.h2"
 };
 
-#line 2164 "regex.h2"
+// Regex syntax: \b or \B  Example: \bword\b
+//
+// Matches the start end end of word boundaries.
+//
+[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 2184 "regex.h2"
+template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+
+#line 2210 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1366,7 +1372,7 @@ class special_range_token: public range_token {
 //-----------------------------------------------------------------------
 //
 
-#line 2172 "regex.h2"
+#line 2218 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1377,7 +1383,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2178 "regex.h2"
+#line 2224 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1386,27 +1392,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2203 "regex.h2"
+#line 2249 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2205 "regex.h2"
+#line 2251 "regex.h2"
 };
 
-#line 2208 "regex.h2"
+#line 2254 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2231 "regex.h2"
+#line 2277 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2243 "regex.h2"
+#line 2289 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1415,7 +1421,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2255 "regex.h2"
+#line 2301 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1423,14 +1429,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2265 "regex.h2"
+#line 2311 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 2267 "regex.h2"
+#line 2313 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1439,14 +1445,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2288 "regex.h2"
+#line 2334 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 2290 "regex.h2"
+#line 2336 "regex.h2"
 };
 
 // Named character classes
@@ -1458,7 +1464,7 @@ template                    void = delete;
 
 
-#line 2297 "regex.h2"
+#line 2343 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1468,7 +1474,7 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 2307 "regex.h2"
+#line 2353 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
@@ -1480,26 +1486,6 @@ template                     using named_class_not_word = named_
 // named_string_end:  type   == special_syntax_wrapper>;
 // named_string_start:  type == special_syntax_wrapper>;
 
-// Regex syntax: \b or \B  Example: \bword\b
-//
-// Matches the start end end of word boundaries.
-//
-template class word_boundary_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 2353 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> bstring;
-    public: word_boundary_matcher_logic() = default;
-    public: word_boundary_matcher_logic(word_boundary_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(word_boundary_matcher_logic const&) -> void = delete;
-
-
-#line 2361 "regex.h2"
-};
-
-#line 2364 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1805,27 +1791,27 @@ template class regex_parser {
 
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2975 "regex.h2"
+#line 2973 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2982 "regex.h2"
+#line 2980 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2997 "regex.h2"
+#line 2995 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3019 "regex.h2"
+#line 3017 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3051 "regex.h2"
+#line 3049 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3060 "regex.h2"
+#line 3058 "regex.h2"
 }
 }
 
@@ -2685,6 +2671,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if (!(cur_token) && valid()) {cur_token = line_start_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = word_boundary_token_parse((*this)); }
 
             // Everything else is matched as it is.
             if (!(cur_token) && valid()) {cur_token = char_token::parse((*this)); }
@@ -2699,10 +2686,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 841 "regex.h2"
+#line 842 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 850 "regex.h2"
+#line 851 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2710,27 +2697,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 857 "regex.h2"
+#line 858 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 872 "regex.h2"
+#line 873 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 874 "regex.h2"
+#line 875 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 879 "regex.h2"
+#line 880 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 884 "regex.h2"
+#line 885 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2738,14 +2725,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 891 "regex.h2"
+#line 892 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 897 "regex.h2"
+#line 898 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2754,7 +2741,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 905 "regex.h2"
+#line 906 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2776,22 +2763,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 927 "regex.h2"
+#line 928 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 931 "regex.h2"
+#line 932 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 935 "regex.h2"
+#line 936 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 939 "regex.h2"
+#line 940 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2801,14 +2788,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 948 "regex.h2"
+#line 949 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 954 "regex.h2"
+#line 955 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2821,38 +2808,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 966 "regex.h2"
+#line 967 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 970 "regex.h2"
+#line 971 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 974 "regex.h2"
+#line 975 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 980 "regex.h2"
+#line 981 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 986 "regex.h2"
+#line 987 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 992 "regex.h2"
+#line 993 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2861,7 +2848,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1000 "regex.h2"
+#line 1001 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2870,22 +2857,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1014 "regex.h2"
+#line 1015 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1017 "regex.h2"
+#line 1018 "regex.h2"
     }
 
-#line 1019 "regex.h2"
+#line 1020 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1025 "regex.h2"
+#line 1026 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2896,7 +2883,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1035 "regex.h2"
+#line 1036 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2907,59 +2894,59 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1048 "regex.h2"
+#line 1049 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1050 "regex.h2"
+#line 1051 "regex.h2"
     }
 
-#line 1052 "regex.h2"
+#line 1053 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1054 "regex.h2"
+#line 1055 "regex.h2"
     }
 
-#line 1056 "regex.h2"
+#line 1057 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1064 "regex.h2"
+#line 1065 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1067 "regex.h2"
+#line 1068 "regex.h2"
     }
 
-#line 1069 "regex.h2"
+#line 1070 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1078 "regex.h2"
+#line 1079 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1080 "regex.h2"
+#line 1081 "regex.h2"
     }
 
-#line 1082 "regex.h2"
+#line 1083 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1094 "regex.h2"
+#line 1095 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1096 "regex.h2"
+#line 1097 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2968,22 +2955,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1104 "regex.h2"
+#line 1105 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1115 "regex.h2"
+#line 1116 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1118 "regex.h2"
+#line 1119 "regex.h2"
     }
 
-#line 1120 "regex.h2"
+#line 1121 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2998,7 +2985,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1134 "regex.h2"
+#line 1135 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -3010,7 +2997,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1145 "regex.h2"
+#line 1146 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -3025,11 +3012,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1160 "regex.h2"
+#line 1161 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1163 "regex.h2"
+#line 1164 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3048,25 +3035,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1187 "regex.h2"
+#line 1188 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1189 "regex.h2"
+#line 1190 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1195 "regex.h2"
+#line 1196 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1200 "regex.h2"
+#line 1201 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3078,20 +3065,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1216 "regex.h2"
+#line 1217 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1219 "regex.h2"
+#line 1220 "regex.h2"
     }
 
-#line 1221 "regex.h2"
+#line 1222 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1225 "regex.h2"
+#line 1226 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3100,7 +3087,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1232 "regex.h2"
+#line 1233 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3122,16 +3109,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1261 "regex.h2"
+#line 1262 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1265 "regex.h2"
+#line 1266 "regex.h2"
     }
 
-#line 1268 "regex.h2"
+#line 1269 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3238,12 +3225,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1374 "regex.h2"
+#line 1375 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1379 "regex.h2"
+#line 1380 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3253,7 +3240,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1389 "regex.h2"
+#line 1390 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3275,7 +3262,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1410 "regex.h2"
+#line 1411 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3288,11 +3275,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1435 "regex.h2"
+#line 1436 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1439 "regex.h2"
+#line 1440 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3312,35 +3299,35 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1463 "regex.h2"
+#line 1464 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1466 "regex.h2"
+#line 1467 "regex.h2"
     }
 
-#line 1468 "regex.h2"
+#line 1469 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1472 "regex.h2"
+#line 1473 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1488 "regex.h2"
+#line 1489 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1491 "regex.h2"
+#line 1492 "regex.h2"
     }
 
-#line 1493 "regex.h2"
+#line 1494 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3433,14 +3420,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1585 "regex.h2"
+#line 1586 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1590 "regex.h2"
+#line 1591 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3466,7 +3453,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1622 "regex.h2"
+#line 1623 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3590,7 +3577,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1745 "regex.h2"
+#line 1746 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3608,7 +3595,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1762 "regex.h2"
+#line 1763 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3633,7 +3620,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1786 "regex.h2"
+#line 1787 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
         if (-1 != number) {
@@ -3644,15 +3631,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1800 "regex.h2"
+#line 1801 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1803 "regex.h2"
+#line 1804 "regex.h2"
     }
 
-#line 1805 "regex.h2"
+#line 1806 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3660,7 +3647,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1813 "regex.h2"
+#line 1814 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3670,12 +3657,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1825 "regex.h2"
+#line 1826 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1832 "regex.h2"
+#line 1833 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '$' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$'))) {return nullptr; }
 
@@ -3683,7 +3670,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", "line_end_token_matcher"); 
 }
 
-#line 1839 "regex.h2"
+#line 1840 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3696,24 +3683,24 @@ template [[
     }}
 }
 
-#line 1853 "regex.h2"
+#line 1854 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^') {return nullptr; }
 
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
 }
 
-#line 1859 "regex.h2"
+#line 1860 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1874 "regex.h2"
+#line 1875 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1876 "regex.h2"
+#line 1877 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3757,7 +3744,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 1920 "regex.h2"
+#line 1921 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3784,7 +3771,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 1946 "regex.h2"
+#line 1947 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3796,7 +3783,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1957 "regex.h2"
+#line 1958 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3809,7 +3796,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1969 "regex.h2"
+#line 1970 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3834,7 +3821,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1993 "regex.h2"
+#line 1994 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3843,12 +3830,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2001 "regex.h2"
+#line 2002 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 2006 "regex.h2"
+#line 2007 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3861,26 +3848,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2018 "regex.h2"
+#line 2019 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2023 "regex.h2"
+#line 2024 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2028 "regex.h2"
+#line 2029 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2034 "regex.h2"
+#line 2035 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3896,7 +3883,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2049 "regex.h2"
+#line 2050 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3925,7 +3912,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2077 "regex.h2"
+#line 2078 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3950,7 +3937,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2101 "regex.h2"
+#line 2102 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3976,7 +3963,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2132 "regex.h2"
+#line 2133 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3999,7 +3986,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2155 "regex.h2"
+#line 2156 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -4009,14 +3996,57 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2175 "regex.h2"
+#line 2168 "regex.h2"
+[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
+    if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+
+    if (CPP2_UFCS(peek)(ctx) == 'b') {
+        static_cast(CPP2_UFCS(next)(ctx));
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\b", "word_boundary_token_matcher"); 
+    }
+    else {if (CPP2_UFCS(peek)(ctx) == 'B') {
+        static_cast(CPP2_UFCS(next)(ctx));
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\B", "word_boundary_token_matcher"); 
+    }
+    else {
+        return nullptr; 
+    }}
+}
+
+#line 2184 "regex.h2"
+template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+    static_cast(modifiers);
+    word_class words {}; 
+    auto is_match {false}; 
+    if (cur == ctx.begin) {// String start
+        if (cur != ctx.end) {// No empty string
+            is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur));
+        }
+    }
+    else {if (cur == ctx.end) {// String end
+        is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null((cur - 1)));
+    }
+    else { // Middle of string
+        is_match = 
+                (CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)))) // End of word: \w\W
+            || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)));// Start of word: \W\w
+
+    }}
+    if (negate) {
+        is_match = !(is_match);
+    }
+
+    return is_match; 
+}
+
+#line 2221 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2176 "regex.h2"
+#line 2222 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2177 "regex.h2"
+#line 2223 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2184 "regex.h2"
+#line 2230 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4036,12 +4066,12 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 2203 "regex.h2"
+#line 2249 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2204 "regex.h2"
+#line 2250 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2212 "regex.h2"
+#line 2258 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4061,7 +4091,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2231 "regex.h2"
+#line 2277 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4074,10 +4104,10 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2243 "regex.h2"
+#line 2289 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2245 "regex.h2"
+#line 2291 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4089,18 +4119,18 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2260 "regex.h2"
+#line 2306 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 2265 "regex.h2"
+#line 2311 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2266 "regex.h2"
+#line 2312 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 2273 "regex.h2"
+#line 2319 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -4116,52 +4146,11 @@ template [[nodiscard]] auto line_start_toke
         }
 
     }
-#line 2288 "regex.h2"
+#line 2334 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2289 "regex.h2"
+#line 2335 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 2324 "regex.h2"
-    template  template [[nodiscard]] auto word_boundary_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        word_class words {}; 
-        auto is_match {false}; 
-        if (cur == ctx.begin) {// String start
-            if (cur != ctx.end) {// No empty string
-                is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null(cur));
-            }
-        }
-        else {if (cur == ctx.end) {// String end
-            is_match = CPP2_UFCS(includes)(std::move(words), *cpp2::assert_not_null((cur - 1)));
-        }
-        else { // Middle of string
-            is_match = 
-                   (CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)))) // End of word: \w\W
-                || (!(CPP2_UFCS(includes)(words, *cpp2::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(words, *cpp2::assert_not_null(cur)));// Start of word: \W\w
-
-        }}
-        if (negate) {
-            is_match = !(is_match);
-        }
-
-        if (std::move(is_match)) {
-            return Other::match(cur, ctx, modifiers, end_func); 
-        }
-        else {
-            return CPP2_UFCS(fail)(ctx); 
-        }
-
-    }
-#line 2353 "regex.h2"
-    template  auto word_boundary_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2354 "regex.h2"
-    template  [[nodiscard]] auto word_boundary_matcher_logic::to_string() -> bstring{
-        if (negate) {
-            return "\\B"; 
-        }else {
-            return "\\b"; 
-        }
-    }
-
 #line 2375 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
@@ -4710,8 +4699,6 @@ template [[nodiscard]] auto line_start_toke
             CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
         }
         else {if ('A' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_start", "")); }
-        else {if ('b' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("word_boundary_matcher_logic", "false")); }
-        else {if ('B' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("word_boundary_matcher_logic", "true")); }
         else {if ('d' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_digits", "")); }
         else {if ('D' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_digits", "")); }
         else {if ('h' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_hor_space", "")); }
@@ -4728,12 +4715,12 @@ template [[nodiscard]] auto line_start_toke
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}}}}}}
+        }}}}}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 2975 "regex.h2"
+#line 2973 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4741,7 +4728,7 @@ template [[nodiscard]] auto line_start_toke
         return true; 
     }
 
-#line 2982 "regex.h2"
+#line 2980 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4757,7 +4744,7 @@ template [[nodiscard]] auto line_start_toke
         }
     }
 
-#line 2997 "regex.h2"
+#line 2995 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4780,7 +4767,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 3019 "regex.h2"
+#line 3017 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4814,7 +4801,7 @@ template [[nodiscard]] auto line_start_toke
         return source; 
     }
 
-#line 3053 "regex.h2"
+#line 3051 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index b2093d0e53..03640197fd 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -824,6 +824,7 @@ parse_context: type = {
             if !cur_token && valid() { cur_token = line_start_token_parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
+            if !cur_token && valid() { cur_token = word_boundary_token_parse(this); }
 
             // Everything else is matched as it is.
             if !cur_token && valid() { cur_token = char_token::parse(this); }
@@ -2160,6 +2161,51 @@ special_range_token: @polymorphic_base type = {
     }
 }
 
+// Regex syntax: \b or \B  Example: \bword\b
+//
+// Matches the start end end of word boundaries.
+//
+word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if ctx.current() != '\\' { return nullptr; }
+
+    if ctx.peek() == 'b' {
+        _ = ctx.next();
+        return shared.new("\\\\b", "word_boundary_token_matcher");
+    }
+    else if ctx.peek() == 'B' {
+        _ = ctx.next();
+        return shared.new("\\\\B", "word_boundary_token_matcher");
+    }
+    else {
+        return nullptr;
+    }
+}
+
+word_boundary_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
+    _ = modifiers;
+    words : word_class = ();
+    is_match := false;
+    if cur == ctx.begin { // String start
+        if cur != ctx.end { // No empty string
+            is_match = words.includes(cur*);
+        }
+    }
+    else if cur == ctx.end { // String end
+        is_match = words.includes((cur - 1)*);
+    }
+    else { // Middle of string
+        is_match =
+                (words.includes((cur - 1)*) && !words.includes(cur*))  // End of word: \w\W
+            || (!words.includes((cur - 1)*) && words.includes(cur*)); // Start of word: \W\w
+
+    }
+    if negate {
+        is_match = !is_match;
+    }
+
+    return is_match;
+}
+
 
 //-----------------------------------------------------------------------
 //
@@ -2315,52 +2361,6 @@ named_class_not_word      :  type == named_class_matcher_logic type   == special_syntax_wrapper>;
 // named_string_start:  type == special_syntax_wrapper>;
 
-// Regex syntax: \b or \B  Example: \bword\b
-//
-// Matches the start end end of word boundaries.
-//
-word_boundary_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, modifiers, end_func, _: Other) -> _ = {
-        words : word_class = ();
-        is_match := false;
-        if cur == ctx.begin { // String start
-            if cur != ctx.end { // No empty string
-                is_match = words.includes(cur*);
-            }
-        }
-        else if cur == ctx.end { // String end
-            is_match = words.includes((cur - 1)*);
-        }
-        else { // Middle of string
-            is_match =
-                   (words.includes((cur - 1)*) && !words.includes(cur*))  // End of word: \w\W
-                || (!words.includes((cur - 1)*) && words.includes(cur*)); // Start of word: \W\w
-
-        }
-        if negate {
-            is_match = !is_match;
-        }
-
-        if is_match{
-            return Other::match(cur, ctx, modifiers, end_func);
-        }
-        else {
-            return ctx.fail();
-        }
-
-    }
-    reset_ranges: (_) = {}
-    to_string:    () -> bstring = {
-        if negate {
-            return "\\B";
-        } else {
-            return "\\b";
-        }
-    }
-}
-
-
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -2949,8 +2949,6 @@ regex_parser:  type = {
             cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
         }
         else if 'A' == c_next { cur_group_state.add(create_matcher("named_string_start", "")); }
-        else if 'b' == c_next { cur_group_state.add(create_matcher("word_boundary_matcher_logic", "false")); }
-        else if 'B' == c_next { cur_group_state.add(create_matcher("word_boundary_matcher_logic", "true")); }
         else if 'd' == c_next { cur_group_state.add(create_matcher("named_class_digits", "")); }
         else if 'D' == c_next { cur_group_state.add(create_matcher("named_class_not_digits", "")); }
         else if 'h' == c_next { cur_group_state.add(create_matcher("named_class_hor_space", "")); }

From a894f25cdb83a7ed6825bdd5310e9619f4f5c679 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 8 May 2024 15:43:56 +0200
Subject: [PATCH 115/161] Added named start and end line matchers.

---
 include/cpp2regex.h | 482 ++++++++++++++++++++++----------------------
 source/regex.h2     |  32 +--
 2 files changed, 265 insertions(+), 249 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index daa223313c..15fb0e13c1 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -177,66 +177,66 @@ template class apply_modifie
 #line 1824 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1867 "regex.h2"
+#line 1882 "regex.h2"
 class range_token;
     
 
-#line 2005 "regex.h2"
+#line 2020 "regex.h2"
 template class range_token_matcher;
 
-#line 2130 "regex.h2"
+#line 2145 "regex.h2"
 class special_range_token;
     
 
-#line 2220 "regex.h2"
+#line 2235 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2228 "regex.h2"
+#line 2243 "regex.h2"
 template class char_matcher_logic;
 
-#line 2256 "regex.h2"
+#line 2271 "regex.h2"
 template class class_matcher_logic;
 
-#line 2305 "regex.h2"
+#line 2320 "regex.h2"
 template class global_group_reset;
     
 
-#line 2317 "regex.h2"
+#line 2332 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 2341 "regex.h2"
+#line 2356 "regex.h2"
 template                    class named_class_matcher_logic;
     
 
-#line 2373 "regex.h2"
+#line 2384 "regex.h2"
 template class group_name_list;
 
-#line 2385 "regex.h2"
+#line 2396 "regex.h2"
 class group_name_list_end;
     
 
-#line 2390 "regex.h2"
+#line 2401 "regex.h2"
 template class regular_expression;
 
-#line 2471 "regex.h2"
+#line 2482 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2560 "regex.h2"
+#line 2571 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2567 "regex.h2"
+#line 2578 "regex.h2"
 class regex_parser_group_state;
 
-#line 2602 "regex.h2"
+#line 2613 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2629 "regex.h2"
+#line 2640 "regex.h2"
 template class regex_parser;
 
-#line 3058 "regex.h2"
+#line 3066 "regex.h2"
 }
 }
 
@@ -1259,23 +1259,23 @@ template class pop_modifiers_matcher {
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1840 "regex.h2"
+#line 1849 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1852 "regex.h2"
+#line 1861 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1860 "regex.h2"
+#line 1875 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1865 "regex.h2"
+#line 1880 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1870 "regex.h2"
+#line 1885 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1285,65 +1285,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1947 "regex.h2"
+#line 1962 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1958 "regex.h2"
+#line 1973 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1970 "regex.h2"
+#line 1985 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 1994 "regex.h2"
+#line 2009 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2002 "regex.h2"
+#line 2017 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 2003 "regex.h2"
+#line 2018 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2019 "regex.h2"
+#line 2034 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2024 "regex.h2"
+#line 2039 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2029 "regex.h2"
+#line 2044 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2035 "regex.h2"
+#line 2050 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2050 "regex.h2"
+#line 2065 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2078 "regex.h2"
+#line 2093 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2102 "regex.h2"
+#line 2117 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2126 "regex.h2"
+#line 2141 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2133 "regex.h2"
+#line 2148 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1352,7 +1352,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2162 "regex.h2"
+#line 2177 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1361,10 +1361,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2184 "regex.h2"
+#line 2199 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2210 "regex.h2"
+#line 2225 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1372,7 +1372,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2218 "regex.h2"
+#line 2233 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1383,7 +1383,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2224 "regex.h2"
+#line 2239 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1392,27 +1392,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2249 "regex.h2"
+#line 2264 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2251 "regex.h2"
+#line 2266 "regex.h2"
 };
 
-#line 2254 "regex.h2"
+#line 2269 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2277 "regex.h2"
+#line 2292 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2289 "regex.h2"
+#line 2304 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1421,7 +1421,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2301 "regex.h2"
+#line 2316 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1429,14 +1429,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2311 "regex.h2"
+#line 2326 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 2313 "regex.h2"
+#line 2328 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1445,14 +1445,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2334 "regex.h2"
+#line 2349 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 2336 "regex.h2"
+#line 2351 "regex.h2"
 };
 
 // Named character classes
@@ -1464,7 +1464,7 @@ template                    void = delete;
 
 
-#line 2343 "regex.h2"
+#line 2358 "regex.h2"
 };
 
 template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
@@ -1474,18 +1474,14 @@ template                  using named_class_space = named_class_
 template                  using named_class_ver_space = named_class_matcher_logic>;
 template                  using named_class_word = named_class_matcher_logic>;
 
-#line 2353 "regex.h2"
+#line 2368 "regex.h2"
 template                     using named_class_not_digits = named_class_matcher_logic>;
 template using named_class_not_hor_space = named_class_matcher_logic>;
 template                     using named_class_not_space = named_class_matcher_logic>;
 template using named_class_not_ver_space = named_class_matcher_logic>;
 template                     using named_class_not_word = named_class_matcher_logic>;
 
-// Other named matchers
-// named_string_end_or_before_new_line_at_end:  type  == special_syntax_wrapper>;
-// named_string_end:  type   == special_syntax_wrapper>;
-// named_string_start:  type == special_syntax_wrapper>;
-
+#line 2375 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1503,7 +1499,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2383 "regex.h2"
+#line 2394 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1512,7 +1508,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2387 "regex.h2"
+#line 2398 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1528,7 +1524,7 @@ template matched_, context const& ctx_);
 
-#line 2405 "regex.h2"
+#line 2416 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1543,7 +1539,7 @@ template void = delete;
 
 
-#line 2421 "regex.h2"
+#line 2432 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1551,13 +1547,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2433 "regex.h2"
+#line 2444 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2455 "regex.h2"
+#line 2466 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1569,7 +1565,7 @@ template void = delete;
 
 
-#line 2468 "regex.h2"
+#line 2479 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1585,7 +1581,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2486 "regex.h2"
+#line 2497 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1600,7 +1596,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2502 "regex.h2"
+#line 2513 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1608,13 +1604,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2514 "regex.h2"
+#line 2525 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2536 "regex.h2"
+#line 2547 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1626,7 +1622,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2549 "regex.h2"
+#line 2560 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1657,15 +1653,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2583 "regex.h2"
+#line 2594 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2589 "regex.h2"
+#line 2600 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2598 "regex.h2"
+#line 2609 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1678,13 +1674,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2616 "regex.h2"
+#line 2627 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2621 "regex.h2"
+#line 2632 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2626 "regex.h2"
+#line 2637 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1703,53 +1699,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2646 "regex.h2"
+#line 2657 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2652 "regex.h2"
+#line 2663 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2661 "regex.h2"
+#line 2672 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2665 "regex.h2"
+#line 2676 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2680 "regex.h2"
+#line 2691 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2686 "regex.h2"
+#line 2697 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2727 "regex.h2"
+#line 2738 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2739 "regex.h2"
+#line 2750 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2745 "regex.h2"
+#line 2756 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2752 "regex.h2"
+#line 2763 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2761 "regex.h2"
+#line 2772 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2769 "regex.h2"
+#line 2780 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2779 "regex.h2"
+#line 2790 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1757,61 +1753,61 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2789 "regex.h2"
+#line 2800 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2801 "regex.h2"
+#line 2812 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2804 "regex.h2"
+#line 2815 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2814 "regex.h2"
+#line 2825 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2832 "regex.h2"
+#line 2843 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2842 "regex.h2"
+#line 2853 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2855 "regex.h2"
+#line 2866 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2891 "regex.h2"
+#line 2902 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2973 "regex.h2"
+#line 2981 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2980 "regex.h2"
+#line 2988 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 2995 "regex.h2"
+#line 3003 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3017 "regex.h2"
+#line 3025 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3049 "regex.h2"
+#line 3057 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3058 "regex.h2"
+#line 3066 "regex.h2"
 }
 }
 
@@ -3664,13 +3660,22 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
 #line 1833 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
-    if (CPP2_UFCS(current)(ctx) != '$' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$'))) {return nullptr; }
+    if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
+        if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", "line_end_token_matcher"); 
+    }
+    else {if (CPP2_UFCS(current)(ctx) == '\\' && (CPP2_UFCS(peek)(ctx) == 'z' || CPP2_UFCS(peek)(ctx) == 'Z')) {
+        static_cast(CPP2_UFCS(next)(ctx));// Skip escape
 
-    if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", "line_end_token_matcher"); 
+        auto negate {CPP2_UFCS(current)(ctx) == 'Z'}; 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), ("line_end_token_matcher")); 
+    }
+    else {
+        return nullptr; 
+    }}
 }
 
-#line 1840 "regex.h2"
+#line 1849 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3683,24 +3688,30 @@ template [[
     }}
 }
 
-#line 1854 "regex.h2"
+#line 1863 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
-    if (CPP2_UFCS(current)(ctx) != '^') {return nullptr; }
+    if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
+    if (CPP2_UFCS(current)(ctx) == '\\') {
+        static_cast(CPP2_UFCS(next)(ctx));
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\A", "line_start_token_matcher"); 
+    }
+    else {
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
+    }
 }
 
-#line 1860 "regex.h2"
+#line 1875 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1875 "regex.h2"
+#line 1890 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1877 "regex.h2"
+#line 1892 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3744,7 +3755,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 1921 "regex.h2"
+#line 1936 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3771,7 +3782,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 1947 "regex.h2"
+#line 1962 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3783,7 +3794,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1958 "regex.h2"
+#line 1973 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3796,7 +3807,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1970 "regex.h2"
+#line 1985 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3821,7 +3832,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 1994 "regex.h2"
+#line 2009 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3830,12 +3841,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2002 "regex.h2"
+#line 2017 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 2007 "regex.h2"
+#line 2022 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3848,26 +3859,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2019 "regex.h2"
+#line 2034 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2024 "regex.h2"
+#line 2039 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2029 "regex.h2"
+#line 2044 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2035 "regex.h2"
+#line 2050 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3883,7 +3894,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2050 "regex.h2"
+#line 2065 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3912,7 +3923,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2078 "regex.h2"
+#line 2093 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3937,7 +3948,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2102 "regex.h2"
+#line 2117 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3963,7 +3974,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2133 "regex.h2"
+#line 2148 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3986,7 +3997,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2156 "regex.h2"
+#line 2171 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3996,7 +4007,7 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2168 "regex.h2"
+#line 2183 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -4013,7 +4024,7 @@ template [[nodiscard]] auto line_start_toke
     }}
 }
 
-#line 2184 "regex.h2"
+#line 2199 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -4039,14 +4050,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2221 "regex.h2"
+#line 2236 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2222 "regex.h2"
+#line 2237 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2223 "regex.h2"
+#line 2238 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2230 "regex.h2"
+#line 2245 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4066,12 +4077,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2249 "regex.h2"
+#line 2264 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2250 "regex.h2"
+#line 2265 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2258 "regex.h2"
+#line 2273 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4091,7 +4102,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2277 "regex.h2"
+#line 2292 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4104,10 +4115,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2289 "regex.h2"
+#line 2304 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2291 "regex.h2"
+#line 2306 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4119,18 +4130,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2306 "regex.h2"
+#line 2321 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 2311 "regex.h2"
+#line 2326 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2312 "regex.h2"
+#line 2327 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 2319 "regex.h2"
+#line 2334 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -4146,12 +4157,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2334 "regex.h2"
+#line 2349 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2335 "regex.h2"
+#line 2350 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 2375 "regex.h2"
+#line 2386 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -4161,34 +4172,34 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2386 "regex.h2"
+#line 2397 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2400 "regex.h2"
+#line 2411 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2403 "regex.h2"
+#line 2414 "regex.h2"
         }
 
-#line 2405 "regex.h2"
+#line 2416 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2406 "regex.h2"
+#line 2417 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2407 "regex.h2"
+#line 2418 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2408 "regex.h2"
+#line 2419 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2410 "regex.h2"
+#line 2421 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2411 "regex.h2"
+#line 2422 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2412 "regex.h2"
+#line 2423 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2414 "regex.h2"
+#line 2425 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -4197,13 +4208,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2423 "regex.h2"
+#line 2434 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2424 "regex.h2"
+#line 2435 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2425 "regex.h2"
+#line 2436 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2426 "regex.h2"
+#line 2437 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4211,13 +4222,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2433 "regex.h2"
+#line 2444 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2434 "regex.h2"
+#line 2445 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2435 "regex.h2"
+#line 2446 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2436 "regex.h2"
+#line 2447 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4237,10 +4248,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2455 "regex.h2"
+#line 2466 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2460 "regex.h2"
+#line 2471 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4250,31 +4261,31 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2481 "regex.h2"
+#line 2492 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2484 "regex.h2"
+#line 2495 "regex.h2"
         }
 
-#line 2486 "regex.h2"
+#line 2497 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2487 "regex.h2"
+#line 2498 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2488 "regex.h2"
+#line 2499 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2489 "regex.h2"
+#line 2500 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2491 "regex.h2"
+#line 2502 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2492 "regex.h2"
+#line 2503 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2493 "regex.h2"
+#line 2504 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2495 "regex.h2"
+#line 2506 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4283,13 +4294,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2504 "regex.h2"
+#line 2515 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2505 "regex.h2"
+#line 2516 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2506 "regex.h2"
+#line 2517 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2507 "regex.h2"
+#line 2518 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4297,13 +4308,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2514 "regex.h2"
+#line 2525 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2515 "regex.h2"
+#line 2526 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2516 "regex.h2"
+#line 2527 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2517 "regex.h2"
+#line 2528 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4323,10 +4334,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2536 "regex.h2"
+#line 2547 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2541 "regex.h2"
+#line 2552 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4336,24 +4347,24 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2577 "regex.h2"
+#line 2588 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2583 "regex.h2"
+#line 2594 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2589 "regex.h2"
+#line 2600 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2591 "regex.h2"
+#line 2602 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4361,10 +4372,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         static_cast(std::move(last));
     }
 
-#line 2598 "regex.h2"
+#line 2609 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2608 "regex.h2"
+#line 2619 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4373,29 +4384,29 @@ template [[nodiscard]] auto word_boundary_token_mat
         return g; 
     }
 
-#line 2616 "regex.h2"
+#line 2627 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2621 "regex.h2"
+#line 2632 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2646 "regex.h2"
+#line 2657 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2650 "regex.h2"
+#line 2661 "regex.h2"
     }
 
-#line 2654 "regex.h2"
+#line 2665 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4403,12 +4414,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2661 "regex.h2"
+#line 2672 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2668 "regex.h2"
+#line 2679 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4421,14 +4432,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2680 "regex.h2"
+#line 2691 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2689 "regex.h2"
+#line 2700 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4467,7 +4478,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return cur; 
     }
 
-#line 2727 "regex.h2"
+#line 2738 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4480,14 +4491,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2739 "regex.h2"
+#line 2750 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2740 "regex.h2"
+#line 2751 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2741 "regex.h2"
+#line 2752 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2745 "regex.h2"
+#line 2756 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4495,7 +4506,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2752 "regex.h2"
+#line 2763 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4505,7 +4516,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2761 "regex.h2"
+#line 2772 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4514,7 +4525,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2769 "regex.h2"
+#line 2780 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4525,18 +4536,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2779 "regex.h2"
+#line 2790 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2780 "regex.h2"
+#line 2791 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2784 "regex.h2"
+#line 2795 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2789 "regex.h2"
+#line 2800 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4549,10 +4560,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2801 "regex.h2"
+#line 2812 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2807 "regex.h2"
+#line 2818 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4560,10 +4571,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2814 "regex.h2"
+#line 2825 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2816 "regex.h2"
+#line 2827 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4580,7 +4591,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2832 "regex.h2"
+#line 2843 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4591,7 +4602,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2844 "regex.h2"
+#line 2855 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4603,7 +4614,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2855 "regex.h2"
+#line 2866 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4640,14 +4651,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2894 "regex.h2"
+#line 2905 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
         auto c_next {'\0'}; 
         if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
 
-#line 2901 "regex.h2"
+#line 2912 "regex.h2"
         if ('K' == c_next) {
             CPP2_UFCS(add)(cur_group_state, create_matcher("global_group_reset", ""));
         }
@@ -4698,7 +4709,6 @@ template [[nodiscard]] auto word_boundary_token_mat
             auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
             CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
         }
-        else {if ('A' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_start", "")); }
         else {if ('d' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_digits", "")); }
         else {if ('D' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_digits", "")); }
         else {if ('h' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_hor_space", "")); }
@@ -4709,18 +4719,16 @@ template [[nodiscard]] auto word_boundary_token_mat
         else {if ('v' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_ver_space", "")); }
         else {if ('V' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_ver_space", "")); }
         else {if ('w' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_word", "")); }
-        else {if ('W' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_word", "")); }
-        else {if ('Z' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_end_or_before_new_line_at_end", "")); }
-        else {if ('z' == std::move(c_next)) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_string_end", "")); }
+        else {if ('W' == std::move(c_next)) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_word", "")); }
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}}}}
+        }}}}}}}}}}}}}}
 
         return true; 
     }
 
-#line 2973 "regex.h2"
+#line 2981 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4728,7 +4736,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2980 "regex.h2"
+#line 2988 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4744,7 +4752,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2995 "regex.h2"
+#line 3003 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4767,7 +4775,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return res; 
     }
 
-#line 3017 "regex.h2"
+#line 3025 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4801,7 +4809,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 3051 "regex.h2"
+#line 3059 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 03640197fd..0019107697 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1831,10 +1831,19 @@ pop_modifiers_matcher:  type = {
 // Regex syntax: $  Example: aa$
 //
 line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if ctx.current() != '$' && !(ctx.current() == '\\' && ctx.peek() == '$') { return nullptr; }
+    if ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$') {
+        if (ctx.current() == '\\') { _ = ctx.next(); } // Skip escape
+        return shared.new("\\\\$", "line_end_token_matcher");
+    }
+    else if ctx.current() == '\\' && (ctx.peek() == 'z' || ctx.peek() == 'Z') {
+        _ = ctx.next(); // Skip escape
 
-    if (ctx.current() == '\\') { _ = ctx.next(); } // Skip escape
-    return shared.new("\\\\$", "line_end_token_matcher");
+        negate := ctx.current() == 'Z';
+        return shared.new("\\\\(ctx.current())$", "line_end_token_matcher");
+    }
+    else {
+        return nullptr;
+    }
 }
 
 line_end_token_matcher:  (cur, inout ctx, modifiers) -> bool = {
@@ -1852,9 +1861,15 @@ line_end_token_matcher:  token_ptr = {
-    if ctx.current() != '^' { return nullptr; }
+    if ctx.current() != '^' && !(ctx.current() == '\\' && ctx.peek() == 'A') { return nullptr; }
 
-    return shared.new("^", "line_start_token_matcher");
+    if ctx.current() == '\\' {
+        _ = ctx.next();
+        return shared.new("\\\\A", "line_start_token_matcher");
+    }
+    else {
+        return shared.new("^", "line_start_token_matcher");
+    }
 }
 
 line_start_token_matcher:  (cur, inout ctx, modifiers) -> bool = {
@@ -2356,10 +2371,6 @@ named_class_not_space     :  type == named_class_matcher_logic type == named_class_matcher_logic>;
 named_class_not_word      :  type == named_class_matcher_logic>;
 
-// Other named matchers
-// named_string_end_or_before_new_line_at_end:  type  == special_syntax_wrapper>;
-// named_string_end:  type   == special_syntax_wrapper>;
-// named_string_start:  type == special_syntax_wrapper>;
 
 //-----------------------------------------------------------------------
 //
@@ -2948,7 +2959,6 @@ regex_parser:  type = {
             char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
             cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
         }
-        else if 'A' == c_next { cur_group_state.add(create_matcher("named_string_start", "")); }
         else if 'd' == c_next { cur_group_state.add(create_matcher("named_class_digits", "")); }
         else if 'D' == c_next { cur_group_state.add(create_matcher("named_class_not_digits", "")); }
         else if 'h' == c_next { cur_group_state.add(create_matcher("named_class_hor_space", "")); }
@@ -2960,8 +2970,6 @@ regex_parser:  type = {
         else if 'V' == c_next { cur_group_state.add(create_matcher("named_class_not_ver_space", "")); }
         else if 'w' == c_next { cur_group_state.add(create_matcher("named_class_word", "")); }
         else if 'W' == c_next { cur_group_state.add(create_matcher("named_class_not_word", "")); }
-        else if 'Z' == c_next { cur_group_state.add(create_matcher("named_string_end_or_before_new_line_at_end", "")); }
-        else if 'z' == c_next { cur_group_state.add(create_matcher("named_string_end", "")); }
         else {
             error("Unknown escape.");
             return false;

From 14646c3070d333ffe69b16a26223173d9bf37663 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 8 May 2024 16:01:51 +0200
Subject: [PATCH 116/161] Added named class matchers.

---
 include/cpp2regex.h | 911 ++++++++++++++++++++++----------------------
 source/regex.h2     |  74 ++--
 2 files changed, 498 insertions(+), 487 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 15fb0e13c1..819ab89716 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,137 +106,133 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 847 "regex.h2"
+#line 848 "regex.h2"
 class generation_function_context;
     
 
-#line 863 "regex.h2"
+#line 864 "regex.h2"
 class generation_context;
 
-#line 1010 "regex.h2"
+#line 1011 "regex.h2"
 class regex_token_list;
     
 
-#line 1046 "regex.h2"
+#line 1047 "regex.h2"
 class regex_token_base;
     
 
-#line 1060 "regex.h2"
+#line 1061 "regex.h2"
 class regex_token_check;
     
 
-#line 1076 "regex.h2"
+#line 1077 "regex.h2"
 class regex_token_empty;
     
 
-#line 1092 "regex.h2"
+#line 1093 "regex.h2"
 class alternative_token;
     
 
-#line 1110 "regex.h2"
+#line 1111 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1159 "regex.h2"
+#line 1160 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1185 "regex.h2"
+#line 1186 "regex.h2"
 class any_token;
     
 
-#line 1212 "regex.h2"
+#line 1213 "regex.h2"
 class char_token;
     
 
-#line 1256 "regex.h2"
+#line 1257 "regex.h2"
 class class_token;
     
 
-#line 1388 "regex.h2"
+#line 1389 "regex.h2"
 template class class_token_matcher;
 
-#line 1459 "regex.h2"
+#line 1460 "regex.h2"
 class escaped_char_token;
     
 
-#line 1484 "regex.h2"
+#line 1485 "regex.h2"
 class group_ref_token;
     
 
-#line 1616 "regex.h2"
+#line 1617 "regex.h2"
 class group_token;
     
 
-#line 1796 "regex.h2"
+#line 1797 "regex.h2"
 class modifier_token;
     
 
-#line 1812 "regex.h2"
+#line 1813 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1824 "regex.h2"
+#line 1825 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1882 "regex.h2"
+#line 1923 "regex.h2"
 class range_token;
     
 
-#line 2020 "regex.h2"
+#line 2061 "regex.h2"
 template class range_token_matcher;
 
-#line 2145 "regex.h2"
+#line 2186 "regex.h2"
 class special_range_token;
     
 
-#line 2235 "regex.h2"
+#line 2276 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2243 "regex.h2"
+#line 2284 "regex.h2"
 template class char_matcher_logic;
 
-#line 2271 "regex.h2"
+#line 2312 "regex.h2"
 template class class_matcher_logic;
 
-#line 2320 "regex.h2"
+#line 2361 "regex.h2"
 template class global_group_reset;
     
 
-#line 2332 "regex.h2"
+#line 2373 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 2356 "regex.h2"
-template                    class named_class_matcher_logic;
-    
-
-#line 2384 "regex.h2"
+#line 2403 "regex.h2"
 template class group_name_list;
 
-#line 2396 "regex.h2"
+#line 2415 "regex.h2"
 class group_name_list_end;
     
 
-#line 2401 "regex.h2"
+#line 2420 "regex.h2"
 template class regular_expression;
 
-#line 2482 "regex.h2"
+#line 2501 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2571 "regex.h2"
+#line 2590 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2578 "regex.h2"
+#line 2597 "regex.h2"
 class regex_parser_group_state;
 
-#line 2613 "regex.h2"
+#line 2632 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2640 "regex.h2"
+#line 2659 "regex.h2"
 template class regex_parser;
 
-#line 3066 "regex.h2"
+#line 3074 "regex.h2"
 }
 }
 
@@ -799,13 +795,13 @@ class parse_context {
 #line 809 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 842 "regex.h2"
+#line 843 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 845 "regex.h2"
+#line 846 "regex.h2"
 };
 
 class generation_function_context {
@@ -814,10 +810,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 858 "regex.h2"
+#line 859 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 861 "regex.h2"
+#line 862 "regex.h2"
 };
 
 class generation_context {
@@ -834,81 +830,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 880 "regex.h2"
+#line 881 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 885 "regex.h2"
+#line 886 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 892 "regex.h2"
+#line 893 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 898 "regex.h2"
+#line 899 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 906 "regex.h2"
+#line 907 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 928 "regex.h2"
+#line 929 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 932 "regex.h2"
+#line 933 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 936 "regex.h2"
+#line 937 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 940 "regex.h2"
+#line 941 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 949 "regex.h2"
+#line 950 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 955 "regex.h2"
+#line 956 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 967 "regex.h2"
+#line 968 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 971 "regex.h2"
+#line 972 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 975 "regex.h2"
+#line 976 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 981 "regex.h2"
+#line 982 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 987 "regex.h2"
+#line 988 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 993 "regex.h2"
+#line 994 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1001 "regex.h2"
+#line 1002 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1008 "regex.h2"
+#line 1009 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1013 "regex.h2"
+#line 1014 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1020 "regex.h2"
+#line 1021 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1026 "regex.h2"
+#line 1027 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 1036 "regex.h2"
+#line 1037 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -916,36 +912,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1043 "regex.h2"
+#line 1044 "regex.h2"
 };
 
-#line 1046 "regex.h2"
+#line 1047 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1049 "regex.h2"
+#line 1050 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1053 "regex.h2"
+#line 1054 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1057 "regex.h2"
+#line 1058 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1058 "regex.h2"
+#line 1059 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1063 "regex.h2"
+#line 1064 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1070 "regex.h2"
+#line 1071 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -953,16 +949,16 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1073 "regex.h2"
+#line 1074 "regex.h2"
 };
 
-#line 1076 "regex.h2"
+#line 1077 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1079 "regex.h2"
+#line 1080 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1083 "regex.h2"
+#line 1084 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -970,7 +966,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1086 "regex.h2"
+#line 1087 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -979,12 +975,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1095 "regex.h2"
+#line 1096 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1105 "regex.h2"
+#line 1106 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -992,23 +988,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1108 "regex.h2"
+#line 1109 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1114 "regex.h2"
+#line 1115 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1121 "regex.h2"
+#line 1122 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1135 "regex.h2"
+#line 1136 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 1146 "regex.h2"
+#line 1147 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1016,33 +1012,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1157 "regex.h2"
+#line 1158 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1164 "regex.h2"
+#line 1165 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1181 "regex.h2"
+#line 1182 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1188 "regex.h2"
+#line 1189 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1196 "regex.h2"
+#line 1197 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1050,23 +1046,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1199 "regex.h2"
+#line 1200 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1212 "regex.h2"
+#line 1213 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1215 "regex.h2"
+#line 1216 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1222 "regex.h2"
+#line 1223 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1226 "regex.h2"
+#line 1227 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1074,30 +1070,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1231 "regex.h2"
+#line 1232 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1254 "regex.h2"
+#line 1255 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1259 "regex.h2"
+#line 1260 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1268 "regex.h2"
+#line 1269 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1375 "regex.h2"
+#line 1376 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1380 "regex.h2"
+#line 1381 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1105,21 +1101,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1386 "regex.h2"
+#line 1387 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1411 "regex.h2"
+#line 1412 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1423 "regex.h2"
+#line 1424 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1131,23 +1127,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1434 "regex.h2"
+#line 1435 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1459 "regex.h2"
+#line 1460 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1462 "regex.h2"
+#line 1463 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1469 "regex.h2"
+#line 1470 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1473 "regex.h2"
+#line 1474 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1155,7 +1151,7 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1476 "regex.h2"
+#line 1477 "regex.h2"
 };
 
 // Regex syntax: \  Example: \1
@@ -1166,15 +1162,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1487 "regex.h2"
+#line 1488 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1494 "regex.h2"
+#line 1495 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1586 "regex.h2"
+#line 1587 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1182,28 +1178,28 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1589 "regex.h2"
+#line 1590 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1616 "regex.h2"
+#line 1617 "regex.h2"
 class group_token: public regex_token {
 
-#line 1619 "regex.h2"
+#line 1620 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1746 "regex.h2"
+#line 1747 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1763 "regex.h2"
+#line 1764 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1787 "regex.h2"
+#line 1788 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1212,17 +1208,17 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1794 "regex.h2"
+#line 1795 "regex.h2"
 };
 
 class modifier_token: public regex_token_base {
 
-#line 1799 "regex.h2"
+#line 1800 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1806 "regex.h2"
+#line 1807 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1230,7 +1226,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1810 "regex.h2"
+#line 1811 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1241,7 +1237,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1822 "regex.h2"
+#line 1823 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1252,30 +1248,49 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1829 "regex.h2"
+#line 1830 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1849 "regex.h2"
+#line 1850 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1861 "regex.h2"
+#line 1862 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1875 "regex.h2"
+#line 1876 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1880 "regex.h2"
+#line 1881 "regex.h2"
+// Named character classes
+//
+
+[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 1908 "regex.h2"
+template using named_class_no_new_line = class_token_matcher>;
+template                  using named_class_digits = class_token_matcher>;
+template                  using named_class_hor_space = class_token_matcher>;
+template                  using named_class_space = class_token_matcher>;
+template                  using named_class_ver_space = class_token_matcher>;
+template                  using named_class_word = class_token_matcher>;
+
+template                     using named_class_not_digits = class_token_matcher>;
+template using named_class_not_hor_space = class_token_matcher>;
+template                     using named_class_not_space = class_token_matcher>;
+template using named_class_not_ver_space = class_token_matcher>;
+template                     using named_class_not_word = class_token_matcher>;
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1885 "regex.h2"
+#line 1926 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1285,65 +1300,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1962 "regex.h2"
+#line 2003 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 1973 "regex.h2"
+#line 2014 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 1985 "regex.h2"
+#line 2026 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2009 "regex.h2"
+#line 2050 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2017 "regex.h2"
+#line 2058 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 2018 "regex.h2"
+#line 2059 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2034 "regex.h2"
+#line 2075 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2039 "regex.h2"
+#line 2080 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2044 "regex.h2"
+#line 2085 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2050 "regex.h2"
+#line 2091 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2065 "regex.h2"
+#line 2106 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2093 "regex.h2"
+#line 2134 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2117 "regex.h2"
+#line 2158 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2141 "regex.h2"
+#line 2182 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2148 "regex.h2"
+#line 2189 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1352,7 +1367,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2177 "regex.h2"
+#line 2218 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1361,10 +1376,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2199 "regex.h2"
+#line 2240 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2225 "regex.h2"
+#line 2266 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1372,7 +1387,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2233 "regex.h2"
+#line 2274 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1383,7 +1398,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2239 "regex.h2"
+#line 2280 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1392,27 +1407,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2264 "regex.h2"
+#line 2305 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2266 "regex.h2"
+#line 2307 "regex.h2"
 };
 
-#line 2269 "regex.h2"
+#line 2310 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2292 "regex.h2"
+#line 2333 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2304 "regex.h2"
+#line 2345 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1421,7 +1436,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2316 "regex.h2"
+#line 2357 "regex.h2"
 };
 
 // Regex syntax: \K Example: \K
@@ -1429,14 +1444,14 @@ template class class_matcher_logi
 template class global_group_reset {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2326 "regex.h2"
+#line 2367 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: global_group_reset() = default;
     public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(global_group_reset const&) -> void = delete;
 
-#line 2328 "regex.h2"
+#line 2369 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1445,43 +1460,16 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2349 "regex.h2"
+#line 2390 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 2351 "regex.h2"
-};
-
-// Named character classes
-//
-
-template                    class named_class_matcher_logic: public special_syntax_wrapper> {
-    public: named_class_matcher_logic() = default;
-    public: named_class_matcher_logic(named_class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(named_class_matcher_logic const&) -> void = delete;
-
-
-#line 2358 "regex.h2"
+#line 2392 "regex.h2"
 };
 
-template using named_class_no_new_line = named_class_matcher_logic>;// TODO: Remove second \, switch to raw strings.
-template                  using named_class_digits = named_class_matcher_logic>;
-template                  using named_class_hor_space = named_class_matcher_logic>;
-template                  using named_class_space = named_class_matcher_logic>;
-template                  using named_class_ver_space = named_class_matcher_logic>;
-template                  using named_class_word = named_class_matcher_logic>;
-
-#line 2368 "regex.h2"
-template                     using named_class_not_digits = named_class_matcher_logic>;
-template using named_class_not_hor_space = named_class_matcher_logic>;
-template                     using named_class_not_space = named_class_matcher_logic>;
-template using named_class_not_ver_space = named_class_matcher_logic>;
-template                     using named_class_not_word = named_class_matcher_logic>;
-
-#line 2375 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1499,7 +1487,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2394 "regex.h2"
+#line 2413 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1508,7 +1496,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2398 "regex.h2"
+#line 2417 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1524,7 +1512,7 @@ template matched_, context const& ctx_);
 
-#line 2416 "regex.h2"
+#line 2435 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1539,7 +1527,7 @@ template void = delete;
 
 
-#line 2432 "regex.h2"
+#line 2451 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1547,13 +1535,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2444 "regex.h2"
+#line 2463 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2466 "regex.h2"
+#line 2485 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1565,7 +1553,7 @@ template void = delete;
 
 
-#line 2479 "regex.h2"
+#line 2498 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1581,7 +1569,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2497 "regex.h2"
+#line 2516 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1596,7 +1584,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2513 "regex.h2"
+#line 2532 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1604,13 +1592,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2525 "regex.h2"
+#line 2544 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2547 "regex.h2"
+#line 2566 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1622,7 +1610,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2560 "regex.h2"
+#line 2579 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1653,15 +1641,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2594 "regex.h2"
+#line 2613 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2600 "regex.h2"
+#line 2619 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2609 "regex.h2"
+#line 2628 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1674,13 +1662,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2627 "regex.h2"
+#line 2646 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2632 "regex.h2"
+#line 2651 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2637 "regex.h2"
+#line 2656 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1699,53 +1687,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2657 "regex.h2"
+#line 2676 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2663 "regex.h2"
+#line 2682 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2672 "regex.h2"
+#line 2691 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2676 "regex.h2"
+#line 2695 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2691 "regex.h2"
+#line 2710 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2697 "regex.h2"
+#line 2716 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2738 "regex.h2"
+#line 2757 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2750 "regex.h2"
+#line 2769 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2756 "regex.h2"
+#line 2775 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2763 "regex.h2"
+#line 2782 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2772 "regex.h2"
+#line 2791 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2780 "regex.h2"
+#line 2799 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2790 "regex.h2"
+#line 2809 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1753,61 +1741,61 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2800 "regex.h2"
+#line 2819 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2812 "regex.h2"
+#line 2831 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2815 "regex.h2"
+#line 2834 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2825 "regex.h2"
+#line 2844 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2843 "regex.h2"
+#line 2862 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2853 "regex.h2"
+#line 2872 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2866 "regex.h2"
+#line 2885 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2902 "regex.h2"
+#line 2921 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2981 "regex.h2"
+#line 2989 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2988 "regex.h2"
+#line 2996 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 3003 "regex.h2"
+#line 3011 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3025 "regex.h2"
+#line 3033 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3057 "regex.h2"
+#line 3065 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3066 "regex.h2"
+#line 3074 "regex.h2"
 }
 }
 
@@ -2665,6 +2653,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = line_end_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = line_start_token_parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = named_class_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = word_boundary_token_parse((*this)); }
@@ -2682,10 +2671,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 842 "regex.h2"
+#line 843 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 851 "regex.h2"
+#line 852 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2693,27 +2682,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 858 "regex.h2"
+#line 859 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 875 "regex.h2"
+#line 876 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 880 "regex.h2"
+#line 881 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 885 "regex.h2"
+#line 886 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2721,14 +2710,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 892 "regex.h2"
+#line 893 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 898 "regex.h2"
+#line 899 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2737,7 +2726,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 906 "regex.h2"
+#line 907 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2759,22 +2748,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 928 "regex.h2"
+#line 929 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 932 "regex.h2"
+#line 933 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 936 "regex.h2"
+#line 937 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 940 "regex.h2"
+#line 941 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2784,14 +2773,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 949 "regex.h2"
+#line 950 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 955 "regex.h2"
+#line 956 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2804,38 +2793,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 967 "regex.h2"
+#line 968 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 971 "regex.h2"
+#line 972 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 975 "regex.h2"
+#line 976 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 981 "regex.h2"
+#line 982 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 987 "regex.h2"
+#line 988 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 993 "regex.h2"
+#line 994 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2844,7 +2833,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1001 "regex.h2"
+#line 1002 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2853,22 +2842,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1015 "regex.h2"
+#line 1016 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1018 "regex.h2"
+#line 1019 "regex.h2"
     }
 
-#line 1020 "regex.h2"
+#line 1021 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1026 "regex.h2"
+#line 1027 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2879,7 +2868,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1036 "regex.h2"
+#line 1037 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2890,59 +2879,59 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1049 "regex.h2"
+#line 1050 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1051 "regex.h2"
+#line 1052 "regex.h2"
     }
 
-#line 1053 "regex.h2"
+#line 1054 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1055 "regex.h2"
+#line 1056 "regex.h2"
     }
 
-#line 1057 "regex.h2"
+#line 1058 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1065 "regex.h2"
+#line 1066 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1068 "regex.h2"
+#line 1069 "regex.h2"
     }
 
-#line 1070 "regex.h2"
+#line 1071 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1079 "regex.h2"
+#line 1080 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1081 "regex.h2"
+#line 1082 "regex.h2"
     }
 
-#line 1083 "regex.h2"
+#line 1084 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1095 "regex.h2"
+#line 1096 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1097 "regex.h2"
+#line 1098 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2951,22 +2940,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1105 "regex.h2"
+#line 1106 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1116 "regex.h2"
+#line 1117 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1119 "regex.h2"
+#line 1120 "regex.h2"
     }
 
-#line 1121 "regex.h2"
+#line 1122 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2981,7 +2970,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1135 "regex.h2"
+#line 1136 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2993,7 +2982,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1146 "regex.h2"
+#line 1147 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -3008,11 +2997,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1161 "regex.h2"
+#line 1162 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1164 "regex.h2"
+#line 1165 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3031,25 +3020,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1188 "regex.h2"
+#line 1189 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1190 "regex.h2"
+#line 1191 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1196 "regex.h2"
+#line 1197 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1201 "regex.h2"
+#line 1202 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3061,20 +3050,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1217 "regex.h2"
+#line 1218 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1220 "regex.h2"
+#line 1221 "regex.h2"
     }
 
-#line 1222 "regex.h2"
+#line 1223 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1226 "regex.h2"
+#line 1227 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3083,7 +3072,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1233 "regex.h2"
+#line 1234 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3105,16 +3094,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1262 "regex.h2"
+#line 1263 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1266 "regex.h2"
+#line 1267 "regex.h2"
     }
 
-#line 1269 "regex.h2"
+#line 1270 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3221,12 +3210,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1375 "regex.h2"
+#line 1376 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1380 "regex.h2"
+#line 1381 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3236,7 +3225,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1390 "regex.h2"
+#line 1391 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3258,7 +3247,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1411 "regex.h2"
+#line 1412 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3271,11 +3260,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1436 "regex.h2"
+#line 1437 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1440 "regex.h2"
+#line 1441 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3295,35 +3284,35 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1464 "regex.h2"
+#line 1465 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1467 "regex.h2"
+#line 1468 "regex.h2"
     }
 
-#line 1469 "regex.h2"
+#line 1470 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1473 "regex.h2"
+#line 1474 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1489 "regex.h2"
+#line 1490 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1492 "regex.h2"
+#line 1493 "regex.h2"
     }
 
-#line 1494 "regex.h2"
+#line 1495 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3416,14 +3405,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1586 "regex.h2"
+#line 1587 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1591 "regex.h2"
+#line 1592 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3449,7 +3438,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1623 "regex.h2"
+#line 1624 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3573,7 +3562,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1746 "regex.h2"
+#line 1747 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3591,7 +3580,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1763 "regex.h2"
+#line 1764 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3616,7 +3605,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1787 "regex.h2"
+#line 1788 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
         if (-1 != number) {
@@ -3627,15 +3616,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1801 "regex.h2"
+#line 1802 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1804 "regex.h2"
+#line 1805 "regex.h2"
     }
 
-#line 1806 "regex.h2"
+#line 1807 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3643,7 +3632,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1814 "regex.h2"
+#line 1815 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3653,12 +3642,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1826 "regex.h2"
+#line 1827 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1833 "regex.h2"
+#line 1834 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3675,7 +3664,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1849 "regex.h2"
+#line 1850 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3688,7 +3677,7 @@ template [[
     }}
 }
 
-#line 1863 "regex.h2"
+#line 1864 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3701,17 +3690,42 @@ template [[
     }
 }
 
-#line 1875 "regex.h2"
+#line 1876 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1890 "regex.h2"
+#line 1884 "regex.h2"
+[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
+    if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+
+    auto name {""}; 
+    auto c_next {CPP2_UFCS(peek)(ctx)}; 
+
+    if ('d' == c_next) {name = "named_class_digits"; }
+    else {if ('D' == c_next) {name = "named_class_not_digits"; }
+    else {if ('h' == c_next) {name = "named_class_hor_space"; }
+    else {if ('H' == c_next) {name = "named_class_not_hor_space"; }
+    else {if ('N' == c_next) {name = "named_class_no_new_line"; }
+    else {if ('s' == c_next) {name = "named_class_space"; }
+    else {if ('S' == c_next) {name = "named_class_not_space"; }
+    else {if ('v' == c_next) {name = "named_class_ver_space"; }
+    else {if ('V' == c_next) {name = "named_class_not_ver_space"; }
+    else {if ('w' == c_next) {name = "named_class_word"; }
+    else {if ('W' == std::move(c_next)) {name = "named_class_not_word"; }
+    else {return nullptr; }}}}}}}}}}}
+
+    static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
+}
+
+#line 1931 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1892 "regex.h2"
+#line 1933 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3755,7 +3769,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 1936 "regex.h2"
+#line 1977 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3782,7 +3796,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 1962 "regex.h2"
+#line 2003 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3794,7 +3808,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1973 "regex.h2"
+#line 2014 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3807,7 +3821,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 1985 "regex.h2"
+#line 2026 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3832,7 +3846,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2009 "regex.h2"
+#line 2050 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3841,12 +3855,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2017 "regex.h2"
+#line 2058 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 2022 "regex.h2"
+#line 2063 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3859,26 +3873,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2034 "regex.h2"
+#line 2075 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2039 "regex.h2"
+#line 2080 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2044 "regex.h2"
+#line 2085 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2050 "regex.h2"
+#line 2091 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3894,7 +3908,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2065 "regex.h2"
+#line 2106 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3923,7 +3937,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2093 "regex.h2"
+#line 2134 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3948,7 +3962,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2117 "regex.h2"
+#line 2158 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3974,7 +3988,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2148 "regex.h2"
+#line 2189 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3997,7 +4011,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2171 "regex.h2"
+#line 2212 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -4007,7 +4021,7 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2183 "regex.h2"
+#line 2224 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -4024,7 +4038,7 @@ template [[nodiscard]] auto line_start_toke
     }}
 }
 
-#line 2199 "regex.h2"
+#line 2240 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -4050,14 +4064,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2236 "regex.h2"
+#line 2277 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2237 "regex.h2"
+#line 2278 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2238 "regex.h2"
+#line 2279 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2245 "regex.h2"
+#line 2286 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4077,12 +4091,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2264 "regex.h2"
+#line 2305 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2265 "regex.h2"
+#line 2306 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2273 "regex.h2"
+#line 2314 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4102,7 +4116,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2292 "regex.h2"
+#line 2333 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4115,10 +4129,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2304 "regex.h2"
+#line 2345 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2306 "regex.h2"
+#line 2347 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4130,18 +4144,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2321 "regex.h2"
+#line 2362 "regex.h2"
     template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         CPP2_UFCS(set_group_start)(ctx, 0, cur);
         return Other::match(cur, ctx, modifiers, end_func); 
     }
 
-#line 2326 "regex.h2"
+#line 2367 "regex.h2"
     template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2327 "regex.h2"
+#line 2368 "regex.h2"
     template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
 
-#line 2334 "regex.h2"
+#line 2375 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -4157,12 +4171,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2349 "regex.h2"
+#line 2390 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2350 "regex.h2"
+#line 2391 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 2386 "regex.h2"
+#line 2405 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -4172,34 +4186,34 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2397 "regex.h2"
+#line 2416 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2411 "regex.h2"
+#line 2430 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2414 "regex.h2"
+#line 2433 "regex.h2"
         }
 
-#line 2416 "regex.h2"
+#line 2435 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2417 "regex.h2"
+#line 2436 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2418 "regex.h2"
+#line 2437 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2419 "regex.h2"
+#line 2438 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2421 "regex.h2"
+#line 2440 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2422 "regex.h2"
+#line 2441 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2423 "regex.h2"
+#line 2442 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2425 "regex.h2"
+#line 2444 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -4208,13 +4222,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2434 "regex.h2"
+#line 2453 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2435 "regex.h2"
+#line 2454 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2436 "regex.h2"
+#line 2455 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2437 "regex.h2"
+#line 2456 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4222,13 +4236,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2444 "regex.h2"
+#line 2463 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2445 "regex.h2"
+#line 2464 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2446 "regex.h2"
+#line 2465 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2447 "regex.h2"
+#line 2466 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4248,10 +4262,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2466 "regex.h2"
+#line 2485 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2471 "regex.h2"
+#line 2490 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4261,31 +4275,31 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2492 "regex.h2"
+#line 2511 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2495 "regex.h2"
+#line 2514 "regex.h2"
         }
 
-#line 2497 "regex.h2"
+#line 2516 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2498 "regex.h2"
+#line 2517 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2499 "regex.h2"
+#line 2518 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2500 "regex.h2"
+#line 2519 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2502 "regex.h2"
+#line 2521 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2503 "regex.h2"
+#line 2522 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2504 "regex.h2"
+#line 2523 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2506 "regex.h2"
+#line 2525 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4294,13 +4308,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2515 "regex.h2"
+#line 2534 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2516 "regex.h2"
+#line 2535 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2517 "regex.h2"
+#line 2536 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2518 "regex.h2"
+#line 2537 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4308,13 +4322,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2525 "regex.h2"
+#line 2544 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2526 "regex.h2"
+#line 2545 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2527 "regex.h2"
+#line 2546 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2528 "regex.h2"
+#line 2547 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4334,10 +4348,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2547 "regex.h2"
+#line 2566 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2552 "regex.h2"
+#line 2571 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4347,24 +4361,24 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2588 "regex.h2"
+#line 2607 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2594 "regex.h2"
+#line 2613 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2600 "regex.h2"
+#line 2619 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2602 "regex.h2"
+#line 2621 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4372,10 +4386,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         static_cast(std::move(last));
     }
 
-#line 2609 "regex.h2"
+#line 2628 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2619 "regex.h2"
+#line 2638 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4384,29 +4398,29 @@ template [[nodiscard]] auto word_boundary_token_mat
         return g; 
     }
 
-#line 2627 "regex.h2"
+#line 2646 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2632 "regex.h2"
+#line 2651 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2657 "regex.h2"
+#line 2676 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2661 "regex.h2"
+#line 2680 "regex.h2"
     }
 
-#line 2665 "regex.h2"
+#line 2684 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4414,12 +4428,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2672 "regex.h2"
+#line 2691 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2679 "regex.h2"
+#line 2698 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4432,14 +4446,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2691 "regex.h2"
+#line 2710 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2700 "regex.h2"
+#line 2719 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4478,7 +4492,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return cur; 
     }
 
-#line 2738 "regex.h2"
+#line 2757 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4491,14 +4505,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2750 "regex.h2"
+#line 2769 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2751 "regex.h2"
+#line 2770 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2752 "regex.h2"
+#line 2771 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2756 "regex.h2"
+#line 2775 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4506,7 +4520,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2763 "regex.h2"
+#line 2782 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4516,7 +4530,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2772 "regex.h2"
+#line 2791 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4525,7 +4539,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2780 "regex.h2"
+#line 2799 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4536,18 +4550,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2790 "regex.h2"
+#line 2809 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2791 "regex.h2"
+#line 2810 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2795 "regex.h2"
+#line 2814 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2800 "regex.h2"
+#line 2819 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4560,10 +4574,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2812 "regex.h2"
+#line 2831 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2818 "regex.h2"
+#line 2837 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4571,10 +4585,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2825 "regex.h2"
+#line 2844 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2827 "regex.h2"
+#line 2846 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4591,7 +4605,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2843 "regex.h2"
+#line 2862 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4602,7 +4616,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2855 "regex.h2"
+#line 2874 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4614,7 +4628,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2866 "regex.h2"
+#line 2885 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4651,14 +4665,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2905 "regex.h2"
+#line 2924 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
         auto c_next {'\0'}; 
         if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
 
-#line 2912 "regex.h2"
+#line 2931 "regex.h2"
         if ('K' == c_next) {
             CPP2_UFCS(add)(cur_group_state, create_matcher("global_group_reset", ""));
         }
@@ -4709,26 +4723,15 @@ template [[nodiscard]] auto word_boundary_token_mat
             auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
             CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
         }
-        else {if ('d' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_digits", "")); }
-        else {if ('D' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_digits", "")); }
-        else {if ('h' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_hor_space", "")); }
-        else {if ('H' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_hor_space", "")); }
-        else {if ('N' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_no_new_line", "")); }
-        else {if ('s' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_space", "")); }
-        else {if ('S' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_space", "")); }
-        else {if ('v' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_ver_space", "")); }
-        else {if ('V' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_ver_space", "")); }
-        else {if ('w' == c_next) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_word", "")); }
-        else {if ('W' == std::move(c_next)) {CPP2_UFCS(add)(cur_group_state, create_matcher("named_class_not_word", "")); }
         else {
             error("Unknown escape.");
             return false; 
-        }}}}}}}}}}}}}}
+        }}}
 
         return true; 
     }
 
-#line 2981 "regex.h2"
+#line 2989 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4736,7 +4739,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2988 "regex.h2"
+#line 2996 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4752,7 +4755,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 3003 "regex.h2"
+#line 3011 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4775,7 +4778,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return res; 
     }
 
-#line 3025 "regex.h2"
+#line 3033 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4809,7 +4812,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 3059 "regex.h2"
+#line 3067 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 0019107697..2bee64ae3d 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -822,6 +822,7 @@ parse_context: type = {
             if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = line_end_token_parse(this); }
             if !cur_token && valid() { cur_token = line_start_token_parse(this); }
+            if !cur_token && valid() { cur_token = named_class_token_parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
             if !cur_token && valid() { cur_token = word_boundary_token_parse(this); }
@@ -1877,6 +1878,46 @@ line_start_token_matcher:  (cur, inout ctx, modifie
            (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n'); // Start of new line
 }
 
+// Named character classes
+//
+
+named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if ctx.current() != '\\' { return nullptr; }
+
+    name := "";
+    c_next := ctx.peek();
+
+    if 'd' == c_next { name = "named_class_digits"; }
+    else if 'D' == c_next { name = "named_class_not_digits"; }
+    else if 'h' == c_next { name = "named_class_hor_space"; }
+    else if 'H' == c_next { name = "named_class_not_hor_space"; }
+    else if 'N' == c_next { name = "named_class_no_new_line"; }
+    else if 's' == c_next { name = "named_class_space"; }
+    else if 'S' == c_next { name = "named_class_not_space"; }
+    else if 'v' == c_next { name = "named_class_ver_space"; }
+    else if 'V' == c_next { name = "named_class_not_ver_space"; }
+    else if 'w' == c_next { name = "named_class_word"; }
+    else if 'W' == c_next { name = "named_class_not_word"; }
+    else { return nullptr; }
+
+    _ = ctx.next(); // Skip escape
+
+    return shared.new("\\\\(ctx.current())$", "(name)$::match");
+}
+
+named_class_no_new_line:  type == class_token_matcher>;
+named_class_digits     :  type == class_token_matcher>;
+named_class_hor_space  :  type == class_token_matcher>;
+named_class_space      :  type == class_token_matcher>;
+named_class_ver_space  :  type == class_token_matcher>;
+named_class_word       :  type == class_token_matcher>;
+
+named_class_not_digits    :  type == class_token_matcher>;
+named_class_not_hor_space :  type == class_token_matcher>;
+named_class_not_space     :  type == class_token_matcher>;
+named_class_not_ver_space :  type == class_token_matcher>;
+named_class_not_word      :  type == class_token_matcher>;
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 range_token: @polymorphic_base type = {
@@ -2350,28 +2391,6 @@ lookahead_matcher_logic:  ty
     to_string:    ()          "((name.data())$(Pattern::to_string())$)";
 }
 
-// Named character classes
-//
-
-named_class_matcher_logic:  type =  {
-    this: special_syntax_wrapper> = ();
-}
-
-named_class_no_new_line:  type == named_class_matcher_logic>; // TODO: Remove second \, switch to raw strings.
-named_class_digits     :  type == named_class_matcher_logic>;
-named_class_hor_space  :  type == named_class_matcher_logic>;
-named_class_space      :  type == named_class_matcher_logic>;
-named_class_ver_space  :  type == named_class_matcher_logic>;
-named_class_word       :  type == named_class_matcher_logic>;
-
-
-named_class_not_digits    :  type == named_class_matcher_logic>;
-named_class_not_hor_space :  type == named_class_matcher_logic>;
-named_class_not_space     :  type == named_class_matcher_logic>;
-named_class_not_ver_space :  type == named_class_matcher_logic>;
-named_class_not_word      :  type == named_class_matcher_logic>;
-
-
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -2959,17 +2978,6 @@ regex_parser:  type = {
             char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
             cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
         }
-        else if 'd' == c_next { cur_group_state.add(create_matcher("named_class_digits", "")); }
-        else if 'D' == c_next { cur_group_state.add(create_matcher("named_class_not_digits", "")); }
-        else if 'h' == c_next { cur_group_state.add(create_matcher("named_class_hor_space", "")); }
-        else if 'H' == c_next { cur_group_state.add(create_matcher("named_class_not_hor_space", "")); }
-        else if 'N' == c_next { cur_group_state.add(create_matcher("named_class_no_new_line", "")); }
-        else if 's' == c_next { cur_group_state.add(create_matcher("named_class_space", "")); }
-        else if 'S' == c_next { cur_group_state.add(create_matcher("named_class_not_space", "")); }
-        else if 'v' == c_next { cur_group_state.add(create_matcher("named_class_ver_space", "")); }
-        else if 'V' == c_next { cur_group_state.add(create_matcher("named_class_not_ver_space", "")); }
-        else if 'w' == c_next { cur_group_state.add(create_matcher("named_class_word", "")); }
-        else if 'W' == c_next { cur_group_state.add(create_matcher("named_class_not_word", "")); }
         else {
             error("Unknown escape.");
             return false;

From e0382ef713a171da199719207ed2371d4e122fd6 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 13 May 2024 13:09:22 +0200
Subject: [PATCH 117/161] Added \K token.

---
 include/cpp2regex.h | 900 ++++++++++++++++++++++----------------------
 source/regex.h2     |  42 ++-
 2 files changed, 485 insertions(+), 457 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 819ab89716..96667374c6 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,133 +106,133 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 848 "regex.h2"
+#line 849 "regex.h2"
 class generation_function_context;
     
 
-#line 864 "regex.h2"
+#line 865 "regex.h2"
 class generation_context;
 
-#line 1011 "regex.h2"
+#line 1012 "regex.h2"
 class regex_token_list;
     
 
-#line 1047 "regex.h2"
+#line 1048 "regex.h2"
 class regex_token_base;
     
 
-#line 1061 "regex.h2"
+#line 1062 "regex.h2"
 class regex_token_check;
     
 
 #line 1077 "regex.h2"
-class regex_token_empty;
+class regex_token_code;
     
 
 #line 1093 "regex.h2"
+class regex_token_empty;
+    
+
+#line 1109 "regex.h2"
 class alternative_token;
     
 
-#line 1111 "regex.h2"
+#line 1127 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1160 "regex.h2"
+#line 1176 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1186 "regex.h2"
+#line 1202 "regex.h2"
 class any_token;
     
 
-#line 1213 "regex.h2"
+#line 1229 "regex.h2"
 class char_token;
     
 
-#line 1257 "regex.h2"
+#line 1273 "regex.h2"
 class class_token;
     
 
-#line 1389 "regex.h2"
+#line 1405 "regex.h2"
 template class class_token_matcher;
 
-#line 1460 "regex.h2"
+#line 1476 "regex.h2"
 class escaped_char_token;
     
 
-#line 1485 "regex.h2"
+#line 1510 "regex.h2"
 class group_ref_token;
     
 
-#line 1617 "regex.h2"
+#line 1642 "regex.h2"
 class group_token;
     
 
-#line 1797 "regex.h2"
+#line 1822 "regex.h2"
 class modifier_token;
     
 
-#line 1813 "regex.h2"
+#line 1838 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1825 "regex.h2"
+#line 1850 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1923 "regex.h2"
+#line 1948 "regex.h2"
 class range_token;
     
 
-#line 2061 "regex.h2"
+#line 2086 "regex.h2"
 template class range_token_matcher;
 
-#line 2186 "regex.h2"
+#line 2211 "regex.h2"
 class special_range_token;
     
 
-#line 2276 "regex.h2"
+#line 2301 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2284 "regex.h2"
+#line 2309 "regex.h2"
 template class char_matcher_logic;
 
-#line 2312 "regex.h2"
+#line 2337 "regex.h2"
 template class class_matcher_logic;
 
-#line 2361 "regex.h2"
-template class global_group_reset;
-    
-
-#line 2373 "regex.h2"
+#line 2386 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 2403 "regex.h2"
+#line 2416 "regex.h2"
 template class group_name_list;
 
-#line 2415 "regex.h2"
+#line 2428 "regex.h2"
 class group_name_list_end;
     
 
-#line 2420 "regex.h2"
+#line 2433 "regex.h2"
 template class regular_expression;
 
-#line 2501 "regex.h2"
+#line 2514 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2590 "regex.h2"
+#line 2603 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2597 "regex.h2"
+#line 2610 "regex.h2"
 class regex_parser_group_state;
 
-#line 2632 "regex.h2"
+#line 2645 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2659 "regex.h2"
+#line 2672 "regex.h2"
 template class regex_parser;
 
-#line 3074 "regex.h2"
+#line 3084 "regex.h2"
 }
 }
 
@@ -795,13 +795,13 @@ class parse_context {
 #line 809 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 843 "regex.h2"
+#line 844 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 846 "regex.h2"
+#line 847 "regex.h2"
 };
 
 class generation_function_context {
@@ -810,10 +810,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 859 "regex.h2"
+#line 860 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 862 "regex.h2"
+#line 863 "regex.h2"
 };
 
 class generation_context {
@@ -830,81 +830,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 881 "regex.h2"
+#line 882 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 886 "regex.h2"
+#line 887 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 893 "regex.h2"
+#line 894 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 899 "regex.h2"
+#line 900 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 907 "regex.h2"
+#line 908 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 929 "regex.h2"
+#line 930 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 933 "regex.h2"
+#line 934 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 937 "regex.h2"
+#line 938 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 941 "regex.h2"
+#line 942 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 950 "regex.h2"
+#line 951 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 956 "regex.h2"
+#line 957 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 968 "regex.h2"
+#line 969 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 972 "regex.h2"
+#line 973 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 976 "regex.h2"
+#line 977 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 982 "regex.h2"
+#line 983 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 988 "regex.h2"
+#line 989 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 994 "regex.h2"
+#line 995 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1002 "regex.h2"
+#line 1003 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1009 "regex.h2"
+#line 1010 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1014 "regex.h2"
+#line 1015 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1021 "regex.h2"
+#line 1022 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1027 "regex.h2"
+#line 1028 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 1037 "regex.h2"
+#line 1038 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -912,36 +912,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1044 "regex.h2"
+#line 1045 "regex.h2"
 };
 
-#line 1047 "regex.h2"
+#line 1048 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1050 "regex.h2"
+#line 1051 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1054 "regex.h2"
+#line 1055 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1058 "regex.h2"
+#line 1059 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1059 "regex.h2"
+#line 1060 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1064 "regex.h2"
+#line 1065 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1071 "regex.h2"
+#line 1072 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -949,16 +949,34 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1074 "regex.h2"
+#line 1075 "regex.h2"
 };
 
-#line 1077 "regex.h2"
-class regex_token_empty: public regex_token_base {
+class regex_token_code: public regex_token_base {
 
 #line 1080 "regex.h2"
+    private: std::string code; 
+
+    public: explicit regex_token_code(cpp2::in str, cpp2::in code_);
+
+#line 1087 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~regex_token_code() noexcept;
+
+    public: regex_token_code(regex_token_code const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_code const&) -> void = delete;
+
+
+#line 1090 "regex.h2"
+};
+
+#line 1093 "regex.h2"
+class regex_token_empty: public regex_token_base {
+
+#line 1096 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1084 "regex.h2"
+#line 1100 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -966,7 +984,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1087 "regex.h2"
+#line 1103 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -975,12 +993,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1096 "regex.h2"
+#line 1112 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1106 "regex.h2"
+#line 1122 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -988,23 +1006,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1109 "regex.h2"
+#line 1125 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1115 "regex.h2"
+#line 1131 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1122 "regex.h2"
+#line 1138 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1136 "regex.h2"
+#line 1152 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 1147 "regex.h2"
+#line 1163 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1012,33 +1030,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1158 "regex.h2"
+#line 1174 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1165 "regex.h2"
+#line 1181 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1182 "regex.h2"
+#line 1198 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1189 "regex.h2"
+#line 1205 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1197 "regex.h2"
+#line 1213 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1046,23 +1064,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1200 "regex.h2"
+#line 1216 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1213 "regex.h2"
+#line 1229 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1216 "regex.h2"
+#line 1232 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1223 "regex.h2"
+#line 1239 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1227 "regex.h2"
+#line 1243 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1070,30 +1088,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1232 "regex.h2"
+#line 1248 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1255 "regex.h2"
+#line 1271 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1260 "regex.h2"
+#line 1276 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1269 "regex.h2"
+#line 1285 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1376 "regex.h2"
+#line 1392 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1381 "regex.h2"
+#line 1397 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1101,21 +1119,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1387 "regex.h2"
+#line 1403 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1412 "regex.h2"
+#line 1428 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1424 "regex.h2"
+#line 1440 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1127,23 +1145,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1435 "regex.h2"
+#line 1451 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1460 "regex.h2"
+#line 1476 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1463 "regex.h2"
+#line 1479 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1470 "regex.h2"
+#line 1486 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1474 "regex.h2"
+#line 1490 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1151,9 +1169,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1477 "regex.h2"
+#line 1493 "regex.h2"
 };
 
+// Regex syntax: \K Example: ab\Kcd
+//
+[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 1504 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1162,15 +1185,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1488 "regex.h2"
+#line 1513 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1495 "regex.h2"
+#line 1520 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1587 "regex.h2"
+#line 1612 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1178,28 +1201,28 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1590 "regex.h2"
+#line 1615 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1617 "regex.h2"
+#line 1642 "regex.h2"
 class group_token: public regex_token {
 
-#line 1620 "regex.h2"
+#line 1645 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1747 "regex.h2"
+#line 1772 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1764 "regex.h2"
+#line 1789 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1788 "regex.h2"
+#line 1813 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1208,17 +1231,17 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1795 "regex.h2"
+#line 1820 "regex.h2"
 };
 
 class modifier_token: public regex_token_base {
 
-#line 1800 "regex.h2"
+#line 1825 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1807 "regex.h2"
+#line 1832 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1226,7 +1249,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1811 "regex.h2"
+#line 1836 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1237,7 +1260,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1823 "regex.h2"
+#line 1848 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1248,31 +1271,31 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1830 "regex.h2"
+#line 1855 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1850 "regex.h2"
+#line 1875 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1862 "regex.h2"
+#line 1887 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1876 "regex.h2"
+#line 1901 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1881 "regex.h2"
+#line 1906 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1908 "regex.h2"
+#line 1933 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1290,7 +1313,7 @@ template                     using named_class_not_word = class_
 //
 class range_token: public regex_token {
 
-#line 1926 "regex.h2"
+#line 1951 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1300,65 +1323,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2003 "regex.h2"
+#line 2028 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2014 "regex.h2"
+#line 2039 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2026 "regex.h2"
+#line 2051 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2050 "regex.h2"
+#line 2075 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2058 "regex.h2"
+#line 2083 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 2059 "regex.h2"
+#line 2084 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2075 "regex.h2"
+#line 2100 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2080 "regex.h2"
+#line 2105 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2085 "regex.h2"
+#line 2110 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2091 "regex.h2"
+#line 2116 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2106 "regex.h2"
+#line 2131 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2134 "regex.h2"
+#line 2159 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2158 "regex.h2"
+#line 2183 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2182 "regex.h2"
+#line 2207 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2189 "regex.h2"
+#line 2214 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1367,7 +1390,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2218 "regex.h2"
+#line 2243 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1376,10 +1399,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2240 "regex.h2"
+#line 2265 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2266 "regex.h2"
+#line 2291 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1387,7 +1410,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2274 "regex.h2"
+#line 2299 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1398,7 +1421,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2280 "regex.h2"
+#line 2305 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1407,27 +1430,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2305 "regex.h2"
+#line 2330 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2307 "regex.h2"
+#line 2332 "regex.h2"
 };
 
-#line 2310 "regex.h2"
+#line 2335 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2333 "regex.h2"
+#line 2358 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2345 "regex.h2"
+#line 2370 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1436,22 +1459,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2357 "regex.h2"
-};
-
-// Regex syntax: \K Example: \K
-//
-template class global_group_reset {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 2367 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: global_group_reset() = default;
-    public: global_group_reset(global_group_reset const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(global_group_reset const&) -> void = delete;
-
-#line 2369 "regex.h2"
+#line 2382 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1460,14 +1468,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2390 "regex.h2"
+#line 2403 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 2392 "regex.h2"
+#line 2405 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1487,7 +1495,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2413 "regex.h2"
+#line 2426 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1496,7 +1504,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2417 "regex.h2"
+#line 2430 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1512,7 +1520,7 @@ template matched_, context const& ctx_);
 
-#line 2435 "regex.h2"
+#line 2448 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1527,7 +1535,7 @@ template void = delete;
 
 
-#line 2451 "regex.h2"
+#line 2464 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1535,13 +1543,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2463 "regex.h2"
+#line 2476 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2485 "regex.h2"
+#line 2498 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1553,7 +1561,7 @@ template void = delete;
 
 
-#line 2498 "regex.h2"
+#line 2511 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1569,7 +1577,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2516 "regex.h2"
+#line 2529 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1584,7 +1592,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2532 "regex.h2"
+#line 2545 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1592,13 +1600,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2544 "regex.h2"
+#line 2557 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2566 "regex.h2"
+#line 2579 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1610,7 +1618,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2579 "regex.h2"
+#line 2592 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1641,15 +1649,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2613 "regex.h2"
+#line 2626 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2619 "regex.h2"
+#line 2632 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2628 "regex.h2"
+#line 2641 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1662,13 +1670,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2646 "regex.h2"
+#line 2659 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2651 "regex.h2"
+#line 2664 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2656 "regex.h2"
+#line 2669 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1687,53 +1695,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2676 "regex.h2"
+#line 2689 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2682 "regex.h2"
+#line 2695 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2691 "regex.h2"
+#line 2704 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2695 "regex.h2"
+#line 2708 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2710 "regex.h2"
+#line 2723 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2716 "regex.h2"
+#line 2729 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2757 "regex.h2"
+#line 2770 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2769 "regex.h2"
+#line 2782 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2775 "regex.h2"
+#line 2788 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2782 "regex.h2"
+#line 2795 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2791 "regex.h2"
+#line 2804 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2799 "regex.h2"
+#line 2812 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2809 "regex.h2"
+#line 2822 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1741,61 +1749,61 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2819 "regex.h2"
+#line 2832 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2831 "regex.h2"
+#line 2844 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2834 "regex.h2"
+#line 2847 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2844 "regex.h2"
+#line 2857 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2862 "regex.h2"
+#line 2875 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2872 "regex.h2"
+#line 2885 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2885 "regex.h2"
+#line 2898 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2921 "regex.h2"
+#line 2934 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2989 "regex.h2"
+#line 2999 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 2996 "regex.h2"
+#line 3006 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 3011 "regex.h2"
+#line 3021 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3033 "regex.h2"
+#line 3043 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3065 "regex.h2"
+#line 3075 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3074 "regex.h2"
+#line 3084 "regex.h2"
 }
 }
 
@@ -2649,6 +2657,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if (!(cur_token) && valid()) {cur_token = any_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = class_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = escape_token_parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = global_group_reset_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_ref_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = line_end_token_parse((*this)); }
@@ -2671,10 +2680,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 843 "regex.h2"
+#line 844 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 852 "regex.h2"
+#line 853 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2682,27 +2691,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 859 "regex.h2"
+#line 860 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 874 "regex.h2"
+#line 875 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 876 "regex.h2"
+#line 877 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 881 "regex.h2"
+#line 882 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 886 "regex.h2"
+#line 887 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2710,14 +2719,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 893 "regex.h2"
+#line 894 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 899 "regex.h2"
+#line 900 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2726,7 +2735,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 907 "regex.h2"
+#line 908 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2748,22 +2757,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 929 "regex.h2"
+#line 930 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 933 "regex.h2"
+#line 934 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 937 "regex.h2"
+#line 938 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 941 "regex.h2"
+#line 942 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2773,14 +2782,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 950 "regex.h2"
+#line 951 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 956 "regex.h2"
+#line 957 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2793,38 +2802,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 968 "regex.h2"
+#line 969 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 972 "regex.h2"
+#line 973 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 976 "regex.h2"
+#line 977 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 982 "regex.h2"
+#line 983 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 988 "regex.h2"
+#line 989 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 994 "regex.h2"
+#line 995 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2833,7 +2842,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1002 "regex.h2"
+#line 1003 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2842,22 +2851,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1016 "regex.h2"
+#line 1017 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1019 "regex.h2"
+#line 1020 "regex.h2"
     }
 
-#line 1021 "regex.h2"
+#line 1022 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1027 "regex.h2"
+#line 1028 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2868,7 +2877,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1037 "regex.h2"
+#line 1038 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2879,59 +2888,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1050 "regex.h2"
+#line 1051 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1052 "regex.h2"
+#line 1053 "regex.h2"
     }
 
-#line 1054 "regex.h2"
+#line 1055 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1056 "regex.h2"
+#line 1057 "regex.h2"
     }
 
-#line 1058 "regex.h2"
+#line 1059 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1066 "regex.h2"
+#line 1067 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1069 "regex.h2"
+#line 1070 "regex.h2"
     }
 
-#line 1071 "regex.h2"
+#line 1072 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1080 "regex.h2"
+#line 1082 "regex.h2"
+    regex_token_code::regex_token_code(cpp2::in str, cpp2::in code_)
+        : regex_token_base{ str }
+        , code{ code_ }{
+
+#line 1085 "regex.h2"
+    }
+
+#line 1087 "regex.h2"
+    auto regex_token_code::generate_code(generation_context& ctx) const -> void{
+        CPP2_UFCS(add)(ctx, code);
+    }
+
+    regex_token_code::~regex_token_code() noexcept{}
+
+#line 1096 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1082 "regex.h2"
+#line 1098 "regex.h2"
     }
 
-#line 1084 "regex.h2"
+#line 1100 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1096 "regex.h2"
+#line 1112 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1098 "regex.h2"
+#line 1114 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2940,22 +2964,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1106 "regex.h2"
+#line 1122 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1117 "regex.h2"
+#line 1133 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1120 "regex.h2"
+#line 1136 "regex.h2"
     }
 
-#line 1122 "regex.h2"
+#line 1138 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2970,7 +2994,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1136 "regex.h2"
+#line 1152 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -2982,7 +3006,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1147 "regex.h2"
+#line 1163 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2997,11 +3021,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1162 "regex.h2"
+#line 1178 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1165 "regex.h2"
+#line 1181 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3020,25 +3044,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1189 "regex.h2"
+#line 1205 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1191 "regex.h2"
+#line 1207 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1197 "regex.h2"
+#line 1213 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1202 "regex.h2"
+#line 1218 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3050,20 +3074,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1218 "regex.h2"
+#line 1234 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1221 "regex.h2"
+#line 1237 "regex.h2"
     }
 
-#line 1223 "regex.h2"
+#line 1239 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1227 "regex.h2"
+#line 1243 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3072,7 +3096,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1234 "regex.h2"
+#line 1250 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3094,16 +3118,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1263 "regex.h2"
+#line 1279 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1267 "regex.h2"
+#line 1283 "regex.h2"
     }
 
-#line 1270 "regex.h2"
+#line 1286 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3210,12 +3234,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1376 "regex.h2"
+#line 1392 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1381 "regex.h2"
+#line 1397 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3225,7 +3249,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1391 "regex.h2"
+#line 1407 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3247,7 +3271,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1412 "regex.h2"
+#line 1428 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3260,11 +3284,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1437 "regex.h2"
+#line 1453 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1441 "regex.h2"
+#line 1457 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3284,35 +3308,43 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1465 "regex.h2"
+#line 1481 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1468 "regex.h2"
+#line 1484 "regex.h2"
     }
 
-#line 1470 "regex.h2"
+#line 1486 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1474 "regex.h2"
+#line 1490 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1490 "regex.h2"
+#line 1497 "regex.h2"
+[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
+    if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
+
+    static_cast(CPP2_UFCS(next)(ctx));// Skip escape.
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
+}
+
+#line 1515 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1493 "regex.h2"
+#line 1518 "regex.h2"
     }
 
-#line 1495 "regex.h2"
+#line 1520 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3405,14 +3437,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1587 "regex.h2"
+#line 1612 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1592 "regex.h2"
+#line 1617 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3438,7 +3470,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1624 "regex.h2"
+#line 1649 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3562,7 +3594,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1747 "regex.h2"
+#line 1772 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3580,7 +3612,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1764 "regex.h2"
+#line 1789 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3605,7 +3637,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1788 "regex.h2"
+#line 1813 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
         if (-1 != number) {
@@ -3616,15 +3648,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1802 "regex.h2"
+#line 1827 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1805 "regex.h2"
+#line 1830 "regex.h2"
     }
 
-#line 1807 "regex.h2"
+#line 1832 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3632,7 +3664,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1815 "regex.h2"
+#line 1840 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3642,12 +3674,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1827 "regex.h2"
+#line 1852 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1834 "regex.h2"
+#line 1859 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3664,7 +3696,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1850 "regex.h2"
+#line 1875 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3677,7 +3709,7 @@ template [[
     }}
 }
 
-#line 1864 "regex.h2"
+#line 1889 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3690,13 +3722,13 @@ template [[
     }
 }
 
-#line 1876 "regex.h2"
+#line 1901 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1884 "regex.h2"
+#line 1909 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3721,11 +3753,11 @@ template [[nodiscard]] auto line_start_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
 }
 
-#line 1931 "regex.h2"
+#line 1956 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1933 "regex.h2"
+#line 1958 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3769,7 +3801,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 1977 "regex.h2"
+#line 2002 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3796,7 +3828,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 2003 "regex.h2"
+#line 2028 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3808,7 +3840,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2014 "regex.h2"
+#line 2039 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3821,7 +3853,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2026 "regex.h2"
+#line 2051 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3846,7 +3878,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2050 "regex.h2"
+#line 2075 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3855,12 +3887,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2058 "regex.h2"
+#line 2083 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 2063 "regex.h2"
+#line 2088 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3873,26 +3905,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2075 "regex.h2"
+#line 2100 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2080 "regex.h2"
+#line 2105 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2085 "regex.h2"
+#line 2110 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2091 "regex.h2"
+#line 2116 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3908,7 +3940,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2106 "regex.h2"
+#line 2131 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3937,7 +3969,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2134 "regex.h2"
+#line 2159 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3962,7 +3994,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2158 "regex.h2"
+#line 2183 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3988,7 +4020,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2189 "regex.h2"
+#line 2214 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -4011,7 +4043,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2212 "regex.h2"
+#line 2237 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -4021,7 +4053,7 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2224 "regex.h2"
+#line 2249 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -4038,7 +4070,7 @@ template [[nodiscard]] auto line_start_toke
     }}
 }
 
-#line 2240 "regex.h2"
+#line 2265 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -4064,14 +4096,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2277 "regex.h2"
+#line 2302 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2278 "regex.h2"
+#line 2303 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2279 "regex.h2"
+#line 2304 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2286 "regex.h2"
+#line 2311 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4091,12 +4123,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2305 "regex.h2"
+#line 2330 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2306 "regex.h2"
+#line 2331 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2314 "regex.h2"
+#line 2339 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4116,7 +4148,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2333 "regex.h2"
+#line 2358 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4129,10 +4161,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2345 "regex.h2"
+#line 2370 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2347 "regex.h2"
+#line 2372 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4144,18 +4176,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2362 "regex.h2"
-    template  template [[nodiscard]] auto global_group_reset::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        CPP2_UFCS(set_group_start)(ctx, 0, cur);
-        return Other::match(cur, ctx, modifiers, end_func); 
-    }
-
-#line 2367 "regex.h2"
-    template  auto global_group_reset::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2368 "regex.h2"
-    template  [[nodiscard]] auto global_group_reset::to_string() -> auto { return bstring("\\K"); }
-
-#line 2375 "regex.h2"
+#line 2388 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -4171,12 +4192,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2390 "regex.h2"
+#line 2403 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2391 "regex.h2"
+#line 2404 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 2405 "regex.h2"
+#line 2418 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -4186,34 +4207,34 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2416 "regex.h2"
+#line 2429 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2430 "regex.h2"
+#line 2443 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2433 "regex.h2"
+#line 2446 "regex.h2"
         }
 
-#line 2435 "regex.h2"
+#line 2448 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2436 "regex.h2"
+#line 2449 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2437 "regex.h2"
+#line 2450 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2438 "regex.h2"
+#line 2451 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2440 "regex.h2"
+#line 2453 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2441 "regex.h2"
+#line 2454 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2442 "regex.h2"
+#line 2455 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2444 "regex.h2"
+#line 2457 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -4222,13 +4243,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2453 "regex.h2"
+#line 2466 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2454 "regex.h2"
+#line 2467 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2455 "regex.h2"
+#line 2468 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2456 "regex.h2"
+#line 2469 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4236,13 +4257,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2463 "regex.h2"
+#line 2476 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2464 "regex.h2"
+#line 2477 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2465 "regex.h2"
+#line 2478 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2466 "regex.h2"
+#line 2479 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4262,10 +4283,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2485 "regex.h2"
+#line 2498 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2490 "regex.h2"
+#line 2503 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4275,31 +4296,31 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2511 "regex.h2"
+#line 2524 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2514 "regex.h2"
+#line 2527 "regex.h2"
         }
 
-#line 2516 "regex.h2"
+#line 2529 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2517 "regex.h2"
+#line 2530 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2518 "regex.h2"
+#line 2531 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2519 "regex.h2"
+#line 2532 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2521 "regex.h2"
+#line 2534 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2522 "regex.h2"
+#line 2535 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2523 "regex.h2"
+#line 2536 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2525 "regex.h2"
+#line 2538 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4308,13 +4329,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2534 "regex.h2"
+#line 2547 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2535 "regex.h2"
+#line 2548 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2536 "regex.h2"
+#line 2549 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2537 "regex.h2"
+#line 2550 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4322,13 +4343,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2544 "regex.h2"
+#line 2557 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2545 "regex.h2"
+#line 2558 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2546 "regex.h2"
+#line 2559 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2547 "regex.h2"
+#line 2560 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4348,10 +4369,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2566 "regex.h2"
+#line 2579 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2571 "regex.h2"
+#line 2584 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4361,24 +4382,24 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2607 "regex.h2"
+#line 2620 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2613 "regex.h2"
+#line 2626 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2619 "regex.h2"
+#line 2632 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2621 "regex.h2"
+#line 2634 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4386,10 +4407,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         static_cast(std::move(last));
     }
 
-#line 2628 "regex.h2"
+#line 2641 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2638 "regex.h2"
+#line 2651 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4398,29 +4419,29 @@ template [[nodiscard]] auto word_boundary_token_mat
         return g; 
     }
 
-#line 2646 "regex.h2"
+#line 2659 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2651 "regex.h2"
+#line 2664 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2676 "regex.h2"
+#line 2689 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2680 "regex.h2"
+#line 2693 "regex.h2"
     }
 
-#line 2684 "regex.h2"
+#line 2697 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4428,12 +4449,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2691 "regex.h2"
+#line 2704 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2698 "regex.h2"
+#line 2711 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4446,14 +4467,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2710 "regex.h2"
+#line 2723 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2719 "regex.h2"
+#line 2732 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4492,7 +4513,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return cur; 
     }
 
-#line 2757 "regex.h2"
+#line 2770 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4505,14 +4526,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2769 "regex.h2"
+#line 2782 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2770 "regex.h2"
+#line 2783 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2771 "regex.h2"
+#line 2784 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2775 "regex.h2"
+#line 2788 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4520,7 +4541,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2782 "regex.h2"
+#line 2795 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4530,7 +4551,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2791 "regex.h2"
+#line 2804 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4539,7 +4560,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2799 "regex.h2"
+#line 2812 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4550,18 +4571,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2809 "regex.h2"
+#line 2822 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2810 "regex.h2"
+#line 2823 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2814 "regex.h2"
+#line 2827 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2819 "regex.h2"
+#line 2832 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4574,10 +4595,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2831 "regex.h2"
+#line 2844 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2837 "regex.h2"
+#line 2850 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4585,10 +4606,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2844 "regex.h2"
+#line 2857 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2846 "regex.h2"
+#line 2859 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4605,7 +4626,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2862 "regex.h2"
+#line 2875 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4616,7 +4637,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2874 "regex.h2"
+#line 2887 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4628,7 +4649,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2885 "regex.h2"
+#line 2898 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4665,18 +4686,15 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2924 "regex.h2"
+#line 2937 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
         auto c_next {'\0'}; 
         if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
 
-#line 2931 "regex.h2"
-        if ('K' == c_next) {
-            CPP2_UFCS(add)(cur_group_state, create_matcher("global_group_reset", ""));
-        }
-        else {if ('x' == c_next) {
+#line 2944 "regex.h2"
+        if ('x' == c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("x escape without number."); return false; }
             auto has_brackets {false}; 
             std::string number_str {""}; 
@@ -4726,12 +4744,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         else {
             error("Unknown escape.");
             return false; 
-        }}}
+        }}
 
         return true; 
     }
 
-#line 2989 "regex.h2"
+#line 2999 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4739,7 +4757,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2996 "regex.h2"
+#line 3006 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4755,7 +4773,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 3011 "regex.h2"
+#line 3021 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4778,7 +4796,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return res; 
     }
 
-#line 3033 "regex.h2"
+#line 3043 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4812,7 +4830,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 3067 "regex.h2"
+#line 3077 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 2bee64ae3d..0a094900f1 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -818,6 +818,7 @@ parse_context: type = {
             if !cur_token && valid() { cur_token = any_token::parse(this); }
             if !cur_token && valid() { cur_token = class_token::parse(this); }
             if !cur_token && valid() { cur_token = escape_token_parse(this); }
+            if !cur_token && valid() { cur_token = global_group_reset_token_parse(this); }
             if !cur_token && valid() { cur_token = group_ref_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
             if !cur_token && valid() { cur_token = line_end_token_parse(this); }
@@ -1073,6 +1074,21 @@ regex_token_check: @polymorphic_base type = {
     }
 }
 
+regex_token_code: @polymorphic_base type = {
+    this: regex_token_base;
+
+    code: std::string;
+
+    operator=:(out this, str: std::string, code_: std::string) = {
+        regex_token_base = (str);
+        code = code_;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx.add(code);
+    }
+}
+
 
 regex_token_empty: @polymorphic_base type = {
     this: regex_token_base;
@@ -1476,6 +1492,15 @@ escaped_char_token: @polymorphic_base type = {
     }
 }
 
+// Regex syntax: \K Example: ab\Kcd
+//
+global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if !(ctx.current() == '\\' && ctx.peek() == 'K') { return nullptr; }
+
+    _ = ctx.next(); // Skip escape.
+    return shared.new("\\\\K", "ctx.set_group_start(0, r.pos);");
+}
+
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -2356,18 +2381,6 @@ class_matcher_logic:  type =
     }
 }
 
-// Regex syntax: \K Example: \K
-//
-global_group_reset:  type = {
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        ctx.set_group_start(0, cur);
-        return Other::match(cur, ctx, modifiers, end_func);
-    }
-
-    reset_ranges: (_) = {}
-    to_string:    ()  bstring("\\K");
-}
-
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 lookahead_matcher_logic:  type =
@@ -2928,10 +2941,7 @@ regex_parser:  type = {
         if !next(out c_next) { error("Escape without a following character."); return false; }
 
 
-        if 'K' == c_next {
-            cur_group_state.add(create_matcher("global_group_reset", ""));
-        }
-        else if 'x' == c_next {
+        if 'x' == c_next {
             if !next(out c_next) { error("x escape without number."); return false; }
             has_brackets := false;
             number_str: std::string = "";

From 1cb88835a9336bc22b01be544b3c981821d4fe7e Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 13 May 2024 14:25:43 +0200
Subject: [PATCH 118/161] Added hexadicimal token and octal token.

---
 include/cpp2regex.h | 908 ++++++++++++++++++++++++--------------------
 source/regex.h2     |  70 ++++
 2 files changed, 562 insertions(+), 416 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 96667374c6..796699d456 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -106,133 +106,133 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 849 "regex.h2"
+#line 851 "regex.h2"
 class generation_function_context;
     
 
-#line 865 "regex.h2"
+#line 867 "regex.h2"
 class generation_context;
 
-#line 1012 "regex.h2"
+#line 1014 "regex.h2"
 class regex_token_list;
     
 
-#line 1048 "regex.h2"
+#line 1050 "regex.h2"
 class regex_token_base;
     
 
-#line 1062 "regex.h2"
+#line 1064 "regex.h2"
 class regex_token_check;
     
 
-#line 1077 "regex.h2"
+#line 1079 "regex.h2"
 class regex_token_code;
     
 
-#line 1093 "regex.h2"
+#line 1095 "regex.h2"
 class regex_token_empty;
     
 
-#line 1109 "regex.h2"
+#line 1111 "regex.h2"
 class alternative_token;
     
 
-#line 1127 "regex.h2"
+#line 1129 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1176 "regex.h2"
+#line 1178 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1202 "regex.h2"
+#line 1204 "regex.h2"
 class any_token;
     
 
-#line 1229 "regex.h2"
+#line 1231 "regex.h2"
 class char_token;
     
 
-#line 1273 "regex.h2"
+#line 1275 "regex.h2"
 class class_token;
     
 
-#line 1405 "regex.h2"
+#line 1407 "regex.h2"
 template class class_token_matcher;
 
-#line 1476 "regex.h2"
+#line 1478 "regex.h2"
 class escaped_char_token;
     
 
-#line 1510 "regex.h2"
+#line 1512 "regex.h2"
 class group_ref_token;
     
 
-#line 1642 "regex.h2"
+#line 1644 "regex.h2"
 class group_token;
     
 
-#line 1822 "regex.h2"
+#line 1863 "regex.h2"
 class modifier_token;
     
 
-#line 1838 "regex.h2"
+#line 1879 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1850 "regex.h2"
+#line 1891 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1948 "regex.h2"
+#line 2016 "regex.h2"
 class range_token;
     
 
-#line 2086 "regex.h2"
+#line 2154 "regex.h2"
 template class range_token_matcher;
 
-#line 2211 "regex.h2"
+#line 2279 "regex.h2"
 class special_range_token;
     
 
-#line 2301 "regex.h2"
+#line 2369 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2309 "regex.h2"
+#line 2377 "regex.h2"
 template class char_matcher_logic;
 
-#line 2337 "regex.h2"
+#line 2405 "regex.h2"
 template class class_matcher_logic;
 
-#line 2386 "regex.h2"
+#line 2454 "regex.h2"
 template class lookahead_matcher_logic;
 
-#line 2416 "regex.h2"
+#line 2484 "regex.h2"
 template class group_name_list;
 
-#line 2428 "regex.h2"
+#line 2496 "regex.h2"
 class group_name_list_end;
     
 
-#line 2433 "regex.h2"
+#line 2501 "regex.h2"
 template class regular_expression;
 
-#line 2514 "regex.h2"
+#line 2582 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2603 "regex.h2"
+#line 2671 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2610 "regex.h2"
+#line 2678 "regex.h2"
 class regex_parser_group_state;
 
-#line 2645 "regex.h2"
+#line 2713 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2672 "regex.h2"
+#line 2740 "regex.h2"
 template class regex_parser;
 
-#line 3084 "regex.h2"
+#line 3152 "regex.h2"
 }
 }
 
@@ -795,13 +795,13 @@ class parse_context {
 #line 809 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 844 "regex.h2"
+#line 846 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 847 "regex.h2"
+#line 849 "regex.h2"
 };
 
 class generation_function_context {
@@ -810,10 +810,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 860 "regex.h2"
+#line 862 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 863 "regex.h2"
+#line 865 "regex.h2"
 };
 
 class generation_context {
@@ -830,81 +830,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 882 "regex.h2"
+#line 884 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 887 "regex.h2"
+#line 889 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 894 "regex.h2"
+#line 896 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 900 "regex.h2"
+#line 902 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 908 "regex.h2"
+#line 910 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 930 "regex.h2"
+#line 932 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 934 "regex.h2"
+#line 936 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 938 "regex.h2"
+#line 940 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 942 "regex.h2"
+#line 944 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 951 "regex.h2"
+#line 953 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 957 "regex.h2"
+#line 959 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 969 "regex.h2"
+#line 971 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 973 "regex.h2"
+#line 975 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 977 "regex.h2"
+#line 979 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 983 "regex.h2"
+#line 985 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 989 "regex.h2"
+#line 991 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 995 "regex.h2"
+#line 997 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1003 "regex.h2"
+#line 1005 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1010 "regex.h2"
+#line 1012 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1015 "regex.h2"
+#line 1017 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1022 "regex.h2"
+#line 1024 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1028 "regex.h2"
+#line 1030 "regex.h2"
     public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
 
-#line 1038 "regex.h2"
+#line 1040 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -912,36 +912,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1045 "regex.h2"
+#line 1047 "regex.h2"
 };
 
-#line 1048 "regex.h2"
+#line 1050 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1051 "regex.h2"
+#line 1053 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1055 "regex.h2"
+#line 1057 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1059 "regex.h2"
+#line 1061 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1060 "regex.h2"
+#line 1062 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1065 "regex.h2"
+#line 1067 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1072 "regex.h2"
+#line 1074 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -949,17 +949,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1075 "regex.h2"
+#line 1077 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1080 "regex.h2"
+#line 1082 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::in str, cpp2::in code_);
 
-#line 1087 "regex.h2"
+#line 1089 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -967,16 +967,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1090 "regex.h2"
+#line 1092 "regex.h2"
 };
 
-#line 1093 "regex.h2"
+#line 1095 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1096 "regex.h2"
+#line 1098 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1100 "regex.h2"
+#line 1102 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -984,7 +984,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1103 "regex.h2"
+#line 1105 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -993,12 +993,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1112 "regex.h2"
+#line 1114 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1122 "regex.h2"
+#line 1124 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -1006,23 +1006,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1125 "regex.h2"
+#line 1127 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1131 "regex.h2"
+#line 1133 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1138 "regex.h2"
+#line 1140 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1152 "regex.h2"
+#line 1154 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
 
-#line 1163 "regex.h2"
+#line 1165 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1030,33 +1030,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1174 "regex.h2"
+#line 1176 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1181 "regex.h2"
+#line 1183 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1198 "regex.h2"
+#line 1200 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1205 "regex.h2"
+#line 1207 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1213 "regex.h2"
+#line 1215 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1064,23 +1064,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1216 "regex.h2"
+#line 1218 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1229 "regex.h2"
+#line 1231 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1232 "regex.h2"
+#line 1234 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1239 "regex.h2"
+#line 1241 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1243 "regex.h2"
+#line 1245 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1088,30 +1088,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1248 "regex.h2"
+#line 1250 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1271 "regex.h2"
+#line 1273 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1276 "regex.h2"
+#line 1278 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1285 "regex.h2"
+#line 1287 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1392 "regex.h2"
+#line 1394 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1397 "regex.h2"
+#line 1399 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1119,21 +1119,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1403 "regex.h2"
+#line 1405 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1428 "regex.h2"
+#line 1430 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1440 "regex.h2"
+#line 1442 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1145,23 +1145,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1451 "regex.h2"
+#line 1453 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1476 "regex.h2"
+#line 1478 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1479 "regex.h2"
+#line 1481 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1486 "regex.h2"
+#line 1488 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1490 "regex.h2"
+#line 1492 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1169,14 +1169,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1493 "regex.h2"
+#line 1495 "regex.h2"
 };
 
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1504 "regex.h2"
+#line 1506 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1185,15 +1185,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1513 "regex.h2"
+#line 1515 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1520 "regex.h2"
+#line 1522 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1612 "regex.h2"
+#line 1614 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1201,28 +1201,28 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1615 "regex.h2"
+#line 1617 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1642 "regex.h2"
+#line 1644 "regex.h2"
 class group_token: public regex_token {
 
-#line 1645 "regex.h2"
+#line 1647 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1772 "regex.h2"
+#line 1774 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1789 "regex.h2"
+#line 1791 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1813 "regex.h2"
+#line 1815 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1231,17 +1231,20 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1820 "regex.h2"
+#line 1822 "regex.h2"
 };
 
+[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 1863 "regex.h2"
 class modifier_token: public regex_token_base {
 
-#line 1825 "regex.h2"
+#line 1866 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1832 "regex.h2"
+#line 1873 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1249,7 +1252,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1836 "regex.h2"
+#line 1877 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1260,7 +1263,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1848 "regex.h2"
+#line 1889 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1271,31 +1274,31 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1855 "regex.h2"
+#line 1896 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1875 "regex.h2"
+#line 1916 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1887 "regex.h2"
+#line 1928 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1901 "regex.h2"
+#line 1942 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1906 "regex.h2"
+#line 1947 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1933 "regex.h2"
+#line 1974 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1309,11 +1312,17 @@ template                     using named_class_not_space = class
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
+#line 1988 "regex.h2"
+// Regex syntax: \o{}  Example: \o{98}
+//
+[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
+
+#line 2014 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 1951 "regex.h2"
+#line 2019 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1323,65 +1332,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2028 "regex.h2"
+#line 2096 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2039 "regex.h2"
+#line 2107 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2051 "regex.h2"
+#line 2119 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2075 "regex.h2"
+#line 2143 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2083 "regex.h2"
+#line 2151 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 2084 "regex.h2"
+#line 2152 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2100 "regex.h2"
+#line 2168 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2105 "regex.h2"
+#line 2173 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2110 "regex.h2"
+#line 2178 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2116 "regex.h2"
+#line 2184 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2131 "regex.h2"
+#line 2199 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2159 "regex.h2"
+#line 2227 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2183 "regex.h2"
+#line 2251 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2207 "regex.h2"
+#line 2275 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2214 "regex.h2"
+#line 2282 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1390,7 +1399,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2243 "regex.h2"
+#line 2311 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1399,10 +1408,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2265 "regex.h2"
+#line 2333 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2291 "regex.h2"
+#line 2359 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1410,7 +1419,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2299 "regex.h2"
+#line 2367 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1421,7 +1430,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2305 "regex.h2"
+#line 2373 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1430,27 +1439,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2330 "regex.h2"
+#line 2398 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2332 "regex.h2"
+#line 2400 "regex.h2"
 };
 
-#line 2335 "regex.h2"
+#line 2403 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2358 "regex.h2"
+#line 2426 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2370 "regex.h2"
+#line 2438 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1459,7 +1468,7 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2382 "regex.h2"
+#line 2450 "regex.h2"
 };
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -1468,14 +1477,14 @@ template cla
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2403 "regex.h2"
+#line 2471 "regex.h2"
     public: static auto reset_ranges(auto& ctx) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: lookahead_matcher_logic() = default;
     public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
 
-#line 2405 "regex.h2"
+#line 2473 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1495,7 +1504,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2426 "regex.h2"
+#line 2494 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1504,7 +1513,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2430 "regex.h2"
+#line 2498 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1520,7 +1529,7 @@ template matched_, context const& ctx_);
 
-#line 2448 "regex.h2"
+#line 2516 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1535,7 +1544,7 @@ template void = delete;
 
 
-#line 2464 "regex.h2"
+#line 2532 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1543,13 +1552,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2476 "regex.h2"
+#line 2544 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2498 "regex.h2"
+#line 2566 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1561,7 +1570,7 @@ template void = delete;
 
 
-#line 2511 "regex.h2"
+#line 2579 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1577,7 +1586,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2529 "regex.h2"
+#line 2597 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1592,7 +1601,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2545 "regex.h2"
+#line 2613 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1600,13 +1609,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2557 "regex.h2"
+#line 2625 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2579 "regex.h2"
+#line 2647 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1618,7 +1627,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2592 "regex.h2"
+#line 2660 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1649,15 +1658,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2626 "regex.h2"
+#line 2694 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2632 "regex.h2"
+#line 2700 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2641 "regex.h2"
+#line 2709 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1670,13 +1679,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2659 "regex.h2"
+#line 2727 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2664 "regex.h2"
+#line 2732 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2669 "regex.h2"
+#line 2737 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1695,53 +1704,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2689 "regex.h2"
+#line 2757 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2695 "regex.h2"
+#line 2763 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2704 "regex.h2"
+#line 2772 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2708 "regex.h2"
+#line 2776 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2723 "regex.h2"
+#line 2791 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2729 "regex.h2"
+#line 2797 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2770 "regex.h2"
+#line 2838 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2782 "regex.h2"
+#line 2850 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2788 "regex.h2"
+#line 2856 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2795 "regex.h2"
+#line 2863 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2804 "regex.h2"
+#line 2872 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2812 "regex.h2"
+#line 2880 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2822 "regex.h2"
+#line 2890 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1749,61 +1758,61 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2832 "regex.h2"
+#line 2900 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2844 "regex.h2"
+#line 2912 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2847 "regex.h2"
+#line 2915 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2857 "regex.h2"
+#line 2925 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2875 "regex.h2"
+#line 2943 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2885 "regex.h2"
+#line 2953 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2898 "regex.h2"
+#line 2966 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 2934 "regex.h2"
+#line 3002 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
 
-#line 2999 "regex.h2"
+#line 3067 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 3006 "regex.h2"
+#line 3074 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 3021 "regex.h2"
+#line 3089 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3043 "regex.h2"
+#line 3111 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3075 "regex.h2"
+#line 3143 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3084 "regex.h2"
+#line 3152 "regex.h2"
 }
 }
 
@@ -2660,9 +2669,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if (!(cur_token) && valid()) {cur_token = global_group_reset_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_ref_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = group_token::parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = hexadecimal_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = line_end_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = line_start_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = named_class_token_parse((*this)); }
+            if (!(cur_token) && valid()) {cur_token = octal_token_parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = special_range_token::parse((*this)); }
             if (!(cur_token) && valid()) {cur_token = word_boundary_token_parse((*this)); }
@@ -2680,10 +2691,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 844 "regex.h2"
+#line 846 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 853 "regex.h2"
+#line 855 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2691,27 +2702,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 860 "regex.h2"
+#line 862 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 875 "regex.h2"
+#line 877 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 877 "regex.h2"
+#line 879 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 882 "regex.h2"
+#line 884 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 887 "regex.h2"
+#line 889 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2719,14 +2730,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 894 "regex.h2"
+#line 896 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 900 "regex.h2"
+#line 902 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2735,7 +2746,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 908 "regex.h2"
+#line 910 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2757,22 +2768,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 930 "regex.h2"
+#line 932 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 934 "regex.h2"
+#line 936 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 938 "regex.h2"
+#line 940 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 942 "regex.h2"
+#line 944 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2782,14 +2793,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 951 "regex.h2"
+#line 953 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 957 "regex.h2"
+#line 959 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2802,38 +2813,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 969 "regex.h2"
+#line 971 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 973 "regex.h2"
+#line 975 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 977 "regex.h2"
+#line 979 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 983 "regex.h2"
+#line 985 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 989 "regex.h2"
+#line 991 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 995 "regex.h2"
+#line 997 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2842,7 +2853,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1003 "regex.h2"
+#line 1005 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2851,22 +2862,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1017 "regex.h2"
+#line 1019 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1020 "regex.h2"
+#line 1022 "regex.h2"
     }
 
-#line 1022 "regex.h2"
+#line 1024 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1028 "regex.h2"
+#line 1030 "regex.h2"
     [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
         std::vector r {}; 
         for ( auto const& token : tokens ) {
@@ -2877,7 +2888,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1038 "regex.h2"
+#line 1040 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2888,74 +2899,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1051 "regex.h2"
+#line 1053 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1053 "regex.h2"
+#line 1055 "regex.h2"
     }
 
-#line 1055 "regex.h2"
+#line 1057 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1057 "regex.h2"
+#line 1059 "regex.h2"
     }
 
-#line 1059 "regex.h2"
+#line 1061 "regex.h2"
     [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1067 "regex.h2"
+#line 1069 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1070 "regex.h2"
+#line 1072 "regex.h2"
     }
 
-#line 1072 "regex.h2"
+#line 1074 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1082 "regex.h2"
+#line 1084 "regex.h2"
     regex_token_code::regex_token_code(cpp2::in str, cpp2::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1085 "regex.h2"
+#line 1087 "regex.h2"
     }
 
-#line 1087 "regex.h2"
+#line 1089 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add)(ctx, code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1096 "regex.h2"
+#line 1098 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1098 "regex.h2"
+#line 1100 "regex.h2"
     }
 
-#line 1100 "regex.h2"
+#line 1102 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1112 "regex.h2"
+#line 1114 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1114 "regex.h2"
+#line 1116 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2964,22 +2975,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1122 "regex.h2"
+#line 1124 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1133 "regex.h2"
+#line 1135 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1136 "regex.h2"
+#line 1138 "regex.h2"
     }
 
-#line 1138 "regex.h2"
+#line 1140 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2994,7 +3005,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1152 "regex.h2"
+#line 1154 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
         std::vector r {}; 
 
@@ -3006,7 +3017,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 1163 "regex.h2"
+#line 1165 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -3021,11 +3032,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1178 "regex.h2"
+#line 1180 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1181 "regex.h2"
+#line 1183 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3044,25 +3055,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1205 "regex.h2"
+#line 1207 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1207 "regex.h2"
+#line 1209 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1213 "regex.h2"
+#line 1215 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1218 "regex.h2"
+#line 1220 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3074,20 +3085,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1234 "regex.h2"
+#line 1236 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1237 "regex.h2"
+#line 1239 "regex.h2"
     }
 
-#line 1239 "regex.h2"
+#line 1241 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1243 "regex.h2"
+#line 1245 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3096,7 +3107,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1250 "regex.h2"
+#line 1252 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3118,16 +3129,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1279 "regex.h2"
+#line 1281 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1283 "regex.h2"
+#line 1285 "regex.h2"
     }
 
-#line 1286 "regex.h2"
+#line 1288 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3234,12 +3245,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1392 "regex.h2"
+#line 1394 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1397 "regex.h2"
+#line 1399 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3249,7 +3260,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1407 "regex.h2"
+#line 1409 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3271,7 +3282,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1428 "regex.h2"
+#line 1430 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3284,11 +3295,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1453 "regex.h2"
+#line 1455 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1457 "regex.h2"
+#line 1459 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3308,27 +3319,27 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1481 "regex.h2"
+#line 1483 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1484 "regex.h2"
+#line 1486 "regex.h2"
     }
 
-#line 1486 "regex.h2"
+#line 1488 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1490 "regex.h2"
+#line 1492 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1497 "regex.h2"
+#line 1499 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
 
@@ -3336,15 +3347,15 @@ template [[nodiscard]] auto char_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
 }
 
-#line 1515 "regex.h2"
+#line 1517 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1518 "regex.h2"
+#line 1520 "regex.h2"
     }
 
-#line 1520 "regex.h2"
+#line 1522 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3437,14 +3448,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1612 "regex.h2"
+#line 1614 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1617 "regex.h2"
+#line 1619 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3470,7 +3481,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1649 "regex.h2"
+#line 1651 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3594,7 +3605,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1772 "regex.h2"
+#line 1774 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3612,7 +3623,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1789 "regex.h2"
+#line 1791 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3637,7 +3648,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1813 "regex.h2"
+#line 1815 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
         if (-1 != number) {
@@ -3648,15 +3659,55 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1827 "regex.h2"
+#line 1824 "regex.h2"
+[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
+    if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
+
+    static_cast(CPP2_UFCS(next)(ctx));// Skip escape.
+
+    if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "x escape without number."); }
+
+    auto has_brackets {false}; 
+    std::string number_str {""}; 
+    if ('{' == CPP2_UFCS(current)(ctx)) {
+        // TODO: Currently does not work since the compiler handles \x also.
+        // Bracketed
+        has_brackets = true;
+        static_cast(CPP2_UFCS(next)(ctx));// Skip '{'
+        if (!(CPP2_UFCS(grab_until)(ctx, '}', cpp2::out(&number_str)))) {return CPP2_UFCS(error)(ctx, "No ending bracket for \\x"); }
+    }
+    else {
+        // grab two chars
+
+        if (!(CPP2_UFCS(grab_n)(ctx, 2, cpp2::out(&number_str)))) {return CPP2_UFCS(error)(ctx, "Missing hexadecimal digits after \\x."); }
+    }
+
+    auto number {0}; 
+    if (!(string_to_int(std::move(number_str), number, 16))) {return CPP2_UFCS(error)(ctx, "Could not convert hexadecimal to int."); }
+
+    // TODO: Change for unicode.
+    char number_as_char {unsafe_narrow(std::move(number))}; 
+
+    std::string syntax {int_to_string(cpp2::as_(number_as_char), 16)}; 
+    if (std::move(has_brackets)) {
+        syntax = { "{" + cpp2::to_string(syntax) + "}" };
+    }
+    syntax = { "\\\\x" + cpp2::to_string(syntax) };
+
+    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(number_as_char))}; 
+    CPP2_UFCS(set_string)((*cpp2::assert_not_null(r)), std::move(syntax));
+    return r; 
+}
+
+#line 1868 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1830 "regex.h2"
+#line 1871 "regex.h2"
     }
 
-#line 1832 "regex.h2"
+#line 1873 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3664,7 +3715,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1840 "regex.h2"
+#line 1881 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3674,12 +3725,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1852 "regex.h2"
+#line 1893 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1859 "regex.h2"
+#line 1900 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3696,7 +3747,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1875 "regex.h2"
+#line 1916 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3709,7 +3760,7 @@ template [[
     }}
 }
 
-#line 1889 "regex.h2"
+#line 1930 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3722,13 +3773,13 @@ template [[
     }
 }
 
-#line 1901 "regex.h2"
+#line 1942 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1909 "regex.h2"
+#line 1950 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3753,11 +3804,36 @@ template [[nodiscard]] auto line_start_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
 }
 
-#line 1956 "regex.h2"
+#line 1990 "regex.h2"
+[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
+    if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
+
+    static_cast(CPP2_UFCS(next)(ctx));// Skip escape.
+
+    if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "o escape without number."); }
+    if (CPP2_UFCS(current)(ctx) != '{') {return CPP2_UFCS(error)(ctx, "Missing opening bracket for \\o."); }
+
+    std::string number_str {""}; 
+    static_cast(CPP2_UFCS(next)(ctx));// Skip '{'
+    if (!(CPP2_UFCS(grab_until)(ctx, '}', cpp2::out(&number_str)))) {return CPP2_UFCS(error)(ctx, "No ending bracket for \\o"); }
+
+    auto number {0}; 
+    if (!(string_to_int(std::move(number_str), number, 8))) {return CPP2_UFCS(error)(ctx, "Could not convert octal to int."); }
+
+    // TODO: Change for unicode.
+    char number_as_char {unsafe_narrow(std::move(number))}; 
+
+    std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8)) + "}"}; 
+    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(number_as_char))}; 
+    CPP2_UFCS(set_string)((*cpp2::assert_not_null(r)), std::move(syntax));
+    return r; 
+}
+
+#line 2024 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 1958 "regex.h2"
+#line 2026 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3801,7 +3877,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 2002 "regex.h2"
+#line 2070 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3828,7 +3904,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 2028 "regex.h2"
+#line 2096 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3840,7 +3916,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2039 "regex.h2"
+#line 2107 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3853,7 +3929,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2051 "regex.h2"
+#line 2119 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3878,7 +3954,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2075 "regex.h2"
+#line 2143 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3887,12 +3963,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2083 "regex.h2"
+#line 2151 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 2088 "regex.h2"
+#line 2156 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3905,26 +3981,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2100 "regex.h2"
+#line 2168 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2105 "regex.h2"
+#line 2173 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2110 "regex.h2"
+#line 2178 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2116 "regex.h2"
+#line 2184 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3940,7 +4016,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2131 "regex.h2"
+#line 2199 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3969,7 +4045,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2159 "regex.h2"
+#line 2227 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3994,7 +4070,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2183 "regex.h2"
+#line 2251 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -4020,7 +4096,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2214 "regex.h2"
+#line 2282 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -4043,7 +4119,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2237 "regex.h2"
+#line 2305 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -4053,7 +4129,7 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2249 "regex.h2"
+#line 2317 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -4070,7 +4146,7 @@ template [[nodiscard]] auto line_start_toke
     }}
 }
 
-#line 2265 "regex.h2"
+#line 2333 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -4096,14 +4172,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2302 "regex.h2"
+#line 2370 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2303 "regex.h2"
+#line 2371 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2304 "regex.h2"
+#line 2372 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2311 "regex.h2"
+#line 2379 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4123,12 +4199,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2330 "regex.h2"
+#line 2398 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2331 "regex.h2"
+#line 2399 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2339 "regex.h2"
+#line 2407 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4148,7 +4224,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2358 "regex.h2"
+#line 2426 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4161,10 +4237,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2370 "regex.h2"
+#line 2438 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2372 "regex.h2"
+#line 2440 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4176,7 +4252,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2388 "regex.h2"
+#line 2456 "regex.h2"
     template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
 
@@ -4192,12 +4268,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2403 "regex.h2"
+#line 2471 "regex.h2"
     template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2404 "regex.h2"
+#line 2472 "regex.h2"
     template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
 
-#line 2418 "regex.h2"
+#line 2486 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -4207,34 +4283,34 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2429 "regex.h2"
+#line 2497 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2443 "regex.h2"
+#line 2511 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2446 "regex.h2"
+#line 2514 "regex.h2"
         }
 
-#line 2448 "regex.h2"
+#line 2516 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2449 "regex.h2"
+#line 2517 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2450 "regex.h2"
+#line 2518 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2451 "regex.h2"
+#line 2519 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2453 "regex.h2"
+#line 2521 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2454 "regex.h2"
+#line 2522 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2455 "regex.h2"
+#line 2523 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2457 "regex.h2"
+#line 2525 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -4243,13 +4319,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2466 "regex.h2"
+#line 2534 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2467 "regex.h2"
+#line 2535 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2468 "regex.h2"
+#line 2536 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2469 "regex.h2"
+#line 2537 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4257,13 +4333,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2476 "regex.h2"
+#line 2544 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2477 "regex.h2"
+#line 2545 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2478 "regex.h2"
+#line 2546 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2479 "regex.h2"
+#line 2547 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4283,10 +4359,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2498 "regex.h2"
+#line 2566 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2503 "regex.h2"
+#line 2571 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4296,31 +4372,31 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2524 "regex.h2"
+#line 2592 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2527 "regex.h2"
+#line 2595 "regex.h2"
         }
 
-#line 2529 "regex.h2"
+#line 2597 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2530 "regex.h2"
+#line 2598 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2531 "regex.h2"
+#line 2599 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2532 "regex.h2"
+#line 2600 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2534 "regex.h2"
+#line 2602 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2535 "regex.h2"
+#line 2603 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2536 "regex.h2"
+#line 2604 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2538 "regex.h2"
+#line 2606 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4329,13 +4405,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2547 "regex.h2"
+#line 2615 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2548 "regex.h2"
+#line 2616 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2549 "regex.h2"
+#line 2617 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2550 "regex.h2"
+#line 2618 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4343,13 +4419,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2557 "regex.h2"
+#line 2625 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2558 "regex.h2"
+#line 2626 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2559 "regex.h2"
+#line 2627 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2560 "regex.h2"
+#line 2628 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4369,10 +4445,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2579 "regex.h2"
+#line 2647 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2584 "regex.h2"
+#line 2652 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4382,24 +4458,24 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2620 "regex.h2"
+#line 2688 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2626 "regex.h2"
+#line 2694 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2632 "regex.h2"
+#line 2700 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2634 "regex.h2"
+#line 2702 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4407,10 +4483,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         static_cast(std::move(last));
     }
 
-#line 2641 "regex.h2"
+#line 2709 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2651 "regex.h2"
+#line 2719 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4419,29 +4495,29 @@ template [[nodiscard]] auto word_boundary_token_mat
         return g; 
     }
 
-#line 2659 "regex.h2"
+#line 2727 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2664 "regex.h2"
+#line 2732 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2689 "regex.h2"
+#line 2757 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2693 "regex.h2"
+#line 2761 "regex.h2"
     }
 
-#line 2697 "regex.h2"
+#line 2765 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4449,12 +4525,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2704 "regex.h2"
+#line 2772 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2711 "regex.h2"
+#line 2779 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4467,14 +4543,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2723 "regex.h2"
+#line 2791 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2732 "regex.h2"
+#line 2800 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4513,7 +4589,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return cur; 
     }
 
-#line 2770 "regex.h2"
+#line 2838 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4526,14 +4602,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2782 "regex.h2"
+#line 2850 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2783 "regex.h2"
+#line 2851 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2784 "regex.h2"
+#line 2852 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2788 "regex.h2"
+#line 2856 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4541,7 +4617,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2795 "regex.h2"
+#line 2863 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4551,7 +4627,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2804 "regex.h2"
+#line 2872 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4560,7 +4636,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2812 "regex.h2"
+#line 2880 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4571,18 +4647,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2822 "regex.h2"
+#line 2890 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2823 "regex.h2"
+#line 2891 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2827 "regex.h2"
+#line 2895 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2832 "regex.h2"
+#line 2900 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4595,10 +4671,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2844 "regex.h2"
+#line 2912 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2850 "regex.h2"
+#line 2918 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4606,10 +4682,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2857 "regex.h2"
+#line 2925 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2859 "regex.h2"
+#line 2927 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4626,7 +4702,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2875 "regex.h2"
+#line 2943 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4637,7 +4713,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2887 "regex.h2"
+#line 2955 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4649,7 +4725,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2898 "regex.h2"
+#line 2966 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4686,14 +4762,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2937 "regex.h2"
+#line 3005 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
         if (c != '\\') {return false; }
 
         auto c_next {'\0'}; 
         if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
 
-#line 2944 "regex.h2"
+#line 3012 "regex.h2"
         if ('x' == c_next) {
             if (!(next(cpp2::out(&c_next)))) {error("x escape without number."); return false; }
             auto has_brackets {false}; 
@@ -4749,7 +4825,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2999 "regex.h2"
+#line 3067 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4757,7 +4833,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 3006 "regex.h2"
+#line 3074 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4773,7 +4849,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 3021 "regex.h2"
+#line 3089 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4796,7 +4872,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return res; 
     }
 
-#line 3043 "regex.h2"
+#line 3111 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4830,7 +4906,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 3077 "regex.h2"
+#line 3145 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 0a094900f1..83f93f81a4 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -821,9 +821,11 @@ parse_context: type = {
             if !cur_token && valid() { cur_token = global_group_reset_token_parse(this); }
             if !cur_token && valid() { cur_token = group_ref_token::parse(this); }
             if !cur_token && valid() { cur_token = group_token::parse(this); }
+            if !cur_token && valid() { cur_token = hexadecimal_token_parse(this); }
             if !cur_token && valid() { cur_token = line_end_token_parse(this); }
             if !cur_token && valid() { cur_token = line_start_token_parse(this); }
             if !cur_token && valid() { cur_token = named_class_token_parse(this); }
+            if !cur_token && valid() { cur_token = octal_token_parse(this); }
             if !cur_token && valid() { cur_token = range_token::parse(this); }
             if !cur_token && valid() { cur_token = special_range_token::parse(this); }
             if !cur_token && valid() { cur_token = word_boundary_token_parse(this); }
@@ -1819,6 +1821,47 @@ group_token: @polymorphic_base type = {
     }
 }
 
+// Regex syntax: \x or \x{}  Example: \x{62}
+//
+hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if !(ctx.current() == '\\' && ctx.peek() == 'x') { return nullptr; }
+
+    _ = ctx.next(); // Skip escape.
+
+    if !ctx.next() { return ctx.error("x escape without number.");}
+
+    has_brackets := false;
+    number_str: std::string = "";
+    if '{' == ctx.current() {
+        // TODO: Currently does not work since the compiler handles \x also.
+        // Bracketed
+        has_brackets = true;
+        _  = ctx.next(); // Skip '{'
+        if !ctx.grab_until('}', out number_str) { return ctx.error("No ending bracket for \\x"); }
+    }
+    else {
+        // grab two chars
+
+        if !ctx.grab_n(2, out number_str) { return ctx.error("Missing hexadecimal digits after \\x."); }
+    }
+
+    number := 0;
+    if !string_to_int(number_str, number, 16) { return ctx.error("Could not convert hexadecimal to int."); }
+
+    // TODO: Change for unicode.
+    number_as_char : char = unsafe_narrow(number);
+
+    syntax: std::string = int_to_string(number_as_char as int, 16);
+    if has_brackets {
+        syntax = "{(syntax)$}";
+    }
+    syntax = "\\\\x(syntax)$";
+
+    r := shared.new(number_as_char);
+    r*.set_string(syntax);
+    return r;
+}
+
 modifier_token: @polymorphic_base type = {
     this: regex_token_base;
 
@@ -1943,6 +1986,33 @@ named_class_not_space     :  type == class_token_matcher type == class_token_matcher>;
 named_class_not_word      :  type == class_token_matcher>;
 
+
+// Regex syntax: \o{}  Example: \o{142}
+//
+octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
+    if !(ctx.current() == '\\' && ctx.peek() == 'o') { return nullptr; }
+
+    _ = ctx.next(); // Skip escape.
+
+    if !ctx.next() { return ctx.error("o escape without number.");}
+    if ctx.current() != '{' { return ctx.error("Missing opening bracket for \\o."); }
+
+    number_str: std::string = "";
+    _  = ctx.next(); // Skip '{'
+    if !ctx.grab_until('}', out number_str) { return ctx.error("No ending bracket for \\o"); }
+
+    number := 0;
+    if !string_to_int(number_str, number, 8) { return ctx.error("Could not convert octal to int."); }
+
+    // TODO: Change for unicode.
+    number_as_char : char = unsafe_narrow(number);
+
+    syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
+    r := shared.new(number_as_char);
+    r*.set_string(syntax);
+    return r;
+}
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 range_token: @polymorphic_base type = {

From 64fc6cfd58f918b678dfa9ac66b5505f0e0c1954 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 13 May 2024 15:22:37 +0200
Subject: [PATCH 119/161] Added lookahead parsing and matching.

---
 include/cpp2regex.h | 664 +++++++++++++++++++++-----------------------
 source/regex.h2     | 139 +++-------
 2 files changed, 362 insertions(+), 441 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 796699d456..0e36e22467 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -171,68 +171,69 @@ class group_ref_token;
 class group_token;
     
 
-#line 1863 "regex.h2"
+#line 1873 "regex.h2"
 class modifier_token;
     
 
-#line 1879 "regex.h2"
+#line 1889 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1891 "regex.h2"
+#line 1901 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 2016 "regex.h2"
+#line 1959 "regex.h2"
+class lookahead_token;
+    
+
+#line 2056 "regex.h2"
 class range_token;
     
 
-#line 2154 "regex.h2"
+#line 2194 "regex.h2"
 template class range_token_matcher;
 
-#line 2279 "regex.h2"
+#line 2319 "regex.h2"
 class special_range_token;
     
 
-#line 2369 "regex.h2"
+#line 2409 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2377 "regex.h2"
+#line 2417 "regex.h2"
 template class char_matcher_logic;
 
-#line 2405 "regex.h2"
+#line 2445 "regex.h2"
 template class class_matcher_logic;
 
-#line 2454 "regex.h2"
-template class lookahead_matcher_logic;
-
-#line 2484 "regex.h2"
+#line 2502 "regex.h2"
 template class group_name_list;
 
-#line 2496 "regex.h2"
+#line 2514 "regex.h2"
 class group_name_list_end;
     
 
-#line 2501 "regex.h2"
+#line 2519 "regex.h2"
 template class regular_expression;
 
-#line 2582 "regex.h2"
+#line 2600 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2671 "regex.h2"
+#line 2689 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2678 "regex.h2"
+#line 2696 "regex.h2"
 class regex_parser_group_state;
 
-#line 2713 "regex.h2"
+#line 2731 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2740 "regex.h2"
+#line 2758 "regex.h2"
 template class regex_parser;
 
-#line 3152 "regex.h2"
+#line 3107 "regex.h2"
 }
 }
 
@@ -1214,15 +1215,18 @@ class group_token: public regex_token {
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
+    public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr;
+
+#line 1664 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1774 "regex.h2"
+#line 1782 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1791 "regex.h2"
+#line 1799 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1815 "regex.h2"
+#line 1823 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~group_token() noexcept;
 
@@ -1231,20 +1235,22 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1822 "regex.h2"
+#line 1830 "regex.h2"
 };
 
+// Regex syntax: \x or \x{}  Example: \x{62}
+//
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1863 "regex.h2"
+#line 1873 "regex.h2"
 class modifier_token: public regex_token_base {
 
-#line 1866 "regex.h2"
+#line 1876 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1873 "regex.h2"
+#line 1883 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1252,7 +1258,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1877 "regex.h2"
+#line 1887 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1263,7 +1269,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1889 "regex.h2"
+#line 1899 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1274,31 +1280,57 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1896 "regex.h2"
+#line 1906 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1916 "regex.h2"
+#line 1926 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1928 "regex.h2"
+#line 1938 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1942 "regex.h2"
+#line 1952 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1947 "regex.h2"
+#line 1957 "regex.h2"
+// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
+//
+class lookahead_token: public regex_token {
+
+#line 1962 "regex.h2"
+    protected: bool positive; 
+    public: token_ptr inner {nullptr}; 
+
+    public: explicit lookahead_token(cpp2::in positive_);
+
+#line 1969 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+
+#line 1975 "regex.h2"
+    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+    public: virtual ~lookahead_token() noexcept;
+
+    public: lookahead_token(lookahead_token const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(lookahead_token const&) -> void = delete;
+
+#line 1976 "regex.h2"
+};
+
+template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool;
+
+#line 1987 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1974 "regex.h2"
+#line 2014 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1312,17 +1344,17 @@ template                     using named_class_not_space = class
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 1988 "regex.h2"
-// Regex syntax: \o{}  Example: \o{98}
+#line 2028 "regex.h2"
+// Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2014 "regex.h2"
+#line 2054 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2019 "regex.h2"
+#line 2059 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1332,65 +1364,65 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2096 "regex.h2"
+#line 2136 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2107 "regex.h2"
+#line 2147 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2119 "regex.h2"
+#line 2159 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2143 "regex.h2"
+#line 2183 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2151 "regex.h2"
+#line 2191 "regex.h2"
     public: [[nodiscard]] auto get_groups() const -> std::vector override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
-#line 2152 "regex.h2"
+#line 2192 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2168 "regex.h2"
+#line 2208 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2173 "regex.h2"
+#line 2213 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2178 "regex.h2"
+#line 2218 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2184 "regex.h2"
+#line 2224 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2199 "regex.h2"
+#line 2239 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2227 "regex.h2"
+#line 2267 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2251 "regex.h2"
+#line 2291 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2275 "regex.h2"
+#line 2315 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2282 "regex.h2"
+#line 2322 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1399,7 +1431,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2311 "regex.h2"
+#line 2351 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1408,10 +1440,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2333 "regex.h2"
+#line 2373 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2359 "regex.h2"
+#line 2399 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1419,7 +1451,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2367 "regex.h2"
+#line 2407 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1430,7 +1462,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2373 "regex.h2"
+#line 2413 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1439,27 +1471,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2398 "regex.h2"
+#line 2438 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2400 "regex.h2"
+#line 2440 "regex.h2"
 };
 
-#line 2403 "regex.h2"
+#line 2443 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2426 "regex.h2"
+#line 2466 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2438 "regex.h2"
+#line 2478 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1468,25 +1500,10 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2450 "regex.h2"
-};
-
-// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
-//
-template class lookahead_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 2471 "regex.h2"
-    public: static auto reset_ranges(auto& ctx) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: lookahead_matcher_logic() = default;
-    public: lookahead_matcher_logic(lookahead_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(lookahead_matcher_logic const&) -> void = delete;
-
-#line 2473 "regex.h2"
+#line 2490 "regex.h2"
 };
 
+#line 2493 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1504,7 +1521,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2494 "regex.h2"
+#line 2512 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1513,7 +1530,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2498 "regex.h2"
+#line 2516 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1529,7 +1546,7 @@ template matched_, context const& ctx_);
 
-#line 2516 "regex.h2"
+#line 2534 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1544,7 +1561,7 @@ template void = delete;
 
 
-#line 2532 "regex.h2"
+#line 2550 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1552,13 +1569,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2544 "regex.h2"
+#line 2562 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2566 "regex.h2"
+#line 2584 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1570,7 +1587,7 @@ template void = delete;
 
 
-#line 2579 "regex.h2"
+#line 2597 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1586,7 +1603,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2597 "regex.h2"
+#line 2615 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1601,7 +1618,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2613 "regex.h2"
+#line 2631 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1609,13 +1626,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2625 "regex.h2"
+#line 2643 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2647 "regex.h2"
+#line 2665 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1627,7 +1644,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2660 "regex.h2"
+#line 2678 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1658,15 +1675,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2694 "regex.h2"
+#line 2712 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2700 "regex.h2"
+#line 2718 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2709 "regex.h2"
+#line 2727 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1679,13 +1696,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2727 "regex.h2"
+#line 2745 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2732 "regex.h2"
+#line 2750 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2737 "regex.h2"
+#line 2755 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1704,53 +1721,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2757 "regex.h2"
+#line 2775 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2763 "regex.h2"
+#line 2781 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2772 "regex.h2"
+#line 2790 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2776 "regex.h2"
+#line 2794 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2791 "regex.h2"
+#line 2809 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2797 "regex.h2"
+#line 2815 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2838 "regex.h2"
+#line 2856 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2850 "regex.h2"
+#line 2868 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2856 "regex.h2"
+#line 2874 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2863 "regex.h2"
+#line 2881 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2872 "regex.h2"
+#line 2890 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2880 "regex.h2"
+#line 2898 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2890 "regex.h2"
+#line 2908 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1758,61 +1775,58 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2900 "regex.h2"
+#line 2918 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2912 "regex.h2"
+#line 2930 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2915 "regex.h2"
+#line 2933 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2925 "regex.h2"
+#line 2943 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2943 "regex.h2"
+#line 2961 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2953 "regex.h2"
+#line 2971 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2966 "regex.h2"
+#line 2984 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 3002 "regex.h2"
+#line 3020 "regex.h2"
     // Parsing functions
     //
 
-    public: [[nodiscard]] auto is_escape(cpp2::in c) & -> bool;
-
-#line 3067 "regex.h2"
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 3074 "regex.h2"
+#line 3030 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 3089 "regex.h2"
+#line 3044 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3111 "regex.h2"
+#line 3066 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3143 "regex.h2"
+#line 3098 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3152 "regex.h2"
+#line 3107 "regex.h2"
 }
 }
 
@@ -3482,6 +3496,20 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 }
 
 #line 1651 "regex.h2"
+    [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr{
+        static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
+
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, positive)}; 
+
+        auto old_state {CPP2_UFCS(start_group)(ctx)}; 
+        if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return CPP2_UFCS(error)(ctx, "Lookahead without a closing bracket."); }
+        (*cpp2::assert_not_null(r)).inner = CPP2_UFCS(end_group)(ctx, std::move(old_state));
+        CPP2_UFCS(set_string)((*cpp2::assert_not_null(r)), ("(" + cpp2::to_string(syntax) + cpp2::to_string(CPP2_UFCS(to_string)((*cpp2::assert_not_null((*cpp2::assert_not_null(r)).inner)))) + ")"));
+
+        return r; 
+    }
+
+#line 1664 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3536,10 +3564,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
                 return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(list)); 
             }
             else {if (CPP2_UFCS(current)(ctx) == '=' || CPP2_UFCS(current)(ctx) == '!') {
-                static_cast(CPP2_UFCS(next)(ctx));// Skip '!'
-                // Positive or negative lookahead
-                // TODO: return parse_lookahead("?(ctx.current())$", ctx.current() == '=');
-                return nullptr; 
+                return parse_lookahead(ctx, ("?" + cpp2::to_string(CPP2_UFCS(current)(ctx))), CPP2_UFCS(current)(ctx) == '='); 
             }
             else {
                 // Simple modifier
@@ -3564,12 +3589,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             if (!(CPP2_UFCS(grab_until)(ctx, ':', cpp2::out(&name)))) {return CPP2_UFCS(error)(ctx, "Missing colon for named pattern."); }
 
             if (name == "pla" || name == "positive_lookahead") {
-                // TODO: return parse_lookahead("*(name)$:", true);
-                return nullptr; 
+                return parse_lookahead(ctx, ("*" + cpp2::to_string(std::move(name)) + ":"), true); 
             }
             else {if (name == "nla" || name == "negative_lookahead") {
-                // TODO: return parse_lookahead("*(name)$:", false);
-                return nullptr; 
+                return parse_lookahead(ctx, ("*" + cpp2::to_string(std::move(name)) + ":"), false); 
             }
             else {
                 return CPP2_UFCS(error)(ctx, ("Unknown named group pattern: '" + cpp2::to_string(std::move(name)) + "'")); 
@@ -3605,7 +3628,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1774 "regex.h2"
+#line 1782 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3623,7 +3646,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1791 "regex.h2"
+#line 1799 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3648,7 +3671,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1815 "regex.h2"
+#line 1823 "regex.h2"
     [[nodiscard]] auto group_token::get_groups() const -> std::vector{
         auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
         if (-1 != number) {
@@ -3659,7 +3682,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1824 "regex.h2"
+#line 1834 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
 
@@ -3699,15 +3722,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return r; 
 }
 
-#line 1868 "regex.h2"
+#line 1878 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1871 "regex.h2"
+#line 1881 "regex.h2"
     }
 
-#line 1873 "regex.h2"
+#line 1883 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3715,7 +3738,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1881 "regex.h2"
+#line 1891 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3725,12 +3748,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1893 "regex.h2"
+#line 1903 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1900 "regex.h2"
+#line 1910 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3747,7 +3770,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1916 "regex.h2"
+#line 1926 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3760,7 +3783,7 @@ template [[
     }}
 }
 
-#line 1930 "regex.h2"
+#line 1940 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3773,13 +3796,43 @@ template [[
     }
 }
 
-#line 1942 "regex.h2"
+#line 1952 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1950 "regex.h2"
+#line 1965 "regex.h2"
+    lookahead_token::lookahead_token(cpp2::in positive_)
+        : regex_token{ "" }
+        , positive{ positive_ }{
+
+#line 1967 "regex.h2"
+    }
+
+#line 1969 "regex.h2"
+    auto lookahead_token::generate_code(generation_context& ctx) const -> void{
+        auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
+
+        CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ")"));
+    }
+
+#line 1975 "regex.h2"
+    [[nodiscard]] auto lookahead_token::get_groups() const -> std::vector{return {  }; }
+
+    lookahead_token::~lookahead_token() noexcept{}// TODO: Implement
+
+#line 1978 "regex.h2"
+template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool{
+    auto r {func(cur, ctx, modifiers, true_end_func())}; 
+    if (!(positive)) {
+        r.matched = !(r.matched);
+    }
+
+    return std::move(r).matched; 
+}
+
+#line 1990 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3804,7 +3857,7 @@ template [[nodiscard]] auto line_start_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
 }
 
-#line 1990 "regex.h2"
+#line 2030 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
 
@@ -3829,11 +3882,11 @@ template [[nodiscard]] auto line_start_toke
     return r; 
 }
 
-#line 2024 "regex.h2"
+#line 2064 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2026 "regex.h2"
+#line 2066 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3877,7 +3930,7 @@ template [[nodiscard]] auto line_start_toke
                 }
             }
 
-#line 2070 "regex.h2"
+#line 2110 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3904,7 +3957,7 @@ template [[nodiscard]] auto line_start_toke
         return nullptr; 
     }
 
-#line 2096 "regex.h2"
+#line 2136 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3916,7 +3969,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2107 "regex.h2"
+#line 2147 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3929,7 +3982,7 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2119 "regex.h2"
+#line 2159 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3954,7 +4007,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2143 "regex.h2"
+#line 2183 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
@@ -3963,12 +4016,12 @@ template [[nodiscard]] auto line_start_toke
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2151 "regex.h2"
+#line 2191 "regex.h2"
     [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
 
     range_token::~range_token() noexcept{}// TODO: Implement
 
-#line 2156 "regex.h2"
+#line 2196 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3981,26 +4034,26 @@ template [[nodiscard]] auto line_start_toke
         }}
     }
 
-#line 2168 "regex.h2"
+#line 2208 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2173 "regex.h2"
+#line 2213 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2178 "regex.h2"
+#line 2218 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2184 "regex.h2"
+#line 2224 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -4016,7 +4069,7 @@ template [[nodiscard]] auto line_start_toke
         return res; 
     }
 
-#line 2199 "regex.h2"
+#line 2239 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -4045,7 +4098,7 @@ template [[nodiscard]] auto line_start_toke
         return r; 
     }
 
-#line 2227 "regex.h2"
+#line 2267 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -4070,7 +4123,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2251 "regex.h2"
+#line 2291 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -4096,7 +4149,7 @@ template [[nodiscard]] auto line_start_toke
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2282 "regex.h2"
+#line 2322 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -4119,7 +4172,7 @@ template [[nodiscard]] auto line_start_toke
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2305 "regex.h2"
+#line 2345 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -4129,7 +4182,7 @@ template [[nodiscard]] auto line_start_toke
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2317 "regex.h2"
+#line 2357 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -4146,7 +4199,7 @@ template [[nodiscard]] auto line_start_toke
     }}
 }
 
-#line 2333 "regex.h2"
+#line 2373 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -4172,14 +4225,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2370 "regex.h2"
+#line 2410 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2371 "regex.h2"
+#line 2411 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2372 "regex.h2"
+#line 2412 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2379 "regex.h2"
+#line 2419 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4199,12 +4252,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2398 "regex.h2"
+#line 2438 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2399 "regex.h2"
+#line 2439 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2407 "regex.h2"
+#line 2447 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4224,7 +4277,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2426 "regex.h2"
+#line 2466 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4237,10 +4290,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2438 "regex.h2"
+#line 2478 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2440 "regex.h2"
+#line 2480 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4252,28 +4305,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2456 "regex.h2"
-    template  template [[nodiscard]] auto lookahead_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        auto r {Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail())}; 
-
-        if (!(positive)) {
-            r.matched = !(r.matched);
-        }
-
-        if (std::move(r).matched) {
-            return Other::match(cur, ctx, modifiers, end_func); 
-        }
-        else {
-            return CPP2_UFCS(fail)(ctx); 
-        }
-
-    }
-#line 2471 "regex.h2"
-    template  auto lookahead_matcher_logic::reset_ranges(auto& ctx) -> void{Pattern::reset_ranges(ctx); }
-#line 2472 "regex.h2"
-    template  [[nodiscard]] auto lookahead_matcher_logic::to_string() -> auto { return "(" + cpp2::to_string(CPP2_UFCS(data)(name)) + cpp2::to_string(Pattern::to_string()) + ")"; }
-
-#line 2486 "regex.h2"
+#line 2504 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -4283,34 +4315,34 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2497 "regex.h2"
+#line 2515 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2511 "regex.h2"
+#line 2529 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2514 "regex.h2"
+#line 2532 "regex.h2"
         }
 
-#line 2516 "regex.h2"
+#line 2534 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2517 "regex.h2"
+#line 2535 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2518 "regex.h2"
+#line 2536 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2519 "regex.h2"
+#line 2537 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2521 "regex.h2"
+#line 2539 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2522 "regex.h2"
+#line 2540 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2523 "regex.h2"
+#line 2541 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2525 "regex.h2"
+#line 2543 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -4319,13 +4351,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2534 "regex.h2"
+#line 2552 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2535 "regex.h2"
+#line 2553 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2536 "regex.h2"
+#line 2554 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2537 "regex.h2"
+#line 2555 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4333,13 +4365,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2544 "regex.h2"
+#line 2562 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2545 "regex.h2"
+#line 2563 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2546 "regex.h2"
+#line 2564 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2547 "regex.h2"
+#line 2565 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4359,10 +4391,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2566 "regex.h2"
+#line 2584 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2571 "regex.h2"
+#line 2589 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4372,31 +4404,31 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2592 "regex.h2"
+#line 2610 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2595 "regex.h2"
+#line 2613 "regex.h2"
         }
 
-#line 2597 "regex.h2"
+#line 2615 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2598 "regex.h2"
+#line 2616 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2599 "regex.h2"
+#line 2617 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2600 "regex.h2"
+#line 2618 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2602 "regex.h2"
+#line 2620 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2603 "regex.h2"
+#line 2621 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2604 "regex.h2"
+#line 2622 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2606 "regex.h2"
+#line 2624 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4405,13 +4437,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2615 "regex.h2"
+#line 2633 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2616 "regex.h2"
+#line 2634 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2617 "regex.h2"
+#line 2635 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2618 "regex.h2"
+#line 2636 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4419,13 +4451,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2625 "regex.h2"
+#line 2643 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2626 "regex.h2"
+#line 2644 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2627 "regex.h2"
+#line 2645 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2628 "regex.h2"
+#line 2646 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4445,10 +4477,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2647 "regex.h2"
+#line 2665 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2652 "regex.h2"
+#line 2670 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4458,24 +4490,24 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2688 "regex.h2"
+#line 2706 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2694 "regex.h2"
+#line 2712 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2700 "regex.h2"
+#line 2718 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2702 "regex.h2"
+#line 2720 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4483,10 +4515,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         static_cast(std::move(last));
     }
 
-#line 2709 "regex.h2"
+#line 2727 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2719 "regex.h2"
+#line 2737 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4495,29 +4527,29 @@ template [[nodiscard]] auto word_boundary_token_mat
         return g; 
     }
 
-#line 2727 "regex.h2"
+#line 2745 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2732 "regex.h2"
+#line 2750 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2757 "regex.h2"
+#line 2775 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2761 "regex.h2"
+#line 2779 "regex.h2"
     }
 
-#line 2765 "regex.h2"
+#line 2783 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4525,12 +4557,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2772 "regex.h2"
+#line 2790 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2779 "regex.h2"
+#line 2797 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4543,14 +4575,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2791 "regex.h2"
+#line 2809 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2800 "regex.h2"
+#line 2818 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4589,7 +4621,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return cur; 
     }
 
-#line 2838 "regex.h2"
+#line 2856 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4602,14 +4634,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2850 "regex.h2"
+#line 2868 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2851 "regex.h2"
+#line 2869 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2852 "regex.h2"
+#line 2870 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2856 "regex.h2"
+#line 2874 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4617,7 +4649,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2863 "regex.h2"
+#line 2881 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4627,7 +4659,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2872 "regex.h2"
+#line 2890 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4636,7 +4668,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2880 "regex.h2"
+#line 2898 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4647,18 +4679,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2890 "regex.h2"
+#line 2908 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2891 "regex.h2"
+#line 2909 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2895 "regex.h2"
+#line 2913 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2900 "regex.h2"
+#line 2918 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4671,10 +4703,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2912 "regex.h2"
+#line 2930 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2918 "regex.h2"
+#line 2936 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4682,10 +4714,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2925 "regex.h2"
+#line 2943 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2927 "regex.h2"
+#line 2945 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4702,7 +4734,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2943 "regex.h2"
+#line 2961 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4713,7 +4745,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2955 "regex.h2"
+#line 2973 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4725,7 +4757,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2966 "regex.h2"
+#line 2984 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4762,70 +4794,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 3005 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_escape(cpp2::in c) & -> bool{
-        if (c != '\\') {return false; }
-
-        auto c_next {'\0'}; 
-        if (!(next(cpp2::out(&c_next)))) {error("Escape without a following character."); return false; }
-
-#line 3012 "regex.h2"
-        if ('x' == c_next) {
-            if (!(next(cpp2::out(&c_next)))) {error("x escape without number."); return false; }
-            auto has_brackets {false}; 
-            std::string number_str {""}; 
-            if ('{' == std::move(c_next)) {
-                // TODO: Currently does not work since the compiler handles \x also.
-                // Bracketed
-                has_brackets = true;
-                static_cast(skip());// Skip '{'
-                if (!(grab_until('}', cpp2::out(&number_str)))) {error("No ending bracket for \\x"); return false; }
-            }
-            else {
-                // grab two chars
-
-                if (!(grab_n(2, cpp2::out(&number_str)))) {error("Missing hexadecimal digits after \\x."); return false; }
-            }
-
-            auto number {0}; 
-            if (!(string_to_int(std::move(number_str), number, 16))) {error("Could not convert hexadecimal to int."); return false; }
-
-            char number_as_char {unsafe_narrow(std::move(number))}; 
-
-            std::string syntax {int_to_string(cpp2::as_(number_as_char), 16)}; 
-            if (std::move(has_brackets)) {
-                syntax = { "{" + cpp2::to_string(syntax) + "}" };
-            }
-            syntax = { "\\x" + cpp2::to_string(syntax) };
-            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
-            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
-        }
-        else {if ('o' == c_next) {
-            if (!(next(cpp2::out(&c_next)))) {error("o escape without bracket."); return false; }
-            std::string number_str {""}; 
-            if ('{' == std::move(c_next)) {
-                static_cast(skip());// Skip '{'
-                if (!(grab_until('}', cpp2::out(&number_str)))) {error("No ending bracket for \\o"); return false; }
-            }
-
-            auto number {0}; 
-            if (!(string_to_int(std::move(number_str), number, 8))) {error("Could not convert octal to int."); return false; }
-
-            char number_as_char {unsafe_narrow(std::move(number))}; 
-
-            std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::as_(number_as_char), 8)) + "}"}; 
-            auto char_matcher {create_matcher("char_matcher_logic", ("'" + cpp2::to_string(number_as_char) + "', '" + cpp2::to_string(safe_tolower(number_as_char)) + "', '" + cpp2::to_string(safe_toupper(number_as_char)) + "'"))}; 
-            CPP2_UFCS(add)(cur_group_state, create_matcher("special_syntax_wrapper", ("\"" + cpp2::to_string(std::move(syntax)) + "\", " + cpp2::to_string(std::move(char_matcher)))));
-        }
-        else {
-            error("Unknown escape.");
-            return false; 
-        }}
-
-        return true; 
-    }
-
-#line 3067 "regex.h2"
+#line 3023 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4833,13 +4802,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 3074 "regex.h2"
+#line 3030 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
             if (c == term) {return ; }
 
-            if (!(has_error) && is_escape(c)) {continue; }
             if (!(has_error) && is_handle_special(c)) {continue; }
 
             if (has_error) {return ; }
@@ -4849,7 +4817,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 3089 "regex.h2"
+#line 3044 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4872,7 +4840,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return res; 
     }
 
-#line 3111 "regex.h2"
+#line 3066 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4906,7 +4874,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 3145 "regex.h2"
+#line 3100 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 83f93f81a4..5b618e0dcc 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1648,6 +1648,19 @@ group_token: @polymorphic_base type = {
     inner: token_ptr = nullptr;
     mod: std::string = "::cpp2::regex::match_modifiers_no_change";
 
+    parse_lookahead: (inout ctx: parse_context, syntax: std::string, positive: bool) -> token_ptr = {
+        _ = ctx.next(); // Skip last token defining the syntax
+
+        r := shared.new(positive);
+
+        old_state := ctx.start_group();
+        if !ctx.parse_until(')') { return ctx.error("Lookahead without a closing bracket."); }
+        r*.inner = ctx.end_group(old_state);
+        r*.set_string("((syntax)$(r*.inner*.to_string())$)");
+
+        return r;
+    }
+
     parse: (inout ctx: parse_context) -> token_ptr = {
         if ctx.current() != '(' { return nullptr; }
 
@@ -1702,10 +1715,7 @@ group_token: @polymorphic_base type = {
                 return shared.new(list);
             }
             else if ctx.current() == '=' || ctx.current() == '!' {
-                _ = ctx.next(); // Skip '!'
-                // Positive or negative lookahead
-                // TODO: return parse_lookahead("?(ctx.current())$", ctx.current() == '=');
-                return nullptr;
+                return parse_lookahead(ctx, "?(ctx.current())$", ctx.current() == '=');
             }
             else {
                 // Simple modifier
@@ -1730,12 +1740,10 @@ group_token: @polymorphic_base type = {
             if !ctx.grab_until(':', out name) { return ctx.error("Missing colon for named pattern.");  }
 
             if name == "pla" || name == "positive_lookahead" {
-                // TODO: return parse_lookahead("*(name)$:", true);
-                return nullptr;
+                return parse_lookahead(ctx, "*(name)$:", true);
             }
             else if name == "nla" || name == "negative_lookahead" {
-                // TODO: return parse_lookahead("*(name)$:", false);
-                return nullptr;
+                return parse_lookahead(ctx, "*(name)$:", false);
             }
             else {
                 return ctx.error("Unknown named group pattern: '(name)$'");
@@ -1946,6 +1954,36 @@ line_start_token_matcher:  (cur, inout ctx, modifie
            (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n'); // Start of new line
 }
 
+// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
+//
+lookahead_token: @polymorphic_base type = {
+    this: regex_token = ("");
+
+    protected positive: bool;
+    public inner: token_ptr = nullptr;
+
+    operator=: (out this, positive_: bool) = {
+        positive = positive_;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        inner_name := ctx.generate_func(inner);
+
+        ctx.add_check("lookahead_token_matcher((ctx.match_parameters())$, (inner_name)$)");
+    }
+
+    get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
+}
+
+lookahead_token_matcher:  (cur, inout ctx, modifiers, func) -> bool = {
+    r := func(cur, ctx, modifiers, true_end_func());
+    if !positive {
+        r.matched = !r.matched;
+    }
+
+    return r.matched;
+}
+
 // Named character classes
 //
 
@@ -2451,28 +2489,6 @@ class_matcher_logic:  type =
     }
 }
 
-// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
-//
-lookahead_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        r := Pattern::match(cur, ctx, modifiers, true_end_func(), no_tail());
-
-        if !positive {
-            r.matched = !r.matched;
-        }
-
-        if r.matched {
-            return Other::match(cur, ctx, modifiers, end_func);
-        }
-        else {
-            return ctx.fail();
-        }
-
-    }
-    reset_ranges: (inout ctx) = { Pattern::reset_ranges(ctx); }
-    to_string:    ()          "((name.data())$(Pattern::to_string())$)";
-}
 
 //-----------------------------------------------------------------------
 //
@@ -3004,68 +3020,6 @@ regex_parser:  type = {
     // Parsing functions
     //
 
-    is_escape: (inout this, c: char) -> bool = {
-        if c != '\\' { return false; }
-
-        c_next := '\0';
-        if !next(out c_next) { error("Escape without a following character."); return false; }
-
-
-        if 'x' == c_next {
-            if !next(out c_next) { error("x escape without number."); return false; }
-            has_brackets := false;
-            number_str: std::string = "";
-            if '{' == c_next {
-                // TODO: Currently does not work since the compiler handles \x also.
-                // Bracketed
-                has_brackets = true;
-                _  = skip(); // Skip '{'
-                if !grab_until('}', out number_str) { error("No ending bracket for \\x"); return false; }
-            }
-            else {
-                // grab two chars
-
-                if !grab_n(2, out number_str) { error("Missing hexadecimal digits after \\x."); return false; }
-            }
-
-            number := 0;
-            if !string_to_int(number_str, number, 16) { error("Could not convert hexadecimal to int."); return false; }
-
-            number_as_char : char = unsafe_narrow(number);
-
-            syntax: std::string = int_to_string(number_as_char as int, 16);
-            if has_brackets {
-                syntax = "{(syntax)$}";
-            }
-            syntax = "\\x(syntax)$";
-            char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-            cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
-        }
-        else if 'o' == c_next {
-            if !next(out c_next) { error("o escape without bracket."); return false; }
-            number_str: std::string = "";
-            if '{' == c_next {
-                _  = skip(); // Skip '{'
-                if !grab_until('}', out number_str) { error("No ending bracket for \\o"); return false; }
-            }
-
-            number := 0;
-            if !string_to_int(number_str, number, 8) { error("Could not convert octal to int."); return false; }
-
-            number_as_char : char = unsafe_narrow(number);
-
-            syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
-            char_matcher := create_matcher("char_matcher_logic", "'(number_as_char)$', '(safe_tolower(number_as_char))$', '(safe_toupper(number_as_char))$'");
-            cur_group_state.add(create_matcher("special_syntax_wrapper", "\"(syntax)$\", (char_matcher)$"));
-        }
-        else {
-            error("Unknown escape.");
-            return false;
-        }
-
-        return true;
-    }
-
     is_handle_special: (inout this, c: char) -> bool = {
         if c != '\'' { return false; }
 
@@ -3078,7 +3032,6 @@ regex_parser:  type = {
         while c != '\n' next _ = next(out c) {
             if c == term { return; }
 
-            if !has_error && is_escape(c) { continue; }
             if !has_error && is_handle_special(c) { continue; }
 
             if has_error { return; }

From 0ea40c7cca88379355ed17774a99dbe1b3efa7a6 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 14 May 2024 08:55:05 +0200
Subject: [PATCH 120/161] Group gathering is now done in a set.

---
 include/cpp2regex.h | 1081 ++++++++++++++++++++++---------------------
 source/regex.h2     |   54 +--
 2 files changed, 568 insertions(+), 567 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 0e36e22467..13a08e68d7 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,182 +10,182 @@
 
 #line 1 "regex.h2"
 
-#line 15 "regex.h2"
+#line 16 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 31 "regex.h2"
+#line 32 "regex.h2"
 class expression_flags;
 
-#line 43 "regex.h2"
+#line 44 "regex.h2"
 class range_flags;
     
 
-#line 49 "regex.h2"
+#line 50 "regex.h2"
 template class match_group;
     
 
-#line 56 "regex.h2"
+#line 57 "regex.h2"
 template class match_return;
     
 
-#line 61 "regex.h2"
+#line 62 "regex.h2"
 template class match_context;
 
-#line 146 "regex.h2"
+#line 147 "regex.h2"
 template class match_modifiers_state_change;
 
-#line 172 "regex.h2"
+#line 173 "regex.h2"
 template class match_modifiers;
 
-#line 195 "regex.h2"
+#line 196 "regex.h2"
 template class matcher_list;
     
 
-#line 212 "regex.h2"
+#line 213 "regex.h2"
 class true_end_func;
     
 
-#line 225 "regex.h2"
+#line 226 "regex.h2"
 template class single_class_entry;
 
-#line 233 "regex.h2"
+#line 234 "regex.h2"
 template class range_class_entry;
 
-#line 241 "regex.h2"
+#line 242 "regex.h2"
 template class combined_class_entry;
     
 
-#line 248 "regex.h2"
+#line 249 "regex.h2"
 template class list_class_entry;
     
 
-#line 255 "regex.h2"
+#line 256 "regex.h2"
 template class named_class_entry;
     
 
-#line 260 "regex.h2"
+#line 261 "regex.h2"
 template class negated_class_entry;
     
 
-#line 267 "regex.h2"
+#line 268 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 319 "regex.h2"
+#line 320 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 328 "regex.h2"
+#line 329 "regex.h2"
 template class extract_position_helper;
     
 
-#line 344 "regex.h2"
+#line 345 "regex.h2"
 template class special_syntax_wrapper;
     
 
-#line 357 "regex.h2"
+#line 358 "regex.h2"
 class no_reset;
     
 
-#line 361 "regex.h2"
+#line 362 "regex.h2"
 template class on_return;
 
-#line 376 "regex.h2"
+#line 377 "regex.h2"
 class regex_token;
 
-#line 400 "regex.h2"
+#line 401 "regex.h2"
 class parse_context_group_state;
 
-#line 438 "regex.h2"
+#line 439 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 471 "regex.h2"
+#line 472 "regex.h2"
 class parse_context;
     
 
-#line 851 "regex.h2"
+#line 852 "regex.h2"
 class generation_function_context;
     
 
-#line 867 "regex.h2"
+#line 868 "regex.h2"
 class generation_context;
 
-#line 1014 "regex.h2"
+#line 1015 "regex.h2"
 class regex_token_list;
     
 
-#line 1050 "regex.h2"
+#line 1047 "regex.h2"
 class regex_token_base;
     
 
-#line 1064 "regex.h2"
+#line 1061 "regex.h2"
 class regex_token_check;
     
 
-#line 1079 "regex.h2"
+#line 1076 "regex.h2"
 class regex_token_code;
     
 
-#line 1095 "regex.h2"
+#line 1092 "regex.h2"
 class regex_token_empty;
     
 
-#line 1111 "regex.h2"
+#line 1108 "regex.h2"
 class alternative_token;
     
 
-#line 1129 "regex.h2"
+#line 1126 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1178 "regex.h2"
+#line 1172 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1204 "regex.h2"
+#line 1198 "regex.h2"
 class any_token;
     
 
-#line 1231 "regex.h2"
+#line 1225 "regex.h2"
 class char_token;
     
 
-#line 1275 "regex.h2"
+#line 1269 "regex.h2"
 class class_token;
     
 
-#line 1407 "regex.h2"
+#line 1401 "regex.h2"
 template class class_token_matcher;
 
-#line 1478 "regex.h2"
+#line 1472 "regex.h2"
 class escaped_char_token;
     
 
-#line 1512 "regex.h2"
+#line 1506 "regex.h2"
 class group_ref_token;
     
 
-#line 1644 "regex.h2"
+#line 1638 "regex.h2"
 class group_token;
     
 
-#line 1873 "regex.h2"
+#line 1866 "regex.h2"
 class modifier_token;
     
 
-#line 1889 "regex.h2"
+#line 1882 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1901 "regex.h2"
+#line 1894 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1959 "regex.h2"
+#line 1952 "regex.h2"
 class lookahead_token;
     
 
-#line 2056 "regex.h2"
+#line 2051 "regex.h2"
 class range_token;
     
 
@@ -254,8 +254,9 @@ template class regex_parser;
 // THE SOFTWARE.
 
 #include 
+#include 
 
-#line 15 "regex.h2"
+#line 16 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -265,7 +266,7 @@ bool inline constexpr greedy_alternative = false;
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
-#line 31 "regex.h2"
+#line 32 "regex.h2"
 class expression_flags {
     public: static const int case_insensitive;
     public: static const int multiple_lines;
@@ -278,9 +279,9 @@ class expression_flags {
     public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(expression_flags const&) -> void = delete;
 };
-#line 39 "regex.h2"
+#line 40 "regex.h2"
 
-#line 43 "regex.h2"
+#line 44 "regex.h2"
 class range_flags {
     public: static const int not_greedy;
     public: static const int greedy;
@@ -290,7 +291,7 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 48 "regex.h2"
+#line 49 "regex.h2"
 
 template class match_group {
     public: Iter start {}; 
@@ -314,53 +315,53 @@ template cl
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     public: match_context(match_context const& that);
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-#line 78 "regex.h2"
+#line 79 "regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 86 "regex.h2"
+#line 87 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 92 "regex.h2"
+#line 93 "regex.h2"
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 99 "regex.h2"
+#line 100 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 104 "regex.h2"
+#line 105 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 108 "regex.h2"
+#line 109 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 112 "regex.h2"
+#line 113 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-#line 116 "regex.h2"
+#line 117 "regex.h2"
     public: [[nodiscard]] auto get_alternative_pos(auto const& alternative) const& -> auto;
 
     public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
 
-#line 124 "regex.h2"
+#line 125 "regex.h2"
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 138 "regex.h2"
+#line 139 "regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::in cur) const& -> auto;
 
 };
 
-#line 146 "regex.h2"
+#line 147 "regex.h2"
 template class match_modifiers_state_change {
 
     public: static const bool reset;
@@ -370,40 +371,40 @@ template
 
     public: [[nodiscard]] constexpr static auto combine_inner(cpp2::in old_flags) -> auto;
 
-#line 164 "regex.h2"
+#line 165 "regex.h2"
     public: [[nodiscard]] static auto to_string() -> auto;
     public: match_modifiers_state_change() = default;
     public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(match_modifiers_state_change const&) -> void = delete;
 
-#line 165 "regex.h2"
+#line 166 "regex.h2"
 };
 
 using match_modifiers_no_change = match_modifiers_state_change;
 
-#line 172 "regex.h2"
+#line 173 "regex.h2"
 template class match_modifiers {
 
     public: static const int flags;
 
-#line 178 "regex.h2"
+#line 179 "regex.h2"
     public: template [[nodiscard]] static auto push([[maybe_unused]] Change const& unnamed_param_1) -> auto;
     public: [[nodiscard]] static auto pop() -> auto;
     public: template [[nodiscard]] static auto replace([[maybe_unused]] Change const& unnamed_param_1) -> auto;
 
-#line 185 "regex.h2"
+#line 186 "regex.h2"
     public: [[nodiscard]] auto has_flag(cpp2::in f) const& -> bool;
 
-#line 188 "regex.h2"
+#line 189 "regex.h2"
 };
 
-#line 195 "regex.h2"
+#line 196 "regex.h2"
 template class matcher_list {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto;
 
-#line 201 "regex.h2"
+#line 202 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
@@ -416,7 +417,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 209 "regex.h2"
+#line 210 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -424,7 +425,7 @@ class true_end_func {
     public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto;
 };
 
-#line 225 "regex.h2"
+#line 226 "regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
@@ -433,10 +434,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 229 "regex.h2"
+#line 230 "regex.h2"
 };
 
-#line 233 "regex.h2"
+#line 234 "regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
@@ -445,10 +446,10 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 237 "regex.h2"
+#line 238 "regex.h2"
 };
 
-#line 241 "regex.h2"
+#line 242 "regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -456,10 +457,10 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 244 "regex.h2"
+#line 245 "regex.h2"
 };
 
-#line 248 "regex.h2"
+#line 249 "regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -467,10 +468,10 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 251 "regex.h2"
+#line 252 "regex.h2"
 };
 
-#line 255 "regex.h2"
+#line 256 "regex.h2"
 template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -478,7 +479,7 @@ template class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 258 "regex.h2"
+#line 259 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -488,10 +489,10 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 263 "regex.h2"
+#line 264 "regex.h2"
 };
 
-#line 267 "regex.h2"
+#line 268 "regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -499,15 +500,15 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 270 "regex.h2"
+#line 271 "regex.h2"
 };
 
-#line 275 "regex.h2"
+#line 276 "regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 281 "regex.h2"
+#line 282 "regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -522,21 +523,21 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 297 "regex.h2"
+#line 298 "regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 304 "regex.h2"
+#line 305 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 319 "regex.h2"
+#line 320 "regex.h2"
 template class empty_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
@@ -545,24 +546,24 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 323 "regex.h2"
+#line 324 "regex.h2"
 };
 
-#line 328 "regex.h2"
+#line 329 "regex.h2"
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 337 "regex.h2"
+#line 338 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 339 "regex.h2"
+#line 340 "regex.h2"
 };
 
-#line 344 "regex.h2"
+#line 345 "regex.h2"
 template class special_syntax_wrapper: public base {
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -570,10 +571,10 @@ template class special_synta
     public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_syntax_wrapper const&) -> void = delete;
 
-#line 347 "regex.h2"
+#line 348 "regex.h2"
 };
 
-#line 357 "regex.h2"
+#line 358 "regex.h2"
 class no_reset {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
@@ -583,16 +584,16 @@ template class on_return {
     private: Func func; 
 
     public: explicit on_return(Func const& f);
-#line 365 "regex.h2"
+#line 366 "regex.h2"
     public: auto operator=(Func const& f) -> on_return& ;
 
-#line 369 "regex.h2"
+#line 370 "regex.h2"
     public: ~on_return() noexcept;
     public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(on_return const&) -> void = delete;
 
 
-#line 372 "regex.h2"
+#line 373 "regex.h2"
 };
 
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
@@ -603,13 +604,13 @@ class regex_token {
 
     public: explicit regex_token(cpp2::in str);
 
-#line 384 "regex.h2"
+#line 385 "regex.h2"
     public: explicit regex_token();
 
-#line 389 "regex.h2"
+#line 390 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
-    public: [[nodiscard]] virtual auto get_groups() const -> std::vector = 0;
+    public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void = 0;
     public: [[nodiscard]] auto to_string() const& -> std::string;
     public: auto set_string(cpp2::in s) & -> void;
     public: virtual ~regex_token() noexcept;
@@ -617,7 +618,7 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 394 "regex.h2"
+#line 395 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
@@ -636,13 +637,13 @@ class parse_context_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 416 "regex.h2"
+#line 417 "regex.h2"
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 422 "regex.h2"
+#line 423 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 432 "regex.h2"
+#line 433 "regex.h2"
     public: auto add(cpp2::in token) & -> void;
 
     public: [[nodiscard]] auto empty() const& -> bool;
@@ -657,16 +658,16 @@ class parse_context_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 452 "regex.h2"
+#line 453 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 457 "regex.h2"
+#line 458 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 463 "regex.h2"
+#line 464 "regex.h2"
     public: auto set_active_reset(cpp2::in restart) & -> void;
 
-#line 469 "regex.h2"
+#line 470 "regex.h2"
 };
 
 class parse_context {
@@ -681,37 +682,37 @@ class parse_context {
     private: std::map named_groups {}; 
 
     public: explicit parse_context(cpp2::in r);
-#line 482 "regex.h2"
+#line 483 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 486 "regex.h2"
+#line 487 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 496 "regex.h2"
+#line 497 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
 
-#line 502 "regex.h2"
+#line 503 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> regex_parser_modifier_state;
 
-#line 506 "regex.h2"
+#line 507 "regex.h2"
     public: auto set_modifiers(cpp2::in mod) & -> void;
 
-#line 510 "regex.h2"
+#line 511 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 521 "regex.h2"
+#line 522 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 527 "regex.h2"
+#line 528 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 532 "regex.h2"
+#line 533 "regex.h2"
     // Position management functions
     //
 
@@ -721,88 +722,88 @@ class parse_context {
 
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 543 "regex.h2"
+#line 544 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 547 "regex.h2"
+#line 548 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 557 "regex.h2"
+#line 558 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 561 "regex.h2"
+#line 562 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 566 "regex.h2"
+#line 567 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 570 "regex.h2"
+#line 571 "regex.h2"
     public: auto set_named_group(cpp2::in name, cpp2::in id) & -> void;
 
-#line 576 "regex.h2"
+#line 577 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
 
-#line 586 "regex.h2"
+#line 587 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 598 "regex.h2"
+#line 599 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::in n) & -> bool;
 
-#line 611 "regex.h2"
+#line 612 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 620 "regex.h2"
+#line 621 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 632 "regex.h2"
+#line 633 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 674 "regex.h2"
+#line 675 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 695 "regex.h2"
+#line 696 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 711 "regex.h2"
+#line 712 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 731 "regex.h2"
+#line 732 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 741 "regex.h2"
+#line 742 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool;
 
-#line 809 "regex.h2"
+#line 810 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 846 "regex.h2"
+#line 847 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 849 "regex.h2"
+#line 850 "regex.h2"
 };
 
 class generation_function_context {
@@ -811,10 +812,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 862 "regex.h2"
+#line 863 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 865 "regex.h2"
+#line 866 "regex.h2"
 };
 
 class generation_context {
@@ -831,81 +832,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 884 "regex.h2"
+#line 885 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 889 "regex.h2"
+#line 890 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 896 "regex.h2"
+#line 897 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 902 "regex.h2"
+#line 903 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 910 "regex.h2"
-    public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
+#line 911 "regex.h2"
+    public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 932 "regex.h2"
+#line 933 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 936 "regex.h2"
+#line 937 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 940 "regex.h2"
+#line 941 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 944 "regex.h2"
+#line 945 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 959 "regex.h2"
+#line 960 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 971 "regex.h2"
+#line 972 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 975 "regex.h2"
+#line 976 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 979 "regex.h2"
+#line 980 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 985 "regex.h2"
+#line 986 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 991 "regex.h2"
+#line 992 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 997 "regex.h2"
+#line 998 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1005 "regex.h2"
+#line 1006 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1012 "regex.h2"
+#line 1013 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1017 "regex.h2"
+#line 1018 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1024 "regex.h2"
+#line 1025 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1030 "regex.h2"
-    public: [[nodiscard]] virtual auto get_groups() const -> std::vector;
+#line 1031 "regex.h2"
+    public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1040 "regex.h2"
+#line 1037 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -913,36 +914,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1047 "regex.h2"
+#line 1044 "regex.h2"
 };
 
-#line 1050 "regex.h2"
+#line 1047 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1053 "regex.h2"
+#line 1050 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1057 "regex.h2"
+#line 1054 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1061 "regex.h2"
-    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+#line 1058 "regex.h2"
+    public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1062 "regex.h2"
+#line 1059 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1067 "regex.h2"
+#line 1064 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1074 "regex.h2"
+#line 1071 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -950,17 +951,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1077 "regex.h2"
+#line 1074 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1082 "regex.h2"
+#line 1079 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::in str, cpp2::in code_);
 
-#line 1089 "regex.h2"
+#line 1086 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -968,16 +969,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1092 "regex.h2"
+#line 1089 "regex.h2"
 };
 
-#line 1095 "regex.h2"
+#line 1092 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1098 "regex.h2"
+#line 1095 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1102 "regex.h2"
+#line 1099 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -985,7 +986,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1105 "regex.h2"
+#line 1102 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -994,12 +995,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1114 "regex.h2"
+#line 1111 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1124 "regex.h2"
+#line 1121 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -1007,23 +1008,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1127 "regex.h2"
+#line 1124 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1133 "regex.h2"
+#line 1130 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1140 "regex.h2"
+#line 1137 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1154 "regex.h2"
-    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+#line 1153 "regex.h2"
+    public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1165 "regex.h2"
+#line 1159 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1031,33 +1032,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1176 "regex.h2"
+#line 1170 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1183 "regex.h2"
+#line 1177 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1200 "regex.h2"
+#line 1194 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1207 "regex.h2"
+#line 1201 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1215 "regex.h2"
+#line 1209 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1065,23 +1066,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1218 "regex.h2"
+#line 1212 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1231 "regex.h2"
+#line 1225 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1234 "regex.h2"
+#line 1228 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1241 "regex.h2"
+#line 1235 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1245 "regex.h2"
+#line 1239 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1089,30 +1090,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1250 "regex.h2"
+#line 1244 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1273 "regex.h2"
+#line 1267 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1278 "regex.h2"
+#line 1272 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1287 "regex.h2"
+#line 1281 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1394 "regex.h2"
+#line 1388 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1399 "regex.h2"
+#line 1393 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1120,21 +1121,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1405 "regex.h2"
+#line 1399 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1430 "regex.h2"
+#line 1424 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1442 "regex.h2"
+#line 1436 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1146,23 +1147,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1453 "regex.h2"
+#line 1447 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1478 "regex.h2"
+#line 1472 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1481 "regex.h2"
+#line 1475 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1488 "regex.h2"
+#line 1482 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1492 "regex.h2"
+#line 1486 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1170,14 +1171,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1495 "regex.h2"
+#line 1489 "regex.h2"
 };
 
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1506 "regex.h2"
+#line 1500 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1186,15 +1187,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1515 "regex.h2"
+#line 1509 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1522 "regex.h2"
+#line 1516 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1614 "regex.h2"
+#line 1608 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1202,32 +1203,32 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1617 "regex.h2"
+#line 1611 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1644 "regex.h2"
+#line 1638 "regex.h2"
 class group_token: public regex_token {
 
-#line 1647 "regex.h2"
+#line 1641 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr;
 
-#line 1664 "regex.h2"
+#line 1658 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1782 "regex.h2"
+#line 1776 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1799 "regex.h2"
+#line 1793 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1823 "regex.h2"
-    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+#line 1817 "regex.h2"
+    public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
     public: group_token() = default;
@@ -1235,22 +1236,22 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1830 "regex.h2"
+#line 1823 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1873 "regex.h2"
+#line 1866 "regex.h2"
 class modifier_token: public regex_token_base {
 
-#line 1876 "regex.h2"
+#line 1869 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1883 "regex.h2"
+#line 1876 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1258,7 +1259,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1887 "regex.h2"
+#line 1880 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1269,7 +1270,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1899 "regex.h2"
+#line 1892 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1280,57 +1281,58 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1906 "regex.h2"
+#line 1899 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1926 "regex.h2"
+#line 1919 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1938 "regex.h2"
+#line 1931 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1952 "regex.h2"
+#line 1945 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1957 "regex.h2"
+#line 1950 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1962 "regex.h2"
+#line 1955 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::in positive_);
 
-#line 1969 "regex.h2"
+#line 1962 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1975 "regex.h2"
-    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+#line 1968 "regex.h2"
+    public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
     public: lookahead_token(lookahead_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(lookahead_token const&) -> void = delete;
 
-#line 1976 "regex.h2"
+
+#line 1971 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool;
 
-#line 1987 "regex.h2"
+#line 1982 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2014 "regex.h2"
+#line 2009 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1344,17 +1346,17 @@ template                     using named_class_not_space = class
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2028 "regex.h2"
+#line 2023 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2054 "regex.h2"
+#line 2049 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2059 "regex.h2"
+#line 2054 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1364,25 +1366,26 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2136 "regex.h2"
+#line 2131 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2147 "regex.h2"
+#line 2142 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2159 "regex.h2"
+#line 2154 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2183 "regex.h2"
+#line 2178 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2191 "regex.h2"
-    public: [[nodiscard]] auto get_groups() const -> std::vector override;
+#line 2188 "regex.h2"
+    public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
     public: range_token(range_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token const&) -> void = delete;
 
+
 #line 2192 "regex.h2"
 };
 
@@ -1835,12 +1838,12 @@ template [[nodiscard]] auto generate_template(cpp2::in match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 72 "regex.h2"
+#line 73 "regex.h2"
     }
 
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }
                                    , alternatives_pos{ that.alternatives_pos }{}
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }
                                    , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 74 "regex.h2"
+#line 75 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1902,24 +1905,24 @@ namespace regex {
 
     // Getter and setter for groups
     //
-#line 78 "regex.h2"
+#line 79 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 80 "regex.h2"
+#line 81 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 86 "regex.h2"
+#line 87 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 92 "regex.h2"
+#line 93 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
@@ -1927,38 +1930,38 @@ namespace regex {
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 99 "regex.h2"
+#line 100 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 104 "regex.h2"
+#line 105 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 108 "regex.h2"
+#line 109 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 112 "regex.h2"
+#line 113 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
     // Getter and setter for alternatives
 
-#line 116 "regex.h2"
+#line 117 "regex.h2"
     template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
 
-#line 118 "regex.h2"
+#line 119 "regex.h2"
     template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
     }
 
     // Misc functions
     //
-#line 124 "regex.h2"
+#line 125 "regex.h2"
     template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
@@ -1973,23 +1976,23 @@ namespace regex {
         return r; 
     }
 
-#line 138 "regex.h2"
-    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
 #line 139 "regex.h2"
+    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
+#line 140 "regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 143 "regex.h2"
+#line 144 "regex.h2"
 // Flag change for matching modifiers. Creates a new flag for match_modifiers.
 // See expression_flags for possible flags.
 //
 
-#line 148 "regex.h2"
+#line 149 "regex.h2"
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
     template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
     template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
 
-#line 153 "regex.h2"
+#line 154 "regex.h2"
     template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::in old_flags) -> auto{
         auto new_flags {old_flags}; 
         if (reset) {
@@ -2001,66 +2004,66 @@ namespace regex {
         return new_flags; 
     }
 
-#line 164 "regex.h2"
+#line 165 "regex.h2"
     template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
 
-#line 169 "regex.h2"
+#line 170 "regex.h2"
 // Current modifiers for the regular expression.
 // See expression_flags for possible flags.
 //
 
-#line 174 "regex.h2"
+#line 175 "regex.h2"
     template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
 
     // Push/pop management
 
-#line 178 "regex.h2"
-    template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
 #line 179 "regex.h2"
-    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
+    template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
 #line 180 "regex.h2"
+    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
+#line 181 "regex.h2"
     template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
 
     // Flag management
     //
 
-#line 185 "regex.h2"
+#line 186 "regex.h2"
     template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::in f) const& -> bool{
         return  0 != (f & flags); 
     }
 
-#line 190 "regex.h2"
+#line 191 "regex.h2"
 //  Represents the remainder of the regular expression.
 //
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
 //  Otherwise the matcher can try a different alternative.
 //
 
-#line 196 "regex.h2"
+#line 197 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return match_select(cur, ctx, modifiers, end_func);  }
 
-#line 198 "regex.h2"
+#line 199 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { 
         return match_select(cur, ctx, modifiers, end_func);  }
 
-#line 201 "regex.h2"
+#line 202 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { 
         return First::match(cur, ctx, modifiers, end_func, matcher_list());  }
-#line 203 "regex.h2"
+#line 204 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return end_func(cur, ctx, modifiers);  }
 
-#line 205 "regex.h2"
-    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
 #line 206 "regex.h2"
+    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
+#line 207 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 208 "regex.h2"
+#line 209 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 213 "regex.h2"
+#line 214 "regex.h2"
     [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
-#line 216 "regex.h2"
+#line 217 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Character classes for regular expressions.
@@ -2071,72 +2074,72 @@ namespace regex {
 // Class syntax:  Example: a
 //
 
-#line 227 "regex.h2"
-    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
 #line 228 "regex.h2"
+    template  [[nodiscard]] auto single_class_entry::includes(cpp2::in c) -> auto { return c == C;  }
+#line 229 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 231 "regex.h2"
+#line 232 "regex.h2"
 // Class syntax: - Example: a-c
 //
 
-#line 235 "regex.h2"
-    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
 #line 236 "regex.h2"
+    template  [[nodiscard]] auto range_class_entry::includes(cpp2::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::cmp_less_eq(_0,_1) && cpp2::cmp_less_eq(_1,_2); }();  }
+#line 237 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 239 "regex.h2"
+#line 240 "regex.h2"
 // Helper for combining two character classes
 //
 
-#line 242 "regex.h2"
-    template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
 #line 243 "regex.h2"
+    template  [[nodiscard]] auto combined_class_entry::includes(cpp2::in c) -> auto { return (false || ... || List::includes(c));  }
+#line 244 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 246 "regex.h2"
+#line 247 "regex.h2"
 // Class syntax:   Example: abcd
 //
 
-#line 249 "regex.h2"
-    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
 #line 250 "regex.h2"
+    template  [[nodiscard]] auto list_class_entry::includes(cpp2::in c) -> auto { return (false || ... || (List == c));  }
+#line 251 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 253 "regex.h2"
+#line 254 "regex.h2"
 // Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
 #line 257 "regex.h2"
+    template  [[nodiscard]] auto named_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 258 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 262 "regex.h2"
+#line 263 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 265 "regex.h2"
+#line 266 "regex.h2"
 // Short class syntax: \  Example: \w
 //
 
-#line 268 "regex.h2"
-    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
 #line 269 "regex.h2"
+    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::in c) -> auto { return Inner::includes(c);  }
+#line 270 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
 
-#line 273 "regex.h2"
+#line 274 "regex.h2"
 // Named basic character classes
 //
 
-#line 279 "regex.h2"
+#line 280 "regex.h2"
 // Named other classes
 //
 
-#line 295 "regex.h2"
+#line 296 "regex.h2"
 // Shorthand class entries
 //
 
-#line 310 "regex.h2"
+#line 311 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Helper matchers for regular expressions.
@@ -2147,18 +2150,18 @@ namespace regex {
 // Regex syntax: none Example: -
 //
 
-#line 320 "regex.h2"
-    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
 #line 321 "regex.h2"
-    template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
 #line 322 "regex.h2"
+    template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 323 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
 
-#line 326 "regex.h2"
+#line 327 "regex.h2"
 // Helper for greedy alternatives
 //
 
-#line 329 "regex.h2"
+#line 330 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Other::match(cur, ctx, modifiers, end_func)}; 
         if (r.matched) {
@@ -2167,20 +2170,20 @@ namespace regex {
         return r; 
     }
 
-#line 337 "regex.h2"
-    template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 338 "regex.h2"
+    template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 339 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
-#line 341 "regex.h2"
+#line 342 "regex.h2"
 // Helper for standard matchers with special syntax
 //
 //
 
-#line 346 "regex.h2"
+#line 347 "regex.h2"
     template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
 
-#line 349 "regex.h2"
+#line 350 "regex.h2"
 //-----------------------------------------------------------------------
 //
 // Matchers and generators for regular expressions.
@@ -2188,69 +2191,69 @@ namespace regex {
 //-----------------------------------------------------------------------
 //
 
-#line 358 "regex.h2"
+#line 359 "regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 365 "regex.h2"
+#line 366 "regex.h2"
     template  on_return::on_return(Func const& f)
         : func{ f }{
 
-#line 367 "regex.h2"
+#line 368 "regex.h2"
     }
-#line 365 "regex.h2"
+#line 366 "regex.h2"
     template  auto on_return::operator=(Func const& f) -> on_return& {
         func = f;
         return *this;
 
-#line 367 "regex.h2"
+#line 368 "regex.h2"
     }
 
-#line 369 "regex.h2"
+#line 370 "regex.h2"
     template  on_return::~on_return() noexcept{
         std::move(*this).func();
     }
 
-#line 374 "regex.h2"
+#line 375 "regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
-#line 380 "regex.h2"
+#line 381 "regex.h2"
     regex_token::regex_token(cpp2::in str)
         : string_rep{ str }{
 
-#line 382 "regex.h2"
+#line 383 "regex.h2"
     }
 
-#line 384 "regex.h2"
+#line 385 "regex.h2"
     regex_token::regex_token()
         : string_rep{ "" }{
 
-#line 386 "regex.h2"
+#line 387 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
 
-#line 392 "regex.h2"
-    [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
 #line 393 "regex.h2"
+    [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
+#line 394 "regex.h2"
     auto regex_token::set_string(cpp2::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}
 
-#line 410 "regex.h2"
+#line 411 "regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(new_list))));
     }
 
-#line 416 "regex.h2"
+#line 417 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         //std::swap(modifiers, t.modifiers); // TODO:
     }
 
-#line 422 "regex.h2"
+#line 423 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
         if (CPP2_UFCS(empty)(alternate_match_lists)) {
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
@@ -2261,13 +2264,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 432 "regex.h2"
+#line 433 "regex.h2"
     auto parse_context_group_state::add(cpp2::in token) & -> void { CPP2_UFCS(push_back)(cur_match_list, token);  }
 
-#line 434 "regex.h2"
+#line 435 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 444 "regex.h2"
+#line 445 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2276,20 +2279,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 452 "regex.h2"
+#line 453 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 457 "regex.h2"
+#line 458 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 463 "regex.h2"
+#line 464 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -2297,13 +2300,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 482 "regex.h2"
+#line 483 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 484 "regex.h2"
+#line 485 "regex.h2"
     }
-#line 482 "regex.h2"
+#line 483 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -2313,10 +2316,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         named_groups = {};
         return *this;
 
-#line 484 "regex.h2"
+#line 485 "regex.h2"
     }
 
-#line 489 "regex.h2"
+#line 490 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2324,24 +2327,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 496 "regex.h2"
+#line 497 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 502 "regex.h2"
+#line 503 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> regex_parser_modifier_state{
         return {  }; // TODO:
     }
 
-#line 506 "regex.h2"
+#line 507 "regex.h2"
     auto parse_context::set_modifiers(cpp2::in mod) & -> void{
         static_cast(mod);
     }
 
-#line 513 "regex.h2"
+#line 514 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2350,36 +2353,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 521 "regex.h2"
+#line 522 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(max_group));
     }
 
-#line 527 "regex.h2"
+#line 528 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 535 "regex.h2"
+#line 536 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 537 "regex.h2"
+#line 538 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::in start, cpp2::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
 
-#line 539 "regex.h2"
+#line 540 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 543 "regex.h2"
+#line 544 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 547 "regex.h2"
+#line 548 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2390,29 +2393,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 557 "regex.h2"
+#line 558 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 562 "regex.h2"
+#line 563 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 566 "regex.h2"
+#line 567 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 570 "regex.h2"
+#line 571 "regex.h2"
     auto parse_context::set_named_group(cpp2::in name, cpp2::in id) & -> void{
         if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 576 "regex.h2"
+#line 577 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
@@ -2423,10 +2426,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 586 "regex.h2"
+#line 587 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 588 "regex.h2"
+#line 589 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2437,14 +2440,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 598 "regex.h2"
-    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 599 "regex.h2"
-    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 600 "regex.h2"
+    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+#line 601 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 602 "regex.h2"
+#line 603 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2454,19 +2457,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 611 "regex.h2"
+#line 612 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
 
-#line 613 "regex.h2"
+#line 614 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 615 "regex.h2"
+#line 616 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 620 "regex.h2"
+#line 621 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2479,10 +2482,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 632 "regex.h2"
+#line 633 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 634 "regex.h2"
+#line 635 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2522,7 +2525,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 674 "regex.h2"
+#line 675 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2544,14 +2547,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 695 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
 #line 696 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
 #line 697 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+#line 698 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 699 "regex.h2"
+#line 700 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2564,7 +2567,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 711 "regex.h2"
+#line 712 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2585,7 +2588,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(r.value()); 
     }
 
-#line 731 "regex.h2"
+#line 732 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2596,12 +2599,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 741 "regex.h2"
-    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
 #line 742 "regex.h2"
+    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
+#line 743 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 744 "regex.h2"
+#line 745 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       regex_parser_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2667,7 +2670,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 809 "regex.h2"
+#line 810 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2705,10 +2708,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 846 "regex.h2"
+#line 847 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 855 "regex.h2"
+#line 856 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2716,27 +2719,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 862 "regex.h2"
+#line 863 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 877 "regex.h2"
+#line 878 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 879 "regex.h2"
+#line 880 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 884 "regex.h2"
+#line 885 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 889 "regex.h2"
+#line 890 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2744,14 +2747,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 896 "regex.h2"
+#line 897 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 902 "regex.h2"
+#line 903 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2760,8 +2763,8 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 910 "regex.h2"
-    [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
+#line 911 "regex.h2"
+    [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
         }
@@ -2782,22 +2785,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 932 "regex.h2"
+#line 933 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 936 "regex.h2"
+#line 937 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 940 "regex.h2"
+#line 941 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 944 "regex.h2"
+#line 945 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2807,14 +2810,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 959 "regex.h2"
+#line 960 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2827,38 +2830,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 971 "regex.h2"
+#line 972 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 975 "regex.h2"
+#line 976 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 979 "regex.h2"
+#line 980 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 985 "regex.h2"
+#line 986 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 991 "regex.h2"
+#line 992 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 997 "regex.h2"
+#line 998 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2867,7 +2870,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1005 "regex.h2"
+#line 1006 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2876,33 +2879,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1019 "regex.h2"
+#line 1020 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1022 "regex.h2"
+#line 1023 "regex.h2"
     }
 
-#line 1024 "regex.h2"
+#line 1025 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1030 "regex.h2"
-    [[nodiscard]] auto regex_token_list::get_groups() const -> std::vector{
-        std::vector r {}; 
+#line 1031 "regex.h2"
+    auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
-            auto c {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(token)))}; 
-            static_cast(CPP2_UFCS(insert)(r, CPP2_UFCS(end)(r), CPP2_UFCS(begin)(c), CPP2_UFCS(end)(std::move(c))));
+            CPP2_UFCS(add_groups)((*cpp2::assert_not_null(token)), groups);
         }
-
-        return r; 
     }
 
-#line 1040 "regex.h2"
+#line 1037 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2913,74 +2912,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1053 "regex.h2"
+#line 1050 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1055 "regex.h2"
+#line 1052 "regex.h2"
     }
 
-#line 1057 "regex.h2"
+#line 1054 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1059 "regex.h2"
+#line 1056 "regex.h2"
     }
 
-#line 1061 "regex.h2"
-    [[nodiscard]] auto regex_token_base::get_groups() const -> std::vector{return {  }; }
+#line 1058 "regex.h2"
+    auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1069 "regex.h2"
+#line 1066 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1072 "regex.h2"
+#line 1069 "regex.h2"
     }
 
-#line 1074 "regex.h2"
+#line 1071 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1084 "regex.h2"
+#line 1081 "regex.h2"
     regex_token_code::regex_token_code(cpp2::in str, cpp2::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1087 "regex.h2"
+#line 1084 "regex.h2"
     }
 
-#line 1089 "regex.h2"
+#line 1086 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add)(ctx, code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1098 "regex.h2"
+#line 1095 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1100 "regex.h2"
+#line 1097 "regex.h2"
     }
 
-#line 1102 "regex.h2"
+#line 1099 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1114 "regex.h2"
+#line 1111 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1116 "regex.h2"
+#line 1113 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2989,29 +2988,31 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1124 "regex.h2"
+#line 1121 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1135 "regex.h2"
+#line 1132 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1138 "regex.h2"
+#line 1135 "regex.h2"
     }
 
-#line 1140 "regex.h2"
+#line 1137 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
-        int i {0}; 
-        for( ; cpp2::cmp_less(i,CPP2_UFCS(ssize)(alternatives)); i += 1 ) {
-            functions += ", " + CPP2_UFCS(generate_func)(ctx, CPP2_ASSERT_IN_BOUNDS(alternatives, i));
-            functions += ", " + CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(CPP2_ASSERT_IN_BOUNDS(alternatives, i)))));
+        for ( auto const& cur : alternatives ) {
+            std::set groups {}; 
+            CPP2_UFCS(add_groups)((*cpp2::assert_not_null(cur)), groups);
+
+            functions += ", " + CPP2_UFCS(generate_func)(ctx, cur);
+            functions += ", " + CPP2_UFCS(generate_reset)(ctx, std::move(groups));
         }
 
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
@@ -3019,19 +3020,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1154 "regex.h2"
-    [[nodiscard]] auto alternative_token_gen::get_groups() const -> std::vector{
-        std::vector r {}; 
-
+#line 1153 "regex.h2"
+    auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
-            auto t {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(cur)))}; 
-            static_cast(CPP2_UFCS(insert)(r, CPP2_UFCS(end)(r), CPP2_UFCS(begin)(t), CPP2_UFCS(end)(std::move(t))));
+            CPP2_UFCS(add_groups)((*cpp2::assert_not_null(cur)), groups);
         }
-
-        return r; 
     }
 
-#line 1165 "regex.h2"
+#line 1159 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -3046,11 +3042,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1180 "regex.h2"
+#line 1174 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1183 "regex.h2"
+#line 1177 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3069,25 +3065,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1207 "regex.h2"
+#line 1201 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1209 "regex.h2"
+#line 1203 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1215 "regex.h2"
+#line 1209 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1220 "regex.h2"
+#line 1214 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3099,20 +3095,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1236 "regex.h2"
+#line 1230 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1239 "regex.h2"
+#line 1233 "regex.h2"
     }
 
-#line 1241 "regex.h2"
+#line 1235 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1245 "regex.h2"
+#line 1239 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3121,7 +3117,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1252 "regex.h2"
+#line 1246 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3143,16 +3139,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1281 "regex.h2"
+#line 1275 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1285 "regex.h2"
+#line 1279 "regex.h2"
     }
 
-#line 1288 "regex.h2"
+#line 1282 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3259,12 +3255,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1394 "regex.h2"
+#line 1388 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1399 "regex.h2"
+#line 1393 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3274,7 +3270,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1409 "regex.h2"
+#line 1403 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3296,7 +3292,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1430 "regex.h2"
+#line 1424 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3309,11 +3305,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1455 "regex.h2"
+#line 1449 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1459 "regex.h2"
+#line 1453 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3333,27 +3329,27 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1483 "regex.h2"
+#line 1477 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1486 "regex.h2"
+#line 1480 "regex.h2"
     }
 
-#line 1488 "regex.h2"
+#line 1482 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1492 "regex.h2"
+#line 1486 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1499 "regex.h2"
+#line 1493 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
 
@@ -3361,15 +3357,15 @@ template [[nodiscard]] auto char_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
 }
 
-#line 1517 "regex.h2"
+#line 1511 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1520 "regex.h2"
+#line 1514 "regex.h2"
     }
 
-#line 1522 "regex.h2"
+#line 1516 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3462,14 +3458,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1614 "regex.h2"
+#line 1608 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1619 "regex.h2"
+#line 1613 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3495,7 +3491,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1651 "regex.h2"
+#line 1645 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr{
         static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
 
@@ -3509,7 +3505,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1664 "regex.h2"
+#line 1658 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3628,7 +3624,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1782 "regex.h2"
+#line 1776 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3646,7 +3642,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1799 "regex.h2"
+#line 1793 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3671,18 +3667,17 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1823 "regex.h2"
-    [[nodiscard]] auto group_token::get_groups() const -> std::vector{
-        auto r {CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner)))}; 
+#line 1817 "regex.h2"
+    auto group_token::add_groups(std::set& groups) const -> void{
+        CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
         if (-1 != number) {
-            CPP2_UFCS(push_back)(r, number);
+            static_cast(CPP2_UFCS(insert)(groups, number));
         }
-        return r; 
     }
 
     group_token::~group_token() noexcept{}
 
-#line 1834 "regex.h2"
+#line 1827 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
 
@@ -3722,15 +3717,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return r; 
 }
 
-#line 1878 "regex.h2"
+#line 1871 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1881 "regex.h2"
+#line 1874 "regex.h2"
     }
 
-#line 1883 "regex.h2"
+#line 1876 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3738,7 +3733,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1891 "regex.h2"
+#line 1884 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3748,12 +3743,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1903 "regex.h2"
+#line 1896 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1910 "regex.h2"
+#line 1903 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3770,7 +3765,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1926 "regex.h2"
+#line 1919 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3783,7 +3778,7 @@ template [[
     }}
 }
 
-#line 1940 "regex.h2"
+#line 1933 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3796,33 +3791,35 @@ template [[
     }
 }
 
-#line 1952 "regex.h2"
+#line 1945 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1965 "regex.h2"
+#line 1958 "regex.h2"
     lookahead_token::lookahead_token(cpp2::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1967 "regex.h2"
+#line 1960 "regex.h2"
     }
 
-#line 1969 "regex.h2"
+#line 1962 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
 
         CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ")"));
     }
 
-#line 1975 "regex.h2"
-    [[nodiscard]] auto lookahead_token::get_groups() const -> std::vector{return {  }; }
+#line 1968 "regex.h2"
+    auto lookahead_token::add_groups(std::set& groups) const -> void{
+        CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
+    }
 
-    lookahead_token::~lookahead_token() noexcept{}// TODO: Implement
+    lookahead_token::~lookahead_token() noexcept{}
 
-#line 1978 "regex.h2"
+#line 1973 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool{
     auto r {func(cur, ctx, modifiers, true_end_func())}; 
     if (!(positive)) {
@@ -3832,7 +3829,7 @@ template [[nodiscard]] auto lookahead_token_match
     return std::move(r).matched; 
 }
 
-#line 1990 "regex.h2"
+#line 1985 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3857,7 +3854,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
 }
 
-#line 2030 "regex.h2"
+#line 2025 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
 
@@ -3882,11 +3879,11 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2064 "regex.h2"
+#line 2059 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2066 "regex.h2"
+#line 2061 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3930,7 +3927,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2110 "regex.h2"
+#line 2105 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3957,7 +3954,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2136 "regex.h2"
+#line 2131 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3969,7 +3966,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2147 "regex.h2"
+#line 2142 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3982,7 +3979,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2159 "regex.h2"
+#line 2154 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -4007,19 +4004,23 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2183 "regex.h2"
+#line 2178 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
-        auto reset_name {CPP2_UFCS(generate_reset)(ctx, CPP2_UFCS(get_groups)((*cpp2::assert_not_null(inner_token))))}; 
+        std::set groups {}; 
+        CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner_token)), groups);
+        auto reset_name {CPP2_UFCS(generate_reset)(ctx, std::move(groups))}; 
 
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2191 "regex.h2"
-    [[nodiscard]] auto range_token::get_groups() const -> std::vector{return {  }; }
+#line 2188 "regex.h2"
+    auto range_token::add_groups(std::set& groups) const -> void{
+        CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner_token)), groups);
+    }
 
-    range_token::~range_token() noexcept{}// TODO: Implement
+    range_token::~range_token() noexcept{}
 
 #line 2196 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
diff --git a/source/regex.h2 b/source/regex.h2
index 5b618e0dcc..e196b18fca 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -11,6 +11,7 @@
 // THE SOFTWARE.
 
 #include 
+#include 
 
 cpp2: namespace = {
 
@@ -388,7 +389,7 @@ regex_token: @polymorphic_base type = {
     //parse: (inout ctx: parse_context) -> token_ptr;
     generate_code: (virtual this, inout _: generation_context);
 
-    get_groups: (virtual this) -> std::vector;
+    add_groups: (virtual this, inout _: std::set);
     to_string: (this) -> std::string         = { return string_rep; }
     set_string: (inout this, s: std::string) = { string_rep = s; }
 }
@@ -907,7 +908,7 @@ generation_context: type = {
         return name;
     }
 
-    generate_reset: (inout this, groups: std::vector) -> std::string = {
+    generate_reset: (inout this, groups: std::set) -> std::string = {
         if groups.empty() {
             return "cpp2::regex::no_reset()";
         }
@@ -1027,14 +1028,10 @@ regex_token_list: @polymorphic_base type = {
         }
     }
 
-    get_groups: (virtual this) -> std::vector = {
-        r : std::vector = ();
+    add_groups: (virtual this, inout groups: std::set) = {
         for tokens do (token) {
-            c := token*.get_groups();
-            _ = r.insert(r.end(), c.begin(), c.end());
+            token*.add_groups(groups);
         }
-
-        return r;
     }
 
     gen_string: (vec: token_vec) -> std::string = {
@@ -1058,7 +1055,7 @@ regex_token_base: @polymorphic_base type = {
         regex_token = ();
     }
 
-    get_groups: (override this) -> std::vector = { return (); }
+    add_groups: (override this, inout _: std::set) = {}
 }
 
 regex_token_check: @polymorphic_base type = {
@@ -1140,10 +1137,12 @@ alternative_token_gen: @polymorphic_base type = {
     generate_code: (override this, inout ctx: generation_context) = {
         functions: std::string = "";
 
-        i: int = 0;
-        while i < alternatives.ssize() next i += 1 {
-            functions += ", " + ctx.generate_func(alternatives[i]);
-            functions += ", " + ctx.generate_reset(alternatives[i]*.get_groups());
+        for alternatives do (cur) {
+            groups: std::set = ();
+            cur*.add_groups(groups);
+
+            functions += ", " + ctx.generate_func(cur);
+            functions += ", " + ctx.generate_reset(groups);
         }
 
         next_name := ctx.next_func_name();
@@ -1151,15 +1150,10 @@ alternative_token_gen: @polymorphic_base type = {
         ctx.add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match((ctx.match_parameters())$, other, (next_name)$ (functions)$)");
     }
 
-    get_groups: (override this) -> std::vector = {
-        r: std::vector = ();
-
+    add_groups: (override this, inout groups: std::set) = {
         for alternatives do (cur) {
-            t := cur*.get_groups();
-            _ = r.insert(r.end(), t.begin(), t.end());
+            cur*.add_groups(groups);
         }
-
-        return r;
     }
 
     gen_string: (a: token_vec) -> std::string = {
@@ -1820,12 +1814,11 @@ group_token: @polymorphic_base type = {
         ctx.add_statefull(next_name, "cpp2::regex::pop_modifiers_matcher::match((ctx.match_parameters())$, other, (next_name)$)");
     }
 
-    get_groups: (override this) -> std::vector = {
-        r := inner*.get_groups();
+    add_groups: (override this, inout groups: std::set) = {
+        inner*.add_groups(groups);
         if -1 != number {
-            r.push_back(number);
+            _ = groups.insert(number);
         }
-        return r;
     }
 }
 
@@ -1972,7 +1965,9 @@ lookahead_token: @polymorphic_base type = {
         ctx.add_check("lookahead_token_matcher((ctx.match_parameters())$, (inner_name)$)");
     }
 
-    get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
+    add_groups: (override this, inout groups: std::set) = {
+        inner*.add_groups(groups);
+    }
 }
 
 lookahead_token_matcher:  (cur, inout ctx, modifiers, func) -> bool = {
@@ -2182,13 +2177,18 @@ range_token: @polymorphic_base type = {
 
     generate_code: (override this, inout ctx: generation_context) = {
         inner_name := ctx.generate_func(inner_token);
-        reset_name := ctx.generate_reset(inner_token*.get_groups());
+        groups: std::set = ();
+        inner_token*.add_groups(groups);
+        reset_name := ctx.generate_reset(groups);
 
         next_name := ctx.next_func_name();
         ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match((ctx.match_parameters())$, (inner_name)$, (reset_name)$, other, (next_name)$)");
     }
 
-    get_groups: (override this) -> std::vector = { return (); } // TODO: Implement
+    add_groups: (override this, inout groups: std::set) = {
+        inner_token*.add_groups(groups);
+    }
+
 }
 
 range_token_matcher:  type = {

From 698b02a7d7310efb737f04323bc29aa909f5bcf6 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 14 May 2024 10:10:37 +0200
Subject: [PATCH 121/161] Added modifier handling.

---
 include/cpp2regex.h | 1077 ++++++++++++++++++++++---------------------
 source/regex.h2     |   35 +-
 2 files changed, 565 insertions(+), 547 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 13a08e68d7..ef4698012d 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -95,145 +95,149 @@ template class on_return;
 #line 377 "regex.h2"
 class regex_token;
 
-#line 401 "regex.h2"
+#line 402 "regex.h2"
+class parse_context_modifier_state;
+    
+
+#line 409 "regex.h2"
 class parse_context_group_state;
 
-#line 439 "regex.h2"
+#line 447 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 472 "regex.h2"
+#line 480 "regex.h2"
 class parse_context;
     
 
-#line 852 "regex.h2"
+#line 859 "regex.h2"
 class generation_function_context;
     
 
-#line 868 "regex.h2"
+#line 875 "regex.h2"
 class generation_context;
 
-#line 1015 "regex.h2"
+#line 1022 "regex.h2"
 class regex_token_list;
     
 
-#line 1047 "regex.h2"
+#line 1054 "regex.h2"
 class regex_token_base;
     
 
-#line 1061 "regex.h2"
+#line 1068 "regex.h2"
 class regex_token_check;
     
 
-#line 1076 "regex.h2"
+#line 1083 "regex.h2"
 class regex_token_code;
     
 
-#line 1092 "regex.h2"
+#line 1099 "regex.h2"
 class regex_token_empty;
     
 
-#line 1108 "regex.h2"
+#line 1115 "regex.h2"
 class alternative_token;
     
 
-#line 1126 "regex.h2"
+#line 1133 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1172 "regex.h2"
+#line 1179 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1198 "regex.h2"
+#line 1205 "regex.h2"
 class any_token;
     
 
-#line 1225 "regex.h2"
+#line 1232 "regex.h2"
 class char_token;
     
 
-#line 1269 "regex.h2"
+#line 1276 "regex.h2"
 class class_token;
     
 
-#line 1401 "regex.h2"
+#line 1408 "regex.h2"
 template class class_token_matcher;
 
-#line 1472 "regex.h2"
+#line 1479 "regex.h2"
 class escaped_char_token;
     
 
-#line 1506 "regex.h2"
+#line 1513 "regex.h2"
 class group_ref_token;
     
 
-#line 1638 "regex.h2"
+#line 1645 "regex.h2"
 class group_token;
     
 
-#line 1866 "regex.h2"
+#line 1873 "regex.h2"
 class modifier_token;
     
 
-#line 1882 "regex.h2"
+#line 1889 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1894 "regex.h2"
+#line 1901 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1952 "regex.h2"
+#line 1959 "regex.h2"
 class lookahead_token;
     
 
-#line 2051 "regex.h2"
+#line 2058 "regex.h2"
 class range_token;
     
 
-#line 2194 "regex.h2"
+#line 2201 "regex.h2"
 template class range_token_matcher;
 
-#line 2319 "regex.h2"
+#line 2326 "regex.h2"
 class special_range_token;
     
 
-#line 2409 "regex.h2"
+#line 2416 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2417 "regex.h2"
+#line 2424 "regex.h2"
 template class char_matcher_logic;
 
-#line 2445 "regex.h2"
+#line 2452 "regex.h2"
 template class class_matcher_logic;
 
-#line 2502 "regex.h2"
+#line 2509 "regex.h2"
 template class group_name_list;
 
-#line 2514 "regex.h2"
+#line 2521 "regex.h2"
 class group_name_list_end;
     
 
-#line 2519 "regex.h2"
+#line 2526 "regex.h2"
 template class regular_expression;
 
-#line 2600 "regex.h2"
+#line 2607 "regex.h2"
 template class regular_expression_with_matcher;
 
-#line 2689 "regex.h2"
+#line 2696 "regex.h2"
 class regex_parser_modifier_state;
     
 
-#line 2696 "regex.h2"
+#line 2703 "regex.h2"
 class regex_parser_group_state;
 
-#line 2731 "regex.h2"
+#line 2738 "regex.h2"
 class regex_branch_reset_state;
     
 
-#line 2758 "regex.h2"
+#line 2765 "regex.h2"
 template class regex_parser;
 
-#line 3107 "regex.h2"
+#line 3114 "regex.h2"
 }
 }
 
@@ -624,6 +628,14 @@ class regex_token {
 using token_ptr = std::shared_ptr;
 using token_vec = std::vector;
 
+// State of the expression modifiers.
+//
+class parse_context_modifier_state {
+    public: bool group_captures_have_numbers {true}; 
+    public: bool perl_code_syntax {false}; 
+    public: bool perl_code_syntax_in_classes {false}; 
+};
+
 // State of the current group. See '()'
 class parse_context_group_state {
 
@@ -633,17 +645,17 @@ class parse_context_group_state {
     // List of alternate matcher lists. E.g. ab|cd|xy
     public: token_vec alternate_match_lists {}; 
 
-    //modifiers : parse_context_modifier_state = (); // TODO:
+    public: parse_context_modifier_state modifiers {}; 
 
     public: auto next_alternative() & -> void;
 
-#line 417 "regex.h2"
+#line 425 "regex.h2"
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 423 "regex.h2"
+#line 431 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 433 "regex.h2"
+#line 441 "regex.h2"
     public: auto add(cpp2::in token) & -> void;
 
     public: [[nodiscard]] auto empty() const& -> bool;
@@ -658,16 +670,16 @@ class parse_context_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 453 "regex.h2"
+#line 461 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 458 "regex.h2"
+#line 466 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 464 "regex.h2"
+#line 472 "regex.h2"
     public: auto set_active_reset(cpp2::in restart) & -> void;
 
-#line 470 "regex.h2"
+#line 478 "regex.h2"
 };
 
 class parse_context {
@@ -682,37 +694,37 @@ class parse_context {
     private: std::map named_groups {}; 
 
     public: explicit parse_context(cpp2::in r);
-#line 483 "regex.h2"
+#line 491 "regex.h2"
     public: auto operator=(cpp2::in r) -> parse_context& ;
 
-#line 487 "regex.h2"
+#line 495 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 497 "regex.h2"
+#line 505 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
 
-#line 503 "regex.h2"
-    public: [[nodiscard]] auto get_modifiers() const& -> regex_parser_modifier_state;
+#line 511 "regex.h2"
+    public: [[nodiscard]] auto get_modifiers() const& -> parse_context_modifier_state;
 
-#line 507 "regex.h2"
-    public: auto set_modifiers(cpp2::in mod) & -> void;
+#line 515 "regex.h2"
+    public: auto set_modifiers(cpp2::in mod) & -> void;
 
-#line 511 "regex.h2"
+#line 519 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 522 "regex.h2"
+#line 530 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 528 "regex.h2"
+#line 536 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 533 "regex.h2"
+#line 541 "regex.h2"
     // Position management functions
     //
 
@@ -722,88 +734,88 @@ class parse_context {
 
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 544 "regex.h2"
+#line 552 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 548 "regex.h2"
+#line 556 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 558 "regex.h2"
+#line 566 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 562 "regex.h2"
+#line 570 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 567 "regex.h2"
+#line 575 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 571 "regex.h2"
+#line 579 "regex.h2"
     public: auto set_named_group(cpp2::in name, cpp2::in id) & -> void;
 
-#line 577 "regex.h2"
+#line 585 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
 
-#line 587 "regex.h2"
+#line 595 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 599 "regex.h2"
+#line 607 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::in n) & -> bool;
 
-#line 612 "regex.h2"
+#line 620 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 621 "regex.h2"
+#line 629 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 633 "regex.h2"
+#line 641 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 675 "regex.h2"
+#line 682 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 696 "regex.h2"
+#line 703 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 712 "regex.h2"
+#line 719 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 732 "regex.h2"
+#line 739 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 742 "regex.h2"
+#line 749 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
-                      regex_parser_modifier_state& parser_modifiers) & -> bool;
+                      parse_context_modifier_state& parser_modifiers) & -> bool;
 
-#line 810 "regex.h2"
+#line 817 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 847 "regex.h2"
+#line 854 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 850 "regex.h2"
+#line 857 "regex.h2"
 };
 
 class generation_function_context {
@@ -812,10 +824,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 863 "regex.h2"
+#line 870 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 866 "regex.h2"
+#line 873 "regex.h2"
 };
 
 class generation_context {
@@ -832,81 +844,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 885 "regex.h2"
+#line 892 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 890 "regex.h2"
+#line 897 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 897 "regex.h2"
+#line 904 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 903 "regex.h2"
+#line 910 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 911 "regex.h2"
+#line 918 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 933 "regex.h2"
+#line 940 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 937 "regex.h2"
+#line 944 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 941 "regex.h2"
+#line 948 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 945 "regex.h2"
+#line 952 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 954 "regex.h2"
+#line 961 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 960 "regex.h2"
+#line 967 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 972 "regex.h2"
+#line 979 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 976 "regex.h2"
+#line 983 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 980 "regex.h2"
+#line 987 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 986 "regex.h2"
+#line 993 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 992 "regex.h2"
+#line 999 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 998 "regex.h2"
+#line 1005 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1006 "regex.h2"
+#line 1013 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1013 "regex.h2"
+#line 1020 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1018 "regex.h2"
+#line 1025 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1025 "regex.h2"
+#line 1032 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1031 "regex.h2"
+#line 1038 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1037 "regex.h2"
+#line 1044 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -914,36 +926,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1044 "regex.h2"
+#line 1051 "regex.h2"
 };
 
-#line 1047 "regex.h2"
+#line 1054 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1050 "regex.h2"
+#line 1057 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1054 "regex.h2"
+#line 1061 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1058 "regex.h2"
+#line 1065 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1059 "regex.h2"
+#line 1066 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1064 "regex.h2"
+#line 1071 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1071 "regex.h2"
+#line 1078 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -951,17 +963,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1074 "regex.h2"
+#line 1081 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1079 "regex.h2"
+#line 1086 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::in str, cpp2::in code_);
 
-#line 1086 "regex.h2"
+#line 1093 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -969,16 +981,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1089 "regex.h2"
+#line 1096 "regex.h2"
 };
 
-#line 1092 "regex.h2"
+#line 1099 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1095 "regex.h2"
+#line 1102 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1099 "regex.h2"
+#line 1106 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -986,7 +998,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1102 "regex.h2"
+#line 1109 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -995,12 +1007,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1111 "regex.h2"
+#line 1118 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1121 "regex.h2"
+#line 1128 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -1008,23 +1020,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1124 "regex.h2"
+#line 1131 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1130 "regex.h2"
+#line 1137 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1137 "regex.h2"
+#line 1144 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1153 "regex.h2"
+#line 1160 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1159 "regex.h2"
+#line 1166 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1032,33 +1044,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1170 "regex.h2"
+#line 1177 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1177 "regex.h2"
+#line 1184 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1194 "regex.h2"
+#line 1201 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1201 "regex.h2"
+#line 1208 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1209 "regex.h2"
+#line 1216 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1066,23 +1078,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1212 "regex.h2"
+#line 1219 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1225 "regex.h2"
+#line 1232 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1228 "regex.h2"
+#line 1235 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1235 "regex.h2"
+#line 1242 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1239 "regex.h2"
+#line 1246 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1090,30 +1102,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1244 "regex.h2"
+#line 1251 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1267 "regex.h2"
+#line 1274 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1272 "regex.h2"
+#line 1279 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1281 "regex.h2"
+#line 1288 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1388 "regex.h2"
+#line 1395 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1393 "regex.h2"
+#line 1400 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1121,21 +1133,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1399 "regex.h2"
+#line 1406 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1424 "regex.h2"
+#line 1431 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1436 "regex.h2"
+#line 1443 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1147,23 +1159,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1447 "regex.h2"
+#line 1454 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1472 "regex.h2"
+#line 1479 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1475 "regex.h2"
+#line 1482 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1482 "regex.h2"
+#line 1489 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1486 "regex.h2"
+#line 1493 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1171,14 +1183,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1489 "regex.h2"
+#line 1496 "regex.h2"
 };
 
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1500 "regex.h2"
+#line 1507 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1187,15 +1199,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1509 "regex.h2"
+#line 1516 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1516 "regex.h2"
+#line 1523 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1608 "regex.h2"
+#line 1615 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1203,31 +1215,31 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1611 "regex.h2"
+#line 1618 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1638 "regex.h2"
+#line 1645 "regex.h2"
 class group_token: public regex_token {
 
-#line 1641 "regex.h2"
+#line 1648 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr;
 
-#line 1658 "regex.h2"
+#line 1665 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1776 "regex.h2"
+#line 1783 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1793 "regex.h2"
+#line 1800 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1817 "regex.h2"
+#line 1824 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1236,22 +1248,22 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1823 "regex.h2"
+#line 1830 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1866 "regex.h2"
+#line 1873 "regex.h2"
 class modifier_token: public regex_token_base {
 
-#line 1869 "regex.h2"
+#line 1876 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1876 "regex.h2"
+#line 1883 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1259,7 +1271,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1880 "regex.h2"
+#line 1887 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1270,7 +1282,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1892 "regex.h2"
+#line 1899 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1281,39 +1293,39 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1899 "regex.h2"
+#line 1906 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1919 "regex.h2"
+#line 1926 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1931 "regex.h2"
+#line 1938 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1945 "regex.h2"
+#line 1952 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1950 "regex.h2"
+#line 1957 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1955 "regex.h2"
+#line 1962 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::in positive_);
 
-#line 1962 "regex.h2"
+#line 1969 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1968 "regex.h2"
+#line 1975 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1321,18 +1333,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1971 "regex.h2"
+#line 1978 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool;
 
-#line 1982 "regex.h2"
+#line 1989 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2009 "regex.h2"
+#line 2016 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1346,17 +1358,17 @@ template                     using named_class_not_space = class
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2023 "regex.h2"
+#line 2030 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2049 "regex.h2"
+#line 2056 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2054 "regex.h2"
+#line 2061 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1366,19 +1378,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2131 "regex.h2"
+#line 2138 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2142 "regex.h2"
+#line 2149 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2154 "regex.h2"
+#line 2161 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2178 "regex.h2"
+#line 2185 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2188 "regex.h2"
+#line 2195 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1386,46 +1398,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2192 "regex.h2"
+#line 2199 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2208 "regex.h2"
+#line 2215 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2213 "regex.h2"
+#line 2220 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2218 "regex.h2"
+#line 2225 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2224 "regex.h2"
+#line 2231 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2239 "regex.h2"
+#line 2246 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2267 "regex.h2"
+#line 2274 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2291 "regex.h2"
+#line 2298 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2315 "regex.h2"
+#line 2322 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2322 "regex.h2"
+#line 2329 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1434,7 +1446,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2351 "regex.h2"
+#line 2358 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1443,10 +1455,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2373 "regex.h2"
+#line 2380 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2399 "regex.h2"
+#line 2406 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1454,7 +1466,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2407 "regex.h2"
+#line 2414 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1465,7 +1477,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2413 "regex.h2"
+#line 2420 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1474,27 +1486,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2438 "regex.h2"
+#line 2445 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2440 "regex.h2"
+#line 2447 "regex.h2"
 };
 
-#line 2443 "regex.h2"
+#line 2450 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2466 "regex.h2"
+#line 2473 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2478 "regex.h2"
+#line 2485 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1503,10 +1515,10 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2490 "regex.h2"
+#line 2497 "regex.h2"
 };
 
-#line 2493 "regex.h2"
+#line 2500 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1524,7 +1536,7 @@ template class group_name_list
     public: auto operator=(group_name_list const&) -> void = delete;
 
 
-#line 2512 "regex.h2"
+#line 2519 "regex.h2"
 };
 
 class group_name_list_end {
@@ -1533,7 +1545,7 @@ class group_name_list_end {
     public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(group_name_list_end const&) -> void = delete;
 
-#line 2516 "regex.h2"
+#line 2523 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1549,7 +1561,7 @@ template matched_, context const& ctx_);
 
-#line 2534 "regex.h2"
+#line 2541 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1564,7 +1576,7 @@ template void = delete;
 
 
-#line 2550 "regex.h2"
+#line 2557 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1572,13 +1584,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2562 "regex.h2"
+#line 2569 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2584 "regex.h2"
+#line 2591 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1590,7 +1602,7 @@ template void = delete;
 
 
-#line 2597 "regex.h2"
+#line 2604 "regex.h2"
 };
 
 // Regular expression implementation
@@ -1606,7 +1618,7 @@ template class regular_expression_with_matcher
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2615 "regex.h2"
+#line 2622 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1621,7 +1633,7 @@ template class regular_expression_with_matcher
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2631 "regex.h2"
+#line 2638 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1629,13 +1641,13 @@ template class regular_expression_with_matcher
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2643 "regex.h2"
+#line 2650 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2665 "regex.h2"
+#line 2672 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1647,7 +1659,7 @@ template class regular_expression_with_matcher
     public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
 
 
-#line 2678 "regex.h2"
+#line 2685 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1678,15 +1690,15 @@ class regex_parser_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 2712 "regex.h2"
+#line 2719 "regex.h2"
     public: auto swap(regex_parser_group_state& t) & -> void;
 
-#line 2718 "regex.h2"
+#line 2725 "regex.h2"
     public: auto add(auto const& matcher) & -> void;
 
     public: auto wrap_last(auto const& matcher) & -> void;
 
-#line 2727 "regex.h2"
+#line 2734 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -1699,13 +1711,13 @@ class regex_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 2745 "regex.h2"
+#line 2752 "regex.h2"
     public: auto set_next(cpp2::in g) & -> void;
 
-#line 2750 "regex.h2"
+#line 2757 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 2755 "regex.h2"
+#line 2762 "regex.h2"
 };
 
 // Parser and generator for regular expressions.
@@ -1724,53 +1736,53 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2775 "regex.h2"
+#line 2782 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2781 "regex.h2"
+#line 2788 "regex.h2"
     // State management functions
     //
     public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
 
-#line 2790 "regex.h2"
+#line 2797 "regex.h2"
     public: auto group_restore_state(cpp2::in old_state) & -> void;
 
-#line 2794 "regex.h2"
+#line 2801 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
 
-#line 2809 "regex.h2"
+#line 2816 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 2815 "regex.h2"
+#line 2822 "regex.h2"
     // Position management functions
     //
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 2856 "regex.h2"
+#line 2863 "regex.h2"
     private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 2868 "regex.h2"
+#line 2875 "regex.h2"
     public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
     public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
 
-#line 2874 "regex.h2"
+#line 2881 "regex.h2"
     public: [[nodiscard]] auto skip() & -> bool;
 
-#line 2881 "regex.h2"
+#line 2888 "regex.h2"
     public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
 
-#line 2890 "regex.h2"
+#line 2897 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
-#line 2898 "regex.h2"
+#line 2905 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 2908 "regex.h2"
+#line 2915 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -1778,58 +1790,58 @@ template class regex_parser {
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2918 "regex.h2"
+#line 2925 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 2930 "regex.h2"
+#line 2937 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
-#line 2933 "regex.h2"
+#line 2940 "regex.h2"
     // Creator functions for matchers.
     //
 
     public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
 
-#line 2943 "regex.h2"
+#line 2950 "regex.h2"
     public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
 
     public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
 
-#line 2961 "regex.h2"
+#line 2968 "regex.h2"
     public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
 
-#line 2971 "regex.h2"
+#line 2978 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
 
-#line 2984 "regex.h2"
+#line 2991 "regex.h2"
     public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
 
-#line 3020 "regex.h2"
+#line 3027 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
 
-#line 3030 "regex.h2"
+#line 3037 "regex.h2"
     public: auto parse_until(cpp2::in term) & -> void;
 
-#line 3044 "regex.h2"
+#line 3051 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3066 "regex.h2"
+#line 3073 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3098 "regex.h2"
+#line 3105 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3107 "regex.h2"
+#line 3114 "regex.h2"
 }
 }
 
@@ -2239,21 +2251,21 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token::~regex_token() noexcept{}
 
-#line 411 "regex.h2"
+#line 419 "regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(new_list))));
     }
 
-#line 417 "regex.h2"
+#line 425 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
-        //std::swap(modifiers, t.modifiers); // TODO:
+        std::swap(modifiers, t.modifiers);
     }
 
-#line 423 "regex.h2"
+#line 431 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
         if (CPP2_UFCS(empty)(alternate_match_lists)) {
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
@@ -2264,13 +2276,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 433 "regex.h2"
+#line 441 "regex.h2"
     auto parse_context_group_state::add(cpp2::in token) & -> void { CPP2_UFCS(push_back)(cur_match_list, token);  }
 
-#line 435 "regex.h2"
+#line 443 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 445 "regex.h2"
+#line 453 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2279,20 +2291,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 453 "regex.h2"
+#line 461 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 458 "regex.h2"
+#line 466 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 464 "regex.h2"
+#line 472 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -2300,13 +2312,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 483 "regex.h2"
+#line 491 "regex.h2"
     parse_context::parse_context(cpp2::in r)
         : regex{ r }{
 
-#line 485 "regex.h2"
+#line 493 "regex.h2"
     }
-#line 483 "regex.h2"
+#line 491 "regex.h2"
     auto parse_context::operator=(cpp2::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -2316,10 +2328,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         named_groups = {};
         return *this;
 
-#line 485 "regex.h2"
+#line 493 "regex.h2"
     }
 
-#line 490 "regex.h2"
+#line 498 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2327,24 +2339,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 497 "regex.h2"
+#line 505 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 503 "regex.h2"
-    [[nodiscard]] auto parse_context::get_modifiers() const& -> regex_parser_modifier_state{
-        return {  }; // TODO:
+#line 511 "regex.h2"
+    [[nodiscard]] auto parse_context::get_modifiers() const& -> parse_context_modifier_state{
+        return cur_group_state.modifiers; 
     }
 
-#line 507 "regex.h2"
-    auto parse_context::set_modifiers(cpp2::in mod) & -> void{
-        static_cast(mod);
+#line 515 "regex.h2"
+    auto parse_context::set_modifiers(cpp2::in mod) & -> void{
+        cur_group_state.modifiers = mod;
     }
 
-#line 514 "regex.h2"
+#line 522 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2353,36 +2365,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 522 "regex.h2"
+#line 530 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(max_group));
     }
 
-#line 528 "regex.h2"
+#line 536 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 536 "regex.h2"
+#line 544 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 538 "regex.h2"
+#line 546 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::in start, cpp2::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
 
-#line 540 "regex.h2"
+#line 548 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 544 "regex.h2"
+#line 552 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 548 "regex.h2"
+#line 556 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2393,29 +2405,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 558 "regex.h2"
+#line 566 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 563 "regex.h2"
+#line 571 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 567 "regex.h2"
+#line 575 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 571 "regex.h2"
+#line 579 "regex.h2"
     auto parse_context::set_named_group(cpp2::in name, cpp2::in id) & -> void{
         if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 577 "regex.h2"
+#line 585 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
@@ -2426,10 +2438,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 587 "regex.h2"
+#line 595 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 589 "regex.h2"
+#line 597 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2440,14 +2452,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 599 "regex.h2"
+#line 607 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 600 "regex.h2"
+#line 608 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 601 "regex.h2"
+#line 609 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 603 "regex.h2"
+#line 611 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2457,19 +2469,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 612 "regex.h2"
+#line 620 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
 
-#line 614 "regex.h2"
+#line 622 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 616 "regex.h2"
+#line 624 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 621 "regex.h2"
+#line 629 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2482,20 +2494,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 633 "regex.h2"
+#line 641 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 635 "regex.h2"
+#line 643 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
-            // TODO:
-            // if in_class {
-            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
-            // }
-            // else {
-            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax;
-            // }
+            if (in_class) {
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
+            }
+            else {
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
+            }
         }
         auto cur {pos + 1}; 
         if (std::move(perl_syntax)) {
@@ -2525,7 +2536,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 675 "regex.h2"
+#line 682 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2547,14 +2558,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 696 "regex.h2"
+#line 703 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
-#line 697 "regex.h2"
+#line 704 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
-#line 698 "regex.h2"
+#line 705 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 700 "regex.h2"
+#line 707 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2567,7 +2578,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 712 "regex.h2"
+#line 719 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2588,7 +2599,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(r.value()); 
     }
 
-#line 732 "regex.h2"
+#line 739 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2599,14 +2610,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 742 "regex.h2"
+#line 749 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 743 "regex.h2"
+#line 750 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 745 "regex.h2"
+#line 752 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
-                      regex_parser_modifier_state& parser_modifiers) & -> bool{
+                      parse_context_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
 
@@ -2670,7 +2681,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 810 "regex.h2"
+#line 817 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2708,10 +2719,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 847 "regex.h2"
+#line 854 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 856 "regex.h2"
+#line 863 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2719,27 +2730,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 863 "regex.h2"
+#line 870 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 878 "regex.h2"
+#line 885 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 880 "regex.h2"
+#line 887 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 885 "regex.h2"
+#line 892 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 890 "regex.h2"
+#line 897 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2747,14 +2758,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 897 "regex.h2"
+#line 904 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 903 "regex.h2"
+#line 910 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2763,7 +2774,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 911 "regex.h2"
+#line 918 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2785,22 +2796,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 933 "regex.h2"
+#line 940 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 937 "regex.h2"
+#line 944 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 941 "regex.h2"
+#line 948 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 945 "regex.h2"
+#line 952 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2810,14 +2821,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 954 "regex.h2"
+#line 961 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 960 "regex.h2"
+#line 967 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2830,38 +2841,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 972 "regex.h2"
+#line 979 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 976 "regex.h2"
+#line 983 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 980 "regex.h2"
+#line 987 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 986 "regex.h2"
+#line 993 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 992 "regex.h2"
+#line 999 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 998 "regex.h2"
+#line 1005 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2870,7 +2881,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1006 "regex.h2"
+#line 1013 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2879,29 +2890,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1020 "regex.h2"
+#line 1027 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1023 "regex.h2"
+#line 1030 "regex.h2"
     }
 
-#line 1025 "regex.h2"
+#line 1032 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1031 "regex.h2"
+#line 1038 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(add_groups)((*cpp2::assert_not_null(token)), groups);
         }
     }
 
-#line 1037 "regex.h2"
+#line 1044 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2912,74 +2923,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1050 "regex.h2"
+#line 1057 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1052 "regex.h2"
+#line 1059 "regex.h2"
     }
 
-#line 1054 "regex.h2"
+#line 1061 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1056 "regex.h2"
+#line 1063 "regex.h2"
     }
 
-#line 1058 "regex.h2"
+#line 1065 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1066 "regex.h2"
+#line 1073 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1069 "regex.h2"
+#line 1076 "regex.h2"
     }
 
-#line 1071 "regex.h2"
+#line 1078 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1081 "regex.h2"
+#line 1088 "regex.h2"
     regex_token_code::regex_token_code(cpp2::in str, cpp2::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1084 "regex.h2"
+#line 1091 "regex.h2"
     }
 
-#line 1086 "regex.h2"
+#line 1093 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add)(ctx, code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1095 "regex.h2"
+#line 1102 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1097 "regex.h2"
+#line 1104 "regex.h2"
     }
 
-#line 1099 "regex.h2"
+#line 1106 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1111 "regex.h2"
+#line 1118 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1113 "regex.h2"
+#line 1120 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2988,22 +2999,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1121 "regex.h2"
+#line 1128 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1132 "regex.h2"
+#line 1139 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1135 "regex.h2"
+#line 1142 "regex.h2"
     }
 
-#line 1137 "regex.h2"
+#line 1144 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -3020,14 +3031,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1153 "regex.h2"
+#line 1160 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             CPP2_UFCS(add_groups)((*cpp2::assert_not_null(cur)), groups);
         }
     }
 
-#line 1159 "regex.h2"
+#line 1166 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -3042,11 +3053,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1174 "regex.h2"
+#line 1181 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1177 "regex.h2"
+#line 1184 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3065,25 +3076,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1201 "regex.h2"
+#line 1208 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1203 "regex.h2"
+#line 1210 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1209 "regex.h2"
+#line 1216 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1214 "regex.h2"
+#line 1221 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3095,20 +3106,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1230 "regex.h2"
+#line 1237 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1233 "regex.h2"
+#line 1240 "regex.h2"
     }
 
-#line 1235 "regex.h2"
+#line 1242 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1239 "regex.h2"
+#line 1246 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3117,7 +3128,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1246 "regex.h2"
+#line 1253 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3139,16 +3150,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1275 "regex.h2"
+#line 1282 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1279 "regex.h2"
+#line 1286 "regex.h2"
     }
 
-#line 1282 "regex.h2"
+#line 1289 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3255,12 +3266,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1388 "regex.h2"
+#line 1395 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1393 "regex.h2"
+#line 1400 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3270,7 +3281,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1403 "regex.h2"
+#line 1410 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3292,7 +3303,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1424 "regex.h2"
+#line 1431 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3305,11 +3316,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1449 "regex.h2"
+#line 1456 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1453 "regex.h2"
+#line 1460 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3329,27 +3340,27 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1477 "regex.h2"
+#line 1484 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1480 "regex.h2"
+#line 1487 "regex.h2"
     }
 
-#line 1482 "regex.h2"
+#line 1489 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1486 "regex.h2"
+#line 1493 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1493 "regex.h2"
+#line 1500 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
 
@@ -3357,15 +3368,15 @@ template [[nodiscard]] auto char_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
 }
 
-#line 1511 "regex.h2"
+#line 1518 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1514 "regex.h2"
+#line 1521 "regex.h2"
     }
 
-#line 1516 "regex.h2"
+#line 1523 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3458,14 +3469,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1608 "regex.h2"
+#line 1615 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1613 "regex.h2"
+#line 1620 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3491,7 +3502,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1645 "regex.h2"
+#line 1652 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr{
         static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
 
@@ -3505,7 +3516,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1658 "regex.h2"
+#line 1665 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3624,7 +3635,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1776 "regex.h2"
+#line 1783 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3642,7 +3653,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1793 "regex.h2"
+#line 1800 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3667,7 +3678,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1817 "regex.h2"
+#line 1824 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
         if (-1 != number) {
@@ -3677,7 +3688,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1827 "regex.h2"
+#line 1834 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
 
@@ -3717,15 +3728,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return r; 
 }
 
-#line 1871 "regex.h2"
+#line 1878 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1874 "regex.h2"
+#line 1881 "regex.h2"
     }
 
-#line 1876 "regex.h2"
+#line 1883 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3733,7 +3744,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1884 "regex.h2"
+#line 1891 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3743,12 +3754,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1896 "regex.h2"
+#line 1903 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1903 "regex.h2"
+#line 1910 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3765,7 +3776,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1919 "regex.h2"
+#line 1926 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3778,7 +3789,7 @@ template [[
     }}
 }
 
-#line 1933 "regex.h2"
+#line 1940 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3791,35 +3802,35 @@ template [[
     }
 }
 
-#line 1945 "regex.h2"
+#line 1952 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1958 "regex.h2"
+#line 1965 "regex.h2"
     lookahead_token::lookahead_token(cpp2::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1960 "regex.h2"
+#line 1967 "regex.h2"
     }
 
-#line 1962 "regex.h2"
+#line 1969 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
 
         CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ")"));
     }
 
-#line 1968 "regex.h2"
+#line 1975 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1973 "regex.h2"
+#line 1980 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool{
     auto r {func(cur, ctx, modifiers, true_end_func())}; 
     if (!(positive)) {
@@ -3829,7 +3840,7 @@ template [[nodiscard]] auto lookahead_token_match
     return std::move(r).matched; 
 }
 
-#line 1985 "regex.h2"
+#line 1992 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3854,7 +3865,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
 }
 
-#line 2025 "regex.h2"
+#line 2032 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
 
@@ -3879,11 +3890,11 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2059 "regex.h2"
+#line 2066 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2061 "regex.h2"
+#line 2068 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3927,7 +3938,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2105 "regex.h2"
+#line 2112 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3954,7 +3965,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2131 "regex.h2"
+#line 2138 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3966,7 +3977,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2142 "regex.h2"
+#line 2149 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3979,7 +3990,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2154 "regex.h2"
+#line 2161 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -4004,7 +4015,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2178 "regex.h2"
+#line 2185 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         std::set groups {}; 
@@ -4015,14 +4026,14 @@ template [[nodiscard]] auto lookahead_token_match
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2188 "regex.h2"
+#line 2195 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner_token)), groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2196 "regex.h2"
+#line 2203 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -4035,26 +4046,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2208 "regex.h2"
+#line 2215 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2213 "regex.h2"
+#line 2220 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2218 "regex.h2"
+#line 2225 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2224 "regex.h2"
+#line 2231 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -4070,7 +4081,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2239 "regex.h2"
+#line 2246 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -4099,7 +4110,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2267 "regex.h2"
+#line 2274 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -4124,7 +4135,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2291 "regex.h2"
+#line 2298 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -4150,7 +4161,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2322 "regex.h2"
+#line 2329 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -4173,7 +4184,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2345 "regex.h2"
+#line 2352 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -4183,7 +4194,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2357 "regex.h2"
+#line 2364 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -4200,7 +4211,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2373 "regex.h2"
+#line 2380 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -4226,14 +4237,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2410 "regex.h2"
+#line 2417 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2411 "regex.h2"
+#line 2418 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2412 "regex.h2"
+#line 2419 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2419 "regex.h2"
+#line 2426 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4253,12 +4264,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2438 "regex.h2"
+#line 2445 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2439 "regex.h2"
+#line 2446 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2447 "regex.h2"
+#line 2454 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4278,7 +4289,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2466 "regex.h2"
+#line 2473 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4291,10 +4302,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2478 "regex.h2"
+#line 2485 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2480 "regex.h2"
+#line 2487 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4306,7 +4317,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2504 "regex.h2"
+#line 2511 "regex.h2"
     template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
         if (g == CPP2_UFCS(str)(name)) {
             return group_id; 
@@ -4316,34 +4327,34 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2515 "regex.h2"
+#line 2522 "regex.h2"
     [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
 
-#line 2529 "regex.h2"
+#line 2536 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2532 "regex.h2"
+#line 2539 "regex.h2"
         }
 
-#line 2534 "regex.h2"
+#line 2541 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2535 "regex.h2"
+#line 2542 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2536 "regex.h2"
+#line 2543 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2537 "regex.h2"
+#line 2544 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2539 "regex.h2"
+#line 2546 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2540 "regex.h2"
+#line 2547 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2541 "regex.h2"
+#line 2548 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2543 "regex.h2"
+#line 2550 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {named_groups::get_group_id(g)}; 
             if (-1 == group_id) {
@@ -4352,13 +4363,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2552 "regex.h2"
+#line 2559 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2553 "regex.h2"
+#line 2560 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2554 "regex.h2"
+#line 2561 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2555 "regex.h2"
+#line 2562 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4366,13 +4377,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2562 "regex.h2"
+#line 2569 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2563 "regex.h2"
+#line 2570 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2564 "regex.h2"
+#line 2571 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2565 "regex.h2"
+#line 2572 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4392,10 +4403,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2584 "regex.h2"
+#line 2591 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2589 "regex.h2"
+#line 2596 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4405,31 +4416,31 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2610 "regex.h2"
+#line 2617 "regex.h2"
         template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2613 "regex.h2"
+#line 2620 "regex.h2"
         }
 
-#line 2615 "regex.h2"
+#line 2622 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2616 "regex.h2"
+#line 2623 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2617 "regex.h2"
+#line 2624 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2618 "regex.h2"
+#line 2625 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2620 "regex.h2"
+#line 2627 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2621 "regex.h2"
+#line 2628 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2622 "regex.h2"
+#line 2629 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2624 "regex.h2"
+#line 2631 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4438,13 +4449,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2633 "regex.h2"
+#line 2640 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2634 "regex.h2"
+#line 2641 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2635 "regex.h2"
+#line 2642 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2636 "regex.h2"
+#line 2643 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4452,13 +4463,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2643 "regex.h2"
+#line 2650 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2644 "regex.h2"
+#line 2651 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2645 "regex.h2"
+#line 2652 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2646 "regex.h2"
+#line 2653 "regex.h2"
     template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4478,10 +4489,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2665 "regex.h2"
+#line 2672 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2670 "regex.h2"
+#line 2677 "regex.h2"
     template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4491,24 +4502,24 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2706 "regex.h2"
+#line 2713 "regex.h2"
     auto regex_parser_group_state::next_alternative() & -> void{
         std::vector new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
     }
 
-#line 2712 "regex.h2"
+#line 2719 "regex.h2"
     auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 2718 "regex.h2"
+#line 2725 "regex.h2"
     auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
 
-#line 2720 "regex.h2"
+#line 2727 "regex.h2"
     auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
         auto last {CPP2_UFCS(back)(cur_match_list)}; 
         CPP2_UFCS(back)(cur_match_list) = matcher(last);
@@ -4516,10 +4527,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         static_cast(std::move(last));
     }
 
-#line 2727 "regex.h2"
+#line 2734 "regex.h2"
     [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 2737 "regex.h2"
+#line 2744 "regex.h2"
     [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -4528,29 +4539,29 @@ template [[nodiscard]] auto word_boundary_token_mat
         return g; 
     }
 
-#line 2745 "regex.h2"
+#line 2752 "regex.h2"
     auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 2750 "regex.h2"
+#line 2757 "regex.h2"
     auto regex_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 2775 "regex.h2"
+#line 2782 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2779 "regex.h2"
+#line 2786 "regex.h2"
     }
 
-#line 2783 "regex.h2"
+#line 2790 "regex.h2"
     template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
         regex_parser_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -4558,12 +4569,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2790 "regex.h2"
+#line 2797 "regex.h2"
     template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
         cur_group_state = old_state;
     }
 
-#line 2797 "regex.h2"
+#line 2804 "regex.h2"
     template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
         regex_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -4576,14 +4587,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         return old_state; 
     }
 
-#line 2809 "regex.h2"
+#line 2816 "regex.h2"
     template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto next_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
     }
 
-#line 2818 "regex.h2"
+#line 2825 "regex.h2"
     template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -4622,7 +4633,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return cur; 
     }
 
-#line 2856 "regex.h2"
+#line 2863 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -4635,14 +4646,14 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2868 "regex.h2"
+#line 2875 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2869 "regex.h2"
+#line 2876 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2870 "regex.h2"
+#line 2877 "regex.h2"
     template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
 
-#line 2874 "regex.h2"
+#line 2881 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip() & -> bool{
         cpp2::deferred_init c; 
         auto r {next(cpp2::out(&c))}; 
@@ -4650,7 +4661,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2881 "regex.h2"
+#line 2888 "regex.h2"
     template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -4660,7 +4671,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2890 "regex.h2"
+#line 2897 "regex.h2"
     template  [[nodiscard]] auto regex_parser::current() const& -> char{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
             return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
@@ -4669,7 +4680,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2898 "regex.h2"
+#line 2905 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -4680,18 +4691,18 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2908 "regex.h2"
+#line 2915 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2909 "regex.h2"
+#line 2916 "regex.h2"
     template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 2913 "regex.h2"
+#line 2920 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2918 "regex.h2"
+#line 2925 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -4704,10 +4715,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2930 "regex.h2"
+#line 2937 "regex.h2"
     template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 2936 "regex.h2"
+#line 2943 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -4715,10 +4726,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
     }
 
-#line 2943 "regex.h2"
+#line 2950 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
 
-#line 2945 "regex.h2"
+#line 2952 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
         if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
 
@@ -4735,7 +4746,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
     }
 
-#line 2961 "regex.h2"
+#line 2968 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
         std::string r {"::cpp2::regex::group_name_list_end"}; 
 
@@ -4746,7 +4757,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2973 "regex.h2"
+#line 2980 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
         auto old_state {group_new_state()}; 
         parse_until(')');
@@ -4758,7 +4769,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 2984 "regex.h2"
+#line 2991 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4795,7 +4806,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 3023 "regex.h2"
+#line 3030 "regex.h2"
     template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
         if (c != '\'') {return false; }
 
@@ -4803,7 +4814,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return true; 
     }
 
-#line 3030 "regex.h2"
+#line 3037 "regex.h2"
     template  auto regex_parser::parse_until(cpp2::in term) & -> void{
         char c {current()}; 
         for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
@@ -4818,7 +4829,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 3044 "regex.h2"
+#line 3051 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4841,7 +4852,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return res; 
     }
 
-#line 3066 "regex.h2"
+#line 3073 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         auto mod {parser_expression_modifiers()}; 
         parse_context parse_ctx {regex}; 
@@ -4875,7 +4886,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 3100 "regex.h2"
+#line 3107 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index e196b18fca..eeb33232e0 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -397,6 +397,14 @@ regex_token: @polymorphic_base type = {
 token_ptr : type == std::shared_ptr;
 token_vec: type == std::vector;
 
+// State of the expression modifiers.
+//
+parse_context_modifier_state: @struct type = {
+    group_captures_have_numbers : bool = true;
+    perl_code_syntax:             bool = false;
+    perl_code_syntax_in_classes:  bool = false;
+}
+
 // State of the current group. See '()'
 parse_context_group_state: @struct type = {
 
@@ -406,7 +414,7 @@ parse_context_group_state: @struct type = {
     // List of alternate matcher lists. E.g. ab|cd|xy
     alternate_match_lists: token_vec = ();
 
-    //modifiers : parse_context_modifier_state = (); // TODO:
+    modifiers : parse_context_modifier_state = ();
 
     next_alternative: (inout this) = {
         new_list: token_vec = ();
@@ -417,7 +425,7 @@ parse_context_group_state: @struct type = {
     swap: (inout this, inout t: parse_context_group_state) = {
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
-        //std::swap(modifiers, t.modifiers); // TODO:
+        std::swap(modifiers, t.modifiers);
     }
 
     get_tokens: (inout this) -> token_ptr = {
@@ -500,12 +508,12 @@ parse_context: type = {
         return inner;
     }
 
-    get_modifiers: (this) -> regex_parser_modifier_state = {
-        return (); // TODO:
+    get_modifiers: (this) -> parse_context_modifier_state = {
+        return cur_group_state.modifiers;
     }
 
-    set_modifiers: (inout this, mod: regex_parser_modifier_state) = {
-        _ = mod;
+    set_modifiers: (inout this, mod: parse_context_modifier_state) = {
+        cur_group_state.modifiers = mod;
     }
 
     // Branch reset management functions
@@ -635,13 +643,12 @@ parse_context: type = {
     private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = {
         perl_syntax := false;
         if !no_skip {
-            // TODO:
-            // if in_class {
-            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
-            // }
-            // else {
-            //     perl_syntax = cur_group_state.modifiers.perl_code_syntax;
-            // }
+            if in_class {
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
+            }
+            else {
+                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
+            }
         }
         cur := pos + 1;
         if perl_syntax {
@@ -743,7 +750,7 @@ parse_context: type = {
     peek_in_class: (in this) peek_impl(true);
 
     parser_group_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
-                      inout parser_modifiers: regex_parser_modifier_state) -> bool = {
+                      inout parser_modifiers: parse_context_modifier_state) -> bool = {
         is_negative := false;
         is_reset    := false;
 

From 4ce21483826ea069a371e4fc714de3f11d503ef6 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 14 May 2024 10:28:44 +0200
Subject: [PATCH 122/161] Removal of unused funtionality and proper parsing of
 global modifiers.

---
 include/cpp2regex.h | 1486 +++++++++++++------------------------------
 source/reflect.h    |    2 +-
 source/reflect.h2   |    2 +-
 source/regex.h2     |  406 +-----------
 4 files changed, 451 insertions(+), 1445 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index ef4698012d..7e544a126e 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -110,134 +110,113 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 859 "regex.h2"
+#line 860 "regex.h2"
 class generation_function_context;
     
 
-#line 875 "regex.h2"
+#line 876 "regex.h2"
 class generation_context;
 
-#line 1022 "regex.h2"
+#line 1023 "regex.h2"
 class regex_token_list;
     
 
-#line 1054 "regex.h2"
+#line 1055 "regex.h2"
 class regex_token_base;
     
 
-#line 1068 "regex.h2"
+#line 1069 "regex.h2"
 class regex_token_check;
     
 
-#line 1083 "regex.h2"
+#line 1084 "regex.h2"
 class regex_token_code;
     
 
-#line 1099 "regex.h2"
+#line 1100 "regex.h2"
 class regex_token_empty;
     
 
-#line 1115 "regex.h2"
+#line 1116 "regex.h2"
 class alternative_token;
     
 
-#line 1133 "regex.h2"
+#line 1134 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1179 "regex.h2"
+#line 1180 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1205 "regex.h2"
+#line 1206 "regex.h2"
 class any_token;
     
 
-#line 1232 "regex.h2"
+#line 1233 "regex.h2"
 class char_token;
     
 
-#line 1276 "regex.h2"
+#line 1277 "regex.h2"
 class class_token;
     
 
-#line 1408 "regex.h2"
+#line 1409 "regex.h2"
 template class class_token_matcher;
 
-#line 1479 "regex.h2"
+#line 1480 "regex.h2"
 class escaped_char_token;
     
 
-#line 1513 "regex.h2"
+#line 1514 "regex.h2"
 class group_ref_token;
     
 
-#line 1645 "regex.h2"
+#line 1646 "regex.h2"
 class group_token;
     
 
-#line 1873 "regex.h2"
+#line 1874 "regex.h2"
 class modifier_token;
     
 
-#line 1889 "regex.h2"
+#line 1890 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1901 "regex.h2"
+#line 1902 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1959 "regex.h2"
+#line 1960 "regex.h2"
 class lookahead_token;
     
 
-#line 2058 "regex.h2"
+#line 2059 "regex.h2"
 class range_token;
     
 
-#line 2201 "regex.h2"
+#line 2202 "regex.h2"
 template class range_token_matcher;
 
-#line 2326 "regex.h2"
+#line 2327 "regex.h2"
 class special_range_token;
     
 
-#line 2416 "regex.h2"
+#line 2417 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2424 "regex.h2"
+#line 2425 "regex.h2"
 template class char_matcher_logic;
 
-#line 2452 "regex.h2"
+#line 2453 "regex.h2"
 template class class_matcher_logic;
 
 #line 2509 "regex.h2"
-template class group_name_list;
-
-#line 2521 "regex.h2"
-class group_name_list_end;
-    
-
-#line 2526 "regex.h2"
-template class regular_expression;
-
-#line 2607 "regex.h2"
-template class regular_expression_with_matcher;
-
-#line 2696 "regex.h2"
-class regex_parser_modifier_state;
-    
-
-#line 2703 "regex.h2"
-class regex_parser_group_state;
-
-#line 2738 "regex.h2"
-class regex_branch_reset_state;
-    
+template class regular_expression;
 
-#line 2765 "regex.h2"
+#line 2597 "regex.h2"
 template class regex_parser;
 
-#line 3114 "regex.h2"
+#line 2732 "regex.h2"
 }
 }
 
@@ -693,38 +672,36 @@ class parse_context {
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
     private: std::map named_groups {}; 
 
-    public: explicit parse_context(cpp2::in r);
-#line 491 "regex.h2"
-    public: auto operator=(cpp2::in r) -> parse_context& ;
+    public: explicit parse_context(cpp2::in r, cpp2::in modifiers);
 
-#line 495 "regex.h2"
+#line 496 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 505 "regex.h2"
+#line 506 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
 
-#line 511 "regex.h2"
+#line 512 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> parse_context_modifier_state;
 
-#line 515 "regex.h2"
+#line 516 "regex.h2"
     public: auto set_modifiers(cpp2::in mod) & -> void;
 
-#line 519 "regex.h2"
+#line 520 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 530 "regex.h2"
+#line 531 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 536 "regex.h2"
+#line 537 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 541 "regex.h2"
+#line 542 "regex.h2"
     // Position management functions
     //
 
@@ -734,88 +711,88 @@ class parse_context {
 
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 552 "regex.h2"
+#line 553 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 556 "regex.h2"
+#line 557 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 566 "regex.h2"
+#line 567 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 570 "regex.h2"
+#line 571 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 575 "regex.h2"
+#line 576 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 579 "regex.h2"
+#line 580 "regex.h2"
     public: auto set_named_group(cpp2::in name, cpp2::in id) & -> void;
 
-#line 585 "regex.h2"
+#line 586 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
 
-#line 595 "regex.h2"
+#line 596 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 607 "regex.h2"
+#line 608 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::in n) & -> bool;
 
-#line 620 "regex.h2"
+#line 621 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 629 "regex.h2"
+#line 630 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 641 "regex.h2"
+#line 642 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 682 "regex.h2"
+#line 683 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 703 "regex.h2"
+#line 704 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 719 "regex.h2"
+#line 720 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 739 "regex.h2"
+#line 740 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 749 "regex.h2"
+#line 750 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       parse_context_modifier_state& parser_modifiers) & -> bool;
 
-#line 817 "regex.h2"
+#line 818 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 854 "regex.h2"
+#line 855 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 857 "regex.h2"
+#line 858 "regex.h2"
 };
 
 class generation_function_context {
@@ -824,10 +801,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 870 "regex.h2"
+#line 871 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
 };
 
 class generation_context {
@@ -844,81 +821,81 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 892 "regex.h2"
+#line 893 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 897 "regex.h2"
+#line 898 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 904 "regex.h2"
+#line 905 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 910 "regex.h2"
+#line 911 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 918 "regex.h2"
+#line 919 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 940 "regex.h2"
+#line 941 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 944 "regex.h2"
+#line 945 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 948 "regex.h2"
+#line 949 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 952 "regex.h2"
+#line 953 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 961 "regex.h2"
+#line 962 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 967 "regex.h2"
+#line 968 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 979 "regex.h2"
+#line 980 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 983 "regex.h2"
+#line 984 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 987 "regex.h2"
+#line 988 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 993 "regex.h2"
+#line 994 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 999 "regex.h2"
+#line 1000 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 1005 "regex.h2"
+#line 1006 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1013 "regex.h2"
+#line 1014 "regex.h2"
     public: auto finish_context() & -> void;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1020 "regex.h2"
+#line 1021 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1025 "regex.h2"
+#line 1026 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1032 "regex.h2"
+#line 1033 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1038 "regex.h2"
+#line 1039 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1044 "regex.h2"
+#line 1045 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -926,36 +903,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1051 "regex.h2"
+#line 1052 "regex.h2"
 };
 
-#line 1054 "regex.h2"
+#line 1055 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1057 "regex.h2"
+#line 1058 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1061 "regex.h2"
+#line 1062 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1065 "regex.h2"
+#line 1066 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1066 "regex.h2"
+#line 1067 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1071 "regex.h2"
+#line 1072 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1078 "regex.h2"
+#line 1079 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -963,17 +940,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1081 "regex.h2"
+#line 1082 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1086 "regex.h2"
+#line 1087 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::in str, cpp2::in code_);
 
-#line 1093 "regex.h2"
+#line 1094 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -981,16 +958,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1096 "regex.h2"
+#line 1097 "regex.h2"
 };
 
-#line 1099 "regex.h2"
+#line 1100 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1102 "regex.h2"
+#line 1103 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1106 "regex.h2"
+#line 1107 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -998,7 +975,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1109 "regex.h2"
+#line 1110 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -1007,12 +984,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1118 "regex.h2"
+#line 1119 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1128 "regex.h2"
+#line 1129 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -1020,23 +997,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1131 "regex.h2"
+#line 1132 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1137 "regex.h2"
+#line 1138 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1144 "regex.h2"
+#line 1145 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1160 "regex.h2"
+#line 1161 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1166 "regex.h2"
+#line 1167 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1044,33 +1021,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1177 "regex.h2"
+#line 1178 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1184 "regex.h2"
+#line 1185 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1201 "regex.h2"
+#line 1202 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1208 "regex.h2"
+#line 1209 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1216 "regex.h2"
+#line 1217 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1078,23 +1055,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1219 "regex.h2"
+#line 1220 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1232 "regex.h2"
+#line 1233 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1235 "regex.h2"
+#line 1236 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1242 "regex.h2"
+#line 1243 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1246 "regex.h2"
+#line 1247 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1102,30 +1079,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1251 "regex.h2"
+#line 1252 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1274 "regex.h2"
+#line 1275 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1279 "regex.h2"
+#line 1280 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1288 "regex.h2"
+#line 1289 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1395 "regex.h2"
+#line 1396 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1400 "regex.h2"
+#line 1401 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1133,21 +1110,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1406 "regex.h2"
+#line 1407 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1431 "regex.h2"
+#line 1432 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1443 "regex.h2"
+#line 1444 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1159,23 +1136,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1454 "regex.h2"
+#line 1455 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1479 "regex.h2"
+#line 1480 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1482 "regex.h2"
+#line 1483 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1489 "regex.h2"
+#line 1490 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1493 "regex.h2"
+#line 1494 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1183,14 +1160,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1496 "regex.h2"
+#line 1497 "regex.h2"
 };
 
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1507 "regex.h2"
+#line 1508 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1199,15 +1176,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1516 "regex.h2"
+#line 1517 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1523 "regex.h2"
+#line 1524 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1615 "regex.h2"
+#line 1616 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1215,31 +1192,31 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1618 "regex.h2"
+#line 1619 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1645 "regex.h2"
+#line 1646 "regex.h2"
 class group_token: public regex_token {
 
-#line 1648 "regex.h2"
+#line 1649 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr;
 
-#line 1665 "regex.h2"
+#line 1666 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1783 "regex.h2"
+#line 1784 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1800 "regex.h2"
+#line 1801 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1824 "regex.h2"
+#line 1825 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1248,22 +1225,22 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1830 "regex.h2"
+#line 1831 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1873 "regex.h2"
+#line 1874 "regex.h2"
 class modifier_token: public regex_token_base {
 
-#line 1876 "regex.h2"
+#line 1877 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1883 "regex.h2"
+#line 1884 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1271,7 +1248,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1887 "regex.h2"
+#line 1888 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1282,7 +1259,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1899 "regex.h2"
+#line 1900 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1293,39 +1270,39 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1906 "regex.h2"
+#line 1907 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1926 "regex.h2"
+#line 1927 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1938 "regex.h2"
+#line 1939 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1952 "regex.h2"
+#line 1953 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1957 "regex.h2"
+#line 1958 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1962 "regex.h2"
+#line 1963 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::in positive_);
 
-#line 1969 "regex.h2"
+#line 1970 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1975 "regex.h2"
+#line 1976 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1333,18 +1310,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1978 "regex.h2"
+#line 1979 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool;
 
-#line 1989 "regex.h2"
+#line 1990 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2016 "regex.h2"
+#line 2017 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1358,17 +1335,17 @@ template                     using named_class_not_space = class
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2030 "regex.h2"
+#line 2031 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2056 "regex.h2"
+#line 2057 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2061 "regex.h2"
+#line 2062 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1378,19 +1355,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2138 "regex.h2"
+#line 2139 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2149 "regex.h2"
+#line 2150 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2161 "regex.h2"
+#line 2162 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2185 "regex.h2"
+#line 2186 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2195 "regex.h2"
+#line 2196 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1398,46 +1375,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2199 "regex.h2"
+#line 2200 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2215 "regex.h2"
+#line 2216 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2220 "regex.h2"
+#line 2221 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2225 "regex.h2"
+#line 2226 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2231 "regex.h2"
+#line 2232 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2246 "regex.h2"
+#line 2247 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2274 "regex.h2"
+#line 2275 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2298 "regex.h2"
+#line 2299 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2322 "regex.h2"
+#line 2323 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2329 "regex.h2"
+#line 2330 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1446,7 +1423,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2358 "regex.h2"
+#line 2359 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1455,10 +1432,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2380 "regex.h2"
+#line 2381 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2406 "regex.h2"
+#line 2407 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1466,7 +1443,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2414 "regex.h2"
+#line 2415 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1477,7 +1454,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2420 "regex.h2"
+#line 2421 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1486,27 +1463,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2445 "regex.h2"
+#line 2446 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2447 "regex.h2"
+#line 2448 "regex.h2"
 };
 
-#line 2450 "regex.h2"
+#line 2451 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2473 "regex.h2"
+#line 2474 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2485 "regex.h2"
+#line 2486 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1515,10 +1492,10 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2497 "regex.h2"
+#line 2498 "regex.h2"
 };
 
-#line 2500 "regex.h2"
+#line 2501 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1526,33 +1503,11 @@ template class class_matcher_logi
 //-----------------------------------------------------------------------
 //
 
-// Helper for named groups.
-
-template class group_name_list {
-
-    public: [[nodiscard]] static auto get_group_id(auto const& g) -> int;
-    public: group_name_list() = default;
-    public: group_name_list(group_name_list const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(group_name_list const&) -> void = delete;
-
-
-#line 2519 "regex.h2"
-};
-
-class group_name_list_end {
-    public: [[nodiscard]] static auto get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto;
-    public: group_name_list_end() = default;
-    public: group_name_list_end(group_name_list_end const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(group_name_list_end const&) -> void = delete;
-
-#line 2523 "regex.h2"
-};
-
 // Regular expression implementation
-template class regular_expression {
+template class regular_expression {
 
-    public: template using context = match_context;
-    public: using modifiers = match_modifiers;
+    public: template using context = match_context;
+    public: using modifiers = match_modifiers;
 
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
@@ -1561,7 +1516,7 @@ template matched_, context const& ctx_);
 
-#line 2541 "regex.h2"
+#line 2524 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1576,7 +1531,7 @@ template void = delete;
 
 
-#line 2557 "regex.h2"
+#line 2540 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1584,13 +1539,13 @@ template> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2569 "regex.h2"
+#line 2552 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2591 "regex.h2"
+#line 2574 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1602,64 +1557,7 @@ template void = delete;
 
 
-#line 2604 "regex.h2"
-};
-
-// Regular expression implementation
-template class regular_expression_with_matcher {
-
-    public: template using context = match_context;
-    public: using modifiers = match_modifiers;
-
-    // TODO: Named multiple return has problems with templates.
-    public: template class search_return {
-        public: bool matched; 
-        public: context ctx; 
-
-        public: explicit search_return(cpp2::in matched_, context const& ctx_);
-
-#line 2622 "regex.h2"
-        public: [[nodiscard]] auto group_number() const& -> auto;
-        public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
-        public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
-        public: [[nodiscard]] auto group_end(cpp2::in g) const& -> auto;
-
-        public: [[nodiscard]] auto group(cpp2::in> g) const& -> auto;
-        public: [[nodiscard]] auto group_start(cpp2::in> g) const& -> auto;
-        public: [[nodiscard]] auto group_end(cpp2::in> g) const& -> auto;
-
-        private: [[nodiscard]] auto get_group_id(cpp2::in> g) const& -> auto;
-        public: search_return(search_return const&) = delete; /* No 'that' constructor, suppress copy */
-        public: auto operator=(search_return const&) -> void = delete;
-
-
-#line 2638 "regex.h2"
-    };
-
-    public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
-    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start) const& -> auto;
-    public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
-    public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
-
-#line 2650 "regex.h2"
-    public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
-    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
-    public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
-    public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
-
-#line 2672 "regex.h2"
-    public: [[nodiscard]] auto to_string() const& -> auto;
-
-    // Helper functions
-    //
-
-    private: [[nodiscard]] static auto get_iter(cpp2::in> str, auto const& pos) -> auto;
-    public: regular_expression_with_matcher() = default;
-    public: regular_expression_with_matcher(regular_expression_with_matcher const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regular_expression_with_matcher const&) -> void = delete;
-
-
-#line 2685 "regex.h2"
+#line 2587 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1669,57 +1567,6 @@ template class regular_expression_with_matcher
 //-----------------------------------------------------------------------
 //
 
-// State of the expression modifiers.
-//
-class regex_parser_modifier_state {
-    public: bool group_captures_have_numbers {true}; 
-    public: bool perl_code_syntax {false}; 
-    public: bool perl_code_syntax_in_classes {false}; 
-};
-
-// State of the current group. See '()'
-class regex_parser_group_state {
-
-    // Current list of matchers
-    public: std::vector cur_match_list {}; 
-
-    // List of alternate matcher lists. E.g. ab|cd|xy
-    public: std::vector> alternate_match_lists {}; 
-
-    public: regex_parser_modifier_state modifiers {}; 
-
-    public: auto next_alternative() & -> void;
-
-#line 2719 "regex.h2"
-    public: auto swap(regex_parser_group_state& t) & -> void;
-
-#line 2725 "regex.h2"
-    public: auto add(auto const& matcher) & -> void;
-
-    public: auto wrap_last(auto const& matcher) & -> void;
-
-#line 2734 "regex.h2"
-    public: [[nodiscard]] auto empty() const& -> bool;
-};
-
-// State for the branch reset. Takes care of the group numbering. See '(|)'.
-class regex_branch_reset_state {
-    public: bool is_active {false}; 
-    public: int cur_group {1}; // Global capture group.
-    public: int max_group {1}; 
-    public: int from {1}; 
-
-    public: [[nodiscard]] auto next() & -> int;
-
-#line 2752 "regex.h2"
-    public: auto set_next(cpp2::in g) & -> void;
-
-#line 2757 "regex.h2"
-    public: auto next_alternative() & -> void;
-
-#line 2762 "regex.h2"
-};
-
 // Parser and generator for regular expressions.
 template class regex_parser {
 
@@ -1727,8 +1574,6 @@ template class regex_parser {
     private: std::string_view modifier; 
     private: Error_out error_out; 
 
-    private: regex_parser_group_state cur_group_state {}; 
-    private: regex_branch_reset_state cur_branch_reset_state {}; 
     private: size_t pos {0}; 
     private: int alternatives_count {0}; 
     private: std::map named_groups {}; 
@@ -1736,112 +1581,37 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-#line 2782 "regex.h2"
+#line 2612 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2788 "regex.h2"
-    // State management functions
-    //
-    public: [[nodiscard]] auto group_new_state() & -> regex_parser_group_state;
-
-#line 2797 "regex.h2"
-    public: auto group_restore_state(cpp2::in old_state) & -> void;
-
-#line 2801 "regex.h2"
-    // Branch reset management functions
-    //
-
-    public: [[nodiscard]] auto branch_reset_new_state() & -> regex_branch_reset_state;
-
-#line 2816 "regex.h2"
-    public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
-
-#line 2822 "regex.h2"
-    // Position management functions
-    //
-
-    private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
-
-#line 2863 "regex.h2"
-    private: [[nodiscard]] auto next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool;
-
-#line 2875 "regex.h2"
-    public: [[nodiscard]] auto next(cpp2::out n) & -> auto;
-    public: [[nodiscard]] auto next_in_class(cpp2::out n) & -> auto;
-    public: [[nodiscard]] auto next_no_skip(cpp2::out n) & -> auto;
-
-#line 2881 "regex.h2"
-    public: [[nodiscard]] auto skip() & -> bool;
-
-#line 2888 "regex.h2"
-    public: [[nodiscard]] auto skip_n(cpp2::in n) & -> bool;
-
-#line 2897 "regex.h2"
-    public: [[nodiscard]] auto current() const& -> char;
-
-#line 2905 "regex.h2"
-    private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
-
-#line 2915 "regex.h2"
-    public: [[nodiscard]] auto peek() const& -> auto;
-    public: [[nodiscard]] auto peek_in_class() const& -> auto;
-
+#line 2618 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2925 "regex.h2"
-    public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
-
-#line 2937 "regex.h2"
-    public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
-
-#line 2940 "regex.h2"
-    // Creator functions for matchers.
-    //
-
-    public: [[nodiscard]] auto create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto;
-
-#line 2950 "regex.h2"
-    public: [[nodiscard]] auto create_matcher_from_list(auto const& list) & -> auto;
-
-    public: [[nodiscard]] auto create_matcher_from_state() & -> std::string;
-
-#line 2968 "regex.h2"
-    public: [[nodiscard]] auto create_named_groups_list() const& -> std::string;
-
-#line 2978 "regex.h2"
+#line 2625 "regex.h2"
     // Parser helper functions.
 
-    public: [[nodiscard]] auto parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool;
-
-#line 2991 "regex.h2"
-    public: [[nodiscard]] auto parser_expression_modifiers() & -> std::string;
+    public: [[nodiscard]] auto parser_expression_modifiers(cpp2::out mods) & -> std::string;
 
-#line 3027 "regex.h2"
+#line 2665 "regex.h2"
     // Parsing functions
     //
 
-    public: [[nodiscard]] auto is_handle_special(cpp2::in c) & -> bool;
-
-#line 3037 "regex.h2"
-    public: auto parse_until(cpp2::in term) & -> void;
-
-#line 3051 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
 
-#line 3073 "regex.h2"
+#line 2690 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 3105 "regex.h2"
+#line 2723 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 3114 "regex.h2"
+#line 2732 "regex.h2"
 }
 }
 
@@ -2313,25 +2083,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     }
 
 #line 491 "regex.h2"
-    parse_context::parse_context(cpp2::in r)
+    parse_context::parse_context(cpp2::in r, cpp2::in modifiers)
         : regex{ r }{
 
 #line 493 "regex.h2"
+        set_modifiers(modifiers);
     }
-#line 491 "regex.h2"
-    auto parse_context::operator=(cpp2::in r) -> parse_context& {
-        regex = r;
-        pos = 0;
-        error_text = "";
-        cur_group_state = {};
-        cur_branch_reset_state = {};
-        named_groups = {};
-        return *this;
 
-#line 493 "regex.h2"
-    }
-
-#line 498 "regex.h2"
+#line 499 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2339,24 +2098,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 505 "regex.h2"
+#line 506 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 511 "regex.h2"
+#line 512 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> parse_context_modifier_state{
         return cur_group_state.modifiers; 
     }
 
-#line 515 "regex.h2"
+#line 516 "regex.h2"
     auto parse_context::set_modifiers(cpp2::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 522 "regex.h2"
+#line 523 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2365,36 +2124,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 530 "regex.h2"
+#line 531 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(max_group));
     }
 
-#line 536 "regex.h2"
+#line 537 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 544 "regex.h2"
+#line 545 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 546 "regex.h2"
+#line 547 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::in start, cpp2::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
 
-#line 548 "regex.h2"
+#line 549 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 552 "regex.h2"
+#line 553 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 556 "regex.h2"
+#line 557 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2405,29 +2164,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 566 "regex.h2"
+#line 567 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 571 "regex.h2"
+#line 572 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 575 "regex.h2"
+#line 576 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 579 "regex.h2"
+#line 580 "regex.h2"
     auto parse_context::set_named_group(cpp2::in name, cpp2::in id) & -> void{
         if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 585 "regex.h2"
+#line 586 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
@@ -2438,10 +2197,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 595 "regex.h2"
+#line 596 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 597 "regex.h2"
+#line 598 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2452,14 +2211,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 607 "regex.h2"
-    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 608 "regex.h2"
-    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 609 "regex.h2"
+    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+#line 610 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 611 "regex.h2"
+#line 612 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2469,19 +2228,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 620 "regex.h2"
+#line 621 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
 
-#line 622 "regex.h2"
+#line 623 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 624 "regex.h2"
+#line 625 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 629 "regex.h2"
+#line 630 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2494,10 +2253,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 641 "regex.h2"
+#line 642 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 643 "regex.h2"
+#line 644 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2536,7 +2295,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 682 "regex.h2"
+#line 683 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2558,14 +2317,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 703 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
 #line 704 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
 #line 705 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+#line 706 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 707 "regex.h2"
+#line 708 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2578,7 +2337,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 719 "regex.h2"
+#line 720 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2599,7 +2358,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(r.value()); 
     }
 
-#line 739 "regex.h2"
+#line 740 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2610,12 +2369,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 749 "regex.h2"
-    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
 #line 750 "regex.h2"
+    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
+#line 751 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 752 "regex.h2"
+#line 753 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       parse_context_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2681,7 +2440,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 817 "regex.h2"
+#line 818 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2719,10 +2478,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 854 "regex.h2"
+#line 855 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 863 "regex.h2"
+#line 864 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2730,27 +2489,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 870 "regex.h2"
+#line 871 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 885 "regex.h2"
+#line 886 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 887 "regex.h2"
+#line 888 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 892 "regex.h2"
+#line 893 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 897 "regex.h2"
+#line 898 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2758,14 +2517,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 904 "regex.h2"
+#line 905 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 910 "regex.h2"
+#line 911 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2774,7 +2533,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 918 "regex.h2"
+#line 919 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2796,22 +2555,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 940 "regex.h2"
+#line 941 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 944 "regex.h2"
+#line 945 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 948 "regex.h2"
+#line 949 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 952 "regex.h2"
+#line 953 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2821,14 +2580,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 961 "regex.h2"
+#line 962 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 967 "regex.h2"
+#line 968 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2841,38 +2600,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 979 "regex.h2"
+#line 980 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 983 "regex.h2"
+#line 984 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 987 "regex.h2"
+#line 988 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 993 "regex.h2"
+#line 994 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 999 "regex.h2"
+#line 1000 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 1005 "regex.h2"
+#line 1006 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2881,7 +2640,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1013 "regex.h2"
+#line 1014 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2890,29 +2649,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1027 "regex.h2"
+#line 1028 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1030 "regex.h2"
+#line 1031 "regex.h2"
     }
 
-#line 1032 "regex.h2"
+#line 1033 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1038 "regex.h2"
+#line 1039 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(add_groups)((*cpp2::assert_not_null(token)), groups);
         }
     }
 
-#line 1044 "regex.h2"
+#line 1045 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2923,74 +2682,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1057 "regex.h2"
+#line 1058 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1059 "regex.h2"
+#line 1060 "regex.h2"
     }
 
-#line 1061 "regex.h2"
+#line 1062 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1063 "regex.h2"
+#line 1064 "regex.h2"
     }
 
-#line 1065 "regex.h2"
+#line 1066 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1073 "regex.h2"
+#line 1074 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1076 "regex.h2"
+#line 1077 "regex.h2"
     }
 
-#line 1078 "regex.h2"
+#line 1079 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1088 "regex.h2"
+#line 1089 "regex.h2"
     regex_token_code::regex_token_code(cpp2::in str, cpp2::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1091 "regex.h2"
+#line 1092 "regex.h2"
     }
 
-#line 1093 "regex.h2"
+#line 1094 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add)(ctx, code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1102 "regex.h2"
+#line 1103 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1104 "regex.h2"
+#line 1105 "regex.h2"
     }
 
-#line 1106 "regex.h2"
+#line 1107 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1118 "regex.h2"
+#line 1119 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1120 "regex.h2"
+#line 1121 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2999,22 +2758,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1128 "regex.h2"
+#line 1129 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1139 "regex.h2"
+#line 1140 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1142 "regex.h2"
+#line 1143 "regex.h2"
     }
 
-#line 1144 "regex.h2"
+#line 1145 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -3031,14 +2790,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1160 "regex.h2"
+#line 1161 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             CPP2_UFCS(add_groups)((*cpp2::assert_not_null(cur)), groups);
         }
     }
 
-#line 1166 "regex.h2"
+#line 1167 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -3053,11 +2812,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1181 "regex.h2"
+#line 1182 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1184 "regex.h2"
+#line 1185 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -3076,25 +2835,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1208 "regex.h2"
+#line 1209 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1210 "regex.h2"
+#line 1211 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1216 "regex.h2"
+#line 1217 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1221 "regex.h2"
+#line 1222 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -3106,20 +2865,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1237 "regex.h2"
+#line 1238 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1240 "regex.h2"
+#line 1241 "regex.h2"
     }
 
-#line 1242 "regex.h2"
+#line 1243 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1246 "regex.h2"
+#line 1247 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -3128,7 +2887,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1253 "regex.h2"
+#line 1254 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -3150,16 +2909,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1282 "regex.h2"
+#line 1283 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1286 "regex.h2"
+#line 1287 "regex.h2"
     }
 
-#line 1289 "regex.h2"
+#line 1290 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3266,12 +3025,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1395 "regex.h2"
+#line 1396 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1400 "regex.h2"
+#line 1401 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3281,7 +3040,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1410 "regex.h2"
+#line 1411 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3303,7 +3062,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1431 "regex.h2"
+#line 1432 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3316,11 +3075,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1456 "regex.h2"
+#line 1457 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1460 "regex.h2"
+#line 1461 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3340,27 +3099,27 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1484 "regex.h2"
+#line 1485 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1487 "regex.h2"
+#line 1488 "regex.h2"
     }
 
-#line 1489 "regex.h2"
+#line 1490 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1493 "regex.h2"
+#line 1494 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1500 "regex.h2"
+#line 1501 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
 
@@ -3368,15 +3127,15 @@ template [[nodiscard]] auto char_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
 }
 
-#line 1518 "regex.h2"
+#line 1519 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1521 "regex.h2"
+#line 1522 "regex.h2"
     }
 
-#line 1523 "regex.h2"
+#line 1524 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3469,14 +3228,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1615 "regex.h2"
+#line 1616 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1620 "regex.h2"
+#line 1621 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3502,7 +3261,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1652 "regex.h2"
+#line 1653 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr{
         static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
 
@@ -3516,7 +3275,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1665 "regex.h2"
+#line 1666 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3635,7 +3394,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1783 "regex.h2"
+#line 1784 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3653,7 +3412,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1800 "regex.h2"
+#line 1801 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3678,7 +3437,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1824 "regex.h2"
+#line 1825 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
         if (-1 != number) {
@@ -3688,7 +3447,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1834 "regex.h2"
+#line 1835 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
 
@@ -3728,15 +3487,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return r; 
 }
 
-#line 1878 "regex.h2"
+#line 1879 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1881 "regex.h2"
+#line 1882 "regex.h2"
     }
 
-#line 1883 "regex.h2"
+#line 1884 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3744,7 +3503,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1891 "regex.h2"
+#line 1892 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3754,12 +3513,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1903 "regex.h2"
+#line 1904 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1910 "regex.h2"
+#line 1911 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3776,7 +3535,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1926 "regex.h2"
+#line 1927 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3789,7 +3548,7 @@ template [[
     }}
 }
 
-#line 1940 "regex.h2"
+#line 1941 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3802,35 +3561,35 @@ template [[
     }
 }
 
-#line 1952 "regex.h2"
+#line 1953 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1965 "regex.h2"
+#line 1966 "regex.h2"
     lookahead_token::lookahead_token(cpp2::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1967 "regex.h2"
+#line 1968 "regex.h2"
     }
 
-#line 1969 "regex.h2"
+#line 1970 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
 
         CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ")"));
     }
 
-#line 1975 "regex.h2"
+#line 1976 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1980 "regex.h2"
+#line 1981 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool{
     auto r {func(cur, ctx, modifiers, true_end_func())}; 
     if (!(positive)) {
@@ -3840,7 +3599,7 @@ template [[nodiscard]] auto lookahead_token_match
     return std::move(r).matched; 
 }
 
-#line 1992 "regex.h2"
+#line 1993 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3865,7 +3624,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
 }
 
-#line 2032 "regex.h2"
+#line 2033 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
 
@@ -3890,11 +3649,11 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2066 "regex.h2"
+#line 2067 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2068 "regex.h2"
+#line 2069 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3938,7 +3697,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2112 "regex.h2"
+#line 2113 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3965,7 +3724,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2138 "regex.h2"
+#line 2139 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3977,7 +3736,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2149 "regex.h2"
+#line 2150 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3990,7 +3749,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2161 "regex.h2"
+#line 2162 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -4015,7 +3774,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2185 "regex.h2"
+#line 2186 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         std::set groups {}; 
@@ -4026,14 +3785,14 @@ template [[nodiscard]] auto lookahead_token_match
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2195 "regex.h2"
+#line 2196 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner_token)), groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2203 "regex.h2"
+#line 2204 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -4046,26 +3805,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2215 "regex.h2"
+#line 2216 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2220 "regex.h2"
+#line 2221 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2225 "regex.h2"
+#line 2226 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2231 "regex.h2"
+#line 2232 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -4081,7 +3840,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2246 "regex.h2"
+#line 2247 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -4110,7 +3869,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2274 "regex.h2"
+#line 2275 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -4135,7 +3894,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2298 "regex.h2"
+#line 2299 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -4161,7 +3920,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2329 "regex.h2"
+#line 2330 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -4184,7 +3943,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2352 "regex.h2"
+#line 2353 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -4194,7 +3953,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2364 "regex.h2"
+#line 2365 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -4211,7 +3970,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2380 "regex.h2"
+#line 2381 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -4237,14 +3996,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2417 "regex.h2"
-    template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
 #line 2418 "regex.h2"
-    template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+    template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
 #line 2419 "regex.h2"
+    template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 2420 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2426 "regex.h2"
+#line 2427 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4264,12 +4023,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2445 "regex.h2"
-    template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 #line 2446 "regex.h2"
+    template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
+#line 2447 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2454 "regex.h2"
+#line 2455 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4289,7 +4048,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2473 "regex.h2"
+#line 2474 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4302,10 +4061,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2485 "regex.h2"
+#line 2486 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2487 "regex.h2"
+#line 2488 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4317,131 +4076,32 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2511 "regex.h2"
-    template  [[nodiscard]] auto group_name_list::get_group_id(auto const& g) -> int{
-        if (g == CPP2_UFCS(str)(name)) {
-            return group_id; 
-        }
-        else {
-            return Inner::get_group_id(g); 
-        }
-    }
-
-#line 2522 "regex.h2"
-    [[nodiscard]] auto group_name_list_end::get_group_id([[maybe_unused]] auto const& unnamed_param_1) -> auto { return -1;  }
-
-#line 2536 "regex.h2"
-        template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
-            : matched{ matched_ }
-            , ctx{ ctx_ }{
-
-#line 2539 "regex.h2"
-        }
-
-#line 2541 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2542 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2543 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2544 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
-
-#line 2546 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2547 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2548 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
-
-#line 2550 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
-            auto group_id {named_groups::get_group_id(g)}; 
-            if (-1 == group_id) {
-                // TODO: Throw error.
-            }
-            return group_id; 
-        }
-
-#line 2559 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2560 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2561 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2562 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
-        context ctx {start, end}; 
-
-        auto r {Matcher::match(start, ctx, modifiers(), true_end_func())}; 
-        return search_return(r.matched && r.pos == end, std::move(ctx)); 
-    }
-
-#line 2569 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2570 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2571 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2572 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
-        auto matched {false}; 
-        context ctx {start, end}; 
-
-        auto cur {start}; 
-        for( ; true; (++cur) ) {
-            if (Matcher::match(cur, ctx, modifiers(), true_end_func()).matched) {
-                matched = true;
-                break;
-            }
-
-            if (cur == ctx.end) {
-                break;
-            }
-        }
-
-        return search_return(std::move(matched), std::move(ctx)); 
-    }
-
-#line 2591 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
-
-#line 2596 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
-        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
-            return CPP2_UFCS(begin)(str) + pos; 
-        }
-        else {
-            return CPP2_UFCS(end)(str); 
-        }
-    }
-
-#line 2617 "regex.h2"
-        template  template  regular_expression_with_matcher::search_return::search_return(cpp2::in matched_, context const& ctx_)
+#line 2519 "regex.h2"
+        template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2620 "regex.h2"
+#line 2522 "regex.h2"
         }
 
-#line 2622 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2623 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2624 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2625 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
-
-#line 2627 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2628 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2629 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
-
-#line 2631 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression_with_matcher::search_return::get_group_id(cpp2::in> g) const& -> auto{
+#line 2524 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 2525 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+#line 2526 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 2527 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+
+#line 2529 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
+#line 2530 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
+#line 2531 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
+
+#line 2533 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
                 // TODO: Throw error.
@@ -4449,28 +4109,28 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2640 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2641 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2642 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2643 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression_with_matcher::match(Iter const& start, Iter const& end) const& -> search_return{
+#line 2542 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 2543 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 2544 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 2545 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
         auto r {Matcher::entry(start, ctx, modifiers())}; 
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2650 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2651 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2652 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2653 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression_with_matcher::search(Iter const& start, Iter const& end) const& -> search_return{
+#line 2552 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 2553 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 2554 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 2555 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
 
@@ -4489,11 +4149,11 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2672 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::to_string() const& -> auto { return Matcher::to_string();  }
+#line 2574 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2677 "regex.h2"
-    template  [[nodiscard]] auto regular_expression_with_matcher::get_iter(cpp2::in> str, auto const& pos) -> auto{
+#line 2579 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
         }
@@ -4502,275 +4162,23 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2713 "regex.h2"
-    auto regex_parser_group_state::next_alternative() & -> void{
-        std::vector new_list {}; 
-        std::swap(new_list, cur_match_list);
-        static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), std::move(new_list)));
-    }
-
-#line 2719 "regex.h2"
-    auto regex_parser_group_state::swap(regex_parser_group_state& t) & -> void{
-        std::swap(cur_match_list, t.cur_match_list);
-        std::swap(alternate_match_lists, t.alternate_match_lists);
-        std::swap(modifiers, t.modifiers);
-    }
-
-#line 2725 "regex.h2"
-    auto regex_parser_group_state::add(auto const& matcher) & -> void { CPP2_UFCS(push_back)(cur_match_list, matcher);  }
-
-#line 2727 "regex.h2"
-    auto regex_parser_group_state::wrap_last(auto const& matcher) & -> void{
-        auto last {CPP2_UFCS(back)(cur_match_list)}; 
-        CPP2_UFCS(back)(cur_match_list) = matcher(last);
-        static_cast(matcher);
-        static_cast(std::move(last));
-    }
-
-#line 2734 "regex.h2"
-    [[nodiscard]] auto regex_parser_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
-
-#line 2744 "regex.h2"
-    [[nodiscard]] auto regex_branch_reset_state::next() & -> int{
-        auto g {cur_group}; 
-        cur_group += 1;
-        max_group = max(max_group, cur_group);
-
-        return g; 
-    }
-
-#line 2752 "regex.h2"
-    auto regex_branch_reset_state::set_next(cpp2::in g) & -> void{
-        cur_group = g;
-        max_group = max(max_group, g);
-    }
-
-#line 2757 "regex.h2"
-    auto regex_branch_reset_state::next_alternative() & -> void{
-        if (is_active) {
-            cur_group = from;
-        }
-    }
-
-#line 2782 "regex.h2"
+#line 2612 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2786 "regex.h2"
-    }
-
-#line 2790 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::group_new_state() & -> regex_parser_group_state{
-        regex_parser_group_state old_state {}; 
-        CPP2_UFCS(swap)(old_state, cur_group_state);
-
-        return old_state; 
-    }
-
-#line 2797 "regex.h2"
-    template  auto regex_parser::group_restore_state(cpp2::in old_state) & -> void{
-        cur_group_state = old_state;
-    }
-
-#line 2804 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::branch_reset_new_state() & -> regex_branch_reset_state{
-        regex_branch_reset_state old_state {}; 
-        std::swap(old_state, cur_branch_reset_state);
-
-        cur_branch_reset_state.is_active = true;
-        cur_branch_reset_state.cur_group = old_state.cur_group;
-        cur_branch_reset_state.from      = cur_branch_reset_state.cur_group;
-        cur_branch_reset_state.max_group = cur_branch_reset_state.cur_group;
-
-        return old_state; 
+#line 2616 "regex.h2"
     }
 
-#line 2816 "regex.h2"
-    template  auto regex_parser::branch_reset_restore_state(cpp2::in old_state) & -> void{
-        auto next_group {cur_branch_reset_state.max_group}; 
-        cur_branch_reset_state = old_state;
-        CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(next_group));
-    }
-
-#line 2825 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
-        auto perl_syntax {false}; 
-        if (!(no_skip)) {
-            if (in_class) {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
-            }
-            else {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
-            }
-        }
-        auto cur {pos + 1}; 
-        if (std::move(perl_syntax)) {
-            for( ; cpp2::cmp_less(cur,CPP2_UFCS(size)(regex)); (cur += 1) ) {
-                auto n {CPP2_ASSERT_IN_BOUNDS(regex, cur)}; 
-
-                if (space_class::includes(n)) {
-                    continue;
-                }
-                else {if (!(in_class) && '#' == std::move(n)) {
-                    cur = CPP2_UFCS(find)(regex, "\n", cur);
-                    if (std::string::npos == cur) {
-                        // No new line, comment runs until the end of the pattern
-                        cur = CPP2_UFCS(size)(regex);
-                    }
-                }
-                else { // None space none comment char
-                    break;
-                }}
-            }
-        }
-
-        // Check for end of file.
-        if (cpp2::cmp_greater(cur,CPP2_UFCS(size)(regex))) {
-            cur = CPP2_UFCS(size)(regex);
-        }
-        return cur; 
-    }
-
-#line 2863 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::next_impl(cpp2::out n, cpp2::in in_class, cpp2::in no_skip) & -> bool{
-        pos = get_next_position(in_class, no_skip);
-        if (pos != CPP2_UFCS(size)(regex)) {
-            n.construct(CPP2_ASSERT_IN_BOUNDS(regex, pos));
-            return true; 
-        }
-        else {
-            n.construct('\0');
-            return false; 
-        }
-    }
-
-#line 2875 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::next(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, false); }
-#line 2876 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::next_in_class(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), true, false);  }
-#line 2877 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::next_no_skip(cpp2::out n) & -> auto { return next_impl(cpp2::out(&n), false, true); }
-
-#line 2881 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::skip() & -> bool{
-        cpp2::deferred_init c; 
-        auto r {next(cpp2::out(&c))}; 
-        static_cast(std::move(c.value()));
-        return r; 
-    }
-
-#line 2888 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::skip_n(cpp2::in n) & -> bool{
-        auto r {true}; 
-        auto cur {0}; 
-        for( ; r && cpp2::cmp_less(cur,n); (r = skip()) ) {
-            cur += 1;
-        }
-        return r; 
-    }
-
-#line 2897 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::current() const& -> char{
-        if (cpp2::cmp_less(pos,CPP2_UFCS(size)(regex))) {
-            return CPP2_ASSERT_IN_BOUNDS(regex, pos); 
-        }else {
-            return '\0'; 
-        }
-    }
-
-#line 2905 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::peek_impl(cpp2::in in_class) const& -> char{
-        auto next_pos {get_next_position(in_class, false)}; 
-        if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
-            return CPP2_ASSERT_IN_BOUNDS(regex, std::move(next_pos)); 
-        }
-        else {
-            return '\0'; 
-        }
-    }
-
-#line 2915 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::peek() const& -> auto { return peek_impl(false); }
-#line 2916 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::peek_in_class() const& -> auto { return peek_impl(true);  }
-
-#line 2920 "regex.h2"
+#line 2620 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2925 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::join(auto const& list, auto const& func) -> std::string{
-        std::string r {""}; 
-
-        std::string separator {""}; 
-        for ( auto const& cur : list ) {
-            r += separator + func(cur);
-            separator = ", ";
-        }
-
-        return r; 
-    }
-
-#line 2937 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
-
-#line 2943 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::create_matcher(cpp2::in name, cpp2::in template_arguments) const& -> auto{
-        auto sep {", "}; 
-        if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
-
-        return "::cpp2::regex::" + cpp2::to_string(name) + ""; 
-    }
-
-#line 2950 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::create_matcher_from_list(auto const& list) & -> auto { return create_matcher("matcher_list", join(list));  }
-
-#line 2952 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::create_matcher_from_state() & -> std::string{
-        if (0 == CPP2_UFCS(size)(cur_group_state.alternate_match_lists)) {return create_matcher_from_list(cur_group_state.cur_match_list); }
-
-        if (0 == CPP2_UFCS(size)(cur_group_state.cur_match_list)) {
-            CPP2_UFCS(add)(cur_group_state, create_matcher("empty_matcher_logic", ""));
-        }
-        CPP2_UFCS(next_alternative)(cur_group_state);
-        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
-
-        auto list {join(cur_group_state.alternate_match_lists, [&](auto const& arg) -> auto { return create_matcher_from_list(arg);  })}; 
-        auto alternative_id {alternatives_count}; 
-        alternatives_count += 1;
-
-        return create_matcher("alternative_matcher_logic", (cpp2::to_string(std::move(alternative_id)) + ", " + cpp2::to_string(std::move(list)))); 
-    }
-
-#line 2968 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::create_named_groups_list() const& -> std::string{
-        std::string r {"::cpp2::regex::group_name_list_end"}; 
-
-        for ( auto const& cur : named_groups ) {
-            r = { "::cpp2::regex::group_name_list<\"" + cpp2::to_string(cur.first) + "\", " + cpp2::to_string(cur.second) + ", " + cpp2::to_string(r) + ">" };
-        }
-
-        return r; 
-    }
-
-#line 2980 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse_lookahead(cpp2::in name, cpp2::in positive) & -> bool{
-        auto old_state {group_new_state()}; 
-        parse_until(')');
-        auto inner {create_matcher_from_state()}; 
-        group_restore_state(std::move(old_state));
-
-        CPP2_UFCS(add)(cur_group_state, create_matcher("lookahead_matcher_logic", (cpp2::to_string(positive) + ", \"" + cpp2::to_string(name) + "\", " + cpp2::to_string(std::move(inner)))));
-
-        return true; 
-    }
-
-#line 2991 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parser_expression_modifiers() & -> std::string{
+#line 2627 "regex.h2"
+    template  [[nodiscard]] auto regex_parser::parser_expression_modifiers(cpp2::out mods) & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
 
@@ -4778,6 +4186,8 @@ template [[nodiscard]] auto word_boundary_token_mat
             r += (cpp2::to_string(_1) + cpp2::to_string(name));
         }}; 
 
+        mods.construct();
+
         auto mod_pos {0}; 
         for( ; cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)); mod_pos += 1 ) {
             char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
@@ -4787,17 +4197,17 @@ template [[nodiscard]] auto word_boundary_token_mat
             else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
             else {if (c == 'n') {
                 add("::cpp2::regex::expression_flags::no_group_captures", r);
-                cur_group_state.modifiers.group_captures_have_numbers = false;
+                mods.value().group_captures_have_numbers = false;
             }
             else {if (c == 'x') {
                 add("::cpp2::regex::expression_flags::perl_code_syntax", r);
-                cur_group_state.modifiers.perl_code_syntax = true;
+                mods.value().perl_code_syntax = true;
 
                 // Check if we have 'xx'
                 mod_pos += 1;
                 if (cpp2::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)) && 'x' == CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)) {
                     add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
-                    cur_group_state.modifiers.perl_code_syntax_in_classes = true;
+                    mods.value().perl_code_syntax_in_classes = true;
                 }
             }
             else {error(("Unknown modifier: '" + cpp2::to_string(std::move(c)) + "'")); }}}}}
@@ -4806,30 +4216,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 3030 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::is_handle_special(cpp2::in c) & -> bool{
-        if (c != '\'') {return false; }
-
-        CPP2_UFCS(add)(cur_group_state, create_matcher("char_matcher_logic", ("'\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "', '\\" + cpp2::to_string(c) + "'")));
-        return true; 
-    }
-
-#line 3037 "regex.h2"
-    template  auto regex_parser::parse_until(cpp2::in term) & -> void{
-        char c {current()}; 
-        for( ; c != '\n'; static_cast(next(cpp2::out(&c))) ) {
-            if (c == term) {return ; }
-
-            if (!(has_error) && is_handle_special(c)) {continue; }
-
-            if (has_error) {return ; }
-
-            // No special char, push a character match
-            CPP2_UFCS(add)(cur_group_state, create_matcher("char_matcher_logic", ("'" + cpp2::to_string(c) + "', '" + cpp2::to_string(safe_tolower(c)) + "', '" + cpp2::to_string(safe_toupper(c)) + "'")));
-        }
-    }
-
-#line 3051 "regex.h2"
+#line 2668 "regex.h2"
     template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -4852,10 +4239,11 @@ template [[nodiscard]] auto word_boundary_token_mat
         return res; 
     }
 
-#line 3073 "regex.h2"
+#line 2690 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
-        auto mod {parser_expression_modifiers()}; 
-        parse_context parse_ctx {regex}; 
+        cpp2::deferred_init modifiers; 
+        auto mod {parser_expression_modifiers(cpp2::out(&modifiers))}; 
+        parse_context parse_ctx {regex, std::move(modifiers.value())}; 
         if (!(CPP2_UFCS(parse)(parse_ctx))) {
             error(parse_ctx.error_text);
             return "Error"; 
@@ -4886,7 +4274,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 3107 "regex.h2"
+#line 2725 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/reflect.h b/source/reflect.h
index 13831e94a7..5baa6af78c 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -2078,7 +2078,7 @@ auto regex_gen(meta::type_declaration& t) -> void
         auto regular_expression {::cpp2::regex::generate_template(expr.second.first, expr.second.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
 
         CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(std::move(regular_expression))));
-        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression_with_matcher = ();"));
+        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression = ();"));
     }
 }
 
diff --git a/source/reflect.h2 b/source/reflect.h2
index edd92a5951..d57f00e937 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1445,7 +1445,7 @@ regex_gen: (inout t: meta::type_declaration) =
         regular_expression:= ::cpp2::regex::generate_template(expr.second.first, expr.second.second, :(message: _) = t$.error(message););
 
         t.add_member("public (expr.first)$_matcher: type = (regular_expression)$");
-        t.add_member("public (expr.first)$: cpp2::regex::regular_expression_with_matcher = ();");
+        t.add_member("public (expr.first)$: cpp2::regex::regular_expression = ();");
     }
 }
 
diff --git a/source/regex.h2 b/source/regex.h2
index eeb33232e0..35bc62e4e8 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -488,8 +488,9 @@ parse_context: type = {
     cur_branch_reset_state: parse_context_branch_reset_state = ();
     named_groups :          std::map = ();
 
-    operator=:(out this, r: std::string_view) = {
+    operator=:(out this, r: std::string_view, modifiers: parse_context_modifier_state) = {
         regex = r;
+        set_modifiers(modifiers);
     }
 
     // State management functions
@@ -2504,107 +2505,8 @@ class_matcher_logic:  type =
 //-----------------------------------------------------------------------
 //
 
-// Helper for named groups.
-
-group_name_list:  type = {
-
-    get_group_id: (g) -> int = {
-        if g == name.str() {
-            return group_id;
-        }
-        else {
-            return Inner::get_group_id(g);
-        }
-    }
-}
-
-group_name_list_end: type = {
-    get_group_id: (_) -1;
-}
-
-// Regular expression implementation
-regular_expression:  type = {
-
-    context:  type == match_context;
-    modifiers: type      == match_modifiers;
-
-    // TODO: Named multiple return has problems with templates.
-    search_return:  type = {
-        public matched: bool;
-        public ctx: context;
-
-        operator=:(out this, matched_: bool, ctx_: context) = {
-            matched = matched_;
-            ctx = ctx_;
-        }
-
-        group_number: (this) ctx.size();
-        group:        (this, g: int) ctx.get_group_string(g);
-        group_start:  (this, g: int) ctx.get_group_start(g);
-        group_end:    (this, g: int) ctx.get_group_end(g);
-
-        group:        (this, g: bstring) group(get_group_id(g));
-        group_start:  (this, g: bstring) group_start(get_group_id(g));
-        group_end:    (this, g: bstring) group_end(get_group_id(g));
-
-        private get_group_id: (this, g: bstring) -> _ = {
-            group_id := named_groups::get_group_id(g);
-            if -1 == group_id {
-                // TODO: Throw error.
-            }
-            return group_id;
-        }
-    }
-
-    match: (in this, str: bview)                 match(str.begin(), str.end());
-    match: (in this, str: bview, start)          match(get_iter(str, start), str.end());
-    match: (in this, str: bview, start, length)  match(get_iter(str, start), get_iter(str, start + length));
-    match:  (in this, start: Iter, end: Iter) -> search_return = {
-        ctx: context = (start, end);
-
-        r := Matcher::match(start, ctx, modifiers(), true_end_func());
-        return search_return(r.matched && r.pos == end, ctx);
-    }
-
-    search: (in this, str: bview)                 search(str.begin(), str.end());
-    search: (in this, str: bview, start)          search(get_iter(str, start), str.end());
-    search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
-    search:  (in this, start: Iter, end: Iter) -> search_return = {
-        matched := false;
-        ctx: context = (start, end);
-
-        cur:= start;
-        while true next (cur++) {
-            if Matcher::match(cur, ctx, modifiers(), true_end_func()).matched {
-                matched = true;
-                break;
-            }
-
-            if cur == ctx.end {
-                break;
-            }
-        }
-
-        return search_return(matched, ctx);
-    }
-
-    to_string: (in this) Matcher::to_string();
-
-    // Helper functions
-    //
-
-    private get_iter: (str: bview, pos) -> _ = {
-        if pos < str.size() {
-            return str.begin() + pos;
-        }
-        else {
-            return str.end();
-        }
-    }
-}
-
 // Regular expression implementation
-regular_expression_with_matcher:  type = {
+regular_expression:  type = {
 
     context:  type == match_context;
     modifiers: type      == match_modifiers;
@@ -2691,76 +2593,6 @@ regular_expression_with_matcher:  type = {
 //-----------------------------------------------------------------------
 //
 
-// State of the expression modifiers.
-//
-regex_parser_modifier_state: @struct type = {
-    group_captures_have_numbers : bool = true;
-    perl_code_syntax:             bool = false;
-    perl_code_syntax_in_classes:  bool = false;
-}
-
-// State of the current group. See '()'
-regex_parser_group_state: @struct type = {
-
-    // Current list of matchers
-    cur_match_list: std::vector = ();
-
-    // List of alternate matcher lists. E.g. ab|cd|xy
-    alternate_match_lists: std::vector> = ();
-
-    modifiers : regex_parser_modifier_state = ();
-
-    next_alternative: (inout this) = {
-        new_list: std::vector = ();
-        std::swap(new_list, cur_match_list);
-        _ = alternate_match_lists.insert(alternate_match_lists.end(), new_list);
-    }
-
-    swap: (inout this, inout t: regex_parser_group_state) = {
-        std::swap(cur_match_list, t.cur_match_list);
-        std::swap(alternate_match_lists, t.alternate_match_lists);
-        std::swap(modifiers, t.modifiers);
-    }
-
-    add: (inout this, matcher: _) = cur_match_list.push_back(matcher);
-
-    wrap_last: (inout this, matcher) = {
-        last:= cur_match_list.back();
-        cur_match_list.back() = matcher(last);
-        _ = matcher;
-        _ = last;
-    }
-
-    empty: (this) -> bool = cur_match_list.empty();
-}
-
-// State for the branch reset. Takes care of the group numbering. See '(|)'.
-regex_branch_reset_state: @struct type = {
-    is_active : bool = false;
-    cur_group : int  = 1; // Global capture group.
-    max_group : int  = 1;
-    from      : int  = 1;
-
-    next: (inout this) -> int = {
-        g := cur_group;
-        cur_group += 1;
-        max_group = max(max_group, cur_group);
-
-        return g;
-    }
-
-    set_next: (inout this, g: int) = {
-        cur_group = g;
-        max_group = max(max_group, g);
-    }
-
-    next_alternative: (inout this) = {
-        if is_active {
-            cur_group = from;
-        }
-    }
-}
-
 // Parser and generator for regular expressions.
 regex_parser:  type = {
 
@@ -2768,8 +2600,6 @@ regex_parser:  type = {
     modifier:  std::string_view;
     error_out: Error_out;
 
-    cur_group_state:        regex_parser_group_state = ();
-    cur_branch_reset_state: regex_branch_reset_state = ();
     pos:                    size_t = 0;
     alternatives_count:     int = 0;
     named_groups :          std::map = ();
@@ -2785,136 +2615,6 @@ regex_parser:  type = {
         this.error_out = e;
     }
 
-    // State management functions
-    //
-    group_new_state: (inout this) -> regex_parser_group_state = {
-        old_state: regex_parser_group_state = ();
-        old_state.swap(cur_group_state);
-
-        return old_state;
-    }
-
-    group_restore_state: (inout this, old_state: regex_parser_group_state) = {
-        cur_group_state = old_state;
-    }
-
-    // Branch reset management functions
-    //
-
-    branch_reset_new_state: (inout this) -> regex_branch_reset_state = {
-        old_state: regex_branch_reset_state = ();
-        std::swap(old_state, cur_branch_reset_state);
-
-        cur_branch_reset_state.is_active = true;
-        cur_branch_reset_state.cur_group = old_state.cur_group;
-        cur_branch_reset_state.from      = cur_branch_reset_state.cur_group;
-        cur_branch_reset_state.max_group = cur_branch_reset_state.cur_group;
-
-        return old_state;
-    }
-
-    branch_reset_restore_state: (inout this, old_state: regex_branch_reset_state) = {
-        next_group := cur_branch_reset_state.max_group;
-        cur_branch_reset_state = old_state;
-        cur_branch_reset_state.set_next(next_group);
-    }
-
-    // Position management functions
-    //
-
-    private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = {
-        perl_syntax := false;
-        if !no_skip {
-            if in_class {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
-            }
-            else {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
-            }
-        }
-        cur := pos + 1;
-        if perl_syntax {
-            while cur < regex.size() next (cur += 1) {
-                n: = regex[cur];
-
-                if space_class::includes(n) {
-                    continue;
-                }
-                else if !in_class && '#' == n {
-                    cur = regex.find("\n", cur);
-                    if std::string::npos == cur {
-                        // No new line, comment runs until the end of the pattern
-                        cur = regex.size();
-                    }
-                }
-                else { // None space none comment char
-                    break;
-                }
-            }
-        }
-
-        // Check for end of file.
-        if cur > regex.size() {
-            cur = regex.size();
-        }
-        return cur;
-    }
-
-    private next_impl: (inout this, out n: char, in_class: bool, no_skip: bool) -> bool = {
-        pos = get_next_position(in_class, no_skip);
-        if pos != regex.size() {
-            n = regex[pos];
-            return true;
-        }
-        else {
-            n = '\0';
-            return false;
-        }
-    }
-
-    next: (inout this, out n: char)          next_impl(out n, false, false);
-    next_in_class: (inout this, out n: char) next_impl(out n, true, false);
-    next_no_skip: (inout this, out n: char)  next_impl(out n, false, true);
-
-
-
-    skip: (inout this) -> bool = {
-        c: char;
-        r := next(out c);
-        _ = c;
-        return r;
-    }
-
-    skip_n:(inout this, n: int) -> bool = {
-        r := true;
-        cur := 0;
-        while r && cur < n next (r = skip()) {
-            cur += 1;
-        }
-        return r;
-    }
-
-    current: (in this) -> char = {
-        if pos < regex.size() {
-            return regex[pos];
-        } else {
-            return '\0';
-        }
-    }
-
-    private peek_impl: (in this, in_class: bool) -> char = {
-        next_pos := get_next_position(in_class, false);
-        if next_pos < regex.size() {
-            return regex[next_pos];
-        }
-        else {
-            return '\0';
-        }
-    }
-
-    peek: (in this)          peek_impl(false);
-    peek_in_class: (in this) peek_impl(true);
-
     // Misc functions
     //
     error:(inout this, message: std::string) = {
@@ -2922,73 +2622,9 @@ regex_parser:  type = {
         has_error = true;
     }
 
-    join: (list, func) -> std::string = {
-        r: std::string = "";
-
-        separator: std::string = "";
-        for list do (cur) {
-            r += separator + func(cur);
-            separator = ", ";
-        }
-
-        return r;
-    }
-
-    join: (list: std::vector) join(list, :(arg) -> _ == arg); // Todo: Shorthand syntax for const lambda
-
-
-    // Creator functions for matchers.
-    //
-
-    create_matcher: (in this, name: std::string, template_arguments: std::string) -> _ = {
-        sep := ", ";
-        if template_arguments.empty() { sep = ""; }
-
-        return "::cpp2::regex::(name)$";
-    }
-
-    create_matcher_from_list: (inout this, list) create_matcher("matcher_list", join(list));
-
-    create_matcher_from_state: (inout this) -> std::string = {
-        if 0 == cur_group_state.alternate_match_lists.size() { return create_matcher_from_list(cur_group_state.cur_match_list); }
-
-        if 0 == cur_group_state.cur_match_list.size() {
-            cur_group_state.add(create_matcher("empty_matcher_logic", ""));
-        }
-        cur_group_state.next_alternative();
-        cur_branch_reset_state.next_alternative();
-
-        list := join(cur_group_state.alternate_match_lists, :(arg) -> _ == create_matcher_from_list(arg));
-        alternative_id := alternatives_count;
-        alternatives_count += 1;
-
-        return create_matcher("alternative_matcher_logic", "(alternative_id)$, (list)$");
-    }
-
-    create_named_groups_list: (in this) -> std::string = {
-        r : std::string = "::cpp2::regex::group_name_list_end";
-
-        for named_groups do (cur) {
-            r = "::cpp2::regex::group_name_list<\"(cur.first)$\", (cur.second)$, (r)$>";
-        }
-
-        return r;
-    }
-
     // Parser helper functions.
 
-    parse_lookahead: (inout this, name: std::string, positive: bool) -> bool = {
-        old_state: _ = group_new_state();
-        parse_until(')');
-        inner:= create_matcher_from_state();
-        group_restore_state(old_state);
-
-        cur_group_state.add(create_matcher("lookahead_matcher_logic", "(positive)$, \"(name)$\", (inner)$"));
-
-        return true;
-    }
-
-    parser_expression_modifiers: (inout this) -> std::string = {
+    parser_expression_modifiers: (inout this, out mods : parse_context_modifier_state) -> std::string = {
         r: std::string = "0";
         sep: std::string = " | ";
 
@@ -2996,6 +2632,8 @@ regex_parser:  type = {
             r += "(sep$)$(name)$";
         };
 
+        mods = ();
+
         mod_pos := 0;
         while mod_pos < modifier.ssize() next mod_pos += 1 {
             c: char = modifier[mod_pos];
@@ -3005,17 +2643,17 @@ regex_parser:  type = {
             else if c == 's' { add("::cpp2::regex::expression_flags::single_line", r); }
             else if c == 'n' {
                 add("::cpp2::regex::expression_flags::no_group_captures", r);
-                cur_group_state.modifiers.group_captures_have_numbers = false;
+                mods.group_captures_have_numbers = false;
             }
             else if c == 'x' {
                 add("::cpp2::regex::expression_flags::perl_code_syntax", r);
-                cur_group_state.modifiers.perl_code_syntax = true;
+                mods.perl_code_syntax = true;
 
                 // Check if we have 'xx'
                 mod_pos += 1;
                 if mod_pos < modifier.ssize() && 'x' == modifier[mod_pos] {
                     add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
-                    cur_group_state.modifiers.perl_code_syntax_in_classes = true;
+                    mods.perl_code_syntax_in_classes = true;
                 }
             }
             else { error("Unknown modifier: '(c)$'"); }
@@ -3027,27 +2665,6 @@ regex_parser:  type = {
     // Parsing functions
     //
 
-    is_handle_special: (inout this, c: char) -> bool = {
-        if c != '\'' { return false; }
-
-        cur_group_state.add(create_matcher("char_matcher_logic", "'\\(c)$', '\\(c)$', '\\(c)$'"));
-        return true;
-    }
-
-    parse_until:(inout this, term: char) = {
-        c: char = current();
-        while c != '\n' next _ = next(out c) {
-            if c == term { return; }
-
-            if !has_error && is_handle_special(c) { continue; }
-
-            if has_error { return; }
-
-            // No special char, push a character match
-            cur_group_state.add(create_matcher("char_matcher_logic", "'(c)$', '(safe_tolower(c))$', '(safe_toupper(c))$'"));
-        }
-    }
-
     create_named_group_lookup: (this) -> std::string = {
         res: std::string = "get_named_group_index: (name) -> int = {\n";
 
@@ -3071,8 +2688,9 @@ regex_parser:  type = {
     }
 
     parse:(inout this) -> std::string = {
-        mod   := parser_expression_modifiers();
-        parse_ctx: parse_context = (regex);
+        modifiers : parse_context_modifier_state;
+        mod   := parser_expression_modifiers(out modifiers);
+        parse_ctx: parse_context = (regex, modifiers);
         if !parse_ctx.parse() {
             error(parse_ctx.error_text);
             return "Error";

From b7a44785cc8be660e13d2b858159bfa59a9ae185 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 14 May 2024 10:37:38 +0200
Subject: [PATCH 123/161] Moved name group lookup creation.

---
 include/cpp2regex.h | 863 ++++++++++++++++++++++----------------------
 source/regex.h2     |  56 ++-
 2 files changed, 456 insertions(+), 463 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 7e544a126e..0b860734e7 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -110,113 +110,113 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 860 "regex.h2"
+#line 861 "regex.h2"
 class generation_function_context;
     
 
-#line 876 "regex.h2"
+#line 877 "regex.h2"
 class generation_context;
 
-#line 1023 "regex.h2"
+#line 1046 "regex.h2"
 class regex_token_list;
     
 
-#line 1055 "regex.h2"
+#line 1078 "regex.h2"
 class regex_token_base;
     
 
-#line 1069 "regex.h2"
+#line 1092 "regex.h2"
 class regex_token_check;
     
 
-#line 1084 "regex.h2"
+#line 1107 "regex.h2"
 class regex_token_code;
     
 
-#line 1100 "regex.h2"
+#line 1123 "regex.h2"
 class regex_token_empty;
     
 
-#line 1116 "regex.h2"
+#line 1139 "regex.h2"
 class alternative_token;
     
 
-#line 1134 "regex.h2"
+#line 1157 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1180 "regex.h2"
+#line 1203 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1206 "regex.h2"
+#line 1229 "regex.h2"
 class any_token;
     
 
-#line 1233 "regex.h2"
+#line 1256 "regex.h2"
 class char_token;
     
 
-#line 1277 "regex.h2"
+#line 1300 "regex.h2"
 class class_token;
     
 
-#line 1409 "regex.h2"
+#line 1432 "regex.h2"
 template class class_token_matcher;
 
-#line 1480 "regex.h2"
+#line 1503 "regex.h2"
 class escaped_char_token;
     
 
-#line 1514 "regex.h2"
+#line 1537 "regex.h2"
 class group_ref_token;
     
 
-#line 1646 "regex.h2"
+#line 1669 "regex.h2"
 class group_token;
     
 
-#line 1874 "regex.h2"
+#line 1897 "regex.h2"
 class modifier_token;
     
 
-#line 1890 "regex.h2"
+#line 1913 "regex.h2"
 template class apply_modifiers_matcher;
 
-#line 1902 "regex.h2"
+#line 1925 "regex.h2"
 template class pop_modifiers_matcher;
 
-#line 1960 "regex.h2"
+#line 1983 "regex.h2"
 class lookahead_token;
     
 
-#line 2059 "regex.h2"
+#line 2082 "regex.h2"
 class range_token;
     
 
-#line 2202 "regex.h2"
+#line 2225 "regex.h2"
 template class range_token_matcher;
 
-#line 2327 "regex.h2"
+#line 2350 "regex.h2"
 class special_range_token;
     
 
-#line 2417 "regex.h2"
+#line 2440 "regex.h2"
 template class branch_reset_matcher_logic;
     
 
-#line 2425 "regex.h2"
+#line 2448 "regex.h2"
 template class char_matcher_logic;
 
-#line 2453 "regex.h2"
+#line 2476 "regex.h2"
 template class class_matcher_logic;
 
-#line 2509 "regex.h2"
+#line 2532 "regex.h2"
 template class regular_expression;
 
-#line 2597 "regex.h2"
+#line 2620 "regex.h2"
 template class regex_parser;
 
-#line 2732 "regex.h2"
+#line 2728 "regex.h2"
 }
 }
 
@@ -666,42 +666,43 @@ class parse_context {
 
     private: size_t pos {0}; 
 
-    public: std::string error_text {""}; 
+           public: std::string error_text {""}; 
+           public: std::map named_groups {}; 
 
     private: parse_context_group_state cur_group_state {}; 
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
-    private: std::map named_groups {}; 
 
+#line 492 "regex.h2"
     public: explicit parse_context(cpp2::in r, cpp2::in modifiers);
 
-#line 496 "regex.h2"
+#line 497 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 506 "regex.h2"
+#line 507 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::in old_state) & -> token_ptr;
 
-#line 512 "regex.h2"
+#line 513 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> parse_context_modifier_state;
 
-#line 516 "regex.h2"
+#line 517 "regex.h2"
     public: auto set_modifiers(cpp2::in mod) & -> void;
 
-#line 520 "regex.h2"
+#line 521 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 531 "regex.h2"
+#line 532 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::in old_state) & -> void;
 
-#line 537 "regex.h2"
+#line 538 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 542 "regex.h2"
+#line 543 "regex.h2"
     // Position management functions
     //
 
@@ -711,88 +712,88 @@ class parse_context {
 
     public: auto add_token(cpp2::in token) & -> void;
 
-#line 553 "regex.h2"
+#line 554 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 557 "regex.h2"
+#line 558 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 567 "regex.h2"
+#line 568 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 571 "regex.h2"
+#line 572 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 576 "regex.h2"
+#line 577 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 580 "regex.h2"
+#line 581 "regex.h2"
     public: auto set_named_group(cpp2::in name, cpp2::in id) & -> void;
 
-#line 586 "regex.h2"
+#line 587 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::in name) const& -> int;
 
-#line 596 "regex.h2"
+#line 597 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool;
 
-#line 608 "regex.h2"
+#line 609 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::in n) & -> bool;
 
-#line 621 "regex.h2"
+#line 622 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::in err) & -> token_ptr;
 
-#line 630 "regex.h2"
+#line 631 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 642 "regex.h2"
+#line 643 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t;
 
-#line 683 "regex.h2"
+#line 684 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool;
 
-#line 704 "regex.h2"
+#line 705 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::in e, cpp2::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::in n, cpp2::out r) & -> bool;
 
-#line 720 "regex.h2"
+#line 721 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 740 "regex.h2"
+#line 741 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::in in_class) const& -> char;
 
-#line 750 "regex.h2"
+#line 751 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       parse_context_modifier_state& parser_modifiers) & -> bool;
 
-#line 818 "regex.h2"
+#line 819 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::in term) & -> bool;
 
-#line 855 "regex.h2"
+#line 856 "regex.h2"
     public: [[nodiscard]] auto parse() & -> auto;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 858 "regex.h2"
+#line 859 "regex.h2"
 };
 
 class generation_function_context {
@@ -801,10 +802,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::in c) & -> void;
 
-#line 871 "regex.h2"
+#line 872 "regex.h2"
     public: auto remove_tabs(cpp2::in c) & -> void;
 
-#line 874 "regex.h2"
+#line 875 "regex.h2"
 };
 
 class generation_context {
@@ -821,81 +822,84 @@ class generation_context {
 
     public: auto add(cpp2::in s) & -> void;
 
-#line 893 "regex.h2"
+#line 894 "regex.h2"
     public: auto add_check(cpp2::in check) & -> void;
 
-#line 898 "regex.h2"
+#line 899 "regex.h2"
     public: auto add_statefull(cpp2::in next_func, cpp2::in c) & -> void;
 
-#line 905 "regex.h2"
+#line 906 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::in token) & -> std::string;
 
-#line 911 "regex.h2"
+#line 912 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::in token) & -> std::string;
 
-#line 919 "regex.h2"
+#line 920 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::in> groups) & -> std::string;
 
-#line 941 "regex.h2"
+#line 942 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 945 "regex.h2"
+#line 946 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 949 "regex.h2"
+#line 950 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     protected: auto start_func_named(cpp2::in name) & -> void;
 
-#line 962 "regex.h2"
+#line 963 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 968 "regex.h2"
+#line 969 "regex.h2"
     public: auto end_func_statefull(cpp2::in s) & -> void;
 
-#line 980 "regex.h2"
+#line 981 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 984 "regex.h2"
+#line 985 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 988 "regex.h2"
+#line 989 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 994 "regex.h2"
+#line 995 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 1000 "regex.h2"
+#line 1001 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 1006 "regex.h2"
+#line 1007 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1014 "regex.h2"
+#line 1015 "regex.h2"
     public: auto finish_context() & -> void;
+
+#line 1023 "regex.h2"
+    public: [[nodiscard]] auto create_named_group_lookup(cpp2::in> named_groups) const& -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1021 "regex.h2"
+#line 1044 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1026 "regex.h2"
+#line 1049 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::in t);
 
-#line 1033 "regex.h2"
+#line 1056 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1039 "regex.h2"
+#line 1062 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1045 "regex.h2"
+#line 1068 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -903,36 +907,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1052 "regex.h2"
+#line 1075 "regex.h2"
 };
 
-#line 1055 "regex.h2"
+#line 1078 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1058 "regex.h2"
+#line 1081 "regex.h2"
     public: explicit regex_token_base(cpp2::in str);
 
-#line 1062 "regex.h2"
+#line 1085 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1066 "regex.h2"
+#line 1089 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1067 "regex.h2"
+#line 1090 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1072 "regex.h2"
+#line 1095 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::in str, cpp2::in check_);
 
-#line 1079 "regex.h2"
+#line 1102 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -940,17 +944,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1082 "regex.h2"
+#line 1105 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1087 "regex.h2"
+#line 1110 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::in str, cpp2::in code_);
 
-#line 1094 "regex.h2"
+#line 1117 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -958,16 +962,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1097 "regex.h2"
+#line 1120 "regex.h2"
 };
 
-#line 1100 "regex.h2"
+#line 1123 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1103 "regex.h2"
+#line 1126 "regex.h2"
     public: explicit regex_token_empty(cpp2::in str);
 
-#line 1107 "regex.h2"
+#line 1130 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -975,7 +979,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1110 "regex.h2"
+#line 1133 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -984,12 +988,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1119 "regex.h2"
+#line 1142 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1129 "regex.h2"
+#line 1152 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -997,23 +1001,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1132 "regex.h2"
+#line 1155 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1138 "regex.h2"
+#line 1161 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::in a);
 
-#line 1145 "regex.h2"
+#line 1168 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1161 "regex.h2"
+#line 1184 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1167 "regex.h2"
+#line 1190 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1021,33 +1025,33 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1178 "regex.h2"
+#line 1201 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1185 "regex.h2"
+#line 1208 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1202 "regex.h2"
+#line 1225 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1209 "regex.h2"
+#line 1232 "regex.h2"
     public: explicit any_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1217 "regex.h2"
+#line 1240 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1055,23 +1059,23 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1220 "regex.h2"
+#line 1243 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1233 "regex.h2"
+#line 1256 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1236 "regex.h2"
+#line 1259 "regex.h2"
     private: char token; 
 
     public: explicit char_token(cpp2::in t);
 
-#line 1243 "regex.h2"
+#line 1266 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1247 "regex.h2"
+#line 1270 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1079,30 +1083,30 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1252 "regex.h2"
+#line 1275 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1275 "regex.h2"
+#line 1298 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1280 "regex.h2"
+#line 1303 "regex.h2"
     private: bool negate; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str);
 
-#line 1289 "regex.h2"
+#line 1312 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1396 "regex.h2"
+#line 1419 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1401 "regex.h2"
+#line 1424 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1110,21 +1114,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1407 "regex.h2"
+#line 1430 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1432 "regex.h2"
+#line 1455 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1444 "regex.h2"
+#line 1467 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1136,23 +1140,23 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1455 "regex.h2"
+#line 1478 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1480 "regex.h2"
+#line 1503 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1483 "regex.h2"
+#line 1506 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::in t);
 
-#line 1490 "regex.h2"
+#line 1513 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1494 "regex.h2"
+#line 1517 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1160,14 +1164,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1497 "regex.h2"
+#line 1520 "regex.h2"
 };
 
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1508 "regex.h2"
+#line 1531 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1176,15 +1180,15 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1517 "regex.h2"
+#line 1540 "regex.h2"
     private: int id; 
 
     public: explicit group_ref_token(cpp2::in id_, cpp2::in str);
 
-#line 1524 "regex.h2"
+#line 1547 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1616 "regex.h2"
+#line 1639 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1192,31 +1196,31 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1619 "regex.h2"
+#line 1642 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1646 "regex.h2"
+#line 1669 "regex.h2"
 class group_token: public regex_token {
 
-#line 1649 "regex.h2"
+#line 1672 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
     private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr;
 
-#line 1666 "regex.h2"
+#line 1689 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1784 "regex.h2"
+#line 1807 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string;
 
-#line 1801 "regex.h2"
+#line 1824 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1825 "regex.h2"
+#line 1848 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1225,22 +1229,22 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1831 "regex.h2"
+#line 1854 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1874 "regex.h2"
+#line 1897 "regex.h2"
 class modifier_token: public regex_token_base {
 
-#line 1877 "regex.h2"
+#line 1900 "regex.h2"
     private: std::string mod; 
 
     public: explicit modifier_token(cpp2::in mod_);
 
-#line 1884 "regex.h2"
+#line 1907 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~modifier_token() noexcept;
 
@@ -1248,7 +1252,7 @@ class modifier_token: public regex_token_base {
     public: auto operator=(modifier_token const&) -> void = delete;
 
 
-#line 1888 "regex.h2"
+#line 1911 "regex.h2"
 };
 
 template class apply_modifiers_matcher {
@@ -1259,7 +1263,7 @@ template class apply_modifie
     public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
 
 
-#line 1900 "regex.h2"
+#line 1923 "regex.h2"
 };
 
 template class pop_modifiers_matcher {
@@ -1270,39 +1274,39 @@ template class pop_modifiers_matcher {
     public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
 
 
-#line 1907 "regex.h2"
+#line 1930 "regex.h2"
 };
 
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1927 "regex.h2"
+#line 1950 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1939 "regex.h2"
+#line 1962 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1953 "regex.h2"
+#line 1976 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 1958 "regex.h2"
+#line 1981 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1963 "regex.h2"
+#line 1986 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::in positive_);
 
-#line 1970 "regex.h2"
+#line 1993 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1976 "regex.h2"
+#line 1999 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1310,18 +1314,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1979 "regex.h2"
+#line 2002 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool;
 
-#line 1990 "regex.h2"
+#line 2013 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2017 "regex.h2"
+#line 2040 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1335,17 +1339,17 @@ template                     using named_class_not_space = class
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2031 "regex.h2"
+#line 2054 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2057 "regex.h2"
+#line 2080 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2062 "regex.h2"
+#line 2085 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1355,19 +1359,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2139 "regex.h2"
+#line 2162 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2150 "regex.h2"
+#line 2173 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2162 "regex.h2"
+#line 2185 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2186 "regex.h2"
+#line 2209 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2196 "regex.h2"
+#line 2219 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1375,46 +1379,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2200 "regex.h2"
+#line 2223 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2216 "regex.h2"
+#line 2239 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::in count) -> bool;
 
-#line 2221 "regex.h2"
+#line 2244 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::in count) -> bool;
 
-#line 2226 "regex.h2"
+#line 2249 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::in count) -> bool;
 
-#line 2232 "regex.h2"
+#line 2255 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2247 "regex.h2"
+#line 2270 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2275 "regex.h2"
+#line 2298 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2299 "regex.h2"
+#line 2322 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2323 "regex.h2"
+#line 2346 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2330 "regex.h2"
+#line 2353 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1423,7 +1427,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2359 "regex.h2"
+#line 2382 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1432,10 +1436,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2381 "regex.h2"
+#line 2404 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
 
-#line 2407 "regex.h2"
+#line 2430 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Matchers for regular expressions.
@@ -1443,7 +1447,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-#line 2415 "regex.h2"
+#line 2438 "regex.h2"
 // Regex syntax: none Example: -
 //
 template class branch_reset_matcher_logic {
@@ -1454,7 +1458,7 @@ template class branch_reset_matcher_logic {
     public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
 
-#line 2421 "regex.h2"
+#line 2444 "regex.h2"
 };
 
 // Regex syntax:   Example: a
@@ -1463,27 +1467,27 @@ template class char_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2446 "regex.h2"
+#line 2469 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: char_matcher_logic() = default;
     public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_matcher_logic const&) -> void = delete;
 
-#line 2448 "regex.h2"
+#line 2471 "regex.h2"
 };
 
-#line 2451 "regex.h2"
+#line 2474 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 template class class_matcher_logic
  {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 2474 "regex.h2"
+#line 2497 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::in c) -> bool;
 
-#line 2486 "regex.h2"
+#line 2509 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
 
     public: [[nodiscard]] static auto to_string() -> bstring;
@@ -1492,10 +1496,10 @@ template class class_matcher_logi
     public: auto operator=(class_matcher_logic const&) -> void = delete;
 
 
-#line 2498 "regex.h2"
+#line 2521 "regex.h2"
 };
 
-#line 2501 "regex.h2"
+#line 2524 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1516,7 +1520,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::in matched_, context const& ctx_);
 
-#line 2524 "regex.h2"
+#line 2547 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::in g) const& -> auto;
@@ -1531,7 +1535,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2540 "regex.h2"
+#line 2563 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::in> str) const& -> auto;
@@ -1539,13 +1543,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2552 "regex.h2"
+#line 2575 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2574 "regex.h2"
+#line 2597 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1557,7 +1561,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2587 "regex.h2"
+#line 2610 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1576,42 +1580,37 @@ template class regex_parser {
 
     private: size_t pos {0}; 
     private: int alternatives_count {0}; 
-    private: std::map named_groups {}; 
     private: bool has_error {false}; 
 
     private: std::string source {""}; 
 
-#line 2612 "regex.h2"
     public: explicit regex_parser(cpp2::in r, cpp2::in m, Error_out const& e);
 
-#line 2618 "regex.h2"
+#line 2638 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::in message) & -> void;
 
-#line 2625 "regex.h2"
+#line 2645 "regex.h2"
     // Parser helper functions.
 
     public: [[nodiscard]] auto parser_expression_modifiers(cpp2::out mods) & -> std::string;
 
-#line 2665 "regex.h2"
+#line 2685 "regex.h2"
     // Parsing functions
     //
 
-    public: [[nodiscard]] auto create_named_group_lookup() const& -> std::string;
-
-#line 2690 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2723 "regex.h2"
+#line 2719 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string;
 
-#line 2732 "regex.h2"
+#line 2728 "regex.h2"
 }
 }
 
@@ -2082,15 +2081,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 491 "regex.h2"
+#line 492 "regex.h2"
     parse_context::parse_context(cpp2::in r, cpp2::in modifiers)
         : regex{ r }{
 
-#line 493 "regex.h2"
+#line 494 "regex.h2"
         set_modifiers(modifiers);
     }
 
-#line 499 "regex.h2"
+#line 500 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2098,24 +2097,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 506 "regex.h2"
+#line 507 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 512 "regex.h2"
+#line 513 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> parse_context_modifier_state{
         return cur_group_state.modifiers; 
     }
 
-#line 516 "regex.h2"
+#line 517 "regex.h2"
     auto parse_context::set_modifiers(cpp2::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 523 "regex.h2"
+#line 524 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2124,36 +2123,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 531 "regex.h2"
+#line 532 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, std::move(max_group));
     }
 
-#line 537 "regex.h2"
+#line 538 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 545 "regex.h2"
+#line 546 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 547 "regex.h2"
+#line 548 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::in start, cpp2::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
 
-#line 549 "regex.h2"
+#line 550 "regex.h2"
     auto parse_context::add_token(cpp2::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 553 "regex.h2"
+#line 554 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 557 "regex.h2"
+#line 558 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2164,29 +2163,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 567 "regex.h2"
+#line 568 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return CPP2_UFCS(get_tokens)(cur_group_state); 
     }
 
-#line 572 "regex.h2"
+#line 573 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 576 "regex.h2"
+#line 577 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 580 "regex.h2"
+#line 581 "regex.h2"
     auto parse_context::set_named_group(cpp2::in name, cpp2::in id) & -> void{
         if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 586 "regex.h2"
+#line 587 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
@@ -2197,10 +2196,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 596 "regex.h2"
+#line 597 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 598 "regex.h2"
+#line 599 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::in in_class, cpp2::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2211,14 +2210,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 608 "regex.h2"
-    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 609 "regex.h2"
-    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 610 "regex.h2"
+    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+#line 611 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 612 "regex.h2"
+#line 613 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2228,19 +2227,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 621 "regex.h2"
+#line 622 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::cmp_less(pos,CPP2_UFCS(size)(regex)); }
 
-#line 623 "regex.h2"
+#line 624 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 625 "regex.h2"
+#line 626 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 630 "regex.h2"
+#line 631 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2253,10 +2252,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 642 "regex.h2"
+#line 643 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 644 "regex.h2"
+#line 645 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::in in_class, cpp2::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2295,7 +2294,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 683 "regex.h2"
+#line 684 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::in e, cpp2::out r, cpp2::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2317,14 +2316,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 704 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
 #line 705 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), false); }
 #line 706 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::out(&r), false); }
+#line 707 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::in e, cpp2::out r) & -> auto { return grab_until_impl(e, cpp2::out(&r), true);  }
 
-#line 708 "regex.h2"
+#line 709 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::in n, cpp2::out r) & -> bool{
         if (cpp2::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2337,7 +2336,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 720 "regex.h2"
+#line 721 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2358,7 +2357,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(r.value()); 
     }
 
-#line 740 "regex.h2"
+#line 741 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2369,12 +2368,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 750 "regex.h2"
-    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
 #line 751 "regex.h2"
+    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
+#line 752 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 753 "regex.h2"
+#line 754 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::in change_str, cpp2::out modifier_change, 
                       parse_context_modifier_state& parser_modifiers) & -> bool{
         auto is_negative {false}; 
@@ -2440,7 +2439,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 818 "regex.h2"
+#line 819 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2478,10 +2477,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 855 "regex.h2"
+#line 856 "regex.h2"
     [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
 
-#line 864 "regex.h2"
+#line 865 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::in c) & -> void{
         int i {0}; 
         for( ; cpp2::cmp_less(i,c); i += 1 ) {
@@ -2489,27 +2488,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 871 "regex.h2"
+#line 872 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 886 "regex.h2"
+#line 887 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
 
-#line 888 "regex.h2"
+#line 889 "regex.h2"
     auto generation_context::add(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 893 "regex.h2"
+#line 894 "regex.h2"
     auto generation_context::add_check(cpp2::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 898 "regex.h2"
+#line 899 "regex.h2"
     auto generation_context::add_statefull(cpp2::in next_func, cpp2::in c) & -> void{
         end_func_statefull(c);
 
@@ -2517,14 +2516,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(std::move(name));
     }
 
-#line 905 "regex.h2"
+#line 906 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::assert_not_null(get_base())).code; 
     }
 
-#line 911 "regex.h2"
+#line 912 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), (*this));
@@ -2533,7 +2532,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 919 "regex.h2"
+#line 920 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2555,22 +2554,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return std::move(name) + "()"; 
     }
 
-#line 941 "regex.h2"
+#line 942 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 945 "regex.h2"
+#line 946 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 949 "regex.h2"
+#line 950 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     auto generation_context::start_func_named(cpp2::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2580,14 +2579,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_tabs)((*cpp2::assert_not_null(std::move(cur))), 2);
     }
 
-#line 962 "regex.h2"
+#line 963 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return std::move(name) + "()"; 
     }
 
-#line 968 "regex.h2"
+#line 969 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::assert_not_null(cur)), 2);
@@ -2600,38 +2599,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 980 "regex.h2"
+#line 981 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx, modifiers)");
     }
 
-#line 984 "regex.h2"
+#line 985 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 988 "regex.h2"
+#line 989 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 994 "regex.h2"
+#line 995 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 1000 "regex.h2"
+#line 1001 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(std::move(cur_id)) }; 
     }
 
-#line 1006 "regex.h2"
+#line 1007 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2640,7 +2639,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1014 "regex.h2"
+#line 1015 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2649,29 +2648,52 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1028 "regex.h2"
+#line 1023 "regex.h2"
+    [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::in> named_groups) const& -> std::string{
+        std::string res {"get_named_group_index: (name) -> int = {\n"}; 
+
+        // Generate if selection.
+        std::string sep {""}; 
+        for ( auto const& cur : named_groups ) {
+            res += (cpp2::to_string(sep) + "if name == \"" + cpp2::to_string(cur.first) + "\" { return " + cpp2::to_string(cur.second) + "; }");
+            sep = "else ";
+        }
+
+        // Generate else branch or return if list is empty.
+        if (CPP2_UFCS(empty)(named_groups)) {
+            res += "  _ = name;\n";
+            res += "  return -1;\n";
+        }
+        else {
+            res += "  else { return -1; }\n";
+        }
+        res += "}\n";
+        return res; 
+    }
+
+#line 1051 "regex.h2"
     regex_token_list::regex_token_list(cpp2::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1031 "regex.h2"
+#line 1054 "regex.h2"
     }
 
-#line 1033 "regex.h2"
+#line 1056 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::assert_not_null(token)), ctx);
         }
     }
 
-#line 1039 "regex.h2"
+#line 1062 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(add_groups)((*cpp2::assert_not_null(token)), groups);
         }
     }
 
-#line 1045 "regex.h2"
+#line 1068 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2682,74 +2704,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1058 "regex.h2"
+#line 1081 "regex.h2"
     regex_token_base::regex_token_base(cpp2::in str)
         : regex_token{ str }{
 
-#line 1060 "regex.h2"
+#line 1083 "regex.h2"
     }
 
-#line 1062 "regex.h2"
+#line 1085 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1064 "regex.h2"
+#line 1087 "regex.h2"
     }
 
-#line 1066 "regex.h2"
+#line 1089 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1074 "regex.h2"
+#line 1097 "regex.h2"
     regex_token_check::regex_token_check(cpp2::in str, cpp2::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1077 "regex.h2"
+#line 1100 "regex.h2"
     }
 
-#line 1079 "regex.h2"
+#line 1102 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1089 "regex.h2"
+#line 1112 "regex.h2"
     regex_token_code::regex_token_code(cpp2::in str, cpp2::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1092 "regex.h2"
+#line 1115 "regex.h2"
     }
 
-#line 1094 "regex.h2"
+#line 1117 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add)(ctx, code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1103 "regex.h2"
+#line 1126 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::in str)
         : regex_token_base{ str }{
 
-#line 1105 "regex.h2"
+#line 1128 "regex.h2"
     }
 
-#line 1107 "regex.h2"
+#line 1130 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1119 "regex.h2"
+#line 1142 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1121 "regex.h2"
+#line 1144 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2758,22 +2780,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1129 "regex.h2"
+#line 1152 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1140 "regex.h2"
+#line 1163 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1143 "regex.h2"
+#line 1166 "regex.h2"
     }
 
-#line 1145 "regex.h2"
+#line 1168 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2790,14 +2812,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(std::move(functions)) + ")"));
     }
 
-#line 1161 "regex.h2"
+#line 1184 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             CPP2_UFCS(add_groups)((*cpp2::assert_not_null(cur)), groups);
         }
     }
 
-#line 1167 "regex.h2"
+#line 1190 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2812,11 +2834,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1182 "regex.h2"
+#line 1205 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
     }
-#line 1185 "regex.h2"
+#line 1208 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
             return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
@@ -2835,25 +2857,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1209 "regex.h2"
+#line 1232 "regex.h2"
     any_token::any_token()
                             : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
 
-#line 1211 "regex.h2"
+#line 1234 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1217 "regex.h2"
+#line 1240 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1222 "regex.h2"
+#line 1245 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur != ctx.end // Any char except the end
         && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2865,20 +2887,20 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1238 "regex.h2"
+#line 1261 "regex.h2"
     char_token::char_token(cpp2::in t)
         : regex_token_base{ std::string(1, t) }
         , token{ t }{
 
-#line 1241 "regex.h2"
+#line 1264 "regex.h2"
     }
 
-#line 1243 "regex.h2"
+#line 1266 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1247 "regex.h2"
+#line 1270 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         auto upper {safe_toupper(token)}; 
         auto lower {safe_tolower(token)}; 
@@ -2887,7 +2909,7 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
 
     char_token::~char_token() noexcept{}
 
-#line 1254 "regex.h2"
+#line 1277 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
         if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -2909,16 +2931,16 @@ template [[nodiscard]] auto char_toke
     }
 }
 
-#line 1283 "regex.h2"
+#line 1306 "regex.h2"
     class_token::class_token(cpp2::in negate_, cpp2::in class_str_, cpp2::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , class_str{ class_str_ }{
 
-#line 1287 "regex.h2"
+#line 1310 "regex.h2"
     }
 
-#line 1290 "regex.h2"
+#line 1313 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -3025,12 +3047,12 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(is_negate), std::move(inner), CPP2_UFCS(get_range)(ctx, std::move(start_pos), std::move(end_pos))); 
     }
 
-#line 1396 "regex.h2"
+#line 1419 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1401 "regex.h2"
+#line 1424 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::in name, cpp2::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -3040,7 +3062,7 @@ template [[nodiscard]] auto char_toke
 
     class_token::~class_token() noexcept{}
 
-#line 1411 "regex.h2"
+#line 1434 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -3062,7 +3084,7 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1432 "regex.h2"
+#line 1455 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3075,11 +3097,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1457 "regex.h2"
+#line 1480 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1461 "regex.h2"
+#line 1484 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3099,27 +3121,27 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1485 "regex.h2"
+#line 1508 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1488 "regex.h2"
+#line 1511 "regex.h2"
     }
 
-#line 1490 "regex.h2"
+#line 1513 "regex.h2"
     [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }
 
-#line 1494 "regex.h2"
+#line 1517 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1501 "regex.h2"
+#line 1524 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
 
@@ -3127,15 +3149,15 @@ template [[nodiscard]] auto char_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
 }
 
-#line 1519 "regex.h2"
+#line 1542 "regex.h2"
     group_ref_token::group_ref_token(cpp2::in id_, cpp2::in str)
         : regex_token_base{ str }
         , id{ id_ }{
 
-#line 1522 "regex.h2"
+#line 1545 "regex.h2"
     }
 
-#line 1524 "regex.h2"
+#line 1547 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3228,14 +3250,14 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(group_id), std::move(str)); 
     }
 
-#line 1616 "regex.h2"
+#line 1639 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1621 "regex.h2"
+#line 1644 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3261,7 +3283,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1653 "regex.h2"
+#line 1676 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::in syntax, cpp2::in positive) -> token_ptr{
         static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
 
@@ -3275,7 +3297,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1666 "regex.h2"
+#line 1689 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3394,7 +3416,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1784 "regex.h2"
+#line 1807 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::in name, cpp2::in name_brackets, cpp2::in modifiers, cpp2::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3412,7 +3434,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return std::move(start) + CPP2_UFCS(to_string)((*cpp2::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1801 "regex.h2"
+#line 1824 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3437,7 +3459,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1825 "regex.h2"
+#line 1848 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
         if (-1 != number) {
@@ -3447,7 +3469,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1835 "regex.h2"
+#line 1858 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
 
@@ -3487,15 +3509,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     return r; 
 }
 
-#line 1879 "regex.h2"
+#line 1902 "regex.h2"
     modifier_token::modifier_token(cpp2::in mod_)
         : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
         , mod{ mod_ }{
 
-#line 1882 "regex.h2"
+#line 1905 "regex.h2"
     }
 
-#line 1884 "regex.h2"
+#line 1907 "regex.h2"
     auto modifier_token::generate_code(generation_context& ctx) const -> void{
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
@@ -3503,7 +3525,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     modifier_token::~modifier_token() noexcept{}
 
-#line 1892 "regex.h2"
+#line 1915 "regex.h2"
     template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         if constexpr (push) {
             return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
@@ -3513,12 +3535,12 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         }
     }
 
-#line 1904 "regex.h2"
+#line 1927 "regex.h2"
     template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
         return tail(cur, ctx, Modifiers::pop(), end_func); 
     }
 
-#line 1911 "regex.h2"
+#line 1934 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3535,7 +3557,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }}
 }
 
-#line 1927 "regex.h2"
+#line 1950 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3548,7 +3570,7 @@ template [[
     }}
 }
 
-#line 1941 "regex.h2"
+#line 1964 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3561,35 +3583,35 @@ template [[
     }
 }
 
-#line 1953 "regex.h2"
+#line 1976 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1966 "regex.h2"
+#line 1989 "regex.h2"
     lookahead_token::lookahead_token(cpp2::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1968 "regex.h2"
+#line 1991 "regex.h2"
     }
 
-#line 1970 "regex.h2"
+#line 1993 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
 
         CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ")"));
     }
 
-#line 1976 "regex.h2"
+#line 1999 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner)), groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1981 "regex.h2"
+#line 2004 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool{
     auto r {func(cur, ctx, modifiers, true_end_func())}; 
     if (!(positive)) {
@@ -3599,7 +3621,7 @@ template [[nodiscard]] auto lookahead_token_match
     return std::move(r).matched; 
 }
 
-#line 1993 "regex.h2"
+#line 2016 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3624,7 +3646,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(std::move(name)) + "::match")); 
 }
 
-#line 2033 "regex.h2"
+#line 2056 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
 
@@ -3649,11 +3671,11 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2067 "regex.h2"
+#line 2090 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2069 "regex.h2"
+#line 2092 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3697,7 +3719,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2113 "regex.h2"
+#line 2136 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::assert_not_null(r)).min_count) {
                 if (!((cpp2::cmp_less_eq(0,(*cpp2::assert_not_null(r)).min_count)))) {
@@ -3724,7 +3746,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2139 "regex.h2"
+#line 2162 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3736,7 +3758,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2150 "regex.h2"
+#line 2173 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3749,7 +3771,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2162 "regex.h2"
+#line 2185 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3774,7 +3796,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2186 "regex.h2"
+#line 2209 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         std::set groups {}; 
@@ -3785,14 +3807,14 @@ template [[nodiscard]] auto lookahead_token_match
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(std::move(inner_name)) + ", " + cpp2::to_string(std::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2196 "regex.h2"
+#line 2219 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::assert_not_null(inner_token)), groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2204 "regex.h2"
+#line 2227 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
@@ -3805,26 +3827,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2216 "regex.h2"
+#line 2239 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::cmp_less(count,max_count); }
     }
 
-#line 2221 "regex.h2"
+#line 2244 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::cmp_less(count,min_count); }
     }
 
-#line 2226 "regex.h2"
+#line 2249 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::in count) -> bool{
         if (-1 != min_count && cpp2::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2232 "regex.h2"
+#line 2255 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3840,7 +3862,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2247 "regex.h2"
+#line 2270 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
@@ -3869,7 +3891,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2275 "regex.h2"
+#line 2298 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3894,7 +3916,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(std::move(pos), ctx, modifiers, end_func); 
     }
 
-#line 2299 "regex.h2"
+#line 2322 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
@@ -3920,7 +3942,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(std::move(pos), ctx, modifiers, end_func); // Upper bound reached.
     }
 
-#line 2330 "regex.h2"
+#line 2353 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3943,7 +3965,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2353 "regex.h2"
+#line 2376 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::assert_not_null(r)), ctx);
 
         (*cpp2::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3953,7 +3975,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2365 "regex.h2"
+#line 2388 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3970,7 +3992,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2381 "regex.h2"
+#line 2404 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
     static_cast(modifiers);
     word_class words {}; 
@@ -3996,14 +4018,14 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2418 "regex.h2"
+#line 2441 "regex.h2"
     template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2419 "regex.h2"
+#line 2442 "regex.h2"
     template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2420 "regex.h2"
+#line 2443 "regex.h2"
     template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
 
-#line 2427 "regex.h2"
+#line 2450 "regex.h2"
     template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && (*cpp2::assert_not_null(cur) == L || *cpp2::assert_not_null(cur) == U)) {
@@ -4023,12 +4045,12 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
     }
-#line 2446 "regex.h2"
+#line 2469 "regex.h2"
     template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2447 "regex.h2"
+#line 2470 "regex.h2"
     template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
 
-#line 2455 "regex.h2"
+#line 2478 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::assert_not_null(cur))))) {
@@ -4048,7 +4070,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2474 "regex.h2"
+#line 2497 "regex.h2"
     template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -4061,10 +4083,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2486 "regex.h2"
+#line 2509 "regex.h2"
     template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
 
-#line 2488 "regex.h2"
+#line 2511 "regex.h2"
     template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
         bstring r {"["}; 
         if (negate) {
@@ -4076,31 +4098,31 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2519 "regex.h2"
+#line 2542 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2522 "regex.h2"
+#line 2545 "regex.h2"
         }
 
-#line 2524 "regex.h2"
+#line 2547 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2525 "regex.h2"
+#line 2548 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2526 "regex.h2"
+#line 2549 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2527 "regex.h2"
+#line 2550 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2529 "regex.h2"
+#line 2552 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2530 "regex.h2"
+#line 2553 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2531 "regex.h2"
+#line 2554 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2533 "regex.h2"
+#line 2556 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4109,13 +4131,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2542 "regex.h2"
+#line 2565 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2543 "regex.h2"
+#line 2566 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2544 "regex.h2"
+#line 2567 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2545 "regex.h2"
+#line 2568 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -4123,13 +4145,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, std::move(ctx)); 
     }
 
-#line 2552 "regex.h2"
+#line 2575 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2553 "regex.h2"
+#line 2576 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2554 "regex.h2"
+#line 2577 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2555 "regex.h2"
+#line 2578 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4149,10 +4171,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(std::move(matched), std::move(ctx)); 
     }
 
-#line 2574 "regex.h2"
+#line 2597 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2579 "regex.h2"
+#line 2602 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::in> str, auto const& pos) -> auto{
         if (cpp2::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4162,22 +4184,22 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2612 "regex.h2"
+#line 2632 "regex.h2"
     template  regex_parser::regex_parser(cpp2::in r, cpp2::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2616 "regex.h2"
+#line 2636 "regex.h2"
     }
 
-#line 2620 "regex.h2"
+#line 2640 "regex.h2"
     template  auto regex_parser::error(cpp2::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2627 "regex.h2"
+#line 2647 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parser_expression_modifiers(cpp2::out mods) & -> std::string{
         std::string r {"0"}; 
         std::string sep {" | "}; 
@@ -4216,30 +4238,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return r; 
     }
 
-#line 2668 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::create_named_group_lookup() const& -> std::string{
-        std::string res {"get_named_group_index: (name) -> int = {\n"}; 
-
-        // Generate if selection.
-        std::string sep {""}; 
-        for ( auto const& cur : named_groups ) {
-            res += (cpp2::to_string(sep) + "if name == \"" + cpp2::to_string(cur.first) + "\" { return " + cpp2::to_string(cur.second) + "; }");
-            sep = "else ";
-        }
-
-        // Generate else branch or return if list is empty.
-        if (CPP2_UFCS(empty)(named_groups)) {
-            res += "  _ = name;\n";
-            res += "  return -1;\n";
-        }
-        else {
-            res += "  else { return -1; }\n";
-        }
-        res += "}\n";
-        return res; 
-    }
-
-#line 2690 "regex.h2"
+#line 2688 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         cpp2::deferred_init modifiers; 
         auto mod {parser_expression_modifiers(cpp2::out(&modifiers))}; 
@@ -4257,24 +4256,22 @@ template [[nodiscard]] auto word_boundary_token_mat
         source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(parse_ctx));
         source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
-        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(std::move(gen_ctx))) + "(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
+        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(gen_ctx)) + "(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
         source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
         auto string {CPP2_UFCS(to_string)((*cpp2::assert_not_null(CPP2_UFCS(get_tokens)(parse_ctx))))}; 
         source += ("  to_string: () -> std::string = { return \"" + cpp2::to_string(std::move(string)) + "\"; }\n");
-        source += create_named_group_lookup();
+        source += CPP2_UFCS(create_named_group_lookup)(std::move(gen_ctx), parse_ctx.named_groups);
         source += "}\n";
 
         static_cast(std::move(parse_ctx));
 
-        std::cout << source << std::endl;
-
         return source; 
     }
 
-#line 2725 "regex.h2"
+#line 2721 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::in regex, cpp2::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 35bc62e4e8..41be15a685 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -482,11 +482,12 @@ parse_context: type = {
 
     pos: size_t = 0;
 
-    public error_text: std::string = "";
+    public error_text:    std::string = "";
+    public named_groups:  std::map = ();
 
     cur_group_state:        parse_context_group_state = ();
     cur_branch_reset_state: parse_context_branch_reset_state = ();
-    named_groups :          std::map = ();
+
 
     operator=:(out this, r: std::string_view, modifiers: parse_context_modifier_state) = {
         regex = r;
@@ -1018,6 +1019,28 @@ generation_context: type = {
 
         gen_stack.pop_back();
     }
+
+    create_named_group_lookup: (this, named_groups: std::map) -> std::string = {
+        res: std::string = "get_named_group_index: (name) -> int = {\n";
+
+        // Generate if selection.
+        sep: std::string = "";
+        for named_groups do (cur) {
+            res += "(sep)$if name == \"(cur.first)$\" { return (cur.second)$; }";
+            sep = "else ";
+        }
+
+        // Generate else branch or return if list is empty.
+        if named_groups.empty() {
+            res += "  _ = name;\n";
+            res += "  return -1;\n";
+        }
+        else {
+            res += "  else { return -1; }\n";
+        }
+        res += "}\n";
+        return res;
+    }
 }
 
 regex_token_list: @polymorphic_base type = {
@@ -2602,13 +2625,10 @@ regex_parser:  type = {
 
     pos:                    size_t = 0;
     alternatives_count:     int = 0;
-    named_groups :          std::map = ();
     has_error:              bool = false;
 
     source: std::string = "";
 
-
-
     operator=: (out this, r: std::string_view, m: std::string_view, e: Error_out) = {
         this.regex = r;
         this.modifier = m;
@@ -2665,28 +2685,6 @@ regex_parser:  type = {
     // Parsing functions
     //
 
-    create_named_group_lookup: (this) -> std::string = {
-        res: std::string = "get_named_group_index: (name) -> int = {\n";
-
-        // Generate if selection.
-        sep: std::string = "";
-        for named_groups do (cur) {
-            res += "(sep)$if name == \"(cur.first)$\" { return (cur.second)$; }";
-            sep = "else ";
-        }
-
-        // Generate else branch or return if list is empty.
-        if named_groups.empty() {
-            res += "  _ = name;\n";
-            res += "  return -1;\n";
-        }
-        else {
-            res += "  else { return -1; }\n";
-        }
-        res += "}\n";
-        return res;
-    }
-
     parse:(inout this) -> std::string = {
         modifiers : parse_context_modifier_state;
         mod   := parser_expression_modifiers(out modifiers);
@@ -2711,13 +2709,11 @@ regex_parser:  type = {
 
         string := parse_ctx.get_tokens()*.to_string();
         source += "  to_string: () -> std::string = { return \"(string)$\"; }\n";
-        source += create_named_group_lookup();
+        source += gen_ctx.create_named_group_lookup(parse_ctx.named_groups);
         source += "}\n";
 
         _ = parse_ctx;
 
-        std::cout << source << std::endl;
-
         return source;
     }
 }

From 28ae594f8202d9ddc7a8a96519d9596e33be26dc Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 14 May 2024 11:52:39 +0200
Subject: [PATCH 124/161] Fixes for generation.

---
 include/cpp2regex.h | 10 +++++-----
 source/regex.h2     |  8 ++++----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 0b860734e7..14f54dc0ec 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -1242,7 +1242,7 @@ class modifier_token: public regex_token_base {
 #line 1900 "regex.h2"
     private: std::string mod; 
 
-    public: explicit modifier_token(cpp2::in mod_);
+    public: explicit modifier_token(cpp2::in mod_, cpp2::in mod_str);
 
 #line 1907 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
@@ -3108,7 +3108,7 @@ template [[nodiscard]] auto char_toke
 
     static_cast(CPP2_UFCS(next)(ctx));// Skip escape
 
-    if (std::string::npos != CPP2_UFCS(find)(std::string("afenrt"), CPP2_UFCS(current)(ctx))) {
+    if (std::string::npos != CPP2_UFCS(find)(std::string("afenrt\\"), CPP2_UFCS(current)(ctx))) {
         // Escape of string special char
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }else {
@@ -3412,7 +3412,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             // Only a modifier
             CPP2_UFCS(set_modifiers)(ctx, std::move(modifiers_change_to));
 
-            return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(modifier_change)); 
+            return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, std::move(modifier_change), std::move(modifiers)); 
         }
     }
 
@@ -3510,8 +3510,8 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 }
 
 #line 1902 "regex.h2"
-    modifier_token::modifier_token(cpp2::in mod_)
-        : regex_token_base{ ("(?" + cpp2::to_string(mod_) + ")") }
+    modifier_token::modifier_token(cpp2::in mod_, cpp2::in mod_str)
+        : regex_token_base{ ("(?" + cpp2::to_string(mod_str) + ")") }
         , mod{ mod_ }{
 
 #line 1905 "regex.h2"
diff --git a/source/regex.h2 b/source/regex.h2
index 41be15a685..a551040342 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1487,7 +1487,7 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
     _ = ctx.next(); // Skip escape
 
-    if std::string::npos != std::string("afenrt").find(ctx.current()) {
+    if std::string::npos != std::string("afenrt\\").find(ctx.current()) {
         // Escape of string special char
         return shared.new(ctx.current());
     } else {
@@ -1800,7 +1800,7 @@ group_token: @polymorphic_base type = {
             // Only a modifier
             ctx.set_modifiers(modifiers_change_to);
 
-            return shared.new(modifier_change);
+            return shared.new(modifier_change, modifiers);
         }
     }
 
@@ -1899,8 +1899,8 @@ modifier_token: @polymorphic_base type = {
 
     mod: std::string;
 
-    operator=: (out this, mod_: std::string) = {
-        regex_token_base = ("(?(mod_)$)");
+    operator=: (out this, mod_: std::string, mod_str: std::string) = {
+        regex_token_base = ("(?(mod_str)$)");
         mod = mod_;
     }
 

From 19e72ee8691143dff08447a049753686ded0db5b Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 15 May 2024 15:34:17 +0200
Subject: [PATCH 125/161] Bugfix for nonconst has in generated flag_enums.

---
 regression-tests/test-results/pure2-enum.cpp | 4 ++--
 source/reflect.h                             | 2 +-
 source/reflect.h2                            | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/regression-tests/test-results/pure2-enum.cpp b/regression-tests/test-results/pure2-enum.cpp
index 250d5f7e4f..ac6248a7ae 100644
--- a/regression-tests/test-results/pure2-enum.cpp
+++ b/regression-tests/test-results/pure2-enum.cpp
@@ -83,7 +83,7 @@ public: constexpr auto operator^=(file_attributes const& that) & -> void;
 public: [[nodiscard]] constexpr auto operator|(file_attributes const& that) const& -> file_attributes;
 public: [[nodiscard]] constexpr auto operator&(file_attributes const& that) const& -> file_attributes;
 public: [[nodiscard]] constexpr auto operator^(file_attributes const& that) const& -> file_attributes;
-public: [[nodiscard]] constexpr auto has(file_attributes const& that) & -> bool;
+public: [[nodiscard]] constexpr auto has(file_attributes const& that) const& -> bool;
 public: constexpr auto set(file_attributes const& that) & -> void;
 public: constexpr auto clear(file_attributes const& that) & -> void;
 public: static const file_attributes cached;
@@ -202,7 +202,7 @@ constexpr auto file_attributes::operator^=(file_attributes const& that) & -> voi
 [[nodiscard]] constexpr auto file_attributes::operator|(file_attributes const& that) const& -> file_attributes { return _value | that._value; }
 [[nodiscard]] constexpr auto file_attributes::operator&(file_attributes const& that) const& -> file_attributes { return _value & that._value; }
 [[nodiscard]] constexpr auto file_attributes::operator^(file_attributes const& that) const& -> file_attributes { return _value ^ that._value; }
-[[nodiscard]] constexpr auto file_attributes::has(file_attributes const& that) & -> bool { return _value & that._value; }
+[[nodiscard]] constexpr auto file_attributes::has(file_attributes const& that) const& -> bool { return _value & that._value; }
 constexpr auto file_attributes::set(file_attributes const& that) & -> void { _value |= that._value; }
 constexpr auto file_attributes::clear(file_attributes const& that) & -> void { _value &= ~that._value; }
 inline CPP2_CONSTEXPR file_attributes file_attributes::cached = 1;
diff --git a/source/reflect.h b/source/reflect.h
index b838b7e3dd..dc263856f9 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -1759,7 +1759,7 @@ std::string value{"-1"};
         CPP2_UFCS(add_member)(t, ("    operator| : (       this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + "  == _value |  that._value;"));
         CPP2_UFCS(add_member)(t, ("    operator& : (       this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + "  == _value &  that._value;"));
         CPP2_UFCS(add_member)(t, ("    operator^ : (       this, that ) -> " + cpp2::to_string(CPP2_UFCS(name)(t)) + "  == _value ^  that._value;"));
-        CPP2_UFCS(add_member)(t, "    has       : ( inout this, that ) -> bool         == _value &  that._value;");
+        CPP2_UFCS(add_member)(t, "    has       : (       this, that ) -> bool         == _value &  that._value;");
         CPP2_UFCS(add_member)(t, "    set       : ( inout this, that )                 == _value |= that._value;");
         CPP2_UFCS(add_member)(t, "    clear     : ( inout this, that )                 == _value &= that._value~;");
     }
diff --git a/source/reflect.h2 b/source/reflect.h2
index 77d344069f..44ad2ad101 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1099,7 +1099,7 @@ basic_enum: (
         t.add_member( "    operator| : (       this, that ) -> (t.name())$  == _value |  that._value;");
         t.add_member( "    operator& : (       this, that ) -> (t.name())$  == _value &  that._value;");
         t.add_member( "    operator^ : (       this, that ) -> (t.name())$  == _value ^  that._value;");
-        t.add_member( "    has       : ( inout this, that ) -> bool         == _value &  that._value;");
+        t.add_member( "    has       : (       this, that ) -> bool         == _value &  that._value;");
         t.add_member( "    set       : ( inout this, that )                 == _value |= that._value;");
         t.add_member( "    clear     : ( inout this, that )                 == _value &= that._value~;");
     }

From 2b0d72ba88c3dfc96110e87d23da6bf7061ac214 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 15 May 2024 19:28:45 +0200
Subject: [PATCH 126/161] Removed modifiers from arguments and fixed a few
 wanrings.

---
 include/cpp2regex.h | 1953 +++++++++++++++++++------------------------
 source/reflect.h    |   50 +-
 source/regex.h2     |  556 ++++--------
 3 files changed, 1044 insertions(+), 1515 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index cc528b61d6..582721e8e2 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -17,6 +17,7 @@ namespace regex {
 
 #line 32 "regex.h2"
 class expression_flags;
+    
 
 #line 44 "regex.h2"
 class range_flags;
@@ -33,190 +34,160 @@ template class match_return;
 #line 62 "regex.h2"
 template class match_context;
 
-#line 147 "regex.h2"
-template class match_modifiers_state_change;
-
-#line 173 "regex.h2"
-template class match_modifiers;
-
-#line 196 "regex.h2"
+#line 149 "regex.h2"
 template class matcher_list;
     
 
-#line 213 "regex.h2"
+#line 166 "regex.h2"
 class true_end_func;
     
 
-#line 226 "regex.h2"
+#line 179 "regex.h2"
 template class single_class_entry;
 
-#line 234 "regex.h2"
+#line 187 "regex.h2"
 template class range_class_entry;
 
-#line 242 "regex.h2"
+#line 195 "regex.h2"
 template class combined_class_entry;
     
 
-#line 249 "regex.h2"
+#line 202 "regex.h2"
 template class list_class_entry;
     
 
-#line 256 "regex.h2"
+#line 209 "regex.h2"
 template class named_class_entry;
     
 
-#line 261 "regex.h2"
+#line 214 "regex.h2"
 template class negated_class_entry;
     
 
-#line 268 "regex.h2"
+#line 221 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 320 "regex.h2"
+#line 273 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 329 "regex.h2"
+#line 282 "regex.h2"
 template class extract_position_helper;
     
 
-#line 345 "regex.h2"
+#line 298 "regex.h2"
 template class special_syntax_wrapper;
     
 
-#line 358 "regex.h2"
+#line 311 "regex.h2"
 class no_reset;
     
 
-#line 362 "regex.h2"
+#line 315 "regex.h2"
 template class on_return;
 
-#line 377 "regex.h2"
+#line 330 "regex.h2"
 class regex_token;
 
-#line 402 "regex.h2"
-class parse_context_modifier_state;
-    
-
-#line 409 "regex.h2"
+#line 354 "regex.h2"
 class parse_context_group_state;
 
-#line 447 "regex.h2"
+#line 392 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 480 "regex.h2"
+#line 425 "regex.h2"
 class parse_context;
     
 
-#line 861 "regex.h2"
+#line 810 "regex.h2"
 class generation_function_context;
     
 
-#line 877 "regex.h2"
+#line 826 "regex.h2"
 class generation_context;
 
-#line 1046 "regex.h2"
+#line 995 "regex.h2"
 class regex_token_list;
     
 
-#line 1078 "regex.h2"
+#line 1027 "regex.h2"
 class regex_token_base;
     
 
-#line 1092 "regex.h2"
+#line 1041 "regex.h2"
 class regex_token_check;
     
 
-#line 1107 "regex.h2"
+#line 1056 "regex.h2"
 class regex_token_code;
     
 
-#line 1123 "regex.h2"
+#line 1072 "regex.h2"
 class regex_token_empty;
     
 
-#line 1139 "regex.h2"
+#line 1088 "regex.h2"
 class alternative_token;
     
 
-#line 1157 "regex.h2"
+#line 1106 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1203 "regex.h2"
+#line 1152 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1229 "regex.h2"
+#line 1178 "regex.h2"
 class any_token;
     
 
-#line 1256 "regex.h2"
+#line 1209 "regex.h2"
 class char_token;
     
 
-#line 1300 "regex.h2"
+#line 1265 "regex.h2"
 class class_token;
     
 
-#line 1432 "regex.h2"
-template class class_token_matcher;
+#line 1401 "regex.h2"
+template class class_token_matcher;
 
-#line 1503 "regex.h2"
+#line 1472 "regex.h2"
 class escaped_char_token;
     
 
-#line 1537 "regex.h2"
+#line 1502 "regex.h2"
 class group_ref_token;
     
 
-#line 1669 "regex.h2"
+#line 1636 "regex.h2"
 class group_token;
     
 
-#line 1897 "regex.h2"
-class modifier_token;
-    
-
-#line 1913 "regex.h2"
-template class apply_modifiers_matcher;
-
-#line 1925 "regex.h2"
-template class pop_modifiers_matcher;
-
-#line 1983 "regex.h2"
+#line 1917 "regex.h2"
 class lookahead_token;
     
 
-#line 2082 "regex.h2"
+#line 2016 "regex.h2"
 class range_token;
     
 
-#line 2225 "regex.h2"
+#line 2159 "regex.h2"
 template class range_token_matcher;
 
-#line 2350 "regex.h2"
+#line 2284 "regex.h2"
 class special_range_token;
     
 
-#line 2440 "regex.h2"
-template class branch_reset_matcher_logic;
-    
-
-#line 2448 "regex.h2"
-template class char_matcher_logic;
-
-#line 2476 "regex.h2"
-template class class_matcher_logic;
-
-#line 2532 "regex.h2"
+#line 2371 "regex.h2"
 template class regular_expression;
 
-#line 2620 "regex.h2"
+#line 2458 "regex.h2"
 template class regex_parser;
 
-#line 2728 "regex.h2"
+#line 2524 "regex.h2"
 }
 }
 
@@ -251,18 +222,36 @@ template using bstring = std::basic_string;
 
 #line 32 "regex.h2"
 class expression_flags {
-    public: static const int case_insensitive;
-    public: static const int multiple_lines;
-    public: static const int single_line;
-    public: static const int no_group_captures;
-    public: static const int perl_code_syntax;
-    public: static const int perl_code_syntax_in_classes;
-
-    public: expression_flags() = default;
-    public: expression_flags(expression_flags const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(expression_flags const&) -> void = delete;
+private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val);
+
+private: constexpr auto operator=(cpp2::impl::in _val) -> expression_flags& ;
+public: constexpr auto operator|=(expression_flags const& that) & -> void;
+public: constexpr auto operator&=(expression_flags const& that) & -> void;
+public: constexpr auto operator^=(expression_flags const& that) & -> void;
+public: [[nodiscard]] constexpr auto operator|(expression_flags const& that) const& -> expression_flags;
+public: [[nodiscard]] constexpr auto operator&(expression_flags const& that) const& -> expression_flags;
+public: [[nodiscard]] constexpr auto operator^(expression_flags const& that) const& -> expression_flags;
+public: [[nodiscard]] constexpr auto has(expression_flags const& that) const& -> bool;
+public: constexpr auto set(expression_flags const& that) & -> void;
+public: constexpr auto clear(expression_flags const& that) & -> void;
+public: static const expression_flags case_insensitive;
+public: static const expression_flags multiple_lines;
+public: static const expression_flags single_line;
+public: static const expression_flags no_group_captures;
+public: static const expression_flags perl_code_syntax;
+public: static const expression_flags perl_code_syntax_in_classes;
+public: static const expression_flags none;
+public: [[nodiscard]] constexpr auto get_raw_value() const& -> cpp2::u8;
+public: constexpr explicit expression_flags();
+public: constexpr expression_flags(expression_flags const& that);
+public: constexpr auto operator=(expression_flags const& that) -> expression_flags& ;
+public: constexpr expression_flags(expression_flags&& that) noexcept;
+public: constexpr auto operator=(expression_flags&& that) noexcept -> expression_flags& ;
+public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default;
+public: [[nodiscard]] auto to_string() const& -> std::string;
+
+#line 39 "regex.h2"
 };
-#line 40 "regex.h2"
 
 #line 44 "regex.h2"
 class range_flags {
@@ -344,50 +333,13 @@ template cl
 
 };
 
-#line 147 "regex.h2"
-template class match_modifiers_state_change {
-
-    public: static const bool reset;
-    public: static const int add;
-    public: static const int remove;
-    public: static const bool has_change;
-
-    public: [[nodiscard]] constexpr static auto combine_inner(cpp2::impl::in old_flags) -> auto;
-
-#line 165 "regex.h2"
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: match_modifiers_state_change() = default;
-    public: match_modifiers_state_change(match_modifiers_state_change const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(match_modifiers_state_change const&) -> void = delete;
-
-#line 166 "regex.h2"
-};
-
-using match_modifiers_no_change = match_modifiers_state_change;
-
-#line 173 "regex.h2"
-template class match_modifiers {
-
-    public: static const int flags;
-
-#line 179 "regex.h2"
-    public: template [[nodiscard]] static auto push([[maybe_unused]] Change const& unnamed_param_1) -> auto;
-    public: [[nodiscard]] static auto pop() -> auto;
-    public: template [[nodiscard]] static auto replace([[maybe_unused]] Change const& unnamed_param_1) -> auto;
-
-#line 186 "regex.h2"
-    public: [[nodiscard]] auto has_flag(cpp2::impl::in f) const& -> bool;
-
-#line 189 "regex.h2"
-};
-
-#line 196 "regex.h2"
+#line 149 "regex.h2"
 template class matcher_list {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto;
 
-#line 202 "regex.h2"
+#line 155 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
@@ -400,15 +352,15 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 210 "regex.h2"
+#line 163 "regex.h2"
 };
 
 template using no_tail = matcher_list;
 class true_end_func {
-    public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto;
+    public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
 };
 
-#line 226 "regex.h2"
+#line 179 "regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -417,10 +369,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 230 "regex.h2"
+#line 183 "regex.h2"
 };
 
-#line 234 "regex.h2"
+#line 187 "regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -429,10 +381,10 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 238 "regex.h2"
+#line 191 "regex.h2"
 };
 
-#line 242 "regex.h2"
+#line 195 "regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -440,10 +392,10 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 245 "regex.h2"
+#line 198 "regex.h2"
 };
 
-#line 249 "regex.h2"
+#line 202 "regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -451,10 +403,10 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 252 "regex.h2"
+#line 205 "regex.h2"
 };
 
-#line 256 "regex.h2"
+#line 209 "regex.h2"
 template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -462,7 +414,7 @@ template class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 259 "regex.h2"
+#line 212 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -472,10 +424,10 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 264 "regex.h2"
+#line 217 "regex.h2"
 };
 
-#line 268 "regex.h2"
+#line 221 "regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -483,15 +435,15 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 271 "regex.h2"
+#line 224 "regex.h2"
 };
 
-#line 276 "regex.h2"
+#line 229 "regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 282 "regex.h2"
+#line 235 "regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -506,21 +458,21 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 298 "regex.h2"
+#line 251 "regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 305 "regex.h2"
+#line 258 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 320 "regex.h2"
+#line 273 "regex.h2"
 template class empty_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
@@ -529,24 +481,24 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 324 "regex.h2"
+#line 277 "regex.h2"
 };
 
-#line 329 "regex.h2"
+#line 282 "regex.h2"
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 338 "regex.h2"
+#line 291 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 340 "regex.h2"
+#line 293 "regex.h2"
 };
 
-#line 345 "regex.h2"
+#line 298 "regex.h2"
 template class special_syntax_wrapper: public base {
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -554,10 +506,10 @@ template class special_synta
     public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_syntax_wrapper const&) -> void = delete;
 
-#line 348 "regex.h2"
+#line 301 "regex.h2"
 };
 
-#line 358 "regex.h2"
+#line 311 "regex.h2"
 class no_reset {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
@@ -567,16 +519,16 @@ template class on_return {
     private: Func func; 
 
     public: explicit on_return(Func const& f);
-#line 366 "regex.h2"
+#line 319 "regex.h2"
     public: auto operator=(Func const& f) -> on_return& ;
 
-#line 370 "regex.h2"
+#line 323 "regex.h2"
     public: ~on_return() noexcept;
     public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(on_return const&) -> void = delete;
 
 
-#line 373 "regex.h2"
+#line 326 "regex.h2"
 };
 
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
@@ -587,10 +539,10 @@ class regex_token {
 
     public: explicit regex_token(cpp2::impl::in str);
 
-#line 385 "regex.h2"
+#line 338 "regex.h2"
     public: explicit regex_token();
 
-#line 390 "regex.h2"
+#line 343 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void = 0;
@@ -601,20 +553,12 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 395 "regex.h2"
+#line 348 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
 using token_vec = std::vector;
 
-// State of the expression modifiers.
-//
-class parse_context_modifier_state {
-    public: bool group_captures_have_numbers {true}; 
-    public: bool perl_code_syntax {false}; 
-    public: bool perl_code_syntax_in_classes {false}; 
-};
-
 // State of the current group. See '()'
 class parse_context_group_state {
 
@@ -624,17 +568,17 @@ class parse_context_group_state {
     // List of alternate matcher lists. E.g. ab|cd|xy
     public: token_vec alternate_match_lists {}; 
 
-    public: parse_context_modifier_state modifiers {}; 
+    public: expression_flags modifiers {}; 
 
     public: auto next_alternative() & -> void;
 
-#line 425 "regex.h2"
+#line 370 "regex.h2"
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 431 "regex.h2"
+#line 376 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 441 "regex.h2"
+#line 386 "regex.h2"
     public: auto add(cpp2::impl::in token) & -> void;
 
     public: [[nodiscard]] auto empty() const& -> bool;
@@ -649,16 +593,16 @@ class parse_context_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 461 "regex.h2"
+#line 406 "regex.h2"
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 466 "regex.h2"
+#line 411 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 472 "regex.h2"
+#line 417 "regex.h2"
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
 
-#line 478 "regex.h2"
+#line 423 "regex.h2"
 };
 
 class parse_context {
@@ -672,37 +616,41 @@ class parse_context {
     private: parse_context_group_state cur_group_state {}; 
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
 
-#line 492 "regex.h2"
-    public: explicit parse_context(cpp2::impl::in r, cpp2::impl::in modifiers);
+    private: token_ptr root; 
 
-#line 497 "regex.h2"
+#line 439 "regex.h2"
+    public: explicit parse_context(cpp2::impl::in r);
+#line 439 "regex.h2"
+    public: auto operator=(cpp2::impl::in r) -> parse_context& ;
+
+#line 444 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 507 "regex.h2"
+#line 454 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 513 "regex.h2"
-    public: [[nodiscard]] auto get_modifiers() const& -> parse_context_modifier_state;
+#line 460 "regex.h2"
+    public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 517 "regex.h2"
-    public: auto set_modifiers(cpp2::impl::in mod) & -> void;
+#line 464 "regex.h2"
+    public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 521 "regex.h2"
+#line 468 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 532 "regex.h2"
+#line 479 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 538 "regex.h2"
+#line 485 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 543 "regex.h2"
+#line 490 "regex.h2"
     // Position management functions
     //
 
@@ -712,88 +660,87 @@ class parse_context {
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 554 "regex.h2"
+#line 501 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 558 "regex.h2"
+#line 505 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 568 "regex.h2"
+#line 515 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 572 "regex.h2"
+#line 519 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 577 "regex.h2"
+#line 524 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 581 "regex.h2"
+#line 528 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 587 "regex.h2"
+#line 534 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 597 "regex.h2"
+#line 544 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 609 "regex.h2"
+#line 556 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 622 "regex.h2"
+#line 569 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
 
-#line 631 "regex.h2"
+#line 578 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 643 "regex.h2"
+#line 590 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::impl::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 684 "regex.h2"
+#line 631 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 705 "regex.h2"
+#line 652 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 721 "regex.h2"
+#line 668 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 741 "regex.h2"
+#line 688 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 751 "regex.h2"
+#line 698 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
-    public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, cpp2::impl::out modifier_change,
-                      parse_context_modifier_state& parser_modifiers) & -> bool;
+    public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 819 "regex.h2"
+#line 756 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 856 "regex.h2"
-    public: [[nodiscard]] auto parse() & -> auto;
+#line 793 "regex.h2"
+    public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 859 "regex.h2"
+#line 808 "regex.h2"
 };
 
 class generation_function_context {
@@ -802,10 +749,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 872 "regex.h2"
+#line 821 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 875 "regex.h2"
+#line 824 "regex.h2"
 };
 
 class generation_context {
@@ -822,84 +769,84 @@ class generation_context {
 
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 894 "regex.h2"
+#line 843 "regex.h2"
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 899 "regex.h2"
+#line 848 "regex.h2"
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void;
 
-#line 906 "regex.h2"
+#line 855 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
 
-#line 912 "regex.h2"
+#line 861 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 920 "regex.h2"
+#line 869 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 942 "regex.h2"
+#line 891 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 946 "regex.h2"
+#line 895 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 950 "regex.h2"
+#line 899 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 954 "regex.h2"
+#line 903 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 963 "regex.h2"
+#line 912 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 969 "regex.h2"
+#line 918 "regex.h2"
     public: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 981 "regex.h2"
+#line 930 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 985 "regex.h2"
+#line 934 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 989 "regex.h2"
+#line 938 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 995 "regex.h2"
+#line 944 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 1001 "regex.h2"
+#line 950 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 1007 "regex.h2"
+#line 956 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1015 "regex.h2"
+#line 964 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 1023 "regex.h2"
+#line 972 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1044 "regex.h2"
+#line 993 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1049 "regex.h2"
+#line 998 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 1056 "regex.h2"
+#line 1005 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1062 "regex.h2"
+#line 1011 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1068 "regex.h2"
+#line 1017 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -907,36 +854,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1075 "regex.h2"
+#line 1024 "regex.h2"
 };
 
-#line 1078 "regex.h2"
+#line 1027 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1081 "regex.h2"
+#line 1030 "regex.h2"
     public: explicit regex_token_base(cpp2::impl::in str);
 
-#line 1085 "regex.h2"
+#line 1034 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1089 "regex.h2"
+#line 1038 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1090 "regex.h2"
+#line 1039 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1095 "regex.h2"
+#line 1044 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 1102 "regex.h2"
+#line 1051 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -944,17 +891,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1105 "regex.h2"
+#line 1054 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1110 "regex.h2"
+#line 1059 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 1117 "regex.h2"
+#line 1066 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -962,16 +909,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1120 "regex.h2"
+#line 1069 "regex.h2"
 };
 
-#line 1123 "regex.h2"
+#line 1072 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1126 "regex.h2"
+#line 1075 "regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 1130 "regex.h2"
+#line 1079 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -979,7 +926,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1133 "regex.h2"
+#line 1082 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -988,12 +935,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1142 "regex.h2"
+#line 1091 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1152 "regex.h2"
+#line 1101 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -1001,23 +948,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1155 "regex.h2"
+#line 1104 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1161 "regex.h2"
+#line 1110 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1168 "regex.h2"
+#line 1117 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1184 "regex.h2"
+#line 1133 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1190 "regex.h2"
+#line 1139 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -1025,33 +972,36 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1201 "regex.h2"
+#line 1150 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
+    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1208 "regex.h2"
-    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
+#line 1157 "regex.h2"
+    private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1225 "regex.h2"
+#line 1174 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1232 "regex.h2"
-    public: explicit any_token();
+#line 1181 "regex.h2"
+    private: bool single_line; 
+
+    public: explicit any_token(cpp2::impl::in single_line_);
 
+#line 1187 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1240 "regex.h2"
+#line 1193 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1059,23 +1009,24 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1243 "regex.h2"
+#line 1196 "regex.h2"
 };
 
-template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1256 "regex.h2"
+#line 1209 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1259 "regex.h2"
+#line 1212 "regex.h2"
     private: char token; 
+    private: bool ignore_case; 
 
-    public: explicit char_token(cpp2::impl::in t);
+    public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1266 "regex.h2"
+#line 1221 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1270 "regex.h2"
+#line 1225 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1083,30 +1034,34 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1275 "regex.h2"
+#line 1241 "regex.h2"
 };
 
-template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1298 "regex.h2"
+#line 1253 "regex.h2"
+template [[nodiscard]] auto char_token_case_insensitive_matcher(auto& cur, auto& ctx) -> bool;
+
+#line 1263 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1303 "regex.h2"
+#line 1268 "regex.h2"
     private: bool negate; 
+    private: bool case_insensitive; 
     private: std::string class_str; 
 
-    public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in class_str_, cpp2::impl::in str);
+    public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1312 "regex.h2"
+#line 1279 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1419 "regex.h2"
+#line 1388 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1424 "regex.h2"
+#line 1393 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1114,21 +1069,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1430 "regex.h2"
+#line 1399 "regex.h2"
 };
 
-template class class_token_matcher
+template class class_token_matcher
  {
-    public: [[nodiscard]] static auto match(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+    public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1455 "regex.h2"
+#line 1424 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1467 "regex.h2"
+#line 1436 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1140,23 +1095,20 @@ template class class_token_matche
 
     //     return r;
     // }
-#line 1478 "regex.h2"
+#line 1447 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1503 "regex.h2"
+#line 1472 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1506 "regex.h2"
+#line 1475 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::impl::in t);
 
-#line 1513 "regex.h2"
-    public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
-
-#line 1517 "regex.h2"
+#line 1482 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1164,14 +1116,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1520 "regex.h2"
+#line 1485 "regex.h2"
 };
 
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1531 "regex.h2"
+#line 1496 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1180,15 +1132,16 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1540 "regex.h2"
+#line 1505 "regex.h2"
     private: int id; 
+    private: bool case_insensitive; 
 
-    public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in str);
+    public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1547 "regex.h2"
+#line 1514 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1639 "regex.h2"
+#line 1606 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1196,31 +1149,30 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1642 "regex.h2"
+#line 1609 "regex.h2"
 };
 
-template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
+template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1669 "regex.h2"
+#line 1636 "regex.h2"
 class group_token: public regex_token {
 
-#line 1672 "regex.h2"
+#line 1639 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
-    private: std::string mod {"::cpp2::regex::match_modifiers_no_change"}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1689 "regex.h2"
+#line 1655 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1807 "regex.h2"
+#line 1782 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1824 "regex.h2"
+#line 1799 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1848 "regex.h2"
+#line 1817 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1229,84 +1181,44 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1854 "regex.h2"
+#line 1823 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1897 "regex.h2"
-class modifier_token: public regex_token_base {
-
-#line 1900 "regex.h2"
-    private: std::string mod; 
-
-    public: explicit modifier_token(cpp2::impl::in mod_, cpp2::impl::in mod_str);
-
-#line 1907 "regex.h2"
-    public: auto generate_code(generation_context& ctx) const -> void override;
-    public: virtual ~modifier_token() noexcept;
-
-    public: modifier_token(modifier_token const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(modifier_token const&) -> void = delete;
-
-
-#line 1911 "regex.h2"
-};
-
-template class apply_modifiers_matcher {
-
-    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto;
-    public: apply_modifiers_matcher() = default;
-    public: apply_modifiers_matcher(apply_modifiers_matcher const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(apply_modifiers_matcher const&) -> void = delete;
-
-
-#line 1923 "regex.h2"
-};
-
-template class pop_modifiers_matcher {
-
-    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto;
-    public: pop_modifiers_matcher() = default;
-    public: pop_modifiers_matcher(pop_modifiers_matcher const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(pop_modifiers_matcher const&) -> void = delete;
-
-
-#line 1930 "regex.h2"
-};
-
+#line 1866 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1950 "regex.h2"
-template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
+#line 1884 "regex.h2"
+template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1962 "regex.h2"
+#line 1896 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1976 "regex.h2"
-template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool;
+#line 1910 "regex.h2"
+template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1981 "regex.h2"
+#line 1915 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1986 "regex.h2"
+#line 1920 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1993 "regex.h2"
+#line 1927 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1999 "regex.h2"
+#line 1933 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1314,42 +1226,42 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 2002 "regex.h2"
+#line 1936 "regex.h2"
 };
 
-template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool;
+template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 2013 "regex.h2"
+#line 1947 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2040 "regex.h2"
-template using named_class_no_new_line = class_token_matcher>;
-template                  using named_class_digits = class_token_matcher>;
-template                  using named_class_hor_space = class_token_matcher>;
-template                  using named_class_space = class_token_matcher>;
-template                  using named_class_ver_space = class_token_matcher>;
-template                  using named_class_word = class_token_matcher>;
-
-template                     using named_class_not_digits = class_token_matcher>;
-template using named_class_not_hor_space = class_token_matcher>;
-template                     using named_class_not_space = class_token_matcher>;
-template using named_class_not_ver_space = class_token_matcher>;
-template                     using named_class_not_word = class_token_matcher>;
-
-#line 2054 "regex.h2"
+#line 1974 "regex.h2"
+template using named_class_no_new_line = class_token_matcher>;
+template                  using named_class_digits = class_token_matcher>;
+template                  using named_class_hor_space = class_token_matcher>;
+template                  using named_class_space = class_token_matcher>;
+template                  using named_class_ver_space = class_token_matcher>;
+template                  using named_class_word = class_token_matcher>;
+
+template                     using named_class_not_digits = class_token_matcher>;
+template using named_class_not_hor_space = class_token_matcher>;
+template                     using named_class_not_space = class_token_matcher>;
+template using named_class_not_ver_space = class_token_matcher>;
+template                     using named_class_not_word = class_token_matcher>;
+
+#line 1988 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2080 "regex.h2"
+#line 2014 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2085 "regex.h2"
+#line 2019 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1359,19 +1271,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2162 "regex.h2"
+#line 2096 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2173 "regex.h2"
+#line 2107 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2185 "regex.h2"
+#line 2119 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2209 "regex.h2"
+#line 2143 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2219 "regex.h2"
+#line 2153 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1379,46 +1291,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2223 "regex.h2"
+#line 2157 "regex.h2"
 };
 
 template class range_token_matcher {
 
-    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
+    public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2239 "regex.h2"
+#line 2173 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2244 "regex.h2"
+#line 2178 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2249 "regex.h2"
+#line 2183 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2255 "regex.h2"
-    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto;
+#line 2189 "regex.h2"
+    private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2270 "regex.h2"
-    private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
+#line 2204 "regex.h2"
+    private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2298 "regex.h2"
-    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
+#line 2232 "regex.h2"
+    private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2322 "regex.h2"
-    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return;
+#line 2256 "regex.h2"
+    private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2346 "regex.h2"
+#line 2280 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2353 "regex.h2"
+#line 2287 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1427,7 +1339,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2382 "regex.h2"
+#line 2316 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1436,70 +1348,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2404 "regex.h2"
-template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool;
-
-#line 2430 "regex.h2"
-//-----------------------------------------------------------------------
-//
-//  Matchers for regular expressions.
-//
-//-----------------------------------------------------------------------
-//
-
-#line 2438 "regex.h2"
-// Regex syntax: none Example: -
-//
-template class branch_reset_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: branch_reset_matcher_logic() = default;
-    public: branch_reset_matcher_logic(branch_reset_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(branch_reset_matcher_logic const&) -> void = delete;
-
-#line 2444 "regex.h2"
-};
-
-// Regex syntax:   Example: a
-//
-template class char_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 2469 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: char_matcher_logic() = default;
-    public: char_matcher_logic(char_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(char_matcher_logic const&) -> void = delete;
-
-#line 2471 "regex.h2"
-};
+#line 2338 "regex.h2"
+template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2474 "regex.h2"
-// Regex syntax: []  Example: [abcx-y[:digits:]]
-//
-template class class_matcher_logic
- {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 2497 "regex.h2"
-    private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
-
-#line 2509 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-
-    public: [[nodiscard]] static auto to_string() -> bstring;
-    public: class_matcher_logic() = default;
-    public: class_matcher_logic(class_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(class_matcher_logic const&) -> void = delete;
-
-
-#line 2521 "regex.h2"
-};
-
-#line 2524 "regex.h2"
+#line 2363 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1511,8 +1363,7 @@ template class class_matcher_logi
 template class regular_expression {
 
     public: template using context = match_context;
-    public: using modifiers = match_modifiers;
-
+    
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
@@ -1520,7 +1371,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_);
 
-#line 2547 "regex.h2"
+#line 2385 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1535,7 +1386,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2563 "regex.h2"
+#line 2401 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1543,13 +1394,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2575 "regex.h2"
+#line 2413 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2597 "regex.h2"
+#line 2435 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1561,7 +1412,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2610 "regex.h2"
+#line 2448 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1586,17 +1437,12 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e);
 
-#line 2638 "regex.h2"
+#line 2476 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::impl::in message) & -> void;
 
-#line 2645 "regex.h2"
-    // Parser helper functions.
-
-    public: [[nodiscard]] auto parser_expression_modifiers(cpp2::impl::out mods) & -> std::string;
-
-#line 2685 "regex.h2"
+#line 2483 "regex.h2"
     // Parsing functions
     //
 
@@ -1605,12 +1451,12 @@ template class regex_parser {
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2719 "regex.h2"
+#line 2515 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string;
 
-#line 2728 "regex.h2"
+#line 2524 "regex.h2"
 }
 }
 
@@ -1624,6 +1470,63 @@ namespace cpp2 {
 
 namespace regex {
 
+
+constexpr expression_flags::expression_flags(cpp2::impl::in _val)
+                                                          : _value{ cpp2::unsafe_narrow(_val) } {  }
+
+constexpr auto expression_flags::operator=(cpp2::impl::in _val) -> expression_flags&  { 
+                                                          _value = cpp2::unsafe_narrow(_val);
+                                                          return *this; }
+constexpr auto expression_flags::operator|=(expression_flags const& that) & -> void { _value |= that._value; }
+constexpr auto expression_flags::operator&=(expression_flags const& that) & -> void { _value &= that._value; }
+constexpr auto expression_flags::operator^=(expression_flags const& that) & -> void { _value ^= that._value; }
+[[nodiscard]] constexpr auto expression_flags::operator|(expression_flags const& that) const& -> expression_flags { return _value | that._value; }
+[[nodiscard]] constexpr auto expression_flags::operator&(expression_flags const& that) const& -> expression_flags { return _value & that._value; }
+[[nodiscard]] constexpr auto expression_flags::operator^(expression_flags const& that) const& -> expression_flags { return _value ^ that._value; }
+[[nodiscard]] constexpr auto expression_flags::has(expression_flags const& that) const& -> bool { return _value & that._value; }
+constexpr auto expression_flags::set(expression_flags const& that) & -> void { _value |= that._value; }
+constexpr auto expression_flags::clear(expression_flags const& that) & -> void { _value &= ~that._value; }
+inline CPP2_CONSTEXPR expression_flags expression_flags::case_insensitive = 1;
+
+inline CPP2_CONSTEXPR expression_flags expression_flags::multiple_lines = 2;
+
+inline CPP2_CONSTEXPR expression_flags expression_flags::single_line = 4;
+
+inline CPP2_CONSTEXPR expression_flags expression_flags::no_group_captures = 8;
+
+inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax = 16;
+
+inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax_in_classes = 32;
+
+inline CPP2_CONSTEXPR expression_flags expression_flags::none = 0;
+
+[[nodiscard]] constexpr auto expression_flags::get_raw_value() const& -> cpp2::u8 { return _value; }
+constexpr expression_flags::expression_flags()
+                                        : _value{ none._value }{}
+constexpr expression_flags::expression_flags(expression_flags const& that)
+                                              : _value{ that._value }{}
+constexpr auto expression_flags::operator=(expression_flags const& that) -> expression_flags& {
+                                              _value = that._value;
+                                              return *this;}
+constexpr expression_flags::expression_flags(expression_flags&& that) noexcept
+                                              : _value{ std::move(that)._value }{}
+constexpr auto expression_flags::operator=(expression_flags&& that) noexcept -> expression_flags& {
+                                              _value = std::move(that)._value;
+                                              return *this;}
+[[nodiscard]] auto expression_flags::to_string() const& -> std::string{
+
+std::string _ret {"("}; 
+
+std::string _comma {}; 
+if ((*this) == none) {return "(none)"; }
+if (((*this) & case_insensitive) == case_insensitive) {_ret += _comma + "case_insensitive";_comma = ", ";}
+if (((*this) & multiple_lines) == multiple_lines) {_ret += _comma + "multiple_lines";_comma = ", ";}
+if (((*this) & single_line) == single_line) {_ret += _comma + "single_line";_comma = ", ";}
+if (((*this) & no_group_captures) == no_group_captures) {_ret += _comma + "no_group_captures";_comma = ", ";}
+if (((*this) & perl_code_syntax) == perl_code_syntax) {_ret += _comma + "perl_code_syntax";_comma = ", ";}
+if (((*this) & perl_code_syntax_in_classes) == perl_code_syntax_in_classes) {_ret += _comma + "perl_code_syntax_in_classes";_comma = ", ";}
+return cpp2::move(_ret) + ")"; 
+}
 #line 25 "regex.h2"
 //-----------------------------------------------------------------------
 //
@@ -1633,18 +1536,19 @@ namespace regex {
 //
 
 #line 33 "regex.h2"
-    inline CPP2_CONSTEXPR int expression_flags::case_insensitive = 1;// mod: i
-    inline CPP2_CONSTEXPR int expression_flags::multiple_lines = 2;// mod: m
-    inline CPP2_CONSTEXPR int expression_flags::single_line = 4;// mod: s
-    inline CPP2_CONSTEXPR int expression_flags::no_group_captures = 8;// mod: n
-    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax = 16;// mod: x
-    inline CPP2_CONSTEXPR int expression_flags::perl_code_syntax_in_classes = 32;// mod: xx
+                                  // mod: i
+                                  // mod: m
+                                  // mod: s
+                                  // mod: n
+                                  // mod: x
+                                  // mod: xx
 
 #line 41 "regex.h2"
 // TODO: @enum as template parameter yields two error:
 //     error: type 'range_flags' of non-type template parameter is not a structural type
 //     error: non-type template parameter has incomplete type 'range_flags'
 
+#line 45 "regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy = 1;
     inline CPP2_CONSTEXPR int range_flags::greedy = 2;
     inline CPP2_CONSTEXPR int range_flags::possessive = 3;
@@ -1763,88 +1667,37 @@ namespace regex {
     template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
 #line 144 "regex.h2"
-// Flag change for matching modifiers. Creates a new flag for match_modifiers.
-// See expression_flags for possible flags.
-//
-
-#line 149 "regex.h2"
-    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::reset = reset_;
-    template  inline CPP2_CONSTEXPR int match_modifiers_state_change::add = add_;
-    template  inline CPP2_CONSTEXPR int match_modifiers_state_change::remove = remove_;
-    template  inline CPP2_CONSTEXPR bool match_modifiers_state_change::has_change = has_change_;
-
-#line 154 "regex.h2"
-    template  [[nodiscard]] constexpr auto match_modifiers_state_change::combine_inner(cpp2::impl::in old_flags) -> auto{
-        auto new_flags {old_flags}; 
-        if (reset) {
-            new_flags = 0;
-        }
-        new_flags = new_flags | add;
-        new_flags = new_flags & (~remove);
-
-        return new_flags; 
-    }
-
-#line 165 "regex.h2"
-    template  [[nodiscard]] auto match_modifiers_state_change::to_string() -> auto { return CPP2_UFCS(data)(str);  }
-
-#line 170 "regex.h2"
-// Current modifiers for the regular expression.
-// See expression_flags for possible flags.
-//
-
-#line 175 "regex.h2"
-    template  inline CPP2_CONSTEXPR int match_modifiers::flags = flags_;
-
-    // Push/pop management
-
-#line 179 "regex.h2"
-    template  template [[nodiscard]] auto match_modifiers::push([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers>(); }
-#line 180 "regex.h2"
-    template  [[nodiscard]] auto match_modifiers::pop() -> auto { return Inner(); }
-#line 181 "regex.h2"
-    template  template [[nodiscard]] auto match_modifiers::replace([[maybe_unused]] Change const& unnamed_param_1) -> auto { return match_modifiers();  }
-
-    // Flag management
-    //
-
-#line 186 "regex.h2"
-    template  [[nodiscard]] auto match_modifiers::has_flag(cpp2::impl::in f) const& -> bool{
-        return  0 != (f & flags); 
-    }
-
-#line 191 "regex.h2"
 //  Represents the remainder of the regular expression.
 //
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
 //  Otherwise the matcher can try a different alternative.
 //
 
-#line 197 "regex.h2"
+#line 150 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return match_select(cur, ctx, modifiers, end_func);  }
 
-#line 199 "regex.h2"
+#line 152 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { 
         return match_select(cur, ctx, modifiers, end_func);  }
 
-#line 202 "regex.h2"
+#line 155 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { 
         return First::match(cur, ctx, modifiers, end_func, matcher_list());  }
-#line 204 "regex.h2"
+#line 157 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return end_func(cur, ctx, modifiers);  }
 
-#line 206 "regex.h2"
+#line 159 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 207 "regex.h2"
+#line 160 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 209 "regex.h2"
+#line 162 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 214 "regex.h2"
-    [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx, [[maybe_unused]] auto const& unnamed_param_4) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
+#line 167 "regex.h2"
+    [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
-#line 217 "regex.h2"
+#line 170 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Character classes for regular expressions.
@@ -1855,72 +1708,72 @@ namespace regex {
 // Class syntax:  Example: a
 //
 
-#line 228 "regex.h2"
+#line 181 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C;  }
-#line 229 "regex.h2"
+#line 182 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 232 "regex.h2"
+#line 185 "regex.h2"
 // Class syntax: - Example: a-c
 //
 
-#line 236 "regex.h2"
+#line 189 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }();  }
-#line 237 "regex.h2"
+#line 190 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 240 "regex.h2"
+#line 193 "regex.h2"
 // Helper for combining two character classes
 //
 
-#line 243 "regex.h2"
+#line 196 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 244 "regex.h2"
+#line 197 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 247 "regex.h2"
+#line 200 "regex.h2"
 // Class syntax:   Example: abcd
 //
 
-#line 250 "regex.h2"
+#line 203 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c));  }
-#line 251 "regex.h2"
+#line 204 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 254 "regex.h2"
+#line 207 "regex.h2"
 // Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 258 "regex.h2"
+#line 211 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 263 "regex.h2"
+#line 216 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 266 "regex.h2"
+#line 219 "regex.h2"
 // Short class syntax: \  Example: \w
 //
 
-#line 269 "regex.h2"
+#line 222 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 270 "regex.h2"
+#line 223 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
 
-#line 274 "regex.h2"
+#line 227 "regex.h2"
 // Named basic character classes
 //
 
-#line 280 "regex.h2"
+#line 233 "regex.h2"
 // Named other classes
 //
 
-#line 296 "regex.h2"
+#line 249 "regex.h2"
 // Shorthand class entries
 //
 
-#line 311 "regex.h2"
+#line 264 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Helper matchers for regular expressions.
@@ -1931,18 +1784,18 @@ namespace regex {
 // Regex syntax: none Example: -
 //
 
-#line 321 "regex.h2"
+#line 274 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 322 "regex.h2"
+#line 275 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 323 "regex.h2"
+#line 276 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
 
-#line 327 "regex.h2"
+#line 280 "regex.h2"
 // Helper for greedy alternatives
 //
 
-#line 330 "regex.h2"
+#line 283 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Other::match(cur, ctx, modifiers, end_func)}; 
         if (r.matched) {
@@ -1951,20 +1804,20 @@ namespace regex {
         return r; 
     }
 
-#line 338 "regex.h2"
+#line 291 "regex.h2"
     template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 339 "regex.h2"
+#line 292 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
-#line 342 "regex.h2"
+#line 295 "regex.h2"
 // Helper for standard matchers with special syntax
 //
 //
 
-#line 347 "regex.h2"
+#line 300 "regex.h2"
     template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
 
-#line 350 "regex.h2"
+#line 303 "regex.h2"
 //-----------------------------------------------------------------------
 //
 // Matchers and generators for regular expressions.
@@ -1972,69 +1825,69 @@ namespace regex {
 //-----------------------------------------------------------------------
 //
 
-#line 359 "regex.h2"
+#line 312 "regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 366 "regex.h2"
+#line 319 "regex.h2"
     template  on_return::on_return(Func const& f)
         : func{ f }{
 
-#line 368 "regex.h2"
+#line 321 "regex.h2"
     }
-#line 366 "regex.h2"
+#line 319 "regex.h2"
     template  auto on_return::operator=(Func const& f) -> on_return& {
         func = f;
         return *this;
 
-#line 368 "regex.h2"
+#line 321 "regex.h2"
     }
 
-#line 370 "regex.h2"
+#line 323 "regex.h2"
     template  on_return::~on_return() noexcept{
         cpp2::move(*this).func();
     }
 
-#line 375 "regex.h2"
+#line 328 "regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
-#line 381 "regex.h2"
+#line 334 "regex.h2"
     regex_token::regex_token(cpp2::impl::in str)
         : string_rep{ str }{
 
-#line 383 "regex.h2"
+#line 336 "regex.h2"
     }
 
-#line 385 "regex.h2"
+#line 338 "regex.h2"
     regex_token::regex_token()
         : string_rep{ "" }{
 
-#line 387 "regex.h2"
+#line 340 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
 
-#line 393 "regex.h2"
+#line 346 "regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
-#line 394 "regex.h2"
+#line 347 "regex.h2"
     auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}
 
-#line 419 "regex.h2"
+#line 364 "regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 425 "regex.h2"
+#line 370 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 431 "regex.h2"
+#line 376 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
         if (CPP2_UFCS(empty)(alternate_match_lists)) {
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
@@ -2045,13 +1898,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 441 "regex.h2"
+#line 386 "regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void { CPP2_UFCS(push_back)(cur_match_list, token);  }
 
-#line 443 "regex.h2"
+#line 388 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 453 "regex.h2"
+#line 398 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -2060,20 +1913,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 461 "regex.h2"
+#line 406 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 466 "regex.h2"
+#line 411 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 472 "regex.h2"
+#line 417 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -2081,15 +1934,28 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 492 "regex.h2"
-    parse_context::parse_context(cpp2::impl::in r, cpp2::impl::in modifiers)
-        : regex{ r }{
+#line 439 "regex.h2"
+    parse_context::parse_context(cpp2::impl::in r)
+        : regex{ r }
+        , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }{
+
+#line 442 "regex.h2"
+    }
+#line 439 "regex.h2"
+    auto parse_context::operator=(cpp2::impl::in r) -> parse_context& {
+        regex = r;
+        pos = 0;
+        error_text = "";
+        named_groups = {};
+        cur_group_state = {};
+        cur_branch_reset_state = {};
+        root = CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "");
+        return *this;
 
-#line 494 "regex.h2"
-        set_modifiers(modifiers);
+#line 442 "regex.h2"
     }
 
-#line 500 "regex.h2"
+#line 447 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -2097,24 +1963,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 507 "regex.h2"
+#line 454 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 513 "regex.h2"
-    [[nodiscard]] auto parse_context::get_modifiers() const& -> parse_context_modifier_state{
+#line 460 "regex.h2"
+    [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 517 "regex.h2"
-    auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
+#line 464 "regex.h2"
+    auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 524 "regex.h2"
+#line 471 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2123,36 +1989,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 532 "regex.h2"
+#line 479 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, cpp2::move(max_group));
     }
 
-#line 538 "regex.h2"
+#line 485 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 546 "regex.h2"
+#line 493 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 548 "regex.h2"
+#line 495 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
 
-#line 550 "regex.h2"
+#line 497 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 554 "regex.h2"
+#line 501 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 558 "regex.h2"
+#line 505 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2163,43 +2029,43 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 568 "regex.h2"
+#line 515 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
-        return CPP2_UFCS(get_tokens)(cur_group_state); 
+        return root; 
     }
 
-#line 573 "regex.h2"
+#line 520 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 577 "regex.h2"
+#line 524 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 581 "regex.h2"
+#line 528 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 587 "regex.h2"
+#line 534 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
              return -1; 
         }
         else {
-            return (*cpp2::impl::assert_not_null(cpp2::move(iter))).second;
+            return (*cpp2::impl::assert_not_null(cpp2::move(iter))).second; 
         }
     }
 
-#line 597 "regex.h2"
+#line 544 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 599 "regex.h2"
+#line 546 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2210,14 +2076,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 609 "regex.h2"
+#line 556 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 610 "regex.h2"
+#line 557 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 611 "regex.h2"
+#line 558 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 613 "regex.h2"
+#line 560 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2227,19 +2093,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 622 "regex.h2"
+#line 569 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,CPP2_UFCS(size)(regex)); }
 
-#line 624 "regex.h2"
+#line 571 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 626 "regex.h2"
+#line 573 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 631 "regex.h2"
+#line 578 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2252,18 +2118,18 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 643 "regex.h2"
+#line 590 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::impl::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 645 "regex.h2"
+#line 592 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
             if (in_class) {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
+                perl_syntax = CPP2_UFCS(has)(get_modifiers(), expression_flags::perl_code_syntax) && CPP2_UFCS(has)(get_modifiers(), expression_flags::perl_code_syntax_in_classes);
             }
             else {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
+                perl_syntax = CPP2_UFCS(has)(get_modifiers(), expression_flags::perl_code_syntax);
             }
         }
         auto cur {pos + 1}; 
@@ -2294,7 +2160,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 684 "regex.h2"
+#line 631 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2316,14 +2182,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 705 "regex.h2"
+#line 652 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 706 "regex.h2"
+#line 653 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 707 "regex.h2"
+#line 654 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 709 "regex.h2"
+#line 656 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2336,16 +2202,16 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 721 "regex.h2"
+#line 668 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
         if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
             start_search += 1;
         }
-        auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", cpp2::move(start_search))};
+        auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", cpp2::move(start_search))}; 
 
-        cpp2::impl::deferred_init r;
+        cpp2::impl::deferred_init r; 
         if (end != std::string::npos) {
             r.construct(CPP2_UFCS(substr)(regex, start, end - start));
             pos = cpp2::move(end) - 1;
@@ -2354,48 +2220,48 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             r.construct(CPP2_UFCS(substr)(regex, cpp2::move(start)));
             pos = CPP2_UFCS(size)(regex) - 1;
         }
-        return cpp2::move(r.value());
+        return cpp2::move(r.value()); 
     }
 
-#line 741 "regex.h2"
+#line 688 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
-            return CPP2_ASSERT_IN_BOUNDS(regex, cpp2::move(next_pos));
+            return CPP2_ASSERT_IN_BOUNDS(regex, cpp2::move(next_pos)); 
         }
         else {
             return '\0'; 
         }
     }
 
-#line 751 "regex.h2"
+#line 698 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 752 "regex.h2"
+#line 699 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 754 "regex.h2"
-    [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, cpp2::impl::out modifier_change,
-                      parse_context_modifier_state& parser_modifiers) & -> bool{
+#line 701 "regex.h2"
+    [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
 
         auto add {0}; 
         auto remove {0}; 
 
-        auto apply {[&, _1 = (&is_negative), _2 = (&remove), _3 = (&add)](cpp2::impl::in flag) mutable -> void{
+        auto apply {[&, _1 = (&is_negative), _2 = (&parser_modifiers)](cpp2::impl::in flag) mutable -> void{
             if (*cpp2::impl::assert_not_null(_1)) {
-                *cpp2::impl::assert_not_null(_2) |= flag;
+                CPP2_UFCS(clear)((*cpp2::impl::assert_not_null(_2)), flag);
             }
             else {
-                *cpp2::impl::assert_not_null(_3) |= flag;
+                CPP2_UFCS(set)((*cpp2::impl::assert_not_null(_2)), flag);
             }
         }}; 
 
         auto iter {CPP2_UFCS(begin)(change_str)}; 
         for( ; iter != CPP2_UFCS(end)(change_str); (++iter) ) {
-            auto cur {*cpp2::impl::assert_not_null(iter)};
+            auto cur {*cpp2::impl::assert_not_null(iter)}; 
             if (cur == '^') {
                 is_reset = true;
+                parser_modifiers = expression_flags::none;
             }
             else {if (cur == '-') {
                 if (is_reset) {static_cast(error("No negative modifier allowed.")); return false; }
@@ -2404,42 +2270,32 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             else {if (cur == 'i') {apply(expression_flags::case_insensitive); }
             else {if (cur == 'm') {apply(expression_flags::multiple_lines); }
             else {if (cur == 's') {apply(expression_flags::single_line); }
-            else {if (cur == 'n') {
-                apply(expression_flags::no_group_captures);
-                parser_modifiers.group_captures_have_numbers = is_negative;
-            }
+            else {if (cur == 'n') {apply(expression_flags::no_group_captures); }
             else {if (cur == 'x') {
                 if ((iter + 1) == CPP2_UFCS(end)(change_str) || *cpp2::impl::assert_not_null((iter + 1)) != 'x') {
                     // x modifier
                     apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !(is_negative);
 
                     // Just x unsets xx and remove x also removes xx
-                    remove |= expression_flags::perl_code_syntax_in_classes;
-                    parser_modifiers.perl_code_syntax_in_classes = false;
+                    CPP2_UFCS(clear)(parser_modifiers, expression_flags::perl_code_syntax_in_classes);
                 }
                 else { // xx modifier
                     // xx also sets or unsets x
                     apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !(is_negative);
-
                     apply(expression_flags::perl_code_syntax_in_classes);
-                    parser_modifiers.perl_code_syntax_in_classes = !(is_negative);
 
                     ++iter; // Skip the second x
                 }
             }
             else {
-                static_cast(error(("Unknown modifier: " + cpp2::to_string(cpp2::move(cur))))); return false;
+                static_cast(error(("Unknown modifier: " + cpp2::to_string(cpp2::move(cur))))); return false; 
             }}}}}}}
         }
 
-        modifier_change.construct("::cpp2::regex::match_modifiers_state_change");
-
         return true; 
     }
 
-#line 819 "regex.h2"
+#line 756 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2477,10 +2333,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 856 "regex.h2"
-    [[nodiscard]] auto parse_context::parse() & -> auto { return parse_until('\0');  }
+#line 793 "regex.h2"
+    [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
+
+        expression_flags flags {}; 
+        if (!(parser_group_modifiers(modifiers, flags))) {return false; }
+        set_modifiers(cpp2::move(flags));
+
+        auto r {parse_until('\0')}; 
+        if (r) {
+            root = CPP2_UFCS(get_tokens)(cur_group_state);
+        }
+
+        return r; 
+    }
 
-#line 865 "regex.h2"
+#line 814 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2488,27 +2356,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 872 "regex.h2"
+#line 821 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 887 "regex.h2"
-    [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx, modifiers"; }
+#line 836 "regex.h2"
+    [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 889 "regex.h2"
+#line 838 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 894 "regex.h2"
+#line 843 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 899 "regex.h2"
+#line 848 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void{
         end_func_statefull(c);
 
@@ -2516,14 +2384,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(cpp2::move(name));
     }
 
-#line 906 "regex.h2"
+#line 855 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
-        return (*cpp2::impl::assert_not_null(get_base())).code;
+        return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 912 "regex.h2"
+#line 861 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(token)), (*this));
@@ -2532,7 +2400,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 920 "regex.h2"
+#line 869 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2551,42 +2419,42 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
         finish_context();
 
-        return cpp2::move(name) + "()";
+        return cpp2::move(name) + "()"; 
     }
 
-#line 942 "regex.h2"
+#line 891 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 946 "regex.h2"
+#line 895 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 950 "regex.h2"
+#line 899 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 954 "regex.h2"
+#line 903 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, cur, inout ctx, other) -> _ = {\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    r := ctx.pass(cur);\n");
         CPP2_UFCS(add_tabs)((*cpp2::impl::assert_not_null(cpp2::move(cur))), 2);
     }
 
-#line 963 "regex.h2"
+#line 912 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
-        return cpp2::move(name) + "()";
+        return cpp2::move(name) + "()"; 
     }
 
-#line 969 "regex.h2"
+#line 918 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::impl::assert_not_null(cur)), 2);
@@ -2599,38 +2467,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 981 "regex.h2"
+#line 930 "regex.h2"
     auto generation_context::end_func() & -> void{
-        end_func_statefull("other(r.pos, ctx, modifiers)");
+        end_func_statefull("other(r.pos, ctx)");
     }
 
-#line 985 "regex.h2"
+#line 934 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 989 "regex.h2"
+#line 938 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
-        return { "func_" + cpp2::to_string(cpp2::move(cur_id)) };
+        return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 995 "regex.h2"
+#line 944 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
-        return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) };
+        return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 1001 "regex.h2"
+#line 950 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
-        return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) };
+        return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 1007 "regex.h2"
+#line 956 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2639,7 +2507,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1015 "regex.h2"
+#line 964 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2648,7 +2516,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 1023 "regex.h2"
+#line 972 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2671,29 +2539,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1051 "regex.h2"
+#line 1000 "regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1054 "regex.h2"
+#line 1003 "regex.h2"
     }
 
-#line 1056 "regex.h2"
+#line 1005 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(token)), ctx);
         }
     }
 
-#line 1062 "regex.h2"
+#line 1011 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(token)), groups);
         }
     }
 
-#line 1068 "regex.h2"
+#line 1017 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2704,74 +2572,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1081 "regex.h2"
+#line 1030 "regex.h2"
     regex_token_base::regex_token_base(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 1083 "regex.h2"
+#line 1032 "regex.h2"
     }
 
-#line 1085 "regex.h2"
+#line 1034 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1087 "regex.h2"
+#line 1036 "regex.h2"
     }
 
-#line 1089 "regex.h2"
+#line 1038 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1097 "regex.h2"
+#line 1046 "regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1100 "regex.h2"
+#line 1049 "regex.h2"
     }
 
-#line 1102 "regex.h2"
+#line 1051 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1112 "regex.h2"
+#line 1061 "regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1115 "regex.h2"
+#line 1064 "regex.h2"
     }
 
-#line 1117 "regex.h2"
+#line 1066 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add)(ctx, code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1126 "regex.h2"
+#line 1075 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token_base{ str }{
 
-#line 1128 "regex.h2"
+#line 1077 "regex.h2"
     }
 
-#line 1130 "regex.h2"
+#line 1079 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1142 "regex.h2"
+#line 1091 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1144 "regex.h2"
+#line 1093 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2780,22 +2648,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1152 "regex.h2"
+#line 1101 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1163 "regex.h2"
+#line 1112 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1166 "regex.h2"
+#line 1115 "regex.h2"
     }
 
-#line 1168 "regex.h2"
+#line 1117 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2812,14 +2680,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1184 "regex.h2"
+#line 1133 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(cur)), groups);
         }
     }
 
-#line 1190 "regex.h2"
+#line 1139 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2834,51 +2702,55 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1205 "regex.h2"
-    template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
-        return match_first(cur, ctx, modifiers, end_func, tail, functions...); 
+#line 1154 "regex.h2"
+    template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
+        return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1208 "regex.h2"
-    template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
-        auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx, auto const& tail_modifiers) -> auto{
-            return _0(tail_cur, tail_ctx, tail_modifiers, _1); 
+#line 1157 "regex.h2"
+    template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
+        auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
+            return _0(tail_cur, tail_ctx, _1); 
         }}; 
-        auto r {cur_func(cur, ctx, modifiers, cpp2::move(inner_call))};
+        auto r {cur_func(cur, ctx, cpp2::move(inner_call))}; 
         if (r.matched) {
             return r; 
         }else {
             cur_reset(ctx);
 
             if constexpr (0 != sizeof...(Other)) {
-                return match_first(cur, ctx, modifiers, end_func, tail, other...); 
+                return match_first(cur, ctx, end_func, tail, other...); 
             }else {
                 return CPP2_UFCS(fail)(ctx); 
             }
         }
     }
 
-#line 1232 "regex.h2"
-    any_token::any_token()
-                            : regex_token_base{ "." }{}  // TODO: Base class constructor is ignored.
+#line 1183 "regex.h2"
+    any_token::any_token(cpp2::impl::in single_line_)
+        : regex_token_base{ "." }
+        , single_line{ single_line_ }{
 
-#line 1234 "regex.h2"
+#line 1185 "regex.h2"
+    }
+
+#line 1187 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::single_line)); 
     }
 
-#line 1240 "regex.h2"
+#line 1193 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1245 "regex.h2"
-template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+#line 1198 "regex.h2"
+template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
-        && (CPP2_UFCS(has_flag)(modifiers, expression_flags::single_line) || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
+        && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
         cur += 1;
         return true; 
     }
@@ -2887,60 +2759,73 @@ template [[nodiscard]] auto any_token_matcher(auto& cur, auto& c
     }
 }
 
-#line 1261 "regex.h2"
-    char_token::char_token(cpp2::impl::in t)
+#line 1215 "regex.h2"
+    char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token_base{ std::string(1, t) }
-        , token{ t }{
+        , token{ t }
+        , ignore_case{ ignore_case_ }{
 
-#line 1264 "regex.h2"
+#line 1219 "regex.h2"
     }
 
-#line 1266 "regex.h2"
+#line 1221 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive)); 
     }
 
-#line 1270 "regex.h2"
+#line 1225 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
-        auto upper {safe_toupper(token)}; 
-        auto lower {safe_tolower(token)}; 
-        CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
-    }
-
-    char_token::~char_token() noexcept{}
+        if (ignore_case) {
+            auto upper {safe_toupper(token)}; 
+            auto lower {safe_tolower(token)}; 
 
-#line 1277 "regex.h2"
-template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
-    if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
-        if (cur != ctx.end && (*cpp2::impl::assert_not_null(cur) == L || *cpp2::impl::assert_not_null(cur) == U)) {
-            cur += 1;
-            return true; 
+            if (upper != lower) {
+                CPP2_UFCS(add_check)(ctx, ("char_token_case_insensitive_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+            }
+            else {
+                CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+            }
         }
         else {
-            return false; 
+            CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
         }
     }
+
+    char_token::~char_token() noexcept{}
+
+#line 1243 "regex.h2"
+template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx) -> bool{
+    if (cur != ctx.end && *cpp2::impl::assert_not_null(cur) == C) {
+        cur += 1;
+        return true; 
+    }
     else {
-        if (cur != ctx.end && *cpp2::impl::assert_not_null(cur) == C) {
-            cur += 1;
-            return true; 
-        }
-        else {
-            return false; 
-        }
+        return false; 
+    }
+}
+
+#line 1253 "regex.h2"
+template [[nodiscard]] auto char_token_case_insensitive_matcher(auto& cur, auto& ctx) -> bool{
+    if (cur != ctx.end && (*cpp2::impl::assert_not_null(cur) == L || *cpp2::impl::assert_not_null(cur) == U)) {
+        cur += 1;
+        return true; 
+    }
+    else {
+        return false; 
     }
 }
 
-#line 1306 "regex.h2"
-    class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in class_str_, cpp2::impl::in str)
+#line 1272 "regex.h2"
+    class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
+        , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1310 "regex.h2"
+#line 1277 "regex.h2"
     }
 
-#line 1313 "regex.h2"
+#line 1280 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -2976,7 +2861,7 @@ template [[nodiscard]] auto char_toke
             }
             else {if (CPP2_UFCS(current)(ctx) == '\\') {
                 if (CPP2_UFCS(next_no_skip)(ctx) && (CPP2_UFCS(current)(ctx) != ']')) {
-                    if ( ' ' == CPP2_UFCS(current)(ctx) && CPP2_UFCS(get_modifiers)(ctx).perl_code_syntax && CPP2_UFCS(get_modifiers)(ctx).perl_code_syntax_in_classes) {
+                    if ( ' ' == CPP2_UFCS(current)(ctx) && CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::perl_code_syntax) && CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::perl_code_syntax_in_classes)) {
                         CPP2_UFCS(push_back)(classes, std::string(1, CPP2_UFCS(current)(ctx)));// TODO: UFCS error with char as argument.
                     }
                     else {
@@ -3043,28 +2928,30 @@ template [[nodiscard]] auto char_toke
             }}
         }
 
-        auto inner {CPP2_UFCS(join)(ctx, cpp2::move(classes))};
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), cpp2::move(inner), CPP2_UFCS(get_range)(ctx, cpp2::move(start_pos), cpp2::move(end_pos)));
+        auto inner {CPP2_UFCS(join)(ctx, cpp2::move(classes))}; 
+        auto string_rep {CPP2_UFCS(get_range)(ctx, cpp2::move(start_pos), cpp2::move(end_pos))}; 
+        string_rep = replace_all(string_rep, "\\", "\\\\");
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1419 "regex.h2"
+#line 1388 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1424 "regex.h2"
+#line 1393 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
 
-        return { "::cpp2::regex::" + cpp2::to_string(name) + "" };
+        return { "::cpp2::regex::" + cpp2::to_string(name) + "" }; 
     }
 
     class_token::~class_token() noexcept{}
 
-#line 1434 "regex.h2"
-    template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx, auto const& modifiers) -> bool{
-        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+#line 1403 "regex.h2"
+    template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
+        if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
                 cur += 1;
                 return true; 
@@ -3084,8 +2971,8 @@ template [[nodiscard]] auto char_toke
         }
     }
 
-#line 1455 "regex.h2"
-    template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
+#line 1424 "regex.h2"
+    template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
         if (!(r)) {
@@ -3097,11 +2984,11 @@ template [[nodiscard]] auto char_toke
         return r; 
     }
 
-#line 1480 "regex.h2"
+#line 1449 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1484 "regex.h2"
+#line 1453 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3113,7 +3000,7 @@ template [[nodiscard]] auto char_toke
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
     }else {
         // Escape of regex special char
-        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx))}; 
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx), false)}; 
         CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))));
 
         return r; 
@@ -3121,27 +3008,22 @@ template [[nodiscard]] auto char_toke
 
 }
 
-#line 1508 "regex.h2"
+#line 1477 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::impl::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1511 "regex.h2"
-    }
-
-#line 1513 "regex.h2"
-    [[nodiscard]] auto escaped_char_token::parse(parse_context& ctx) -> token_ptr{
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
+#line 1480 "regex.h2"
     }
 
-#line 1517 "regex.h2"
+#line 1482 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1524 "regex.h2"
+#line 1489 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
 
@@ -3149,15 +3031,16 @@ template [[nodiscard]] auto char_toke
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
 }
 
-#line 1542 "regex.h2"
-    group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in str)
+#line 1508 "regex.h2"
+    group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token_base{ str }
-        , id{ id_ }{
+        , id{ id_ }
+        , case_insensitive{ case_insensitive_ }{
 
-#line 1545 "regex.h2"
+#line 1512 "regex.h2"
     }
 
-#line 1547 "regex.h2"
+#line 1514 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3172,9 +3055,9 @@ template [[nodiscard]] auto char_toke
                 auto number {0}; 
                 if (!(string_to_int(group, number, 8))) {return CPP2_UFCS(error)(ctx, "Could not convert octal to int."); }
 
-                char number_as_char {unsafe_narrow(cpp2::move(number))};
+                char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-                auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char)}; 
+                auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char, CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive))}; 
                 CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(token)), ("\\" + cpp2::to_string(int_to_string(cpp2::impl::as_(cpp2::move(number_as_char)), 8))));
 
                 return token; 
@@ -3247,23 +3130,23 @@ template [[nodiscard]] auto char_toke
             if (-1 == group_id) {return CPP2_UFCS(error)(ctx, ("Group names does not exist. (Name is: " + cpp2::to_string(cpp2::move(group)) + ")")); }
         }
 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), cpp2::move(str));
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1639 "regex.h2"
+#line 1606 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1644 "regex.h2"
-template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
+#line 1611 "regex.h2"
+template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
     auto group_pos {g.start}; 
     for( ; group_pos != g.end && cur != ctx.end; (++group_pos, ++cur) ) {
-        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
+        if constexpr (case_insensitive) {
             if (safe_tolower(*cpp2::impl::assert_not_null(group_pos)) != safe_tolower(*cpp2::impl::assert_not_null(cur))) {
                 return false; 
             }
@@ -3283,7 +3166,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     }
 }
 
-#line 1676 "regex.h2"
+#line 1642 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
 
@@ -3297,15 +3180,14 @@ template [[nodiscard]] auto group_ref_token_matcher(a
         return r; 
     }
 
-#line 1689 "regex.h2"
+#line 1655 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
-        auto has_id {CPP2_UFCS(get_modifiers)(ctx).group_captures_have_numbers}; 
+        auto has_id {!(CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::no_group_captures))}; 
         auto has_pattern {true}; 
         std::string group_name {""}; 
         auto group_name_brackets {true}; 
-        std::string modifier_change {"::cpp2::regex::match_modifiers_no_change"}; 
         std::string modifiers {""}; 
 
         auto modifiers_change_to {CPP2_UFCS(get_modifiers)(ctx)}; 
@@ -3332,10 +3214,21 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             else {if (CPP2_UFCS(current)(ctx) == '#') {
                 // Comment
                 std::string comment_str {""}; 
+                static_cast(CPP2_UFCS(next)(ctx));// Skip #
                 if (!(CPP2_UFCS(grab_until)(ctx, ")", cpp2::impl::out(&comment_str)))) {return CPP2_UFCS(error)(ctx, "Group without closing bracket."); }
                 // Do not add comment. Has problems with ranges.
 
-                return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")"));
+                // Pop token and add a list. This fixes comments between a token and a range
+                if (CPP2_UFCS(has_token)(ctx)) {
+                    token_vec list {}; 
+                    CPP2_UFCS(push_back)(list, CPP2_UFCS(pop_token)(ctx));
+                    CPP2_UFCS(push_back)(list, CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")")));
+
+                    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list)); 
+                }
+                else {
+                    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")")); 
+                }
             }
             else {if (CPP2_UFCS(current)(ctx) == '|') {
                 // Branch reset group
@@ -3346,10 +3239,10 @@ template [[nodiscard]] auto group_ref_token_matcher(a
                 auto old_branch_state {CPP2_UFCS(branch_reset_new_state)(ctx)}; 
                 if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
                 CPP2_UFCS(branch_reset_restore_state)(ctx, cpp2::move(old_branch_state));
-                auto inner_ {CPP2_UFCS(end_group)(ctx, cpp2::move(old_parser_state))};
+                auto inner_ {CPP2_UFCS(end_group)(ctx, cpp2::move(old_parser_state))}; 
 
-                token_vec list {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?|"), cpp2::move(inner_), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ")")};
-                return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list));
+                token_vec list {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?|"), cpp2::move(inner_), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ")")}; 
+                return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list)); 
             }
             else {if (CPP2_UFCS(current)(ctx) == '=' || CPP2_UFCS(current)(ctx) == '!') {
                 return parse_lookahead(ctx, ("?" + cpp2::to_string(CPP2_UFCS(current)(ctx))), CPP2_UFCS(current)(ctx) == '='); 
@@ -3358,7 +3251,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
                 // Simple modifier
                 has_id = false;
                 if (!(CPP2_UFCS(grab_until_one_of)(ctx, "):", cpp2::impl::out(&modifiers)))) {return CPP2_UFCS(error)(ctx, "Missing ending bracket for group."); }
-                if (!(CPP2_UFCS(parser_group_modifiers)(ctx, modifiers, cpp2::impl::out(&modifier_change), modifiers_change_to))) {
+                if (!(CPP2_UFCS(parser_group_modifiers)(ctx, modifiers, modifiers_change_to))) {
                      return nullptr; 
                 }
 
@@ -3377,13 +3270,13 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             if (!(CPP2_UFCS(grab_until)(ctx, ':', cpp2::impl::out(&name)))) {return CPP2_UFCS(error)(ctx, "Missing colon for named pattern."); }
 
             if (name == "pla" || name == "positive_lookahead") {
-                return parse_lookahead(ctx, ("*" + cpp2::to_string(cpp2::move(name)) + ":"), true);
+                return parse_lookahead(ctx, ("*" + cpp2::to_string(cpp2::move(name)) + ":"), true); 
             }
             else {if (name == "nla" || name == "negative_lookahead") {
-                return parse_lookahead(ctx, ("*" + cpp2::to_string(cpp2::move(name)) + ":"), false);
+                return parse_lookahead(ctx, ("*" + cpp2::to_string(cpp2::move(name)) + ":"), false); 
             }
             else {
-                return CPP2_UFCS(error)(ctx, ("Unknown named group pattern: '" + cpp2::to_string(cpp2::move(name)) + "'"));
+                return CPP2_UFCS(error)(ctx, ("Unknown named group pattern: '" + cpp2::to_string(cpp2::move(name)) + "'")); 
             }}
         }}
 
@@ -3404,7 +3297,6 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
             (*cpp2::impl::assert_not_null(r)).inner = CPP2_UFCS(end_group)(ctx, cpp2::move(old_state));
             CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), gen_string(cpp2::move(group_name), cpp2::move(group_name_brackets), cpp2::move(modifiers), (*cpp2::impl::assert_not_null(r)).inner));
-            (*cpp2::impl::assert_not_null(r)).mod = cpp2::move(modifier_change);
 
             return r; 
         }
@@ -3412,11 +3304,11 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             // Only a modifier
             CPP2_UFCS(set_modifiers)(ctx, cpp2::move(modifiers_change_to));
 
-            return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(modifier_change), cpp2::move(modifiers));
+            return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?" + cpp2::to_string(cpp2::move(modifiers)) + ")")); 
         }
     }
 
-#line 1807 "regex.h2"
+#line 1782 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3431,18 +3323,15 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             start += "?" + modifiers + ":";
         }}
 
-        return cpp2::move(start) + CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(inner_))) + ")";
+        return cpp2::move(start) + CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1824 "regex.h2"
+#line 1799 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
         }
 
-        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
-        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
-
         CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(inner)), ctx);
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_end(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3454,12 +3343,9 @@ template [[nodiscard]] auto group_ref_token_matcher(a
             CPP2_UFCS(add)(ctx, "});");
             CPP2_UFCS(add)(ctx, ("_ = " + cpp2::to_string(cpp2::move(tmp_name)) + ";"));// TODO: Guard object problem.
         }
-
-        next_name = CPP2_UFCS(next_func_name)(ctx);
-        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::pop_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 1848 "regex.h2"
+#line 1817 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner)), groups);
         if (-1 != number) {
@@ -3469,7 +3355,7 @@ template [[nodiscard]] auto group_ref_token_matcher(a
 
     group_token::~group_token() noexcept{}
 
-#line 1858 "regex.h2"
+#line 1827 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
 
@@ -3496,70 +3382,39 @@ template [[nodiscard]] auto group_ref_token_matcher(a
     if (!(string_to_int(cpp2::move(number_str), number, 16))) {return CPP2_UFCS(error)(ctx, "Could not convert hexadecimal to int."); }
 
     // TODO: Change for unicode.
-    char number_as_char {unsafe_narrow(cpp2::move(number))};
+    char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-    std::string syntax {int_to_string(cpp2::impl::as_(number_as_char), 16)};
+    std::string syntax {int_to_string(cpp2::impl::as_(number_as_char), 16)}; 
     if (cpp2::move(has_brackets)) {
         syntax = { "{" + cpp2::to_string(syntax) + "}" };
     }
     syntax = { "\\\\x" + cpp2::to_string(syntax) };
 
-    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char))};
+    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive))}; 
     CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), cpp2::move(syntax));
     return r; 
 }
 
-#line 1902 "regex.h2"
-    modifier_token::modifier_token(cpp2::impl::in mod_, cpp2::impl::in mod_str)
-        : regex_token_base{ ("(?" + cpp2::to_string(mod_str) + ")") }
-        , mod{ mod_ }{
-
-#line 1905 "regex.h2"
-    }
-
-#line 1907 "regex.h2"
-    auto modifier_token::generate_code(generation_context& ctx) const -> void{
-        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
-        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::apply_modifiers_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + ")"));
-    }
-
-    modifier_token::~modifier_token() noexcept{}
-
-#line 1915 "regex.h2"
-    template  template [[nodiscard]] auto apply_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
-        if constexpr (push) {
-            return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func); 
-        }
-        else {
-            return tail(cur, ctx, Modifiers::replace(ModifierChange()), end_func); 
-        }
-    }
-
-#line 1927 "regex.h2"
-    template  template [[nodiscard]] auto pop_modifiers_matcher::match(Iter const& cur, auto& ctx, [[maybe_unused]] Modifiers const& unnamed_param_3, auto const& end_func, auto const& tail) -> auto{
-        return tail(cur, ctx, Modifiers::pop(), end_func); 
-    }
-
-#line 1934 "regex.h2"
+#line 1868 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", "line_end_token_matcher"); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", ("line_end_token_matcher")); 
     }
     else {if (CPP2_UFCS(current)(ctx) == '\\' && (CPP2_UFCS(peek)(ctx) == 'z' || CPP2_UFCS(peek)(ctx) == 'Z')) {
         static_cast(CPP2_UFCS(next)(ctx));// Skip escape
 
         auto negate {CPP2_UFCS(current)(ctx) == 'Z'}; 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), ("line_end_token_matcher"));
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), ("line_end_token_matcher")); 
     }
     else {
         return nullptr; 
     }}
 }
 
-#line 1950 "regex.h2"
-template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
-    if (cur == ctx.end || (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::impl::assert_not_null(cur) == '\n')) {
+#line 1884 "regex.h2"
+template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
+    if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
     }
     else {if (match_new_line_before_end && (*cpp2::impl::assert_not_null(cur) == '\n' && (cur + 1) == ctx.end)) {// Special case for new line at end.
@@ -3570,7 +3425,7 @@ template [[
     }}
 }
 
-#line 1964 "regex.h2"
+#line 1898 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3579,49 +3434,49 @@ template [[
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\A", "line_start_token_matcher"); 
     }
     else {
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", "line_start_token_matcher"); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", ("line_start_token_matcher")); 
     }
 }
 
-#line 1976 "regex.h2"
-template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx, auto const& modifiers) -> bool{
+#line 1910 "regex.h2"
+template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
-           (match_new_line && CPP2_UFCS(has_flag)(modifiers, expression_flags::multiple_lines) && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
+           (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1989 "regex.h2"
+#line 1923 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1991 "regex.h2"
+#line 1925 "regex.h2"
     }
 
-#line 1993 "regex.h2"
+#line 1927 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
 
         CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1999 "regex.h2"
+#line 1933 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner)), groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 2004 "regex.h2"
-template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& modifiers, auto const& func) -> bool{
-    auto r {func(cur, ctx, modifiers, true_end_func())}; 
+#line 1938 "regex.h2"
+template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
+    auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
         r.matched = !(r.matched);
     }
 
-    return cpp2::move(r).matched;
+    return cpp2::move(r).matched; 
 }
 
-#line 2016 "regex.h2"
+#line 1950 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3643,10 +3498,10 @@ template [[nodiscard]] auto lookahead_token_match
 
     static_cast(CPP2_UFCS(next)(ctx));// Skip escape
 
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(cpp2::move(name)) + "::match"));
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2056 "regex.h2"
+#line 1990 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
 
@@ -3663,19 +3518,19 @@ template [[nodiscard]] auto lookahead_token_match
     if (!(string_to_int(cpp2::move(number_str), number, 8))) {return CPP2_UFCS(error)(ctx, "Could not convert octal to int."); }
 
     // TODO: Change for unicode.
-    char number_as_char {unsafe_narrow(cpp2::move(number))};
+    char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-    std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::impl::as_(number_as_char), 8)) + "}"};
-    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char))};
+    std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::impl::as_(number_as_char), 8)) + "}"}; 
+    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive))}; 
     CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), cpp2::move(syntax));
     return r; 
 }
 
-#line 2090 "regex.h2"
+#line 2024 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2092 "regex.h2"
+#line 2026 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3703,7 +3558,7 @@ template [[nodiscard]] auto lookahead_token_match
             }
             else {
                 std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; 
-                std::string inner_last {trim_copy(CPP2_UFCS(substr)(cpp2::move(inner), cpp2::move(sep) + 1))};
+                std::string inner_last {trim_copy(CPP2_UFCS(substr)(cpp2::move(inner), cpp2::move(sep) + 1))}; 
 
                 if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) {
                     return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); 
@@ -3719,20 +3574,20 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2136 "regex.h2"
+#line 2070 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
-                    return CPP2_UFCS(error)(ctx, ("Min value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + ")"));
+                    return CPP2_UFCS(error)(ctx, ("Min value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + ")")); 
                 }
             }
             if (-1 != (*cpp2::impl::assert_not_null(r)).max_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).max_count)))) {
-                    return CPP2_UFCS(error)(ctx, ("Max value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count) + ")"));
+                    return CPP2_UFCS(error)(ctx, ("Max value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count) + ")")); 
                 }
                 if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                     if (!((cpp2::impl::cmp_less_eq((*cpp2::impl::assert_not_null(r)).min_count,(*cpp2::impl::assert_not_null(r)).max_count)))) {
-                        return CPP2_UFCS(error)(ctx, ("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count)));
+                        return CPP2_UFCS(error)(ctx, ("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count))); 
                     }
                 }
             }
@@ -3746,7 +3601,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2162 "regex.h2"
+#line 2096 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3758,7 +3613,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2173 "regex.h2"
+#line 2107 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3771,7 +3626,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2185 "regex.h2"
+#line 2119 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3796,63 +3651,63 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2209 "regex.h2"
+#line 2143 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         std::set groups {}; 
         CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner_token)), groups);
-        auto reset_name {CPP2_UFCS(generate_reset)(ctx, cpp2::move(groups))};
+        auto reset_name {CPP2_UFCS(generate_reset)(ctx, cpp2::move(groups))}; 
 
         auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2219 "regex.h2"
+#line 2153 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner_token)), groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2227 "regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
+#line 2161 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
-            return match_possessive(cur, ctx, modifiers, inner, end_func, tail); 
+            return match_possessive(cur, ctx, inner, end_func, tail); 
         }
         else {if (range_flags::greedy == kind) {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, inner, reset_func, end_func, tail); 
+            return match_greedy(0, cur, ctx.end, ctx, inner, reset_func, end_func, tail); 
         }
         else { // range_flags::not_greedy == kind
-            return match_not_greedy(cur, ctx, modifiers, inner, end_func, tail); 
+            return match_not_greedy(cur, ctx, inner, end_func, tail); 
         }}
     }
 
-#line 2239 "regex.h2"
+#line 2173 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2244 "regex.h2"
+#line 2178 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2249 "regex.h2"
+#line 2183 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2255 "regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+#line 2189 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
 
         while( is_below_lower_bound(count) && res.matched ) {
-            res = inner(res.pos, ctx, modifiers, end_func);
+            res = inner(res.pos, ctx, end_func);
             if (res.matched) {
                 count += 1;
             }
@@ -3862,28 +3717,28 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2270 "regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& modifiers, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
-        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (modifiers), _3 = (inner), _4 = (reset_func), _5 = (end_func), _6 = (other)](auto const& tail_cur, auto& tail_ctx, [[maybe_unused]] auto const& unnamed_param_3) -> auto{/* ignore new modifiers */
-            return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5, _6); 
+#line 2204 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
+        auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
+            return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
         }}; 
         auto is_m_valid {true}; 
         auto r {CPP2_UFCS(fail)(ctx)}; 
         if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = inner(cur, ctx, modifiers, cpp2::move(inner_call));
+            r = inner(cur, ctx, cpp2::move(inner_call));
         }
 
         if (!(r.matched) && is_in_range(count)) {
             // The recursion did not yield a match try now the tail
-            r = other(cur, ctx, modifiers, end_func);
+            r = other(cur, ctx, end_func);
 
             if (r.matched && !(cpp2::move(is_m_valid))) {
                 // We have a match rematch M if required
                 reset_func(ctx);
 
                 if (cpp2::impl::cmp_greater(count,0)) {
-                    static_cast(inner(last_valid, ctx, modifiers, end_func));
+                    static_cast(inner(last_valid, ctx, true_end_func()));
                 }
             }
         }
@@ -3891,10 +3746,10 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2298 "regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
+#line 2232 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
-        auto r {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
+        auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
 
         if (!(r.matched)) {
           return r; 
@@ -3902,7 +3757,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         auto pos {r.pos}; 
         while( r.matched && is_below_upper_bound(count) ) {
-            r = inner(pos, ctx, modifiers, true_end_func());
+            r = inner(pos, ctx, true_end_func());
 
             if (pos == r.pos) {
                 break; // Break infinite loop.
@@ -3913,25 +3768,25 @@ template [[nodiscard]] auto lookahead_token_match
             }
         }
 
-        return other(cpp2::move(pos), ctx, modifiers, end_func);
+        return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2322 "regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& modifiers, auto const& inner, auto const& end_func, auto const& other) -> match_return{
+#line 2256 "regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
-        auto start {match_min_count(cur, ctx, modifiers, inner, end_func, count)}; 
+        auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
         if (!(start.matched)) {
           return start; 
         }
 
-        auto pos {cpp2::move(start).pos};
+        auto pos {cpp2::move(start).pos}; 
         while( is_below_upper_bound(count) ) {
-            auto o {other(pos, ctx, modifiers, end_func)}; 
+            auto o {other(pos, ctx, end_func)}; 
             if (o.matched) {
                 return o; 
             }
 
-            auto r {inner(pos, ctx, modifiers, end_func)}; 
+            auto r {inner(pos, ctx, end_func)}; 
             if (!(r.matched)) {
                 return CPP2_UFCS(fail)(ctx); 
             }
@@ -3939,10 +3794,10 @@ template [[nodiscard]] auto lookahead_token_match
             pos = cpp2::move(r).pos;
         }
 
-        return other(cpp2::move(pos), ctx, modifiers, end_func); // Upper bound reached.
+        return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2353 "regex.h2"
+#line 2287 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3965,7 +3820,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2376 "regex.h2"
+#line 2310 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::impl::assert_not_null(r)), ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3975,7 +3830,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2388 "regex.h2"
+#line 2322 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3992,9 +3847,8 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2404 "regex.h2"
-template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx, auto const& modifiers) -> bool{
-    static_cast(modifiers);
+#line 2338 "regex.h2"
+template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
     if (cur == ctx.begin) {// String start
@@ -4018,111 +3872,31 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2441 "regex.h2"
-    template  template [[nodiscard]] auto branch_reset_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 2442 "regex.h2"
-    template  auto branch_reset_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2443 "regex.h2"
-    template  [[nodiscard]] auto branch_reset_matcher_logic::to_string() -> auto { return bstring("(?|"); }
-
-#line 2450 "regex.h2"
-    template  template [[nodiscard]] auto char_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
-            if (cur != ctx.end && (*cpp2::impl::assert_not_null(cur) == L || *cpp2::impl::assert_not_null(cur) == U)) {
-                return Other::match(cur + 1, ctx, modifiers, end_func); 
-            }
-            else {
-                return CPP2_UFCS(fail)(ctx); 
-            }
-        }
-        else {
-            if (cur != ctx.end && *cpp2::impl::assert_not_null(cur) == C) {
-                return Other::match(cur + 1, ctx, modifiers, end_func); 
-            }
-            else {
-                return CPP2_UFCS(fail)(ctx); 
-            }
-        }
-
-    }
-#line 2469 "regex.h2"
-    template  auto char_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 2470 "regex.h2"
-    template  [[nodiscard]] auto char_matcher_logic::to_string() -> auto { return bstring(1, C); }
-
-#line 2478 "regex.h2"
-    template  template [[nodiscard]] auto class_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        if (CPP2_UFCS(has_flag)(modifiers, expression_flags::case_insensitive)) {
-            if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
-                return Other::match(cur + 1, ctx, modifiers, end_func); 
-            }
-            else {
-                return CPP2_UFCS(fail)(ctx); 
-            }
-        }
-        else {
-            if (cur != ctx.end && negate != match_any(*cpp2::impl::assert_not_null(cur))) {
-                return Other::match(cur + 1, ctx, modifiers, end_func); 
-            }
-            else {
-                return CPP2_UFCS(fail)(ctx); 
-            }
-        }
-    }
-
-#line 2497 "regex.h2"
-    template  template [[nodiscard]] auto class_matcher_logic::match_any(cpp2::impl::in c) -> bool{
-        bool r {First::includes(c)}; 
-
-        if (!(r)) {
-            if constexpr (0 != sizeof...(Other)) {
-                r = match_any(c);
-            }
-        }
-
-        return r; 
-    }
-
-#line 2509 "regex.h2"
-    template  auto class_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-
-#line 2511 "regex.h2"
-    template  [[nodiscard]] auto class_matcher_logic::to_string() -> bstring{
-        bstring r {"["}; 
-        if (negate) {
-            r += "^";
-        }
-        r += (bstring() + ... + List::to_string());
-        r += "]";
-
-        return r; 
-    }
-
-#line 2542 "regex.h2"
+#line 2380 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2545 "regex.h2"
+#line 2383 "regex.h2"
         }
 
-#line 2547 "regex.h2"
+#line 2385 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2548 "regex.h2"
+#line 2386 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2549 "regex.h2"
+#line 2387 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2550 "regex.h2"
+#line 2388 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
 
-#line 2552 "regex.h2"
+#line 2390 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2553 "regex.h2"
+#line 2391 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2554 "regex.h2"
+#line 2392 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2556 "regex.h2"
+#line 2394 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {Matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -4131,34 +3905,34 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2565 "regex.h2"
+#line 2403 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2566 "regex.h2"
+#line 2404 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2567 "regex.h2"
+#line 2405 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2568 "regex.h2"
+#line 2406 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
-        auto r {Matcher::entry(start, ctx, modifiers())}; 
-        return search_return(r.matched && r.pos == end, cpp2::move(ctx));
+        auto r {Matcher::entry(start, ctx)}; 
+        return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
     }
 
-#line 2575 "regex.h2"
+#line 2413 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2576 "regex.h2"
+#line 2414 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2577 "regex.h2"
+#line 2415 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2578 "regex.h2"
+#line 2416 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
 
         auto cur {start}; 
         for( ; true; (++cur) ) {
-            if (Matcher::entry(cur, ctx, modifiers()).matched) {
+            if (Matcher::entry(cur, ctx).matched) {
                 matched = true;
                 break;
             }
@@ -4168,13 +3942,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             }
         }
 
-        return search_return(cpp2::move(matched), cpp2::move(ctx));
+        return search_return(cpp2::move(matched), cpp2::move(ctx)); 
     }
 
-#line 2597 "regex.h2"
+#line 2435 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
 
-#line 2602 "regex.h2"
+#line 2440 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
@@ -4184,84 +3958,43 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2632 "regex.h2"
+#line 2470 "regex.h2"
     template  regex_parser::regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2636 "regex.h2"
+#line 2474 "regex.h2"
     }
 
-#line 2640 "regex.h2"
+#line 2478 "regex.h2"
     template  auto regex_parser::error(cpp2::impl::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2647 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parser_expression_modifiers(cpp2::impl::out mods) & -> std::string{
-        std::string r {"0"}; 
-        std::string sep {" | "}; 
-
-        auto add {[&, _1 = cpp2::move(sep)](auto const& name, auto& r) mutable -> void{
-            r += (cpp2::to_string(_1) + cpp2::to_string(name));
-        }}; 
-
-        mods.construct();
-
-        auto mod_pos {0}; 
-        for( ; cpp2::impl::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)); mod_pos += 1 ) {
-            char c {CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)}; 
-
-            if (     c == 'i') { add("::cpp2::regex::expression_flags::case_insensitive", r); }
-            else {if (c == 'm') {add("::cpp2::regex::expression_flags::multiple_lines", r); }
-            else {if (c == 's') {add("::cpp2::regex::expression_flags::single_line", r); }
-            else {if (c == 'n') {
-                add("::cpp2::regex::expression_flags::no_group_captures", r);
-                mods.value().group_captures_have_numbers = false;
-            }
-            else {if (c == 'x') {
-                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
-                mods.value().perl_code_syntax = true;
-
-                // Check if we have 'xx'
-                mod_pos += 1;
-                if (cpp2::impl::cmp_less(mod_pos,CPP2_UFCS(ssize)(modifier)) && 'x' == CPP2_ASSERT_IN_BOUNDS(modifier, mod_pos)) {
-                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
-                    mods.value().perl_code_syntax_in_classes = true;
-                }
-            }
-            else {error(("Unknown modifier: '" + cpp2::to_string(cpp2::move(c)) + "'")); }}}}}
-        }
-
-        return r; 
-    }
-
-#line 2688 "regex.h2"
+#line 2486 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
-        cpp2::impl::deferred_init modifiers;
-        auto mod {parser_expression_modifiers(cpp2::impl::out(&modifiers))};
-        parse_context parse_ctx {regex, cpp2::move(modifiers.value())};
-        if (!(CPP2_UFCS(parse)(parse_ctx))) {
+        parse_context parse_ctx {regex}; 
+        std::string mod {modifier}; 
+        if (!(CPP2_UFCS(parse)(parse_ctx, cpp2::move(mod)))) {
             error(parse_ctx.error_text);
             return "Error"; 
         }
 
         source += "{\n";
         source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
-        source += ("  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
 
         generation_context gen_ctx {}; 
         source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(parse_ctx));
-        source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
+        source += "  entry: (cur, inout ctx) -> _ = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
-        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(gen_ctx)) + "(cur, ctx, modifiers, cpp2::regex::true_end_func());\n");
+        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(gen_ctx)) + "(cur, ctx, cpp2::regex::true_end_func());\n");
         source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
-        auto string {CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_tokens)(parse_ctx))))};
+        auto string {CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_tokens)(parse_ctx))))}; 
         source += ("  to_string: () -> std::string = { return \"" + cpp2::to_string(cpp2::move(string)) + "\"; }\n");
         source += CPP2_UFCS(create_named_group_lookup)(cpp2::move(gen_ctx), parse_ctx.named_groups);
         source += "}\n";
@@ -4271,7 +4004,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2721 "regex.h2"
+#line 2517 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/reflect.h b/source/reflect.h
index dc263856f9..0e285dfe95 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -134,7 +134,7 @@ using parse_statement_ret = std::unique_ptr;
     //
     public: auto require(
 
-        cpp2::impl::in b,
+        cpp2::impl::in b, 
         cpp2::impl::in msg
     ) const& -> void;
 
@@ -872,7 +872,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         //
 
 #line 102 "reflect.h2"
-        if ( cpp2::impl::cmp_greater(CPP2_UFCS(ssize)(source),1)
+        if ( cpp2::impl::cmp_greater(CPP2_UFCS(ssize)(source),1) 
             && newline_pos != source.npos) 
         {
             while( newline_pos != std::string_view::npos ) 
@@ -901,7 +901,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
         //  Now parse this single declaration from
         //  the lexed tokens
         ret.construct(CPP2_UFCS(parse_one_declaration)(parser, 
-                (*cpp2::impl::assert_not_null(CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*cpp2::impl::assert_not_null(cpp2::move(tokens)))))).second,
+                (*cpp2::impl::assert_not_null(CPP2_UFCS(begin)(CPP2_UFCS(get_map)(*cpp2::impl::assert_not_null(cpp2::move(tokens)))))).second, 
                 *cpp2::impl::assert_not_null(generated_tokens)
               ));
         if (!(ret.value())) {
@@ -919,7 +919,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
 #line 146 "reflect.h2"
     auto compiler_services::require(
 
-        cpp2::impl::in b,
+        cpp2::impl::in b, 
         cpp2::impl::in msg
     ) const& -> void
     {
@@ -931,7 +931,7 @@ auto newline_pos{CPP2_UFCS(find)(source, '\n')};
 #line 157 "reflect.h2"
     auto compiler_services::error(cpp2::impl::in msg) const& -> void
     {
-        auto message {cpp2::impl::as_(msg)};
+        auto message {cpp2::impl::as_(msg)}; 
         if (!(CPP2_UFCS(empty)(metafunction_name))) {
             message = { "while applying @" + cpp2::to_string(metafunction_name) + " - " + cpp2::to_string(message) };
         }
@@ -1098,7 +1098,7 @@ declaration_base::declaration_base(declaration_base const& that)
     {
         if (cpp2::type_safety.is_active() && !(parent_is_type()) ) { cpp2::type_safety.report_violation(""); }
 #line 323 "reflect.h2"
-        auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::impl::assert_not_null(n)))};
+        auto test {CPP2_UFCS(type_member_mark_for_removal)((*cpp2::impl::assert_not_null(n)))}; 
         if (cpp2::cpp2_default.is_active() && !(cpp2::move(test)) ) { cpp2::cpp2_default.report_violation(""); }// ... to ensure this assert is true
     }
 
@@ -1133,7 +1133,7 @@ declaration::declaration(declaration const& that)
     [[nodiscard]] auto function_declaration::first_parameter_name() const& -> std::string { return CPP2_UFCS(first_parameter_name)((*cpp2::impl::assert_not_null(n))); }
 
 #line 353 "reflect.h2"
-    [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::impl::in s, cpp2::impl::in pass) const& -> bool {
+    [[nodiscard]] auto function_declaration::has_parameter_with_name_and_pass(cpp2::impl::in s, cpp2::impl::in pass) const& -> bool { 
                                                   return CPP2_UFCS(has_parameter_with_name_and_pass)((*cpp2::impl::assert_not_null(n)), s, pass);  }
 #line 355 "reflect.h2"
     [[nodiscard]] auto function_declaration::is_function_with_this() const& -> bool { return CPP2_UFCS(is_function_with_this)((*cpp2::impl::assert_not_null(n))); }
@@ -1219,7 +1219,7 @@ declaration::declaration(declaration const& that)
             error("cannot add an initializer that is not a valid statement");
             return ; 
         }
-        require(CPP2_UFCS(add_function_initializer)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(stmt))),
+        require(CPP2_UFCS(add_function_initializer)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(stmt))), 
                  std::string("unexpected error while attempting to add initializer"));
     }
 
@@ -1246,7 +1246,7 @@ declaration::declaration(declaration const& that)
 
 #line 436 "reflect.h2"
     [[nodiscard]] auto object_declaration::type() const& -> std::string{
-        auto ret {CPP2_UFCS(object_type)((*cpp2::impl::assert_not_null(n)))};
+        auto ret {CPP2_UFCS(object_type)((*cpp2::impl::assert_not_null(n)))}; 
         require(!(contains(ret, "(*ERROR*)")), 
                  "cannot to_string this type: " + ret);
         return ret; 
@@ -1254,7 +1254,7 @@ declaration::declaration(declaration const& that)
 
 #line 443 "reflect.h2"
     [[nodiscard]] auto object_declaration::initializer() const& -> std::string{
-        auto ret {CPP2_UFCS(object_initializer)((*cpp2::impl::assert_not_null(n)))};
+        auto ret {CPP2_UFCS(object_initializer)((*cpp2::impl::assert_not_null(n)))}; 
         require(!(contains(ret, "(*ERROR*)")), 
                  "cannot to_string this initializer: " + ret);
         return ret; 
@@ -1314,10 +1314,10 @@ declaration::declaration(declaration const& that)
     {
         std::vector ret {}; 
         for ( 
-             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::functions) )
-        if ( !(CPP2_UFCS(has_initializer)((*cpp2::impl::assert_not_null(d))))
-            && !(CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(d))))
-            && !(CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(d)))))
+             auto const& d : CPP2_UFCS(get_type_scope_declarations)((*cpp2::impl::assert_not_null(n)), declaration_node::functions) ) 
+        if ( !(CPP2_UFCS(has_initializer)((*cpp2::impl::assert_not_null(d)))) 
+            && !(CPP2_UFCS(is_virtual_function)((*cpp2::impl::assert_not_null(d)))) 
+            && !(CPP2_UFCS(is_defaultable_function)((*cpp2::impl::assert_not_null(d))))) 
         {
             static_cast(CPP2_UFCS(emplace_back)(ret, d, (*this)));
         }
@@ -1378,7 +1378,7 @@ declaration::declaration(declaration const& that)
             cpp2::impl::deferred_init inout_this_in_that;
             cpp2::impl::deferred_init inout_this_move_that;
 #line 559 "reflect.h2"
-        auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::impl::assert_not_null(n)))};
+        auto declared {CPP2_UFCS(find_declared_value_set_functions)((*cpp2::impl::assert_not_null(n)))}; 
         out_this_in_that.construct(declared.out_this_in_that != nullptr);
         out_this_move_that.construct(declared.out_this_move_that != nullptr);
         inout_this_in_that.construct(declared.inout_this_in_that != nullptr);
@@ -1396,7 +1396,7 @@ declaration::declaration(declaration const& that)
         if (!(CPP2_UFCS(is_declaration)((*cpp2::impl::assert_not_null(decl))))) {
             error("cannot add a member that is not a declaration");
         }
-        require(CPP2_UFCS(add_type_member)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(decl))),
+        require(CPP2_UFCS(add_type_member)((*cpp2::impl::assert_not_null(n)), std::move(cpp2::move(decl))), 
                  std::string("unexpected error while attempting to add member:\n") + source);
     }
 
@@ -1614,7 +1614,7 @@ auto cpp2_struct(meta::type_declaration& t) -> void
             auto mf {CPP2_UFCS(as_function)(m)}; 
             CPP2_UFCS(require)(t, !(CPP2_UFCS(is_virtual)(mf)), 
                        "a struct may not have a virtual function");
-            CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(cpp2::move(mf), "operator=")),
+            CPP2_UFCS(require)(t, !(CPP2_UFCS(has_name)(cpp2::move(mf), "operator=")), 
                        "a struct may not have a user-defined operator=");
         }
     }
@@ -1631,7 +1631,7 @@ auto basic_enum(
     std::vector enumerators {}; 
     cpp2::i64 min_value {}; 
     cpp2::i64 max_value {}; 
-    cpp2::impl::deferred_init underlying_type;
+    cpp2::impl::deferred_init underlying_type; 
 
     CPP2_UFCS(reserve_names)(t, "operator=", "operator<=>");
     if (bitwise) {
@@ -1663,7 +1663,7 @@ std::string value{"-1"};
 
         auto is_default_or_numeric {is_empty_or_a_decimal_number(init)}; 
         found_non_numeric |= !(CPP2_UFCS(empty)(init)) && !(is_default_or_numeric);
-        CPP2_UFCS(require)(m, !(cpp2::move(is_default_or_numeric)) || !(found_non_numeric) || CPP2_UFCS(has_name)(mo, "none"),
+        CPP2_UFCS(require)(m, !(cpp2::move(is_default_or_numeric)) || !(found_non_numeric) || CPP2_UFCS(has_name)(mo, "none"), 
             (cpp2::to_string(CPP2_UFCS(name)(mo)) + ": enumerators with non-numeric values must come after all default and numeric values"));
 
         nextval(value, cpp2::move(init));
@@ -1677,7 +1677,7 @@ std::string value{"-1"};
         }
 
         //  Adding local variable 'e' to work around a Clang warning
-        value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), "", value};
+        value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), "", value}; 
         CPP2_UFCS(push_back)(enumerators, cpp2::move(e));
 
         CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo);
@@ -1694,7 +1694,7 @@ std::string value{"-1"};
     //  Compute the default underlying type, if it wasn't explicitly specified
     if (underlying_type.value() == "") 
     {
-        CPP2_UFCS(require)(t, !(cpp2::move(found_non_numeric)),
+        CPP2_UFCS(require)(t, !(cpp2::move(found_non_numeric)), 
             "if you write an enumerator with a non-numeric-literal value, you must specify the enumeration's underlying type");
 
         if (!(bitwise)) {
@@ -1715,7 +1715,7 @@ std::string value{"-1"};
             }}}}
         }
         else {
-            auto umax {cpp2::move(max_value) * cpp2::impl::as_()};
+            auto umax {cpp2::move(max_value) * cpp2::impl::as_()}; 
             if (cpp2::impl::cmp_less_eq(umax,std::numeric_limits::max())) {
                 underlying_type.value() = "u8";
             }
@@ -1880,7 +1880,7 @@ auto value{0};
                     "a union alternative cannot have an initializer");
 
         //  Adding local variable 'e' to work around a Clang warning
-        value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), CPP2_UFCS(type)(mo), cpp2::impl::as_(value)};
+        value_member_info e {cpp2::impl::as_(CPP2_UFCS(name)(mo)), CPP2_UFCS(type)(mo), cpp2::impl::as_(value)}; 
         CPP2_UFCS(push_back)(alternatives, cpp2::move(e));
 
         CPP2_UFCS(mark_for_removal_from_enclosing_type)(mo);
@@ -2093,12 +2093,12 @@ auto regex_gen(meta::type_declaration& t) -> void
     {
         //  Convert the name and any template arguments to strings
         //  and record that in rtype
-        auto name {CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(meta)))};
+        auto name {CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(meta)))}; 
         name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(find)(name, '<'));
 
         std::vector args {}; 
         for ( 
-             auto const& arg : CPP2_UFCS(template_arguments)((*cpp2::impl::assert_not_null(meta))) )
+             auto const& arg : CPP2_UFCS(template_arguments)((*cpp2::impl::assert_not_null(meta))) ) 
             CPP2_UFCS(push_back)(args, CPP2_UFCS(to_string)(arg));
 
         CPP2_UFCS(set_metafunction_name)(rtype, name, args);
diff --git a/source/regex.h2 b/source/regex.h2
index a551040342..3675126fa8 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -29,13 +29,13 @@ bstring:  type == std::basic_string;
 //-----------------------------------------------------------------------
 //
 
-expression_flags: type = {
-    case_insensitive : int            ==  1;  // mod: i
-    multiple_lines: int               ==  2;  // mod: m
-    single_line: int                  ==  4;  // mod: s
-    no_group_captures: int            ==  8;  // mod: n
-    perl_code_syntax: int             == 16;  // mod: x
-    perl_code_syntax_in_classes: int  == 32;  // mod: xx
+expression_flags: @flag_enum type = {
+    case_insensitive;             // mod: i
+    multiple_lines;               // mod: m
+    single_line;                  // mod: s
+    no_group_captures;            // mod: n
+    perl_code_syntax;             // mod: x
+    perl_code_syntax_in_classes;  // mod: xx
 }
 
 // TODO: @enum as template parameter yields two error:
@@ -141,53 +141,6 @@ match_context:  type =
 
 }
 
-// Flag change for matching modifiers. Creates a new flag for match_modifiers.
-// See expression_flags for possible flags.
-//
-match_modifiers_state_change:  type = {
-
-    reset: bool == reset_;
-    add: int == add_;
-    remove: int == remove_;
-    has_change: bool == has_change_;
-
-    combine_inner: (old_flags: int) -> _ == {
-        new_flags := old_flags;
-        if reset {
-            new_flags = 0;
-        }
-        new_flags = new_flags | add;
-        new_flags = new_flags & (remove~);
-
-        return new_flags;
-    }
-
-    to_string: () str.data();
-}
-
-match_modifiers_no_change : type == match_modifiers_state_change;
-
-// Current modifiers for the regular expression.
-// See expression_flags for possible flags.
-//
-match_modifiers: @struct  type = {
-
-    flags : int == flags_;
-
-    // Push/pop management
-
-    push:    (_ : Change) match_modifiers>();
-    pop:             ()           Inner();
-    replace: (_ : Change) match_modifiers();
-
-    // Flag management
-    //
-
-    has_flag: (this, f: int) -> bool = {
-        return  0 != (f & flags);
-    }
-}
-
 //  Represents the remainder of the regular expression.
 //
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
@@ -211,7 +164,7 @@ matcher_list:  type = {
 
 no_tail:  type == matcher_list;
 true_end_func: @struct type = {
-    operator(): (in this, cur, inout ctx, _) ctx.pass(cur);
+    operator(): (in this, cur, inout ctx) ctx.pass(cur);
 }
 
 //-----------------------------------------------------------------------
@@ -397,14 +350,6 @@ regex_token: @polymorphic_base type = {
 token_ptr : type == std::shared_ptr;
 token_vec: type == std::vector;
 
-// State of the expression modifiers.
-//
-parse_context_modifier_state: @struct type = {
-    group_captures_have_numbers : bool = true;
-    perl_code_syntax:             bool = false;
-    perl_code_syntax_in_classes:  bool = false;
-}
-
 // State of the current group. See '()'
 parse_context_group_state: @struct type = {
 
@@ -414,7 +359,7 @@ parse_context_group_state: @struct type = {
     // List of alternate matcher lists. E.g. ab|cd|xy
     alternate_match_lists: token_vec = ();
 
-    modifiers : parse_context_modifier_state = ();
+    modifiers : expression_flags = ();
 
     next_alternative: (inout this) = {
         new_list: token_vec = ();
@@ -488,10 +433,12 @@ parse_context: type = {
     cur_group_state:        parse_context_group_state = ();
     cur_branch_reset_state: parse_context_branch_reset_state = ();
 
+    root: token_ptr;
 
-    operator=:(out this, r: std::string_view, modifiers: parse_context_modifier_state) = {
+
+    operator=:(out this, r: std::string_view) = {
         regex = r;
-        set_modifiers(modifiers);
+        root = shared.new("");
     }
 
     // State management functions
@@ -510,11 +457,11 @@ parse_context: type = {
         return inner;
     }
 
-    get_modifiers: (this) -> parse_context_modifier_state = {
+    get_modifiers: (this) -> expression_flags = {
         return cur_group_state.modifiers;
     }
 
-    set_modifiers: (inout this, mod: parse_context_modifier_state) = {
+    set_modifiers: (inout this, mod: expression_flags) = {
         cur_group_state.modifiers = mod;
     }
 
@@ -566,7 +513,7 @@ parse_context: type = {
     }
 
     get_tokens: (inout this) -> token_ptr = {
-        return cur_group_state.get_tokens();
+        return root;
     }
 
     // Group management
@@ -646,10 +593,10 @@ parse_context: type = {
         perl_syntax := false;
         if !no_skip {
             if in_class {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax && cur_group_state.modifiers.perl_code_syntax_in_classes;
+                perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax) && get_modifiers().has(expression_flags::perl_code_syntax_in_classes);
             }
             else {
-                perl_syntax = cur_group_state.modifiers.perl_code_syntax;
+                perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax);
             }
         }
         cur := pos + 1;
@@ -751,20 +698,19 @@ parse_context: type = {
     peek: (in this)          peek_impl(false);
     peek_in_class: (in this) peek_impl(true);
 
-    parser_group_modifiers: (inout this, change_str: std::string, out modifier_change: std::string,
-                      inout parser_modifiers: parse_context_modifier_state) -> bool = {
+    parser_group_modifiers: (inout this, change_str: std::string, inout parser_modifiers: expression_flags) -> bool = {
         is_negative := false;
         is_reset    := false;
 
         add    := 0;
         remove := 0;
 
-        apply := :(flag: int) = {
+        apply := :(flag: expression_flags) = {
             if is_negative&$* {
-                remove&$* |= flag;
+                parser_modifiers&$*.clear(flag);
             }
             else {
-                add&$* |= flag;
+                parser_modifiers&$*.set(flag);
             }
         };
 
@@ -773,6 +719,7 @@ parse_context: type = {
             cur := iter*;
             if cur == '^' {
                 is_reset = true;
+                parser_modifiers = expression_flags::none;
             }
             else if cur == '-' {
                 if is_reset { _= error("No negative modifier allowed."); return false; }
@@ -781,27 +728,19 @@ parse_context: type = {
             else if cur == 'i' { apply(expression_flags::case_insensitive); }
             else if cur == 'm' { apply(expression_flags::multiple_lines); }
             else if cur == 's' { apply(expression_flags::single_line); }
-            else if cur == 'n' {
-                apply(expression_flags::no_group_captures);
-                parser_modifiers.group_captures_have_numbers = is_negative;
-            }
+            else if cur == 'n' { apply(expression_flags::no_group_captures); }
             else if cur == 'x' {
                 if (iter + 1) == change_str.end() || (iter + 1)* != 'x' {
                     // x modifier
                     apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !is_negative;
 
                     // Just x unsets xx and remove x also removes xx
-                    remove |= expression_flags::perl_code_syntax_in_classes;
-                    parser_modifiers.perl_code_syntax_in_classes = false;
+                    parser_modifiers.clear(expression_flags::perl_code_syntax_in_classes);
                 }
                 else { // xx modifier
                     // xx also sets or unsets x
                     apply(expression_flags::perl_code_syntax);
-                    parser_modifiers.perl_code_syntax = !is_negative;
-
                     apply(expression_flags::perl_code_syntax_in_classes);
-                    parser_modifiers.perl_code_syntax_in_classes = !is_negative;
 
                     iter++; // Skip the second x
                 }
@@ -811,8 +750,6 @@ parse_context: type = {
             }
         }
 
-        modifier_change = "::cpp2::regex::match_modifiers_state_change";
-
         return true;
     }
 
@@ -853,7 +790,19 @@ parse_context: type = {
         return true;
     }
 
-    parse: (inout this) parse_until('\0');
+    parse: (inout this, modifiers: std::string) -> bool = {
+
+        flags : expression_flags = ();
+        if !parser_group_modifiers(modifiers, flags) { return false; }
+        set_modifiers(flags);
+
+        r := parse_until('\0');
+        if r {
+            root = cur_group_state.get_tokens();
+        }
+
+        return r;
+    }
 
 
 }
@@ -884,7 +833,7 @@ generation_context: type = {
     temp_name:    int         = 0;
     entry_func:   std::string = "";
 
-    match_parameters: (this) -> std::string = { return "r.pos, ctx, modifiers"; }
+    match_parameters: (this) -> std::string = { return "r.pos, ctx"; }
 
     add: (inout this, s: std::string) = {
         cur := get_current();
@@ -955,7 +904,7 @@ generation_context: type = {
         cur := new_context();
 
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
-        cur*.code += "(cur*.tabs)$  operator(): (this, cur, inout ctx, modifiers, other) -> _ = {\n";
+        cur*.code += "(cur*.tabs)$  operator(): (this, cur, inout ctx, other) -> _ = {\n";
         cur*.code += "(cur*.tabs)$    r := ctx.pass(cur);\n";
         cur*.add_tabs(2);
     }
@@ -979,7 +928,7 @@ generation_context: type = {
     }
 
     end_func: (inout this) = {
-        end_func_statefull("other(r.pos, ctx, modifiers)");
+        end_func_statefull("other(r.pos, ctx)");
     }
 
     get_entry_func: (this) -> std::string = {
@@ -1202,21 +1151,21 @@ alternative_token_gen: @polymorphic_base type = {
 
 alternative_token_matcher:  type = {
 
-    match: (cur, inout ctx, modifiers, end_func, tail, functions ...) -> _ = {
-        return match_first(cur, ctx, modifiers, end_func, tail, functions...);
+    match: (cur, inout ctx, end_func, tail, functions ...) -> _ = {
+        return match_first(cur, ctx, end_func, tail, functions...);
     }
-    private match_first:  (cur, inout ctx, modifiers, end_func, tail, cur_func, cur_reset, other ...: Other) -> _ = {
-        inner_call := :(tail_cur, inout tail_ctx, tail_modifiers) -> _ == {
-            return (tail)$(tail_cur, tail_ctx, tail_modifiers, (end_func)$);
+    private match_first:  (cur, inout ctx, end_func, tail, cur_func, cur_reset, other ...: Other) -> _ = {
+        inner_call := :(tail_cur, inout tail_ctx) -> _ == {
+            return (tail)$(tail_cur, tail_ctx, (end_func)$);
         };
-        r := cur_func(cur, ctx, modifiers, inner_call);
+        r := cur_func(cur, ctx, inner_call);
         if r.matched {
             return r;
         } else {
             cur_reset(ctx);
 
             if constexpr 0 != sizeof...(Other) {
-                return match_first(cur, ctx, modifiers, end_func, tail, other...);
+                return match_first(cur, ctx, end_func, tail, other...);
             } else {
                 return ctx.fail();
             }
@@ -1229,22 +1178,26 @@ alternative_token_matcher:  type = {
 any_token: @polymorphic_base type = {
     this: regex_token_base = (".");
 
-    operator=:(out this) = {} // TODO: Base class constructor is ignored.
+    single_line: bool;
+
+    operator=:(out this, single_line_: bool) = {
+        single_line = single_line_;
+    }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
         if '.' != ctx.current() { return nullptr;}
 
-        return shared.new();
+        return shared.new(ctx.get_modifiers().has(expression_flags::single_line));
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("any_token_matcher((ctx.match_parameters())$)");
+        ctx.add_check("any_token_matcher((ctx.match_parameters())$)");
     }
 }
 
-any_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
+any_token_matcher:  (inout cur, inout ctx) -> bool = {
     if cur != ctx.end // Any char except the end
-        && (modifiers.has_flag(expression_flags::single_line) || cur* != '\n') { // Do not match new lines in multi line mode.
+        && (single_line || cur* != '\n') { // Do not match new lines in multi line mode.
         cur += 1;
         return true;
     }
@@ -1257,41 +1210,53 @@ char_token: @polymorphic_base type = {
     this: regex_token_base;
 
     token: char;
+    ignore_case: bool;
 
-    operator=: (out this, t: char) = {
+    operator=: (out this, t: char, ignore_case_: bool) = {
         regex_token_base = (std::string(1, t));
         token = t;
+        ignore_case = ignore_case_;
     }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
-        return shared.new(ctx.current());
+        return shared.new(ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive));
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        upper: = safe_toupper(token);
-        lower: = safe_tolower(token);
-        ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
-    }
-}
+        if ignore_case {
+            upper: = safe_toupper(token);
+            lower: = safe_tolower(token);
 
-char_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
-    if modifiers.has_flag(expression_flags::case_insensitive) {
-        if cur != ctx.end && (cur* == L || cur* == U) {
-            cur += 1;
-            return true;
+            if upper != lower {
+                ctx.add_check("char_token_case_insensitive_matcher((ctx.match_parameters())$)");
+            }
+            else {
+                ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
+            }
         }
         else {
-            return false;
+            ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
         }
     }
+}
+
+char_token_matcher:  (inout cur, inout ctx) -> bool = {
+    if cur != ctx.end && cur* == C {
+        cur += 1;
+        return true;
+    }
     else {
-        if cur != ctx.end && cur* == C {
-            cur += 1;
-            return true;
-        }
-        else {
-            return false;
-        }
+        return false;
+    }
+}
+
+char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
+    if cur != ctx.end && (cur* == L || cur* == U) {
+        cur += 1;
+        return true;
+    }
+    else {
+        return false;
     }
 }
 
@@ -1301,11 +1266,13 @@ class_token: @polymorphic_base type = {
     this: regex_token_base = ();
 
     negate: bool;
+    case_insensitive: bool;
     class_str: std::string;
 
-    operator=: (out this, negate_: bool, class_str_: std::string, str: std::string) = {
+    operator=: (out this, negate_: bool, case_insensitive_: bool, class_str_: std::string, str: std::string) = {
         regex_token_base = str;
         negate = negate_;
+        case_insensitive = case_insensitive_;
         class_str = class_str_;
     }
 
@@ -1345,7 +1312,7 @@ class_token: @polymorphic_base type = {
             }
             else if ctx.current() == '\\' {
                 if ctx.next_no_skip()  && (ctx.current() != ']') {
-                    if  ' ' == ctx.current() && ctx.get_modifiers().perl_code_syntax && ctx.get_modifiers().perl_code_syntax_in_classes {
+                    if  ' ' == ctx.current() && ctx.get_modifiers().has(expression_flags::perl_code_syntax) && ctx.get_modifiers().has(expression_flags::perl_code_syntax_in_classes) {
                         classes.push_back(std::string(1, ctx.current())); // TODO: UFCS error with char as argument.
                     }
                     else {
@@ -1413,11 +1380,13 @@ class_token: @polymorphic_base type = {
         }
 
         inner := ctx.join(classes);
-        return shared.new(is_negate, inner, ctx.get_range(start_pos, end_pos));
+        string_rep := ctx.get_range(start_pos, end_pos);
+        string_rep = replace_all(string_rep, "\\", "\\\\");
+        return shared.new(is_negate, ctx.get_modifiers().has(expression_flags::case_insensitive), inner, string_rep);
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("class_token_matcher::match((ctx.match_parameters())$)");
+        ctx.add_check("class_token_matcher::match((ctx.match_parameters())$)");
     }
 
 
@@ -1429,10 +1398,10 @@ class_token: @polymorphic_base type = {
     }
 }
 
-class_token_matcher:  type =
+class_token_matcher:  type =
 {
-    match: (inout cur, inout ctx, modifiers) -> bool = {
-        if modifiers.has_flag(expression_flags::case_insensitive) {
+    match: (inout cur, inout ctx) -> bool = {
+        if constexpr case_insensitive {
             if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
                 cur += 1;
                 return true;
@@ -1492,7 +1461,7 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
         return shared.new(ctx.current());
     } else {
         // Escape of regex special char
-        r := shared.new(ctx.current());
+        r := shared.new(ctx.current(), false);
         r*.set_string("\\\\(ctx.current())$");
 
         return r;
@@ -1510,12 +1479,8 @@ escaped_char_token: @polymorphic_base type = {
         token = t;
     }
 
-    parse: (inout ctx: parse_context) -> token_ptr = {
-        return shared.new(ctx.current());
-    }
-
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
+        ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
     }
 }
 
@@ -1538,10 +1503,12 @@ group_ref_token: @polymorphic_base type = {
     this: regex_token_base = ();
 
     id: int;
+    case_insensitive: bool;
 
-    operator=:(out this, id_: int, str: std::string) = {
+    operator=:(out this, id_: int, case_insensitive_: bool, str: std::string) = {
         regex_token_base = str;
         id = id_;
+        case_insensitive = case_insensitive_;
     }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
@@ -1560,7 +1527,7 @@ group_ref_token: @polymorphic_base type = {
 
                 number_as_char : char = unsafe_narrow(number);
 
-                token := shared.new(number_as_char);
+                token := shared.new(number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive));
                 token*.set_string("\\(int_to_string(number_as_char as int, 8))$");
 
                 return token;
@@ -1633,20 +1600,20 @@ group_ref_token: @polymorphic_base type = {
             if -1 == group_id { return ctx.error("Group names does not exist. (Name is: (group)$)");}
         }
 
-        return shared.new(group_id, str);
+        return shared.new(group_id, ctx.get_modifiers().has(expression_flags::case_insensitive), str);
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("group_ref_token_matcher((ctx.match_parameters())$)");
+        ctx.add_check("group_ref_token_matcher((ctx.match_parameters())$)");
     }
 }
 
-group_ref_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
+group_ref_token_matcher:  (inout cur, inout ctx) -> bool = {
     g := ctx.get_group(group);
 
     group_pos := g.start;
     while group_pos != g.end && cur != ctx.end next (group_pos++, cur++) {
-        if modifiers.has_flag(expression_flags::case_insensitive) {
+        if constexpr case_insensitive {
             if safe_tolower(group_pos*) != safe_tolower(cur*) {
                 return false;
             }
@@ -1671,7 +1638,6 @@ group_token: @polymorphic_base type = {
 
     number: int      = -1;
     inner: token_ptr = nullptr;
-    mod: std::string = "::cpp2::regex::match_modifiers_no_change";
 
     parse_lookahead: (inout ctx: parse_context, syntax: std::string, positive: bool) -> token_ptr = {
         _ = ctx.next(); // Skip last token defining the syntax
@@ -1689,11 +1655,10 @@ group_token: @polymorphic_base type = {
     parse: (inout ctx: parse_context) -> token_ptr = {
         if ctx.current() != '(' { return nullptr; }
 
-        has_id :=  ctx.get_modifiers().group_captures_have_numbers;
+        has_id :=  !ctx.get_modifiers().has(expression_flags::no_group_captures);
         has_pattern := true;
         group_name : std::string = "";
         group_name_brackets := true;
-        modifier_change: std::string = "::cpp2::regex::match_modifiers_no_change";
         modifiers : std::string = "";
 
         modifiers_change_to : =  ctx.get_modifiers();
@@ -1720,10 +1685,21 @@ group_token: @polymorphic_base type = {
             else if ctx.current() == '#' {
                 // Comment
                 comment_str : std::string = "";
+                _ = ctx.next(); // Skip #
                 if !ctx.grab_until(")", out comment_str) { return ctx.error("Group without closing bracket."); }
                 // Do not add comment. Has problems with ranges.
 
-                return shared.new("(?#(comment_str)$)");
+                // Pop token and add a list. This fixes comments between a token and a range
+                if ctx.has_token() {
+                    list : token_vec = ();
+                    list.push_back(ctx.pop_token());
+                    list.push_back(shared.new("(?#(comment_str)$)"));
+
+                    return shared.new(list);
+                }
+                else {
+                    return shared.new("(?#(comment_str)$)");
+                }
             }
             else if ctx.current() == '|' {
                 // Branch reset group
@@ -1746,7 +1722,7 @@ group_token: @polymorphic_base type = {
                 // Simple modifier
                 has_id = false;
                 if !ctx.grab_until_one_of("):", out modifiers) { return ctx.error("Missing ending bracket for group."); }
-                if !ctx.parser_group_modifiers(modifiers, out modifier_change, modifiers_change_to) {
+                if !ctx.parser_group_modifiers(modifiers, modifiers_change_to) {
                      return nullptr;
                 }
 
@@ -1792,7 +1768,6 @@ group_token: @polymorphic_base type = {
             if !ctx.parse_until(')') { return nullptr; }
             r*.inner = ctx.end_group(old_state);
             r*.set_string(gen_string(group_name, group_name_brackets, modifiers, r*.inner));
-            r*.mod = modifier_change;
 
             return r;
         }
@@ -1800,7 +1775,7 @@ group_token: @polymorphic_base type = {
             // Only a modifier
             ctx.set_modifiers(modifiers_change_to);
 
-            return shared.new(modifier_change, modifiers);
+            return shared.new("(?(modifiers)$)");
         }
     }
 
@@ -1826,9 +1801,6 @@ group_token: @polymorphic_base type = {
             ctx.add("ctx.set_group_start((number)$, r.pos);");
         }
 
-        next_name := ctx.next_func_name();
-        ctx.add_statefull(next_name, "cpp2::regex::apply_modifiers_matcher::match((ctx.match_parameters())$, other, (next_name)$)");
-
         inner*.generate_code(ctx);
         if -1 != number {
             ctx.add("ctx.set_group_end((number)$, r.pos);");
@@ -1840,9 +1812,6 @@ group_token: @polymorphic_base type = {
             ctx.add("});");
             ctx.add("_ = (tmp_name)$;"); // TODO: Guard object problem.
         }
-
-        next_name = ctx.next_func_name();
-        ctx.add_statefull(next_name, "cpp2::regex::pop_modifiers_matcher::match((ctx.match_parameters())$, other, (next_name)$)");
     }
 
     add_groups: (override this, inout groups: std::set) = {
@@ -1889,52 +1858,17 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
     syntax = "\\\\x(syntax)$";
 
-    r := shared.new(number_as_char);
+    r := shared.new(number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive));
     r*.set_string(syntax);
     return r;
 }
 
-modifier_token: @polymorphic_base type = {
-    this: regex_token_base;
-
-    mod: std::string;
-
-    operator=: (out this, mod_: std::string, mod_str: std::string) = {
-        regex_token_base = ("(?(mod_str)$)");
-        mod = mod_;
-    }
-
-    generate_code: (override this, inout ctx: generation_context) = {
-        next_name := ctx.next_func_name();
-        ctx.add_statefull(next_name, "cpp2::regex::apply_modifiers_matcher::match((ctx.match_parameters())$, other, (next_name)$)");
-    }
-}
-
-apply_modifiers_matcher:  type = {
-
-    match:  (cur: Iter, inout ctx, _: Modifiers, end_func, tail) -> _ = {
-        if constexpr push {
-            return tail(cur, ctx, Modifiers::push(ModifierChange()), end_func);
-        }
-        else {
-            return tail(cur, ctx, Modifiers::replace(ModifierChange()), end_func);
-        }
-    }
-}
-
-pop_modifiers_matcher:  type = {
-
-    match:  (cur: Iter, inout ctx, _: Modifiers, end_func, tail) -> _ = {
-        return tail(cur, ctx, Modifiers::pop(), end_func);
-    }
-}
-
 // Regex syntax: $  Example: aa$
 //
 line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
     if ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$') {
         if (ctx.current() == '\\') { _ = ctx.next(); } // Skip escape
-        return shared.new("\\\\$", "line_end_token_matcher");
+        return shared.new("\\\\$", "line_end_token_matcher");
     }
     else if ctx.current() == '\\' && (ctx.peek() == 'z' || ctx.peek() == 'Z') {
         _ = ctx.next(); // Skip escape
@@ -1947,8 +1881,8 @@ line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
 }
 
-line_end_token_matcher:  (cur, inout ctx, modifiers) -> bool = {
-    if cur == ctx.end || (match_new_line && modifiers.has_flag(expression_flags::multiple_lines) && cur* == '\n') {
+line_end_token_matcher:  (cur, inout ctx) -> bool = {
+    if cur == ctx.end || (match_new_line && cur* == '\n') {
         return true;
     }
     else if match_new_line_before_end && (cur* == '\n' && (cur + 1) == ctx.end) { // Special case for new line at end.
@@ -1969,13 +1903,13 @@ line_start_token_parse: (inout ctx: parse_context) -> token_ptr = {
         return shared.new("\\\\A", "line_start_token_matcher");
     }
     else {
-        return shared.new("^", "line_start_token_matcher");
+        return shared.new("^", "line_start_token_matcher");
     }
 }
 
-line_start_token_matcher:  (cur, inout ctx, modifiers) -> bool = {
+line_start_token_matcher:  (cur, inout ctx) -> bool = {
     return cur == ctx.begin || // Start of string
-           (match_new_line && modifiers.has_flag(expression_flags::multiple_lines)  && (cur - 1)* == '\n'); // Start of new line
+           (match_new_line && (cur - 1)* == '\n'); // Start of new line
 }
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
@@ -2001,8 +1935,8 @@ lookahead_token: @polymorphic_base type = {
     }
 }
 
-lookahead_token_matcher:  (cur, inout ctx, modifiers, func) -> bool = {
-    r := func(cur, ctx, modifiers, true_end_func());
+lookahead_token_matcher:  (cur, inout ctx, func) -> bool = {
+    r := func(cur, ctx, true_end_func());
     if !positive {
         r.matched = !r.matched;
     }
@@ -2034,21 +1968,21 @@ named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
     _ = ctx.next(); // Skip escape
 
-    return shared.new("\\\\(ctx.current())$", "(name)$::match");
+    return shared.new("\\\\\\\\(ctx.current())$", "(name)$::match");
 }
 
-named_class_no_new_line:  type == class_token_matcher>;
-named_class_digits     :  type == class_token_matcher>;
-named_class_hor_space  :  type == class_token_matcher>;
-named_class_space      :  type == class_token_matcher>;
-named_class_ver_space  :  type == class_token_matcher>;
-named_class_word       :  type == class_token_matcher>;
+named_class_no_new_line:  type == class_token_matcher>;
+named_class_digits     :  type == class_token_matcher>;
+named_class_hor_space  :  type == class_token_matcher>;
+named_class_space      :  type == class_token_matcher>;
+named_class_ver_space  :  type == class_token_matcher>;
+named_class_word       :  type == class_token_matcher>;
 
-named_class_not_digits    :  type == class_token_matcher>;
-named_class_not_hor_space :  type == class_token_matcher>;
-named_class_not_space     :  type == class_token_matcher>;
-named_class_not_ver_space :  type == class_token_matcher>;
-named_class_not_word      :  type == class_token_matcher>;
+named_class_not_digits    :  type == class_token_matcher>;
+named_class_not_hor_space :  type == class_token_matcher>;
+named_class_not_space     :  type == class_token_matcher>;
+named_class_not_ver_space :  type == class_token_matcher>;
+named_class_not_word      :  type == class_token_matcher>;
 
 
 // Regex syntax: \o{}  Example: \o{142}
@@ -2072,7 +2006,7 @@ octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     number_as_char : char = unsafe_narrow(number);
 
     syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
-    r := shared.new(number_as_char);
+    r := shared.new(number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive));
     r*.set_string(syntax);
     return r;
 }
@@ -2224,15 +2158,15 @@ range_token: @polymorphic_base type = {
 
 range_token_matcher:  type = {
 
-    match:  (cur: Iter, inout ctx, modifiers, inner, reset_func, end_func, tail) -> _ = {
+    match:  (cur: Iter, inout ctx, inner, reset_func, end_func, tail) -> _ = {
         if range_flags::possessive == kind {
-            return match_possessive(cur, ctx, modifiers, inner, end_func, tail);
+            return match_possessive(cur, ctx, inner, end_func, tail);
         }
         else if range_flags::greedy == kind {
-            return match_greedy(0, cur, ctx.end, ctx, modifiers, inner, reset_func, end_func, tail);
+            return match_greedy(0, cur, ctx.end, ctx, inner, reset_func, end_func, tail);
         }
         else { // range_flags::not_greedy == kind
-            return match_not_greedy(cur, ctx, modifiers, inner, end_func, tail);
+            return match_not_greedy(cur, ctx, inner, end_func, tail);
         }
     }
 
@@ -2252,12 +2186,12 @@ range_token_matcher:  type = {
         return true;
     }
 
-    private match_min_count:  (cur: Iter, inout ctx, modifiers, inner, end_func, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
+    private match_min_count:  (cur: Iter, inout ctx, inner, end_func, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
         res := ctx.pass(cur);
         count := 0;
 
         while is_below_lower_bound(count) && res.matched {
-            res = inner(res.pos, ctx, modifiers, end_func);
+            res = inner(res.pos, ctx, end_func);
             if res.matched {
                 count += 1;
             }
@@ -2267,27 +2201,27 @@ range_token_matcher:  type = {
         return res;
     }
 
-    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, modifiers, inner, reset_func, end_func, other) -> match_return = {
-        inner_call := :(tail_cur, inout tail_ctx, _ /* ignore new modifiers */) -> _ == {
-            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (modifiers)$, (inner)$, (reset_func)$, (end_func)$, (other)$);
+    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, inner, reset_func, end_func, other) -> match_return = {
+        inner_call := :(tail_cur, inout tail_ctx) -> _ == {
+            return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (inner)$, (reset_func)$, (end_func)$, (other)$);
         };
         is_m_valid := true;
         r := ctx.fail();
         if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
-            r = inner(cur, ctx, modifiers, inner_call);
+            r = inner(cur, ctx, inner_call);
         }
 
         if !r.matched && is_in_range(count) {
             // The recursion did not yield a match try now the tail
-            r = other(cur, ctx, modifiers, end_func);
+            r = other(cur, ctx, end_func);
 
             if r.matched && !is_m_valid{
                 // We have a match rematch M if required
                 reset_func(ctx);
 
                 if count > 0 {
-                    _ = inner(last_valid, ctx, modifiers, end_func);
+                    _ = inner(last_valid, ctx, true_end_func());
                 }
             }
         }
@@ -2295,9 +2229,9 @@ range_token_matcher:  type = {
         return r;
     }
 
-    private match_possessive: (cur: Iter, inout ctx, modifiers, inner, end_func, other) -> match_return = {
+    private match_possessive: (cur: Iter, inout ctx, inner, end_func, other) -> match_return = {
         count :=0;
-        r := match_min_count(cur, ctx, modifiers, inner, end_func, count);
+        r := match_min_count(cur, ctx, inner, end_func, count);
 
         if !r.matched {
           return r;
@@ -2305,7 +2239,7 @@ range_token_matcher:  type = {
 
         pos := r.pos;
         while r.matched && is_below_upper_bound(count) {
-            r = inner(pos, ctx, modifiers, true_end_func());
+            r = inner(pos, ctx, true_end_func());
 
             if pos == r.pos {
                 break; // Break infinite loop.
@@ -2316,24 +2250,24 @@ range_token_matcher:  type = {
             }
         }
 
-        return other(pos, ctx, modifiers, end_func);
+        return other(pos, ctx, end_func);
     }
 
-    private match_not_greedy:  (cur: Iter, inout ctx, modifiers, inner, end_func, other) -> match_return = {
+    private match_not_greedy:  (cur: Iter, inout ctx, inner, end_func, other) -> match_return = {
         count := 0;
-        start := match_min_count(cur, ctx, modifiers, inner, end_func, count);
+        start := match_min_count(cur, ctx, inner, end_func, count);
         if !start.matched {
           return start;
         }
 
         pos := start.pos;
         while is_below_upper_bound(count) {
-            o:= other(pos, ctx, modifiers, end_func);
+            o:= other(pos, ctx, end_func);
             if o.matched {
                 return o;
             }
 
-            r:= inner(pos, ctx, modifiers, end_func);
+            r:= inner(pos, ctx, end_func);
             if !r.matched {
                 return ctx.fail();
             }
@@ -2341,7 +2275,7 @@ range_token_matcher:  type = {
             pos = r.pos;
         }
 
-        return other(pos, ctx, modifiers, end_func); // Upper bound reached.
+        return other(pos, ctx, end_func); // Upper bound reached.
     }
 }
 
@@ -2401,8 +2335,7 @@ word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
 }
 
-word_boundary_token_matcher:  (inout cur, inout ctx, modifiers) -> bool = {
-    _ = modifiers;
+word_boundary_token_matcher:  (inout cur, inout ctx) -> bool = {
     words : word_class = ();
     is_match := false;
     if cur == ctx.begin { // String start
@@ -2427,100 +2360,6 @@ word_boundary_token_matcher:  (inout cur, inout ctx, modifi
 }
 
 
-//-----------------------------------------------------------------------
-//
-//  Matchers for regular expressions.
-//
-//-----------------------------------------------------------------------
-//
-
-
-// Regex syntax: none Example: -
-//
-branch_reset_matcher_logic:  type = {
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) Other::match(cur, ctx, modifiers, end_func);
-    reset_ranges: (_) = {}
-    to_string:    ()  bstring("(?|");
-}
-
-// Regex syntax:   Example: a
-//
-char_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        if modifiers.has_flag(expression_flags::case_insensitive) {
-            if cur != ctx.end && (cur* == L || cur* == U) {
-                return Other::match(cur + 1, ctx, modifiers, end_func);
-            }
-            else {
-                return ctx.fail();
-            }
-        }
-        else {
-            if cur != ctx.end && cur* == C {
-                return Other::match(cur + 1, ctx, modifiers, end_func);
-            }
-            else {
-                return ctx.fail();
-            }
-        }
-
-    }
-    reset_ranges: (_) = {}
-    to_string:    ()  bstring(1, C);
-}
-
-
-// Regex syntax: []  Example: [abcx-y[:digits:]]
-//
-class_matcher_logic:  type =
-{
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        if modifiers.has_flag(expression_flags::case_insensitive) {
-            if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
-                return Other::match(cur + 1, ctx, modifiers, end_func);
-            }
-            else {
-                return ctx.fail();
-            }
-        }
-        else {
-            if cur != ctx.end && negate != match_any(cur*) {
-                return Other::match(cur + 1, ctx, modifiers, end_func);
-            }
-            else {
-                return ctx.fail();
-            }
-        }
-    }
-
-    private match_any:  (c: CharT) -> bool = {
-        r: bool = First::includes(c);
-
-        if !r {
-            if constexpr 0 != sizeof...(Other) {
-                r = match_any(c);
-            }
-        }
-
-        return r;
-    }
-
-    reset_ranges: (_) = {}
-
-    to_string: () -> bstring = {
-        r: bstring = "[";
-        if negate {
-            r += "^";
-        }
-        r += (bstring() + ... + List::to_string());
-        r += "]";
-
-        return r;
-    }
-}
-
-
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -2532,7 +2371,6 @@ class_matcher_logic:  type =
 regular_expression:  type = {
 
     context:  type == match_context;
-    modifiers: type      == match_modifiers;
 
     // TODO: Named multiple return has problems with templates.
     search_return:  type = {
@@ -2568,7 +2406,7 @@ regular_expression:  type = {
     match:  (in this, start: Iter, end: Iter) -> search_return = {
         ctx: context = (start, end);
 
-        r := Matcher::entry(start, ctx, modifiers());
+        r := Matcher::entry(start, ctx);
         return search_return(r.matched && r.pos == end, ctx);
     }
 
@@ -2581,7 +2419,7 @@ regular_expression:  type = {
 
         cur:= start;
         while true next (cur++) {
-            if Matcher::entry(cur, ctx, modifiers()).matched {
+            if Matcher::entry(cur, ctx).matched {
                 matched = true;
                 break;
             }
@@ -2642,67 +2480,25 @@ regex_parser:  type = {
         has_error = true;
     }
 
-    // Parser helper functions.
-
-    parser_expression_modifiers: (inout this, out mods : parse_context_modifier_state) -> std::string = {
-        r: std::string = "0";
-        sep: std::string = " | ";
-
-        add := :(name, inout r) = {
-            r += "(sep$)$(name)$";
-        };
-
-        mods = ();
-
-        mod_pos := 0;
-        while mod_pos < modifier.ssize() next mod_pos += 1 {
-            c: char = modifier[mod_pos];
-
-            if      c == 'i' { add("::cpp2::regex::expression_flags::case_insensitive", r); }
-            else if c == 'm' { add("::cpp2::regex::expression_flags::multiple_lines", r); }
-            else if c == 's' { add("::cpp2::regex::expression_flags::single_line", r); }
-            else if c == 'n' {
-                add("::cpp2::regex::expression_flags::no_group_captures", r);
-                mods.group_captures_have_numbers = false;
-            }
-            else if c == 'x' {
-                add("::cpp2::regex::expression_flags::perl_code_syntax", r);
-                mods.perl_code_syntax = true;
-
-                // Check if we have 'xx'
-                mod_pos += 1;
-                if mod_pos < modifier.ssize() && 'x' == modifier[mod_pos] {
-                    add("::cpp2::regex::expression_flags::perl_code_syntax_in_classes", r);
-                    mods.perl_code_syntax_in_classes = true;
-                }
-            }
-            else { error("Unknown modifier: '(c)$'"); }
-        }
-
-        return r;
-    }
-
     // Parsing functions
     //
 
     parse:(inout this) -> std::string = {
-        modifiers : parse_context_modifier_state;
-        mod   := parser_expression_modifiers(out modifiers);
-        parse_ctx: parse_context = (regex, modifiers);
-        if !parse_ctx.parse() {
+        parse_ctx: parse_context = (regex);
+        mod : std::string = modifier;
+        if !parse_ctx.parse(mod) {
             error(parse_ctx.error_text);
             return "Error";
         }
 
         source += "{\n";
         source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
-        source += "  initial_flags: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
 
         gen_ctx: generation_context = ();
         source += gen_ctx.run(parse_ctx.get_tokens());
-        source += "  entry: (cur, inout ctx, modifiers) -> _ = {\n";
+        source += "  entry: (cur, inout ctx) -> _ = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
-        source += "    r := (gen_ctx.get_entry_func())$(cur, ctx, modifiers, cpp2::regex::true_end_func());\n";
+        source += "    r := (gen_ctx.get_entry_func())$(cur, ctx, cpp2::regex::true_end_func());\n";
         source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";

From 8bdd23da059f0c1e2a807a4d102c6cb83d09504e Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 16 May 2024 09:00:22 +0200
Subject: [PATCH 127/161] Removed templates for regular arguments.

---
 include/cpp2regex.h | 1213 +++++++++++++++++++++----------------------
 source/regex.h2     |   48 +-
 2 files changed, 623 insertions(+), 638 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 582721e8e2..d9da6307eb 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,184 +10,184 @@
 
 #line 1 "regex.h2"
 
-#line 16 "regex.h2"
+#line 19 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 32 "regex.h2"
+#line 35 "regex.h2"
 class expression_flags;
     
 
-#line 44 "regex.h2"
+#line 47 "regex.h2"
 class range_flags;
     
 
-#line 50 "regex.h2"
+#line 53 "regex.h2"
 template class match_group;
     
 
-#line 57 "regex.h2"
+#line 60 "regex.h2"
 template class match_return;
     
 
-#line 62 "regex.h2"
-template class match_context;
+#line 65 "regex.h2"
+template class match_context;
 
-#line 149 "regex.h2"
+#line 143 "regex.h2"
 template class matcher_list;
     
 
-#line 166 "regex.h2"
+#line 160 "regex.h2"
 class true_end_func;
     
 
-#line 179 "regex.h2"
+#line 173 "regex.h2"
 template class single_class_entry;
 
-#line 187 "regex.h2"
+#line 181 "regex.h2"
 template class range_class_entry;
 
-#line 195 "regex.h2"
+#line 189 "regex.h2"
 template class combined_class_entry;
     
 
-#line 202 "regex.h2"
+#line 196 "regex.h2"
 template class list_class_entry;
     
 
-#line 209 "regex.h2"
+#line 203 "regex.h2"
 template class named_class_entry;
     
 
-#line 214 "regex.h2"
+#line 208 "regex.h2"
 template class negated_class_entry;
     
 
-#line 221 "regex.h2"
+#line 215 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 273 "regex.h2"
+#line 267 "regex.h2"
 template class empty_matcher_logic;
     
 
-#line 282 "regex.h2"
+#line 276 "regex.h2"
 template class extract_position_helper;
     
 
-#line 298 "regex.h2"
+#line 292 "regex.h2"
 template class special_syntax_wrapper;
     
 
-#line 311 "regex.h2"
+#line 305 "regex.h2"
 class no_reset;
     
 
-#line 315 "regex.h2"
+#line 309 "regex.h2"
 template class on_return;
 
-#line 330 "regex.h2"
+#line 324 "regex.h2"
 class regex_token;
 
-#line 354 "regex.h2"
+#line 348 "regex.h2"
 class parse_context_group_state;
 
-#line 392 "regex.h2"
+#line 386 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 425 "regex.h2"
+#line 419 "regex.h2"
 class parse_context;
     
 
-#line 810 "regex.h2"
+#line 804 "regex.h2"
 class generation_function_context;
     
 
-#line 826 "regex.h2"
+#line 820 "regex.h2"
 class generation_context;
 
-#line 995 "regex.h2"
+#line 989 "regex.h2"
 class regex_token_list;
     
 
-#line 1027 "regex.h2"
+#line 1021 "regex.h2"
 class regex_token_base;
     
 
-#line 1041 "regex.h2"
+#line 1035 "regex.h2"
 class regex_token_check;
     
 
-#line 1056 "regex.h2"
+#line 1050 "regex.h2"
 class regex_token_code;
     
 
-#line 1072 "regex.h2"
+#line 1066 "regex.h2"
 class regex_token_empty;
     
 
-#line 1088 "regex.h2"
+#line 1082 "regex.h2"
 class alternative_token;
     
 
-#line 1106 "regex.h2"
+#line 1100 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1152 "regex.h2"
+#line 1146 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1178 "regex.h2"
+#line 1172 "regex.h2"
 class any_token;
     
 
-#line 1209 "regex.h2"
+#line 1203 "regex.h2"
 class char_token;
     
 
-#line 1265 "regex.h2"
+#line 1259 "regex.h2"
 class class_token;
     
 
-#line 1401 "regex.h2"
+#line 1395 "regex.h2"
 template class class_token_matcher;
 
-#line 1472 "regex.h2"
+#line 1466 "regex.h2"
 class escaped_char_token;
     
 
-#line 1502 "regex.h2"
+#line 1496 "regex.h2"
 class group_ref_token;
     
 
-#line 1636 "regex.h2"
+#line 1630 "regex.h2"
 class group_token;
     
 
-#line 1917 "regex.h2"
+#line 1911 "regex.h2"
 class lookahead_token;
     
 
-#line 2016 "regex.h2"
+#line 2010 "regex.h2"
 class range_token;
     
 
-#line 2159 "regex.h2"
+#line 2153 "regex.h2"
 template class range_token_matcher;
 
-#line 2284 "regex.h2"
+#line 2278 "regex.h2"
 class special_range_token;
     
 
-#line 2371 "regex.h2"
-template class regular_expression;
+#line 2365 "regex.h2"
+template class regular_expression;
 
-#line 2458 "regex.h2"
+#line 2454 "regex.h2"
 template class regex_parser;
 
-#line 2524 "regex.h2"
+#line 2522 "regex.h2"
 }
 }
 
@@ -210,7 +210,10 @@ template class regex_parser;
 #include 
 #include 
 
-#line 16 "regex.h2"
+template
+using matcher_wrapper_type = typename matcher_wrapper::wrap;
+
+#line 19 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -220,7 +223,7 @@ bool inline constexpr greedy_alternative = false;
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
-#line 32 "regex.h2"
+#line 35 "regex.h2"
 class expression_flags {
 private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val);
 
@@ -250,10 +253,10 @@ public: constexpr auto operator=(expression_flags&& that) noexcept -> expression
 public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default;
 public: [[nodiscard]] auto to_string() const& -> std::string;
 
-#line 39 "regex.h2"
+#line 42 "regex.h2"
 };
 
-#line 44 "regex.h2"
+#line 47 "regex.h2"
 class range_flags {
     public: static const int not_greedy;
     public: static const int greedy;
@@ -263,7 +266,7 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 49 "regex.h2"
+#line 52 "regex.h2"
 
 template class match_group {
     public: Iter start {}; 
@@ -277,69 +280,63 @@ template class match_return {
     public: Iter pos {}; 
 };
 
-template class match_context
+template class match_context
  {
     public: Iter begin; 
     public: Iter end; 
 
     private: std::array,max_groups> groups {}; 
-    private: std::array alternatives_pos {}; 
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 75 "regex.h2"
+#line 77 "regex.h2"
     public: match_context(match_context const& that);
-#line 75 "regex.h2"
+#line 77 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 75 "regex.h2"
+#line 77 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 75 "regex.h2"
+#line 77 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-#line 79 "regex.h2"
+#line 81 "regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 87 "regex.h2"
+#line 89 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 93 "regex.h2"
+#line 95 "regex.h2"
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 100 "regex.h2"
+#line 102 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 105 "regex.h2"
+#line 107 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 109 "regex.h2"
+#line 111 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 113 "regex.h2"
+#line 115 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-#line 117 "regex.h2"
-    public: [[nodiscard]] auto get_alternative_pos(auto const& alternative) const& -> auto;
-
-    public: auto set_alternative_pos(auto const& alternative, auto const& pos) & -> void;
-
-#line 125 "regex.h2"
+#line 119 "regex.h2"
     public: [[nodiscard]] auto print_ranges() const& -> bstring;
 
-#line 139 "regex.h2"
+#line 133 "regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> auto;
 
 };
 
-#line 149 "regex.h2"
+#line 143 "regex.h2"
 template class matcher_list {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto;
 
-#line 155 "regex.h2"
+#line 149 "regex.h2"
     private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
 
     private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
@@ -352,7 +349,7 @@ template class matcher_list {
     public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 163 "regex.h2"
+#line 157 "regex.h2"
 };
 
 template using no_tail = matcher_list;
@@ -360,7 +357,7 @@ class true_end_func {
     public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
 };
 
-#line 179 "regex.h2"
+#line 173 "regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -369,10 +366,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 183 "regex.h2"
+#line 177 "regex.h2"
 };
 
-#line 187 "regex.h2"
+#line 181 "regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -381,10 +378,10 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 191 "regex.h2"
+#line 185 "regex.h2"
 };
 
-#line 195 "regex.h2"
+#line 189 "regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -392,10 +389,10 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 198 "regex.h2"
+#line 192 "regex.h2"
 };
 
-#line 202 "regex.h2"
+#line 196 "regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -403,10 +400,10 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 205 "regex.h2"
+#line 199 "regex.h2"
 };
 
-#line 209 "regex.h2"
+#line 203 "regex.h2"
 template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -414,7 +411,7 @@ template class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 212 "regex.h2"
+#line 206 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -424,10 +421,10 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 217 "regex.h2"
+#line 211 "regex.h2"
 };
 
-#line 221 "regex.h2"
+#line 215 "regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -435,15 +432,15 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 224 "regex.h2"
+#line 218 "regex.h2"
 };
 
-#line 229 "regex.h2"
+#line 223 "regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 235 "regex.h2"
+#line 229 "regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -458,21 +455,21 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 251 "regex.h2"
+#line 245 "regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 258 "regex.h2"
+#line 252 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 273 "regex.h2"
+#line 267 "regex.h2"
 template class empty_matcher_logic {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
@@ -481,24 +478,24 @@ template class empty_matcher_logic {
     public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(empty_matcher_logic const&) -> void = delete;
 
-#line 277 "regex.h2"
+#line 271 "regex.h2"
 };
 
-#line 282 "regex.h2"
+#line 276 "regex.h2"
 template class extract_position_helper {
     public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
 
-#line 291 "regex.h2"
+#line 285 "regex.h2"
     public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: extract_position_helper() = default;
     public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(extract_position_helper const&) -> void = delete;
 
-#line 293 "regex.h2"
+#line 287 "regex.h2"
 };
 
-#line 298 "regex.h2"
+#line 292 "regex.h2"
 template class special_syntax_wrapper: public base {
 
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -506,10 +503,10 @@ template class special_synta
     public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(special_syntax_wrapper const&) -> void = delete;
 
-#line 301 "regex.h2"
+#line 295 "regex.h2"
 };
 
-#line 311 "regex.h2"
+#line 305 "regex.h2"
 class no_reset {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
@@ -519,16 +516,16 @@ template class on_return {
     private: Func func; 
 
     public: explicit on_return(Func const& f);
-#line 319 "regex.h2"
+#line 313 "regex.h2"
     public: auto operator=(Func const& f) -> on_return& ;
 
-#line 323 "regex.h2"
+#line 317 "regex.h2"
     public: ~on_return() noexcept;
     public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(on_return const&) -> void = delete;
 
 
-#line 326 "regex.h2"
+#line 320 "regex.h2"
 };
 
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
@@ -539,10 +536,10 @@ class regex_token {
 
     public: explicit regex_token(cpp2::impl::in str);
 
-#line 338 "regex.h2"
+#line 332 "regex.h2"
     public: explicit regex_token();
 
-#line 343 "regex.h2"
+#line 337 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void = 0;
@@ -553,7 +550,7 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 348 "regex.h2"
+#line 342 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
@@ -572,13 +569,13 @@ class parse_context_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 370 "regex.h2"
+#line 364 "regex.h2"
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 376 "regex.h2"
+#line 370 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 386 "regex.h2"
+#line 380 "regex.h2"
     public: auto add(cpp2::impl::in token) & -> void;
 
     public: [[nodiscard]] auto empty() const& -> bool;
@@ -593,16 +590,16 @@ class parse_context_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 406 "regex.h2"
+#line 400 "regex.h2"
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 411 "regex.h2"
+#line 405 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 417 "regex.h2"
+#line 411 "regex.h2"
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
 
-#line 423 "regex.h2"
+#line 417 "regex.h2"
 };
 
 class parse_context {
@@ -618,39 +615,39 @@ class parse_context {
 
     private: token_ptr root; 
 
-#line 439 "regex.h2"
+#line 433 "regex.h2"
     public: explicit parse_context(cpp2::impl::in r);
-#line 439 "regex.h2"
+#line 433 "regex.h2"
     public: auto operator=(cpp2::impl::in r) -> parse_context& ;
 
-#line 444 "regex.h2"
+#line 438 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 454 "regex.h2"
+#line 448 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 460 "regex.h2"
+#line 454 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 464 "regex.h2"
+#line 458 "regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 468 "regex.h2"
+#line 462 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 479 "regex.h2"
+#line 473 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 485 "regex.h2"
+#line 479 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 490 "regex.h2"
+#line 484 "regex.h2"
     // Position management functions
     //
 
@@ -660,87 +657,87 @@ class parse_context {
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 501 "regex.h2"
+#line 495 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 505 "regex.h2"
+#line 499 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 515 "regex.h2"
+#line 509 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 519 "regex.h2"
+#line 513 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 524 "regex.h2"
+#line 518 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 528 "regex.h2"
+#line 522 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 534 "regex.h2"
+#line 528 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 544 "regex.h2"
+#line 538 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 556 "regex.h2"
+#line 550 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 569 "regex.h2"
+#line 563 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
 
-#line 578 "regex.h2"
+#line 572 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 590 "regex.h2"
+#line 584 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::impl::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 631 "regex.h2"
+#line 625 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 652 "regex.h2"
+#line 646 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 668 "regex.h2"
+#line 662 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 688 "regex.h2"
+#line 682 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 698 "regex.h2"
+#line 692 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 756 "regex.h2"
+#line 750 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 793 "regex.h2"
+#line 787 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 808 "regex.h2"
+#line 802 "regex.h2"
 };
 
 class generation_function_context {
@@ -749,10 +746,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 821 "regex.h2"
+#line 815 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 824 "regex.h2"
+#line 818 "regex.h2"
 };
 
 class generation_context {
@@ -769,84 +766,84 @@ class generation_context {
 
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 843 "regex.h2"
+#line 837 "regex.h2"
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 848 "regex.h2"
+#line 842 "regex.h2"
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void;
 
-#line 855 "regex.h2"
+#line 849 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
 
-#line 861 "regex.h2"
+#line 855 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 869 "regex.h2"
+#line 863 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 891 "regex.h2"
+#line 885 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 895 "regex.h2"
+#line 889 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 899 "regex.h2"
+#line 893 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 903 "regex.h2"
+#line 897 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 912 "regex.h2"
+#line 906 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 918 "regex.h2"
+#line 912 "regex.h2"
     public: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 930 "regex.h2"
+#line 924 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 934 "regex.h2"
+#line 928 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 938 "regex.h2"
+#line 932 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 944 "regex.h2"
+#line 938 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 950 "regex.h2"
+#line 944 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 956 "regex.h2"
+#line 950 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 964 "regex.h2"
+#line 958 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 972 "regex.h2"
+#line 966 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 993 "regex.h2"
+#line 987 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 998 "regex.h2"
+#line 992 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 1005 "regex.h2"
+#line 999 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1011 "regex.h2"
+#line 1005 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1017 "regex.h2"
+#line 1011 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -854,36 +851,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1024 "regex.h2"
+#line 1018 "regex.h2"
 };
 
-#line 1027 "regex.h2"
+#line 1021 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1030 "regex.h2"
+#line 1024 "regex.h2"
     public: explicit regex_token_base(cpp2::impl::in str);
 
-#line 1034 "regex.h2"
+#line 1028 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1038 "regex.h2"
+#line 1032 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1039 "regex.h2"
+#line 1033 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1044 "regex.h2"
+#line 1038 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 1051 "regex.h2"
+#line 1045 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -891,17 +888,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1054 "regex.h2"
+#line 1048 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1059 "regex.h2"
+#line 1053 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 1066 "regex.h2"
+#line 1060 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -909,16 +906,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1069 "regex.h2"
+#line 1063 "regex.h2"
 };
 
-#line 1072 "regex.h2"
+#line 1066 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1075 "regex.h2"
+#line 1069 "regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 1079 "regex.h2"
+#line 1073 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -926,7 +923,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1082 "regex.h2"
+#line 1076 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -935,12 +932,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1091 "regex.h2"
+#line 1085 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1101 "regex.h2"
+#line 1095 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -948,23 +945,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1104 "regex.h2"
+#line 1098 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1110 "regex.h2"
+#line 1104 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1117 "regex.h2"
+#line 1111 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1133 "regex.h2"
+#line 1127 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1139 "regex.h2"
+#line 1133 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -972,36 +969,36 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1150 "regex.h2"
+#line 1144 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1157 "regex.h2"
+#line 1151 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1174 "regex.h2"
+#line 1168 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1181 "regex.h2"
+#line 1175 "regex.h2"
     private: bool single_line; 
 
     public: explicit any_token(cpp2::impl::in single_line_);
 
-#line 1187 "regex.h2"
+#line 1181 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1193 "regex.h2"
+#line 1187 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1009,24 +1006,24 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1196 "regex.h2"
+#line 1190 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1209 "regex.h2"
+#line 1203 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1212 "regex.h2"
+#line 1206 "regex.h2"
     private: char token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1221 "regex.h2"
+#line 1215 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1225 "regex.h2"
+#line 1219 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~char_token() noexcept;
 
@@ -1034,34 +1031,34 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1241 "regex.h2"
+#line 1235 "regex.h2"
 };
 
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1253 "regex.h2"
+#line 1247 "regex.h2"
 template [[nodiscard]] auto char_token_case_insensitive_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1263 "regex.h2"
+#line 1257 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1268 "regex.h2"
+#line 1262 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1279 "regex.h2"
+#line 1273 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1388 "regex.h2"
+#line 1382 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1393 "regex.h2"
+#line 1387 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1069,21 +1066,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1399 "regex.h2"
+#line 1393 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1424 "regex.h2"
+#line 1418 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1436 "regex.h2"
+#line 1430 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1095,20 +1092,20 @@ template c
 
     //     return r;
     // }
-#line 1447 "regex.h2"
+#line 1441 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1472 "regex.h2"
+#line 1466 "regex.h2"
 class escaped_char_token: public regex_token_base {
 
-#line 1475 "regex.h2"
+#line 1469 "regex.h2"
     private: char token; 
 
     public: explicit escaped_char_token(cpp2::impl::in t);
 
-#line 1482 "regex.h2"
+#line 1476 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~escaped_char_token() noexcept;
 
@@ -1116,14 +1113,14 @@ class escaped_char_token: public regex_token_base {
     public: auto operator=(escaped_char_token const&) -> void = delete;
 
 
-#line 1485 "regex.h2"
+#line 1479 "regex.h2"
 };
 
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1496 "regex.h2"
+#line 1490 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1132,16 +1129,16 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1505 "regex.h2"
+#line 1499 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1514 "regex.h2"
+#line 1508 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1606 "regex.h2"
+#line 1600 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1149,30 +1146,30 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1609 "regex.h2"
+#line 1603 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1636 "regex.h2"
+#line 1630 "regex.h2"
 class group_token: public regex_token {
 
-#line 1639 "regex.h2"
+#line 1633 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1655 "regex.h2"
+#line 1649 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1782 "regex.h2"
+#line 1776 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1799 "regex.h2"
+#line 1793 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1817 "regex.h2"
+#line 1811 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1181,44 +1178,44 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1823 "regex.h2"
+#line 1817 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1866 "regex.h2"
+#line 1860 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1884 "regex.h2"
+#line 1878 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1896 "regex.h2"
+#line 1890 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1910 "regex.h2"
+#line 1904 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1915 "regex.h2"
+#line 1909 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1920 "regex.h2"
+#line 1914 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1927 "regex.h2"
+#line 1921 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1933 "regex.h2"
+#line 1927 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1226,18 +1223,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1936 "regex.h2"
+#line 1930 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1947 "regex.h2"
+#line 1941 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1974 "regex.h2"
+#line 1968 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1251,17 +1248,17 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 1988 "regex.h2"
+#line 1982 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2014 "regex.h2"
+#line 2008 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2019 "regex.h2"
+#line 2013 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1271,19 +1268,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2096 "regex.h2"
+#line 2090 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2107 "regex.h2"
+#line 2101 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2119 "regex.h2"
+#line 2113 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2143 "regex.h2"
+#line 2137 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2153 "regex.h2"
+#line 2147 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1291,46 +1288,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2157 "regex.h2"
+#line 2151 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2173 "regex.h2"
+#line 2167 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2178 "regex.h2"
+#line 2172 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2183 "regex.h2"
+#line 2177 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2189 "regex.h2"
+#line 2183 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2204 "regex.h2"
+#line 2198 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2232 "regex.h2"
+#line 2226 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2256 "regex.h2"
+#line 2250 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2280 "regex.h2"
+#line 2274 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2287 "regex.h2"
+#line 2281 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1339,7 +1336,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2316 "regex.h2"
+#line 2310 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1348,10 +1345,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2338 "regex.h2"
+#line 2332 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2363 "regex.h2"
+#line 2357 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1360,9 +1357,11 @@ template [[nodiscard]] auto word_boundary_token_mat
 //
 
 // Regular expression implementation
-template class regular_expression {
+template class regular_expression {
 
-    public: template using context = match_context;
+#line 2368 "regex.h2"
+    public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
+    public: template using context = matcher::context;
     
     // TODO: Named multiple return has problems with templates.
     public: template class search_return {
@@ -1371,7 +1370,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_);
 
-#line 2385 "regex.h2"
+#line 2381 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1386,7 +1385,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2401 "regex.h2"
+#line 2397 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1394,13 +1393,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2413 "regex.h2"
+#line 2409 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2435 "regex.h2"
+#line 2431 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1412,7 +1411,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2448 "regex.h2"
+#line 2444 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1430,19 +1429,18 @@ template class regex_parser {
     private: Error_out error_out; 
 
     private: size_t pos {0}; 
-    private: int alternatives_count {0}; 
     private: bool has_error {false}; 
 
     private: std::string source {""}; 
 
     public: explicit regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e);
 
-#line 2476 "regex.h2"
+#line 2471 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::impl::in message) & -> void;
 
-#line 2483 "regex.h2"
+#line 2478 "regex.h2"
     // Parsing functions
     //
 
@@ -1451,12 +1449,12 @@ template class regex_parser {
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2515 "regex.h2"
+#line 2513 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string;
 
-#line 2524 "regex.h2"
+#line 2522 "regex.h2"
 }
 }
 
@@ -1465,7 +1463,7 @@ template [[nodiscard]] auto generate_template(cpp2::impl::in match_context::match_context(Iter const& begin_, Iter const& end_)
+#line 72 "regex.h2"
+    template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 73 "regex.h2"
+#line 75 "regex.h2"
     }
 
-#line 75 "regex.h2"
-    template  match_context::match_context(match_context const& that)
+#line 77 "regex.h2"
+    template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
-                                   , groups{ that.groups }
-                                   , alternatives_pos{ that.alternatives_pos }{}
-#line 75 "regex.h2"
-    template  auto match_context::operator=(match_context const& that) -> match_context& {
+                                   , groups{ that.groups }{}
+#line 77 "regex.h2"
+    template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
-                                   alternatives_pos = that.alternatives_pos;
                                    return *this; }
-#line 75 "regex.h2"
-    template  match_context::match_context(match_context&& that) noexcept
+#line 77 "regex.h2"
+    template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
-                                   , groups{ std::move(that).groups }
-                                   , alternatives_pos{ std::move(that).alternatives_pos }{}
-#line 75 "regex.h2"
-    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
+                                   , groups{ std::move(that).groups }{}
+#line 77 "regex.h2"
+    template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
                                    groups = std::move(that).groups;
-                                   alternatives_pos = std::move(that).alternatives_pos;
                                    return *this; }
 
     // Getter and setter for groups
     //
-#line 79 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
-
 #line 81 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
+    template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
+
+#line 83 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
         }
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 87 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
+#line 89 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 93 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
+#line 95 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 100 "regex.h2"
-    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
+#line 102 "regex.h2"
+    template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 105 "regex.h2"
-    template  auto match_context::set_group_invalid(auto const& group) & -> void{
+#line 107 "regex.h2"
+    template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 109 "regex.h2"
-    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
+#line 111 "regex.h2"
+    template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 113 "regex.h2"
-    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
-
-    // Getter and setter for alternatives
-
-#line 117 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_alternative_pos(auto const& alternative) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative);  }
-
-#line 119 "regex.h2"
-    template  auto match_context::set_alternative_pos(auto const& alternative, auto const& pos) & -> void{
-        CPP2_ASSERT_IN_BOUNDS(alternatives_pos, alternative) = pos;
-    }
+#line 115 "regex.h2"
+    template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
     // Misc functions
     //
-#line 125 "regex.h2"
-    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
+#line 119 "regex.h2"
+    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
         bstring r {""}; 
         for ( auto const& cur : groups ) {
             if (cur.matched) {
@@ -1661,43 +1645,43 @@ return cpp2::move(_ret) + ")";
         return r; 
     }
 
-#line 139 "regex.h2"
-    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
-#line 140 "regex.h2"
-    template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
+#line 133 "regex.h2"
+    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
+#line 134 "regex.h2"
+    template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 144 "regex.h2"
+#line 138 "regex.h2"
 //  Represents the remainder of the regular expression.
 //
 //  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
 //  Otherwise the matcher can try a different alternative.
 //
 
-#line 150 "regex.h2"
+#line 144 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return match_select(cur, ctx, modifiers, end_func);  }
 
-#line 152 "regex.h2"
+#line 146 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { 
         return match_select(cur, ctx, modifiers, end_func);  }
 
-#line 155 "regex.h2"
+#line 149 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { 
         return First::match(cur, ctx, modifiers, end_func, matcher_list());  }
-#line 157 "regex.h2"
+#line 151 "regex.h2"
     template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return end_func(cur, ctx, modifiers);  }
 
-#line 159 "regex.h2"
+#line 153 "regex.h2"
     template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 160 "regex.h2"
+#line 154 "regex.h2"
     template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
 
-#line 162 "regex.h2"
+#line 156 "regex.h2"
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
-#line 167 "regex.h2"
+#line 161 "regex.h2"
     [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
 
-#line 170 "regex.h2"
+#line 164 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Character classes for regular expressions.
@@ -1708,72 +1692,72 @@ return cpp2::move(_ret) + ")";
 // Class syntax:  Example: a
 //
 
-#line 181 "regex.h2"
+#line 175 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C;  }
-#line 182 "regex.h2"
+#line 176 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 185 "regex.h2"
+#line 179 "regex.h2"
 // Class syntax: - Example: a-c
 //
 
-#line 189 "regex.h2"
+#line 183 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }();  }
-#line 190 "regex.h2"
+#line 184 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 193 "regex.h2"
+#line 187 "regex.h2"
 // Helper for combining two character classes
 //
 
-#line 196 "regex.h2"
+#line 190 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 197 "regex.h2"
+#line 191 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 200 "regex.h2"
+#line 194 "regex.h2"
 // Class syntax:   Example: abcd
 //
 
-#line 203 "regex.h2"
+#line 197 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c));  }
-#line 204 "regex.h2"
+#line 198 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 207 "regex.h2"
+#line 201 "regex.h2"
 // Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 211 "regex.h2"
+#line 205 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
 
-#line 216 "regex.h2"
+#line 210 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 219 "regex.h2"
+#line 213 "regex.h2"
 // Short class syntax: \  Example: \w
 //
 
-#line 222 "regex.h2"
+#line 216 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 223 "regex.h2"
+#line 217 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
 
-#line 227 "regex.h2"
+#line 221 "regex.h2"
 // Named basic character classes
 //
 
-#line 233 "regex.h2"
+#line 227 "regex.h2"
 // Named other classes
 //
 
-#line 249 "regex.h2"
+#line 243 "regex.h2"
 // Shorthand class entries
 //
 
-#line 264 "regex.h2"
+#line 258 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Helper matchers for regular expressions.
@@ -1784,18 +1768,18 @@ return cpp2::move(_ret) + ")";
 // Regex syntax: none Example: -
 //
 
-#line 274 "regex.h2"
+#line 268 "regex.h2"
     template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 275 "regex.h2"
+#line 269 "regex.h2"
     template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 276 "regex.h2"
+#line 270 "regex.h2"
     template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
 
-#line 280 "regex.h2"
+#line 274 "regex.h2"
 // Helper for greedy alternatives
 //
 
-#line 283 "regex.h2"
+#line 277 "regex.h2"
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Other::match(cur, ctx, modifiers, end_func)}; 
         if (r.matched) {
@@ -1804,20 +1788,20 @@ return cpp2::move(_ret) + ")";
         return r; 
     }
 
-#line 291 "regex.h2"
+#line 285 "regex.h2"
     template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 292 "regex.h2"
+#line 286 "regex.h2"
     template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
 
-#line 295 "regex.h2"
+#line 289 "regex.h2"
 // Helper for standard matchers with special syntax
 //
 //
 
-#line 300 "regex.h2"
+#line 294 "regex.h2"
     template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
 
-#line 303 "regex.h2"
+#line 297 "regex.h2"
 //-----------------------------------------------------------------------
 //
 // Matchers and generators for regular expressions.
@@ -1825,69 +1809,69 @@ return cpp2::move(_ret) + ")";
 //-----------------------------------------------------------------------
 //
 
-#line 312 "regex.h2"
+#line 306 "regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 319 "regex.h2"
+#line 313 "regex.h2"
     template  on_return::on_return(Func const& f)
         : func{ f }{
 
-#line 321 "regex.h2"
+#line 315 "regex.h2"
     }
-#line 319 "regex.h2"
+#line 313 "regex.h2"
     template  auto on_return::operator=(Func const& f) -> on_return& {
         func = f;
         return *this;
 
-#line 321 "regex.h2"
+#line 315 "regex.h2"
     }
 
-#line 323 "regex.h2"
+#line 317 "regex.h2"
     template  on_return::~on_return() noexcept{
         cpp2::move(*this).func();
     }
 
-#line 328 "regex.h2"
+#line 322 "regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
-#line 334 "regex.h2"
+#line 328 "regex.h2"
     regex_token::regex_token(cpp2::impl::in str)
         : string_rep{ str }{
 
-#line 336 "regex.h2"
+#line 330 "regex.h2"
     }
 
-#line 338 "regex.h2"
+#line 332 "regex.h2"
     regex_token::regex_token()
         : string_rep{ "" }{
 
-#line 340 "regex.h2"
+#line 334 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
 
-#line 346 "regex.h2"
+#line 340 "regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
-#line 347 "regex.h2"
+#line 341 "regex.h2"
     auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}
 
-#line 364 "regex.h2"
+#line 358 "regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
         static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 370 "regex.h2"
+#line 364 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 376 "regex.h2"
+#line 370 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
         if (CPP2_UFCS(empty)(alternate_match_lists)) {
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
@@ -1898,13 +1882,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 386 "regex.h2"
+#line 380 "regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void { CPP2_UFCS(push_back)(cur_match_list, token);  }
 
-#line 388 "regex.h2"
+#line 382 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
 
-#line 398 "regex.h2"
+#line 392 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1913,20 +1897,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 406 "regex.h2"
+#line 400 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 411 "regex.h2"
+#line 405 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 417 "regex.h2"
+#line 411 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1934,14 +1918,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 439 "regex.h2"
+#line 433 "regex.h2"
     parse_context::parse_context(cpp2::impl::in r)
         : regex{ r }
         , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }{
 
-#line 442 "regex.h2"
+#line 436 "regex.h2"
     }
-#line 439 "regex.h2"
+#line 433 "regex.h2"
     auto parse_context::operator=(cpp2::impl::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -1952,10 +1936,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         root = CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "");
         return *this;
 
-#line 442 "regex.h2"
+#line 436 "regex.h2"
     }
 
-#line 447 "regex.h2"
+#line 441 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         CPP2_UFCS(swap)(old_state, cur_group_state);
@@ -1963,24 +1947,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 454 "regex.h2"
+#line 448 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
         auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 460 "regex.h2"
+#line 454 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 464 "regex.h2"
+#line 458 "regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 471 "regex.h2"
+#line 465 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -1989,36 +1973,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 479 "regex.h2"
+#line 473 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         CPP2_UFCS(set_next)(cur_branch_reset_state, cpp2::move(max_group));
     }
 
-#line 485 "regex.h2"
+#line 479 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         CPP2_UFCS(next_alternative)(cur_group_state);
         CPP2_UFCS(next_alternative)(cur_branch_reset_state);
     }
 
-#line 493 "regex.h2"
+#line 487 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 495 "regex.h2"
+#line 489 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
 
-#line 497 "regex.h2"
+#line 491 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         CPP2_UFCS(add)(cur_group_state, token);
     }
 
-#line 501 "regex.h2"
+#line 495 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(CPP2_UFCS(empty)(cur_group_state)); 
     }
 
-#line 505 "regex.h2"
+#line 499 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2029,29 +2013,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 515 "regex.h2"
+#line 509 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return root; 
     }
 
-#line 520 "regex.h2"
+#line 514 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 524 "regex.h2"
+#line 518 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return CPP2_UFCS(next)(cur_branch_reset_state); 
     }
 
-#line 528 "regex.h2"
+#line 522 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 534 "regex.h2"
+#line 528 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {CPP2_UFCS(find)(named_groups, name)}; 
         if (iter == CPP2_UFCS(end)(named_groups)) {
@@ -2062,10 +2046,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 544 "regex.h2"
+#line 538 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 546 "regex.h2"
+#line 540 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != CPP2_UFCS(size)(regex)) {
@@ -2076,14 +2060,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 556 "regex.h2"
+#line 550 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 557 "regex.h2"
+#line 551 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 558 "regex.h2"
+#line 552 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 560 "regex.h2"
+#line 554 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2093,19 +2077,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 569 "regex.h2"
+#line 563 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,CPP2_UFCS(size)(regex)); }
 
-#line 571 "regex.h2"
+#line 565 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
 
-#line 573 "regex.h2"
+#line 567 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 578 "regex.h2"
+#line 572 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2118,10 +2102,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 590 "regex.h2"
+#line 584 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::impl::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 592 "regex.h2"
+#line 586 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2160,7 +2144,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 631 "regex.h2"
+#line 625 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2182,14 +2166,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 652 "regex.h2"
+#line 646 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 653 "regex.h2"
+#line 647 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 654 "regex.h2"
+#line 648 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 656 "regex.h2"
+#line 650 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
             r.construct(CPP2_UFCS(substr)(regex, pos, n));
@@ -2202,7 +2186,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 668 "regex.h2"
+#line 662 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2223,7 +2207,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(r.value()); 
     }
 
-#line 688 "regex.h2"
+#line 682 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
@@ -2234,12 +2218,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 698 "regex.h2"
+#line 692 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 699 "regex.h2"
+#line 693 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 701 "regex.h2"
+#line 695 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2295,7 +2279,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 756 "regex.h2"
+#line 750 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2333,7 +2317,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 793 "regex.h2"
+#line 787 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2348,7 +2332,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 814 "regex.h2"
+#line 808 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2356,27 +2340,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 821 "regex.h2"
+#line 815 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
     }
 
-#line 836 "regex.h2"
+#line 830 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 838 "regex.h2"
+#line 832 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 843 "regex.h2"
+#line 837 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
     }
 
-#line 848 "regex.h2"
+#line 842 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void{
         end_func_statefull(c);
 
@@ -2384,14 +2368,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(cpp2::move(name));
     }
 
-#line 855 "regex.h2"
+#line 849 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 861 "regex.h2"
+#line 855 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(token)), (*this));
@@ -2400,7 +2384,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 869 "regex.h2"
+#line 863 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (CPP2_UFCS(empty)(groups)) {
             return "cpp2::regex::no_reset()"; 
@@ -2422,39 +2406,39 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(name) + "()"; 
     }
 
-#line 891 "regex.h2"
+#line 885 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &CPP2_UFCS(back)(gen_stack); 
     }
 
-#line 895 "regex.h2"
+#line 889 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 899 "regex.h2"
+#line 893 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 903 "regex.h2"
+#line 897 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, cur, inout ctx, other) -> _ = {\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    r := ctx.pass(cur);\n");
         CPP2_UFCS(add_tabs)((*cpp2::impl::assert_not_null(cpp2::move(cur))), 2);
     }
 
-#line 912 "regex.h2"
+#line 906 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 918 "regex.h2"
+#line 912 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         CPP2_UFCS(remove_tabs)((*cpp2::impl::assert_not_null(cur)), 2);
@@ -2467,38 +2451,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 930 "regex.h2"
+#line 924 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx)");
     }
 
-#line 934 "regex.h2"
+#line 928 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 938 "regex.h2"
+#line 932 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 944 "regex.h2"
+#line 938 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 950 "regex.h2"
+#line 944 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 956 "regex.h2"
+#line 950 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         CPP2_UFCS(push_back)(gen_stack, generation_function_context());
         auto cur {get_current()}; 
@@ -2507,7 +2491,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 964 "regex.h2"
+#line 958 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2516,7 +2500,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(pop_back)(gen_stack);
     }
 
-#line 972 "regex.h2"
+#line 966 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2539,29 +2523,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1000 "regex.h2"
+#line 994 "regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1003 "regex.h2"
+#line 997 "regex.h2"
     }
 
-#line 1005 "regex.h2"
+#line 999 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(token)), ctx);
         }
     }
 
-#line 1011 "regex.h2"
+#line 1005 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(token)), groups);
         }
     }
 
-#line 1017 "regex.h2"
+#line 1011 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2572,74 +2556,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1030 "regex.h2"
+#line 1024 "regex.h2"
     regex_token_base::regex_token_base(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 1032 "regex.h2"
+#line 1026 "regex.h2"
     }
 
-#line 1034 "regex.h2"
+#line 1028 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1036 "regex.h2"
+#line 1030 "regex.h2"
     }
 
-#line 1038 "regex.h2"
+#line 1032 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1046 "regex.h2"
+#line 1040 "regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1049 "regex.h2"
+#line 1043 "regex.h2"
     }
 
-#line 1051 "regex.h2"
+#line 1045 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1061 "regex.h2"
+#line 1055 "regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1064 "regex.h2"
+#line 1058 "regex.h2"
     }
 
-#line 1066 "regex.h2"
+#line 1060 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add)(ctx, code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1075 "regex.h2"
+#line 1069 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token_base{ str }{
 
-#line 1077 "regex.h2"
+#line 1071 "regex.h2"
     }
 
-#line 1079 "regex.h2"
+#line 1073 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1091 "regex.h2"
+#line 1085 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1093 "regex.h2"
+#line 1087 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
 
@@ -2648,22 +2632,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1101 "regex.h2"
+#line 1095 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1112 "regex.h2"
+#line 1106 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1115 "regex.h2"
+#line 1109 "regex.h2"
     }
 
-#line 1117 "regex.h2"
+#line 1111 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2680,14 +2664,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1133 "regex.h2"
+#line 1127 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(cur)), groups);
         }
     }
 
-#line 1139 "regex.h2"
+#line 1133 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2702,11 +2686,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1154 "regex.h2"
+#line 1148 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1157 "regex.h2"
+#line 1151 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2725,29 +2709,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1183 "regex.h2"
+#line 1177 "regex.h2"
     any_token::any_token(cpp2::impl::in single_line_)
         : regex_token_base{ "." }
         , single_line{ single_line_ }{
 
-#line 1185 "regex.h2"
+#line 1179 "regex.h2"
     }
 
-#line 1187 "regex.h2"
+#line 1181 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::single_line)); 
     }
 
-#line 1193 "regex.h2"
+#line 1187 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1198 "regex.h2"
+#line 1192 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2759,21 +2743,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1215 "regex.h2"
+#line 1209 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token_base{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1219 "regex.h2"
+#line 1213 "regex.h2"
     }
 
-#line 1221 "regex.h2"
+#line 1215 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive)); 
     }
 
-#line 1225 "regex.h2"
+#line 1219 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             auto upper {safe_toupper(token)}; 
@@ -2793,7 +2777,7 @@ template [[nodiscard]] auto any_token_matcher(
 
     char_token::~char_token() noexcept{}
 
-#line 1243 "regex.h2"
+#line 1237 "regex.h2"
 template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end && *cpp2::impl::assert_not_null(cur) == C) {
         cur += 1;
@@ -2804,7 +2788,7 @@ template [[nodiscard]] auto char_token_matcher(auto& cu
     }
 }
 
-#line 1253 "regex.h2"
+#line 1247 "regex.h2"
 template [[nodiscard]] auto char_token_case_insensitive_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end && (*cpp2::impl::assert_not_null(cur) == L || *cpp2::impl::assert_not_null(cur) == U)) {
         cur += 1;
@@ -2815,17 +2799,17 @@ template [[nodiscard]] auto char_token_case_in
     }
 }
 
-#line 1272 "regex.h2"
+#line 1266 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1277 "regex.h2"
+#line 1271 "regex.h2"
     }
 
-#line 1280 "regex.h2"
+#line 1274 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
 
@@ -2934,12 +2918,12 @@ template [[nodiscard]] auto char_token_case_in
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1388 "regex.h2"
+#line 1382 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
-#line 1393 "regex.h2"
+#line 1387 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
@@ -2949,7 +2933,7 @@ template [[nodiscard]] auto char_token_case_in
 
     class_token::~class_token() noexcept{}
 
-#line 1403 "regex.h2"
+#line 1397 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -2971,7 +2955,7 @@ template [[nodiscard]] auto char_token_case_in
         }
     }
 
-#line 1424 "regex.h2"
+#line 1418 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2984,11 +2968,11 @@ template [[nodiscard]] auto char_token_case_in
         return r; 
     }
 
-#line 1449 "regex.h2"
+#line 1443 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
-#line 1453 "regex.h2"
+#line 1447 "regex.h2"
     if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
         return nullptr; 
     }
@@ -3008,22 +2992,22 @@ template [[nodiscard]] auto char_token_case_in
 
 }
 
-#line 1477 "regex.h2"
+#line 1471 "regex.h2"
     escaped_char_token::escaped_char_token(cpp2::impl::in t)
         : regex_token_base{ "\\\\" + cpp2::to_string(t) }
         , token{ t }{
 
-#line 1480 "regex.h2"
+#line 1474 "regex.h2"
     }
 
-#line 1482 "regex.h2"
+#line 1476 "regex.h2"
     auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     escaped_char_token::~escaped_char_token() noexcept{}
 
-#line 1489 "regex.h2"
+#line 1483 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
 
@@ -3031,16 +3015,16 @@ template [[nodiscard]] auto char_token_case_in
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
 }
 
-#line 1508 "regex.h2"
+#line 1502 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token_base{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1512 "regex.h2"
+#line 1506 "regex.h2"
     }
 
-#line 1514 "regex.h2"
+#line 1508 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3133,14 +3117,14 @@ template [[nodiscard]] auto char_token_case_in
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1606 "regex.h2"
+#line 1600 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1611 "regex.h2"
+#line 1605 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {CPP2_UFCS(get_group)(ctx, group)}; 
 
@@ -3166,7 +3150,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1642 "regex.h2"
+#line 1636 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
 
@@ -3180,7 +3164,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1655 "regex.h2"
+#line 1649 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
 
@@ -3308,7 +3292,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1782 "regex.h2"
+#line 1776 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != CPP2_UFCS(size)(name)) {
@@ -3326,7 +3310,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(inner_))) + ")"; 
     }
 
-#line 1799 "regex.h2"
+#line 1793 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3345,7 +3329,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1817 "regex.h2"
+#line 1811 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner)), groups);
         if (-1 != number) {
@@ -3355,7 +3339,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1827 "regex.h2"
+#line 1821 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
 
@@ -3395,7 +3379,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1868 "regex.h2"
+#line 1862 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
         if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
@@ -3412,7 +3396,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1884 "regex.h2"
+#line 1878 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3425,7 +3409,7 @@ template [[
     }}
 }
 
-#line 1898 "regex.h2"
+#line 1892 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
 
@@ -3438,35 +3422,35 @@ template [[
     }
 }
 
-#line 1910 "regex.h2"
+#line 1904 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1923 "regex.h2"
+#line 1917 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1925 "regex.h2"
+#line 1919 "regex.h2"
     }
 
-#line 1927 "regex.h2"
+#line 1921 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
 
         CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1933 "regex.h2"
+#line 1927 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner)), groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1938 "regex.h2"
+#line 1932 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3476,7 +3460,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 1950 "regex.h2"
+#line 1944 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3501,7 +3485,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 1990 "regex.h2"
+#line 1984 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
 
@@ -3526,11 +3510,11 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2024 "regex.h2"
+#line 2018 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2026 "regex.h2"
+#line 2020 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (CPP2_UFCS(current)(ctx) == '{') {
@@ -3574,7 +3558,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2070 "regex.h2"
+#line 2064 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3601,7 +3585,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2096 "regex.h2"
+#line 2090 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (CPP2_UFCS(peek)(ctx) == '?') {
             kind = range_flags::not_greedy;
@@ -3613,7 +3597,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2107 "regex.h2"
+#line 2101 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3626,7 +3610,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2119 "regex.h2"
+#line 2113 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3651,7 +3635,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2143 "regex.h2"
+#line 2137 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
         std::set groups {}; 
@@ -3662,14 +3646,14 @@ template [[nodiscard]] auto lookahead_token_match
         CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2153 "regex.h2"
+#line 2147 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner_token)), groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2161 "regex.h2"
+#line 2155 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3682,26 +3666,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2173 "regex.h2"
+#line 2167 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2178 "regex.h2"
+#line 2172 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2183 "regex.h2"
+#line 2177 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2189 "regex.h2"
+#line 2183 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {CPP2_UFCS(pass)(ctx, cur)}; 
         auto count {0}; 
@@ -3717,7 +3701,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2204 "regex.h2"
+#line 2198 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3746,7 +3730,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2232 "regex.h2"
+#line 2226 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3771,7 +3755,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2256 "regex.h2"
+#line 2250 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3797,7 +3781,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2287 "regex.h2"
+#line 2281 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3820,7 +3804,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
 
-#line 2310 "regex.h2"
+#line 2304 "regex.h2"
         CPP2_UFCS(parse_modifier)((*cpp2::impl::assert_not_null(r)), ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
@@ -3830,7 +3814,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2322 "regex.h2"
+#line 2316 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
 
@@ -3847,7 +3831,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2338 "regex.h2"
+#line 2332 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3872,67 +3856,67 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2380 "regex.h2"
-        template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
+#line 2376 "regex.h2"
+        template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2383 "regex.h2"
+#line 2379 "regex.h2"
         }
 
-#line 2385 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 2381 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
+#line 2382 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+#line 2383 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+#line 2384 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+
 #line 2386 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
 #line 2387 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
 #line 2388 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
 #line 2390 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2391 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2392 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
-
-#line 2394 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
-            auto group_id {Matcher::get_named_group_index(g)}; 
+        template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
+            auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
                 // TODO: Throw error.
             }
             return group_id; 
         }
 
-#line 2403 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2404 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2405 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2406 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
-        context ctx {start, end}; 
-
-        auto r {Matcher::entry(start, ctx)}; 
-        return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
-    }
-
-#line 2413 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2414 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2415 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2416 "regex.h2"
-    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
+#line 2399 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 2400 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 2401 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
+#line 2402 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
+        context ctx {start, end}; 
+
+        auto r {matcher::entry(start, ctx)}; 
+        return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
+    }
+
+#line 2409 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
+#line 2410 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
+#line 2411 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
+#line 2412 "regex.h2"
+    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
-        context ctx {start, end}; 
+        context ctx {start, end}; 
 
         auto cur {start}; 
         for( ; true; (++cur) ) {
-            if (Matcher::entry(cur, ctx).matched) {
+            if (matcher::entry(cur, ctx).matched) {
                 matched = true;
                 break;
             }
@@ -3942,14 +3926,14 @@ template [[nodiscard]] auto word_boundary_token_mat
             }
         }
 
-        return search_return(cpp2::move(matched), cpp2::move(ctx)); 
+        return search_return(cpp2::move(matched), cpp2::move(ctx)); 
     }
 
-#line 2435 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return Matcher::to_string();  }
+#line 2431 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2440 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
+#line 2436 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,CPP2_UFCS(size)(str))) {
             return CPP2_UFCS(begin)(str) + pos; 
         }
@@ -3958,22 +3942,22 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2470 "regex.h2"
+#line 2465 "regex.h2"
     template  regex_parser::regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2474 "regex.h2"
+#line 2469 "regex.h2"
     }
 
-#line 2478 "regex.h2"
+#line 2473 "regex.h2"
     template  auto regex_parser::error(cpp2::impl::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2486 "regex.h2"
+#line 2481 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_context parse_ctx {regex}; 
         std::string mod {modifier}; 
@@ -3983,20 +3967,23 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
 
         source += "{\n";
-        source += ("  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n");
+        source += " wrap:  type = {\n"; // TODO: Remove wrapper when template template parameters are available.
+        source += ("  context: type == cpp2::regex::match_context;");
 
         generation_context gen_ctx {}; 
         source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(parse_ctx));
-        source += "  entry: (cur, inout ctx) -> _ = {\n";
+        source += "  entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
         source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(gen_ctx)) + "(cur, ctx, cpp2::regex::true_end_func());\n");
         source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
+        source += CPP2_UFCS(create_named_group_lookup)(cpp2::move(gen_ctx), parse_ctx.named_groups);
+        source += "}\n";
+
         auto string {CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_tokens)(parse_ctx))))}; 
         source += ("  to_string: () -> std::string = { return \"" + cpp2::to_string(cpp2::move(string)) + "\"; }\n");
-        source += CPP2_UFCS(create_named_group_lookup)(cpp2::move(gen_ctx), parse_ctx.named_groups);
         source += "}\n";
 
         static_cast(cpp2::move(parse_ctx));
@@ -4004,7 +3991,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2517 "regex.h2"
+#line 2515 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {CPP2_UFCS(parse)(parser)}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 3675126fa8..c5801d5095 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -13,6 +13,9 @@
 #include 
 #include 
 
+template
+using matcher_wrapper_type = typename matcher_wrapper::wrap;
+
 cpp2: namespace = {
 
 regex: namespace = {
@@ -59,13 +62,12 @@ match_return: @struct  type = {
     pos: Iter = ();
 }
 
-match_context:  type =
+match_context:  type =
 {
     public begin: Iter;
     public end: Iter;
 
     private groups: std::array, max_groups> = ();
-    private alternatives_pos: std::array = ();
 
     operator=: (out this, begin_: Iter, end_: Iter) = {
         begin = begin_;
@@ -112,14 +114,6 @@ match_context:  type =
 
     size: (in this) max_groups;
 
-    // Getter and setter for alternatives
-
-    get_alternative_pos: (in this, alternative) alternatives_pos[alternative];
-
-    set_alternative_pos: (inout this, alternative, pos) = {
-        alternatives_pos[alternative] = pos;
-    }
-
     // Misc functions
     //
     print_ranges: (in this) -> bstring = {
@@ -904,7 +898,7 @@ generation_context: type = {
         cur := new_context();
 
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
-        cur*.code += "(cur*.tabs)$  operator(): (this, cur, inout ctx, other) -> _ = {\n";
+        cur*.code += "(cur*.tabs)$  operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n";
         cur*.code += "(cur*.tabs)$    r := ctx.pass(cur);\n";
         cur*.add_tabs(2);
     }
@@ -2368,9 +2362,11 @@ word_boundary_token_matcher:  (inout cur, inout ctx) -> boo
 //
 
 // Regular expression implementation
-regular_expression:  type = {
+regular_expression:  type = {
 
-    context:  type == match_context;
+
+    matcher:  type == matcher_wrapper_type; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
+    context:  type == matcher::context;
 
     // TODO: Named multiple return has problems with templates.
     search_return:  type = {
@@ -2392,7 +2388,7 @@ regular_expression:  type = {
         group_end:    (this, g: bstring) group_end(get_group_id(g));
 
         private get_group_id: (this, g: bstring) -> _ = {
-            group_id := Matcher::get_named_group_index(g);
+            group_id := matcher::get_named_group_index(g);
             if -1 == group_id {
                 // TODO: Throw error.
             }
@@ -2404,10 +2400,10 @@ regular_expression:  type = {
     match: (in this, str: bview, start)          match(get_iter(str, start), str.end());
     match: (in this, str: bview, start, length)  match(get_iter(str, start), get_iter(str, start + length));
     match:  (in this, start: Iter, end: Iter) -> search_return = {
-        ctx: context = (start, end);
+        ctx: context = (start, end);
 
-        r := Matcher::entry(start, ctx);
-        return search_return(r.matched && r.pos == end, ctx);
+        r := matcher::entry(start, ctx);
+        return search_return(r.matched && r.pos == end, ctx);
     }
 
     search: (in this, str: bview)                 search(str.begin(), str.end());
@@ -2415,11 +2411,11 @@ regular_expression:  type = {
     search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
     search:  (in this, start: Iter, end: Iter) -> search_return = {
         matched := false;
-        ctx: context = (start, end);
+        ctx: context = (start, end);
 
         cur:= start;
         while true next (cur++) {
-            if Matcher::entry(cur, ctx).matched {
+            if matcher::entry(cur, ctx).matched {
                 matched = true;
                 break;
             }
@@ -2429,10 +2425,10 @@ regular_expression:  type = {
             }
         }
 
-        return search_return(matched, ctx);
+        return search_return(matched, ctx);
     }
 
-    to_string: (in this) Matcher::to_string();
+    to_string: (in this) matcher_wrapper::to_string();
 
     // Helper functions
     //
@@ -2462,7 +2458,6 @@ regex_parser:  type = {
     error_out: Error_out;
 
     pos:                    size_t = 0;
-    alternatives_count:     int = 0;
     has_error:              bool = false;
 
     source: std::string = "";
@@ -2492,20 +2487,23 @@ regex_parser:  type = {
         }
 
         source += "{\n";
-        source += "  group_count: type == std::integral_constant;  //TODO: Use static constexpr when alpha limitation of nested types declarations is lifted.\n";
+        source += " wrap:  type = {\n"; // TODO: Remove wrapper when template template parameters are available.
+        source += "  context: type == cpp2::regex::match_context;";
 
         gen_ctx: generation_context = ();
         source += gen_ctx.run(parse_ctx.get_tokens());
-        source += "  entry: (cur, inout ctx) -> _ = {\n";
+        source += "  entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n";
         source += "    ctx.set_group_start(0, cur);\n";
         source += "    r := (gen_ctx.get_entry_func())$(cur, ctx, cpp2::regex::true_end_func());\n";
         source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
+        source += gen_ctx.create_named_group_lookup(parse_ctx.named_groups);
+        source += "}\n";
+
         string := parse_ctx.get_tokens()*.to_string();
         source += "  to_string: () -> std::string = { return \"(string)$\"; }\n";
-        source += gen_ctx.create_named_group_lookup(parse_ctx.named_groups);
         source += "}\n";
 
         _ = parse_ctx;

From d834167f2b17cfd6c02ea9b607347a2740739280 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 10 Jun 2024 18:04:13 +0200
Subject: [PATCH 128/161] Agglomeration of character matchers.

---
 source/regex.h2 | 169 +++++++++++++++++++++++++++++++++++-------------
 1 file changed, 123 insertions(+), 46 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index c5801d5095..fc95f56a07 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -377,7 +377,15 @@ parse_context_group_state: @struct type = {
         }
     }
 
-    add: (inout this, token: token_ptr) = cur_match_list.push_back(token);
+    add: (inout this, token: token_ptr) = {
+        if token* is char_token && !cur_match_list.empty() && cur_match_list.back()* is char_token {
+            // This and the last token are char tokens. Combine them.
+            (cur_match_list.back()* as char_token).append(token* as char_token);
+        }
+        else {
+            cur_match_list.push_back(token);
+        }
+    }
 
     empty: (this) -> bool = cur_match_list.empty();
 }
@@ -1203,7 +1211,7 @@ any_token_matcher:  (inout cur, inout ctx) -> bool = {
 char_token: @polymorphic_base type = {
     this: regex_token_base;
 
-    token: char;
+    token: std::string;
     ignore_case: bool;
 
     operator=: (out this, t: char, ignore_case_: bool) = {
@@ -1218,41 +1226,113 @@ char_token: @polymorphic_base type = {
 
     generate_code: (override this, inout ctx: generation_context) = {
         if ignore_case {
-            upper: = safe_toupper(token);
-            lower: = safe_tolower(token);
+            upper: std::string = token;
+            lower: std::string = token;
+
+            (copy i: int = 0) while i < token.ssize() next i += 1 {
+                lower[i] = safe_tolower(token[i]);
+                upper[i] = safe_toupper(token[i]);
+            }
 
             if upper != lower {
-                ctx.add_check("char_token_case_insensitive_matcher((ctx.match_parameters())$)");
+                gen_case_insensitive(lower, upper, ctx);
             }
             else {
-                ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
+                gen_case_sensitive(ctx);
             }
         }
         else {
-            ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
-        }
-    }
-}
-
-char_token_matcher:  (inout cur, inout ctx) -> bool = {
-    if cur != ctx.end && cur* == C {
-        cur += 1;
-        return true;
-    }
-    else {
-        return false;
-    }
-}
-
-char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
-    if cur != ctx.end && (cur* == L || cur* == U) {
-        cur += 1;
-        return true;
-    }
-    else {
-        return false;
-    }
-}
+            gen_case_sensitive(ctx);
+        }
+    }
+
+    gen_case_insensitive: (this, lower: std::string, upper: std::string, inout ctx: generation_context) = {
+        name: std::string = "str_(ctx.gen_temp())$";
+        lower_name: std::string = "lower_(name)$";
+        upper_name: std::string = "upper_(name)$";
+        size := token.size();
+        ctx.add("(lower_name)$ : std::array = \"(add_escapes(lower))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx.add("(upper_name)$ : std::array = \"(add_escapes(upper))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx.add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
+        ctx.add("    r.matched = false;");
+        ctx.add("    return r;");
+        ctx.add("}");
+        ctx.add("");
+        ctx.add("(copy i : int = 0) while i < (size)$ next (i += 1) {");
+        ctx.add("    if !((lower_name)$[i] == r.pos[i] || (upper_name)$[i] == r.pos[i]) { r.matched = false; }");
+        ctx.add("}");
+        ctx.add("");
+        ctx.add("if r.matched { r.pos += (size)$; }");
+        ctx.add("else { return r; }");
+    }
+
+    gen_case_sensitive: (this, inout ctx: generation_context) = {
+        name: std::string = "str_(ctx.gen_temp())$";
+        size := token.size();
+        ctx.add("(name)$ : std::array = \"(add_escapes(token))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx.add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
+        ctx.add("    r.matched = false;");
+        ctx.add("    return r;");
+        ctx.add("}");
+        ctx.add("");
+        ctx.add("(copy i : int = 0) while i < (size)$ next (i += 1) {");
+        ctx.add("    if (name)$[i] != r.pos[i] { r.matched = false; }");
+        ctx.add("}");
+        ctx.add("");
+        ctx.add("if r.matched { r.pos += (size)$; }");
+        ctx.add("else { break; }");
+    }
+
+    add_escapes: (this, copy str: std::string) -> std::string = {
+        str = replace_all(str, "\\", "\\\\");
+        str = replace_all(str, "\a", "\\a");
+        str = replace_all(str, "\f", "\\f");
+        str = replace_all(str, "\e", "\\e");
+        str = replace_all(str, "\n", "\\n");
+        str = replace_all(str, "\r", "\\r");
+        str = replace_all(str, "\t", "\\t");
+
+        return str;
+    }
+
+    append: (inout this, that) = {
+        this.token += that.token;
+        this.string_rep += that.string_rep;
+    }
+}
+
+// TODO: Check if vectorization works at some point with this implementation.
+// char_token_matcher:  (inout cur, inout ctx) -> bool = {
+//     if !(std::distance(cur, ctx.end) < tokens.size()) {
+//         return false;
+//     }
+//     matched : bool = true;
+//     (copy i: int = 0) while i < tokens.size() next i += 1 {
+//         if tokens.data()[i] != cur[i] {
+//             matched = false; // No break for performance optimization. Without break, the loop vectorizes.
+//         }
+//     }
+//     if matched {
+//         cur += tokens.size();
+//     }
+//     return matched;
+// }
+
+// char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
+//     if !(std::distance(cur, ctx.end) < lower.size()) {
+//         return false;
+//     }
+//     matched : bool = true;
+//     (copy i : int = 0) while i < lower.size() next i += 1 {
+//         if !(lower.data()[i] == cur[i] || upper.data()[i] == cur[i]) {
+//             matched = false; // No break for performance optimization. Without break, the loop vectorizes.
+//         }
+//     }
+//     if matched {
+//         cur += lower.size();
+//     }
+//     return matched;
+// }
 
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
@@ -1452,7 +1532,19 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
     if std::string::npos != std::string("afenrt\\").find(ctx.current()) {
         // Escape of string special char
-        return shared.new(ctx.current());
+        t : char = '\0';
+        if      'a' == ctx.current() { t = '\a'; }
+        else if 'f' == ctx.current() { t = '\f'; }
+        else if 'e' == ctx.current() { t = '\e'; }
+        else if 'n' == ctx.current() { t = '\n'; }
+        else if 'r' == ctx.current() { t = '\r'; }
+        else if 't' == ctx.current() { t = '\t'; }
+        else if '\\' == ctx.current() { t = '\\'; }
+        else { /* TODO: throw error */ }
+        r: = shared.new(t, false);
+        r*.set_string("\\\\(ctx.current())$");
+
+        return r;
     } else {
         // Escape of regex special char
         r := shared.new(ctx.current(), false);
@@ -1463,21 +1555,6 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
 }
 
-escaped_char_token: @polymorphic_base type = {
-    this: regex_token_base;
-
-    token: char;
-
-    operator=: (out this, t: char) = {
-        regex_token_base = "\\\\(t)$";
-        token = t;
-    }
-
-    generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("char_token_matcher((ctx.match_parameters())$)");
-    }
-}
-
 // Regex syntax: \K Example: ab\Kcd
 //
 global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = {

From d11cde9210822758853f2cf98810d9d000dc4861 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 12 Jun 2024 08:43:42 +0200
Subject: [PATCH 129/161] Refactored function generation to do .. while loop.

---
 source/regex.h2 | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/source/regex.h2 b/source/regex.h2
index fc95f56a07..1da1fadf1c 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -844,7 +844,7 @@ generation_context: type = {
 
     add_check: (inout this, check: std::string) = {
         cur := get_current();
-        cur*.code += "(cur*.tabs)$if !cpp2::regex::(check)$ { r = ctx.fail(); return r; }\n";
+        cur*.code += "(cur*.tabs)$if !cpp2::regex::(check)$ { r.matched = false; break; }\n";
     }
 
     add_statefull: (inout this, next_func: std::string, c: std::string) = {
@@ -908,7 +908,8 @@ generation_context: type = {
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
         cur*.code += "(cur*.tabs)$  operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n";
         cur*.code += "(cur*.tabs)$    r := ctx.pass(cur);\n";
-        cur*.add_tabs(2);
+        cur*.code += "(cur*.tabs)$    do {\n";
+        cur*.add_tabs(3);
     }
 
     start_func: (inout this) -> std::string = {
@@ -919,9 +920,15 @@ generation_context: type = {
 
     end_func_statefull: (inout this, s: std::string) = {
         cur := get_current();
-        cur*.remove_tabs(2);
+        cur*.remove_tabs(3);
         cur*.code += "\n";
-        cur*.code += "(cur*.tabs)$    r = (s)$;\n";
+        cur*.code += "(cur*.tabs)$    } while false;\n";
+        cur*.code += "(cur*.tabs)$    if r.matched {\n";
+        cur*.code += "(cur*.tabs)$      r = (s)$;\n";
+        cur*.code += "(cur*.tabs)$    }\n";
+        cur*.code += "(cur*.tabs)$    else {\n";
+        cur*.code += "(cur*.tabs)$      r.pos = ctx.end;\n";
+        cur*.code += "(cur*.tabs)$    }\n";
         cur*.code += "(cur*.tabs)$    return r;\n";
         cur*.code += "(cur*.tabs)$  }\n";
         cur*.code += "(cur*.tabs)$}\n";
@@ -1255,7 +1262,7 @@ char_token: @polymorphic_base type = {
         ctx.add("(upper_name)$ : std::array = \"(add_escapes(upper))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
         ctx.add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
         ctx.add("    r.matched = false;");
-        ctx.add("    return r;");
+        ctx.add("    break;");
         ctx.add("}");
         ctx.add("");
         ctx.add("(copy i : int = 0) while i < (size)$ next (i += 1) {");
@@ -1263,7 +1270,7 @@ char_token: @polymorphic_base type = {
         ctx.add("}");
         ctx.add("");
         ctx.add("if r.matched { r.pos += (size)$; }");
-        ctx.add("else { return r; }");
+        ctx.add("else { break; }");
     }
 
     gen_case_sensitive: (this, inout ctx: generation_context) = {
@@ -1272,7 +1279,7 @@ char_token: @polymorphic_base type = {
         ctx.add("(name)$ : std::array = \"(add_escapes(token))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
         ctx.add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
         ctx.add("    r.matched = false;");
-        ctx.add("    return r;");
+        ctx.add("    break;");
         ctx.add("}");
         ctx.add("");
         ctx.add("(copy i : int = 0) while i < (size)$ next (i += 1) {");

From 4a498f219368d085e01f86f0c85c335723ecdbf9 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 16 Jun 2024 12:09:48 +0200
Subject: [PATCH 130/161] Removed UFCS calls.

---
 include/cpp2regex.h | 1648 ++++++++++++++++++++++---------------------
 source/regex.h2     |  776 ++++++++++----------
 2 files changed, 1250 insertions(+), 1174 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 4e46ed0b87..fd5ba9ed81 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -93,101 +93,97 @@ class regex_token;
 #line 348 "regex.h2"
 class parse_context_group_state;
 
-#line 386 "regex.h2"
+#line 394 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 419 "regex.h2"
+#line 427 "regex.h2"
 class parse_context;
     
 
-#line 804 "regex.h2"
+#line 812 "regex.h2"
 class generation_function_context;
     
 
-#line 820 "regex.h2"
+#line 828 "regex.h2"
 class generation_context;
 
-#line 989 "regex.h2"
+#line 1004 "regex.h2"
 class regex_token_list;
     
 
-#line 1021 "regex.h2"
+#line 1036 "regex.h2"
 class regex_token_base;
     
 
-#line 1035 "regex.h2"
+#line 1050 "regex.h2"
 class regex_token_check;
     
 
-#line 1050 "regex.h2"
+#line 1065 "regex.h2"
 class regex_token_code;
     
 
-#line 1066 "regex.h2"
+#line 1081 "regex.h2"
 class regex_token_empty;
     
 
-#line 1082 "regex.h2"
+#line 1097 "regex.h2"
 class alternative_token;
     
 
-#line 1100 "regex.h2"
+#line 1115 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1146 "regex.h2"
+#line 1161 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1172 "regex.h2"
+#line 1187 "regex.h2"
 class any_token;
     
 
-#line 1203 "regex.h2"
+#line 1218 "regex.h2"
 class char_token;
     
 
-#line 1259 "regex.h2"
+#line 1346 "regex.h2"
 class class_token;
     
 
-#line 1395 "regex.h2"
+#line 1482 "regex.h2"
 template class class_token_matcher;
 
-#line 1466 "regex.h2"
-class escaped_char_token;
-    
-
-#line 1496 "regex.h2"
+#line 1580 "regex.h2"
 class group_ref_token;
     
 
-#line 1630 "regex.h2"
+#line 1714 "regex.h2"
 class group_token;
     
 
-#line 1911 "regex.h2"
+#line 1995 "regex.h2"
 class lookahead_token;
     
 
-#line 2010 "regex.h2"
+#line 2094 "regex.h2"
 class range_token;
     
 
-#line 2153 "regex.h2"
+#line 2237 "regex.h2"
 template class range_token_matcher;
 
-#line 2278 "regex.h2"
+#line 2362 "regex.h2"
 class special_range_token;
     
 
-#line 2365 "regex.h2"
+#line 2449 "regex.h2"
 template class regular_expression;
 
-#line 2454 "regex.h2"
+#line 2538 "regex.h2"
 template class regex_parser;
 
-#line 2522 "regex.h2"
+#line 2606 "regex.h2"
 }
 }
 
@@ -578,6 +574,7 @@ class parse_context_group_state {
 #line 380 "regex.h2"
     public: auto add(cpp2::impl::in token) & -> void;
 
+#line 390 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
 };
 
@@ -590,16 +587,16 @@ class parse_context_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 400 "regex.h2"
+#line 408 "regex.h2"
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 405 "regex.h2"
+#line 413 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 411 "regex.h2"
+#line 419 "regex.h2"
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
 
-#line 417 "regex.h2"
+#line 425 "regex.h2"
 };
 
 class parse_context {
@@ -615,39 +612,39 @@ class parse_context {
 
     private: token_ptr root; 
 
-#line 433 "regex.h2"
+#line 441 "regex.h2"
     public: explicit parse_context(cpp2::impl::in r);
-#line 433 "regex.h2"
+#line 441 "regex.h2"
     public: auto operator=(cpp2::impl::in r) -> parse_context& ;
 
-#line 438 "regex.h2"
+#line 446 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 448 "regex.h2"
+#line 456 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 454 "regex.h2"
+#line 462 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 458 "regex.h2"
+#line 466 "regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 462 "regex.h2"
+#line 470 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 473 "regex.h2"
+#line 481 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 479 "regex.h2"
+#line 487 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 484 "regex.h2"
+#line 492 "regex.h2"
     // Position management functions
     //
 
@@ -657,87 +654,87 @@ class parse_context {
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 495 "regex.h2"
+#line 503 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 499 "regex.h2"
+#line 507 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 509 "regex.h2"
+#line 517 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 513 "regex.h2"
+#line 521 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 518 "regex.h2"
+#line 526 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 522 "regex.h2"
+#line 530 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 528 "regex.h2"
+#line 536 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 538 "regex.h2"
+#line 546 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 550 "regex.h2"
+#line 558 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 563 "regex.h2"
+#line 571 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
 
-#line 572 "regex.h2"
+#line 580 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 584 "regex.h2"
+#line 592 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::impl::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 625 "regex.h2"
+#line 633 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 646 "regex.h2"
+#line 654 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 662 "regex.h2"
+#line 670 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 682 "regex.h2"
+#line 690 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 692 "regex.h2"
+#line 700 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 750 "regex.h2"
+#line 758 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 787 "regex.h2"
+#line 795 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 802 "regex.h2"
+#line 810 "regex.h2"
 };
 
 class generation_function_context {
@@ -746,10 +743,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 815 "regex.h2"
+#line 823 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 818 "regex.h2"
+#line 826 "regex.h2"
 };
 
 class generation_context {
@@ -766,84 +763,84 @@ class generation_context {
 
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 837 "regex.h2"
+#line 845 "regex.h2"
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 842 "regex.h2"
+#line 850 "regex.h2"
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void;
 
-#line 849 "regex.h2"
+#line 857 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
 
-#line 855 "regex.h2"
+#line 863 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 863 "regex.h2"
+#line 871 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 885 "regex.h2"
+#line 893 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 889 "regex.h2"
+#line 897 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 893 "regex.h2"
+#line 901 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 897 "regex.h2"
+#line 905 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 906 "regex.h2"
+#line 915 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 912 "regex.h2"
+#line 921 "regex.h2"
     public: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 924 "regex.h2"
+#line 939 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 928 "regex.h2"
+#line 943 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 932 "regex.h2"
+#line 947 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 938 "regex.h2"
+#line 953 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 944 "regex.h2"
+#line 959 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 950 "regex.h2"
+#line 965 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 958 "regex.h2"
+#line 973 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 966 "regex.h2"
+#line 981 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 987 "regex.h2"
+#line 1002 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 992 "regex.h2"
+#line 1007 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 999 "regex.h2"
+#line 1014 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1005 "regex.h2"
+#line 1020 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1011 "regex.h2"
+#line 1026 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -851,36 +848,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1018 "regex.h2"
+#line 1033 "regex.h2"
 };
 
-#line 1021 "regex.h2"
+#line 1036 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1024 "regex.h2"
+#line 1039 "regex.h2"
     public: explicit regex_token_base(cpp2::impl::in str);
 
-#line 1028 "regex.h2"
+#line 1043 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1032 "regex.h2"
+#line 1047 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1033 "regex.h2"
+#line 1048 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1038 "regex.h2"
+#line 1053 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 1045 "regex.h2"
+#line 1060 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -888,17 +885,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1048 "regex.h2"
+#line 1063 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1053 "regex.h2"
+#line 1068 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 1060 "regex.h2"
+#line 1075 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -906,16 +903,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1063 "regex.h2"
+#line 1078 "regex.h2"
 };
 
-#line 1066 "regex.h2"
+#line 1081 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1069 "regex.h2"
+#line 1084 "regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 1073 "regex.h2"
+#line 1088 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -923,7 +920,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1076 "regex.h2"
+#line 1091 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -932,12 +929,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1085 "regex.h2"
+#line 1100 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1095 "regex.h2"
+#line 1110 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -945,23 +942,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1098 "regex.h2"
+#line 1113 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1104 "regex.h2"
+#line 1119 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1111 "regex.h2"
+#line 1126 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1127 "regex.h2"
+#line 1142 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1133 "regex.h2"
+#line 1148 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -969,36 +966,36 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1144 "regex.h2"
+#line 1159 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1151 "regex.h2"
+#line 1166 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1168 "regex.h2"
+#line 1183 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1175 "regex.h2"
+#line 1190 "regex.h2"
     private: bool single_line; 
 
     public: explicit any_token(cpp2::impl::in single_line_);
 
-#line 1181 "regex.h2"
+#line 1196 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1187 "regex.h2"
+#line 1202 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1006,59 +1003,98 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1190 "regex.h2"
+#line 1205 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1203 "regex.h2"
+#line 1218 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1206 "regex.h2"
-    private: char token; 
+#line 1221 "regex.h2"
+    private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1215 "regex.h2"
+#line 1230 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1219 "regex.h2"
+#line 1234 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
+
+#line 1256 "regex.h2"
+    public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
+
+#line 1276 "regex.h2"
+    public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
+
+#line 1293 "regex.h2"
+    public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
+
+#line 1305 "regex.h2"
+    public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
     public: char_token(char_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1235 "regex.h2"
+#line 1309 "regex.h2"
 };
 
-template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx) -> bool;
-
-#line 1247 "regex.h2"
-template [[nodiscard]] auto char_token_case_insensitive_matcher(auto& cur, auto& ctx) -> bool;
+// TODO: Check if vectorization works at some point with this implementation.
+// char_token_matcher:  (inout cur, inout ctx) -> bool = {
+//     if !(std::distance(cur, ctx.end) < tokens..size()) {
+//         return false;
+//     }
+//     matched : bool = true;
+//     (copy i: int = 0) while i < tokens..size() next i += 1 {
+//         if tokens..data()[i] != cur[i] {
+//             matched = false; // No break for performance optimization. Without break, the loop vectorizes.
+//         }
+//     }
+//     if matched {
+//         cur += tokens..size();
+//     }
+//     return matched;
+// }
+
+// char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
+//     if !(std::distance(cur, ctx.end) < lower..size()) {
+//         return false;
+//     }
+//     matched : bool = true;
+//     (copy i : int = 0) while i < lower..size() next i += 1 {
+//         if !(lower..data()[i] == cur[i] || upper..data()[i] == cur[i]) {
+//             matched = false; // No break for performance optimization. Without break, the loop vectorizes.
+//         }
+//     }
+//     if matched {
+//         cur += lower..size();
+//     }
+//     return matched;
+// }
 
-#line 1257 "regex.h2"
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class class_token: public regex_token_base {
 
-#line 1262 "regex.h2"
+#line 1349 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1273 "regex.h2"
+#line 1360 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1382 "regex.h2"
+#line 1469 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1387 "regex.h2"
+#line 1474 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1066,21 +1102,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1393 "regex.h2"
+#line 1480 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1418 "regex.h2"
+#line 1505 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1430 "regex.h2"
+#line 1517 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1092,35 +1128,17 @@ template c
 
     //     return r;
     // }
-#line 1441 "regex.h2"
+#line 1528 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1466 "regex.h2"
-class escaped_char_token: public regex_token_base {
-
-#line 1469 "regex.h2"
-    private: char token; 
-
-    public: explicit escaped_char_token(cpp2::impl::in t);
-
-#line 1476 "regex.h2"
-    public: auto generate_code(generation_context& ctx) const -> void override;
-    public: virtual ~escaped_char_token() noexcept;
-
-    public: escaped_char_token(escaped_char_token const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(escaped_char_token const&) -> void = delete;
-
-
-#line 1479 "regex.h2"
-};
-
+#line 1565 "regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1490 "regex.h2"
+#line 1574 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1129,16 +1147,16 @@ class escaped_char_token: public regex_token_base {
 //
 class group_ref_token: public regex_token_base {
 
-#line 1499 "regex.h2"
+#line 1583 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1508 "regex.h2"
+#line 1592 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1600 "regex.h2"
+#line 1684 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1146,30 +1164,30 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1603 "regex.h2"
+#line 1687 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1630 "regex.h2"
+#line 1714 "regex.h2"
 class group_token: public regex_token {
 
-#line 1633 "regex.h2"
+#line 1717 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1649 "regex.h2"
+#line 1733 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1776 "regex.h2"
+#line 1860 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1793 "regex.h2"
+#line 1877 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1811 "regex.h2"
+#line 1895 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1178,44 +1196,44 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1817 "regex.h2"
+#line 1901 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1860 "regex.h2"
+#line 1944 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1878 "regex.h2"
+#line 1962 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1890 "regex.h2"
+#line 1974 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1904 "regex.h2"
+#line 1988 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1909 "regex.h2"
+#line 1993 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1914 "regex.h2"
+#line 1998 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1921 "regex.h2"
+#line 2005 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1927 "regex.h2"
+#line 2011 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1223,18 +1241,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1930 "regex.h2"
+#line 2014 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1941 "regex.h2"
+#line 2025 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1968 "regex.h2"
+#line 2052 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1248,17 +1266,17 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 1982 "regex.h2"
+#line 2066 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2008 "regex.h2"
+#line 2092 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2013 "regex.h2"
+#line 2097 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1268,19 +1286,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2090 "regex.h2"
+#line 2174 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2101 "regex.h2"
+#line 2185 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2113 "regex.h2"
+#line 2197 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2137 "regex.h2"
+#line 2221 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2147 "regex.h2"
+#line 2231 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1288,46 +1306,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2151 "regex.h2"
+#line 2235 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2167 "regex.h2"
+#line 2251 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2172 "regex.h2"
+#line 2256 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2177 "regex.h2"
+#line 2261 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2183 "regex.h2"
+#line 2267 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2198 "regex.h2"
+#line 2282 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2226 "regex.h2"
+#line 2310 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2250 "regex.h2"
+#line 2334 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2274 "regex.h2"
+#line 2358 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2281 "regex.h2"
+#line 2365 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1336,7 +1354,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2310 "regex.h2"
+#line 2394 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1345,10 +1363,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2332 "regex.h2"
+#line 2416 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2357 "regex.h2"
+#line 2441 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1359,7 +1377,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 // Regular expression implementation
 template class regular_expression {
 
-#line 2368 "regex.h2"
+#line 2452 "regex.h2"
     public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     public: template using context = matcher::context;
 
@@ -1370,7 +1388,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_);
 
-#line 2381 "regex.h2"
+#line 2465 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1385,7 +1403,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2397 "regex.h2"
+#line 2481 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1393,13 +1411,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2409 "regex.h2"
+#line 2493 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2431 "regex.h2"
+#line 2515 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1411,7 +1429,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2444 "regex.h2"
+#line 2528 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1435,12 +1453,12 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e);
 
-#line 2471 "regex.h2"
+#line 2555 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::impl::in message) & -> void;
 
-#line 2478 "regex.h2"
+#line 2562 "regex.h2"
     // Parsing functions
     //
 
@@ -1449,12 +1467,12 @@ template class regex_parser {
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2513 "regex.h2"
+#line 2597 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string;
 
-#line 2522 "regex.h2"
+#line 2606 "regex.h2"
 }
 }
 
@@ -1679,7 +1697,7 @@ return cpp2::move(_ret) + ")";
     template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
 
 #line 161 "regex.h2"
-    [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return CPP2_UFCS(pass)(ctx, cur);  }
+    [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur);  }
 
 #line 164 "regex.h2"
 //-----------------------------------------------------------------------
@@ -1731,7 +1749,7 @@ return cpp2::move(_ret) + ")";
 #line 204 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
 #line 205 "regex.h2"
-    template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(CPP2_UFCS(data)(Name)) + ":]"; }
+    template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
 
 #line 210 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
@@ -1743,7 +1761,7 @@ return cpp2::move(_ret) + ")";
 #line 216 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
 #line 217 "regex.h2"
-    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return CPP2_UFCS(str)(Name); }
+    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
 
 #line 221 "regex.h2"
 // Named basic character classes
@@ -1783,7 +1801,7 @@ return cpp2::move(_ret) + ")";
     template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
         auto r {Other::match(cur, ctx, modifiers, end_func)}; 
         if (r.matched) {
-            CPP2_UFCS(set_alternative_pos)(ctx, alternative, cur);
+            ctx.set_alternative_pos(alternative, cur);
         }
         return r; 
     }
@@ -1799,7 +1817,7 @@ return cpp2::move(_ret) + ")";
 //
 
 #line 294 "regex.h2"
-    template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return CPP2_UFCS(str)(syntax); }
+    template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return syntax.str(); }
 
 #line 297 "regex.h2"
 //-----------------------------------------------------------------------
@@ -1861,7 +1879,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
-        static_cast(CPP2_UFCS(insert)(alternate_match_lists, CPP2_UFCS(end)(alternate_match_lists), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
+        static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
 #line 364 "regex.h2"
@@ -1873,7 +1891,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
 #line 370 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
-        if (CPP2_UFCS(empty)(alternate_match_lists)) {
+        if (alternate_match_lists.empty()) {
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
         }
         else {
@@ -1883,12 +1901,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     }
 
 #line 380 "regex.h2"
-    auto parse_context_group_state::add(cpp2::impl::in token) & -> void { CPP2_UFCS(push_back)(cur_match_list, token);  }
+    auto parse_context_group_state::add(cpp2::impl::in token) & -> void{
+        if (cpp2::impl::is(*cpp2::impl::assert_not_null(token)) && !(cur_match_list.empty()) && cpp2::impl::is(*cpp2::impl::assert_not_null(cur_match_list.back()))) {
+            // This and the last token are char tokens. Combine them.
+            (cpp2::impl::as_(*cpp2::impl::assert_not_null(cur_match_list.back()))).append(cpp2::impl::as_(*cpp2::impl::assert_not_null(token)));
+        }
+        else {
+            cur_match_list.push_back(token);
+        }
+    }
 
-#line 382 "regex.h2"
-    [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return CPP2_UFCS(empty)(cur_match_list);  }
+#line 390 "regex.h2"
+    [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty();  }
 
-#line 392 "regex.h2"
+#line 400 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1897,20 +1923,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 400 "regex.h2"
+#line 408 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 405 "regex.h2"
+#line 413 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 411 "regex.h2"
+#line 419 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1918,14 +1944,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 433 "regex.h2"
+#line 441 "regex.h2"
     parse_context::parse_context(cpp2::impl::in r)
         : regex{ r }
         , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }{
 
-#line 436 "regex.h2"
+#line 444 "regex.h2"
     }
-#line 433 "regex.h2"
+#line 441 "regex.h2"
     auto parse_context::operator=(cpp2::impl::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -1936,109 +1962,109 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         root = CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "");
         return *this;
 
-#line 436 "regex.h2"
+#line 444 "regex.h2"
     }
 
-#line 441 "regex.h2"
+#line 449 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
-        CPP2_UFCS(swap)(old_state, cur_group_state);
+        old_state.swap(cur_group_state);
 
         return old_state; 
     }
 
-#line 448 "regex.h2"
+#line 456 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
-        auto inner {CPP2_UFCS(get_tokens)(cur_group_state)}; 
+        auto inner {cur_group_state.get_tokens()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 454 "regex.h2"
+#line 462 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 458 "regex.h2"
+#line 466 "regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 465 "regex.h2"
+#line 473 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
 
-        CPP2_UFCS(set_active_reset)(cur_branch_reset_state, old_state.cur_group);
+        cur_branch_reset_state.set_active_reset(old_state.cur_group);
         return old_state; 
     }
 
-#line 473 "regex.h2"
+#line 481 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
-        CPP2_UFCS(set_next)(cur_branch_reset_state, cpp2::move(max_group));
+        cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 479 "regex.h2"
+#line 487 "regex.h2"
     auto parse_context::next_alternative() & -> void{
-        CPP2_UFCS(next_alternative)(cur_group_state);
-        CPP2_UFCS(next_alternative)(cur_branch_reset_state);
+        cur_group_state.next_alternative();
+        cur_branch_reset_state.next_alternative();
     }
 
-#line 487 "regex.h2"
+#line 495 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 489 "regex.h2"
-    [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(CPP2_UFCS(substr)(regex, start, end - start + 1));  }
+#line 497 "regex.h2"
+    [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
 
-#line 491 "regex.h2"
+#line 499 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
-        CPP2_UFCS(add)(cur_group_state, token);
+        cur_group_state.add(token);
     }
 
-#line 495 "regex.h2"
+#line 503 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
-        return !(CPP2_UFCS(empty)(cur_group_state)); 
+        return !(cur_group_state.empty()); 
     }
 
-#line 499 "regex.h2"
+#line 507 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
-            r = CPP2_UFCS(back)(cur_group_state.cur_match_list);
-            CPP2_UFCS(pop_back)(cur_group_state.cur_match_list);
+            r = cur_group_state.cur_match_list.back();
+            cur_group_state.cur_match_list.pop_back();
         }
 
         return r; 
     }
 
-#line 509 "regex.h2"
+#line 517 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return root; 
     }
 
-#line 514 "regex.h2"
+#line 522 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 518 "regex.h2"
+#line 526 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
-        return CPP2_UFCS(next)(cur_branch_reset_state); 
+        return cur_branch_reset_state.next(); 
     }
 
-#line 522 "regex.h2"
+#line 530 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
-        if (!(CPP2_UFCS(contains)(named_groups, name))) {// Redefinition of group name is not an error. The left most one is retained.
+        if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 528 "regex.h2"
+#line 536 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
-        auto iter {CPP2_UFCS(find)(named_groups, name)}; 
-        if (iter == CPP2_UFCS(end)(named_groups)) {
+        auto iter {named_groups.find(name)}; 
+        if (iter == named_groups.end()) {
              return -1; 
         }
         else {
@@ -2046,13 +2072,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 538 "regex.h2"
+#line 546 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 540 "regex.h2"
+#line 548 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
-        if (pos != CPP2_UFCS(size)(regex)) {
+        if (pos != regex.size()) {
             return true; 
         }
         else {
@@ -2060,14 +2086,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 550 "regex.h2"
+#line 558 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 551 "regex.h2"
+#line 559 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 552 "regex.h2"
+#line 560 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 554 "regex.h2"
+#line 562 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2077,19 +2103,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 563 "regex.h2"
-    [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,CPP2_UFCS(size)(regex)); }
+#line 571 "regex.h2"
+    [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
 
-#line 565 "regex.h2"
-    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && CPP2_UFCS(empty)(error_text); }
+#line 573 "regex.h2"
+    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && error_text.empty(); }
 
-#line 567 "regex.h2"
+#line 575 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 572 "regex.h2"
+#line 580 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2102,33 +2128,33 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 584 "regex.h2"
+#line 592 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::impl::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 586 "regex.h2"
+#line 594 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
             if (in_class) {
-                perl_syntax = CPP2_UFCS(has)(get_modifiers(), expression_flags::perl_code_syntax) && CPP2_UFCS(has)(get_modifiers(), expression_flags::perl_code_syntax_in_classes);
+                perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax) && get_modifiers().has(expression_flags::perl_code_syntax_in_classes);
             }
             else {
-                perl_syntax = CPP2_UFCS(has)(get_modifiers(), expression_flags::perl_code_syntax);
+                perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax);
             }
         }
         auto cur {pos + 1}; 
         if (cpp2::move(perl_syntax)) {
-            for( ; cpp2::impl::cmp_less(cur,CPP2_UFCS(size)(regex)); (cur += 1) ) {
+            for( ; cpp2::impl::cmp_less(cur,regex.size()); (cur += 1) ) {
                 auto n {CPP2_ASSERT_IN_BOUNDS(regex, cur)}; 
 
                 if (space_class::includes(n)) {
                     continue;
                 }
                 else {if (!(in_class) && '#' == cpp2::move(n)) {
-                    cur = CPP2_UFCS(find)(regex, "\n", cur);
+                    cur = regex.find("\n", cur);
                     if (std::string::npos == cur) {
                         // No new line, comment runs until the end of the pattern
-                        cur = CPP2_UFCS(size)(regex);
+                        cur = regex.size();
                     }
                 }
                 else { // None space none comment char
@@ -2138,25 +2164,25 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
 
         // Check for end of file.
-        if (cpp2::impl::cmp_greater(cur,CPP2_UFCS(size)(regex))) {
-            cur = CPP2_UFCS(size)(regex);
+        if (cpp2::impl::cmp_greater(cur,regex.size())) {
+            cur = regex.size();
         }
         return cur; 
     }
 
-#line 625 "regex.h2"
+#line 633 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
         if (any) {
-            end = CPP2_UFCS(find_first_of)(regex, e, pos);
+            end = regex.find_first_of(e, pos);
         }
         else {
-            end = CPP2_UFCS(find)(regex, e, pos);
+            end = regex.find(e, pos);
         }
 
         if (end != std::string_view::npos) {
-            r.construct(CPP2_UFCS(substr)(regex, cpp2::move(start), end - pos));
+            r.construct(regex.substr(cpp2::move(start), end - pos));
             pos = cpp2::move(end);
             return true; 
         }
@@ -2166,17 +2192,17 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 646 "regex.h2"
+#line 654 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 647 "regex.h2"
+#line 655 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 648 "regex.h2"
+#line 656 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 650 "regex.h2"
+#line 658 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
-        if (cpp2::impl::cmp_less_eq(pos + n,CPP2_UFCS(size)(regex))) {
-            r.construct(CPP2_UFCS(substr)(regex, pos, n));
+        if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
+            r.construct(regex.substr(pos, n));
             pos += n - 1;
             return true; 
         }
@@ -2186,31 +2212,31 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 662 "regex.h2"
+#line 670 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
         if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
             start_search += 1;
         }
-        auto end {CPP2_UFCS(find_first_not_of)(regex, "1234567890", cpp2::move(start_search))}; 
+        auto end {regex.find_first_not_of("1234567890", cpp2::move(start_search))}; 
 
         cpp2::impl::deferred_init r; 
         if (end != std::string::npos) {
-            r.construct(CPP2_UFCS(substr)(regex, start, end - start));
+            r.construct(regex.substr(start, end - start));
             pos = cpp2::move(end) - 1;
         }
         else {
-            r.construct(CPP2_UFCS(substr)(regex, cpp2::move(start)));
-            pos = CPP2_UFCS(size)(regex) - 1;
+            r.construct(regex.substr(cpp2::move(start)));
+            pos = regex.size() - 1;
         }
         return cpp2::move(r.value()); 
     }
 
-#line 682 "regex.h2"
+#line 690 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
-        if (cpp2::impl::cmp_less(next_pos,CPP2_UFCS(size)(regex))) {
+        if (cpp2::impl::cmp_less(next_pos,regex.size())) {
             return CPP2_ASSERT_IN_BOUNDS(regex, cpp2::move(next_pos)); 
         }
         else {
@@ -2218,12 +2244,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 692 "regex.h2"
+#line 700 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 693 "regex.h2"
+#line 701 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 695 "regex.h2"
+#line 703 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2233,15 +2259,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
         auto apply {[&, _1 = (&is_negative), _2 = (&parser_modifiers)](cpp2::impl::in flag) mutable -> void{
             if (*cpp2::impl::assert_not_null(_1)) {
-                CPP2_UFCS(clear)((*cpp2::impl::assert_not_null(_2)), flag);
+                (*cpp2::impl::assert_not_null(_2)).clear(flag);
             }
             else {
-                CPP2_UFCS(set)((*cpp2::impl::assert_not_null(_2)), flag);
+                (*cpp2::impl::assert_not_null(_2)).set(flag);
             }
         }}; 
 
-        auto iter {CPP2_UFCS(begin)(change_str)}; 
-        for( ; iter != CPP2_UFCS(end)(change_str); (++iter) ) {
+        auto iter {change_str.begin()}; 
+        for( ; iter != change_str.end(); (++iter) ) {
             auto cur {*cpp2::impl::assert_not_null(iter)}; 
             if (cur == '^') {
                 is_reset = true;
@@ -2256,12 +2282,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             else {if (cur == 's') {apply(expression_flags::single_line); }
             else {if (cur == 'n') {apply(expression_flags::no_group_captures); }
             else {if (cur == 'x') {
-                if ((iter + 1) == CPP2_UFCS(end)(change_str) || *cpp2::impl::assert_not_null((iter + 1)) != 'x') {
+                if ((iter + 1) == change_str.end() || *cpp2::impl::assert_not_null((iter + 1)) != 'x') {
                     // x modifier
                     apply(expression_flags::perl_code_syntax);
 
                     // Just x unsets xx and remove x also removes xx
-                    CPP2_UFCS(clear)(parser_modifiers, expression_flags::perl_code_syntax_in_classes);
+                    parser_modifiers.clear(expression_flags::perl_code_syntax_in_classes);
                 }
                 else { // xx modifier
                     // xx also sets or unsets x
@@ -2279,7 +2305,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 750 "regex.h2"
+#line 758 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2317,7 +2343,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 787 "regex.h2"
+#line 795 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2326,13 +2352,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
         auto r {parse_until('\0')}; 
         if (r) {
-            root = CPP2_UFCS(get_tokens)(cur_group_state);
+            root = cur_group_state.get_tokens();
         }
 
         return r; 
     }
 
-#line 808 "regex.h2"
+#line 816 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2340,53 +2366,53 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 815 "regex.h2"
+#line 823 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
-        tabs = CPP2_UFCS(substr)(tabs, 0, c * 2);
+        tabs = tabs.substr(0, c * 2);
     }
 
-#line 830 "regex.h2"
+#line 838 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 832 "regex.h2"
+#line 840 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 837 "regex.h2"
+#line 845 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r = ctx.fail(); return r; }\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n");
     }
 
-#line 842 "regex.h2"
+#line 850 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void{
         end_func_statefull(c);
 
-        auto name {CPP2_UFCS(substr)(next_func, 0, CPP2_UFCS(ssize)(next_func) - 2)}; 
+        auto name {next_func.substr(0, next_func.size() - 2)}; 
         start_func_named(cpp2::move(name));
     }
 
-#line 849 "regex.h2"
+#line 857 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 855 "regex.h2"
+#line 863 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
-        CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(token)), (*this));
+        (*cpp2::impl::assert_not_null(token)).generate_code((*this));
         end_func();
 
         return name; 
     }
 
-#line 863 "regex.h2"
+#line 871 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
-        if (CPP2_UFCS(empty)(groups)) {
+        if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
         }
 
@@ -2396,7 +2422,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, inout ctx) = {\n");
         for ( auto const& g : groups ) {
-            (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  ctx.set_group_invalid(" + cpp2::to_string(g) + ");\n");
+            (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  ctx..set_group_invalid(" + cpp2::to_string(g) + ");\n");
         }
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  }\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "}\n");
@@ -2406,44 +2432,51 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(name) + "()"; 
     }
 
-#line 885 "regex.h2"
+#line 893 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
-        return &CPP2_UFCS(back)(gen_stack); 
+        return &gen_stack.back(); 
     }
 
-#line 889 "regex.h2"
+#line 897 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 893 "regex.h2"
+#line 901 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 897 "regex.h2"
+#line 905 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n");
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    r := ctx.pass(cur);\n");
-        CPP2_UFCS(add_tabs)((*cpp2::impl::assert_not_null(cpp2::move(cur))), 2);
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    r := ctx..pass(cur);\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    do {\n");
+        (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 906 "regex.h2"
+#line 915 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 912 "regex.h2"
+#line 921 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
-        CPP2_UFCS(remove_tabs)((*cpp2::impl::assert_not_null(cur)), 2);
+        (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
         (*cpp2::impl::assert_not_null(cur)).code += "\n";
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    r = " + cpp2::to_string(s) + ";\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    } while false;\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    if r.matched {\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "      r = " + cpp2::to_string(s) + ";\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    }\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    else {\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "      r.pos = ctx.end;\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    }\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "    return r;\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  }\n");
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "}\n");
@@ -2451,56 +2484,56 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 924 "regex.h2"
+#line 939 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx)");
     }
 
-#line 928 "regex.h2"
+#line 943 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 932 "regex.h2"
+#line 947 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 938 "regex.h2"
+#line 953 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 944 "regex.h2"
+#line 959 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 950 "regex.h2"
+#line 965 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
-        CPP2_UFCS(push_back)(gen_stack, generation_function_context());
+        gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).tabs = "    ";
 
         return cur; 
     }
 
-#line 958 "regex.h2"
+#line 973 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
         (*cpp2::impl::assert_not_null(base)).code += (*cpp2::impl::assert_not_null(cpp2::move(cur))).code;
 
-        CPP2_UFCS(pop_back)(gen_stack);
+        gen_stack.pop_back();
     }
 
-#line 966 "regex.h2"
+#line 981 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2512,7 +2545,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
 
         // Generate else branch or return if list is empty.
-        if (CPP2_UFCS(empty)(named_groups)) {
+        if (named_groups.empty()) {
             res += "  _ = name;\n";
             res += "  return -1;\n";
         }
@@ -2523,161 +2556,161 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 994 "regex.h2"
+#line 1009 "regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 997 "regex.h2"
+#line 1012 "regex.h2"
     }
 
-#line 999 "regex.h2"
+#line 1014 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
-            CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(token)), ctx);
+            (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
         }
     }
 
-#line 1005 "regex.h2"
+#line 1020 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
-            CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(token)), groups);
+            (*cpp2::impl::assert_not_null(token)).add_groups(groups);
         }
     }
 
-#line 1011 "regex.h2"
+#line 1026 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
-            r += CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(token)));
+            r += (*cpp2::impl::assert_not_null(token)).to_string();
         }
         return r; 
     }
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1024 "regex.h2"
+#line 1039 "regex.h2"
     regex_token_base::regex_token_base(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 1026 "regex.h2"
+#line 1041 "regex.h2"
     }
 
-#line 1028 "regex.h2"
+#line 1043 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1030 "regex.h2"
+#line 1045 "regex.h2"
     }
 
-#line 1032 "regex.h2"
+#line 1047 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1040 "regex.h2"
+#line 1055 "regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1043 "regex.h2"
+#line 1058 "regex.h2"
     }
 
-#line 1045 "regex.h2"
+#line 1060 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, check + "(" + CPP2_UFCS(match_parameters)(ctx) + ")");
+        ctx.add_check(check + "(" + ctx.match_parameters() + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1055 "regex.h2"
+#line 1070 "regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1058 "regex.h2"
+#line 1073 "regex.h2"
     }
 
-#line 1060 "regex.h2"
+#line 1075 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add)(ctx, code);
+        ctx.add(code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1069 "regex.h2"
+#line 1084 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token_base{ str }{
 
-#line 1071 "regex.h2"
+#line 1086 "regex.h2"
     }
 
-#line 1073 "regex.h2"
+#line 1088 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1085 "regex.h2"
+#line 1100 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1087 "regex.h2"
+#line 1102 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
-        if (CPP2_UFCS(current)(ctx) != '|') {return nullptr; }
+        if (ctx.current() != '|') {return nullptr; }
 
-        if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, "Alternative with no content."); }
-        CPP2_UFCS(next_alternative)(ctx);
+        if (!(ctx.has_token())) {return ctx.error("Alternative with no content."); }
+        ctx.next_alternative();
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1095 "regex.h2"
+#line 1110 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1106 "regex.h2"
+#line 1121 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1109 "regex.h2"
+#line 1124 "regex.h2"
     }
 
-#line 1111 "regex.h2"
+#line 1126 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
         for ( auto const& cur : alternatives ) {
             std::set groups {}; 
-            CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(cur)), groups);
+            (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
 
-            functions += ", " + CPP2_UFCS(generate_func)(ctx, cur);
-            functions += ", " + CPP2_UFCS(generate_reset)(ctx, cpp2::move(groups));
+            functions += ", " + ctx.generate_func(cur);
+            functions += ", " + ctx.generate_reset(cpp2::move(groups));
         }
 
-        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
+        auto next_name {ctx.next_func_name()}; 
 
-        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
+        ctx.add_statefull(next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1127 "regex.h2"
+#line 1142 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
-            CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(cur)), groups);
+            (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1133 "regex.h2"
+#line 1148 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
 
         for ( auto const& cur : a ) {
-            r += sep + CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(cur)));
+            r += sep + (*cpp2::impl::assert_not_null(cur)).to_string();
             sep = "|";
         }
 
@@ -2686,11 +2719,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1148 "regex.h2"
+#line 1163 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1151 "regex.h2"
+#line 1166 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2704,34 +2737,34 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
             if constexpr (0 != sizeof...(Other)) {
                 return match_first(cur, ctx, end_func, tail, other...); 
             }else {
-                return CPP2_UFCS(fail)(ctx); 
+                return ctx.fail(); 
             }
         }
     }
 
-#line 1177 "regex.h2"
+#line 1192 "regex.h2"
     any_token::any_token(cpp2::impl::in single_line_)
         : regex_token_base{ "." }
         , single_line{ single_line_ }{
 
-#line 1179 "regex.h2"
+#line 1194 "regex.h2"
     }
 
-#line 1181 "regex.h2"
+#line 1196 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
-        if ('.' != CPP2_UFCS(current)(ctx)) {return nullptr; }
+        if ('.' != ctx.current()) {return nullptr; }
 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::single_line)); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.get_modifiers().has(expression_flags::single_line)); 
     }
 
-#line 1187 "regex.h2"
+#line 1202 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("any_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        ctx.add_check(("any_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1192 "regex.h2"
+#line 1207 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2743,77 +2776,123 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1209 "regex.h2"
+#line 1224 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token_base{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1213 "regex.h2"
+#line 1228 "regex.h2"
     }
 
-#line 1215 "regex.h2"
+#line 1230 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive)); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1219 "regex.h2"
+#line 1234 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
-            auto upper {safe_toupper(token)}; 
-            auto lower {safe_tolower(token)}; 
+            std::string upper {token}; 
+            std::string lower {token}; 
+{
+int i{0};
+
+#line 1239 "regex.h2"
+            for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
+                CPP2_ASSERT_IN_BOUNDS(lower, i) = safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
+                CPP2_ASSERT_IN_BOUNDS(upper, i) = safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
+            }
+}
 
+#line 1244 "regex.h2"
             if (upper != lower) {
-                CPP2_UFCS(add_check)(ctx, ("char_token_case_insensitive_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+                gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
             else {
-                CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+                gen_case_sensitive(ctx);
             }
         }
         else {
-            CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
-        }
+            gen_case_sensitive(ctx);
+        }
+    }
+
+#line 1256 "regex.h2"
+    auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
+        std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
+        std::string lower_name {"lower_" + cpp2::to_string(name)}; 
+        std::string upper_name {"upper_" + cpp2::to_string(cpp2::move(name))}; 
+        auto size {token.size()}; 
+        ctx.add((cpp2::to_string(lower_name) + " : std::array = \"" + cpp2::to_string(add_escapes(lower)) + "\";"));  // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx.add((cpp2::to_string(upper_name) + " : std::array = \"" + cpp2::to_string(add_escapes(upper)) + "\";"));  // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx.add(("if !(std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + ") {"));
+        ctx.add("    r.matched = false;");
+        ctx.add("    break;");
+        ctx.add("}");
+        ctx.add("");
+        ctx.add(("(copy i : int = 0) while i < " + cpp2::to_string(size) + " next (i += 1) {"));
+        ctx.add(("    if !(" + cpp2::to_string(cpp2::move(lower_name)) + "[i] == r.pos[i] || " + cpp2::to_string(cpp2::move(upper_name)) + "[i] == r.pos[i]) { r.matched = false; }"));
+        ctx.add("}");
+        ctx.add("");
+        ctx.add(("if r.matched { r.pos += " + cpp2::to_string(cpp2::move(size)) + "; }"));
+        ctx.add("else { break; }");
+    }
+
+#line 1276 "regex.h2"
+    auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
+        std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
+        auto size {token.size()}; 
+        ctx.add((cpp2::to_string(name) + " : std::array = \"" + cpp2::to_string(add_escapes(token)) + "\";"));  // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx.add(("if !(std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + ") {"));
+        ctx.add("    r.matched = false;");
+        ctx.add("    break;");
+        ctx.add("}");
+        ctx.add("");
+        ctx.add(("(copy i : int = 0) while i < " + cpp2::to_string(size) + " next (i += 1) {"));
+        ctx.add(("    if " + cpp2::to_string(cpp2::move(name)) + "[i] != r.pos[i] { r.matched = false; }"));
+        ctx.add("}");
+        ctx.add("");
+        ctx.add(("if r.matched { r.pos += " + cpp2::to_string(cpp2::move(size)) + "; }"));
+        ctx.add("else { break; }");
+    }
+
+#line 1293 "regex.h2"
+    [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
+        str = replace_all(str, "\\", "\\\\");
+        str = replace_all(str, "\a", "\\a");
+        str = replace_all(str, "\f", "\\f");
+        str = replace_all(str, "\e", "\\e");
+        str = replace_all(str, "\n", "\\n");
+        str = replace_all(str, "\r", "\\r");
+        str = replace_all(str, "\t", "\\t");
+
+        return cpp2::move(str); 
+    }
+
+#line 1305 "regex.h2"
+    auto char_token::append(char_token const& that) & -> void{
+        (*this).token += that.token;
+        (*this).string_rep += that.string_rep;
     }
 
     char_token::~char_token() noexcept{}
 
-#line 1237 "regex.h2"
-template [[nodiscard]] auto char_token_matcher(auto& cur, auto& ctx) -> bool{
-    if (cur != ctx.end && *cpp2::impl::assert_not_null(cur) == C) {
-        cur += 1;
-        return true; 
-    }
-    else {
-        return false; 
-    }
-}
-
-#line 1247 "regex.h2"
-template [[nodiscard]] auto char_token_case_insensitive_matcher(auto& cur, auto& ctx) -> bool{
-    if (cur != ctx.end && (*cpp2::impl::assert_not_null(cur) == L || *cpp2::impl::assert_not_null(cur) == U)) {
-        cur += 1;
-        return true; 
-    }
-    else {
-        return false; 
-    }
-}
-
-#line 1266 "regex.h2"
+#line 1353 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1271 "regex.h2"
+#line 1358 "regex.h2"
     }
 
-#line 1274 "regex.h2"
+#line 1361 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
-        if (CPP2_UFCS(current)(ctx) != '[') {return nullptr; }
+        if (ctx.current() != '[') {return nullptr; }
 
-        auto start_pos {CPP2_UFCS(get_pos)(ctx)}; 
+        auto start_pos {ctx.get_pos()}; 
 
         std::vector supported_classes {"alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph", 
                                                        "lower", "print", "punct", "space", "upper", "word", "xdigit"}; 
@@ -2824,87 +2903,87 @@ template [[nodiscard]] auto char_token_case_in
         auto is_negate {false}; 
         auto first {true}; 
         auto range {false}; 
-        while( CPP2_UFCS(next_in_class)(ctx) & (CPP2_UFCS(current)(ctx) != ']' || first) ) {
-            if (CPP2_UFCS(current)(ctx) == '^') {
+        while( ctx.next_in_class() & (ctx.current() != ']' || first) ) {
+            if (ctx.current() == '^') {
                 is_negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if (CPP2_UFCS(current)(ctx) == '[' && CPP2_UFCS(peek_in_class)(ctx) == ':') {
+            if (ctx.current() == '[' && ctx.peek_in_class() == ':') {
                 // We have a character class.
-                static_cast(CPP2_UFCS(next_n)(ctx, 2));// Skip [:
+                static_cast(ctx.next_n(2));// Skip [:
 
                 std::string name {""}; 
-                if (!(CPP2_UFCS(grab_until)(ctx, ":]", cpp2::impl::out(&name)))) {return CPP2_UFCS(error)(ctx, "Could not find end of character class."); }
-                if (CPP2_UFCS(end)(supported_classes) == std::find(CPP2_UFCS(begin)(supported_classes), CPP2_UFCS(end)(supported_classes), name)) {
-                    return CPP2_UFCS(error)(ctx, ("Unsupported character class. Supported ones are: " + cpp2::to_string(CPP2_UFCS(join)(ctx, supported_classes)))); 
+                if (!(ctx.grab_until(":]", cpp2::impl::out(&name)))) {return ctx.error("Could not find end of character class."); }
+                if (supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name)) {
+                    return ctx.error(("Unsupported character class. Supported ones are: " + cpp2::to_string(ctx.join(supported_classes)))); 
                 }
 
-                CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(cpp2::move(name)) + ":]"));
+                classes.push_back(("[:" + cpp2::to_string(cpp2::move(name)) + ":]"));
 
-                static_cast(CPP2_UFCS(next)(ctx));// Skip ':' pointing to the ending ']'.
+                static_cast(ctx.next());// Skip ':' pointing to the ending ']'.
             }
-            else {if (CPP2_UFCS(current)(ctx) == '\\') {
-                if (CPP2_UFCS(next_no_skip)(ctx) && (CPP2_UFCS(current)(ctx) != ']')) {
-                    if ( ' ' == CPP2_UFCS(current)(ctx) && CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::perl_code_syntax) && CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::perl_code_syntax_in_classes)) {
-                        CPP2_UFCS(push_back)(classes, std::string(1, CPP2_UFCS(current)(ctx)));// TODO: UFCS error with char as argument.
+            else {if (ctx.current() == '\\') {
+                if (ctx. next_no_skip()  && (ctx. current() != ']')) {
+                    if ( ' ' == ctx. current() && ctx. get_modifiers(). has(expression_flags::perl_code_syntax) && ctx. get_modifiers(). has(expression_flags::perl_code_syntax_in_classes)) {
+                        classes.push_back(std::string(1, ctx.current()));   // TODO: UFCS error with char as argument.
                     }
                     else {
                         auto name {""}; 
-                            if ('d' == CPP2_UFCS(current)(ctx)) {name = "short_digits"; }
-                        else {if ('D' == CPP2_UFCS(current)(ctx)) {name = "short_not_digits"; }
-                        else {if ('h' == CPP2_UFCS(current)(ctx)) {name = "short_hor_space"; }
-                        else {if ('H' == CPP2_UFCS(current)(ctx)) {name = "short_not_hor_space"; }
-                        else {if ('s' == CPP2_UFCS(current)(ctx)) {name = "short_space"; }
-                        else {if ('S' == CPP2_UFCS(current)(ctx)) {name = "short_not_space"; }
-                        else {if ('v' == CPP2_UFCS(current)(ctx)) {name = "short_ver_space"; }
-                        else {if ('V' == CPP2_UFCS(current)(ctx)) {name = "short_not_ver_space"; }
-                        else {if ('w' == CPP2_UFCS(current)(ctx)) {name = "short_word"; }
-                        else {if ('W' == CPP2_UFCS(current)(ctx)) {name = "short_not_word"; }
+                            if ('d' == ctx.current()) {name = "short_digits"; }
+                        else {if ('D' == ctx.current()) {name = "short_not_digits"; }
+                        else {if ('h' == ctx.current()) {name = "short_hor_space"; }
+                        else {if ('H' == ctx.current()) {name = "short_not_hor_space"; }
+                        else {if ('s' == ctx.current()) {name = "short_space"; }
+                        else {if ('S' == ctx.current()) {name = "short_not_space"; }
+                        else {if ('v' == ctx.current()) {name = "short_ver_space"; }
+                        else {if ('V' == ctx.current()) {name = "short_not_ver_space"; }
+                        else {if ('w' == ctx.current()) {name = "short_word"; }
+                        else {if ('W' == ctx.current()) {name = "short_not_word"; }
                         else {
-                            return CPP2_UFCS(error)(ctx, "Unknown group escape."); 
+                            return ctx.error("Unknown group escape."); 
                         }}}}}}}}}}
-                        CPP2_UFCS(push_back)(classes, ("[:" + cpp2::to_string(cpp2::move(name)) + ":]"));
+                        classes.push_back(("[:" + cpp2::to_string(cpp2::move(name)) + ":]"));
                     }
                 }else {
-                    return CPP2_UFCS(error)(ctx, "Escape without a following character."); 
+                    return ctx.error("Escape without a following character."); 
                 }
             }
-            else {if (CPP2_UFCS(current)(ctx) == '-') {
+            else {if (ctx.current() == '-') {
                 if (first) {// Literal if first entry.
-                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(CPP2_UFCS(current)(ctx))));
+                    classes.push_back((cpp2::to_string(ctx.current())));
                 }else {
                     range = true;
                 }
             }
             else {
                 if (range) {// Modify last element to be a range.
-                    CPP2_UFCS(back)(classes) += ("-" + cpp2::to_string(CPP2_UFCS(current)(ctx)));
+                    classes.back() += ("-" + cpp2::to_string(ctx.current()));
                     range = false;
                 }
                 else {
-                    CPP2_UFCS(push_back)(classes, (cpp2::to_string(CPP2_UFCS(current)(ctx))));
+                    classes.push_back((cpp2::to_string(ctx.current())));
                 }
             }}}
 
             first = false;
         }
 
-        if (CPP2_UFCS(current)(ctx) != ']') {
-            return CPP2_UFCS(error)(ctx, "Error end of character class definition before terminating ']'."); 
+        if (ctx.current() != ']') {
+            return ctx.error("Error end of character class definition before terminating ']'."); 
         }
-        auto end_pos {CPP2_UFCS(get_pos)(ctx)}; 
+        auto end_pos {ctx.get_pos()}; 
 
         if (cpp2::move(range)) {// If '-' is last entry treat it as a literal char.
-            CPP2_UFCS(push_back)(classes, "-");
+            classes.push_back("-");
         }
 
         // Second step: Wrap the item on the class stack with corresponding class implementation.
         for ( auto& cur : classes ) {
-            if (CPP2_UFCS(starts_with)(cur, "[:")) {
-                auto name {CPP2_UFCS(substr)(cur, 2, CPP2_UFCS(size)(cur) - 4)}; 
+            if (cur.starts_with("[:")) {
+                auto name {cur.substr(2, cur.size() - 4)}; 
                 cur = create_matcher((cpp2::to_string(cpp2::move(name)) + "_class"), "");
             }
-            else {if (1 != CPP2_UFCS(size)(cur)) {
+            else {if (1 != cur.size()) {
                 cur = create_matcher("range_class_entry", ("'" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 0)) + "', '" + cpp2::to_string(CPP2_ASSERT_IN_BOUNDS_LITERAL(cur, 2)) + "'"));
             }
             else {
@@ -2912,28 +2991,28 @@ template [[nodiscard]] auto char_token_case_in
             }}
         }
 
-        auto inner {CPP2_UFCS(join)(ctx, cpp2::move(classes))}; 
-        auto string_rep {CPP2_UFCS(get_range)(ctx, cpp2::move(start_pos), cpp2::move(end_pos))}; 
+        auto inner {ctx.join(cpp2::move(classes))}; 
+        auto string_rep {ctx.get_range(cpp2::move(start_pos), cpp2::move(end_pos))}; 
         string_rep = replace_all(string_rep, "\\", "\\\\");
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1382 "regex.h2"
+#line 1469 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("class_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        ctx.add_check(("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
-#line 1387 "regex.h2"
+#line 1474 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
-        if (CPP2_UFCS(empty)(template_arguments)) {sep = ""; }
+        if (template_arguments.empty()) {sep = ""; }
 
         return { "::cpp2::regex::" + cpp2::to_string(name) + "" }; 
     }
 
     class_token::~class_token() noexcept{}
 
-#line 1397 "regex.h2"
+#line 1484 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -2955,7 +3034,7 @@ template [[nodiscard]] auto char_token_case_in
         }
     }
 
-#line 1418 "regex.h2"
+#line 1505 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2968,81 +3047,78 @@ template [[nodiscard]] auto char_token_case_in
         return r; 
     }
 
-#line 1443 "regex.h2"
+#line 1530 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
-    if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+    if (ctx.current() != '\\') {return nullptr; }
 
-#line 1447 "regex.h2"
-    if (std::string::npos == CPP2_UFCS(find)(std::string("afenrt^.[]()*{}?+|\\"), CPP2_UFCS(peek)(ctx))) {
+#line 1534 "regex.h2"
+    if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
 
-    static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+    static_cast(ctx.next());// Skip escape
 
-    if (std::string::npos != CPP2_UFCS(find)(std::string("afenrt\\"), CPP2_UFCS(current)(ctx))) {
+    if (std::string::npos != std::string("afenrt\\").find(ctx.current())) {
         // Escape of string special char
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx)); 
+        char t {'\0'}; 
+        if (     'a' == ctx. current()) { t = '\a'; }
+        else {if ('f' == ctx.current()) {t = '\f'; }
+        else {if ('e' == ctx.current()) {t = '\e'; }
+        else {if ('n' == ctx.current()) {t = '\n'; }
+        else {if ('r' == ctx.current()) {t = '\r'; }
+        else {if ('t' == ctx.current()) {t = '\t'; }
+        else {if ('\\' == ctx.current()) {t = '\\'; }
+        else {                         }}}}}}}/* TODO: throw error */
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(t), false)}; 
+        (*cpp2::impl::assert_not_null(r)).set_string(("\\\\" + cpp2::to_string(ctx.current())));
+
+        return r; 
     }else {
         // Escape of regex special char
-        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, CPP2_UFCS(current)(ctx), false)}; 
-        CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))));
+        auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), false)}; 
+        (*cpp2::impl::assert_not_null(r)).set_string(("\\\\" + cpp2::to_string(ctx.current())));
 
         return r; 
     }
 
 }
 
-#line 1471 "regex.h2"
-    escaped_char_token::escaped_char_token(cpp2::impl::in t)
-        : regex_token_base{ "\\\\" + cpp2::to_string(t) }
-        , token{ t }{
-
-#line 1474 "regex.h2"
-    }
-
-#line 1476 "regex.h2"
-    auto escaped_char_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("char_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
-    }
-
-    escaped_char_token::~escaped_char_token() noexcept{}
-
-#line 1483 "regex.h2"
+#line 1567 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
-    if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'K'))) {return nullptr; }
+    if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
-    static_cast(CPP2_UFCS(next)(ctx));// Skip escape.
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx.set_group_start(0, r.pos);"); 
+    static_cast(ctx.next());// Skip escape.
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1502 "regex.h2"
+#line 1586 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token_base{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1506 "regex.h2"
+#line 1590 "regex.h2"
     }
 
-#line 1508 "regex.h2"
+#line 1592 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
-        if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+        if (ctx.current() != '\\') {return nullptr; }
 
         std::string str {"\\\\"}; 
         std::string group {""}; 
 
-        if ([_0 = '0', _1 = CPP2_UFCS(peek)(ctx), _2 = '9']{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) {
-            static_cast(CPP2_UFCS(next)(ctx));// Skip escape
-            group = CPP2_UFCS(grab_number)(ctx);
-            if (cpp2::impl::cmp_greater_eq(CPP2_UFCS(ssize)(group),3)) {
+        if ([_0 = '0', _1 = ctx.peek(), _2 = '9']{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) {
+            static_cast(ctx.next());// Skip escape
+            group = ctx.grab_number();
+            if (cpp2::impl::cmp_greater_eq(group.size(),3)) {
                 // Octal syntax (\000) not a group ref matcher.
                 auto number {0}; 
-                if (!(string_to_int(group, number, 8))) {return CPP2_UFCS(error)(ctx, "Could not convert octal to int."); }
+                if (!(string_to_int(group, number, 8))) {return ctx.error("Could not convert octal to int."); }
 
                 char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-                auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char, CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive))}; 
-                CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(token)), ("\\" + cpp2::to_string(int_to_string(cpp2::impl::as_(cpp2::move(number_as_char)), 8))));
+                auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
+                (*cpp2::impl::assert_not_null(token)).set_string(("\\" + cpp2::to_string(int_to_string(cpp2::impl::as_(cpp2::move(number_as_char)), 8))));
 
                 return token; 
             }
@@ -3050,40 +3126,40 @@ template [[nodiscard]] auto char_token_case_in
             str += group;
             // Regular group ref
         }
-        else {if ('g' == CPP2_UFCS(peek)(ctx)) {
-            static_cast(CPP2_UFCS(next)(ctx));// Skip escape
-            if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group escape without a following char."); }// Skip g
+        else {if ('g' == ctx.peek()) {
+            static_cast(ctx.next());// Skip escape
+            if (!(ctx.next())) {return ctx.error("Group escape without a following char."); }// Skip g
 
             str += "g";
 
-            if (CPP2_UFCS(current)(ctx) == '{') {
+            if (ctx.current() == '{') {
                 str += "{";
-                if (!((CPP2_UFCS(next)(ctx) && CPP2_UFCS(grab_until)(ctx, '}', cpp2::impl::out(&group))))) {return CPP2_UFCS(error)(ctx, "No ending bracket."); }
+                if (!((ctx.next() && ctx.grab_until('}', cpp2::impl::out(&group))))) {return ctx.error("No ending bracket."); }
 
                 str += group + "}";
             }
             else {
-                group = CPP2_UFCS(grab_number)(ctx);
+                group = ctx.grab_number();
                 str += group;
             }
         }
-        else {if ('k' == CPP2_UFCS(peek)(ctx)) {
-            static_cast(CPP2_UFCS(next)(ctx));// Skip escape
-            if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group escape without a following char."); }// Skip k
+        else {if ('k' == ctx.peek()) {
+            static_cast(ctx.next());// Skip escape
+            if (!(ctx.next())) {return ctx.error("Group escape without a following char."); }// Skip k
 
             str += "k";
 
             auto term_char {'\0'}; 
-            if (CPP2_UFCS(current)(ctx) == '{') {term_char = '}'; }
-            else {if (CPP2_UFCS(current)(ctx) == '<') {term_char = '>'; }
-            else {if (CPP2_UFCS(current)(ctx) == '\'') {term_char = '\''; }
+            if (ctx.current() == '{') {term_char = '}'; }
+            else {if (ctx.current() == '<') {term_char = '>'; }
+            else {if (ctx.current() == '\'') {term_char = '\''; }
             else {
-                return CPP2_UFCS(error)(ctx, "Group escape has wrong operator."); 
+                return ctx.error("Group escape has wrong operator."); 
             }}}
 
-            str += CPP2_UFCS(current)(ctx);
+            str += ctx.current();
 
-            if (!((CPP2_UFCS(next)(ctx) && CPP2_UFCS(grab_until)(ctx, term_char, cpp2::impl::out(&group))))) {return CPP2_UFCS(error)(ctx, "No ending bracket."); }
+            if (!((ctx.next() && ctx.grab_until(term_char, cpp2::impl::out(&group))))) {return ctx.error("No ending bracket."); }
 
             str += group + cpp2::move(term_char);
         }
@@ -3097,36 +3173,36 @@ template [[nodiscard]] auto char_token_case_in
         int group_id {0}; 
         if (string_to_int(group, group_id)) {
             if (cpp2::impl::cmp_less(group_id,0)) {
-                group_id = CPP2_UFCS(get_cur_group)(ctx) + group_id;
+                group_id = ctx.get_cur_group() + group_id;
 
                 if (cpp2::impl::cmp_less(group_id,1)) {// Negative and zero are no valid groups.
-                    return CPP2_UFCS(error)(ctx, ("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)")); 
+                    return ctx.error(("Relative group reference does not reference a valid group. (Would be " + cpp2::to_string(group_id) + ".)")); 
                 }
             }
 
-            if (cpp2::impl::cmp_greater_eq(group_id,CPP2_UFCS(get_cur_group)(ctx))) {
-                return CPP2_UFCS(error)(ctx, "Group reference is used before the group is declared."); 
+            if (cpp2::impl::cmp_greater_eq(group_id,ctx.get_cur_group())) {
+                return ctx.error("Group reference is used before the group is declared."); 
             }
         }
         else {
             // Named group
-            group_id = CPP2_UFCS(get_named_group)(ctx, group);
-            if (-1 == group_id) {return CPP2_UFCS(error)(ctx, ("Group names does not exist. (Name is: " + cpp2::to_string(cpp2::move(group)) + ")")); }
+            group_id = ctx.get_named_group(group);
+            if (-1 == group_id) {return ctx.error(("Group names does not exist. (Name is: " + cpp2::to_string(cpp2::move(group)) + ")")); }
         }
 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive), cpp2::move(str)); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1600 "regex.h2"
+#line 1684 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
-        CPP2_UFCS(add_check)(ctx, ("group_ref_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ")"));
+        ctx.add_check(("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1605 "regex.h2"
+#line 1689 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
-    auto g {CPP2_UFCS(get_group)(ctx, group)}; 
+    auto g {ctx.get_group(group)}; 
 
     auto group_pos {g.start}; 
     for( ; group_pos != g.end && cur != ctx.end; (++group_pos, ++cur) ) {
@@ -3150,63 +3226,63 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1636 "regex.h2"
+#line 1720 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
-        static_cast(CPP2_UFCS(next)(ctx));// Skip last token defining the syntax
+        static_cast(ctx.next());// Skip last token defining the syntax
 
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, positive)}; 
 
-        auto old_state {CPP2_UFCS(start_group)(ctx)}; 
-        if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return CPP2_UFCS(error)(ctx, "Lookahead without a closing bracket."); }
-        (*cpp2::impl::assert_not_null(r)).inner = CPP2_UFCS(end_group)(ctx, cpp2::move(old_state));
-        CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), ("(" + cpp2::to_string(syntax) + cpp2::to_string(CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner)))) + ")"));
+        auto old_state {ctx.start_group()}; 
+        if (!(ctx.parse_until(')'))) {return ctx.error("Lookahead without a closing bracket."); }
+        (*cpp2::impl::assert_not_null(r)).inner = ctx.end_group(cpp2::move(old_state));
+        (*cpp2::impl::assert_not_null(r)).set_string(("(" + cpp2::to_string(syntax) + cpp2::to_string((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner)).to_string()) + ")"));
 
         return r; 
     }
 
-#line 1649 "regex.h2"
+#line 1733 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
-        if (CPP2_UFCS(current)(ctx) != '(') {return nullptr; }
+        if (ctx.current() != '(') {return nullptr; }
 
-        auto has_id {!(CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::no_group_captures))}; 
+        auto has_id {!(ctx.get_modifiers().has(expression_flags::no_group_captures))}; 
         auto has_pattern {true}; 
         std::string group_name {""}; 
         auto group_name_brackets {true}; 
         std::string modifiers {""}; 
 
-        auto modifiers_change_to {CPP2_UFCS(get_modifiers)(ctx)}; 
+        auto modifiers_change_to {ctx.get_modifiers()}; 
 
         // Skip the '('
-        if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group without closing bracket."); }
-        if (CPP2_UFCS(current)(ctx) == '?') {
+        if (!(ctx.next())) {return ctx.error("Group without closing bracket."); }
+        if (ctx.current() == '?') {
             // Special group
-            if (!(CPP2_UFCS(next_no_skip)(ctx))) {return CPP2_UFCS(error)(ctx, "Missing character after group opening."); }
+            if (!(ctx.next_no_skip())) {return ctx.error("Missing character after group opening."); }
 
-            if (CPP2_UFCS(current)(ctx) == '<' || CPP2_UFCS(current)(ctx) == '\'') {
+            if (ctx.current() == '<' || ctx.current() == '\'') {
                 // named group
-                auto end_char {CPP2_UFCS(current)(ctx)}; 
+                auto end_char {ctx.current()}; 
                 if (end_char == '<') {
                     end_char = '>';
                 }else {
                     group_name_brackets = false;
                 }
                 has_id = true; // Force id for named groups.
-                if (!(CPP2_UFCS(next)(ctx))) { return CPP2_UFCS(error)(ctx, "Missing ending bracket for named group."); }/* skip '<' */
-                if (!(CPP2_UFCS(grab_until)(ctx, cpp2::move(end_char), cpp2::impl::out(&group_name)))) {return CPP2_UFCS(error)(ctx, "Missing ending bracket for named group."); }
-                if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "Group without closing bracket."); }
+                if (!(ctx.next()))            { return ctx. error("Missing ending bracket for named group.");  }/* skip '<' */
+                if (!(ctx.grab_until(cpp2::move(end_char), cpp2::impl::out(&group_name)))) {return ctx.error("Missing ending bracket for named group."); }
+                if (!(ctx.next())) {return ctx.error("Group without closing bracket."); }
             }
-            else {if (CPP2_UFCS(current)(ctx) == '#') {
+            else {if (ctx.current() == '#') {
                 // Comment
                 std::string comment_str {""}; 
-                static_cast(CPP2_UFCS(next)(ctx));// Skip #
-                if (!(CPP2_UFCS(grab_until)(ctx, ")", cpp2::impl::out(&comment_str)))) {return CPP2_UFCS(error)(ctx, "Group without closing bracket."); }
+                static_cast(ctx.next());// Skip #
+                if (!(ctx.grab_until(")", cpp2::impl::out(&comment_str)))) {return ctx.error("Group without closing bracket."); }
                 // Do not add comment. Has problems with ranges.
 
                 // Pop token and add a list. This fixes comments between a token and a range
-                if (CPP2_UFCS(has_token)(ctx)) {
+                if (ctx.has_token()) {
                     token_vec list {}; 
-                    CPP2_UFCS(push_back)(list, CPP2_UFCS(pop_token)(ctx));
-                    CPP2_UFCS(push_back)(list, CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")")));
+                    list.push_back(ctx.pop_token());
+                    list.push_back(CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")")));
 
                     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list)); 
                 }
@@ -3214,44 +3290,44 @@ template [[nodiscard]] auto gr
                     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")")); 
                 }
             }
-            else {if (CPP2_UFCS(current)(ctx) == '|') {
+            else {if (ctx.current() == '|') {
                 // Branch reset group
 
-                if (!(CPP2_UFCS(next)(ctx))) { return CPP2_UFCS(error)(ctx, "Missing ending bracket for named group."); }/* skip '|' */
+                if (!(ctx.next()))            { return ctx. error("Missing ending bracket for named group.");  }/* skip '|' */
 
-                auto old_parser_state {CPP2_UFCS(start_group)(ctx)}; 
-                auto old_branch_state {CPP2_UFCS(branch_reset_new_state)(ctx)}; 
-                if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
-                CPP2_UFCS(branch_reset_restore_state)(ctx, cpp2::move(old_branch_state));
-                auto inner_ {CPP2_UFCS(end_group)(ctx, cpp2::move(old_parser_state))}; 
+                auto old_parser_state {ctx.start_group()}; 
+                auto old_branch_state {ctx.branch_reset_new_state()}; 
+                if (!(ctx.parse_until(')'))) {return nullptr; }
+                ctx.branch_reset_restore_state(cpp2::move(old_branch_state));
+                auto inner_ {ctx.end_group(cpp2::move(old_parser_state))}; 
 
                 token_vec list {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?|"), cpp2::move(inner_), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ")")}; 
                 return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list)); 
             }
-            else {if (CPP2_UFCS(current)(ctx) == '=' || CPP2_UFCS(current)(ctx) == '!') {
-                return parse_lookahead(ctx, ("?" + cpp2::to_string(CPP2_UFCS(current)(ctx))), CPP2_UFCS(current)(ctx) == '='); 
+            else {if (ctx.current() == '=' || ctx.current() == '!') {
+                return parse_lookahead(ctx, ("?" + cpp2::to_string(ctx.current())), ctx.current() == '='); 
             }
             else {
                 // Simple modifier
                 has_id = false;
-                if (!(CPP2_UFCS(grab_until_one_of)(ctx, "):", cpp2::impl::out(&modifiers)))) {return CPP2_UFCS(error)(ctx, "Missing ending bracket for group."); }
-                if (!(CPP2_UFCS(parser_group_modifiers)(ctx, modifiers, modifiers_change_to))) {
+                if (!(ctx.grab_until_one_of("):", cpp2::impl::out(&modifiers)))) {return ctx.error("Missing ending bracket for group."); }
+                if (!(ctx.parser_group_modifiers(modifiers, modifiers_change_to))) {
                      return nullptr; 
                 }
 
-                if (')' == CPP2_UFCS(current)(ctx)) {
+                if (')' == ctx.current()) {
                     has_pattern = false;
                 }
                 else {
-                    if (!(CPP2_UFCS(next)(ctx))) { return CPP2_UFCS(error)(ctx, "Missing ending bracket for group."); }/* skip ':' */
+                    if (!(ctx.next()))            { return ctx. error("Missing ending bracket for group.");  }/* skip ':' */
                 }
             }}}}
         }
-        else {if (CPP2_UFCS(current)(ctx) == '*') {
+        else {if (ctx.current() == '*') {
             // named pattern
-            static_cast(CPP2_UFCS(next)(ctx));// Skip *.
+            static_cast(ctx.next());// Skip *.
             std::string name {""}; 
-            if (!(CPP2_UFCS(grab_until)(ctx, ':', cpp2::impl::out(&name)))) {return CPP2_UFCS(error)(ctx, "Missing colon for named pattern."); }
+            if (!(ctx.grab_until(':', cpp2::impl::out(&name)))) {return ctx.error("Missing colon for named pattern."); }
 
             if (name == "pla" || name == "positive_lookahead") {
                 return parse_lookahead(ctx, ("*" + cpp2::to_string(cpp2::move(name)) + ":"), true); 
@@ -3260,7 +3336,7 @@ template [[nodiscard]] auto gr
                 return parse_lookahead(ctx, ("*" + cpp2::to_string(cpp2::move(name)) + ":"), false); 
             }
             else {
-                return CPP2_UFCS(error)(ctx, ("Unknown named group pattern: '" + cpp2::to_string(cpp2::move(name)) + "'")); 
+                return ctx.error(("Unknown named group pattern: '" + cpp2::to_string(cpp2::move(name)) + "'")); 
             }}
         }}
 
@@ -3269,101 +3345,101 @@ template [[nodiscard]] auto gr
 
             auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
             if (cpp2::move(has_id)) {
-                (*cpp2::impl::assert_not_null(r)).number = CPP2_UFCS(next_group)(ctx);
+                (*cpp2::impl::assert_not_null(r)).number = ctx.next_group();
 
-                if (0 != CPP2_UFCS(size)(group_name)) {
-                    CPP2_UFCS(set_named_group)(ctx, group_name, (*cpp2::impl::assert_not_null(r)).number);
+                if (0 != group_name.size()) {
+                    ctx.set_named_group(group_name, (*cpp2::impl::assert_not_null(r)).number);
                 }
             }
 
-            auto old_state {CPP2_UFCS(start_group)(ctx)}; 
-            CPP2_UFCS(set_modifiers)(ctx, cpp2::move(modifiers_change_to));
-            if (!(CPP2_UFCS(parse_until)(ctx, ')'))) {return nullptr; }
-            (*cpp2::impl::assert_not_null(r)).inner = CPP2_UFCS(end_group)(ctx, cpp2::move(old_state));
-            CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), gen_string(cpp2::move(group_name), cpp2::move(group_name_brackets), cpp2::move(modifiers), (*cpp2::impl::assert_not_null(r)).inner));
+            auto old_state {ctx.start_group()}; 
+            ctx.set_modifiers(cpp2::move(modifiers_change_to));
+            if (!(ctx.parse_until(')'))) {return nullptr; }
+            (*cpp2::impl::assert_not_null(r)).inner = ctx.end_group(cpp2::move(old_state));
+            (*cpp2::impl::assert_not_null(r)).set_string(gen_string(cpp2::move(group_name), cpp2::move(group_name_brackets), cpp2::move(modifiers), (*cpp2::impl::assert_not_null(r)).inner));
 
             return r; 
         }
         else {
             // Only a modifier
-            CPP2_UFCS(set_modifiers)(ctx, cpp2::move(modifiers_change_to));
+            ctx.set_modifiers(cpp2::move(modifiers_change_to));
 
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("(?" + cpp2::to_string(cpp2::move(modifiers)) + ")")); 
         }
     }
 
-#line 1776 "regex.h2"
+#line 1860 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
-        if (0 != CPP2_UFCS(size)(name)) {
+        if (0 != name.size()) {
             if (name_brackets) {
-                start += ("?<" + cpp2::to_string(CPP2_UFCS(data)(name)) + ">");
+                start += ("?<" + cpp2::to_string(name.data()) + ">");
             }
             else {
-                start += ("?'" + cpp2::to_string(CPP2_UFCS(data)(name)) + "'");
+                start += ("?'" + cpp2::to_string(name.data()) + "'");
             }
         }
-        else {if (!(CPP2_UFCS(empty)(modifiers))) {
+        else {if (!(modifiers.empty())) {
             start += "?" + modifiers + ":";
         }}
 
-        return cpp2::move(start) + CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(inner_))) + ")"; 
+        return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1793 "regex.h2"
+#line 1877 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
-            CPP2_UFCS(add)(ctx, ("ctx.set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
+            ctx.add(("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
         }
 
-        CPP2_UFCS(generate_code)((*cpp2::impl::assert_not_null(inner)), ctx);
+        (*cpp2::impl::assert_not_null(inner)).generate_code(ctx);
         if (-1 != number) {
-            CPP2_UFCS(add)(ctx, ("ctx.set_group_end(" + cpp2::to_string(number) + ", r.pos);"));
-            auto tmp_name {CPP2_UFCS(gen_temp)(ctx)}; 
-            CPP2_UFCS(add)(ctx, (cpp2::to_string(tmp_name) + " :=  cpp2::regex::make_on_return(:() = {"));
-            CPP2_UFCS(add)(ctx, "  if !r&$*.matched {");
-            CPP2_UFCS(add)(ctx, ("    ctx&$*.set_group_invalid(" + cpp2::to_string(number) + ");"));
-            CPP2_UFCS(add)(ctx, "  }");
-            CPP2_UFCS(add)(ctx, "});");
-            CPP2_UFCS(add)(ctx, ("_ = " + cpp2::to_string(cpp2::move(tmp_name)) + ";"));// TODO: Guard object problem.
+            ctx.add(("ctx..set_group_end(" + cpp2::to_string(number) + ", r.pos);"));
+            auto tmp_name {ctx.gen_temp()}; 
+            ctx.add((cpp2::to_string(tmp_name) + " :=  cpp2::regex::make_on_return(:() = {"));
+            ctx.add("  if !r&$*.matched {");
+            ctx.add(("    ctx&$*..set_group_invalid(" + cpp2::to_string(number) + ");"));
+            ctx.add("  }");
+            ctx.add("});");
+            ctx.add(("_ = " + cpp2::to_string(cpp2::move(tmp_name)) + ";"));// TODO: Guard object problem.
         }
     }
 
-#line 1811 "regex.h2"
+#line 1895 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
-        CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner)), groups);
+        (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
-            static_cast(CPP2_UFCS(insert)(groups, number));
+            static_cast(groups.insert(number));
         }
     }
 
     group_token::~group_token() noexcept{}
 
-#line 1821 "regex.h2"
+#line 1905 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
-    if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'x'))) {return nullptr; }
+    if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
-    static_cast(CPP2_UFCS(next)(ctx));// Skip escape.
+    static_cast(ctx.next());// Skip escape.
 
-    if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "x escape without number."); }
+    if (!(ctx.next())) {return ctx.error("x escape without number."); }
 
     auto has_brackets {false}; 
     std::string number_str {""}; 
-    if ('{' == CPP2_UFCS(current)(ctx)) {
+    if ('{' == ctx.current()) {
         // TODO: Currently does not work since the compiler handles \x also.
         // Bracketed
         has_brackets = true;
-        static_cast(CPP2_UFCS(next)(ctx));// Skip '{'
-        if (!(CPP2_UFCS(grab_until)(ctx, '}', cpp2::impl::out(&number_str)))) {return CPP2_UFCS(error)(ctx, "No ending bracket for \\x"); }
+        static_cast(ctx.next());// Skip '{'
+        if (!(ctx.grab_until('}', cpp2::impl::out(&number_str)))) {return ctx.error("No ending bracket for \\x"); }
     }
     else {
         // grab two chars
 
-        if (!(CPP2_UFCS(grab_n)(ctx, 2, cpp2::impl::out(&number_str)))) {return CPP2_UFCS(error)(ctx, "Missing hexadecimal digits after \\x."); }
+        if (!(ctx.grab_n(2, cpp2::impl::out(&number_str)))) {return ctx.error("Missing hexadecimal digits after \\x."); }
     }
 
     auto number {0}; 
-    if (!(string_to_int(cpp2::move(number_str), number, 16))) {return CPP2_UFCS(error)(ctx, "Could not convert hexadecimal to int."); }
+    if (!(string_to_int(cpp2::move(number_str), number, 16))) {return ctx.error("Could not convert hexadecimal to int."); }
 
     // TODO: Change for unicode.
     char number_as_char {unsafe_narrow(cpp2::move(number))}; 
@@ -3374,29 +3450,29 @@ template [[nodiscard]] auto gr
     }
     syntax = { "\\\\x" + cpp2::to_string(syntax) };
 
-    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive))}; 
-    CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), cpp2::move(syntax));
+    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
+    (*cpp2::impl::assert_not_null(r)).set_string(cpp2::move(syntax));
     return r; 
 }
 
-#line 1862 "regex.h2"
+#line 1946 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
-    if (CPP2_UFCS(current)(ctx) == '$' || (CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == '$')) {
-        if ((CPP2_UFCS(current)(ctx) == '\\')) {static_cast(CPP2_UFCS(next)(ctx)); }// Skip escape
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", ("line_end_token_matcher")); 
+    if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
+        if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", ("line_end_token_matcher")); 
     }
-    else {if (CPP2_UFCS(current)(ctx) == '\\' && (CPP2_UFCS(peek)(ctx) == 'z' || CPP2_UFCS(peek)(ctx) == 'Z')) {
-        static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+    else {if (ctx.current() == '\\' && (ctx.peek() == 'z' || ctx.peek() == 'Z')) {
+        static_cast(ctx.next());// Skip escape
 
-        auto negate {CPP2_UFCS(current)(ctx) == 'Z'}; 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), ("line_end_token_matcher")); 
+        auto negate {ctx.current() == 'Z'}; 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(ctx.current())), ("line_end_token_matcher")); 
     }
     else {
         return nullptr; 
     }}
 }
 
-#line 1878 "regex.h2"
+#line 1962 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3409,48 +3485,48 @@ template [[
     }}
 }
 
-#line 1892 "regex.h2"
+#line 1976 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
-    if (CPP2_UFCS(current)(ctx) != '^' && !((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'A'))) {return nullptr; }
+    if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
-    if (CPP2_UFCS(current)(ctx) == '\\') {
-        static_cast(CPP2_UFCS(next)(ctx));
+    if (ctx.current() == '\\') {
+        static_cast(ctx.next());
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\A", "line_start_token_matcher"); 
     }
     else {
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", ("line_start_token_matcher")); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", ("line_start_token_matcher")); 
     }
 }
 
-#line 1904 "regex.h2"
+#line 1988 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1917 "regex.h2"
+#line 2001 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1919 "regex.h2"
+#line 2003 "regex.h2"
     }
 
-#line 1921 "regex.h2"
+#line 2005 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
-        auto inner_name {CPP2_UFCS(generate_func)(ctx, inner)}; 
+        auto inner_name {ctx.generate_func(inner)}; 
 
-        CPP2_UFCS(add_check)(ctx, ("lookahead_token_matcher(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
+        ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1927 "regex.h2"
+#line 2011 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
-        CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner)), groups);
+        (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1932 "regex.h2"
+#line 2016 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3460,12 +3536,12 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 1944 "regex.h2"
+#line 2028 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
-    if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+    if (ctx.current() != '\\') {return nullptr; }
 
     auto name {""}; 
-    auto c_next {CPP2_UFCS(peek)(ctx)}; 
+    auto c_next {ctx.peek()}; 
 
     if ('d' == c_next) {name = "named_class_digits"; }
     else {if ('D' == c_next) {name = "named_class_not_digits"; }
@@ -3480,104 +3556,104 @@ template [[nodiscard]] auto lookahead_token_match
     else {if ('W' == cpp2::move(c_next)) {name = "named_class_not_word"; }
     else {return nullptr; }}}}}}}}}}}
 
-    static_cast(CPP2_UFCS(next)(ctx));// Skip escape
+    static_cast(ctx.next());// Skip escape
 
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\\\\\" + cpp2::to_string(CPP2_UFCS(current)(ctx))), (cpp2::to_string(cpp2::move(name)) + "::match")); 
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\\\\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 1984 "regex.h2"
+#line 2068 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
-    if (!((CPP2_UFCS(current)(ctx) == '\\' && CPP2_UFCS(peek)(ctx) == 'o'))) {return nullptr; }
+    if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
-    static_cast(CPP2_UFCS(next)(ctx));// Skip escape.
+    static_cast(ctx.next());// Skip escape.
 
-    if (!(CPP2_UFCS(next)(ctx))) {return CPP2_UFCS(error)(ctx, "o escape without number."); }
-    if (CPP2_UFCS(current)(ctx) != '{') {return CPP2_UFCS(error)(ctx, "Missing opening bracket for \\o."); }
+    if (!(ctx.next())) {return ctx.error("o escape without number."); }
+    if (ctx.current() != '{') {return ctx.error("Missing opening bracket for \\o."); }
 
     std::string number_str {""}; 
-    static_cast(CPP2_UFCS(next)(ctx));// Skip '{'
-    if (!(CPP2_UFCS(grab_until)(ctx, '}', cpp2::impl::out(&number_str)))) {return CPP2_UFCS(error)(ctx, "No ending bracket for \\o"); }
+    static_cast(ctx.next());// Skip '{'
+    if (!(ctx.grab_until('}', cpp2::impl::out(&number_str)))) {return ctx.error("No ending bracket for \\o"); }
 
     auto number {0}; 
-    if (!(string_to_int(cpp2::move(number_str), number, 8))) {return CPP2_UFCS(error)(ctx, "Could not convert octal to int."); }
+    if (!(string_to_int(cpp2::move(number_str), number, 8))) {return ctx.error("Could not convert octal to int."); }
 
     // TODO: Change for unicode.
     char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
     std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::impl::as_(number_as_char), 8)) + "}"}; 
-    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), CPP2_UFCS(has)(CPP2_UFCS(get_modifiers)(ctx), expression_flags::case_insensitive))}; 
-    CPP2_UFCS(set_string)((*cpp2::impl::assert_not_null(r)), cpp2::move(syntax));
+    auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
+    (*cpp2::impl::assert_not_null(r)).set_string(cpp2::move(syntax));
     return r; 
 }
 
-#line 2018 "regex.h2"
+#line 2102 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2020 "regex.h2"
+#line 2104 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
-        if (CPP2_UFCS(current)(ctx) == '{') {
-            if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, "'{' without previous element."); }
+        if (ctx.current() == '{') {
+            if (!(ctx.has_token())) {return ctx.error("'{' without previous element."); }
 
             std::string inner {""}; 
-            if (!(CPP2_UFCS(grab_until)(ctx, '}', cpp2::impl::out(&inner)))) {return CPP2_UFCS(error)(ctx, "Missing closing bracket '}'."); }
+            if (!(ctx.grab_until('}', cpp2::impl::out(&inner)))) {return ctx.error("Missing closing bracket '}'."); }
 
-            inner = trim_copy(CPP2_UFCS(substr)(inner, 1));// Remove '{' and white spaces.
-            if (CPP2_UFCS(empty)(inner)) {return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
+            inner = trim_copy(inner.substr(1));  // Remove '{' and white spaces.
+            if (inner.empty()) {return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
             // Non-greedy or possessive
-            CPP2_UFCS(parse_modifier)((*cpp2::impl::assert_not_null(r)), ctx);
+            (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
             // Get range arguments
             std::string min_count_str {"-1"}; 
             std::string max_count_str {"-1"}; 
 
-            size_t sep {CPP2_UFCS(find)(inner, ",")}; 
+            size_t sep {inner.find(",")}; 
             if (sep == std::string::npos) {
                 min_count_str = inner;
                 max_count_str = inner;
-                if (!(string_to_int(cpp2::move(inner), (*cpp2::impl::assert_not_null(r)).min_count))) {return CPP2_UFCS(error)(ctx, "Could not convert range to number."); }
+                if (!(string_to_int(cpp2::move(inner), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); }
                 (*cpp2::impl::assert_not_null(r)).max_count = (*cpp2::impl::assert_not_null(r)).min_count;
             }
             else {
-                std::string inner_first {trim_copy(CPP2_UFCS(substr)(inner, 0, sep))}; 
-                std::string inner_last {trim_copy(CPP2_UFCS(substr)(cpp2::move(inner), cpp2::move(sep) + 1))}; 
+                std::string inner_first {trim_copy(inner.substr(0, sep))}; 
+                std::string inner_last {trim_copy(cpp2::move(inner).substr(cpp2::move(sep) + 1))}; 
 
-                if ((CPP2_UFCS(empty)(inner_first) && CPP2_UFCS(empty)(inner_last))) {
-                    return CPP2_UFCS(error)(ctx, "Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); 
+                if ((inner_first.empty() && inner_last.empty())) {
+                    return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); 
                 }
 
-                if (!(CPP2_UFCS(empty)(inner_first))) {
+                if (!(inner_first.empty())) {
                     min_count_str = inner_first;
-                    if (!(string_to_int(cpp2::move(inner_first), (*cpp2::impl::assert_not_null(r)).min_count))) {return CPP2_UFCS(error)(ctx, "Could not convert range to number."); }
+                    if (!(string_to_int(cpp2::move(inner_first), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); }
                 }
-                if (!(CPP2_UFCS(empty)(inner_last))) {
+                if (!(inner_last.empty())) {
                     max_count_str = inner_last;
-                    if (!(string_to_int(cpp2::move(inner_last), (*cpp2::impl::assert_not_null(r)).max_count))) {return CPP2_UFCS(error)(ctx, "Could not convert range to number."); }
+                    if (!(string_to_int(cpp2::move(inner_last), (*cpp2::impl::assert_not_null(r)).max_count))) {return ctx.error("Could not convert range to number."); }
                 }
             }
 
-#line 2064 "regex.h2"
+#line 2148 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
-                    return CPP2_UFCS(error)(ctx, ("Min value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + ")")); 
+                    return ctx.error(("Min value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + ")")); 
                 }
             }
             if (-1 != (*cpp2::impl::assert_not_null(r)).max_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).max_count)))) {
-                    return CPP2_UFCS(error)(ctx, ("Max value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count) + ")")); 
+                    return ctx.error(("Max value in range is negative. Have " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count) + ")")); 
                 }
                 if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                     if (!((cpp2::impl::cmp_less_eq((*cpp2::impl::assert_not_null(r)).min_count,(*cpp2::impl::assert_not_null(r)).max_count)))) {
-                        return CPP2_UFCS(error)(ctx, ("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count))); 
+                        return ctx.error(("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).min_count) + " <= " + cpp2::to_string((*cpp2::impl::assert_not_null(r)).max_count))); 
                     }
                 }
             }
 
-            (*cpp2::impl::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
-            (*cpp2::impl::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner_token))) + CPP2_UFCS(gen_range_string)((*cpp2::impl::assert_not_null(r))) + CPP2_UFCS(gen_mod_string)((*cpp2::impl::assert_not_null(r)));
+            (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
+            (*cpp2::impl::assert_not_null(r)).string_rep = (*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner_token)).to_string() + (*cpp2::impl::assert_not_null(r)).gen_range_string() + (*cpp2::impl::assert_not_null(r)).gen_mod_string();
 
             return r; 
         }
@@ -3585,19 +3661,19 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2090 "regex.h2"
+#line 2174 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
-        if (CPP2_UFCS(peek)(ctx) == '?') {
+        if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
-            static_cast(CPP2_UFCS(next)(ctx));
+            static_cast(ctx.next());
         }
-        else {if (CPP2_UFCS(peek)(ctx) == '+') {
+        else {if (ctx.peek() == '+') {
             kind = range_flags::possessive;
-            static_cast(CPP2_UFCS(next)(ctx));
+            static_cast(ctx.next());
         }}
     }
 
-#line 2101 "regex.h2"
+#line 2185 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3610,7 +3686,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2113 "regex.h2"
+#line 2197 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3635,25 +3711,25 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2137 "regex.h2"
+#line 2221 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
-        auto inner_name {CPP2_UFCS(generate_func)(ctx, inner_token)}; 
+        auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
-        CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner_token)), groups);
-        auto reset_name {CPP2_UFCS(generate_reset)(ctx, cpp2::move(groups))}; 
+        (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
+        auto reset_name {ctx.generate_reset(cpp2::move(groups))}; 
 
-        auto next_name {CPP2_UFCS(next_func_name)(ctx)}; 
-        CPP2_UFCS(add_statefull)(ctx, next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(CPP2_UFCS(match_parameters)(ctx)) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
+        auto next_name {ctx.next_func_name()}; 
+        ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2147 "regex.h2"
+#line 2231 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
-        CPP2_UFCS(add_groups)((*cpp2::impl::assert_not_null(inner_token)), groups);
+        (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2155 "regex.h2"
+#line 2239 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3666,28 +3742,28 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2167 "regex.h2"
+#line 2251 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2172 "regex.h2"
+#line 2256 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2177 "regex.h2"
+#line 2261 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2183 "regex.h2"
+#line 2267 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
-        auto res {CPP2_UFCS(pass)(ctx, cur)}; 
+        auto res {ctx.pass(cur)}; 
         auto count {0}; 
 
         while( is_below_lower_bound(count) && res.matched ) {
@@ -3701,13 +3777,13 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2198 "regex.h2"
+#line 2282 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
         }}; 
         auto is_m_valid {true}; 
-        auto r {CPP2_UFCS(fail)(ctx)}; 
+        auto r {ctx.fail()}; 
         if (is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid)) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
             r = inner(cur, ctx, cpp2::move(inner_call));
@@ -3730,7 +3806,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2226 "regex.h2"
+#line 2310 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3755,7 +3831,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2250 "regex.h2"
+#line 2334 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3772,7 +3848,7 @@ template [[nodiscard]] auto lookahead_token_match
 
             auto r {inner(pos, ctx, end_func)}; 
             if (!(r.matched)) {
-                return CPP2_UFCS(fail)(ctx); 
+                return ctx.fail(); 
             }
             count += 1;
             pos = cpp2::move(r).pos;
@@ -3781,20 +3857,20 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2281 "regex.h2"
+#line 2365 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
-        if (CPP2_UFCS(current)(ctx) == '*') {
+        if (ctx.current() == '*') {
             (*cpp2::impl::assert_not_null(r)).min_count = 0;
             (*cpp2::impl::assert_not_null(r)).max_count = -1;
             symbol = '*';
         }
-        else {if (CPP2_UFCS(current)(ctx) == '+') {
+        else {if (ctx.current() == '+') {
             (*cpp2::impl::assert_not_null(r)).min_count = 1;
             (*cpp2::impl::assert_not_null(r)).max_count = -1;
             symbol = '+';
-        }else {if (CPP2_UFCS(current)(ctx) == '?') {
+        }else {if (ctx.current() == '?') {
             (*cpp2::impl::assert_not_null(r)).min_count = 0;
             (*cpp2::impl::assert_not_null(r)).max_count = 1;
             symbol = '?';
@@ -3802,28 +3878,28 @@ template [[nodiscard]] auto lookahead_token_match
             return nullptr; 
         }}}
 
-        if (!(CPP2_UFCS(has_token)(ctx))) {return CPP2_UFCS(error)(ctx, ("'" + cpp2::to_string(CPP2_UFCS(current)(ctx)) + "' without previous element.")); }
+        if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2304 "regex.h2"
-        CPP2_UFCS(parse_modifier)((*cpp2::impl::assert_not_null(r)), ctx);
+#line 2388 "regex.h2"
+        (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
-        (*cpp2::impl::assert_not_null(r)).inner_token = CPP2_UFCS(pop_token)(ctx);
-        (*cpp2::impl::assert_not_null(r)).string_rep = CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner_token))) + cpp2::move(symbol) + CPP2_UFCS(gen_mod_string)((*cpp2::impl::assert_not_null(r)));
+        (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
+        (*cpp2::impl::assert_not_null(r)).string_rep = (*cpp2::impl::assert_not_null((*cpp2::impl::assert_not_null(r)).inner_token)).to_string() + cpp2::move(symbol) + (*cpp2::impl::assert_not_null(r)).gen_mod_string();
         return r; 
     }
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2316 "regex.h2"
+#line 2400 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
-    if (CPP2_UFCS(current)(ctx) != '\\') {return nullptr; }
+    if (ctx.current() != '\\') {return nullptr; }
 
-    if (CPP2_UFCS(peek)(ctx) == 'b') {
-        static_cast(CPP2_UFCS(next)(ctx));
+    if (ctx.peek() == 'b') {
+        static_cast(ctx.next());
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\b", "word_boundary_token_matcher"); 
     }
-    else {if (CPP2_UFCS(peek)(ctx) == 'B') {
-        static_cast(CPP2_UFCS(next)(ctx));
+    else {if (ctx.peek() == 'B') {
+        static_cast(ctx.next());
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\B", "word_boundary_token_matcher"); 
     }
     else {
@@ -3831,22 +3907,22 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2332 "regex.h2"
+#line 2416 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
     if (cur == ctx.begin) {// String start
         if (cur != ctx.end) {// No empty string
-            is_match = CPP2_UFCS(includes)(cpp2::move(words), *cpp2::impl::assert_not_null(cur));
+            is_match = cpp2::move(words).includes(*cpp2::impl::assert_not_null(cur));
         }
     }
     else {if (cur == ctx.end) {// String end
-        is_match = CPP2_UFCS(includes)(cpp2::move(words), *cpp2::impl::assert_not_null((cur - 1)));
+        is_match = cpp2::move(words).includes(*cpp2::impl::assert_not_null((cur - 1)));
     }
     else { // Middle of string
         is_match = 
-                (CPP2_UFCS(includes)(words, *cpp2::impl::assert_not_null((cur - 1))) && !(CPP2_UFCS(includes)(words, *cpp2::impl::assert_not_null(cur)))) // End of word: \w\W
-            || (!(CPP2_UFCS(includes)(words, *cpp2::impl::assert_not_null((cur - 1)))) && CPP2_UFCS(includes)(words, *cpp2::impl::assert_not_null(cur)));// Start of word: \W\w
+                (words.includes(*cpp2::impl::assert_not_null((cur - 1))) && !(words.includes(*cpp2::impl::assert_not_null(cur)))) // End of word: \w\W
+            || (!(words.includes(*cpp2::impl::assert_not_null((cur - 1)))) && words.includes(*cpp2::impl::assert_not_null(cur)));// Start of word: \W\w
 
     }}
     if (negate) {
@@ -3856,31 +3932,31 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2376 "regex.h2"
+#line 2460 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2379 "regex.h2"
+#line 2463 "regex.h2"
         }
 
-#line 2381 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return CPP2_UFCS(size)(ctx);  }
-#line 2382 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_string)(ctx, g); }
-#line 2383 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_start)(ctx, g); }
-#line 2384 "regex.h2"
-        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return CPP2_UFCS(get_group_end)(ctx, g); }
-
-#line 2386 "regex.h2"
+#line 2465 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
+#line 2466 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
+#line 2467 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
+#line 2468 "regex.h2"
+        template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
+
+#line 2470 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2387 "regex.h2"
+#line 2471 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2388 "regex.h2"
+#line 2472 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2390 "regex.h2"
+#line 2474 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3889,13 +3965,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2399 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2400 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2401 "regex.h2"
+#line 2483 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
+#line 2484 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
+#line 2485 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2402 "regex.h2"
+#line 2486 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3903,13 +3979,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
     }
 
-#line 2409 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(CPP2_UFCS(begin)(str), CPP2_UFCS(end)(str)); }
-#line 2410 "regex.h2"
-    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), CPP2_UFCS(end)(str)); }
-#line 2411 "regex.h2"
+#line 2493 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
+#line 2494 "regex.h2"
+    template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
+#line 2495 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2412 "regex.h2"
+#line 2496 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -3929,60 +4005,60 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(cpp2::move(matched), cpp2::move(ctx)); 
     }
 
-#line 2431 "regex.h2"
+#line 2515 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2436 "regex.h2"
+#line 2520 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
-        if (cpp2::impl::cmp_less(pos,CPP2_UFCS(size)(str))) {
-            return CPP2_UFCS(begin)(str) + pos; 
+        if (cpp2::impl::cmp_less(pos,str.size())) {
+            return str.begin() + pos; 
         }
         else {
-            return CPP2_UFCS(end)(str); 
+            return str.end(); 
         }
     }
 
-#line 2465 "regex.h2"
+#line 2549 "regex.h2"
     template  regex_parser::regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2469 "regex.h2"
+#line 2553 "regex.h2"
     }
 
-#line 2473 "regex.h2"
+#line 2557 "regex.h2"
     template  auto regex_parser::error(cpp2::impl::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2481 "regex.h2"
+#line 2565 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_context parse_ctx {regex}; 
         std::string mod {modifier}; 
-        if (!(CPP2_UFCS(parse)(parse_ctx, cpp2::move(mod)))) {
+        if (!(parse_ctx.parse(cpp2::move(mod)))) {
             error(parse_ctx.error_text);
             return "Error"; 
         }
 
         source += "{\n";
         source += " wrap:  type = {\n"; // TODO: Remove wrapper when template template parameters are available.
-        source += ("  context: type == cpp2::regex::match_context;");
+        source += ("  context: type == cpp2::regex::match_context;");
 
         generation_context gen_ctx {}; 
-        source += CPP2_UFCS(run)(gen_ctx, CPP2_UFCS(get_tokens)(parse_ctx));
+        source += gen_ctx.run(parse_ctx.get_tokens());
         source += "  entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n";
-        source += "    ctx.set_group_start(0, cur);\n";
-        source += ("    r := " + cpp2::to_string(CPP2_UFCS(get_entry_func)(gen_ctx)) + "(cur, ctx, cpp2::regex::true_end_func());\n");
-        source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
+        source += "    ctx..set_group_start(0, cur);\n";
+        source += ("    r := " + cpp2::to_string(gen_ctx.get_entry_func()) + "(cur, ctx, cpp2::regex::true_end_func());\n");
+        source += "    if r.matched { ctx..set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
-        source += CPP2_UFCS(create_named_group_lookup)(cpp2::move(gen_ctx), parse_ctx.named_groups);
+        source += cpp2::move(gen_ctx).create_named_group_lookup(parse_ctx.named_groups);
         source += "}\n";
 
-        auto string {CPP2_UFCS(to_string)((*cpp2::impl::assert_not_null(CPP2_UFCS(get_tokens)(parse_ctx))))}; 
+        auto string {(*cpp2::impl::assert_not_null(parse_ctx.get_tokens())).to_string()}; 
         source += ("  to_string: () -> std::string = { return \"" + cpp2::to_string(cpp2::move(string)) + "\"; }\n");
         source += "}\n";
 
@@ -3991,10 +4067,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2515 "regex.h2"
+#line 2599 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
-    auto r {CPP2_UFCS(parse)(parser)}; 
+    auto r {parser.parse()}; 
     static_cast(cpp2::move(parser));
     return r; 
 }
diff --git a/source/regex.h2 b/source/regex.h2
index 1da1fadf1c..293e375b9c 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -158,7 +158,7 @@ matcher_list:  type = {
 
 no_tail:  type == matcher_list;
 true_end_func: @struct type = {
-    operator(): (in this, cur, inout ctx) ctx.pass(cur);
+    operator(): (in this, cur, inout ctx) ctx..pass(cur);
 }
 
 //-----------------------------------------------------------------------
@@ -202,7 +202,7 @@ list_class_entry:  type = {
 //
 named_class_entry:  type = {
     includes: (c: CharT) Inner::includes(c);
-    to_string: ()        "[:(Name.data())$:]";
+    to_string: ()        "[:(Name..data())$:]";
 }
 
 negated_class_entry:  type = {
@@ -214,7 +214,7 @@ negated_class_entry:  type = {
 //
 shorthand_class_entry:  type = {
     includes: (c: CharT) Inner::includes(c);
-    to_string: ()        Name.str();
+    to_string: ()        Name..str();
 }
 
 
@@ -277,7 +277,7 @@ extract_position_helper:  type = {
     match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
         r := Other::match(cur, ctx, modifiers, end_func);
         if r.matched {
-            ctx.set_alternative_pos(alternative, cur);
+            ctx..set_alternative_pos(alternative, cur);
         }
         return r;
     }
@@ -291,7 +291,7 @@ extract_position_helper:  type = {
 //
 special_syntax_wrapper:  type = {
     this : base = ();
-    to_string:    () syntax.str();
+    to_string:    () syntax..str();
 }
 
 //-----------------------------------------------------------------------
@@ -358,7 +358,7 @@ parse_context_group_state: @struct type = {
     next_alternative: (inout this) = {
         new_list: token_vec = ();
         std::swap(new_list, cur_match_list);
-        _ = alternate_match_lists.insert(alternate_match_lists.end(), shared.new(new_list));
+        _ = alternate_match_lists..insert(alternate_match_lists..end(), shared.new(new_list));
     }
 
     swap: (inout this, inout t: parse_context_group_state) = {
@@ -368,7 +368,7 @@ parse_context_group_state: @struct type = {
     }
 
     get_tokens: (inout this) -> token_ptr = {
-        if alternate_match_lists.empty() {
+        if alternate_match_lists..empty() {
             return shared.new(cur_match_list);
         }
         else {
@@ -378,16 +378,16 @@ parse_context_group_state: @struct type = {
     }
 
     add: (inout this, token: token_ptr) = {
-        if token* is char_token && !cur_match_list.empty() && cur_match_list.back()* is char_token {
+        if token* is char_token && !cur_match_list..empty() && cur_match_list..back()* is char_token {
             // This and the last token are char tokens. Combine them.
-            (cur_match_list.back()* as char_token).append(token* as char_token);
+            (cur_match_list..back()* as char_token)..append(token* as char_token);
         }
         else {
-            cur_match_list.push_back(token);
+            cur_match_list..push_back(token);
         }
     }
 
-    empty: (this) -> bool = cur_match_list.empty();
+    empty: (this) -> bool = cur_match_list..empty();
 }
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
@@ -448,13 +448,13 @@ parse_context: type = {
 
     start_group: (inout this) -> parse_context_group_state = {
         old_state: parse_context_group_state = ();
-        old_state.swap(cur_group_state);
+        old_state..swap(cur_group_state);
 
         return old_state;
     }
 
     end_group: (inout this, old_state: parse_context_group_state) -> token_ptr = {
-        inner := cur_group_state.get_tokens();
+        inner := cur_group_state..get_tokens();
         cur_group_state = old_state;
         return inner;
     }
@@ -474,19 +474,19 @@ parse_context: type = {
         old_state: parse_context_branch_reset_state = ();
         std::swap(old_state, cur_branch_reset_state);
 
-        cur_branch_reset_state.set_active_reset(old_state.cur_group);
+        cur_branch_reset_state..set_active_reset(old_state.cur_group);
         return old_state;
     }
 
     branch_reset_restore_state: (inout this, old_state: parse_context_branch_reset_state) = {
         max_group := cur_branch_reset_state.max_group;
         cur_branch_reset_state = old_state;
-        cur_branch_reset_state.set_next(max_group);
+        cur_branch_reset_state..set_next(max_group);
     }
 
     next_alternative: (inout this) = {
-        cur_group_state.next_alternative();
-        cur_branch_reset_state.next_alternative();
+        cur_group_state..next_alternative();
+        cur_branch_reset_state..next_alternative();
     }
 
     // Position management functions
@@ -494,21 +494,21 @@ parse_context: type = {
 
     get_pos: (this) pos;
 
-    get_range: (this, start: int, end: int) std::string(regex.substr(start, end - start + 1));
+    get_range: (this, start: int, end: int) std::string(regex..substr(start, end - start + 1));
 
     add_token: (inout this, token: token_ptr) = {
-        cur_group_state.add(token);
+        cur_group_state..add(token);
     }
 
     has_token: (this) -> bool = {
-        return !cur_group_state.empty();
+        return !cur_group_state..empty();
     }
 
     pop_token: (inout this) -> token_ptr = {
         r : token_ptr = nullptr;
         if has_token() {
-            r = cur_group_state.cur_match_list.back();
-            cur_group_state.cur_match_list.pop_back();
+            r = cur_group_state.cur_match_list..back();
+            cur_group_state.cur_match_list..pop_back();
         }
 
         return r;
@@ -524,18 +524,18 @@ parse_context: type = {
     }
 
     next_group: (inout this) -> int = {
-        return cur_branch_reset_state.next();
+        return cur_branch_reset_state..next();
     }
 
     set_named_group: (inout this, name: std::string, id: int) = {
-        if !named_groups.contains(name) { // Redefinition of group name is not an error. The left most one is retained.
+        if !named_groups..contains(name) { // Redefinition of group name is not an error. The left most one is retained.
             named_groups[name] = id;
         }
     }
 
     get_named_group: (this, name: std::string) -> int = {
-        iter := named_groups.find(name);
-        if iter == named_groups.end() {
+        iter := named_groups..find(name);
+        if iter == named_groups..end() {
              return -1;
         }
         else {
@@ -547,7 +547,7 @@ parse_context: type = {
 
     private next_impl: (inout this, in_class: bool, no_skip: bool) -> bool = {
         pos = get_next_position(in_class, no_skip);
-        if pos != regex.size() {
+        if pos != regex..size() {
             return true;
         }
         else {
@@ -568,9 +568,9 @@ parse_context: type = {
         return r;
     }
 
-    has_next: (this) -> bool = { return pos < regex.size(); }
+    has_next: (this) -> bool = { return pos < regex..size(); }
 
-    valid: (this) -> bool = { return has_next() && error_text.empty(); }
+    valid: (this) -> bool = { return has_next() && error_text..empty(); }
 
     error: (inout this, err: std::string) -> token_ptr = {
         error_text = err;
@@ -595,25 +595,25 @@ parse_context: type = {
         perl_syntax := false;
         if !no_skip {
             if in_class {
-                perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax) && get_modifiers().has(expression_flags::perl_code_syntax_in_classes);
+                perl_syntax = get_modifiers()..has(expression_flags::perl_code_syntax) && get_modifiers()..has(expression_flags::perl_code_syntax_in_classes);
             }
             else {
-                perl_syntax = get_modifiers().has(expression_flags::perl_code_syntax);
+                perl_syntax = get_modifiers()..has(expression_flags::perl_code_syntax);
             }
         }
         cur := pos + 1;
         if perl_syntax {
-            while cur < regex.size() next (cur += 1) {
+            while cur < regex..size() next (cur += 1) {
                 n: = regex[cur];
 
                 if space_class::includes(n) {
                     continue;
                 }
                 else if !in_class && '#' == n {
-                    cur = regex.find("\n", cur);
+                    cur = regex..find("\n", cur);
                     if std::string::npos == cur {
                         // No new line, comment runs until the end of the pattern
-                        cur = regex.size();
+                        cur = regex..size();
                     }
                 }
                 else { // None space none comment char
@@ -623,8 +623,8 @@ parse_context: type = {
         }
 
         // Check for end of file.
-        if cur > regex.size() {
-            cur = regex.size();
+        if cur > regex..size() {
+            cur = regex..size();
         }
         return cur;
     }
@@ -634,14 +634,14 @@ parse_context: type = {
         start := pos;
         end:= pos;
         if any {
-            end = regex.find_first_of(e, pos);
+            end = regex..find_first_of(e, pos);
         }
         else {
-            end = regex.find(e, pos);
+            end = regex..find(e, pos);
         }
 
         if end != std::string_view::npos {
-            r = regex.substr(start, end - pos);
+            r = regex..substr(start, end - pos);
             pos = end;
             return true;
         }
@@ -656,8 +656,8 @@ parse_context: type = {
     grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true);
 
     grab_n: (inout this, in n: int, out r: std::string) -> bool = {
-        if pos + n <= regex.size() {
-            r = regex.substr(pos, n);
+        if pos + n <= regex..size() {
+            r = regex..substr(pos, n);
             pos += n - 1;
             return true;
         }
@@ -673,23 +673,23 @@ parse_context: type = {
         if regex[start_search] == '-' {
             start_search += 1;
         }
-        end := regex.find_first_not_of("1234567890", start_search);
+        end := regex..find_first_not_of("1234567890", start_search);
 
         r : std::string;
         if end != std::string::npos {
-            r = regex.substr(start, end - start);
+            r = regex..substr(start, end - start);
             pos = end - 1;
         }
         else {
-            r = regex.substr(start);
-            pos = regex.size() - 1;
+            r = regex..substr(start);
+            pos = regex..size() - 1;
         }
         return r;
     }
 
     private peek_impl: (in this, in_class: bool) -> char = {
         next_pos := get_next_position(in_class, false);
-        if next_pos < regex.size() {
+        if next_pos < regex..size() {
             return regex[next_pos];
         }
         else {
@@ -709,15 +709,15 @@ parse_context: type = {
 
         apply := :(flag: expression_flags) = {
             if is_negative&$* {
-                parser_modifiers&$*.clear(flag);
+                parser_modifiers&$*..clear(flag);
             }
             else {
-                parser_modifiers&$*.set(flag);
+                parser_modifiers&$*..set(flag);
             }
         };
 
-        iter := change_str.begin();
-        while iter != change_str.end() next (iter++) {
+        iter := change_str..begin();
+        while iter != change_str..end() next (iter++) {
             cur := iter*;
             if cur == '^' {
                 is_reset = true;
@@ -732,12 +732,12 @@ parse_context: type = {
             else if cur == 's' { apply(expression_flags::single_line); }
             else if cur == 'n' { apply(expression_flags::no_group_captures); }
             else if cur == 'x' {
-                if (iter + 1) == change_str.end() || (iter + 1)* != 'x' {
+                if (iter + 1) == change_str..end() || (iter + 1)* != 'x' {
                     // x modifier
                     apply(expression_flags::perl_code_syntax);
 
                     // Just x unsets xx and remove x also removes xx
-                    parser_modifiers.clear(expression_flags::perl_code_syntax_in_classes);
+                    parser_modifiers..clear(expression_flags::perl_code_syntax_in_classes);
                 }
                 else { // xx modifier
                     // xx also sets or unsets x
@@ -800,7 +800,7 @@ parse_context: type = {
 
         r := parse_until('\0');
         if r {
-            root = cur_group_state.get_tokens();
+            root = cur_group_state..get_tokens();
         }
 
         return r;
@@ -821,7 +821,7 @@ generation_function_context: @struct type = {
     }
 
     remove_tabs: (inout this, c: int) = {
-        tabs = tabs.substr(0, c * 2);
+        tabs = tabs..substr(0, c * 2);
     }
 }
 
@@ -850,7 +850,7 @@ generation_context: type = {
     add_statefull: (inout this, next_func: std::string, c: std::string) = {
         end_func_statefull(c);
 
-        name := next_func.substr(0, next_func.ssize() - 2);
+        name := next_func..substr(0, next_func..size() - 2);
         start_func_named(name);
     }
 
@@ -862,14 +862,14 @@ generation_context: type = {
 
     generate_func: (inout this, token: token_ptr) -> std::string = {
         name := start_func();
-        token*.generate_code(this);
+        token*..generate_code(this);
         end_func();
 
         return name;
     }
 
     generate_reset: (inout this, groups: std::set) -> std::string = {
-        if groups.empty() {
+        if groups..empty() {
             return "cpp2::regex::no_reset()";
         }
 
@@ -879,7 +879,7 @@ generation_context: type = {
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
         cur*.code += "(cur*.tabs)$  operator(): (this, inout ctx) = {\n";
         for groups do (g) {
-            cur*.code += "(cur*.tabs)$  ctx.set_group_invalid((g)$);\n";
+            cur*.code += "(cur*.tabs)$  ctx..set_group_invalid((g)$);\n";
         }
         cur*.code += "(cur*.tabs)$  }\n";
         cur*.code += "(cur*.tabs)$}\n";
@@ -891,7 +891,7 @@ generation_context: type = {
 
 
     get_current: (inout this) -> *generation_function_context = {
-        return gen_stack.back()&;
+        return gen_stack..back()&;
     }
 
     get_base: (inout this) -> *generation_function_context = {
@@ -907,9 +907,9 @@ generation_context: type = {
 
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
         cur*.code += "(cur*.tabs)$  operator(): (this, cur: Iter, inout ctx: context, other) -> cpp2::regex::match_return = {\n";
-        cur*.code += "(cur*.tabs)$    r := ctx.pass(cur);\n";
+        cur*.code += "(cur*.tabs)$    r := ctx..pass(cur);\n";
         cur*.code += "(cur*.tabs)$    do {\n";
-        cur*.add_tabs(3);
+        cur*..add_tabs(3);
     }
 
     start_func: (inout this) -> std::string = {
@@ -920,7 +920,7 @@ generation_context: type = {
 
     end_func_statefull: (inout this, s: std::string) = {
         cur := get_current();
-        cur*.remove_tabs(3);
+        cur*..remove_tabs(3);
         cur*.code += "\n";
         cur*.code += "(cur*.tabs)$    } while false;\n";
         cur*.code += "(cur*.tabs)$    if r.matched {\n";
@@ -963,7 +963,7 @@ generation_context: type = {
     }
 
     new_context: (inout this) -> *generation_function_context = {
-        gen_stack.push_back(generation_function_context());
+        gen_stack..push_back(generation_function_context());
         cur := get_current();
         cur*.tabs = "    ";
 
@@ -975,7 +975,7 @@ generation_context: type = {
         base := get_base();
         base*.code += cur*.code;
 
-        gen_stack.pop_back();
+        gen_stack..pop_back();
     }
 
     create_named_group_lookup: (this, named_groups: std::map) -> std::string = {
@@ -989,7 +989,7 @@ generation_context: type = {
         }
 
         // Generate else branch or return if list is empty.
-        if named_groups.empty() {
+        if named_groups..empty() {
             res += "  _ = name;\n";
             res += "  return -1;\n";
         }
@@ -1013,20 +1013,20 @@ regex_token_list: @polymorphic_base type = {
 
     generate_code: (virtual this, inout ctx: generation_context) = {
         for tokens do (token) {
-            token*.generate_code(ctx);
+            token*..generate_code(ctx);
         }
     }
 
     add_groups: (virtual this, inout groups: std::set) = {
         for tokens do (token) {
-            token*.add_groups(groups);
+            token*..add_groups(groups);
         }
     }
 
     gen_string: (vec: token_vec) -> std::string = {
         r : std::string = "";
         for vec do (token) {
-            r += token*.to_string();
+            r += token*..to_string();
         }
         return r;
     }
@@ -1058,7 +1058,7 @@ regex_token_check: @polymorphic_base type = {
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check(check + "(" + ctx.match_parameters() + ")");
+        ctx..add_check(check + "(" + ctx..match_parameters() + ")");
     }
 }
 
@@ -1073,7 +1073,7 @@ regex_token_code: @polymorphic_base type = {
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add(code);
+        ctx..add(code);
     }
 }
 
@@ -1100,10 +1100,10 @@ alternative_token: @polymorphic_base type = {
     operator=:(out this) = {}
 
     parse: (inout ctx: parse_context) -> token_ptr = {
-        if ctx.current() != '|' { return nullptr; }
+        if ctx..current() != '|' { return nullptr; }
 
-        if !ctx.has_token() { return ctx.error("Alternative with no content."); }
-        ctx.next_alternative();
+        if !ctx..has_token() { return ctx..error("Alternative with no content."); }
+        ctx..next_alternative();
         return shared.new();
     }
 
@@ -1128,20 +1128,20 @@ alternative_token_gen: @polymorphic_base type = {
 
         for alternatives do (cur) {
             groups: std::set = ();
-            cur*.add_groups(groups);
+            cur*..add_groups(groups);
 
-            functions += ", " + ctx.generate_func(cur);
-            functions += ", " + ctx.generate_reset(groups);
+            functions += ", " + ctx..generate_func(cur);
+            functions += ", " + ctx..generate_reset(groups);
         }
 
-        next_name := ctx.next_func_name();
+        next_name := ctx..next_func_name();
 
-        ctx.add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match((ctx.match_parameters())$, other, (next_name)$ (functions)$)");
+        ctx..add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match((ctx..match_parameters())$, other, (next_name)$ (functions)$)");
     }
 
     add_groups: (override this, inout groups: std::set) = {
         for alternatives do (cur) {
-            cur*.add_groups(groups);
+            cur*..add_groups(groups);
         }
     }
 
@@ -1150,7 +1150,7 @@ alternative_token_gen: @polymorphic_base type = {
         sep: std::string = "";
 
         for a do (cur) {
-            r += sep + cur*.to_string();
+            r += sep + cur*..to_string();
             sep = "|";
         }
 
@@ -1176,7 +1176,7 @@ alternative_token_matcher:  type = {
             if constexpr 0 != sizeof...(Other) {
                 return match_first(cur, ctx, end_func, tail, other...);
             } else {
-                return ctx.fail();
+                return ctx..fail();
             }
         }
     }
@@ -1194,13 +1194,13 @@ any_token: @polymorphic_base type = {
     }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
-        if '.' != ctx.current() { return nullptr;}
+        if '.' != ctx..current() { return nullptr;}
 
-        return shared.new(ctx.get_modifiers().has(expression_flags::single_line));
+        return shared.new(ctx..get_modifiers()..has(expression_flags::single_line));
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("any_token_matcher((ctx.match_parameters())$)");
+        ctx..add_check("any_token_matcher((ctx..match_parameters())$)");
     }
 }
 
@@ -1228,7 +1228,7 @@ char_token: @polymorphic_base type = {
     }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
-        return shared.new(ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive));
+        return shared.new(ctx..current(), ctx..get_modifiers()..has(expression_flags::case_insensitive));
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
@@ -1236,7 +1236,7 @@ char_token: @polymorphic_base type = {
             upper: std::string = token;
             lower: std::string = token;
 
-            (copy i: int = 0) while i < token.ssize() next i += 1 {
+            (copy i: int = 0) while i < token..size() next i += 1 {
                 lower[i] = safe_tolower(token[i]);
                 upper[i] = safe_toupper(token[i]);
             }
@@ -1254,40 +1254,40 @@ char_token: @polymorphic_base type = {
     }
 
     gen_case_insensitive: (this, lower: std::string, upper: std::string, inout ctx: generation_context) = {
-        name: std::string = "str_(ctx.gen_temp())$";
+        name: std::string = "str_(ctx..gen_temp())$";
         lower_name: std::string = "lower_(name)$";
         upper_name: std::string = "upper_(name)$";
-        size := token.size();
-        ctx.add("(lower_name)$ : std::array = \"(add_escapes(lower))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
-        ctx.add("(upper_name)$ : std::array = \"(add_escapes(upper))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
-        ctx.add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
-        ctx.add("    r.matched = false;");
-        ctx.add("    break;");
-        ctx.add("}");
-        ctx.add("");
-        ctx.add("(copy i : int = 0) while i < (size)$ next (i += 1) {");
-        ctx.add("    if !((lower_name)$[i] == r.pos[i] || (upper_name)$[i] == r.pos[i]) { r.matched = false; }");
-        ctx.add("}");
-        ctx.add("");
-        ctx.add("if r.matched { r.pos += (size)$; }");
-        ctx.add("else { break; }");
+        size := token..size();
+        ctx..add("(lower_name)$ : std::array = \"(add_escapes(lower))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx..add("(upper_name)$ : std::array = \"(add_escapes(upper))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx..add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
+        ctx..add("    r.matched = false;");
+        ctx..add("    break;");
+        ctx..add("}");
+        ctx..add("");
+        ctx..add("(copy i : int = 0) while i < (size)$ next (i += 1) {");
+        ctx..add("    if !((lower_name)$[i] == r.pos[i] || (upper_name)$[i] == r.pos[i]) { r.matched = false; }");
+        ctx..add("}");
+        ctx..add("");
+        ctx..add("if r.matched { r.pos += (size)$; }");
+        ctx..add("else { break; }");
     }
 
     gen_case_sensitive: (this, inout ctx: generation_context) = {
-        name: std::string = "str_(ctx.gen_temp())$";
-        size := token.size();
-        ctx.add("(name)$ : std::array = \"(add_escapes(token))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
-        ctx.add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
-        ctx.add("    r.matched = false;");
-        ctx.add("    break;");
-        ctx.add("}");
-        ctx.add("");
-        ctx.add("(copy i : int = 0) while i < (size)$ next (i += 1) {");
-        ctx.add("    if (name)$[i] != r.pos[i] { r.matched = false; }");
-        ctx.add("}");
-        ctx.add("");
-        ctx.add("if r.matched { r.pos += (size)$; }");
-        ctx.add("else { break; }");
+        name: std::string = "str_(ctx..gen_temp())$";
+        size := token..size();
+        ctx..add("(name)$ : std::array = \"(add_escapes(token))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
+        ctx..add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
+        ctx..add("    r.matched = false;");
+        ctx..add("    break;");
+        ctx..add("}");
+        ctx..add("");
+        ctx..add("(copy i : int = 0) while i < (size)$ next (i += 1) {");
+        ctx..add("    if (name)$[i] != r.pos[i] { r.matched = false; }");
+        ctx..add("}");
+        ctx..add("");
+        ctx..add("if r.matched { r.pos += (size)$; }");
+        ctx..add("else { break; }");
     }
 
     add_escapes: (this, copy str: std::string) -> std::string = {
@@ -1310,33 +1310,33 @@ char_token: @polymorphic_base type = {
 
 // TODO: Check if vectorization works at some point with this implementation.
 // char_token_matcher:  (inout cur, inout ctx) -> bool = {
-//     if !(std::distance(cur, ctx.end) < tokens.size()) {
+//     if !(std::distance(cur, ctx.end) < tokens..size()) {
 //         return false;
 //     }
 //     matched : bool = true;
-//     (copy i: int = 0) while i < tokens.size() next i += 1 {
-//         if tokens.data()[i] != cur[i] {
+//     (copy i: int = 0) while i < tokens..size() next i += 1 {
+//         if tokens..data()[i] != cur[i] {
 //             matched = false; // No break for performance optimization. Without break, the loop vectorizes.
 //         }
 //     }
 //     if matched {
-//         cur += tokens.size();
+//         cur += tokens..size();
 //     }
 //     return matched;
 // }
 
 // char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
-//     if !(std::distance(cur, ctx.end) < lower.size()) {
+//     if !(std::distance(cur, ctx.end) < lower..size()) {
 //         return false;
 //     }
 //     matched : bool = true;
-//     (copy i : int = 0) while i < lower.size() next i += 1 {
-//         if !(lower.data()[i] == cur[i] || upper.data()[i] == cur[i]) {
+//     (copy i : int = 0) while i < lower..size() next i += 1 {
+//         if !(lower..data()[i] == cur[i] || upper..data()[i] == cur[i]) {
 //             matched = false; // No break for performance optimization. Without break, the loop vectorizes.
 //         }
 //     }
 //     if matched {
-//         cur += lower.size();
+//         cur += lower..size();
 //     }
 //     return matched;
 // }
@@ -1359,9 +1359,9 @@ class_token: @polymorphic_base type = {
 
     // TODO: Rework class generation: Generate check functions for classes.
     parse: (inout ctx: parse_context) -> token_ptr = {
-        if ctx.current() != '[' { return nullptr; }
+        if ctx..current() != '[' { return nullptr; }
 
-        start_pos := ctx.get_pos();
+        start_pos := ctx..get_pos();
 
         supported_classes: std::vector = ("alnum", "alpha", "ascii", "blank", "cntrl", "digits", "graph",
                                                        "lower", "print", "punct", "space", "upper", "word", "xdigit");
@@ -1372,87 +1372,87 @@ class_token: @polymorphic_base type = {
         is_negate:= false;
         first:= true;
         range:= false;
-        while ctx.next_in_class() & (ctx.current() != ']' || first) {
-            if ctx.current() == '^' {
+        while ctx..next_in_class() & (ctx..current() != ']' || first) {
+            if ctx..current() == '^' {
                 is_negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if ctx.current() == '[' && ctx.peek_in_class() == ':' {
+            if ctx..current() == '[' && ctx..peek_in_class() == ':' {
                 // We have a character class.
-                _ = ctx.next_n(2);  // Skip [:
+                _ = ctx..next_n(2);  // Skip [:
 
                 name: std::string = "";
-                if !ctx.grab_until(":]", out name) { return ctx.error("Could not find end of character class."); }
-                if supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name) {
-                    return ctx.error("Unsupported character class. Supported ones are: (ctx.join(supported_classes))$");
+                if !ctx..grab_until(":]", out name) { return ctx..error("Could not find end of character class."); }
+                if supported_classes..end() == std::find(supported_classes..begin(), supported_classes..end(), name) {
+                    return ctx..error("Unsupported character class. Supported ones are: (ctx..join(supported_classes))$");
                 }
 
-                classes.push_back("[:(name)$:]");
+                classes..push_back("[:(name)$:]");
 
-                _ = ctx.next(); // Skip ':' pointing to the ending ']'.
+                _ = ctx..next(); // Skip ':' pointing to the ending ']'.
             }
-            else if ctx.current() == '\\' {
-                if ctx.next_no_skip()  && (ctx.current() != ']') {
-                    if  ' ' == ctx.current() && ctx.get_modifiers().has(expression_flags::perl_code_syntax) && ctx.get_modifiers().has(expression_flags::perl_code_syntax_in_classes) {
-                        classes.push_back(std::string(1, ctx.current())); // TODO: UFCS error with char as argument.
+            else if ctx..current() == '\\' {
+                if ctx..next_no_skip()  && (ctx..current() != ']') {
+                    if  ' ' == ctx..current() && ctx..get_modifiers()..has(expression_flags::perl_code_syntax) && ctx..get_modifiers()..has(expression_flags::perl_code_syntax_in_classes) {
+                        classes..push_back(std::string(1, ctx..current())); // TODO: UFCS error with char as argument.
                     }
                     else {
                         name := "";
-                            if 'd' == ctx.current() { name = "short_digits"; }
-                        else if 'D' == ctx.current() { name = "short_not_digits"; }
-                        else if 'h' == ctx.current() { name = "short_hor_space"; }
-                        else if 'H' == ctx.current() { name = "short_not_hor_space"; }
-                        else if 's' == ctx.current() { name = "short_space"; }
-                        else if 'S' == ctx.current() { name = "short_not_space"; }
-                        else if 'v' == ctx.current() { name = "short_ver_space"; }
-                        else if 'V' == ctx.current() { name = "short_not_ver_space"; }
-                        else if 'w' == ctx.current() { name = "short_word"; }
-                        else if 'W' == ctx.current() { name = "short_not_word"; }
+                            if 'd' == ctx..current() { name = "short_digits"; }
+                        else if 'D' == ctx..current() { name = "short_not_digits"; }
+                        else if 'h' == ctx..current() { name = "short_hor_space"; }
+                        else if 'H' == ctx..current() { name = "short_not_hor_space"; }
+                        else if 's' == ctx..current() { name = "short_space"; }
+                        else if 'S' == ctx..current() { name = "short_not_space"; }
+                        else if 'v' == ctx..current() { name = "short_ver_space"; }
+                        else if 'V' == ctx..current() { name = "short_not_ver_space"; }
+                        else if 'w' == ctx..current() { name = "short_word"; }
+                        else if 'W' == ctx..current() { name = "short_not_word"; }
                         else {
-                            return ctx.error("Unknown group escape.");
+                            return ctx..error("Unknown group escape.");
                         }
-                        classes.push_back("[:(name)$:]");
+                        classes..push_back("[:(name)$:]");
                     }
                 } else {
-                    return ctx.error("Escape without a following character.");
+                    return ctx..error("Escape without a following character.");
                 }
             }
-            else if ctx.current() == '-' {
+            else if ctx..current() == '-' {
                 if first { // Literal if first entry.
-                    classes.push_back("(ctx.current())$");
+                    classes..push_back("(ctx..current())$");
                 } else {
                     range = true;
                 }
             }
             else {
                 if range { // Modify last element to be a range.
-                    classes.back() += "-(ctx.current())$";
+                    classes..back() += "-(ctx..current())$";
                     range = false;
                 }
                 else {
-                    classes.push_back("(ctx.current())$");
+                    classes..push_back("(ctx..current())$");
                 }
             }
 
             first = false;
         }
 
-        if ctx.current() != ']' {
-            return ctx.error("Error end of character class definition before terminating ']'.");
+        if ctx..current() != ']' {
+            return ctx..error("Error end of character class definition before terminating ']'.");
         }
-        end_pos := ctx.get_pos();
+        end_pos := ctx..get_pos();
 
         if range { // If '-' is last entry treat it as a literal char.
-            classes.push_back("-");
+            classes..push_back("-");
         }
 
         // Second step: Wrap the item on the class stack with corresponding class implementation.
         for classes do (inout cur) {
-            if cur.starts_with("[:") {
-                name := cur.substr(2, cur.size() - 4);
+            if cur..starts_with("[:") {
+                name := cur..substr(2, cur..size() - 4);
                 cur = create_matcher("(name)$_class", "");
             }
-            else if 1 != cur.size() {
+            else if 1 != cur..size() {
                 cur = create_matcher("range_class_entry", "'(cur[0])$', '(cur[2])$'");
             }
             else {
@@ -1460,20 +1460,20 @@ class_token: @polymorphic_base type = {
             }
         }
 
-        inner := ctx.join(classes);
-        string_rep := ctx.get_range(start_pos, end_pos);
+        inner := ctx..join(classes);
+        string_rep := ctx..get_range(start_pos, end_pos);
         string_rep = replace_all(string_rep, "\\", "\\\\");
-        return shared.new(is_negate, ctx.get_modifiers().has(expression_flags::case_insensitive), inner, string_rep);
+        return shared.new(is_negate, ctx..get_modifiers()..has(expression_flags::case_insensitive), inner, string_rep);
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("class_token_matcher::match((ctx.match_parameters())$)");
+        ctx..add_check("class_token_matcher::match((ctx..match_parameters())$)");
     }
 
 
     private create_matcher: (name: std::string, template_arguments: std::string) -> std::string = {
         sep := ", ";
-        if template_arguments.empty() { sep = ""; }
+        if template_arguments..empty() { sep = ""; }
 
         return "::cpp2::regex::(name)$";
     }
@@ -1528,34 +1528,34 @@ class_token_matcher:  typ
 }
 
 escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if ctx.current() != '\\' { return nullptr; }
+    if ctx..current() != '\\' { return nullptr; }
 
 
-    if std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek()) {
+    if std::string::npos == std::string("afenrt^.[]()*{}?+|\\")..find(ctx..peek()) {
         return nullptr;
     }
 
-    _ = ctx.next(); // Skip escape
+    _ = ctx..next(); // Skip escape
 
-    if std::string::npos != std::string("afenrt\\").find(ctx.current()) {
+    if std::string::npos != std::string("afenrt\\")..find(ctx..current()) {
         // Escape of string special char
         t : char = '\0';
-        if      'a' == ctx.current() { t = '\a'; }
-        else if 'f' == ctx.current() { t = '\f'; }
-        else if 'e' == ctx.current() { t = '\e'; }
-        else if 'n' == ctx.current() { t = '\n'; }
-        else if 'r' == ctx.current() { t = '\r'; }
-        else if 't' == ctx.current() { t = '\t'; }
-        else if '\\' == ctx.current() { t = '\\'; }
+        if      'a' == ctx..current() { t = '\a'; }
+        else if 'f' == ctx..current() { t = '\f'; }
+        else if 'e' == ctx..current() { t = '\e'; }
+        else if 'n' == ctx..current() { t = '\n'; }
+        else if 'r' == ctx..current() { t = '\r'; }
+        else if 't' == ctx..current() { t = '\t'; }
+        else if '\\' == ctx..current() { t = '\\'; }
         else { /* TODO: throw error */ }
         r: = shared.new(t, false);
-        r*.set_string("\\\\(ctx.current())$");
+        r*..set_string("\\\\(ctx..current())$");
 
         return r;
     } else {
         // Escape of regex special char
-        r := shared.new(ctx.current(), false);
-        r*.set_string("\\\\(ctx.current())$");
+        r := shared.new(ctx..current(), false);
+        r*..set_string("\\\\(ctx..current())$");
 
         return r;
     }
@@ -1565,10 +1565,10 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
 // Regex syntax: \K Example: ab\Kcd
 //
 global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if !(ctx.current() == '\\' && ctx.peek() == 'K') { return nullptr; }
+    if !(ctx..current() == '\\' && ctx..peek() == 'K') { return nullptr; }
 
-    _ = ctx.next(); // Skip escape.
-    return shared.new("\\\\K", "ctx.set_group_start(0, r.pos);");
+    _ = ctx..next(); // Skip escape.
+    return shared.new("\\\\K", "ctx..set_group_start(0, r.pos);");
 }
 
 // Regex syntax: \  Example: \1
@@ -1590,23 +1590,23 @@ group_ref_token: @polymorphic_base type = {
     }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
-        if ctx.current() != '\\' { return nullptr; }
+        if ctx..current() != '\\' { return nullptr; }
 
         str : std::string = "\\\\";
         group : std::string = "";
 
-        if '0' <= ctx.peek() <= '9' {
-            _ = ctx.next(); // Skip escape
-            group = ctx.grab_number();
-            if group.ssize() >= 3 {
+        if '0' <= ctx..peek() <= '9' {
+            _ = ctx..next(); // Skip escape
+            group = ctx..grab_number();
+            if group..size() >= 3 {
                 // Octal syntax (\000) not a group ref matcher.
                 number := 0;
-                if !string_to_int(group, number, 8) { return ctx.error("Could not convert octal to int."); }
+                if !string_to_int(group, number, 8) { return ctx..error("Could not convert octal to int."); }
 
                 number_as_char : char = unsafe_narrow(number);
 
-                token := shared.new(number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive));
-                token*.set_string("\\(int_to_string(number_as_char as int, 8))$");
+                token := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
+                token*..set_string("\\(int_to_string(number_as_char as int, 8))$");
 
                 return token;
             }
@@ -1614,40 +1614,40 @@ group_ref_token: @polymorphic_base type = {
             str += group;
             // Regular group ref
         }
-        else if 'g' == ctx.peek() {
-            _ = ctx.next(); // Skip escape
-            if !ctx.next() { return ctx.error("Group escape without a following char."); } // Skip g
+        else if 'g' == ctx..peek() {
+            _ = ctx..next(); // Skip escape
+            if !ctx..next() { return ctx..error("Group escape without a following char."); } // Skip g
 
             str += "g";
 
-            if ctx.current() == '{' {
+            if ctx..current() == '{' {
                 str += "{";
-                if !(ctx.next() && ctx.grab_until('}', out group)) { return ctx.error("No ending bracket."); }
+                if !(ctx..next() && ctx..grab_until('}', out group)) { return ctx..error("No ending bracket."); }
 
                 str += group + "}";
             }
             else {
-                group = ctx.grab_number();
+                group = ctx..grab_number();
                 str += group;
             }
         }
-        else if 'k' == ctx.peek() {
-            _ = ctx.next(); // Skip escape
-            if !ctx.next() { return ctx.error("Group escape without a following char."); } // Skip k
+        else if 'k' == ctx..peek() {
+            _ = ctx..next(); // Skip escape
+            if !ctx..next() { return ctx..error("Group escape without a following char."); } // Skip k
 
             str += "k";
 
             term_char := '\0';
-            if ctx.current() == '{' { term_char = '}'; }
-            else if ctx.current() == '<' { term_char = '>'; }
-            else if ctx.current() == '\'' { term_char = '\''; }
+            if ctx..current() == '{' { term_char = '}'; }
+            else if ctx..current() == '<' { term_char = '>'; }
+            else if ctx..current() == '\'' { term_char = '\''; }
             else {
-                return ctx.error("Group escape has wrong operator.");
+                return ctx..error("Group escape has wrong operator.");
             }
 
-            str += ctx.current();
+            str += ctx..current();
 
-            if !(ctx.next() && ctx.grab_until(term_char, out group)) { return ctx.error("No ending bracket."); }
+            if !(ctx..next() && ctx..grab_until(term_char, out group)) { return ctx..error("No ending bracket."); }
 
             str += group + term_char;
         }
@@ -1661,33 +1661,33 @@ group_ref_token: @polymorphic_base type = {
         group_id : int = 0;
         if string_to_int(group, group_id) {
             if group_id < 0 {
-                group_id = ctx.get_cur_group() + group_id;
+                group_id = ctx..get_cur_group() + group_id;
 
                 if group_id < 1 { // Negative and zero are no valid groups.
-                    return ctx.error("Relative group reference does not reference a valid group. (Would be (group_id)$.)");
+                    return ctx..error("Relative group reference does not reference a valid group. (Would be (group_id)$.)");
                 }
             }
 
-            if group_id >= ctx.get_cur_group() {
-                return ctx.error("Group reference is used before the group is declared.");
+            if group_id >= ctx..get_cur_group() {
+                return ctx..error("Group reference is used before the group is declared.");
             }
         }
         else {
             // Named group
-            group_id = ctx.get_named_group(group);
-            if -1 == group_id { return ctx.error("Group names does not exist. (Name is: (group)$)");}
+            group_id = ctx..get_named_group(group);
+            if -1 == group_id { return ctx..error("Group names does not exist. (Name is: (group)$)");}
         }
 
-        return shared.new(group_id, ctx.get_modifiers().has(expression_flags::case_insensitive), str);
+        return shared.new(group_id, ctx..get_modifiers()..has(expression_flags::case_insensitive), str);
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        ctx.add_check("group_ref_token_matcher((ctx.match_parameters())$)");
+        ctx..add_check("group_ref_token_matcher((ctx..match_parameters())$)");
     }
 }
 
 group_ref_token_matcher:  (inout cur, inout ctx) -> bool = {
-    g := ctx.get_group(group);
+    g := ctx..get_group(group);
 
     group_pos := g.start;
     while group_pos != g.end && cur != ctx.end next (group_pos++, cur++) {
@@ -1718,60 +1718,60 @@ group_token: @polymorphic_base type = {
     inner: token_ptr = nullptr;
 
     parse_lookahead: (inout ctx: parse_context, syntax: std::string, positive: bool) -> token_ptr = {
-        _ = ctx.next(); // Skip last token defining the syntax
+        _ = ctx..next(); // Skip last token defining the syntax
 
         r := shared.new(positive);
 
-        old_state := ctx.start_group();
-        if !ctx.parse_until(')') { return ctx.error("Lookahead without a closing bracket."); }
-        r*.inner = ctx.end_group(old_state);
-        r*.set_string("((syntax)$(r*.inner*.to_string())$)");
+        old_state := ctx..start_group();
+        if !ctx..parse_until(')') { return ctx..error("Lookahead without a closing bracket."); }
+        r*.inner = ctx..end_group(old_state);
+        r*..set_string("((syntax)$(r*.inner*..to_string())$)");
 
         return r;
     }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
-        if ctx.current() != '(' { return nullptr; }
+        if ctx..current() != '(' { return nullptr; }
 
-        has_id :=  !ctx.get_modifiers().has(expression_flags::no_group_captures);
+        has_id :=  !ctx..get_modifiers()..has(expression_flags::no_group_captures);
         has_pattern := true;
         group_name : std::string = "";
         group_name_brackets := true;
         modifiers : std::string = "";
 
-        modifiers_change_to : =  ctx.get_modifiers();
+        modifiers_change_to : =  ctx..get_modifiers();
 
         // Skip the '('
-        if !ctx.next() { return ctx.error("Group without closing bracket."); }
-        if ctx.current() == '?' {
+        if !ctx..next() { return ctx..error("Group without closing bracket."); }
+        if ctx..current() == '?' {
             // Special group
-            if !ctx.next_no_skip() { return ctx.error("Missing character after group opening.");  }
+            if !ctx..next_no_skip() { return ctx..error("Missing character after group opening.");  }
 
-            if ctx.current() == '<' || ctx.current() == '\'' {
+            if ctx..current() == '<' || ctx..current() == '\'' {
                 // named group
-                end_char := ctx.current();
+                end_char := ctx..current();
                 if end_char == '<' {
                     end_char = '>';
                 } else {
                     group_name_brackets = false;
                 }
                 has_id = true; // Force id for named groups.
-                if !ctx.next() /* skip '<' */ { return ctx.error("Missing ending bracket for named group.");  }
-                if !ctx.grab_until(end_char, out group_name) { return ctx.error("Missing ending bracket for named group.");  }
-                if !ctx.next() { return ctx.error("Group without closing bracket."); }
+                if !ctx..next() /* skip '<' */ { return ctx..error("Missing ending bracket for named group.");  }
+                if !ctx..grab_until(end_char, out group_name) { return ctx..error("Missing ending bracket for named group.");  }
+                if !ctx..next() { return ctx..error("Group without closing bracket."); }
             }
-            else if ctx.current() == '#' {
+            else if ctx..current() == '#' {
                 // Comment
                 comment_str : std::string = "";
-                _ = ctx.next(); // Skip #
-                if !ctx.grab_until(")", out comment_str) { return ctx.error("Group without closing bracket."); }
+                _ = ctx..next(); // Skip #
+                if !ctx..grab_until(")", out comment_str) { return ctx..error("Group without closing bracket."); }
                 // Do not add comment. Has problems with ranges.
 
                 // Pop token and add a list. This fixes comments between a token and a range
-                if ctx.has_token() {
+                if ctx..has_token() {
                     list : token_vec = ();
-                    list.push_back(ctx.pop_token());
-                    list.push_back(shared.new("(?#(comment_str)$)"));
+                    list..push_back(ctx..pop_token());
+                    list..push_back(shared.new("(?#(comment_str)$)"));
 
                     return shared.new(list);
                 }
@@ -1779,44 +1779,44 @@ group_token: @polymorphic_base type = {
                     return shared.new("(?#(comment_str)$)");
                 }
             }
-            else if ctx.current() == '|' {
+            else if ctx..current() == '|' {
                 // Branch reset group
 
-                if !ctx.next() /* skip '|' */ { return ctx.error("Missing ending bracket for named group.");  }
+                if !ctx..next() /* skip '|' */ { return ctx..error("Missing ending bracket for named group.");  }
 
-                old_parser_state := ctx.start_group();
-                old_branch_state  := ctx.branch_reset_new_state();
-                if !ctx.parse_until(')') { return nullptr; }
-                ctx.branch_reset_restore_state(old_branch_state);
-                inner_ := ctx.end_group(old_parser_state);
+                old_parser_state := ctx..start_group();
+                old_branch_state  := ctx..branch_reset_new_state();
+                if !ctx..parse_until(')') { return nullptr; }
+                ctx..branch_reset_restore_state(old_branch_state);
+                inner_ := ctx..end_group(old_parser_state);
 
                 list: token_vec = (shared.new("(?|"), inner_, shared.new(")"));
                 return shared.new(list);
             }
-            else if ctx.current() == '=' || ctx.current() == '!' {
-                return parse_lookahead(ctx, "?(ctx.current())$", ctx.current() == '=');
+            else if ctx..current() == '=' || ctx..current() == '!' {
+                return parse_lookahead(ctx, "?(ctx..current())$", ctx..current() == '=');
             }
             else {
                 // Simple modifier
                 has_id = false;
-                if !ctx.grab_until_one_of("):", out modifiers) { return ctx.error("Missing ending bracket for group."); }
-                if !ctx.parser_group_modifiers(modifiers, modifiers_change_to) {
+                if !ctx..grab_until_one_of("):", out modifiers) { return ctx..error("Missing ending bracket for group."); }
+                if !ctx..parser_group_modifiers(modifiers, modifiers_change_to) {
                      return nullptr;
                 }
 
-                if ')' == ctx.current() {
+                if ')' == ctx..current() {
                     has_pattern = false;
                 }
                 else {
-                    if !ctx.next() /* skip ':' */ { return ctx.error("Missing ending bracket for group.");  }
+                    if !ctx..next() /* skip ':' */ { return ctx..error("Missing ending bracket for group.");  }
                 }
             }
         }
-        else if ctx.current() == '*' {
+        else if ctx..current() == '*' {
             // named pattern
-            _ = ctx.next(); // Skip *.
+            _ = ctx..next(); // Skip *.
             name: std::string = "";
-            if !ctx.grab_until(':', out name) { return ctx.error("Missing colon for named pattern.");  }
+            if !ctx..grab_until(':', out name) { return ctx..error("Missing colon for named pattern.");  }
 
             if name == "pla" || name == "positive_lookahead" {
                 return parse_lookahead(ctx, "*(name)$:", true);
@@ -1825,7 +1825,7 @@ group_token: @polymorphic_base type = {
                 return parse_lookahead(ctx, "*(name)$:", false);
             }
             else {
-                return ctx.error("Unknown named group pattern: '(name)$'");
+                return ctx..error("Unknown named group pattern: '(name)$'");
             }
         }
 
@@ -1834,24 +1834,24 @@ group_token: @polymorphic_base type = {
 
             r := shared.new();
             if has_id {
-                r*.number = ctx.next_group();
+                r*.number = ctx..next_group();
 
-                if 0 != group_name.size() {
-                    ctx.set_named_group(group_name, r*.number);
+                if 0 != group_name..size() {
+                    ctx..set_named_group(group_name, r*.number);
                 }
             }
 
-            old_state := ctx.start_group();
-            ctx.set_modifiers(modifiers_change_to);
-            if !ctx.parse_until(')') { return nullptr; }
-            r*.inner = ctx.end_group(old_state);
-            r*.set_string(gen_string(group_name, group_name_brackets, modifiers, r*.inner));
+            old_state := ctx..start_group();
+            ctx..set_modifiers(modifiers_change_to);
+            if !ctx..parse_until(')') { return nullptr; }
+            r*.inner = ctx..end_group(old_state);
+            r*..set_string(gen_string(group_name, group_name_brackets, modifiers, r*.inner));
 
             return r;
         }
         else {
             // Only a modifier
-            ctx.set_modifiers(modifiers_change_to);
+            ctx..set_modifiers(modifiers_change_to);
 
             return shared.new("(?(modifiers)$)");
         }
@@ -1859,43 +1859,43 @@ group_token: @polymorphic_base type = {
 
     gen_string: (name: std::string, name_brackets: bool, modifiers: std::string, inner_: token_ptr) -> std::string = {
         start : std::string = "(";
-        if 0 != name.size() {
+        if 0 != name..size() {
             if name_brackets {
-                start += "?<(name.data())$>";
+                start += "?<(name..data())$>";
             }
             else {
-                start += "?'(name.data())$'";
+                start += "?'(name..data())$'";
             }
         }
-        else if ! modifiers.empty() {
+        else if ! modifiers..empty() {
             start += "?" + modifiers + ":";
         }
 
-        return start + inner_*.to_string() + ")";
+        return start + inner_*..to_string() + ")";
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
         if -1 != number {
-            ctx.add("ctx.set_group_start((number)$, r.pos);");
+            ctx..add("ctx..set_group_start((number)$, r.pos);");
         }
 
-        inner*.generate_code(ctx);
+        inner*..generate_code(ctx);
         if -1 != number {
-            ctx.add("ctx.set_group_end((number)$, r.pos);");
-            tmp_name := ctx.gen_temp();
-            ctx.add("(tmp_name)$ :=  cpp2::regex::make_on_return(:() = {");
-            ctx.add("  if !r&$*.matched {");
-            ctx.add("    ctx&$*.set_group_invalid((number)$);");
-            ctx.add("  }");
-            ctx.add("});");
-            ctx.add("_ = (tmp_name)$;"); // TODO: Guard object problem.
+            ctx..add("ctx..set_group_end((number)$, r.pos);");
+            tmp_name := ctx..gen_temp();
+            ctx..add("(tmp_name)$ :=  cpp2::regex::make_on_return(:() = {");
+            ctx..add("  if !r&$*.matched {");
+            ctx..add("    ctx&$*..set_group_invalid((number)$);");
+            ctx..add("  }");
+            ctx..add("});");
+            ctx..add("_ = (tmp_name)$;"); // TODO: Guard object problem.
         }
     }
 
     add_groups: (override this, inout groups: std::set) = {
-        inner*.add_groups(groups);
+        inner*..add_groups(groups);
         if -1 != number {
-            _ = groups.insert(number);
+            _ = groups..insert(number);
         }
     }
 }
@@ -1903,29 +1903,29 @@ group_token: @polymorphic_base type = {
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if !(ctx.current() == '\\' && ctx.peek() == 'x') { return nullptr; }
+    if !(ctx..current() == '\\' && ctx..peek() == 'x') { return nullptr; }
 
-    _ = ctx.next(); // Skip escape.
+    _ = ctx..next(); // Skip escape.
 
-    if !ctx.next() { return ctx.error("x escape without number.");}
+    if !ctx..next() { return ctx..error("x escape without number.");}
 
     has_brackets := false;
     number_str: std::string = "";
-    if '{' == ctx.current() {
+    if '{' == ctx..current() {
         // TODO: Currently does not work since the compiler handles \x also.
         // Bracketed
         has_brackets = true;
-        _  = ctx.next(); // Skip '{'
-        if !ctx.grab_until('}', out number_str) { return ctx.error("No ending bracket for \\x"); }
+        _  = ctx..next(); // Skip '{'
+        if !ctx..grab_until('}', out number_str) { return ctx..error("No ending bracket for \\x"); }
     }
     else {
         // grab two chars
 
-        if !ctx.grab_n(2, out number_str) { return ctx.error("Missing hexadecimal digits after \\x."); }
+        if !ctx..grab_n(2, out number_str) { return ctx..error("Missing hexadecimal digits after \\x."); }
     }
 
     number := 0;
-    if !string_to_int(number_str, number, 16) { return ctx.error("Could not convert hexadecimal to int."); }
+    if !string_to_int(number_str, number, 16) { return ctx..error("Could not convert hexadecimal to int."); }
 
     // TODO: Change for unicode.
     number_as_char : char = unsafe_narrow(number);
@@ -1936,23 +1936,23 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
     syntax = "\\\\x(syntax)$";
 
-    r := shared.new(number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive));
-    r*.set_string(syntax);
+    r := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
+    r*..set_string(syntax);
     return r;
 }
 
 // Regex syntax: $  Example: aa$
 //
 line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$') {
-        if (ctx.current() == '\\') { _ = ctx.next(); } // Skip escape
-        return shared.new("\\\\$", "line_end_token_matcher");
+    if ctx..current() == '$' || (ctx..current() == '\\' && ctx..peek() == '$') {
+        if (ctx..current() == '\\') { _ = ctx..next(); } // Skip escape
+        return shared.new("\\\\$", "line_end_token_matcher");
     }
-    else if ctx.current() == '\\' && (ctx.peek() == 'z' || ctx.peek() == 'Z') {
-        _ = ctx.next(); // Skip escape
+    else if ctx..current() == '\\' && (ctx..peek() == 'z' || ctx..peek() == 'Z') {
+        _ = ctx..next(); // Skip escape
 
-        negate := ctx.current() == 'Z';
-        return shared.new("\\\\(ctx.current())$", "line_end_token_matcher");
+        negate := ctx..current() == 'Z';
+        return shared.new("\\\\(ctx..current())$", "line_end_token_matcher");
     }
     else {
         return nullptr;
@@ -1974,14 +1974,14 @@ line_end_token_matcher:  token_ptr = {
-    if ctx.current() != '^' && !(ctx.current() == '\\' && ctx.peek() == 'A') { return nullptr; }
+    if ctx..current() != '^' && !(ctx..current() == '\\' && ctx..peek() == 'A') { return nullptr; }
 
-    if ctx.current() == '\\' {
-        _ = ctx.next();
+    if ctx..current() == '\\' {
+        _ = ctx..next();
         return shared.new("\\\\A", "line_start_token_matcher");
     }
     else {
-        return shared.new("^", "line_start_token_matcher");
+        return shared.new("^", "line_start_token_matcher");
     }
 }
 
@@ -2003,13 +2003,13 @@ lookahead_token: @polymorphic_base type = {
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        inner_name := ctx.generate_func(inner);
+        inner_name := ctx..generate_func(inner);
 
-        ctx.add_check("lookahead_token_matcher((ctx.match_parameters())$, (inner_name)$)");
+        ctx..add_check("lookahead_token_matcher((ctx..match_parameters())$, (inner_name)$)");
     }
 
     add_groups: (override this, inout groups: std::set) = {
-        inner*.add_groups(groups);
+        inner*..add_groups(groups);
     }
 }
 
@@ -2026,10 +2026,10 @@ lookahead_token_matcher:  (cur, inout ctx, func) -> bool
 //
 
 named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if ctx.current() != '\\' { return nullptr; }
+    if ctx..current() != '\\' { return nullptr; }
 
     name := "";
-    c_next := ctx.peek();
+    c_next := ctx..peek();
 
     if 'd' == c_next { name = "named_class_digits"; }
     else if 'D' == c_next { name = "named_class_not_digits"; }
@@ -2044,9 +2044,9 @@ named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
     else if 'W' == c_next { name = "named_class_not_word"; }
     else { return nullptr; }
 
-    _ = ctx.next(); // Skip escape
+    _ = ctx..next(); // Skip escape
 
-    return shared.new("\\\\\\\\(ctx.current())$", "(name)$::match");
+    return shared.new("\\\\\\\\(ctx..current())$", "(name)$::match");
 }
 
 named_class_no_new_line:  type == class_token_matcher>;
@@ -2066,26 +2066,26 @@ named_class_not_word      :  type == class_token_
 // Regex syntax: \o{}  Example: \o{142}
 //
 octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if !(ctx.current() == '\\' && ctx.peek() == 'o') { return nullptr; }
+    if !(ctx..current() == '\\' && ctx..peek() == 'o') { return nullptr; }
 
-    _ = ctx.next(); // Skip escape.
+    _ = ctx..next(); // Skip escape.
 
-    if !ctx.next() { return ctx.error("o escape without number.");}
-    if ctx.current() != '{' { return ctx.error("Missing opening bracket for \\o."); }
+    if !ctx..next() { return ctx..error("o escape without number.");}
+    if ctx..current() != '{' { return ctx..error("Missing opening bracket for \\o."); }
 
     number_str: std::string = "";
-    _  = ctx.next(); // Skip '{'
-    if !ctx.grab_until('}', out number_str) { return ctx.error("No ending bracket for \\o"); }
+    _  = ctx..next(); // Skip '{'
+    if !ctx..grab_until('}', out number_str) { return ctx..error("No ending bracket for \\o"); }
 
     number := 0;
-    if !string_to_int(number_str, number, 8) { return ctx.error("Could not convert octal to int."); }
+    if !string_to_int(number_str, number, 8) { return ctx..error("Could not convert octal to int."); }
 
     // TODO: Change for unicode.
     number_as_char : char = unsafe_narrow(number);
 
     syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
-    r := shared.new(number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive));
-    r*.set_string(syntax);
+    r := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
+    r*..set_string(syntax);
     return r;
 }
 
@@ -2103,44 +2103,44 @@ range_token: @polymorphic_base type = {
 
     parse: (inout ctx: parse_context) -> token_ptr = {
         r := shared.new();
-        if ctx.current() == '{' {
-            if !ctx.has_token() { return ctx.error("'{' without previous element."); }
+        if ctx..current() == '{' {
+            if !ctx..has_token() { return ctx..error("'{' without previous element."); }
 
             inner: std::string = "";
-            if !ctx.grab_until('}', out inner) { return ctx.error("Missing closing bracket '}'."); }
+            if !ctx..grab_until('}', out inner) { return ctx..error("Missing closing bracket '}'."); }
 
-            inner = trim_copy(inner.substr(1)); // Remove '{' and white spaces.
-            if inner.empty() { return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
+            inner = trim_copy(inner..substr(1)); // Remove '{' and white spaces.
+            if inner..empty() { return ctx..error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
             // Non-greedy or possessive
-            r*.parse_modifier(ctx);
+            r*..parse_modifier(ctx);
 
             // Get range arguments
             min_count_str: std::string = "-1";
             max_count_str: std::string = "-1";
 
-            sep: size_t = inner.find(",");
+            sep: size_t = inner..find(",");
             if sep == std::string::npos {
                 min_count_str = inner;
                 max_count_str = inner;
-                if !string_to_int(inner, r*.min_count) { return ctx.error("Could not convert range to number."); }
+                if !string_to_int(inner, r*.min_count) { return ctx..error("Could not convert range to number."); }
                 r*.max_count = r*.min_count;
             }
             else {
-                inner_first: std::string = trim_copy(inner.substr(0, sep));
-                inner_last: std::string = trim_copy(inner.substr(sep + 1));
+                inner_first: std::string = trim_copy(inner..substr(0, sep));
+                inner_last: std::string = trim_copy(inner..substr(sep + 1));
 
-                if (inner_first.empty() && inner_last.empty()) {
-                    return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
+                if (inner_first..empty() && inner_last..empty()) {
+                    return ctx..error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
                 }
 
-                if !inner_first.empty() {
+                if !inner_first..empty() {
                     min_count_str = inner_first;
-                    if !string_to_int(inner_first, r*.min_count) { return ctx.error("Could not convert range to number."); }
+                    if !string_to_int(inner_first, r*.min_count) { return ctx..error("Could not convert range to number."); }
                 }
-                if !inner_last.empty() {
+                if !inner_last..empty() {
                     max_count_str = inner_last;
-                    if !string_to_int(inner_last, r*.max_count) { return ctx.error("Could not convert range to number."); }
+                    if !string_to_int(inner_last, r*.max_count) { return ctx..error("Could not convert range to number."); }
                 }
             }
 
@@ -2148,22 +2148,22 @@ range_token: @polymorphic_base type = {
             // Check validity of the range.
             if -1 != r*.min_count {
                 if !(0 <= r*.min_count) {
-                    return ctx.error("Min value in range is negative. Have (r*.min_count)$)");
+                    return ctx..error("Min value in range is negative. Have (r*.min_count)$)");
                 }
             }
             if -1 != r*.max_count {
                 if !(0 <= r*.max_count) {
-                    return ctx.error("Max value in range is negative. Have (r*.max_count)$)");
+                    return ctx..error("Max value in range is negative. Have (r*.max_count)$)");
                 }
                 if -1 != r*.min_count {
                     if !(r*.min_count <= r*.max_count) {
-                        return ctx.error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (r*.min_count)$ <= (r*.max_count)$");
+                        return ctx..error("Min and max values in range are wrong it should hold 0 <= min <= max. Have 0 <= (r*.min_count)$ <= (r*.max_count)$");
                     }
                 }
             }
 
-            r*.inner_token = ctx.pop_token();
-            r*.string_rep = r*.inner_token*.to_string() + r*.gen_range_string() + r*.gen_mod_string();
+            r*.inner_token = ctx..pop_token();
+            r*.string_rep = r*.inner_token*..to_string() + r*..gen_range_string() + r*..gen_mod_string();
 
             return r;
         }
@@ -2172,13 +2172,13 @@ range_token: @polymorphic_base type = {
     }
 
     parse_modifier: (inout this, inout ctx: parse_context) = {
-        if ctx.peek() == '?' {
+        if ctx..peek() == '?' {
             kind = range_flags::not_greedy;
-            _ = ctx.next();
+            _ = ctx..next();
         }
-        else if ctx.peek() == '+' {
+        else if ctx..peek() == '+' {
             kind = range_flags::possessive;
-            _ = ctx.next();
+            _ = ctx..next();
         }
     }
 
@@ -2219,17 +2219,17 @@ range_token: @polymorphic_base type = {
     }
 
     generate_code: (override this, inout ctx: generation_context) = {
-        inner_name := ctx.generate_func(inner_token);
+        inner_name := ctx..generate_func(inner_token);
         groups: std::set = ();
-        inner_token*.add_groups(groups);
-        reset_name := ctx.generate_reset(groups);
+        inner_token*..add_groups(groups);
+        reset_name := ctx..generate_reset(groups);
 
-        next_name := ctx.next_func_name();
-        ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match((ctx.match_parameters())$, (inner_name)$, (reset_name)$, other, (next_name)$)");
+        next_name := ctx..next_func_name();
+        ctx..add_statefull(next_name, "cpp2::regex::range_token_matcher::match((ctx..match_parameters())$, (inner_name)$, (reset_name)$, other, (next_name)$)");
     }
 
     add_groups: (override this, inout groups: std::set) = {
-        inner_token*.add_groups(groups);
+        inner_token*..add_groups(groups);
     }
 
 }
@@ -2265,7 +2265,7 @@ range_token_matcher:  type = {
     }
 
     private match_min_count:  (cur: Iter, inout ctx, inner, end_func, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
-        res := ctx.pass(cur);
+        res := ctx..pass(cur);
         count := 0;
 
         while is_below_lower_bound(count) && res.matched {
@@ -2284,7 +2284,7 @@ range_token_matcher:  type = {
             return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (inner)$, (reset_func)$, (end_func)$, (other)$);
         };
         is_m_valid := true;
-        r := ctx.fail();
+        r := ctx..fail();
         if is_below_upper_bound(count) && (is_below_lower_bound(count) || cur != last_valid) {
             is_m_valid = false;  // Group ranges in M are invalidated through the call.
             r = inner(cur, ctx, inner_call);
@@ -2347,7 +2347,7 @@ range_token_matcher:  type = {
 
             r:= inner(pos, ctx, end_func);
             if !r.matched {
-                return ctx.fail();
+                return ctx..fail();
             }
             count += 1;
             pos = r.pos;
@@ -2365,16 +2365,16 @@ special_range_token: @polymorphic_base type = {
     parse: (inout ctx: parse_context) -> token_ptr = {
         r := shared.new();
         symbol: char = '\0';
-        if ctx.current() == '*' {
+        if ctx..current() == '*' {
             r*.min_count = 0;
             r*.max_count = -1;
             symbol = '*';
         }
-        else if ctx.current() == '+' {
+        else if ctx..current() == '+' {
             r*.min_count = 1;
             r*.max_count = -1;
             symbol = '+';
-        } else if ctx.current() == '?' {
+        } else if ctx..current() == '?' {
             r*.min_count = 0;
             r*.max_count = 1;
             symbol = '?';
@@ -2382,13 +2382,13 @@ special_range_token: @polymorphic_base type = {
             return nullptr;
         }
 
-        if !ctx.has_token() { return ctx.error("'(ctx.current())$' without previous element."); }
+        if !ctx..has_token() { return ctx..error("'(ctx..current())$' without previous element."); }
 
 
-        r*.parse_modifier(ctx);
+        r*..parse_modifier(ctx);
 
-        r*.inner_token = ctx.pop_token();
-        r*.string_rep = r*.inner_token*.to_string() + symbol + r*.gen_mod_string();
+        r*.inner_token = ctx..pop_token();
+        r*.string_rep = r*.inner_token*..to_string() + symbol + r*..gen_mod_string();
         return r;
     }
 }
@@ -2398,14 +2398,14 @@ special_range_token: @polymorphic_base type = {
 // Matches the start end end of word boundaries.
 //
 word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = {
-    if ctx.current() != '\\' { return nullptr; }
+    if ctx..current() != '\\' { return nullptr; }
 
-    if ctx.peek() == 'b' {
-        _ = ctx.next();
+    if ctx..peek() == 'b' {
+        _ = ctx..next();
         return shared.new("\\\\b", "word_boundary_token_matcher");
     }
-    else if ctx.peek() == 'B' {
-        _ = ctx.next();
+    else if ctx..peek() == 'B' {
+        _ = ctx..next();
         return shared.new("\\\\B", "word_boundary_token_matcher");
     }
     else {
@@ -2418,16 +2418,16 @@ word_boundary_token_matcher:  (inout cur, inout ctx) -> boo
     is_match := false;
     if cur == ctx.begin { // String start
         if cur != ctx.end { // No empty string
-            is_match = words.includes(cur*);
+            is_match = words..includes(cur*);
         }
     }
     else if cur == ctx.end { // String end
-        is_match = words.includes((cur - 1)*);
+        is_match = words..includes((cur - 1)*);
     }
     else { // Middle of string
         is_match =
-                (words.includes((cur - 1)*) && !words.includes(cur*))  // End of word: \w\W
-            || (!words.includes((cur - 1)*) && words.includes(cur*)); // Start of word: \W\w
+                (words..includes((cur - 1)*) && !words..includes(cur*))  // End of word: \w\W
+            || (!words..includes((cur - 1)*) && words..includes(cur*)); // Start of word: \W\w
 
     }
     if negate {
@@ -2462,10 +2462,10 @@ regular_expression:  type = {
             ctx = ctx_;
         }
 
-        group_number: (this) ctx.size();
-        group:        (this, g: int) ctx.get_group_string(g);
-        group_start:  (this, g: int) ctx.get_group_start(g);
-        group_end:    (this, g: int) ctx.get_group_end(g);
+        group_number: (this) ctx..size();
+        group:        (this, g: int) ctx..get_group_string(g);
+        group_start:  (this, g: int) ctx..get_group_start(g);
+        group_end:    (this, g: int) ctx..get_group_end(g);
 
         group:        (this, g: bstring) group(get_group_id(g));
         group_start:  (this, g: bstring) group_start(get_group_id(g));
@@ -2480,8 +2480,8 @@ regular_expression:  type = {
         }
     }
 
-    match: (in this, str: bview)                 match(str.begin(), str.end());
-    match: (in this, str: bview, start)          match(get_iter(str, start), str.end());
+    match: (in this, str: bview)                 match(str..begin(), str..end());
+    match: (in this, str: bview, start)          match(get_iter(str, start), str..end());
     match: (in this, str: bview, start, length)  match(get_iter(str, start), get_iter(str, start + length));
     match:  (in this, start: Iter, end: Iter) -> search_return = {
         ctx: context = (start, end);
@@ -2490,8 +2490,8 @@ regular_expression:  type = {
         return search_return(r.matched && r.pos == end, ctx);
     }
 
-    search: (in this, str: bview)                 search(str.begin(), str.end());
-    search: (in this, str: bview, start)          search(get_iter(str, start), str.end());
+    search: (in this, str: bview)                 search(str..begin(), str..end());
+    search: (in this, str: bview, start)          search(get_iter(str, start), str..end());
     search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
     search:  (in this, start: Iter, end: Iter) -> search_return = {
         matched := false;
@@ -2518,11 +2518,11 @@ regular_expression:  type = {
     //
 
     private get_iter: (str: bview, pos) -> _ = {
-        if pos < str.size() {
-            return str.begin() + pos;
+        if pos < str..size() {
+            return str..begin() + pos;
         }
         else {
-            return str.end();
+            return str..end();
         }
     }
 }
@@ -2565,28 +2565,28 @@ regex_parser:  type = {
     parse:(inout this) -> std::string = {
         parse_ctx: parse_context = (regex);
         mod : std::string = modifier;
-        if !parse_ctx.parse(mod) {
+        if !parse_ctx..parse(mod) {
             error(parse_ctx.error_text);
             return "Error";
         }
 
         source += "{\n";
         source += " wrap:  type = {\n"; // TODO: Remove wrapper when template template parameters are available.
-        source += "  context: type == cpp2::regex::match_context;";
+        source += "  context: type == cpp2::regex::match_context;";
 
         gen_ctx: generation_context = ();
-        source += gen_ctx.run(parse_ctx.get_tokens());
+        source += gen_ctx..run(parse_ctx..get_tokens());
         source += "  entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n";
-        source += "    ctx.set_group_start(0, cur);\n";
-        source += "    r := (gen_ctx.get_entry_func())$(cur, ctx, cpp2::regex::true_end_func());\n";
-        source += "    if r.matched { ctx.set_group_end(0, r.pos); }\n";
+        source += "    ctx..set_group_start(0, cur);\n";
+        source += "    r := (gen_ctx..get_entry_func())$(cur, ctx, cpp2::regex::true_end_func());\n";
+        source += "    if r.matched { ctx..set_group_end(0, r.pos); }\n";
         source += "    return r;\n";
         source += "  }\n";
 
-        source += gen_ctx.create_named_group_lookup(parse_ctx.named_groups);
+        source += gen_ctx..create_named_group_lookup(parse_ctx.named_groups);
         source += "}\n";
 
-        string := parse_ctx.get_tokens()*.to_string();
+        string := parse_ctx..get_tokens()*..to_string();
         source += "  to_string: () -> std::string = { return \"(string)$\"; }\n";
         source += "}\n";
 
@@ -2598,7 +2598,7 @@ regex_parser:  type = {
 
 generate_template:  (regex: std::string_view, modifier: std::string_view, err: Err) -> std::string = {
     parser: regex_parser = (regex, modifier, err);
-    r := parser.parse();
+    r := parser..parse();
     _ = parser;
     return r;
 }

From 9646d37558baeb9e41bd65f89d623ff9e1b70d23 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 24 Jun 2024 18:31:09 +0200
Subject: [PATCH 131/161] Fixes for new cppfront analysis.

---
 include/cpp2regex.h | 4 ++--
 source/regex.h2     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index fd5ba9ed81..18f85299c7 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -2796,7 +2796,7 @@ template [[nodiscard]] auto any_token_matcher(
             std::string upper {token}; 
             std::string lower {token}; 
 {
-int i{0};
+size_t i{0};
 
 #line 1239 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
@@ -3110,7 +3110,7 @@ int i{0};
         if ([_0 = '0', _1 = ctx.peek(), _2 = '9']{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) {
             static_cast(ctx.next());// Skip escape
             group = ctx.grab_number();
-            if (cpp2::impl::cmp_greater_eq(group.size(),3)) {
+            if (cpp2::impl::cmp_greater_eq(group.size(),cpp2::impl::as_())) {
                 // Octal syntax (\000) not a group ref matcher.
                 auto number {0}; 
                 if (!(string_to_int(group, number, 8))) {return ctx.error("Could not convert octal to int."); }
diff --git a/source/regex.h2 b/source/regex.h2
index 293e375b9c..56e4684199 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1236,7 +1236,7 @@ char_token: @polymorphic_base type = {
             upper: std::string = token;
             lower: std::string = token;
 
-            (copy i: int = 0) while i < token..size() next i += 1 {
+            (copy i: size_t = 0) while i < token..size() next i += 1 {
                 lower[i] = safe_tolower(token[i]);
                 upper[i] = safe_toupper(token[i]);
             }
@@ -1598,7 +1598,7 @@ group_ref_token: @polymorphic_base type = {
         if '0' <= ctx..peek() <= '9' {
             _ = ctx..next(); // Skip escape
             group = ctx..grab_number();
-            if group..size() >= 3 {
+            if group..size() >= 3 as size_t {
                 // Octal syntax (\000) not a group ref matcher.
                 number := 0;
                 if !string_to_int(group, number, 8) { return ctx..error("Could not convert octal to int."); }

From 8ab0e98b7b6d9c42c377d44a8789cf728cf80a4c Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 24 Jun 2024 19:51:21 +0200
Subject: [PATCH 132/161] Fixes for new char matcher logic.

---
 include/cpp2regex.h | 833 ++++++++++++++++++++++----------------------
 source/regex.h2     |  28 +-
 2 files changed, 443 insertions(+), 418 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 18f85299c7..a0d6f20bf6 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -93,97 +93,97 @@ class regex_token;
 #line 348 "regex.h2"
 class parse_context_group_state;
 
-#line 394 "regex.h2"
+#line 404 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 427 "regex.h2"
+#line 437 "regex.h2"
 class parse_context;
     
 
-#line 812 "regex.h2"
+#line 822 "regex.h2"
 class generation_function_context;
     
 
-#line 828 "regex.h2"
+#line 838 "regex.h2"
 class generation_context;
 
-#line 1004 "regex.h2"
+#line 1014 "regex.h2"
 class regex_token_list;
     
 
-#line 1036 "regex.h2"
+#line 1046 "regex.h2"
 class regex_token_base;
     
 
-#line 1050 "regex.h2"
+#line 1060 "regex.h2"
 class regex_token_check;
     
 
-#line 1065 "regex.h2"
+#line 1075 "regex.h2"
 class regex_token_code;
     
 
-#line 1081 "regex.h2"
+#line 1091 "regex.h2"
 class regex_token_empty;
     
 
-#line 1097 "regex.h2"
+#line 1107 "regex.h2"
 class alternative_token;
     
 
-#line 1115 "regex.h2"
+#line 1125 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1161 "regex.h2"
+#line 1171 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1187 "regex.h2"
+#line 1197 "regex.h2"
 class any_token;
     
 
-#line 1218 "regex.h2"
+#line 1228 "regex.h2"
 class char_token;
     
 
-#line 1346 "regex.h2"
+#line 1356 "regex.h2"
 class class_token;
     
 
-#line 1482 "regex.h2"
+#line 1492 "regex.h2"
 template class class_token_matcher;
 
-#line 1580 "regex.h2"
+#line 1590 "regex.h2"
 class group_ref_token;
     
 
-#line 1714 "regex.h2"
+#line 1724 "regex.h2"
 class group_token;
     
 
-#line 1995 "regex.h2"
+#line 2005 "regex.h2"
 class lookahead_token;
     
 
-#line 2094 "regex.h2"
+#line 2104 "regex.h2"
 class range_token;
     
 
-#line 2237 "regex.h2"
+#line 2247 "regex.h2"
 template class range_token_matcher;
 
-#line 2362 "regex.h2"
+#line 2372 "regex.h2"
 class special_range_token;
     
 
-#line 2449 "regex.h2"
+#line 2459 "regex.h2"
 template class regular_expression;
 
-#line 2538 "regex.h2"
+#line 2548 "regex.h2"
 template class regex_parser;
 
-#line 2606 "regex.h2"
+#line 2616 "regex.h2"
 }
 }
 
@@ -214,7 +214,7 @@ namespace cpp2 {
 
 namespace regex {
 
-bool inline constexpr greedy_alternative = false;
+bool inline constexpr greedy_alternative{ false };
 
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
@@ -565,17 +565,21 @@ class parse_context_group_state {
 
     public: auto next_alternative() & -> void;
 
-#line 364 "regex.h2"
+#line 365 "regex.h2"
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 370 "regex.h2"
+#line 371 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 380 "regex.h2"
+#line 382 "regex.h2"
     public: auto add(cpp2::impl::in token) & -> void;
 
-#line 390 "regex.h2"
+#line 386 "regex.h2"
     public: [[nodiscard]] auto empty() const& -> bool;
+
+    public: static auto post_process_list(token_vec& list) -> void;
+
+#line 401 "regex.h2"
 };
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
@@ -587,16 +591,16 @@ class parse_context_branch_reset_state {
 
     public: [[nodiscard]] auto next() & -> int;
 
-#line 408 "regex.h2"
+#line 418 "regex.h2"
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 413 "regex.h2"
+#line 423 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 419 "regex.h2"
+#line 429 "regex.h2"
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
 
-#line 425 "regex.h2"
+#line 435 "regex.h2"
 };
 
 class parse_context {
@@ -612,39 +616,39 @@ class parse_context {
 
     private: token_ptr root; 
 
-#line 441 "regex.h2"
+#line 451 "regex.h2"
     public: explicit parse_context(cpp2::impl::in r);
-#line 441 "regex.h2"
+#line 451 "regex.h2"
     public: auto operator=(cpp2::impl::in r) -> parse_context& ;
 
-#line 446 "regex.h2"
+#line 456 "regex.h2"
     // State management functions
     //
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 456 "regex.h2"
+#line 466 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 462 "regex.h2"
+#line 472 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 466 "regex.h2"
+#line 476 "regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 470 "regex.h2"
+#line 480 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 481 "regex.h2"
+#line 491 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 487 "regex.h2"
+#line 497 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 492 "regex.h2"
+#line 502 "regex.h2"
     // Position management functions
     //
 
@@ -654,87 +658,87 @@ class parse_context {
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 503 "regex.h2"
+#line 513 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 507 "regex.h2"
+#line 517 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 517 "regex.h2"
+#line 527 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 521 "regex.h2"
+#line 531 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 526 "regex.h2"
+#line 536 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 530 "regex.h2"
+#line 540 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 536 "regex.h2"
+#line 546 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 546 "regex.h2"
+#line 556 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 558 "regex.h2"
+#line 568 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 571 "regex.h2"
+#line 581 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
 
-#line 580 "regex.h2"
+#line 590 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 592 "regex.h2"
+#line 602 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::impl::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 633 "regex.h2"
+#line 643 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 654 "regex.h2"
+#line 664 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 670 "regex.h2"
+#line 680 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 690 "regex.h2"
+#line 700 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 700 "regex.h2"
+#line 710 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 758 "regex.h2"
+#line 768 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 795 "regex.h2"
+#line 805 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 810 "regex.h2"
+#line 820 "regex.h2"
 };
 
 class generation_function_context {
@@ -743,10 +747,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 823 "regex.h2"
+#line 833 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 826 "regex.h2"
+#line 836 "regex.h2"
 };
 
 class generation_context {
@@ -763,84 +767,84 @@ class generation_context {
 
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 845 "regex.h2"
+#line 855 "regex.h2"
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 850 "regex.h2"
+#line 860 "regex.h2"
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void;
 
-#line 857 "regex.h2"
+#line 867 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
 
-#line 863 "regex.h2"
+#line 873 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 871 "regex.h2"
+#line 881 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 893 "regex.h2"
+#line 903 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 897 "regex.h2"
+#line 907 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 901 "regex.h2"
+#line 911 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 905 "regex.h2"
+#line 915 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 915 "regex.h2"
+#line 925 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 921 "regex.h2"
+#line 931 "regex.h2"
     public: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 939 "regex.h2"
+#line 949 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 943 "regex.h2"
+#line 953 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 947 "regex.h2"
+#line 957 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 953 "regex.h2"
+#line 963 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 959 "regex.h2"
+#line 969 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 965 "regex.h2"
+#line 975 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 973 "regex.h2"
+#line 983 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 981 "regex.h2"
+#line 991 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1002 "regex.h2"
+#line 1012 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1007 "regex.h2"
+#line 1017 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 1014 "regex.h2"
+#line 1024 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1020 "regex.h2"
+#line 1030 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1026 "regex.h2"
+#line 1036 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -848,36 +852,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1033 "regex.h2"
+#line 1043 "regex.h2"
 };
 
-#line 1036 "regex.h2"
+#line 1046 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1039 "regex.h2"
+#line 1049 "regex.h2"
     public: explicit regex_token_base(cpp2::impl::in str);
 
-#line 1043 "regex.h2"
+#line 1053 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1047 "regex.h2"
+#line 1057 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1048 "regex.h2"
+#line 1058 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1053 "regex.h2"
+#line 1063 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 1060 "regex.h2"
+#line 1070 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -885,17 +889,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1063 "regex.h2"
+#line 1073 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1068 "regex.h2"
+#line 1078 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 1075 "regex.h2"
+#line 1085 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -903,16 +907,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1078 "regex.h2"
+#line 1088 "regex.h2"
 };
 
-#line 1081 "regex.h2"
+#line 1091 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1084 "regex.h2"
+#line 1094 "regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 1088 "regex.h2"
+#line 1098 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -920,7 +924,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1091 "regex.h2"
+#line 1101 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -929,12 +933,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1100 "regex.h2"
+#line 1110 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1110 "regex.h2"
+#line 1120 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -942,23 +946,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1113 "regex.h2"
+#line 1123 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1119 "regex.h2"
+#line 1129 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1126 "regex.h2"
+#line 1136 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1142 "regex.h2"
+#line 1152 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1148 "regex.h2"
+#line 1158 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -966,36 +970,36 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1159 "regex.h2"
+#line 1169 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1166 "regex.h2"
+#line 1176 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1183 "regex.h2"
+#line 1193 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1190 "regex.h2"
+#line 1200 "regex.h2"
     private: bool single_line; 
 
     public: explicit any_token(cpp2::impl::in single_line_);
 
-#line 1196 "regex.h2"
+#line 1206 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1202 "regex.h2"
+#line 1212 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1003,36 +1007,36 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1205 "regex.h2"
+#line 1215 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1218 "regex.h2"
+#line 1228 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1221 "regex.h2"
+#line 1231 "regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1230 "regex.h2"
+#line 1240 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1234 "regex.h2"
+#line 1244 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1256 "regex.h2"
+#line 1266 "regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1276 "regex.h2"
+#line 1286 "regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1293 "regex.h2"
+#line 1303 "regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1305 "regex.h2"
+#line 1315 "regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -1040,7 +1044,7 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1309 "regex.h2"
+#line 1319 "regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1080,21 +1084,21 @@ class char_token: public regex_token_base {
 //
 class class_token: public regex_token_base {
 
-#line 1349 "regex.h2"
+#line 1359 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1360 "regex.h2"
+#line 1370 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1469 "regex.h2"
+#line 1479 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1474 "regex.h2"
+#line 1484 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1102,21 +1106,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1480 "regex.h2"
+#line 1490 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1505 "regex.h2"
+#line 1515 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1517 "regex.h2"
+#line 1527 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1128,17 +1132,17 @@ template c
 
     //     return r;
     // }
-#line 1528 "regex.h2"
+#line 1538 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1565 "regex.h2"
+#line 1575 "regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1574 "regex.h2"
+#line 1584 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1147,16 +1151,16 @@ template c
 //
 class group_ref_token: public regex_token_base {
 
-#line 1583 "regex.h2"
+#line 1593 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1592 "regex.h2"
+#line 1602 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1684 "regex.h2"
+#line 1694 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1164,30 +1168,30 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1687 "regex.h2"
+#line 1697 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1714 "regex.h2"
+#line 1724 "regex.h2"
 class group_token: public regex_token {
 
-#line 1717 "regex.h2"
+#line 1727 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1733 "regex.h2"
+#line 1743 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1860 "regex.h2"
+#line 1870 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1877 "regex.h2"
+#line 1887 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1895 "regex.h2"
+#line 1905 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1196,44 +1200,44 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1901 "regex.h2"
+#line 1911 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1944 "regex.h2"
+#line 1954 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1962 "regex.h2"
+#line 1972 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1974 "regex.h2"
+#line 1984 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1988 "regex.h2"
+#line 1998 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1993 "regex.h2"
+#line 2003 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 1998 "regex.h2"
+#line 2008 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 2005 "regex.h2"
+#line 2015 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2011 "regex.h2"
+#line 2021 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1241,18 +1245,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 2014 "regex.h2"
+#line 2024 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 2025 "regex.h2"
+#line 2035 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2052 "regex.h2"
+#line 2062 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1266,17 +1270,17 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2066 "regex.h2"
+#line 2076 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2092 "regex.h2"
+#line 2102 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2097 "regex.h2"
+#line 2107 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1286,19 +1290,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2174 "regex.h2"
+#line 2184 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2185 "regex.h2"
+#line 2195 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2197 "regex.h2"
+#line 2207 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2221 "regex.h2"
+#line 2231 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2231 "regex.h2"
+#line 2241 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1306,46 +1310,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2235 "regex.h2"
+#line 2245 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2251 "regex.h2"
+#line 2261 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2256 "regex.h2"
+#line 2266 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2261 "regex.h2"
+#line 2271 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2267 "regex.h2"
+#line 2277 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2282 "regex.h2"
+#line 2292 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2310 "regex.h2"
+#line 2320 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2334 "regex.h2"
+#line 2344 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2358 "regex.h2"
+#line 2368 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2365 "regex.h2"
+#line 2375 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1354,7 +1358,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2394 "regex.h2"
+#line 2404 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1363,10 +1367,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2416 "regex.h2"
+#line 2426 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2441 "regex.h2"
+#line 2451 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1377,7 +1381,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 // Regular expression implementation
 template class regular_expression {
 
-#line 2452 "regex.h2"
+#line 2462 "regex.h2"
     public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     public: template using context = matcher::context;
 
@@ -1388,7 +1392,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_);
 
-#line 2465 "regex.h2"
+#line 2475 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1403,7 +1407,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2481 "regex.h2"
+#line 2491 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1411,13 +1415,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2493 "regex.h2"
+#line 2503 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2515 "regex.h2"
+#line 2525 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1429,7 +1433,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2528 "regex.h2"
+#line 2538 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1453,12 +1457,12 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e);
 
-#line 2555 "regex.h2"
+#line 2565 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::impl::in message) & -> void;
 
-#line 2562 "regex.h2"
+#line 2572 "regex.h2"
     // Parsing functions
     //
 
@@ -1467,12 +1471,12 @@ template class regex_parser {
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2597 "regex.h2"
+#line 2607 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string;
 
-#line 2606 "regex.h2"
+#line 2616 "regex.h2"
 }
 }
 
@@ -1502,19 +1506,19 @@ constexpr auto expression_flags::operator^=(expression_flags const& that) & -> v
 [[nodiscard]] constexpr auto expression_flags::has(expression_flags const& that) const& -> bool { return _value & that._value; }
 constexpr auto expression_flags::set(expression_flags const& that) & -> void { _value |= that._value; }
 constexpr auto expression_flags::clear(expression_flags const& that) & -> void { _value &= ~that._value; }
-inline CPP2_CONSTEXPR expression_flags expression_flags::case_insensitive = 1;
+inline CPP2_CONSTEXPR expression_flags expression_flags::case_insensitive{ 1 };
 
-inline CPP2_CONSTEXPR expression_flags expression_flags::multiple_lines = 2;
+inline CPP2_CONSTEXPR expression_flags expression_flags::multiple_lines{ 2 };
 
-inline CPP2_CONSTEXPR expression_flags expression_flags::single_line = 4;
+inline CPP2_CONSTEXPR expression_flags expression_flags::single_line{ 4 };
 
-inline CPP2_CONSTEXPR expression_flags expression_flags::no_group_captures = 8;
+inline CPP2_CONSTEXPR expression_flags expression_flags::no_group_captures{ 8 };
 
-inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax = 16;
+inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax{ 16 };
 
-inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax_in_classes = 32;
+inline CPP2_CONSTEXPR expression_flags expression_flags::perl_code_syntax_in_classes{ 32 };
 
-inline CPP2_CONSTEXPR expression_flags expression_flags::none = 0;
+inline CPP2_CONSTEXPR expression_flags expression_flags::none{ 0 };
 
 [[nodiscard]] constexpr auto expression_flags::get_raw_value() const& -> cpp2::u8 { return _value; }
 constexpr expression_flags::expression_flags()
@@ -1565,9 +1569,9 @@ return cpp2::move(_ret) + ")";
 //     error: non-type template parameter has incomplete type 'range_flags'
 
 #line 48 "regex.h2"
-    inline CPP2_CONSTEXPR int range_flags::not_greedy = 1;
-    inline CPP2_CONSTEXPR int range_flags::greedy = 2;
-    inline CPP2_CONSTEXPR int range_flags::possessive = 3;
+    inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
+    inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
+    inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
 #line 72 "regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
@@ -1879,19 +1883,21 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
+        post_process_list(new_list);
         static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 364 "regex.h2"
+#line 365 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 370 "regex.h2"
+#line 371 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
         if (alternate_match_lists.empty()) {
+            post_process_list(cur_match_list);
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
         }
         else {
@@ -1900,21 +1906,30 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 380 "regex.h2"
+#line 382 "regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void{
-        if (cpp2::impl::is(*cpp2::impl::assert_not_null(token)) && !(cur_match_list.empty()) && cpp2::impl::is(*cpp2::impl::assert_not_null(cur_match_list.back()))) {
-            // This and the last token are char tokens. Combine them.
-            (cpp2::impl::as_(*cpp2::impl::assert_not_null(cur_match_list.back()))).append(cpp2::impl::as_(*cpp2::impl::assert_not_null(token)));
-        }
-        else {
-            cur_match_list.push_back(token);
-        }
+        cur_match_list.push_back(token);
     }
 
-#line 390 "regex.h2"
+#line 386 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty();  }
 
-#line 400 "regex.h2"
+#line 388 "regex.h2"
+    auto parse_context_group_state::post_process_list(token_vec& list) -> void{
+        // Merge all characters
+        auto merge_pos {CPP2_UFCS(begin)(list)}; 
+        for( ; merge_pos != list.end(); (++merge_pos) ) {
+            if (cpp2::impl::is(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(merge_pos)))) {
+                auto combine_pos {merge_pos + 1}; 
+                while( combine_pos != list.end() && cpp2::impl::is(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(combine_pos))) ) {// The erase advances combine_pos
+                    (cpp2::impl::as_(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(merge_pos)))).append(cpp2::impl::as_(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(combine_pos))));
+                    combine_pos = list.erase(combine_pos);
+                }
+            }
+        }
+    }
+
+#line 410 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1923,20 +1938,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 408 "regex.h2"
+#line 418 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 413 "regex.h2"
+#line 423 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 419 "regex.h2"
+#line 429 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1944,14 +1959,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 441 "regex.h2"
+#line 451 "regex.h2"
     parse_context::parse_context(cpp2::impl::in r)
         : regex{ r }
         , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }{
 
-#line 444 "regex.h2"
+#line 454 "regex.h2"
     }
-#line 441 "regex.h2"
+#line 451 "regex.h2"
     auto parse_context::operator=(cpp2::impl::in r) -> parse_context& {
         regex = r;
         pos = 0;
@@ -1962,10 +1977,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         root = CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "");
         return *this;
 
-#line 444 "regex.h2"
+#line 454 "regex.h2"
     }
 
-#line 449 "regex.h2"
+#line 459 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         old_state.swap(cur_group_state);
@@ -1973,24 +1988,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 456 "regex.h2"
+#line 466 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
         auto inner {cur_group_state.get_tokens()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 462 "regex.h2"
+#line 472 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 466 "regex.h2"
+#line 476 "regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 473 "regex.h2"
+#line 483 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -1999,36 +2014,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 481 "regex.h2"
+#line 491 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 487 "regex.h2"
+#line 497 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
-#line 495 "regex.h2"
+#line 505 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 497 "regex.h2"
+#line 507 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
 
-#line 499 "regex.h2"
+#line 509 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         cur_group_state.add(token);
     }
 
-#line 503 "regex.h2"
+#line 513 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(cur_group_state.empty()); 
     }
 
-#line 507 "regex.h2"
+#line 517 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2039,29 +2054,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 517 "regex.h2"
+#line 527 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return root; 
     }
 
-#line 522 "regex.h2"
+#line 532 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 526 "regex.h2"
+#line 536 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return cur_branch_reset_state.next(); 
     }
 
-#line 530 "regex.h2"
+#line 540 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 536 "regex.h2"
+#line 546 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {named_groups.find(name)}; 
         if (iter == named_groups.end()) {
@@ -2072,10 +2087,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 546 "regex.h2"
+#line 556 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 548 "regex.h2"
+#line 558 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != regex.size()) {
@@ -2086,14 +2101,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 558 "regex.h2"
+#line 568 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 559 "regex.h2"
+#line 569 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 560 "regex.h2"
+#line 570 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 562 "regex.h2"
+#line 572 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2103,19 +2118,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 571 "regex.h2"
+#line 581 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
 
-#line 573 "regex.h2"
+#line 583 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && error_text.empty(); }
 
-#line 575 "regex.h2"
+#line 585 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 580 "regex.h2"
+#line 590 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2128,10 +2143,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 592 "regex.h2"
+#line 602 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::impl::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 594 "regex.h2"
+#line 604 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2170,7 +2185,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 633 "regex.h2"
+#line 643 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2192,14 +2207,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 654 "regex.h2"
+#line 664 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 655 "regex.h2"
+#line 665 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 656 "regex.h2"
+#line 666 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 658 "regex.h2"
+#line 668 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
             r.construct(regex.substr(pos, n));
@@ -2212,7 +2227,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 670 "regex.h2"
+#line 680 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2233,7 +2248,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(r.value()); 
     }
 
-#line 690 "regex.h2"
+#line 700 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,regex.size())) {
@@ -2244,12 +2259,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 700 "regex.h2"
+#line 710 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 701 "regex.h2"
+#line 711 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 703 "regex.h2"
+#line 713 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2305,7 +2320,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 758 "regex.h2"
+#line 768 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2343,7 +2358,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 795 "regex.h2"
+#line 805 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2358,7 +2373,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 816 "regex.h2"
+#line 826 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2366,27 +2381,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 823 "regex.h2"
+#line 833 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
 
-#line 838 "regex.h2"
+#line 848 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 840 "regex.h2"
+#line 850 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 845 "regex.h2"
+#line 855 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n");
     }
 
-#line 850 "regex.h2"
+#line 860 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void{
         end_func_statefull(c);
 
@@ -2394,14 +2409,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(cpp2::move(name));
     }
 
-#line 857 "regex.h2"
+#line 867 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 863 "regex.h2"
+#line 873 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         (*cpp2::impl::assert_not_null(token)).generate_code((*this));
@@ -2410,7 +2425,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 871 "regex.h2"
+#line 881 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
@@ -2432,22 +2447,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(name) + "()"; 
     }
 
-#line 893 "regex.h2"
+#line 903 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &gen_stack.back(); 
     }
 
-#line 897 "regex.h2"
+#line 907 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 901 "regex.h2"
+#line 911 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 905 "regex.h2"
+#line 915 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2458,14 +2473,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 915 "regex.h2"
+#line 925 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 921 "regex.h2"
+#line 931 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
@@ -2484,38 +2499,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 939 "regex.h2"
+#line 949 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx)");
     }
 
-#line 943 "regex.h2"
+#line 953 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 947 "regex.h2"
+#line 957 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 953 "regex.h2"
+#line 963 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 959 "regex.h2"
+#line 969 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 965 "regex.h2"
+#line 975 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2524,7 +2539,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 973 "regex.h2"
+#line 983 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2533,7 +2548,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         gen_stack.pop_back();
     }
 
-#line 981 "regex.h2"
+#line 991 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2556,29 +2571,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1009 "regex.h2"
+#line 1019 "regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1012 "regex.h2"
+#line 1022 "regex.h2"
     }
 
-#line 1014 "regex.h2"
+#line 1024 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
         }
     }
 
-#line 1020 "regex.h2"
+#line 1030 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).add_groups(groups);
         }
     }
 
-#line 1026 "regex.h2"
+#line 1036 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2589,74 +2604,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1039 "regex.h2"
+#line 1049 "regex.h2"
     regex_token_base::regex_token_base(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 1041 "regex.h2"
+#line 1051 "regex.h2"
     }
 
-#line 1043 "regex.h2"
+#line 1053 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1045 "regex.h2"
+#line 1055 "regex.h2"
     }
 
-#line 1047 "regex.h2"
+#line 1057 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1055 "regex.h2"
+#line 1065 "regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1058 "regex.h2"
+#line 1068 "regex.h2"
     }
 
-#line 1060 "regex.h2"
+#line 1070 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(check + "(" + ctx.match_parameters() + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1070 "regex.h2"
+#line 1080 "regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1073 "regex.h2"
+#line 1083 "regex.h2"
     }
 
-#line 1075 "regex.h2"
+#line 1085 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         ctx.add(code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1084 "regex.h2"
+#line 1094 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token_base{ str }{
 
-#line 1086 "regex.h2"
+#line 1096 "regex.h2"
     }
 
-#line 1088 "regex.h2"
+#line 1098 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1100 "regex.h2"
+#line 1110 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1102 "regex.h2"
+#line 1112 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2665,22 +2680,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1110 "regex.h2"
+#line 1120 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1121 "regex.h2"
+#line 1131 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1124 "regex.h2"
+#line 1134 "regex.h2"
     }
 
-#line 1126 "regex.h2"
+#line 1136 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2697,14 +2712,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         ctx.add_statefull(next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1142 "regex.h2"
+#line 1152 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1148 "regex.h2"
+#line 1158 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2719,11 +2734,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1163 "regex.h2"
+#line 1173 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1166 "regex.h2"
+#line 1176 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2742,29 +2757,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1192 "regex.h2"
+#line 1202 "regex.h2"
     any_token::any_token(cpp2::impl::in single_line_)
         : regex_token_base{ "." }
         , single_line{ single_line_ }{
 
-#line 1194 "regex.h2"
+#line 1204 "regex.h2"
     }
 
-#line 1196 "regex.h2"
+#line 1206 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.get_modifiers().has(expression_flags::single_line)); 
     }
 
-#line 1202 "regex.h2"
+#line 1212 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("any_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1207 "regex.h2"
+#line 1217 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2776,21 +2791,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1224 "regex.h2"
+#line 1234 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token_base{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1228 "regex.h2"
+#line 1238 "regex.h2"
     }
 
-#line 1230 "regex.h2"
+#line 1240 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1234 "regex.h2"
+#line 1244 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             std::string upper {token}; 
@@ -2798,14 +2813,14 @@ template [[nodiscard]] auto any_token_matcher(
 {
 size_t i{0};
 
-#line 1239 "regex.h2"
+#line 1249 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1244 "regex.h2"
+#line 1254 "regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2818,7 +2833,7 @@ size_t i{0};
         }
     }
 
-#line 1256 "regex.h2"
+#line 1266 "regex.h2"
     auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         std::string lower_name {"lower_" + cpp2::to_string(name)}; 
@@ -2826,7 +2841,7 @@ size_t i{0};
         auto size {token.size()}; 
         ctx.add((cpp2::to_string(lower_name) + " : std::array = \"" + cpp2::to_string(add_escapes(lower)) + "\";"));  // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
         ctx.add((cpp2::to_string(upper_name) + " : std::array = \"" + cpp2::to_string(add_escapes(upper)) + "\";"));  // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
-        ctx.add(("if !(std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + ") {"));
+        ctx.add(("if std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + " {"));
         ctx.add("    r.matched = false;");
         ctx.add("    break;");
         ctx.add("}");
@@ -2839,12 +2854,12 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1276 "regex.h2"
+#line 1286 "regex.h2"
     auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         auto size {token.size()}; 
         ctx.add((cpp2::to_string(name) + " : std::array = \"" + cpp2::to_string(add_escapes(token)) + "\";"));  // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
-        ctx.add(("if !(std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + ") {"));
+        ctx.add(("if std::distance(r.pos, ctx.end) < " + cpp2::to_string(size) + " {"));
         ctx.add("    r.matched = false;");
         ctx.add("    break;");
         ctx.add("}");
@@ -2857,7 +2872,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1293 "regex.h2"
+#line 1303 "regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
         str = replace_all(str, "\\", "\\\\");
         str = replace_all(str, "\a", "\\a");
@@ -2870,7 +2885,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1305 "regex.h2"
+#line 1315 "regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2878,17 +2893,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1353 "regex.h2"
+#line 1363 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1358 "regex.h2"
+#line 1368 "regex.h2"
     }
 
-#line 1361 "regex.h2"
+#line 1371 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -2997,12 +3012,12 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1469 "regex.h2"
+#line 1479 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
-#line 1474 "regex.h2"
+#line 1484 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
@@ -3012,7 +3027,7 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1484 "regex.h2"
+#line 1494 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -3034,7 +3049,7 @@ size_t i{0};
         }
     }
 
-#line 1505 "regex.h2"
+#line 1515 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3047,11 +3062,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1530 "regex.h2"
+#line 1540 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1534 "regex.h2"
+#line 1544 "regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -3083,7 +3098,7 @@ size_t i{0};
 
 }
 
-#line 1567 "regex.h2"
+#line 1577 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -3091,16 +3106,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1586 "regex.h2"
+#line 1596 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token_base{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1590 "regex.h2"
+#line 1600 "regex.h2"
     }
 
-#line 1592 "regex.h2"
+#line 1602 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3193,18 +3208,18 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1684 "regex.h2"
+#line 1694 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1689 "regex.h2"
+#line 1699 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
-    auto group_pos {g.start}; 
+    auto group_pos {cpp2::move(g).start}; 
     for( ; group_pos != g.end && cur != ctx.end; (++group_pos, ++cur) ) {
         if constexpr (case_insensitive) {
             if (safe_tolower(*cpp2::impl::assert_not_null(group_pos)) != safe_tolower(*cpp2::impl::assert_not_null(cur))) {
@@ -3226,7 +3241,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1720 "regex.h2"
+#line 1730 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3240,7 +3255,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1733 "regex.h2"
+#line 1743 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3368,7 +3383,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1860 "regex.h2"
+#line 1870 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3386,7 +3401,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1877 "regex.h2"
+#line 1887 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add(("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3405,7 +3420,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1895 "regex.h2"
+#line 1905 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3415,7 +3430,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1905 "regex.h2"
+#line 1915 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3455,7 +3470,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1946 "regex.h2"
+#line 1956 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3472,7 +3487,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1962 "regex.h2"
+#line 1972 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3485,7 +3500,7 @@ template [[
     }}
 }
 
-#line 1976 "regex.h2"
+#line 1986 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3498,35 +3513,35 @@ template [[
     }
 }
 
-#line 1988 "regex.h2"
+#line 1998 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 2001 "regex.h2"
+#line 2011 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 2003 "regex.h2"
+#line 2013 "regex.h2"
     }
 
-#line 2005 "regex.h2"
+#line 2015 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 2011 "regex.h2"
+#line 2021 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 2016 "regex.h2"
+#line 2026 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3536,7 +3551,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2028 "regex.h2"
+#line 2038 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3561,7 +3576,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\\\\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2068 "regex.h2"
+#line 2078 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3586,11 +3601,11 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2102 "regex.h2"
+#line 2112 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2104 "regex.h2"
+#line 2114 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3634,7 +3649,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2148 "regex.h2"
+#line 2158 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3661,7 +3676,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2174 "regex.h2"
+#line 2184 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3673,7 +3688,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2185 "regex.h2"
+#line 2195 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3686,7 +3701,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2197 "regex.h2"
+#line 2207 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3711,7 +3726,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2221 "regex.h2"
+#line 2231 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3722,14 +3737,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2231 "regex.h2"
+#line 2241 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2239 "regex.h2"
+#line 2249 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3742,26 +3757,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2251 "regex.h2"
+#line 2261 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2256 "regex.h2"
+#line 2266 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2261 "regex.h2"
+#line 2271 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2267 "regex.h2"
+#line 2277 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3777,7 +3792,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2282 "regex.h2"
+#line 2292 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3806,7 +3821,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2310 "regex.h2"
+#line 2320 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3831,7 +3846,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2334 "regex.h2"
+#line 2344 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3857,7 +3872,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2365 "regex.h2"
+#line 2375 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3880,7 +3895,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2388 "regex.h2"
+#line 2398 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3890,7 +3905,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2400 "regex.h2"
+#line 2410 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3907,7 +3922,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2416 "regex.h2"
+#line 2426 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3932,31 +3947,31 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2460 "regex.h2"
+#line 2470 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2463 "regex.h2"
+#line 2473 "regex.h2"
         }
 
-#line 2465 "regex.h2"
+#line 2475 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2466 "regex.h2"
+#line 2476 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2467 "regex.h2"
+#line 2477 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2468 "regex.h2"
+#line 2478 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2470 "regex.h2"
+#line 2480 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2471 "regex.h2"
+#line 2481 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2472 "regex.h2"
+#line 2482 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2474 "regex.h2"
+#line 2484 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3965,13 +3980,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2483 "regex.h2"
+#line 2493 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2484 "regex.h2"
+#line 2494 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2485 "regex.h2"
+#line 2495 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2486 "regex.h2"
+#line 2496 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3979,13 +3994,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
     }
 
-#line 2493 "regex.h2"
+#line 2503 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2494 "regex.h2"
+#line 2504 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2495 "regex.h2"
+#line 2505 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2496 "regex.h2"
+#line 2506 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4005,10 +4020,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(cpp2::move(matched), cpp2::move(ctx)); 
     }
 
-#line 2515 "regex.h2"
+#line 2525 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2520 "regex.h2"
+#line 2530 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -4018,22 +4033,22 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2549 "regex.h2"
+#line 2559 "regex.h2"
     template  regex_parser::regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e)
         : regex{ r }
         , modifier{ m }
         , error_out{ e }{
 
-#line 2553 "regex.h2"
+#line 2563 "regex.h2"
     }
 
-#line 2557 "regex.h2"
+#line 2567 "regex.h2"
     template  auto regex_parser::error(cpp2::impl::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2565 "regex.h2"
+#line 2575 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
         parse_context parse_ctx {regex}; 
         std::string mod {modifier}; 
@@ -4067,7 +4082,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2599 "regex.h2"
+#line 2609 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string{
     regex_parser parser {regex, modifier, err}; 
     auto r {parser.parse()}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 56e4684199..7911565514 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -358,6 +358,7 @@ parse_context_group_state: @struct type = {
     next_alternative: (inout this) = {
         new_list: token_vec = ();
         std::swap(new_list, cur_match_list);
+        post_process_list(new_list);
         _ = alternate_match_lists..insert(alternate_match_lists..end(), shared.new(new_list));
     }
 
@@ -369,6 +370,7 @@ parse_context_group_state: @struct type = {
 
     get_tokens: (inout this) -> token_ptr = {
         if alternate_match_lists..empty() {
+            post_process_list(cur_match_list);
             return shared.new(cur_match_list);
         }
         else {
@@ -378,16 +380,24 @@ parse_context_group_state: @struct type = {
     }
 
     add: (inout this, token: token_ptr) = {
-        if token* is char_token && !cur_match_list..empty() && cur_match_list..back()* is char_token {
-            // This and the last token are char tokens. Combine them.
-            (cur_match_list..back()* as char_token)..append(token* as char_token);
-        }
-        else {
-            cur_match_list..push_back(token);
-        }
+        cur_match_list..push_back(token);
     }
 
     empty: (this) -> bool = cur_match_list..empty();
+
+    post_process_list: (inout list: token_vec) = {
+        // Merge all characters
+        merge_pos := list.begin();
+        while merge_pos != list..end() next (merge_pos++) {
+            if merge_pos** is char_token {
+                combine_pos := merge_pos + 1;
+                while combine_pos != list..end() && combine_pos** is char_token { // The erase advances combine_pos
+                    (merge_pos** as char_token)..append(combine_pos** as char_token);
+                    combine_pos = list..erase(combine_pos);
+                }
+            }
+        }
+    }
 }
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
@@ -1260,7 +1270,7 @@ char_token: @polymorphic_base type = {
         size := token..size();
         ctx..add("(lower_name)$ : std::array = \"(add_escapes(lower))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
         ctx..add("(upper_name)$ : std::array = \"(add_escapes(upper))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
-        ctx..add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
+        ctx..add("if std::distance(r.pos, ctx.end) < (size)$ {");
         ctx..add("    r.matched = false;");
         ctx..add("    break;");
         ctx..add("}");
@@ -1277,7 +1287,7 @@ char_token: @polymorphic_base type = {
         name: std::string = "str_(ctx..gen_temp())$";
         size := token..size();
         ctx..add("(name)$ : std::array = \"(add_escapes(token))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
-        ctx..add("if !(std::distance(r.pos, ctx.end) < (size)$) {");
+        ctx..add("if std::distance(r.pos, ctx.end) < (size)$ {");
         ctx..add("    r.matched = false;");
         ctx..add("    break;");
         ctx..add("}");

From b69fab4c0a101ebcc2b269bcb7c063211ab5f9e1 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 24 Jun 2024 21:11:10 +0200
Subject: [PATCH 133/161] Added handling of raw strings and using raw strings.

---
 include/cpp2regex.h |  8 ++++----
 source/reflect.h    | 23 ++++++++++++++---------
 source/reflect.h2   |  9 +++++++--
 source/regex.h2     |  8 ++++----
 4 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index a0d6f20bf6..3b67127533 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -3474,13 +3474,13 @@ template [[nodiscard]] auto gr
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\$", ("line_end_token_matcher")); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "$", ("line_end_token_matcher")); 
     }
     else {if (ctx.current() == '\\' && (ctx.peek() == 'z' || ctx.peek() == 'Z')) {
         static_cast(ctx.next());// Skip escape
 
         auto negate {ctx.current() == 'Z'}; 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\" + cpp2::to_string(ctx.current())), ("line_end_token_matcher")); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), ("line_end_token_matcher")); 
     }
     else {
         return nullptr; 
@@ -3573,7 +3573,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     static_cast(ctx.next());// Skip escape
 
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\\\\\\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
 #line 2078 "regex.h2"
@@ -4074,7 +4074,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         source += "}\n";
 
         auto string {(*cpp2::impl::assert_not_null(parse_ctx.get_tokens())).to_string()}; 
-        source += ("  to_string: () -> std::string = { return \"" + cpp2::to_string(cpp2::move(string)) + "\"; }\n");
+        source += ("  to_string: () -> std::string = { return R\"(" + cpp2::to_string(cpp2::move(string)) + ")\"; }\n");
         source += "}\n";
 
         static_cast(cpp2::move(parse_ctx));
diff --git a/source/reflect.h b/source/reflect.h
index f146961ed4..cc8b0f440e 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -39,7 +39,7 @@ class alias_declaration;
 #line 966 "reflect.h2"
 class value_member_info;
 
-#line 1562 "reflect.h2"
+#line 1567 "reflect.h2"
 }
 
 }
@@ -781,7 +781,7 @@ auto print(cpp2::impl::in t) -> void;
 //
 auto regex_gen(meta::type_declaration& t) -> void;
 
-#line 1452 "reflect.h2"
+#line 1457 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  apply_metafunctions
@@ -792,7 +792,7 @@ auto regex_gen(meta::type_declaration& t) -> void;
     auto const& error
     ) -> bool;
 
-#line 1562 "reflect.h2"
+#line 1567 "reflect.h2"
 }
 
 }
@@ -2044,10 +2044,15 @@ auto regex_gen(meta::type_declaration& t) -> void
             }
 
             std::string expr {CPP2_UFCS(initializer)(m)}; 
-            if (!(CPP2_UFCS(is_escaped)(expr))) {
-                CPP2_UFCS(error)(t, ("Unknown string format '" + cpp2::to_string(expr) + "'"));
+            if (CPP2_UFCS(starts_with)(expr, "R\"(") && CPP2_UFCS(ends_with)(expr, ")\"")) {
+                expr = CPP2_UFCS(substr)(expr, 3, CPP2_UFCS(size)(expr) - 5);
+            }
+            else {if (CPP2_UFCS(is_escaped)(expr)) {
+                expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2);
             }
-            expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2);
+            else {
+                CPP2_UFCS(error)(t, ("Unknown string format '" + cpp2::to_string(expr) + "'"));
+            }}
 
             if (CPP2_UFCS(ends_with)(name, postfix)) {
                 name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(size)(name) - CPP2_UFCS(size)(postfix));
@@ -2064,7 +2069,7 @@ auto regex_gen(meta::type_declaration& t) -> void
                 CPP2_ASSERT_IN_BOUNDS(expressions, name) = std::make_pair(cpp2::move(expr), "");
             }
 
-#line 1438 "reflect.h2"
+#line 1443 "reflect.h2"
         }
     }
 
@@ -2078,7 +2083,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     }
 }
 
-#line 1456 "reflect.h2"
+#line 1461 "reflect.h2"
 [[nodiscard]] auto apply_metafunctions(
     declaration_node& n, 
     type_declaration& rtype, 
@@ -2184,7 +2189,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     return true; 
 }
 
-#line 1562 "reflect.h2"
+#line 1567 "reflect.h2"
 }
 
 }
diff --git a/source/reflect.h2 b/source/reflect.h2
index afa7c90240..e78aebbd39 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1414,10 +1414,15 @@ regex_gen: (inout t: meta::type_declaration) =
             }
 
             expr: std::string = m.initializer();
-            if !expr.is_escaped() {
+            if expr.starts_with("R\"(") && expr.ends_with(")\"") {
+                expr = expr.substr(3, expr.size() - 5);
+            }
+            else if expr.is_escaped() {
+                expr = expr.substr(1, expr.size() - 2);
+            }
+            else {
                 t.error("Unknown string format '(expr)$'");
             }
-            expr = expr.substr(1, expr.size() - 2);
 
             if name.ends_with(postfix) {
                 name = name.substr(0, name.size() - postfix.size());
diff --git a/source/regex.h2 b/source/regex.h2
index 7911565514..5cec1474f7 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1956,13 +1956,13 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
 line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
     if ctx..current() == '$' || (ctx..current() == '\\' && ctx..peek() == '$') {
         if (ctx..current() == '\\') { _ = ctx..next(); } // Skip escape
-        return shared.new("\\\\$", "line_end_token_matcher");
+        return shared.new("$", "line_end_token_matcher");
     }
     else if ctx..current() == '\\' && (ctx..peek() == 'z' || ctx..peek() == 'Z') {
         _ = ctx..next(); // Skip escape
 
         negate := ctx..current() == 'Z';
-        return shared.new("\\\\(ctx..current())$", "line_end_token_matcher");
+        return shared.new("\\(ctx..current())$", "line_end_token_matcher");
     }
     else {
         return nullptr;
@@ -2056,7 +2056,7 @@ named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
     _ = ctx..next(); // Skip escape
 
-    return shared.new("\\\\\\\\(ctx..current())$", "(name)$::match");
+    return shared.new("\\(ctx..current())$", "(name)$::match");
 }
 
 named_class_no_new_line:  type == class_token_matcher>;
@@ -2597,7 +2597,7 @@ regex_parser:  type = {
         source += "}\n";
 
         string := parse_ctx..get_tokens()*..to_string();
-        source += "  to_string: () -> std::string = { return \"(string)$\"; }\n";
+        source += "  to_string: () -> std::string = { return R\"((string)$)\"; }\n";
         source += "}\n";
 
         _ = parse_ctx;

From d02e1adbf9af85bd24cd6c08d302ab2715926cfc Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 26 Jun 2024 11:58:54 +0200
Subject: [PATCH 134/161] Escape adaptions for to_string and other to_string
 fixes.

---
 include/cpp2regex.h | 732 ++++++++++++++++++++++----------------------
 source/reflect.h    |  31 +-
 source/reflect.h2   |  21 +-
 source/regex.h2     |  72 +++--
 4 files changed, 427 insertions(+), 429 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 3b67127533..33b67f4559 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -101,53 +101,53 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 822 "regex.h2"
+#line 823 "regex.h2"
 class generation_function_context;
     
 
-#line 838 "regex.h2"
+#line 839 "regex.h2"
 class generation_context;
 
-#line 1014 "regex.h2"
+#line 1015 "regex.h2"
 class regex_token_list;
     
 
-#line 1046 "regex.h2"
+#line 1047 "regex.h2"
 class regex_token_base;
     
 
-#line 1060 "regex.h2"
+#line 1061 "regex.h2"
 class regex_token_check;
     
 
-#line 1075 "regex.h2"
+#line 1076 "regex.h2"
 class regex_token_code;
     
 
-#line 1091 "regex.h2"
+#line 1092 "regex.h2"
 class regex_token_empty;
     
 
-#line 1107 "regex.h2"
+#line 1108 "regex.h2"
 class alternative_token;
     
 
-#line 1125 "regex.h2"
+#line 1126 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1171 "regex.h2"
+#line 1172 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1197 "regex.h2"
+#line 1198 "regex.h2"
 class any_token;
     
 
-#line 1228 "regex.h2"
+#line 1229 "regex.h2"
 class char_token;
     
 
-#line 1356 "regex.h2"
+#line 1357 "regex.h2"
 class class_token;
     
 
@@ -162,28 +162,28 @@ class group_ref_token;
 class group_token;
     
 
-#line 2005 "regex.h2"
+#line 2006 "regex.h2"
 class lookahead_token;
     
 
-#line 2104 "regex.h2"
+#line 2105 "regex.h2"
 class range_token;
     
 
-#line 2247 "regex.h2"
+#line 2242 "regex.h2"
 template class range_token_matcher;
 
-#line 2372 "regex.h2"
+#line 2367 "regex.h2"
 class special_range_token;
     
 
-#line 2459 "regex.h2"
+#line 2454 "regex.h2"
 template class regular_expression;
 
-#line 2548 "regex.h2"
+#line 2543 "regex.h2"
 template class regex_parser;
 
-#line 2616 "regex.h2"
+#line 2628 "regex.h2"
 }
 }
 
@@ -627,28 +627,28 @@ class parse_context {
 
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 466 "regex.h2"
+#line 467 "regex.h2"
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 472 "regex.h2"
+#line 473 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 476 "regex.h2"
+#line 477 "regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 480 "regex.h2"
+#line 481 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 491 "regex.h2"
+#line 492 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 497 "regex.h2"
+#line 498 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 502 "regex.h2"
+#line 503 "regex.h2"
     // Position management functions
     //
 
@@ -658,87 +658,87 @@ class parse_context {
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 513 "regex.h2"
+#line 514 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 517 "regex.h2"
+#line 518 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 527 "regex.h2"
+#line 528 "regex.h2"
     public: [[nodiscard]] auto get_tokens() & -> token_ptr;
 
-#line 531 "regex.h2"
+#line 532 "regex.h2"
     // Group management
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 536 "regex.h2"
+#line 537 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 540 "regex.h2"
+#line 541 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 546 "regex.h2"
+#line 547 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 556 "regex.h2"
+#line 557 "regex.h2"
     public: [[nodiscard]] auto current() const& -> char;
 
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 568 "regex.h2"
+#line 569 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 581 "regex.h2"
+#line 582 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
 
-#line 590 "regex.h2"
+#line 591 "regex.h2"
     public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
 
-#line 602 "regex.h2"
+#line 603 "regex.h2"
     public: [[nodiscard]] static auto join(cpp2::impl::in> list) -> auto;
 
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 643 "regex.h2"
+#line 644 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 664 "regex.h2"
+#line 665 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 680 "regex.h2"
+#line 681 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 700 "regex.h2"
+#line 701 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 710 "regex.h2"
+#line 711 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 768 "regex.h2"
+#line 769 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 805 "regex.h2"
+#line 806 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 820 "regex.h2"
+#line 821 "regex.h2"
 };
 
 class generation_function_context {
@@ -747,10 +747,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 833 "regex.h2"
+#line 834 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 836 "regex.h2"
+#line 837 "regex.h2"
 };
 
 class generation_context {
@@ -767,84 +767,84 @@ class generation_context {
 
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 855 "regex.h2"
+#line 856 "regex.h2"
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 860 "regex.h2"
+#line 861 "regex.h2"
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void;
 
-#line 867 "regex.h2"
+#line 868 "regex.h2"
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 881 "regex.h2"
+#line 882 "regex.h2"
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 903 "regex.h2"
+#line 904 "regex.h2"
     public: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 907 "regex.h2"
+#line 908 "regex.h2"
     public: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 911 "regex.h2"
+#line 912 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 915 "regex.h2"
+#line 916 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 925 "regex.h2"
+#line 926 "regex.h2"
     public: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 931 "regex.h2"
+#line 932 "regex.h2"
     public: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 949 "regex.h2"
+#line 950 "regex.h2"
     public: auto end_func() & -> void;
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 957 "regex.h2"
+#line 958 "regex.h2"
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 963 "regex.h2"
+#line 964 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 969 "regex.h2"
+#line 970 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 975 "regex.h2"
+#line 976 "regex.h2"
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 983 "regex.h2"
+#line 984 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 991 "regex.h2"
+#line 992 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1012 "regex.h2"
+#line 1013 "regex.h2"
 };
 
 class regex_token_list: public regex_token {
 
-#line 1017 "regex.h2"
+#line 1018 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 1024 "regex.h2"
+#line 1025 "regex.h2"
     public: virtual auto generate_code(generation_context& ctx) const -> void;
 
-#line 1030 "regex.h2"
+#line 1031 "regex.h2"
     public: virtual auto add_groups(std::set& groups) const -> void;
 
-#line 1036 "regex.h2"
+#line 1037 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -852,36 +852,36 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 1043 "regex.h2"
+#line 1044 "regex.h2"
 };
 
-#line 1046 "regex.h2"
+#line 1047 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1049 "regex.h2"
+#line 1050 "regex.h2"
     public: explicit regex_token_base(cpp2::impl::in str);
 
-#line 1053 "regex.h2"
+#line 1054 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1057 "regex.h2"
+#line 1058 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1058 "regex.h2"
+#line 1059 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1063 "regex.h2"
+#line 1064 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 1070 "regex.h2"
+#line 1071 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -889,17 +889,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1073 "regex.h2"
+#line 1074 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1078 "regex.h2"
+#line 1079 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 1085 "regex.h2"
+#line 1086 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -907,16 +907,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1088 "regex.h2"
+#line 1089 "regex.h2"
 };
 
-#line 1091 "regex.h2"
+#line 1092 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1094 "regex.h2"
+#line 1095 "regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 1098 "regex.h2"
+#line 1099 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -924,7 +924,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1101 "regex.h2"
+#line 1102 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -933,12 +933,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1110 "regex.h2"
+#line 1111 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1120 "regex.h2"
+#line 1121 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -946,23 +946,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1123 "regex.h2"
+#line 1124 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1129 "regex.h2"
+#line 1130 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1136 "regex.h2"
+#line 1137 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1152 "regex.h2"
+#line 1153 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1158 "regex.h2"
+#line 1159 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -970,36 +970,36 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1169 "regex.h2"
+#line 1170 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1176 "regex.h2"
+#line 1177 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1193 "regex.h2"
+#line 1194 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1200 "regex.h2"
+#line 1201 "regex.h2"
     private: bool single_line; 
 
     public: explicit any_token(cpp2::impl::in single_line_);
 
-#line 1206 "regex.h2"
+#line 1207 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1212 "regex.h2"
+#line 1213 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1007,36 +1007,36 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1215 "regex.h2"
+#line 1216 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1228 "regex.h2"
+#line 1229 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1231 "regex.h2"
+#line 1232 "regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1240 "regex.h2"
+#line 1241 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1244 "regex.h2"
+#line 1245 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1266 "regex.h2"
+#line 1267 "regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1286 "regex.h2"
+#line 1287 "regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1303 "regex.h2"
+#line 1304 "regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1315 "regex.h2"
+#line 1316 "regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -1044,7 +1044,7 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1319 "regex.h2"
+#line 1320 "regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1084,14 +1084,14 @@ class char_token: public regex_token_base {
 //
 class class_token: public regex_token_base {
 
-#line 1359 "regex.h2"
+#line 1360 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1370 "regex.h2"
+#line 1371 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
@@ -1186,12 +1186,12 @@ class group_token: public regex_token {
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
 #line 1870 "regex.h2"
-    public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
+    public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
 #line 1887 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1905 "regex.h2"
+#line 1906 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1200,44 +1200,44 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1911 "regex.h2"
+#line 1912 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1954 "regex.h2"
+#line 1955 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1972 "regex.h2"
+#line 1973 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1984 "regex.h2"
+#line 1985 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1998 "regex.h2"
+#line 1999 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 2003 "regex.h2"
+#line 2004 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 2008 "regex.h2"
+#line 2009 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 2015 "regex.h2"
+#line 2016 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2021 "regex.h2"
+#line 2022 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1245,18 +1245,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 2024 "regex.h2"
+#line 2025 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 2035 "regex.h2"
+#line 2036 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2062 "regex.h2"
+#line 2063 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1270,17 +1270,17 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2076 "regex.h2"
+#line 2077 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2102 "regex.h2"
+#line 2103 "regex.h2"
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2107 "regex.h2"
+#line 2108 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1290,19 +1290,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2184 "regex.h2"
+#line 2185 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2195 "regex.h2"
+#line 2196 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2207 "regex.h2"
+#line 2208 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2231 "regex.h2"
+#line 2226 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2241 "regex.h2"
+#line 2236 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1310,46 +1310,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2245 "regex.h2"
+#line 2240 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2261 "regex.h2"
+#line 2256 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2266 "regex.h2"
+#line 2261 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2271 "regex.h2"
+#line 2266 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2277 "regex.h2"
+#line 2272 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2292 "regex.h2"
+#line 2287 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2320 "regex.h2"
+#line 2315 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2344 "regex.h2"
+#line 2339 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2368 "regex.h2"
+#line 2363 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2375 "regex.h2"
+#line 2370 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1358,7 +1358,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2404 "regex.h2"
+#line 2399 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1367,10 +1367,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2426 "regex.h2"
+#line 2421 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2451 "regex.h2"
+#line 2446 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1381,7 +1381,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 // Regular expression implementation
 template class regular_expression {
 
-#line 2462 "regex.h2"
+#line 2457 "regex.h2"
     public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     public: template using context = matcher::context;
 
@@ -1392,7 +1392,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_);
 
-#line 2475 "regex.h2"
+#line 2470 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1407,7 +1407,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2491 "regex.h2"
+#line 2486 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1415,13 +1415,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2503 "regex.h2"
+#line 2498 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2525 "regex.h2"
+#line 2520 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1433,7 +1433,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2538 "regex.h2"
+#line 2533 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1447,7 +1447,8 @@ template class regular_expression {
 template class regex_parser {
 
     private: std::string_view regex; 
-    private: std::string_view modifier; 
+    private: std::string modifier {""}; 
+    private: std::string modifier_escape {""}; 
     private: Error_out error_out; 
 
     private: size_t pos {0}; 
@@ -1455,28 +1456,31 @@ template class regex_parser {
 
     private: std::string source {""}; 
 
-    public: explicit regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e);
+    public: explicit regex_parser(cpp2::impl::in r, Error_out const& e);
 
-#line 2565 "regex.h2"
+#line 2560 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::impl::in message) & -> void;
 
-#line 2572 "regex.h2"
+#line 2567 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto parse() & -> std::string;
+
+#line 2606 "regex.h2"
+    private: auto extract_modifiers() & -> void;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2607 "regex.h2"
+#line 2619 "regex.h2"
 };
 
-template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string;
+template [[nodiscard]] auto generate_template(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2616 "regex.h2"
+#line 2628 "regex.h2"
 }
 }
 
@@ -1984,28 +1988,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         old_state.swap(cur_group_state);
+        cur_group_state.modifiers = old_state.modifiers;
 
         return old_state; 
     }
 
-#line 466 "regex.h2"
+#line 467 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
         auto inner {cur_group_state.get_tokens()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 472 "regex.h2"
+#line 473 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 476 "regex.h2"
+#line 477 "regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 483 "regex.h2"
+#line 484 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2014,36 +2019,36 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 491 "regex.h2"
+#line 492 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 497 "regex.h2"
+#line 498 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
-#line 505 "regex.h2"
+#line 506 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
 
-#line 507 "regex.h2"
+#line 508 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
 
-#line 509 "regex.h2"
+#line 510 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         cur_group_state.add(token);
     }
 
-#line 513 "regex.h2"
+#line 514 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(cur_group_state.empty()); 
     }
 
-#line 517 "regex.h2"
+#line 518 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2054,29 +2059,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 527 "regex.h2"
+#line 528 "regex.h2"
     [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
         return root; 
     }
 
-#line 532 "regex.h2"
+#line 533 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 536 "regex.h2"
+#line 537 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return cur_branch_reset_state.next(); 
     }
 
-#line 540 "regex.h2"
+#line 541 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 546 "regex.h2"
+#line 547 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {named_groups.find(name)}; 
         if (iter == named_groups.end()) {
@@ -2087,10 +2092,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 556 "regex.h2"
+#line 557 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 558 "regex.h2"
+#line 559 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != regex.size()) {
@@ -2101,14 +2106,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 568 "regex.h2"
-    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 569 "regex.h2"
-    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
 #line 570 "regex.h2"
+    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+#line 571 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 572 "regex.h2"
+#line 573 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2118,19 +2123,19 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 581 "regex.h2"
+#line 582 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
 
-#line 583 "regex.h2"
+#line 584 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && error_text.empty(); }
 
-#line 585 "regex.h2"
+#line 586 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         error_text = err;
         return nullptr; 
     }
 
-#line 590 "regex.h2"
+#line 591 "regex.h2"
     [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
         std::string r {""}; 
 
@@ -2143,10 +2148,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 602 "regex.h2"
+#line 603 "regex.h2"
     [[nodiscard]] auto parse_context::join(cpp2::impl::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
 
-#line 604 "regex.h2"
+#line 605 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2185,7 +2190,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 643 "regex.h2"
+#line 644 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto start {pos}; 
         auto end {pos}; 
@@ -2207,14 +2212,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 664 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
 #line 665 "regex.h2"
-    [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
+    [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
 #line 666 "regex.h2"
+    [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
+#line 667 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 668 "regex.h2"
+#line 669 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
             r.construct(regex.substr(pos, n));
@@ -2227,7 +2232,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 680 "regex.h2"
+#line 681 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2248,7 +2253,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(r.value()); 
     }
 
-#line 700 "regex.h2"
+#line 701 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,regex.size())) {
@@ -2259,12 +2264,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 710 "regex.h2"
-    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
 #line 711 "regex.h2"
+    [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
+#line 712 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 713 "regex.h2"
+#line 714 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2320,7 +2325,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 768 "regex.h2"
+#line 769 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2358,7 +2363,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 805 "regex.h2"
+#line 806 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2373,7 +2378,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 826 "regex.h2"
+#line 827 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2381,27 +2386,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 833 "regex.h2"
+#line 834 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
 
-#line 848 "regex.h2"
+#line 849 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 850 "regex.h2"
+#line 851 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 855 "regex.h2"
+#line 856 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n");
     }
 
-#line 860 "regex.h2"
+#line 861 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void{
         end_func_statefull(c);
 
@@ -2409,14 +2414,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(cpp2::move(name));
     }
 
-#line 867 "regex.h2"
+#line 868 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 873 "regex.h2"
+#line 874 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         (*cpp2::impl::assert_not_null(token)).generate_code((*this));
@@ -2425,7 +2430,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 881 "regex.h2"
+#line 882 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
@@ -2447,22 +2452,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(name) + "()"; 
     }
 
-#line 903 "regex.h2"
+#line 904 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &gen_stack.back(); 
     }
 
-#line 907 "regex.h2"
+#line 908 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 911 "regex.h2"
+#line 912 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 915 "regex.h2"
+#line 916 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2473,14 +2478,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 925 "regex.h2"
+#line 926 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 931 "regex.h2"
+#line 932 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
@@ -2499,38 +2504,38 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 949 "regex.h2"
+#line 950 "regex.h2"
     auto generation_context::end_func() & -> void{
         end_func_statefull("other(r.pos, ctx)");
     }
 
-#line 953 "regex.h2"
+#line 954 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 957 "regex.h2"
+#line 958 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 963 "regex.h2"
+#line 964 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 969 "regex.h2"
+#line 970 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 975 "regex.h2"
+#line 976 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2539,7 +2544,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 983 "regex.h2"
+#line 984 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2548,7 +2553,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         gen_stack.pop_back();
     }
 
-#line 991 "regex.h2"
+#line 992 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2571,29 +2576,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1019 "regex.h2"
+#line 1020 "regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 1022 "regex.h2"
+#line 1023 "regex.h2"
     }
 
-#line 1024 "regex.h2"
+#line 1025 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
         }
     }
 
-#line 1030 "regex.h2"
+#line 1031 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).add_groups(groups);
         }
     }
 
-#line 1036 "regex.h2"
+#line 1037 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -2604,74 +2609,74 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 1049 "regex.h2"
+#line 1050 "regex.h2"
     regex_token_base::regex_token_base(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 1051 "regex.h2"
+#line 1052 "regex.h2"
     }
 
-#line 1053 "regex.h2"
+#line 1054 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1055 "regex.h2"
+#line 1056 "regex.h2"
     }
 
-#line 1057 "regex.h2"
+#line 1058 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1065 "regex.h2"
+#line 1066 "regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1068 "regex.h2"
+#line 1069 "regex.h2"
     }
 
-#line 1070 "regex.h2"
+#line 1071 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(check + "(" + ctx.match_parameters() + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1080 "regex.h2"
+#line 1081 "regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1083 "regex.h2"
+#line 1084 "regex.h2"
     }
 
-#line 1085 "regex.h2"
+#line 1086 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         ctx.add(code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1094 "regex.h2"
+#line 1095 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token_base{ str }{
 
-#line 1096 "regex.h2"
+#line 1097 "regex.h2"
     }
 
-#line 1098 "regex.h2"
+#line 1099 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1110 "regex.h2"
+#line 1111 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1112 "regex.h2"
+#line 1113 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2680,22 +2685,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1120 "regex.h2"
+#line 1121 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1131 "regex.h2"
+#line 1132 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1134 "regex.h2"
+#line 1135 "regex.h2"
     }
 
-#line 1136 "regex.h2"
+#line 1137 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2712,14 +2717,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         ctx.add_statefull(next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1152 "regex.h2"
+#line 1153 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1158 "regex.h2"
+#line 1159 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2734,11 +2739,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1173 "regex.h2"
+#line 1174 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1176 "regex.h2"
+#line 1177 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2757,29 +2762,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1202 "regex.h2"
+#line 1203 "regex.h2"
     any_token::any_token(cpp2::impl::in single_line_)
         : regex_token_base{ "." }
         , single_line{ single_line_ }{
 
-#line 1204 "regex.h2"
+#line 1205 "regex.h2"
     }
 
-#line 1206 "regex.h2"
+#line 1207 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.get_modifiers().has(expression_flags::single_line)); 
     }
 
-#line 1212 "regex.h2"
+#line 1213 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("any_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1217 "regex.h2"
+#line 1218 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2791,21 +2796,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1234 "regex.h2"
+#line 1235 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token_base{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1238 "regex.h2"
+#line 1239 "regex.h2"
     }
 
-#line 1240 "regex.h2"
+#line 1241 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1244 "regex.h2"
+#line 1245 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             std::string upper {token}; 
@@ -2813,14 +2818,14 @@ template [[nodiscard]] auto any_token_matcher(
 {
 size_t i{0};
 
-#line 1249 "regex.h2"
+#line 1250 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1254 "regex.h2"
+#line 1255 "regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2833,7 +2838,7 @@ size_t i{0};
         }
     }
 
-#line 1266 "regex.h2"
+#line 1267 "regex.h2"
     auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         std::string lower_name {"lower_" + cpp2::to_string(name)}; 
@@ -2854,7 +2859,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1286 "regex.h2"
+#line 1287 "regex.h2"
     auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         auto size {token.size()}; 
@@ -2872,7 +2877,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1303 "regex.h2"
+#line 1304 "regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
         str = replace_all(str, "\\", "\\\\");
         str = replace_all(str, "\a", "\\a");
@@ -2885,7 +2890,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1315 "regex.h2"
+#line 1316 "regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2893,17 +2898,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1363 "regex.h2"
+#line 1364 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1368 "regex.h2"
+#line 1369 "regex.h2"
     }
 
-#line 1371 "regex.h2"
+#line 1372 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -3008,7 +3013,6 @@ size_t i{0};
 
         auto inner {ctx.join(cpp2::move(classes))}; 
         auto string_rep {ctx.get_range(cpp2::move(start_pos), cpp2::move(end_pos))}; 
-        string_rep = replace_all(string_rep, "\\", "\\\\");
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
@@ -3085,13 +3089,13 @@ size_t i{0};
         else {if ('\\' == ctx.current()) {t = '\\'; }
         else {                         }}}}}}}/* TODO: throw error */
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(t), false)}; 
-        (*cpp2::impl::assert_not_null(r)).set_string(("\\\\" + cpp2::to_string(ctx.current())));
+        (*cpp2::impl::assert_not_null(r)).set_string(("\\" + cpp2::to_string(ctx.current())));
 
         return r; 
     }else {
         // Escape of regex special char
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), false)}; 
-        (*cpp2::impl::assert_not_null(r)).set_string(("\\\\" + cpp2::to_string(ctx.current())));
+        (*cpp2::impl::assert_not_null(r)).set_string(("\\" + cpp2::to_string(ctx.current())));
 
         return r; 
     }
@@ -3103,7 +3107,7 @@ size_t i{0};
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
     static_cast(ctx.next());// Skip escape.
-    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\K", "ctx..set_group_start(0, r.pos);"); 
+    return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
 #line 1596 "regex.h2"
@@ -3119,7 +3123,7 @@ size_t i{0};
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
-        std::string str {"\\\\"}; 
+        std::string str {"\\"}; 
         std::string group {""}; 
 
         if ([_0 = '0', _1 = ctx.peek(), _2 = '9']{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) {
@@ -3359,7 +3363,7 @@ template [[nodiscard]] auto gr
             // regular group
 
             auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
-            if (cpp2::move(has_id)) {
+            if (has_id) {
                 (*cpp2::impl::assert_not_null(r)).number = ctx.next_group();
 
                 if (0 != group_name.size()) {
@@ -3371,7 +3375,7 @@ template [[nodiscard]] auto gr
             ctx.set_modifiers(cpp2::move(modifiers_change_to));
             if (!(ctx.parse_until(')'))) {return nullptr; }
             (*cpp2::impl::assert_not_null(r)).inner = ctx.end_group(cpp2::move(old_state));
-            (*cpp2::impl::assert_not_null(r)).set_string(gen_string(cpp2::move(group_name), cpp2::move(group_name_brackets), cpp2::move(modifiers), (*cpp2::impl::assert_not_null(r)).inner));
+            (*cpp2::impl::assert_not_null(r)).set_string(gen_string(cpp2::move(group_name), cpp2::move(group_name_brackets), !(cpp2::move(has_id)), cpp2::move(modifiers), (*cpp2::impl::assert_not_null(r)).inner));
 
             return r; 
         }
@@ -3384,7 +3388,7 @@ template [[nodiscard]] auto gr
     }
 
 #line 1870 "regex.h2"
-    [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
+    [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
             if (name_brackets) {
@@ -3394,7 +3398,7 @@ template [[nodiscard]] auto gr
                 start += ("?'" + cpp2::to_string(name.data()) + "'");
             }
         }
-        else {if (!(modifiers.empty())) {
+        else {if (has_modifier) {
             start += "?" + modifiers + ":";
         }}
 
@@ -3411,16 +3415,17 @@ template [[nodiscard]] auto gr
         if (-1 != number) {
             ctx.add(("ctx..set_group_end(" + cpp2::to_string(number) + ", r.pos);"));
             auto tmp_name {ctx.gen_temp()}; 
-            ctx.add((cpp2::to_string(tmp_name) + " :=  cpp2::regex::make_on_return(:() = {"));
+            ctx.add((cpp2::to_string(tmp_name) + "_func :=  :() = {"));
             ctx.add("  if !r&$*.matched {");
             ctx.add(("    ctx&$*..set_group_invalid(" + cpp2::to_string(number) + ");"));
             ctx.add("  }");
-            ctx.add("});");
+            ctx.add("};");
+            ctx.add((cpp2::to_string(tmp_name) + " :=  cpp2::regex::make_on_return(" + cpp2::to_string(tmp_name) + "_func);"));
             ctx.add(("_ = " + cpp2::to_string(cpp2::move(tmp_name)) + ";"));// TODO: Guard object problem.
         }
     }
 
-#line 1905 "regex.h2"
+#line 1906 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3430,7 +3435,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1915 "regex.h2"
+#line 1916 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3463,14 +3468,14 @@ template [[nodiscard]] auto gr
     if (cpp2::move(has_brackets)) {
         syntax = { "{" + cpp2::to_string(syntax) + "}" };
     }
-    syntax = { "\\\\x" + cpp2::to_string(syntax) };
+    syntax = { "\\x" + cpp2::to_string(syntax) };
 
     auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
     (*cpp2::impl::assert_not_null(r)).set_string(cpp2::move(syntax));
     return r; 
 }
 
-#line 1956 "regex.h2"
+#line 1957 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3487,7 +3492,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1972 "regex.h2"
+#line 1973 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3500,48 +3505,48 @@ template [[
     }}
 }
 
-#line 1986 "regex.h2"
+#line 1987 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
     if (ctx.current() == '\\') {
         static_cast(ctx.next());
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\A", "line_start_token_matcher"); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\A", "line_start_token_matcher"); 
     }
     else {
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "^", ("line_start_token_matcher")); 
     }
 }
 
-#line 1998 "regex.h2"
+#line 1999 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 2011 "regex.h2"
+#line 2012 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 2013 "regex.h2"
+#line 2014 "regex.h2"
     }
 
-#line 2015 "regex.h2"
+#line 2016 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 2021 "regex.h2"
+#line 2022 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 2026 "regex.h2"
+#line 2027 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3551,7 +3556,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2038 "regex.h2"
+#line 2039 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3576,7 +3581,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2078 "regex.h2"
+#line 2079 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3601,11 +3606,11 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2112 "regex.h2"
+#line 2113 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2114 "regex.h2"
+#line 2115 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3649,7 +3654,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2158 "regex.h2"
+#line 2159 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3676,7 +3681,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2184 "regex.h2"
+#line 2185 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3688,7 +3693,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2195 "regex.h2"
+#line 2196 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3701,7 +3706,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2207 "regex.h2"
+#line 2208 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3717,16 +3722,10 @@ template [[nodiscard]] auto lookahead_token_match
             r += ("{" + cpp2::to_string(min_count) + "," + cpp2::to_string(max_count) + "}");
         }}}
 
-        if (kind == range_flags::not_greedy) {
-            r += "?";
-        }
-        else {if (kind == range_flags::possessive) {
-            r += "+";
-        }}
         return r; 
     }
 
-#line 2231 "regex.h2"
+#line 2226 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3737,14 +3736,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2241 "regex.h2"
+#line 2236 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2249 "regex.h2"
+#line 2244 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3757,26 +3756,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2261 "regex.h2"
+#line 2256 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2266 "regex.h2"
+#line 2261 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2271 "regex.h2"
+#line 2266 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2277 "regex.h2"
+#line 2272 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3792,7 +3791,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2292 "regex.h2"
+#line 2287 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3821,7 +3820,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2320 "regex.h2"
+#line 2315 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3846,7 +3845,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2344 "regex.h2"
+#line 2339 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3872,7 +3871,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2375 "regex.h2"
+#line 2370 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3895,7 +3894,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2398 "regex.h2"
+#line 2393 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3905,24 +3904,24 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2410 "regex.h2"
+#line 2405 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
     if (ctx.peek() == 'b') {
         static_cast(ctx.next());
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\b", "word_boundary_token_matcher"); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\b", "word_boundary_token_matcher"); 
     }
     else {if (ctx.peek() == 'B') {
         static_cast(ctx.next());
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\\\B", "word_boundary_token_matcher"); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\B", "word_boundary_token_matcher"); 
     }
     else {
         return nullptr; 
     }}
 }
 
-#line 2426 "regex.h2"
+#line 2421 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3947,31 +3946,31 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2470 "regex.h2"
+#line 2465 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2473 "regex.h2"
+#line 2468 "regex.h2"
         }
 
-#line 2475 "regex.h2"
+#line 2470 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2476 "regex.h2"
+#line 2471 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2477 "regex.h2"
+#line 2472 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2478 "regex.h2"
+#line 2473 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2480 "regex.h2"
+#line 2475 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2481 "regex.h2"
+#line 2476 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2482 "regex.h2"
+#line 2477 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2484 "regex.h2"
+#line 2479 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3980,13 +3979,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2493 "regex.h2"
+#line 2488 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2494 "regex.h2"
+#line 2489 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2495 "regex.h2"
+#line 2490 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2496 "regex.h2"
+#line 2491 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3994,13 +3993,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
     }
 
-#line 2503 "regex.h2"
+#line 2498 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2504 "regex.h2"
+#line 2499 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2505 "regex.h2"
+#line 2500 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2506 "regex.h2"
+#line 2501 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4020,10 +4019,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(cpp2::move(matched), cpp2::move(ctx)); 
     }
 
-#line 2525 "regex.h2"
+#line 2520 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2530 "regex.h2"
+#line 2525 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -4033,26 +4032,28 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2559 "regex.h2"
-    template  regex_parser::regex_parser(cpp2::impl::in r, cpp2::impl::in m, Error_out const& e)
+#line 2555 "regex.h2"
+    template  regex_parser::regex_parser(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
-        , modifier{ m }
         , error_out{ e }{
 
-#line 2563 "regex.h2"
+#line 2558 "regex.h2"
     }
 
-#line 2567 "regex.h2"
+#line 2562 "regex.h2"
     template  auto regex_parser::error(cpp2::impl::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2575 "regex.h2"
+#line 2570 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
+
+        // Extract modifiers and adapt regex.
+        extract_modifiers();
+
         parse_context parse_ctx {regex}; 
-        std::string mod {modifier}; 
-        if (!(parse_ctx.parse(cpp2::move(mod)))) {
+        if (!(parse_ctx.parse(modifier))) {
             error(parse_ctx.error_text);
             return "Error"; 
         }
@@ -4074,7 +4075,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         source += "}\n";
 
         auto string {(*cpp2::impl::assert_not_null(parse_ctx.get_tokens())).to_string()}; 
-        source += ("  to_string: () -> std::string = { return R\"(" + cpp2::to_string(cpp2::move(string)) + ")\"; }\n");
+        source += ("  to_string: () -> std::string = { return R\"(" + cpp2::to_string(modifier_escape) + cpp2::to_string(cpp2::move(string)) + cpp2::to_string(modifier_escape) + cpp2::to_string(modifier) + ")\"; }\n");
         source += "}\n";
 
         static_cast(cpp2::move(parse_ctx));
@@ -4082,9 +4083,24 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2609 "regex.h2"
-template [[nodiscard]] auto generate_template(cpp2::impl::in regex, cpp2::impl::in modifier, Err const& err) -> std::string{
-    regex_parser parser {regex, modifier, err}; 
+#line 2606 "regex.h2"
+    template  auto regex_parser::extract_modifiers() & -> void{
+        if (regex.find_first_of("'/") == 0) {
+            char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
+
+            auto end_pos {regex.rfind(mod_token)}; 
+            if (end_pos != 0) {
+                // Found valid start end escape
+                modifier = regex.substr(end_pos + 1);
+                modifier_escape = cpp2::move(mod_token);
+                regex = regex.substr(1, cpp2::move(end_pos) - 1);
+            }
+        }
+    }
+
+#line 2621 "regex.h2"
+template [[nodiscard]] auto generate_template(cpp2::impl::in regex, Err const& err) -> std::string{
+    regex_parser parser {regex, err}; 
     auto r {parser.parse()}; 
     static_cast(cpp2::move(parser));
     return r; 
diff --git a/source/reflect.h b/source/reflect.h
index cc8b0f440e..736d3334e9 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -39,7 +39,7 @@ class alias_declaration;
 #line 966 "reflect.h2"
 class value_member_info;
 
-#line 1567 "reflect.h2"
+#line 1552 "reflect.h2"
 }
 
 }
@@ -781,7 +781,7 @@ auto print(cpp2::impl::in t) -> void;
 //
 auto regex_gen(meta::type_declaration& t) -> void;
 
-#line 1457 "reflect.h2"
+#line 1442 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  apply_metafunctions
@@ -792,7 +792,7 @@ auto regex_gen(meta::type_declaration& t) -> void;
     auto const& error
     ) -> bool;
 
-#line 1567 "reflect.h2"
+#line 1552 "reflect.h2"
 }
 
 }
@@ -2023,7 +2023,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     auto prefix {"regex"}; 
     std::string postfix {"_mod"};   // TODO: Remove mod syntax when 'm.initializer()' can be '("pat", "mod")'.
 
-    std::map> expressions {}; 
+    std::map expressions {}; 
 
     for ( auto& m : CPP2_UFCS(get_member_objects)(t) ) 
     {
@@ -2054,36 +2054,21 @@ auto regex_gen(meta::type_declaration& t) -> void
                 CPP2_UFCS(error)(t, ("Unknown string format '" + cpp2::to_string(expr) + "'"));
             }}
 
-            if (CPP2_UFCS(ends_with)(name, postfix)) {
-                name = CPP2_UFCS(substr)(name, 0, CPP2_UFCS(size)(name) - CPP2_UFCS(size)(postfix));
-
-                if (CPP2_UFCS(contains)(expressions, name)) {
-                    CPP2_ASSERT_IN_BOUNDS(expressions, name).second = cpp2::move(expr);
-                }
-                else {
-                    CPP2_UFCS(error)(t, "Expression modifier defined without expression.");
-                }
-
-            }
-            else {
-                CPP2_ASSERT_IN_BOUNDS(expressions, name) = std::make_pair(cpp2::move(expr), "");
-            }
-
-#line 1443 "reflect.h2"
+            CPP2_ASSERT_IN_BOUNDS(expressions, name) = cpp2::move(expr);
         }
     }
 
     CPP2_UFCS(remove_marked_members)(t);
 
     for ( auto const& expr : cpp2::move(expressions) ) {
-        auto regular_expression {::cpp2::regex::generate_template(expr.second.first, expr.second.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
+        auto regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
 
         CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(cpp2::move(regular_expression))));
         CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression = ();"));
     }
 }
 
-#line 1461 "reflect.h2"
+#line 1446 "reflect.h2"
 [[nodiscard]] auto apply_metafunctions(
     declaration_node& n, 
     type_declaration& rtype, 
@@ -2189,7 +2174,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     return true; 
 }
 
-#line 1567 "reflect.h2"
+#line 1552 "reflect.h2"
 }
 
 }
diff --git a/source/reflect.h2 b/source/reflect.h2
index e78aebbd39..31a943c0e3 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1393,7 +1393,7 @@ regex_gen: (inout t: meta::type_declaration) =
     prefix:= "regex";
     postfix: std::string = "_mod";  // TODO: Remove mod syntax when 'm.initializer()' can be '("pat", "mod")'.
 
-    expressions: std::map> = ();
+    expressions: std::map = ();
 
     for t.get_member_objects() do (inout m)
     {
@@ -1424,29 +1424,14 @@ regex_gen: (inout t: meta::type_declaration) =
                 t.error("Unknown string format '(expr)$'");
             }
 
-            if name.ends_with(postfix) {
-                name = name.substr(0, name.size() - postfix.size());
-
-                if expressions.contains(name) {
-                    expressions[name].second = expr;
-                }
-                else {
-                    t.error("Expression modifier defined without expression.");
-                }
-
-            }
-            else {
-                expressions[name] = std::make_pair(expr, "");
-            }
-
-
+            expressions[name] = expr;
         }
     }
 
     t.remove_marked_members();
 
     for expressions do (expr) {
-        regular_expression:= ::cpp2::regex::generate_template(expr.second.first, expr.second.second, :(message: _) = t$.error(message););
+        regular_expression:= ::cpp2::regex::generate_template(expr.second, :(message: _) = t$.error(message););
 
         t.add_member("public (expr.first)$_matcher: type = (regular_expression)$");
         t.add_member("public (expr.first)$: cpp2::regex::regular_expression = ();");
diff --git a/source/regex.h2 b/source/regex.h2
index 5cec1474f7..21ff347faf 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -459,6 +459,7 @@ parse_context: type = {
     start_group: (inout this) -> parse_context_group_state = {
         old_state: parse_context_group_state = ();
         old_state..swap(cur_group_state);
+        cur_group_state.modifiers = old_state.modifiers;
 
         return old_state;
     }
@@ -1472,7 +1473,6 @@ class_token: @polymorphic_base type = {
 
         inner := ctx..join(classes);
         string_rep := ctx..get_range(start_pos, end_pos);
-        string_rep = replace_all(string_rep, "\\", "\\\\");
         return shared.new(is_negate, ctx..get_modifiers()..has(expression_flags::case_insensitive), inner, string_rep);
     }
 
@@ -1559,13 +1559,13 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
         else if '\\' == ctx..current() { t = '\\'; }
         else { /* TODO: throw error */ }
         r: = shared.new(t, false);
-        r*..set_string("\\\\(ctx..current())$");
+        r*..set_string("\\(ctx..current())$");
 
         return r;
     } else {
         // Escape of regex special char
         r := shared.new(ctx..current(), false);
-        r*..set_string("\\\\(ctx..current())$");
+        r*..set_string("\\(ctx..current())$");
 
         return r;
     }
@@ -1578,7 +1578,7 @@ global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = {
     if !(ctx..current() == '\\' && ctx..peek() == 'K') { return nullptr; }
 
     _ = ctx..next(); // Skip escape.
-    return shared.new("\\\\K", "ctx..set_group_start(0, r.pos);");
+    return shared.new("\\K", "ctx..set_group_start(0, r.pos);");
 }
 
 // Regex syntax: \  Example: \1
@@ -1602,7 +1602,7 @@ group_ref_token: @polymorphic_base type = {
     parse: (inout ctx: parse_context) -> token_ptr = {
         if ctx..current() != '\\' { return nullptr; }
 
-        str : std::string = "\\\\";
+        str : std::string = "\\";
         group : std::string = "";
 
         if '0' <= ctx..peek() <= '9' {
@@ -1855,7 +1855,7 @@ group_token: @polymorphic_base type = {
             ctx..set_modifiers(modifiers_change_to);
             if !ctx..parse_until(')') { return nullptr; }
             r*.inner = ctx..end_group(old_state);
-            r*..set_string(gen_string(group_name, group_name_brackets, modifiers, r*.inner));
+            r*..set_string(gen_string(group_name, group_name_brackets, !has_id, modifiers, r*.inner));
 
             return r;
         }
@@ -1867,7 +1867,7 @@ group_token: @polymorphic_base type = {
         }
     }
 
-    gen_string: (name: std::string, name_brackets: bool, modifiers: std::string, inner_: token_ptr) -> std::string = {
+    gen_string: (name: std::string, name_brackets: bool, has_modifier: bool, modifiers: std::string, inner_: token_ptr) -> std::string = {
         start : std::string = "(";
         if 0 != name..size() {
             if name_brackets {
@@ -1877,7 +1877,7 @@ group_token: @polymorphic_base type = {
                 start += "?'(name..data())$'";
             }
         }
-        else if ! modifiers..empty() {
+        else if has_modifier {
             start += "?" + modifiers + ":";
         }
 
@@ -1893,11 +1893,12 @@ group_token: @polymorphic_base type = {
         if -1 != number {
             ctx..add("ctx..set_group_end((number)$, r.pos);");
             tmp_name := ctx..gen_temp();
-            ctx..add("(tmp_name)$ :=  cpp2::regex::make_on_return(:() = {");
+            ctx..add("(tmp_name)$_func :=  :() = {");
             ctx..add("  if !r&$*.matched {");
             ctx..add("    ctx&$*..set_group_invalid((number)$);");
             ctx..add("  }");
-            ctx..add("});");
+            ctx..add("};");
+            ctx..add("(tmp_name)$ :=  cpp2::regex::make_on_return((tmp_name)$_func);");
             ctx..add("_ = (tmp_name)$;"); // TODO: Guard object problem.
         }
     }
@@ -1944,7 +1945,7 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     if has_brackets {
         syntax = "{(syntax)$}";
     }
-    syntax = "\\\\x(syntax)$";
+    syntax = "\\x(syntax)$";
 
     r := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
     r*..set_string(syntax);
@@ -1988,7 +1989,7 @@ line_start_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
     if ctx..current() == '\\' {
         _ = ctx..next();
-        return shared.new("\\\\A", "line_start_token_matcher");
+        return shared.new("\\A", "line_start_token_matcher");
     }
     else {
         return shared.new("^", "line_start_token_matcher");
@@ -2219,12 +2220,6 @@ range_token: @polymorphic_base type = {
             r += "{(min_count)$,(max_count)$}";
         }
 
-        if kind == range_flags::not_greedy {
-            r += "?";
-        }
-        else if kind == range_flags::possessive {
-            r += "+";
-        }
         return r;
     }
 
@@ -2412,11 +2407,11 @@ word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
     if ctx..peek() == 'b' {
         _ = ctx..next();
-        return shared.new("\\\\b", "word_boundary_token_matcher");
+        return shared.new("\\b", "word_boundary_token_matcher");
     }
     else if ctx..peek() == 'B' {
         _ = ctx..next();
-        return shared.new("\\\\B", "word_boundary_token_matcher");
+        return shared.new("\\B", "word_boundary_token_matcher");
     }
     else {
         return nullptr;
@@ -2547,18 +2542,18 @@ regular_expression:  type = {
 // Parser and generator for regular expressions.
 regex_parser:  type = {
 
-    regex:     std::string_view;
-    modifier:  std::string_view;
-    error_out: Error_out;
+    regex:           std::string_view;
+    modifier:        std::string = "";
+    modifier_escape: std::string = "";
+    error_out:       Error_out;
 
     pos:                    size_t = 0;
     has_error:              bool = false;
 
     source: std::string = "";
 
-    operator=: (out this, r: std::string_view, m: std::string_view, e: Error_out) = {
+    operator=: (out this, r: std::string_view, e: Error_out) = {
         this.regex = r;
-        this.modifier = m;
         this.error_out = e;
     }
 
@@ -2573,9 +2568,12 @@ regex_parser:  type = {
     //
 
     parse:(inout this) -> std::string = {
+
+        // Extract modifiers and adapt regex.
+        extract_modifiers();
+
         parse_ctx: parse_context = (regex);
-        mod : std::string = modifier;
-        if !parse_ctx..parse(mod) {
+        if !parse_ctx..parse(modifier) {
             error(parse_ctx.error_text);
             return "Error";
         }
@@ -2597,17 +2595,31 @@ regex_parser:  type = {
         source += "}\n";
 
         string := parse_ctx..get_tokens()*..to_string();
-        source += "  to_string: () -> std::string = { return R\"((string)$)\"; }\n";
+        source += "  to_string: () -> std::string = { return R\"((modifier_escape)$(string)$(modifier_escape)$(modifier)$)\"; }\n";
         source += "}\n";
 
         _ = parse_ctx;
 
         return source;
     }
+
+    private extract_modifiers: (inout this) = {
+        if regex..find_first_of("'/") == 0 {
+            mod_token: char = regex[0];
+
+            end_pos := regex..rfind(mod_token);
+            if end_pos != 0 {
+                // Found valid start end escape
+                modifier = regex..substr(end_pos + 1);
+                modifier_escape = mod_token;
+                regex = regex..substr(1, end_pos - 1);
+            }
+        }
+    }
 }
 
-generate_template:  (regex: std::string_view, modifier: std::string_view, err: Err) -> std::string = {
-    parser: regex_parser = (regex, modifier, err);
+generate_template:  (regex: std::string_view, err: Err) -> std::string = {
+    parser: regex_parser = (regex, err);
     r := parser..parse();
     _ = parser;
     return r;

From 302e4b099039b245ed65619fd1ff65438f98ac8c Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 27 Jun 2024 09:10:16 +0200
Subject: [PATCH 135/161] General refactor.

---
 include/cpp2regex.h   | 1773 +++++++++++++++++++----------------------
 include/string_util.h |   13 +
 source/regex.h2       |  531 ++++++------
 3 files changed, 1104 insertions(+), 1213 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 33b67f4559..e4e9c9bdb8 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -19,171 +19,155 @@ namespace regex {
 class expression_flags;
     
 
-#line 47 "regex.h2"
-class range_flags;
-    
-
-#line 53 "regex.h2"
+#line 46 "regex.h2"
 template class match_group;
     
 
-#line 60 "regex.h2"
+#line 55 "regex.h2"
 template class match_return;
     
 
-#line 65 "regex.h2"
+#line 62 "regex.h2"
 template class match_context;
 
-#line 143 "regex.h2"
-template class matcher_list;
+#line 124 "regex.h2"
+class true_end_func;
     
 
-#line 160 "regex.h2"
-class true_end_func;
+#line 130 "regex.h2"
+class no_reset;
     
 
-#line 173 "regex.h2"
+#line 135 "regex.h2"
+template class on_return;
+
+#line 160 "regex.h2"
 template class single_class_entry;
 
-#line 181 "regex.h2"
+#line 168 "regex.h2"
 template class range_class_entry;
 
-#line 189 "regex.h2"
+#line 176 "regex.h2"
 template class combined_class_entry;
     
 
-#line 196 "regex.h2"
+#line 183 "regex.h2"
 template class list_class_entry;
     
 
-#line 203 "regex.h2"
+#line 190 "regex.h2"
 template class named_class_entry;
     
 
-#line 208 "regex.h2"
+#line 195 "regex.h2"
 template class negated_class_entry;
     
 
-#line 215 "regex.h2"
+#line 202 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 267 "regex.h2"
-template class empty_matcher_logic;
-    
-
-#line 276 "regex.h2"
-template class extract_position_helper;
-    
-
-#line 292 "regex.h2"
-template class special_syntax_wrapper;
-    
+#line 254 "regex.h2"
+class regex_token;
 
-#line 305 "regex.h2"
-class no_reset;
+#line 277 "regex.h2"
+class regex_token_list;
     
 
-#line 309 "regex.h2"
-template class on_return;
-
-#line 324 "regex.h2"
-class regex_token;
-
-#line 348 "regex.h2"
+#line 317 "regex.h2"
 class parse_context_group_state;
 
-#line 404 "regex.h2"
+#line 378 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 437 "regex.h2"
+#line 419 "regex.h2"
 class parse_context;
     
 
-#line 823 "regex.h2"
+#line 800 "regex.h2"
 class generation_function_context;
     
 
-#line 839 "regex.h2"
+#line 817 "regex.h2"
 class generation_context;
 
 #line 1015 "regex.h2"
-class regex_token_list;
-    
-
-#line 1047 "regex.h2"
 class regex_token_base;
     
 
-#line 1061 "regex.h2"
+#line 1029 "regex.h2"
 class regex_token_check;
     
 
-#line 1076 "regex.h2"
+#line 1044 "regex.h2"
 class regex_token_code;
     
 
-#line 1092 "regex.h2"
+#line 1060 "regex.h2"
 class regex_token_empty;
     
 
-#line 1108 "regex.h2"
+#line 1076 "regex.h2"
 class alternative_token;
     
 
-#line 1126 "regex.h2"
+#line 1094 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1172 "regex.h2"
+#line 1140 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1198 "regex.h2"
+#line 1166 "regex.h2"
 class any_token;
     
 
-#line 1229 "regex.h2"
+#line 1197 "regex.h2"
 class char_token;
     
 
-#line 1357 "regex.h2"
+#line 1325 "regex.h2"
 class class_token;
     
 
-#line 1492 "regex.h2"
+#line 1460 "regex.h2"
 template class class_token_matcher;
 
-#line 1590 "regex.h2"
+#line 1558 "regex.h2"
 class group_ref_token;
     
 
-#line 1724 "regex.h2"
+#line 1692 "regex.h2"
 class group_token;
     
 
-#line 2006 "regex.h2"
+#line 1974 "regex.h2"
 class lookahead_token;
     
 
-#line 2105 "regex.h2"
+#line 2076 "regex.h2"
+class range_flags;
+    
+
+#line 2084 "regex.h2"
 class range_token;
     
 
-#line 2242 "regex.h2"
+#line 2221 "regex.h2"
 template class range_token_matcher;
 
-#line 2367 "regex.h2"
+#line 2346 "regex.h2"
 class special_range_token;
     
 
-#line 2454 "regex.h2"
+#line 2433 "regex.h2"
 template class regular_expression;
 
-#line 2543 "regex.h2"
+#line 2522 "regex.h2"
 template class regex_parser;
 
-#line 2628 "regex.h2"
+#line 2607 "regex.h2"
 }
 }
 
@@ -214,8 +198,6 @@ namespace cpp2 {
 
 namespace regex {
 
-bool inline constexpr greedy_alternative{ false };
-
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
@@ -252,18 +234,7 @@ public: [[nodiscard]] auto to_string() const& -> std::string;
 #line 42 "regex.h2"
 };
 
-#line 47 "regex.h2"
-class range_flags {
-    public: static const int not_greedy;
-    public: static const int greedy;
-    public: static const int possessive;
-
-    public: range_flags() = default;
-    public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(range_flags const&) -> void = delete;
-};
-#line 52 "regex.h2"
-
+#line 46 "regex.h2"
 template class match_group {
     public: Iter start {}; 
     public: Iter end {}; 
@@ -271,11 +242,13 @@ template class match_group {
     public: bool matched {false}; 
 };
 
+#line 55 "regex.h2"
 template class match_return {
     public: bool matched {false}; 
     public: Iter pos {}; 
 };
 
+#line 62 "regex.h2"
 template class match_context
  {
     public: Iter begin; 
@@ -285,75 +258,76 @@ template class match_context
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     public: match_context(match_context const& that);
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-#line 81 "regex.h2"
+#line 78 "regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
-    public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
+    public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 89 "regex.h2"
+#line 86 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 95 "regex.h2"
-    public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
+#line 92 "regex.h2"
+    public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 102 "regex.h2"
+#line 99 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 107 "regex.h2"
+#line 104 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 111 "regex.h2"
+#line 108 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 115 "regex.h2"
+#line 112 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-#line 119 "regex.h2"
-    public: [[nodiscard]] auto print_ranges() const& -> bstring;
-
-#line 133 "regex.h2"
+#line 117 "regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> auto;
 
 };
 
-#line 143 "regex.h2"
-template class matcher_list {
-    public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
+#line 124 "regex.h2"
+class true_end_func {
+    public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
+};
 
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto;
+#line 130 "regex.h2"
+class no_reset {
+    public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
+};
 
-#line 149 "regex.h2"
-    private: template [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
+#line 135 "regex.h2"
+template class on_return {
 
-    private: [[nodiscard]] static auto match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto;
+    private: Func func; 
 
-    public: static auto reset_ranges(auto& ctx) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
+    public: explicit on_return(Func const& f);
+#line 139 "regex.h2"
+    public: auto operator=(Func const& f) -> on_return& ;
+
+#line 143 "regex.h2"
+    public: ~on_return() noexcept;
+    public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(on_return const&) -> void = delete;
 
-    public: template [[nodiscard]] static auto prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto;
-    public: matcher_list() = default;
-    public: matcher_list(matcher_list const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(matcher_list const&) -> void = delete;
 
-#line 157 "regex.h2"
+#line 146 "regex.h2"
 };
 
-template using no_tail = matcher_list;
-class true_end_func {
-    public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
-};
+#line 149 "regex.h2"
+template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
 
-#line 173 "regex.h2"
+#line 160 "regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -362,10 +336,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 177 "regex.h2"
+#line 164 "regex.h2"
 };
 
-#line 181 "regex.h2"
+#line 168 "regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -374,10 +348,10 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 185 "regex.h2"
+#line 172 "regex.h2"
 };
 
-#line 189 "regex.h2"
+#line 176 "regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -385,10 +359,10 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 192 "regex.h2"
+#line 179 "regex.h2"
 };
 
-#line 196 "regex.h2"
+#line 183 "regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -396,10 +370,10 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 199 "regex.h2"
+#line 186 "regex.h2"
 };
 
-#line 203 "regex.h2"
+#line 190 "regex.h2"
 template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -407,7 +381,7 @@ template class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 206 "regex.h2"
+#line 193 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -417,10 +391,10 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 211 "regex.h2"
+#line 198 "regex.h2"
 };
 
-#line 215 "regex.h2"
+#line 202 "regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -428,15 +402,15 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 218 "regex.h2"
+#line 205 "regex.h2"
 };
 
-#line 223 "regex.h2"
+#line 210 "regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 229 "regex.h2"
+#line 216 "regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -451,94 +425,34 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 245 "regex.h2"
+#line 232 "regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 252 "regex.h2"
+#line 239 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 267 "regex.h2"
-template class empty_matcher_logic {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: empty_matcher_logic() = default;
-    public: empty_matcher_logic(empty_matcher_logic const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(empty_matcher_logic const&) -> void = delete;
-
-#line 271 "regex.h2"
-};
-
-#line 276 "regex.h2"
-template class extract_position_helper {
-    public: template [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto;
-
-#line 285 "regex.h2"
-    public: static auto reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void;
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: extract_position_helper() = default;
-    public: extract_position_helper(extract_position_helper const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(extract_position_helper const&) -> void = delete;
-
-#line 287 "regex.h2"
-};
-
-#line 292 "regex.h2"
-template class special_syntax_wrapper: public base {
-
-    public: [[nodiscard]] static auto to_string() -> auto;
-    public: special_syntax_wrapper() = default;
-    public: special_syntax_wrapper(special_syntax_wrapper const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(special_syntax_wrapper const&) -> void = delete;
-
-#line 295 "regex.h2"
-};
-
-#line 305 "regex.h2"
-class no_reset {
-    public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
-};
-
-template class on_return {
-
-    private: Func func; 
-
-    public: explicit on_return(Func const& f);
-#line 313 "regex.h2"
-    public: auto operator=(Func const& f) -> on_return& ;
-
-#line 317 "regex.h2"
-    public: ~on_return() noexcept;
-    public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(on_return const&) -> void = delete;
-
-
-#line 320 "regex.h2"
-};
-
-template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
-
+#line 254 "regex.h2"
 class regex_token {
 
     public: std::string string_rep; 
 
     public: explicit regex_token(cpp2::impl::in str);
 
-#line 332 "regex.h2"
+#line 262 "regex.h2"
     public: explicit regex_token();
 
-#line 337 "regex.h2"
+#line 267 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
-    public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void = 0;
+    public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void;
     public: [[nodiscard]] auto to_string() const& -> std::string;
     public: auto set_string(cpp2::impl::in s) & -> void;
     public: virtual ~regex_token() noexcept;
@@ -546,342 +460,394 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 342 "regex.h2"
+#line 272 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
 using token_vec = std::vector;
 
-// State of the current group. See '()'
-class parse_context_group_state {
+class regex_token_list: public regex_token {
+
+#line 280 "regex.h2"
+    public: token_vec tokens; 
+
+    public: explicit regex_token_list(cpp2::impl::in t);
+
+#line 287 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
 
-    // Current list of matchers
-    public: token_vec cur_match_list {}; 
+#line 293 "regex.h2"
+    public: auto add_groups(std::set& groups) const -> void override;
+
+#line 299 "regex.h2"
+    public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
+    public: virtual ~regex_token_list() noexcept;
+
+    public: regex_token_list(regex_token_list const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_list const&) -> void = delete;
+
+
+#line 306 "regex.h2"
+};
+
+//-----------------------------------------------------------------------
+//
+// Parse and generation context.
+//
+//-----------------------------------------------------------------------
+//
 
-    // List of alternate matcher lists. E.g. ab|cd|xy
-    public: token_vec alternate_match_lists {}; 
+// State of the current capturing group. See '()'
+//
+class parse_context_group_state {
 
-    public: expression_flags modifiers {}; 
+#line 320 "regex.h2"
+    public: token_vec cur_match_list {};           // Current list of matchers.
+    public: token_vec alternate_match_lists {};    // List of alternate matcher lists. E.g. ab|cd|xy.
+    public: expression_flags modifiers {};         // Current modifiers for the group/regular expression.
 
+    // Start a new alternative.
     public: auto next_alternative() & -> void;
 
-#line 365 "regex.h2"
+#line 332 "regex.h2"
+    // Swap this state with the other one.
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 371 "regex.h2"
-    public: [[nodiscard]] auto get_tokens() & -> token_ptr;
+#line 339 "regex.h2"
+    // Convert this state into a regex token.
+    public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 382 "regex.h2"
+#line 351 "regex.h2"
+    // Add a token to the current matcher list.
     public: auto add(cpp2::impl::in token) & -> void;
 
-#line 386 "regex.h2"
+#line 356 "regex.h2"
+    // True if current matcher list is empty.
     public: [[nodiscard]] auto empty() const& -> bool;
 
+#line 360 "regex.h2"
+    // Apply optimizations to the matcher list.
     public: static auto post_process_list(token_vec& list) -> void;
 
-#line 401 "regex.h2"
+#line 374 "regex.h2"
 };
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
+//
 class parse_context_branch_reset_state {
-    public: bool is_active {false}; 
-    public: int cur_group {1}; // Global capture group.
-    public: int max_group {1}; 
-    public: int from {1}; 
+    public: bool is_active {false}; // If we have a branch reset group.
+    public: int cur_group {1}; // Next group identifier. 0 == global capture group.
+    public: int max_group {1}; // Maximum group identifier generated.
+    public: int from {1};      // Starting identifier on new alternative branch.
 
+    // Next group identifier.
     public: [[nodiscard]] auto next() & -> int;
 
-#line 418 "regex.h2"
+#line 393 "regex.h2"
+    // Set next group identifier.
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 423 "regex.h2"
+#line 399 "regex.h2"
+    // Start a new alternative branch.
     public: auto next_alternative() & -> void;
 
-#line 429 "regex.h2"
+#line 406 "regex.h2"
+    // Initialize for a branch reset group.
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
 
-#line 435 "regex.h2"
+#line 413 "regex.h2"
 };
 
+// Context during parsing of the regular expressions.
+// 
+// Keeps track of the distributed group identifiers, current parsed group and branch resets.
+//
 class parse_context {
-    private: std::string_view regex; 
-
-    private: size_t pos {0}; 
-
-           public: std::string error_text {""}; 
-           public: std::map named_groups {}; 
+    private: std::string_view regex; // Regular expression string.
+    private: size_t pos {0};   // Current parsing position.
+    private: token_ptr root;   // Token representing the regular expression.
 
     private: parse_context_group_state cur_group_state {}; 
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
 
-    private: token_ptr root; 
+#line 428 "regex.h2"
+           public: std::map named_groups {}; 
+           public: std::string error_text {""}; 
 
-#line 451 "regex.h2"
     public: explicit parse_context(cpp2::impl::in r);
-#line 451 "regex.h2"
+#line 431 "regex.h2"
     public: auto operator=(cpp2::impl::in r) -> parse_context& ;
 
-#line 456 "regex.h2"
+#line 436 "regex.h2"
     // State management functions
     //
 
+    // Returned group state needs to be stored and provided in `end_group`.
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 467 "regex.h2"
+#line 448 "regex.h2"
+    // `old_state` argument needs to be from start group.
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 473 "regex.h2"
+#line 455 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 477 "regex.h2"
+#line 459 "regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 481 "regex.h2"
+#line 463 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 492 "regex.h2"
+#line 474 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 498 "regex.h2"
+#line 480 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 503 "regex.h2"
-    // Position management functions
+#line 485 "regex.h2"
+    // Regex token management
     //
 
-    public: [[nodiscard]] auto get_pos() const& -> auto;
-
-    public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto;
-
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 514 "regex.h2"
+#line 492 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 518 "regex.h2"
+#line 496 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 528 "regex.h2"
-    public: [[nodiscard]] auto get_tokens() & -> token_ptr;
+#line 506 "regex.h2"
+    public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 532 "regex.h2"
+#line 510 "regex.h2"
     // Group management
+    //
+
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 537 "regex.h2"
+#line 517 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 541 "regex.h2"
+#line 521 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 547 "regex.h2"
+#line 527 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 557 "regex.h2"
+#line 537 "regex.h2"
+    // Position management functions
+    //
+
     public: [[nodiscard]] auto current() const& -> char;
 
+    // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
+    private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
+
+#line 581 "regex.h2"
+    // Return true if next token is available.
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 569 "regex.h2"
+#line 592 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 582 "regex.h2"
+#line 605 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
-    public: [[nodiscard]] auto valid() const& -> bool;
-
-    public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
-
-#line 591 "regex.h2"
-    public: [[nodiscard]] static auto join(auto const& list, auto const& func) -> std::string;
-
-#line 603 "regex.h2"
-    public: [[nodiscard]] static auto join(cpp2::impl::in> list) -> auto;
-
-    private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
-
-#line 644 "regex.h2"
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 665 "regex.h2"
+#line 627 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 681 "regex.h2"
+#line 643 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 701 "regex.h2"
+#line 663 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 711 "regex.h2"
+#line 673 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
+    // Parsing functions
+    //
+
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 769 "regex.h2"
+#line 734 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 806 "regex.h2"
+#line 771 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
+
+#line 785 "regex.h2"
+    // Misc functions
+
+    public: [[nodiscard]] auto get_pos() const& -> auto;
+    public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto;
+    public: [[nodiscard]] auto valid() const& -> bool;
+
+    public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
     public: parse_context(parse_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 821 "regex.h2"
+#line 795 "regex.h2"
 };
 
+// Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
+// function here.
+//
 class generation_function_context {
     public: std::string code {""}; 
     public: std::string tabs {""}; 
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 834 "regex.h2"
+#line 811 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 837 "regex.h2"
+#line 814 "regex.h2"
 };
 
+// Context for generating the state machine.
 class generation_context {
 
-    private: std::vector gen_stack {1}; 
+    private: std::vector gen_stack {1}; // Element 0 contains all the code.
 
-    private: bool new_state {true}; 
     private: int matcher_func {0}; 
     private: int reset_func {0}; 
     private: int temp_name {0}; 
     private: std::string entry_func {""}; 
 
+    // Generation helpers
+    //
+
     public: [[nodiscard]] auto match_parameters() const& -> std::string;
 
+    // Code generation.
+
+    // Add code line.
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 856 "regex.h2"
+#line 839 "regex.h2"
+    // Add check for token. The check needs to be a function call that returns a boolean.
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 861 "regex.h2"
-    public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void;
+#line 845 "regex.h2"
+    // Add a statefull check. The check needs to return a `match_return`.
+    public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void;
 
-#line 868 "regex.h2"
-    public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
+#line 853 "regex.h2"
+    protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 874 "regex.h2"
+#line 863 "regex.h2"
+    protected: [[nodiscard]] auto start_func() & -> std::string;
+
+#line 869 "regex.h2"
+    protected: auto end_func_statefull(cpp2::impl::in s) & -> void;
+
+#line 887 "regex.h2"
+    // Generate the function for a token.
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 882 "regex.h2"
+#line 896 "regex.h2"
+    // Generate the reset for a list of group identifiers.
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 904 "regex.h2"
-    public: [[nodiscard]] auto get_current() & -> generation_function_context*;
+#line 918 "regex.h2"
+    // Name generation
+    //
 
-#line 908 "regex.h2"
-    public: [[nodiscard]] auto get_base() & -> generation_function_context*;
+    protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 912 "regex.h2"
+#line 927 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 916 "regex.h2"
-    protected: auto start_func_named(cpp2::impl::in name) & -> void;
+#line 931 "regex.h2"
+    protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 926 "regex.h2"
-    public: [[nodiscard]] auto start_func() & -> std::string;
+#line 937 "regex.h2"
+    public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 932 "regex.h2"
-    public: auto end_func_statefull(cpp2::impl::in s) & -> void;
+#line 943 "regex.h2"
+    // Context management
+    //
 
-#line 950 "regex.h2"
-    public: auto end_func() & -> void;
+    public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
 #line 954 "regex.h2"
-    public: [[nodiscard]] auto get_entry_func() const& -> std::string;
-
-#line 958 "regex.h2"
-    protected: [[nodiscard]] auto gen_func_name() & -> std::string;
+    public: auto finish_context() & -> void;
 
-#line 964 "regex.h2"
-    protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
+#line 962 "regex.h2"
+    // Misc functions
+    //
 
-#line 970 "regex.h2"
-    public: [[nodiscard]] auto gen_temp() & -> std::string;
+    private: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 976 "regex.h2"
-    public: [[nodiscard]] auto new_context() & -> generation_function_context*;
+#line 969 "regex.h2"
+    private: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 984 "regex.h2"
-    public: auto finish_context() & -> void;
+#line 973 "regex.h2"
+    public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 992 "regex.h2"
+#line 977 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
+
+#line 1000 "regex.h2"
+    // Run the generation for the token.
+    public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1013 "regex.h2"
+#line 1006 "regex.h2"
 };
 
-class regex_token_list: public regex_token {
-
-#line 1018 "regex.h2"
-    public: token_vec tokens; 
-
-    public: explicit regex_token_list(cpp2::impl::in t);
-
-#line 1025 "regex.h2"
-    public: virtual auto generate_code(generation_context& ctx) const -> void;
-
-#line 1031 "regex.h2"
-    public: virtual auto add_groups(std::set& groups) const -> void;
-
-#line 1037 "regex.h2"
-    public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
-    public: virtual ~regex_token_list() noexcept;
-
-    public: regex_token_list(regex_token_list const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regex_token_list const&) -> void = delete;
-
-
-#line 1044 "regex.h2"
-};
+//-----------------------------------------------------------------------
+//
+// Matchers and generators for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
 
-#line 1047 "regex.h2"
 class regex_token_base: public regex_token {
 
-#line 1050 "regex.h2"
+#line 1018 "regex.h2"
     public: explicit regex_token_base(cpp2::impl::in str);
 
-#line 1054 "regex.h2"
+#line 1022 "regex.h2"
     public: explicit regex_token_base();
 
-#line 1058 "regex.h2"
+#line 1026 "regex.h2"
     public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_base() noexcept;
 
     public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token_base const&) -> void = delete;
 
-#line 1059 "regex.h2"
+#line 1027 "regex.h2"
 };
 
 class regex_token_check: public regex_token_base {
 
-#line 1064 "regex.h2"
+#line 1032 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 1071 "regex.h2"
+#line 1039 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -889,17 +855,17 @@ class regex_token_check: public regex_token_base {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 1074 "regex.h2"
+#line 1042 "regex.h2"
 };
 
 class regex_token_code: public regex_token_base {
 
-#line 1079 "regex.h2"
+#line 1047 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 1086 "regex.h2"
+#line 1054 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -907,16 +873,16 @@ class regex_token_code: public regex_token_base {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 1089 "regex.h2"
+#line 1057 "regex.h2"
 };
 
-#line 1092 "regex.h2"
+#line 1060 "regex.h2"
 class regex_token_empty: public regex_token_base {
 
-#line 1095 "regex.h2"
+#line 1063 "regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 1099 "regex.h2"
+#line 1067 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -924,7 +890,7 @@ class regex_token_empty: public regex_token_base {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 1102 "regex.h2"
+#line 1070 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -933,12 +899,12 @@ class regex_token_empty: public regex_token_base {
 //
 class alternative_token: public regex_token_base {
 
-#line 1111 "regex.h2"
+#line 1079 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1121 "regex.h2"
+#line 1089 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
@@ -946,23 +912,23 @@ class alternative_token: public regex_token_base {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1124 "regex.h2"
+#line 1092 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1130 "regex.h2"
+#line 1098 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1137 "regex.h2"
+#line 1105 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1153 "regex.h2"
+#line 1121 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1159 "regex.h2"
+#line 1127 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -970,36 +936,36 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1170 "regex.h2"
+#line 1138 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1177 "regex.h2"
+#line 1145 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1194 "regex.h2"
+#line 1162 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_base {
 
-#line 1201 "regex.h2"
+#line 1169 "regex.h2"
     private: bool single_line; 
 
     public: explicit any_token(cpp2::impl::in single_line_);
 
-#line 1207 "regex.h2"
+#line 1175 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1213 "regex.h2"
+#line 1181 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
@@ -1007,36 +973,36 @@ class any_token: public regex_token_base {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1216 "regex.h2"
+#line 1184 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1229 "regex.h2"
+#line 1197 "regex.h2"
 class char_token: public regex_token_base {
 
-#line 1232 "regex.h2"
+#line 1200 "regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1241 "regex.h2"
+#line 1209 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1245 "regex.h2"
+#line 1213 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1267 "regex.h2"
+#line 1235 "regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1287 "regex.h2"
+#line 1255 "regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1304 "regex.h2"
+#line 1272 "regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1316 "regex.h2"
+#line 1284 "regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -1044,7 +1010,7 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1320 "regex.h2"
+#line 1288 "regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1084,21 +1050,21 @@ class char_token: public regex_token_base {
 //
 class class_token: public regex_token_base {
 
-#line 1360 "regex.h2"
+#line 1328 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1371 "regex.h2"
+#line 1339 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1479 "regex.h2"
+#line 1447 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1484 "regex.h2"
+#line 1452 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1106,21 +1072,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1490 "regex.h2"
+#line 1458 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1515 "regex.h2"
+#line 1483 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1527 "regex.h2"
+#line 1495 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1132,17 +1098,17 @@ template c
 
     //     return r;
     // }
-#line 1538 "regex.h2"
+#line 1506 "regex.h2"
 };
 
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1575 "regex.h2"
+#line 1543 "regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1584 "regex.h2"
+#line 1552 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1151,16 +1117,16 @@ template c
 //
 class group_ref_token: public regex_token_base {
 
-#line 1593 "regex.h2"
+#line 1561 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1602 "regex.h2"
+#line 1570 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1694 "regex.h2"
+#line 1662 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1168,30 +1134,30 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1697 "regex.h2"
+#line 1665 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1724 "regex.h2"
+#line 1692 "regex.h2"
 class group_token: public regex_token {
 
-#line 1727 "regex.h2"
+#line 1695 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1743 "regex.h2"
+#line 1711 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1870 "regex.h2"
+#line 1838 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1887 "regex.h2"
+#line 1855 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1906 "regex.h2"
+#line 1874 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1200,44 +1166,44 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1912 "regex.h2"
+#line 1880 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1955 "regex.h2"
+#line 1923 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1973 "regex.h2"
+#line 1941 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1985 "regex.h2"
+#line 1953 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1999 "regex.h2"
+#line 1967 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 2004 "regex.h2"
+#line 1972 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 class lookahead_token: public regex_token {
 
-#line 2009 "regex.h2"
+#line 1977 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 2016 "regex.h2"
+#line 1984 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2022 "regex.h2"
+#line 1990 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1245,18 +1211,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 2025 "regex.h2"
+#line 1993 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 2036 "regex.h2"
+#line 2004 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2063 "regex.h2"
+#line 2031 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1270,17 +1236,33 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2077 "regex.h2"
+#line 2045 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2103 "regex.h2"
+#line 2071 "regex.h2"
+// TODO: @enum as template parameter yields two error:
+//     error: type 'range_flags' of non-type template parameter is not a structural type
+//     error: non-type template parameter has incomplete type 'range_flags'
+
+// Options for range matching.
+class range_flags {
+    public: static const int not_greedy;// Try to take as few as possible.
+    public: static const int greedy;// Try to take as many as possible.
+    public: static const int possessive;// Do not give back after a greedy match. No backtracking.
+
+    public: range_flags() = default;
+    public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(range_flags const&) -> void = delete;
+};
+#line 2081 "regex.h2"
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2108 "regex.h2"
+#line 2087 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1290,19 +1272,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2185 "regex.h2"
+#line 2164 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2196 "regex.h2"
+#line 2175 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2208 "regex.h2"
+#line 2187 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2226 "regex.h2"
+#line 2205 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2236 "regex.h2"
+#line 2215 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1310,46 +1292,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2240 "regex.h2"
+#line 2219 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2256 "regex.h2"
+#line 2235 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2261 "regex.h2"
+#line 2240 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2266 "regex.h2"
+#line 2245 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2272 "regex.h2"
+#line 2251 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2287 "regex.h2"
+#line 2266 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2315 "regex.h2"
+#line 2294 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2339 "regex.h2"
+#line 2318 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2363 "regex.h2"
+#line 2342 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2370 "regex.h2"
+#line 2349 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1358,7 +1340,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2399 "regex.h2"
+#line 2378 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1367,10 +1349,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2421 "regex.h2"
+#line 2400 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2446 "regex.h2"
+#line 2425 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1381,7 +1363,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 // Regular expression implementation
 template class regular_expression {
 
-#line 2457 "regex.h2"
+#line 2436 "regex.h2"
     public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     public: template using context = matcher::context;
 
@@ -1392,7 +1374,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_);
 
-#line 2470 "regex.h2"
+#line 2449 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1407,7 +1389,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2486 "regex.h2"
+#line 2465 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1415,13 +1397,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2498 "regex.h2"
+#line 2477 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2520 "regex.h2"
+#line 2499 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1433,7 +1415,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2533 "regex.h2"
+#line 2512 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1458,29 +1440,29 @@ template class regex_parser {
 
     public: explicit regex_parser(cpp2::impl::in r, Error_out const& e);
 
-#line 2560 "regex.h2"
+#line 2539 "regex.h2"
     // Misc functions
     //
     public: auto error(cpp2::impl::in message) & -> void;
 
-#line 2567 "regex.h2"
+#line 2546 "regex.h2"
     // Parsing functions
     //
 
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2606 "regex.h2"
+#line 2585 "regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_parser const&) -> void = delete;
 
 
-#line 2619 "regex.h2"
+#line 2598 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2628 "regex.h2"
+#line 2607 "regex.h2"
 }
 }
 
@@ -1551,7 +1533,7 @@ if (((*this) & perl_code_syntax) == perl_code_syntax) {_ret += _comma + "perl_co
 if (((*this) & perl_code_syntax_in_classes) == perl_code_syntax_in_classes) {_ret += _comma + "perl_code_syntax_in_classes";_comma = ", ";}
 return cpp2::move(_ret) + ")"; 
 }
-#line 28 "regex.h2"
+#line 26 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Helper structures for the expression matching.
@@ -1559,7 +1541,9 @@ return cpp2::move(_ret) + ")";
 //-----------------------------------------------------------------------
 //
 
-#line 36 "regex.h2"
+// Possible modifiers for a regular expression.
+//
+
                                   // mod: i
                                   // mod: m
                                   // mod: s
@@ -1568,40 +1552,42 @@ return cpp2::move(_ret) + ")";
                                   // mod: xx
 
 #line 44 "regex.h2"
-// TODO: @enum as template parameter yields two error:
-//     error: type 'range_flags' of non-type template parameter is not a structural type
-//     error: non-type template parameter has incomplete type 'range_flags'
+// Structure for storing group information.
+//
 
-#line 48 "regex.h2"
-    inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
-    inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
-    inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
+#line 53 "regex.h2"
+// Return value for every matcher.
+// 
 
-#line 72 "regex.h2"
+#line 60 "regex.h2"
+// Modifiable state during matching.
+//
+
+#line 69 "regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 75 "regex.h2"
+#line 72 "regex.h2"
     }
 
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }{}
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    return *this; }
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }{}
-#line 77 "regex.h2"
+#line 74 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1610,104 +1596,99 @@ return cpp2::move(_ret) + ")";
 
     // Getter and setter for groups
     //
-#line 81 "regex.h2"
+#line 78 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 83 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
+#line 80 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
-            return ""; 
+            return 0; 
         }
-        return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 89 "regex.h2"
+#line 86 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 95 "regex.h2"
-    template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
+#line 92 "regex.h2"
+    template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
-            return 0; 
+            return ""; 
         }
-        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+        return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 102 "regex.h2"
+#line 99 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 107 "regex.h2"
+#line 104 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 111 "regex.h2"
+#line 108 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 115 "regex.h2"
+#line 112 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
     // Misc functions
     //
-#line 119 "regex.h2"
-    template  [[nodiscard]] auto match_context::print_ranges() const& -> bstring{
-        bstring r {""}; 
-        for ( auto const& cur : groups ) {
-            if (cur.matched) {
-                r += ("(" + cpp2::to_string(std::distance(begin, cur.start)) + "," + cpp2::to_string(std::distance(begin, cur.end)) + ")");
-            }
-            else {
-                r += "(?,?)";
-            }
-        }
-
-        return r; 
-    }
 
-#line 133 "regex.h2"
+#line 117 "regex.h2"
     template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
-#line 134 "regex.h2"
+#line 118 "regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 138 "regex.h2"
-//  Represents the remainder of the regular expression.
+#line 122 "regex.h2"
+// End function that returns a valid match.
 //
-//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
-//  Otherwise the matcher can try a different alternative.
+
+#line 125 "regex.h2"
+    [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur);  }
+
+#line 128 "regex.h2"
+// Empty group reset function.
 //
 
-#line 144 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return match_select(cur, ctx, modifiers, end_func);  }
+#line 131 "regex.h2"
+    auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 146 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] matcher_list const& unnamed_param_5) -> auto { 
-        return match_select(cur, ctx, modifiers, end_func);  }
+#line 134 "regex.h2"
+// Evaluate func on destruction of the handle.
 
-#line 149 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { 
-        return First::match(cur, ctx, modifiers, end_func, matcher_list());  }
-#line 151 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::match_select(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func) -> auto { return end_func(cur, ctx, modifiers);  }
+#line 139 "regex.h2"
+    template  on_return::on_return(Func const& f)
+        : func{ f }{
 
-#line 153 "regex.h2"
-    template  auto matcher_list::reset_ranges(auto& ctx) -> void { (List::reset_ranges(ctx), ...);  }
-#line 154 "regex.h2"
-    template  [[nodiscard]] auto matcher_list::to_string() -> auto { return (bstring() + ... + List::to_string());  }
+#line 141 "regex.h2"
+    }
+#line 139 "regex.h2"
+    template  auto on_return::operator=(Func const& f) -> on_return& {
+        func = f;
+        return *this;
 
-#line 156 "regex.h2"
-    template  template [[nodiscard]] auto matcher_list::prepend([[maybe_unused]] Pre const& unnamed_param_1) -> auto { return matcher_list();  }
+#line 141 "regex.h2"
+    }
 
-#line 161 "regex.h2"
-    [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur);  }
+#line 143 "regex.h2"
+    template  on_return::~on_return() noexcept{
+        cpp2::move(*this).func();
+    }
+
+#line 148 "regex.h2"
+// Helper for auto deduction of the Func type.
+#line 149 "regex.h2"
+template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
-#line 164 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Character classes for regular expressions.
@@ -1718,172 +1699,142 @@ return cpp2::move(_ret) + ")";
 // Class syntax:  Example: a
 //
 
-#line 175 "regex.h2"
+#line 162 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C;  }
-#line 176 "regex.h2"
+#line 163 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 179 "regex.h2"
+#line 166 "regex.h2"
 // Class syntax: - Example: a-c
 //
 
-#line 183 "regex.h2"
+#line 170 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }();  }
-#line 184 "regex.h2"
+#line 171 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 187 "regex.h2"
+#line 174 "regex.h2"
 // Helper for combining two character classes
 //
 
-#line 190 "regex.h2"
+#line 177 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 191 "regex.h2"
+#line 178 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 194 "regex.h2"
+#line 181 "regex.h2"
 // Class syntax:   Example: abcd
 //
 
-#line 197 "regex.h2"
+#line 184 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c));  }
-#line 198 "regex.h2"
+#line 185 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 201 "regex.h2"
+#line 188 "regex.h2"
 // Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 205 "regex.h2"
+#line 192 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
 
-#line 210 "regex.h2"
+#line 197 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 213 "regex.h2"
+#line 200 "regex.h2"
 // Short class syntax: \  Example: \w
 //
 
-#line 216 "regex.h2"
+#line 203 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 217 "regex.h2"
+#line 204 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
 
-#line 221 "regex.h2"
+#line 208 "regex.h2"
 // Named basic character classes
 //
 
-#line 227 "regex.h2"
+#line 214 "regex.h2"
 // Named other classes
 //
 
-#line 243 "regex.h2"
+#line 230 "regex.h2"
 // Shorthand class entries
 //
 
-#line 258 "regex.h2"
+#line 245 "regex.h2"
 //-----------------------------------------------------------------------
 //
-//  Helper matchers for regular expressions.
+// Tokens for regular expressions.
 //
 //-----------------------------------------------------------------------
 //
 
-// Regex syntax: none Example: -
+// Basic class for a regex token.
 //
 
-#line 268 "regex.h2"
-    template  template [[nodiscard]] auto empty_matcher_logic::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto { return Other::match(cur, ctx, modifiers, end_func);  }
-#line 269 "regex.h2"
-    template  auto empty_matcher_logic::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 270 "regex.h2"
-    template  [[nodiscard]] auto empty_matcher_logic::to_string() -> auto { return bstring(); }
-
-#line 274 "regex.h2"
-// Helper for greedy alternatives
-//
+#line 258 "regex.h2"
+    regex_token::regex_token(cpp2::impl::in str)
+        : string_rep{ str }{
 
-#line 277 "regex.h2"
-    template  template [[nodiscard]] auto extract_position_helper::match(auto const& cur, auto& ctx, auto const& modifiers, auto const& end_func, [[maybe_unused]] Other const& unnamed_param_5) -> auto{
-        auto r {Other::match(cur, ctx, modifiers, end_func)}; 
-        if (r.matched) {
-            ctx.set_alternative_pos(alternative, cur);
-        }
-        return r; 
+#line 260 "regex.h2"
     }
 
-#line 285 "regex.h2"
-    template  auto extract_position_helper::reset_ranges([[maybe_unused]] auto const& unnamed_param_1) -> void{}
-#line 286 "regex.h2"
-    template  [[nodiscard]] auto extract_position_helper::to_string() -> auto { return bstring(); }
-
-#line 289 "regex.h2"
-// Helper for standard matchers with special syntax
-//
-//
+#line 262 "regex.h2"
+    regex_token::regex_token()
+        : string_rep{ "" }{
 
-#line 294 "regex.h2"
-    template  [[nodiscard]] auto special_syntax_wrapper::to_string() -> auto { return syntax.str(); }
+#line 264 "regex.h2"
+    }
 
-#line 297 "regex.h2"
-//-----------------------------------------------------------------------
-//
-// Matchers and generators for regular expressions.
-//
-//-----------------------------------------------------------------------
-//
+    //parse: (inout ctx: parse_context) -> token_ptr;
+                                                                       // Generate the matching code.
 
-#line 306 "regex.h2"
-    auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
+#line 269 "regex.h2"
+    auto regex_token::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}// Adds all group indices to the set.
+#line 270 "regex.h2"
+    [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }// Create a string representation.
+#line 271 "regex.h2"
+    auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
 
-#line 313 "regex.h2"
-    template  on_return::on_return(Func const& f)
-        : func{ f }{
+    regex_token::~regex_token() noexcept{}// Set the string representation.
 
-#line 315 "regex.h2"
-    }
-#line 313 "regex.h2"
-    template  auto on_return::operator=(Func const& f) -> on_return& {
-        func = f;
-        return *this;
+#line 282 "regex.h2"
+    regex_token_list::regex_token_list(cpp2::impl::in t)
+        : regex_token{ gen_string(t) }
+        , tokens{ t }{
 
-#line 315 "regex.h2"
+#line 285 "regex.h2"
     }
 
-#line 317 "regex.h2"
-    template  on_return::~on_return() noexcept{
-        cpp2::move(*this).func();
+#line 287 "regex.h2"
+    auto regex_token_list::generate_code(generation_context& ctx) const -> void{
+        for ( auto const& token : tokens ) {
+            (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
+        }
     }
 
-#line 322 "regex.h2"
-template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
-
-#line 328 "regex.h2"
-    regex_token::regex_token(cpp2::impl::in str)
-        : string_rep{ str }{
-
-#line 330 "regex.h2"
+#line 293 "regex.h2"
+    auto regex_token_list::add_groups(std::set& groups) const -> void{
+        for ( auto const& token : tokens ) {
+            (*cpp2::impl::assert_not_null(token)).add_groups(groups);
+        }
     }
 
-#line 332 "regex.h2"
-    regex_token::regex_token()
-        : string_rep{ "" }{
-
-#line 334 "regex.h2"
+#line 299 "regex.h2"
+    [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
+        std::string r {""}; 
+        for ( auto const& token : vec ) {
+            r += (*cpp2::impl::assert_not_null(token)).to_string();
+        }
+        return r; 
     }
 
-    //parse: (inout ctx: parse_context) -> token_ptr;
-
-#line 340 "regex.h2"
-    [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }
-#line 341 "regex.h2"
-    auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
-
-    regex_token::~regex_token() noexcept{}
+    regex_token_list::~regex_token_list() noexcept{}
 
-#line 358 "regex.h2"
+#line 325 "regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
@@ -1891,15 +1842,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 365 "regex.h2"
+#line 333 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 371 "regex.h2"
-    [[nodiscard]] auto parse_context_group_state::get_tokens() & -> token_ptr{
+#line 340 "regex.h2"
+    [[nodiscard]] auto parse_context_group_state::get_as_token() & -> token_ptr{
         if (alternate_match_lists.empty()) {
             post_process_list(cur_match_list);
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cur_match_list); 
@@ -1910,15 +1861,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 382 "regex.h2"
+#line 352 "regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void{
         cur_match_list.push_back(token);
     }
 
-#line 386 "regex.h2"
+#line 357 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty();  }
 
-#line 388 "regex.h2"
+#line 361 "regex.h2"
     auto parse_context_group_state::post_process_list(token_vec& list) -> void{
         // Merge all characters
         auto merge_pos {CPP2_UFCS(begin)(list)}; 
@@ -1933,7 +1884,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 410 "regex.h2"
+#line 385 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1942,20 +1893,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 418 "regex.h2"
+#line 394 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 423 "regex.h2"
+#line 400 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 429 "regex.h2"
+#line 407 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1963,28 +1914,28 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 451 "regex.h2"
+#line 431 "regex.h2"
     parse_context::parse_context(cpp2::impl::in r)
         : regex{ r }
         , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }{
 
-#line 454 "regex.h2"
+#line 434 "regex.h2"
     }
-#line 451 "regex.h2"
+#line 431 "regex.h2"
     auto parse_context::operator=(cpp2::impl::in r) -> parse_context& {
         regex = r;
         pos = 0;
-        error_text = "";
-        named_groups = {};
+        root = CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "");
         cur_group_state = {};
         cur_branch_reset_state = {};
-        root = CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "");
+        named_groups = {};
+        error_text = "";
         return *this;
 
-#line 454 "regex.h2"
+#line 434 "regex.h2"
     }
 
-#line 459 "regex.h2"
+#line 440 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         old_state.swap(cur_group_state);
@@ -1993,24 +1944,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 467 "regex.h2"
+#line 449 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
-        auto inner {cur_group_state.get_tokens()}; 
+        auto inner {cur_group_state.get_as_token()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 473 "regex.h2"
+#line 455 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 477 "regex.h2"
+#line 459 "regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 484 "regex.h2"
+#line 466 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2019,36 +1970,30 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 492 "regex.h2"
+#line 474 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 498 "regex.h2"
+#line 480 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
-#line 506 "regex.h2"
-    [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos;  }
-
-#line 508 "regex.h2"
-    [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
-
-#line 510 "regex.h2"
+#line 488 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         cur_group_state.add(token);
     }
 
-#line 514 "regex.h2"
+#line 492 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(cur_group_state.empty()); 
     }
 
-#line 518 "regex.h2"
+#line 496 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2059,29 +2004,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 528 "regex.h2"
-    [[nodiscard]] auto parse_context::get_tokens() & -> token_ptr{
+#line 506 "regex.h2"
+    [[nodiscard]] auto parse_context::get_as_token() & -> token_ptr{
         return root; 
     }
 
-#line 533 "regex.h2"
+#line 513 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 537 "regex.h2"
+#line 517 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return cur_branch_reset_state.next(); 
     }
 
-#line 541 "regex.h2"
+#line 521 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 547 "regex.h2"
+#line 527 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {named_groups.find(name)}; 
         if (iter == named_groups.end()) {
@@ -2092,66 +2037,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 557 "regex.h2"
+#line 540 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 559 "regex.h2"
-    [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
-        pos = get_next_position(in_class, no_skip);
-        if (pos != regex.size()) {
-            return true; 
-        }
-        else {
-            return false; 
-        }
-    }
-
-#line 569 "regex.h2"
-    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 570 "regex.h2"
-    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 571 "regex.h2"
-    [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
-
-#line 573 "regex.h2"
-    [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
-        auto r {true}; 
-        auto cur {0}; 
-        for( ; r && cpp2::impl::cmp_less(cur,n); (r = next()) ) {
-            cur += 1;
-        }
-        return r; 
-    }
-
-#line 582 "regex.h2"
-    [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
-
-#line 584 "regex.h2"
-    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && error_text.empty(); }
-
-#line 586 "regex.h2"
-    [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
-        error_text = err;
-        return nullptr; 
-    }
-
-#line 591 "regex.h2"
-    [[nodiscard]] auto parse_context::join(auto const& list, auto const& func) -> std::string{
-        std::string r {""}; 
-
-        std::string separator {""}; 
-        for ( auto const& cur : list ) {
-            r += separator + func(cur);
-            separator = ", ";
-        }
-
-        return r; 
-    }
-
-#line 603 "regex.h2"
-    [[nodiscard]] auto parse_context::join(cpp2::impl::in> list) -> auto { return join(list, [](auto const& arg) -> auto { return arg;  });  }// Todo: Shorthand syntax for const lambda
-
-#line 605 "regex.h2"
+#line 543 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2190,9 +2079,39 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 644 "regex.h2"
+#line 582 "regex.h2"
+    [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
+        pos = get_next_position(in_class, no_skip);
+        if (pos != regex.size()) {
+            return true; 
+        }
+        else {
+            return false; 
+        }
+    }
+
+#line 592 "regex.h2"
+    [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
+#line 593 "regex.h2"
+    [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
+#line 594 "regex.h2"
+    [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
+
+#line 596 "regex.h2"
+    [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
+        auto r {true}; 
+        auto cur {0}; 
+        for( ; r && cpp2::impl::cmp_less(cur,n); (r = next()) ) {
+            cur += 1;
+        }
+        return r; 
+    }
+
+#line 605 "regex.h2"
+    [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
+
+#line 607 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
-        auto start {pos}; 
         auto end {pos}; 
         if (any) {
             end = regex.find_first_of(e, pos);
@@ -2202,7 +2121,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
 
         if (end != std::string_view::npos) {
-            r.construct(regex.substr(cpp2::move(start), end - pos));
+            r.construct(regex.substr(pos, end - pos));
             pos = cpp2::move(end);
             return true; 
         }
@@ -2212,14 +2131,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 665 "regex.h2"
+#line 627 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 666 "regex.h2"
+#line 628 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 667 "regex.h2"
+#line 629 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 669 "regex.h2"
+#line 631 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
             r.construct(regex.substr(pos, n));
@@ -2232,7 +2151,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 681 "regex.h2"
+#line 643 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2253,7 +2172,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(r.value()); 
     }
 
-#line 701 "regex.h2"
+#line 663 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,regex.size())) {
@@ -2264,12 +2183,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 711 "regex.h2"
+#line 673 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 712 "regex.h2"
+#line 674 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 714 "regex.h2"
+#line 679 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2325,7 +2244,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 769 "regex.h2"
+#line 734 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2363,7 +2282,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 806 "regex.h2"
+#line 771 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2372,13 +2291,26 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
         auto r {parse_until('\0')}; 
         if (r) {
-            root = cur_group_state.get_tokens();
+            root = cur_group_state.get_as_token();
         }
 
         return r; 
     }
 
-#line 827 "regex.h2"
+#line 787 "regex.h2"
+    [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; }
+#line 788 "regex.h2"
+    [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
+#line 789 "regex.h2"
+    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && error_text.empty(); }
+
+#line 791 "regex.h2"
+    [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
+        error_text = err;
+        return nullptr; 
+    }
+
+#line 804 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2386,88 +2318,35 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 834 "regex.h2"
+#line 811 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
 
-#line 849 "regex.h2"
+#line 829 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 851 "regex.h2"
+#line 834 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 856 "regex.h2"
+#line 840 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n");
     }
 
-#line 861 "regex.h2"
-    auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in c) & -> void{
-        end_func_statefull(c);
+#line 846 "regex.h2"
+    auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void{
+        end_func_statefull(check);
 
         auto name {next_func.substr(0, next_func.size() - 2)}; 
         start_func_named(cpp2::move(name));
     }
 
-#line 868 "regex.h2"
-    [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
-        entry_func = generate_func(token);
-
-        return (*cpp2::impl::assert_not_null(get_base())).code; 
-    }
-
-#line 874 "regex.h2"
-    [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
-        auto name {start_func()}; 
-        (*cpp2::impl::assert_not_null(token)).generate_code((*this));
-        end_func();
-
-        return name; 
-    }
-
-#line 882 "regex.h2"
-    [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
-        if (groups.empty()) {
-            return "cpp2::regex::no_reset()"; 
-        }
-
-        auto name {gen_reset_func_name()}; 
-        auto cur {new_context()}; 
-
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, inout ctx) = {\n");
-        for ( auto const& g : groups ) {
-            (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  ctx..set_group_invalid(" + cpp2::to_string(g) + ");\n");
-        }
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  }\n");
-        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "}\n");
-
-        finish_context();
-
-        return cpp2::move(name) + "()"; 
-    }
-
-#line 904 "regex.h2"
-    [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
-        return &gen_stack.back(); 
-    }
-
-#line 908 "regex.h2"
-    [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
-        return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
-    }
-
-#line 912 "regex.h2"
-    [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
-        return gen_func_name() + "()"; 
-    }
-
-#line 916 "regex.h2"
+#line 853 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2478,14 +2357,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 926 "regex.h2"
+#line 863 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 932 "regex.h2"
+#line 869 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
@@ -2504,38 +2383,64 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 950 "regex.h2"
-    auto generation_context::end_func() & -> void{
-        end_func_statefull("other(r.pos, ctx)");
+#line 888 "regex.h2"
+    [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
+        auto name {start_func()}; 
+        (*cpp2::impl::assert_not_null(token)).generate_code((*this));
+        end_func_statefull(("other(" + cpp2::to_string(match_parameters()) + ")"));
+
+        return name; 
     }
 
-#line 954 "regex.h2"
-    [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
-        return entry_func; 
+#line 897 "regex.h2"
+    [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
+        if (groups.empty()) {
+            return "cpp2::regex::no_reset()"; 
+        }
+
+        auto name {gen_reset_func_name()}; 
+        auto cur {new_context()}; 
+
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  operator(): (this, inout ctx) = {\n");
+        for ( auto const& g : groups ) {
+            (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  ctx..set_group_invalid(" + cpp2::to_string(g) + ");\n");
+        }
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "  }\n");
+        (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "}\n");
+
+        finish_context();
+
+        return cpp2::move(name) + "()"; 
     }
 
-#line 958 "regex.h2"
+#line 921 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 964 "regex.h2"
+#line 927 "regex.h2"
+    [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
+        return gen_func_name() + "()"; 
+    }
+
+#line 931 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 970 "regex.h2"
+#line 937 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 976 "regex.h2"
+#line 946 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2544,7 +2449,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 984 "regex.h2"
+#line 954 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2553,7 +2458,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         gen_stack.pop_back();
     }
 
-#line 992 "regex.h2"
+#line 965 "regex.h2"
+    [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
+        return &gen_stack.back(); 
+    }
+
+#line 969 "regex.h2"
+    [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
+        return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
+    }
+
+#line 973 "regex.h2"
+    [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
+        return entry_func; 
+    }
+
+#line 977 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2576,107 +2496,81 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1020 "regex.h2"
-    regex_token_list::regex_token_list(cpp2::impl::in t)
-        : regex_token{ gen_string(t) }
-        , tokens{ t }{
-
-#line 1023 "regex.h2"
-    }
-
-#line 1025 "regex.h2"
-    auto regex_token_list::generate_code(generation_context& ctx) const -> void{
-        for ( auto const& token : tokens ) {
-            (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
-        }
-    }
-
-#line 1031 "regex.h2"
-    auto regex_token_list::add_groups(std::set& groups) const -> void{
-        for ( auto const& token : tokens ) {
-            (*cpp2::impl::assert_not_null(token)).add_groups(groups);
-        }
-    }
+#line 1001 "regex.h2"
+    [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
+        entry_func = generate_func(token);
 
-#line 1037 "regex.h2"
-    [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
-        std::string r {""}; 
-        for ( auto const& token : vec ) {
-            r += (*cpp2::impl::assert_not_null(token)).to_string();
-        }
-        return r; 
+        return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-    regex_token_list::~regex_token_list() noexcept{}
-
-#line 1050 "regex.h2"
+#line 1018 "regex.h2"
     regex_token_base::regex_token_base(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 1052 "regex.h2"
+#line 1020 "regex.h2"
     }
 
-#line 1054 "regex.h2"
+#line 1022 "regex.h2"
     regex_token_base::regex_token_base()
         : regex_token{  }{
 
-#line 1056 "regex.h2"
+#line 1024 "regex.h2"
     }
 
-#line 1058 "regex.h2"
+#line 1026 "regex.h2"
     auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
 
     regex_token_base::~regex_token_base() noexcept{}
 
-#line 1066 "regex.h2"
+#line 1034 "regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token_base{ str }
         , check{ check_ }{
 
-#line 1069 "regex.h2"
+#line 1037 "regex.h2"
     }
 
-#line 1071 "regex.h2"
+#line 1039 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(check + "(" + ctx.match_parameters() + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 1081 "regex.h2"
+#line 1049 "regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token_base{ str }
         , code{ code_ }{
 
-#line 1084 "regex.h2"
+#line 1052 "regex.h2"
     }
 
-#line 1086 "regex.h2"
+#line 1054 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         ctx.add(code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 1095 "regex.h2"
+#line 1063 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token_base{ str }{
 
-#line 1097 "regex.h2"
+#line 1065 "regex.h2"
     }
 
-#line 1099 "regex.h2"
+#line 1067 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 1111 "regex.h2"
+#line 1079 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_base{  }{}
 
-#line 1113 "regex.h2"
+#line 1081 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2685,22 +2579,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1121 "regex.h2"
+#line 1089 "regex.h2"
     auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // No code gen here. alternative_token_gen is created in the parse_context
     }
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1132 "regex.h2"
+#line 1100 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1135 "regex.h2"
+#line 1103 "regex.h2"
     }
 
-#line 1137 "regex.h2"
+#line 1105 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2717,14 +2611,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         ctx.add_statefull(next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1153 "regex.h2"
+#line 1121 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1159 "regex.h2"
+#line 1127 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2739,11 +2633,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1174 "regex.h2"
+#line 1142 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1177 "regex.h2"
+#line 1145 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2762,29 +2656,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1203 "regex.h2"
+#line 1171 "regex.h2"
     any_token::any_token(cpp2::impl::in single_line_)
         : regex_token_base{ "." }
         , single_line{ single_line_ }{
 
-#line 1205 "regex.h2"
+#line 1173 "regex.h2"
     }
 
-#line 1207 "regex.h2"
+#line 1175 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.get_modifiers().has(expression_flags::single_line)); 
     }
 
-#line 1213 "regex.h2"
+#line 1181 "regex.h2"
     auto any_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("any_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     any_token::~any_token() noexcept{}
 
-#line 1218 "regex.h2"
+#line 1186 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2796,21 +2690,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1235 "regex.h2"
+#line 1203 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token_base{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1239 "regex.h2"
+#line 1207 "regex.h2"
     }
 
-#line 1241 "regex.h2"
+#line 1209 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1245 "regex.h2"
+#line 1213 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             std::string upper {token}; 
@@ -2818,14 +2712,14 @@ template [[nodiscard]] auto any_token_matcher(
 {
 size_t i{0};
 
-#line 1250 "regex.h2"
+#line 1218 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1255 "regex.h2"
+#line 1223 "regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2838,7 +2732,7 @@ size_t i{0};
         }
     }
 
-#line 1267 "regex.h2"
+#line 1235 "regex.h2"
     auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         std::string lower_name {"lower_" + cpp2::to_string(name)}; 
@@ -2859,7 +2753,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1287 "regex.h2"
+#line 1255 "regex.h2"
     auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         auto size {token.size()}; 
@@ -2877,7 +2771,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1304 "regex.h2"
+#line 1272 "regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
         str = replace_all(str, "\\", "\\\\");
         str = replace_all(str, "\a", "\\a");
@@ -2890,7 +2784,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1316 "regex.h2"
+#line 1284 "regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2898,17 +2792,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1364 "regex.h2"
+#line 1332 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token_base{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1369 "regex.h2"
+#line 1337 "regex.h2"
     }
 
-#line 1372 "regex.h2"
+#line 1340 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -2935,7 +2829,7 @@ size_t i{0};
                 std::string name {""}; 
                 if (!(ctx.grab_until(":]", cpp2::impl::out(&name)))) {return ctx.error("Could not find end of character class."); }
                 if (supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name)) {
-                    return ctx.error(("Unsupported character class. Supported ones are: " + cpp2::to_string(ctx.join(supported_classes)))); 
+                    return ctx.error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes)))); 
                 }
 
                 classes.push_back(("[:" + cpp2::to_string(cpp2::move(name)) + ":]"));
@@ -3011,17 +2905,17 @@ size_t i{0};
             }}
         }
 
-        auto inner {ctx.join(cpp2::move(classes))}; 
+        auto inner {join(cpp2::move(classes))}; 
         auto string_rep {ctx.get_range(cpp2::move(start_pos), cpp2::move(end_pos))}; 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1479 "regex.h2"
+#line 1447 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
-#line 1484 "regex.h2"
+#line 1452 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
@@ -3031,7 +2925,7 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1494 "regex.h2"
+#line 1462 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -3053,7 +2947,7 @@ size_t i{0};
         }
     }
 
-#line 1515 "regex.h2"
+#line 1483 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -3066,11 +2960,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1540 "regex.h2"
+#line 1508 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1544 "regex.h2"
+#line 1512 "regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -3102,7 +2996,7 @@ size_t i{0};
 
 }
 
-#line 1577 "regex.h2"
+#line 1545 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -3110,16 +3004,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1596 "regex.h2"
+#line 1564 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token_base{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1600 "regex.h2"
+#line 1568 "regex.h2"
     }
 
-#line 1602 "regex.h2"
+#line 1570 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3212,14 +3106,14 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1694 "regex.h2"
+#line 1662 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1699 "regex.h2"
+#line 1667 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
@@ -3245,7 +3139,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1730 "regex.h2"
+#line 1698 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3259,7 +3153,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1743 "regex.h2"
+#line 1711 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3387,7 +3281,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1870 "regex.h2"
+#line 1838 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3405,7 +3299,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1887 "regex.h2"
+#line 1855 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add(("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3425,7 +3319,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1906 "regex.h2"
+#line 1874 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3435,7 +3329,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1916 "regex.h2"
+#line 1884 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3475,7 +3369,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1957 "regex.h2"
+#line 1925 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3492,7 +3386,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1973 "regex.h2"
+#line 1941 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3505,7 +3399,7 @@ template [[
     }}
 }
 
-#line 1987 "regex.h2"
+#line 1955 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3518,35 +3412,35 @@ template [[
     }
 }
 
-#line 1999 "regex.h2"
+#line 1967 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 2012 "regex.h2"
+#line 1980 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 2014 "regex.h2"
+#line 1982 "regex.h2"
     }
 
-#line 2016 "regex.h2"
+#line 1984 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 2022 "regex.h2"
+#line 1990 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 2027 "regex.h2"
+#line 1995 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3556,7 +3450,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2039 "regex.h2"
+#line 2007 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3581,7 +3475,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2079 "regex.h2"
+#line 2047 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3606,11 +3500,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2113 "regex.h2"
+#line 2077 "regex.h2"
+    inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
+    inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
+    inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
+
+#line 2092 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2115 "regex.h2"
+#line 2094 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3654,7 +3553,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2159 "regex.h2"
+#line 2138 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3681,7 +3580,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2185 "regex.h2"
+#line 2164 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3693,7 +3592,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2196 "regex.h2"
+#line 2175 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3706,7 +3605,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2208 "regex.h2"
+#line 2187 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3725,7 +3624,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2226 "regex.h2"
+#line 2205 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3736,14 +3635,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2236 "regex.h2"
+#line 2215 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2244 "regex.h2"
+#line 2223 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3756,26 +3655,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2256 "regex.h2"
+#line 2235 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2261 "regex.h2"
+#line 2240 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2266 "regex.h2"
+#line 2245 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2272 "regex.h2"
+#line 2251 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3791,7 +3690,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2287 "regex.h2"
+#line 2266 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3820,7 +3719,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2315 "regex.h2"
+#line 2294 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3845,7 +3744,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2339 "regex.h2"
+#line 2318 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3871,7 +3770,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2370 "regex.h2"
+#line 2349 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3894,7 +3793,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2393 "regex.h2"
+#line 2372 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3904,7 +3803,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2405 "regex.h2"
+#line 2384 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3921,7 +3820,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2421 "regex.h2"
+#line 2400 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3946,31 +3845,31 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2465 "regex.h2"
+#line 2444 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
             : matched{ matched_ }
             , ctx{ ctx_ }{
 
-#line 2468 "regex.h2"
+#line 2447 "regex.h2"
         }
 
-#line 2470 "regex.h2"
+#line 2449 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2471 "regex.h2"
+#line 2450 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2472 "regex.h2"
+#line 2451 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2473 "regex.h2"
+#line 2452 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2475 "regex.h2"
+#line 2454 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2476 "regex.h2"
+#line 2455 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2477 "regex.h2"
+#line 2456 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2479 "regex.h2"
+#line 2458 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3979,13 +3878,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2488 "regex.h2"
+#line 2467 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2489 "regex.h2"
+#line 2468 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2490 "regex.h2"
+#line 2469 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2491 "regex.h2"
+#line 2470 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3993,13 +3892,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
     }
 
-#line 2498 "regex.h2"
+#line 2477 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2499 "regex.h2"
+#line 2478 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2500 "regex.h2"
+#line 2479 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2501 "regex.h2"
+#line 2480 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         auto matched {false}; 
         context ctx {start, end}; 
@@ -4019,10 +3918,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(cpp2::move(matched), cpp2::move(ctx)); 
     }
 
-#line 2520 "regex.h2"
+#line 2499 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2525 "regex.h2"
+#line 2504 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -4032,21 +3931,21 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2555 "regex.h2"
+#line 2534 "regex.h2"
     template  regex_parser::regex_parser(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2558 "regex.h2"
+#line 2537 "regex.h2"
     }
 
-#line 2562 "regex.h2"
+#line 2541 "regex.h2"
     template  auto regex_parser::error(cpp2::impl::in message) & -> void{
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
         has_error = true;
     }
 
-#line 2570 "regex.h2"
+#line 2549 "regex.h2"
     template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
@@ -4063,7 +3962,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         source += ("  context: type == cpp2::regex::match_context;");
 
         generation_context gen_ctx {}; 
-        source += gen_ctx.run(parse_ctx.get_tokens());
+        source += gen_ctx.run(parse_ctx.get_as_token());
         source += "  entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n";
         source += "    ctx..set_group_start(0, cur);\n";
         source += ("    r := " + cpp2::to_string(gen_ctx.get_entry_func()) + "(cur, ctx, cpp2::regex::true_end_func());\n");
@@ -4074,7 +3973,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         source += cpp2::move(gen_ctx).create_named_group_lookup(parse_ctx.named_groups);
         source += "}\n";
 
-        auto string {(*cpp2::impl::assert_not_null(parse_ctx.get_tokens())).to_string()}; 
+        auto string {(*cpp2::impl::assert_not_null(parse_ctx.get_as_token())).to_string()}; 
         source += ("  to_string: () -> std::string = { return R\"(" + cpp2::to_string(modifier_escape) + cpp2::to_string(cpp2::move(string)) + cpp2::to_string(modifier_escape) + cpp2::to_string(modifier) + ")\"; }\n");
         source += "}\n";
 
@@ -4083,7 +3982,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2606 "regex.h2"
+#line 2585 "regex.h2"
     template  auto regex_parser::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
@@ -4098,7 +3997,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2621 "regex.h2"
+#line 2600 "regex.h2"
 template [[nodiscard]] auto generate_template(cpp2::impl::in regex, Err const& err) -> std::string{
     regex_parser parser {regex, err}; 
     auto r {parser.parse()}; 
diff --git a/include/string_util.h b/include/string_util.h
index 2336d37bd6..37d3ede1f0 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -126,4 +126,17 @@ inline std::string replace_all(std::string str, const std::string& from, const s
         start_pos += to.length(); // Handles case where 'to' is a substring of 'from'
     }
     return str;
+}
+
+template
+inline std::string join(List const& list) {
+    std::string r = "";
+    std::string sep = "";
+
+    for (auto const& cur : list) {
+        r += sep + cur;
+        sep = ", ";
+    }
+
+    return r;
 }
\ No newline at end of file
diff --git a/source/regex.h2 b/source/regex.h2
index 21ff347faf..4426b68d25 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -20,8 +20,6 @@ cpp2: namespace = {
 
 regex: namespace = {
 
-greedy_alternative : bool == false;
-
 bview:  type == std::basic_string_view;
 bstring:  type == std::basic_string;
 
@@ -32,6 +30,8 @@ bstring:  type == std::basic_string;
 //-----------------------------------------------------------------------
 //
 
+// Possible modifiers for a regular expression.
+//
 expression_flags: @flag_enum type = {
     case_insensitive;             // mod: i
     multiple_lines;               // mod: m
@@ -41,15 +41,8 @@ expression_flags: @flag_enum type = {
     perl_code_syntax_in_classes;  // mod: xx
 }
 
-// TODO: @enum as template parameter yields two error:
-//     error: type 'range_flags' of non-type template parameter is not a structural type
-//     error: non-type template parameter has incomplete type 'range_flags'
-range_flags: type = {
-    not_greedy: int == 1;
-    greedy:     int == 2;
-    possessive: int == 3;
-}
-
+// Structure for storing group information.
+//
 match_group: @struct  type = {
     start: Iter = ();
     end: Iter = ();
@@ -57,11 +50,15 @@ match_group: @struct  type = {
     matched: bool = false;
 }
 
+// Return value for every matcher.
+// 
 match_return: @struct  type = {
     matched: bool = false;
     pos: Iter = ();
 }
 
+// Modifiable state during matching.
+//
 match_context:  type =
 {
     public begin: Iter;
@@ -80,11 +77,11 @@ match_context:  type =
     //
     get_group: (in this, group) groups[group];
 
-    get_group_string: (in this, group) -> std::string = {
+    get_group_end:    (in this, group) -> int = {
         if group >= max_groups || !groups[group].matched {
-            return "";
+            return 0;
         }
-        return std::string(groups[group].start, groups[group].end);
+        return std::distance(begin, groups[group].end);
     }
     get_group_start:  (in this, group) -> int = {
         if group >= max_groups || !groups[group].matched {
@@ -92,13 +89,13 @@ match_context:  type =
         }
         return std::distance(begin, groups[group].start);
     }
-    get_group_end:    (in this, group) -> int = {
+    get_group_string: (in this, group) -> std::string = {
         if group >= max_groups || !groups[group].matched {
-            return 0;
+            return "";
         }
-        return std::distance(begin, groups[group].end);
+        return std::string(groups[group].start, groups[group].end);
     }
-
+    
     set_group_end: (inout this, group, pos) = {
         groups[group].end = pos;
         groups[group].matched = true;
@@ -116,50 +113,40 @@ match_context:  type =
 
     // Misc functions
     //
-    print_ranges: (in this) -> bstring = {
-        r: bstring = "";
-        for groups do (cur) {
-            if cur.matched {
-                r += "((std::distance(begin, cur.start))$,(std::distance(begin, cur.end))$)";
-            }
-            else {
-                r += "(?,?)";
-            }
-        }
-
-        return r;
-    }
 
     fail: (in this)            match_return(false, end);
     pass: (in this, cur: Iter) match_return(true, cur);
 
 }
 
-//  Represents the remainder of the regular expression.
+// End function that returns a valid match.
 //
-//  A matcher can ask this remainder if it would match. If yes a full match of the regular expression is found.
-//  Otherwise the matcher can try a different alternative.
+true_end_func: @struct type = {
+    operator(): (in this, cur, inout ctx) ctx..pass(cur);
+}
+
+// Empty group reset function.
 //
-matcher_list:  type = {
-    match: (cur, inout ctx, modifiers, end_func) match_select(cur, ctx, modifiers, end_func);
+no_reset: @struct type = {
+    operator(): (this, inout _:) = {}
+}
 
-    match:  (cur, inout ctx, modifiers, end_func, _: matcher_list)
-        match_select(cur, ctx, modifiers, end_func);
+// Evaluate func on destruction of the handle.
+on_return:  type = {
 
-    private match_select:  (cur, inout ctx, modifiers, end_func)
-        First::match(cur, ctx, modifiers, end_func, matcher_list());
-    private match_select: (cur, inout ctx, modifiers, end_func) end_func(cur, ctx, modifiers);
+    func: Func;
 
-    reset_ranges: ( inout ctx) = (List::reset_ranges(ctx), ...);
-    to_string: () (bstring() + ... + List::to_string());
+    operator=: (out this, f: Func) = {
+        func = f;
+    }
 
-    prepend: 
 (_ : Pre) matcher_list();
+    operator=: (move this) = {
+        func();
+    }
 }
 
-no_tail:  type == matcher_list;
-true_end_func: @struct type = {
-    operator(): (in this, cur, inout ctx) ctx..pass(cur);
-}
+// Helper for auto deduction of the Func type.
+make_on_return:  (func: Func) on_return(func);
 
 //-----------------------------------------------------------------------
 //
@@ -257,70 +244,13 @@ short_not_word_class       :  type == negated_class_entry type = {
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) Other::match(cur, ctx, modifiers, end_func);
-    reset_ranges:  (_) = {}
-    to_string:     ()  bstring();
-}
-
-
-// Helper for greedy alternatives
-//
-extract_position_helper:  type = {
-    match:  (cur, inout ctx, modifiers, end_func, _ : Other) -> _ = {
-        r := Other::match(cur, ctx, modifiers, end_func);
-        if r.matched {
-            ctx..set_alternative_pos(alternative, cur);
-        }
-        return r;
-    }
-
-    reset_ranges: (_) = {}
-    to_string:    () bstring();
-}
-
-// Helper for standard matchers with special syntax
-//
-//
-special_syntax_wrapper:  type = {
-    this : base = ();
-    to_string:    () syntax..str();
-}
-
-//-----------------------------------------------------------------------
-//
-// Matchers and generators for regular expressions.
-//
-//-----------------------------------------------------------------------
+// Basic class for a regex token.
 //
-
-
-no_reset: @struct type = {
-    operator(): (this, inout _:) = {}
-}
-
-on_return:  type = {
-
-    func: Func;
-
-    operator=: (out this, f: Func) = {
-        func = f;
-    }
-
-    operator=: (move this) = {
-        func();
-    }
-}
-
-make_on_return:  (func: Func) on_return(func);
-
 regex_token: @polymorphic_base type = {
 
     public string_rep: std::string;
@@ -334,27 +264,64 @@ regex_token: @polymorphic_base type = {
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
-    generate_code: (virtual this, inout _: generation_context);
+    generate_code: (virtual this, inout _: generation_context);        // Generate the matching code.
 
-    add_groups: (virtual this, inout _: std::set);
-    to_string: (this) -> std::string         = { return string_rep; }
-    set_string: (inout this, s: std::string) = { string_rep = s; }
+    add_groups: (virtual this, inout _: std::set) = {}            // Adds all group indices to the set.
+    to_string: (this) -> std::string         = { return string_rep; }  // Create a string representation.
+    set_string: (inout this, s: std::string) = { string_rep = s; }     // Set the string representation.
 }
 
 token_ptr : type == std::shared_ptr;
 token_vec: type == std::vector;
 
-// State of the current group. See '()'
-parse_context_group_state: @struct type = {
+regex_token_list: @polymorphic_base type = {
+    this: regex_token;
+
+    public tokens: token_vec;
+
+    operator=:(out this, t: token_vec) = {
+        regex_token = (gen_string(t));
+        tokens = t;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        for tokens do (token) {
+            token*..generate_code(ctx);
+        }
+    }
+
+    add_groups: (override this, inout groups: std::set) = {
+        for tokens do (token) {
+            token*..add_groups(groups);
+        }
+    }
+
+    gen_string: (vec: token_vec) -> std::string = {
+        r : std::string = "";
+        for vec do (token) {
+            r += token*..to_string();
+        }
+        return r;
+    }
+}
 
-    // Current list of matchers
-    cur_match_list: token_vec = ();
+//-----------------------------------------------------------------------
+//
+// Parse and generation context.
+//
+//-----------------------------------------------------------------------
+//
 
-    // List of alternate matcher lists. E.g. ab|cd|xy
-    alternate_match_lists: token_vec = ();
+// State of the current capturing group. See '()'
+//
+parse_context_group_state: @struct type = {
 
-    modifiers : expression_flags = ();
+    
+    cur_match_list:        token_vec = ();         // Current list of matchers.
+    alternate_match_lists: token_vec = ();         // List of alternate matcher lists. E.g. ab|cd|xy.
+    modifiers :            expression_flags = ();  // Current modifiers for the group/regular expression.
 
+    // Start a new alternative.
     next_alternative: (inout this) = {
         new_list: token_vec = ();
         std::swap(new_list, cur_match_list);
@@ -362,13 +329,15 @@ parse_context_group_state: @struct type = {
         _ = alternate_match_lists..insert(alternate_match_lists..end(), shared.new(new_list));
     }
 
+    // Swap this state with the other one.
     swap: (inout this, inout t: parse_context_group_state) = {
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-    get_tokens: (inout this) -> token_ptr = {
+    // Convert this state into a regex token.
+    get_as_token: (inout this) -> token_ptr = {
         if alternate_match_lists..empty() {
             post_process_list(cur_match_list);
             return shared.new(cur_match_list);
@@ -379,12 +348,16 @@ parse_context_group_state: @struct type = {
         }
     }
 
+    // Add a token to the current matcher list.
     add: (inout this, token: token_ptr) = {
         cur_match_list..push_back(token);
     }
 
+    // True if current matcher list is empty.
     empty: (this) -> bool = cur_match_list..empty();
 
+    
+    // Apply optimizations to the matcher list.
     post_process_list: (inout list: token_vec) = {
         // Merge all characters
         merge_pos := list.begin();
@@ -401,12 +374,14 @@ parse_context_group_state: @struct type = {
 }
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
+//
 parse_context_branch_reset_state: @struct type = {
-    is_active : bool = false;
-    cur_group : int  = 1; // Global capture group.
-    max_group : int  = 1;
-    from      : int  = 1;
+    is_active : bool = false;  // If we have a branch reset group.
+    cur_group : int  = 1;      // Next group identifier. 0 == global capture group.
+    max_group : int  = 1;      // Maximum group identifier generated.
+    from      : int  = 1;      // Starting identifier on new alternative branch.
 
+    // Next group identifier.
     next: (inout this) -> int = {
         g := cur_group;
         cur_group += 1;
@@ -415,17 +390,20 @@ parse_context_branch_reset_state: @struct type = {
         return g;
     }
 
+    // Set next group identifier.
     set_next: (inout this, g: int) = {
         cur_group = g;
         max_group = max(max_group, g);
     }
 
+    // Start a new alternative branch.
     next_alternative: (inout this) = {
         if is_active {
             cur_group = from;
         }
     }
 
+    // Initialize for a branch reset group.
     set_active_reset: (inout this, restart: int) = {
         is_active = true;
         cur_group = restart;
@@ -434,19 +412,21 @@ parse_context_branch_reset_state: @struct type = {
     }
 }
 
+// Context during parsing of the regular expressions.
+// 
+// Keeps track of the distributed group identifiers, current parsed group and branch resets.
+//
 parse_context: type = {
-    regex: std::string_view;
-
-    pos: size_t = 0;
-
-    public error_text:    std::string = "";
-    public named_groups:  std::map = ();
+    regex: std::string_view;   // Regular expression string.
+    pos:   size_t = 0;         // Current parsing position.
+    root:  token_ptr;          // Token representing the regular expression.
 
     cur_group_state:        parse_context_group_state = ();
     cur_branch_reset_state: parse_context_branch_reset_state = ();
 
-    root: token_ptr;
-
+    
+    public named_groups:  std::map = ();
+    public error_text:    std::string = "";
 
     operator=:(out this, r: std::string_view) = {
         regex = r;
@@ -456,6 +436,7 @@ parse_context: type = {
     // State management functions
     //
 
+    // Returned group state needs to be stored and provided in `end_group`.
     start_group: (inout this) -> parse_context_group_state = {
         old_state: parse_context_group_state = ();
         old_state..swap(cur_group_state);
@@ -464,8 +445,9 @@ parse_context: type = {
         return old_state;
     }
 
+    // `old_state` argument needs to be from start group.
     end_group: (inout this, old_state: parse_context_group_state) -> token_ptr = {
-        inner := cur_group_state..get_tokens();
+        inner := cur_group_state..get_as_token();
         cur_group_state = old_state;
         return inner;
     }
@@ -500,13 +482,9 @@ parse_context: type = {
         cur_branch_reset_state..next_alternative();
     }
 
-    // Position management functions
+    // Regex token management
     //
 
-    get_pos: (this) pos;
-
-    get_range: (this, start: int, end: int) std::string(regex..substr(start, end - start + 1));
-
     add_token: (inout this, token: token_ptr) = {
         cur_group_state..add(token);
     }
@@ -525,11 +503,13 @@ parse_context: type = {
         return r;
     }
 
-    get_tokens: (inout this) -> token_ptr = {
+    get_as_token: (inout this) -> token_ptr = {
         return root;
     }
 
     // Group management
+    //
+
     get_cur_group: (this) -> int = {
         return cur_branch_reset_state.cur_group;
     }
@@ -553,55 +533,13 @@ parse_context: type = {
             return iter*.second;
         }
     }
+    
+    // Position management functions
+    //
 
     current: (this) -> char = { return regex[pos]; }
 
-    private next_impl: (inout this, in_class: bool, no_skip: bool) -> bool = {
-        pos = get_next_position(in_class, no_skip);
-        if pos != regex..size() {
-            return true;
-        }
-        else {
-            return false;
-        }
-    }
-
-    next: (inout this)          next_impl(false, false);
-    next_in_class: (inout this) next_impl(true, false);
-    next_no_skip: (inout this)  next_impl(false, true);
-
-    next_n: (inout this, n: int) -> bool = {
-        r := true;
-        cur := 0;
-        while r && cur < n next (r = next()) {
-            cur += 1;
-        }
-        return r;
-    }
-
-    has_next: (this) -> bool = { return pos < regex..size(); }
-
-    valid: (this) -> bool = { return has_next() && error_text..empty(); }
-
-    error: (inout this, err: std::string) -> token_ptr = {
-        error_text = err;
-        return nullptr;
-    }
-
-    join: (list, func) -> std::string = {
-        r: std::string = "";
-
-        separator: std::string = "";
-        for list do (cur) {
-            r += separator + func(cur);
-            separator = ", ";
-        }
-
-        return r;
-    }
-
-    join: (list: std::vector) join(list, :(arg) -> _ == arg); // Todo: Shorthand syntax for const lambda
-
+    // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
     private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = {
         perl_syntax := false;
         if !no_skip {
@@ -640,9 +578,33 @@ parse_context: type = {
         return cur;
     }
 
+    // Return true if next token is available.
+    private next_impl: (inout this, in_class: bool, no_skip: bool) -> bool = {
+        pos = get_next_position(in_class, no_skip);
+        if pos != regex..size() {
+            return true;
+        }
+        else {
+            return false;
+        }
+    }
+
+    next:          (inout this) next_impl(false, false);
+    next_in_class: (inout this) next_impl(true, false);
+    next_no_skip:  (inout this) next_impl(false, true);
+
+    next_n: (inout this, n: int) -> bool = {
+        r := true;
+        cur := 0;
+        while r && cur < n next (r = next()) {
+            cur += 1;
+        }
+        return r;
+    }
+
+    has_next: (this) -> bool = { return pos < regex..size(); }
 
     private grab_until_impl: (inout this, in e: std::string, out r: std::string, any: bool) -> bool = {
-        start := pos;
         end:= pos;
         if any {
             end = regex..find_first_of(e, pos);
@@ -652,7 +614,7 @@ parse_context: type = {
         }
 
         if end != std::string_view::npos {
-            r = regex..substr(start, end - pos);
+            r = regex..substr(pos, end - pos);
             pos = end;
             return true;
         }
@@ -711,6 +673,9 @@ parse_context: type = {
     peek: (in this)          peek_impl(false);
     peek_in_class: (in this) peek_impl(true);
 
+    // Parsing functions
+    //
+
     parser_group_modifiers: (inout this, change_str: std::string, inout parser_modifiers: expression_flags) -> bool = {
         is_negative := false;
         is_reset    := false;
@@ -811,15 +776,27 @@ parse_context: type = {
 
         r := parse_until('\0');
         if r {
-            root = cur_group_state..get_tokens();
+            root = cur_group_state..get_as_token();
         }
 
         return r;
     }
 
+    // Misc functions
+
+    get_pos:   (this)                       pos;
+    get_range: (this, start: int, end: int) std::string(regex..substr(start, end - start + 1));
+    valid:     (this) -> bool               = { return has_next() && error_text..empty(); }
 
+    error: (inout this, err: std::string) -> token_ptr = {
+        error_text = err;
+        return nullptr;
+    }
 }
 
+// Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
+// function here.
+//
 generation_function_context: @struct type = {
     code: std::string = "";
     tabs: std::string = "";
@@ -836,83 +813,43 @@ generation_function_context: @struct type = {
     }
 }
 
+// Context for generating the state machine.
 generation_context: type = {
 
-    gen_stack: std::vector = (1);
+    gen_stack: std::vector = (1); // Element 0 contains all the code.
 
-    new_state : bool = true;
     matcher_func: int         = 0;
     reset_func:   int         = 0;
     temp_name:    int         = 0;
     entry_func:   std::string = "";
 
+    // Generation helpers
+    //
+
     match_parameters: (this) -> std::string = { return "r.pos, ctx"; }
 
+    // Code generation.
+
+    // Add code line.
     add: (inout this, s: std::string) = {
         cur := get_current();
         cur*.code += "(cur*.tabs)$(s)$\n";
     }
 
+    // Add check for token. The check needs to be a function call that returns a boolean.
     add_check: (inout this, check: std::string) = {
         cur := get_current();
         cur*.code += "(cur*.tabs)$if !cpp2::regex::(check)$ { r.matched = false; break; }\n";
     }
 
-    add_statefull: (inout this, next_func: std::string, c: std::string) = {
-        end_func_statefull(c);
+    // Add a statefull check. The check needs to return a `match_return`.
+    add_statefull: (inout this, next_func: std::string, check: std::string) = {
+        end_func_statefull(check);
 
         name := next_func..substr(0, next_func..size() - 2);
         start_func_named(name);
     }
 
-    run: (inout this, token: token_ptr) -> std::string = {
-        entry_func = generate_func(token);
-
-        return get_base()*.code;
-    }
-
-    generate_func: (inout this, token: token_ptr) -> std::string = {
-        name := start_func();
-        token*..generate_code(this);
-        end_func();
-
-        return name;
-    }
-
-    generate_reset: (inout this, groups: std::set) -> std::string = {
-        if groups..empty() {
-            return "cpp2::regex::no_reset()";
-        }
-
-        name := gen_reset_func_name();
-        cur := new_context();
-
-        cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
-        cur*.code += "(cur*.tabs)$  operator(): (this, inout ctx) = {\n";
-        for groups do (g) {
-            cur*.code += "(cur*.tabs)$  ctx..set_group_invalid((g)$);\n";
-        }
-        cur*.code += "(cur*.tabs)$  }\n";
-        cur*.code += "(cur*.tabs)$}\n";
-
-        finish_context();
-
-        return name + "()";
-    }
-
-
-    get_current: (inout this) -> *generation_function_context = {
-        return gen_stack..back()&;
-    }
-
-    get_base: (inout this) -> *generation_function_context = {
-        return gen_stack[0]&;
-    }
-
-    next_func_name: (inout this) -> std::string = {
-        return gen_func_name() + "()";
-    }
-
     protected start_func_named: (inout this, name: std::string) = {
         cur := new_context();
 
@@ -923,13 +860,13 @@ generation_context: type = {
         cur*..add_tabs(3);
     }
 
-    start_func: (inout this) -> std::string = {
+    protected start_func: (inout this) -> std::string = {
         name := gen_func_name();
         start_func_named(name);
         return name + "()";
     }
 
-    end_func_statefull: (inout this, s: std::string) = {
+    protected end_func_statefull: (inout this, s: std::string) = {
         cur := get_current();
         cur*..remove_tabs(3);
         cur*.code += "\n";
@@ -947,20 +884,50 @@ generation_context: type = {
         finish_context();
     }
 
-    end_func: (inout this) = {
-        end_func_statefull("other(r.pos, ctx)");
+    // Generate the function for a token.
+    generate_func: (inout this, token: token_ptr) -> std::string = {
+        name := start_func();
+        token*..generate_code(this);
+        end_func_statefull("other((match_parameters())$)");
+
+        return name;
     }
 
-    get_entry_func: (this) -> std::string = {
-        return entry_func;
+    // Generate the reset for a list of group identifiers.
+    generate_reset: (inout this, groups: std::set) -> std::string = {
+        if groups..empty() {
+            return "cpp2::regex::no_reset()";
+        }
+
+        name := gen_reset_func_name();
+        cur := new_context();
+
+        cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
+        cur*.code += "(cur*.tabs)$  operator(): (this, inout ctx) = {\n";
+        for groups do (g) {
+            cur*.code += "(cur*.tabs)$  ctx..set_group_invalid((g)$);\n";
+        }
+        cur*.code += "(cur*.tabs)$  }\n";
+        cur*.code += "(cur*.tabs)$}\n";
+
+        finish_context();
+
+        return name + "()";
     }
 
+    // Name generation
+    //
+
     protected gen_func_name: (inout this) -> std::string = {
         cur_id : = matcher_func;
         matcher_func += 1;
         return "func_(cur_id)$";
     }
 
+    next_func_name: (inout this) -> std::string = {
+        return gen_func_name() + "()";
+    }
+
     protected gen_reset_func_name: (inout this) -> std::string = {
         cur_id : = reset_func;
         reset_func += 1;
@@ -973,6 +940,9 @@ generation_context: type = {
         return "tmp_(cur_id)$";
     }
 
+    // Context management
+    //
+
     new_context: (inout this) -> *generation_function_context = {
         gen_stack..push_back(generation_function_context());
         cur := get_current();
@@ -989,6 +959,21 @@ generation_context: type = {
         gen_stack..pop_back();
     }
 
+    // Misc functions
+    //
+
+    private get_current: (inout this) -> *generation_function_context = {
+        return gen_stack..back()&;
+    }
+
+    private get_base: (inout this) -> *generation_function_context = {
+        return gen_stack[0]&;
+    }
+
+    get_entry_func: (this) -> std::string = {
+        return entry_func;
+    }
+
     create_named_group_lookup: (this, named_groups: std::map) -> std::string = {
         res: std::string = "get_named_group_index: (name) -> int = {\n";
 
@@ -1010,39 +995,22 @@ generation_context: type = {
         res += "}\n";
         return res;
     }
-}
-
-regex_token_list: @polymorphic_base type = {
-    this: regex_token;
-
-    public tokens: token_vec;
-
-    operator=:(out this, t: token_vec) = {
-        regex_token = (gen_string(t));
-        tokens = t;
-    }
 
-    generate_code: (virtual this, inout ctx: generation_context) = {
-        for tokens do (token) {
-            token*..generate_code(ctx);
-        }
-    }
 
-    add_groups: (virtual this, inout groups: std::set) = {
-        for tokens do (token) {
-            token*..add_groups(groups);
-        }
-    }
+    // Run the generation for the token.
+    run: (inout this, token: token_ptr) -> std::string = {
+        entry_func = generate_func(token);
 
-    gen_string: (vec: token_vec) -> std::string = {
-        r : std::string = "";
-        for vec do (token) {
-            r += token*..to_string();
-        }
-        return r;
+        return get_base()*.code;
     }
 }
 
+//-----------------------------------------------------------------------
+//
+// Matchers and generators for regular expressions.
+//
+//-----------------------------------------------------------------------
+//
 
 regex_token_base: @polymorphic_base type = {
     this: regex_token;
@@ -1395,7 +1363,7 @@ class_token: @polymorphic_base type = {
                 name: std::string = "";
                 if !ctx..grab_until(":]", out name) { return ctx..error("Could not find end of character class."); }
                 if supported_classes..end() == std::find(supported_classes..begin(), supported_classes..end(), name) {
-                    return ctx..error("Unsupported character class. Supported ones are: (ctx..join(supported_classes))$");
+                    return ctx..error("Unsupported character class. Supported ones are: (join(supported_classes))$");
                 }
 
                 classes..push_back("[:(name)$:]");
@@ -1471,7 +1439,7 @@ class_token: @polymorphic_base type = {
             }
         }
 
-        inner := ctx..join(classes);
+        inner := join(classes);
         string_rep := ctx..get_range(start_pos, end_pos);
         return shared.new(is_negate, ctx..get_modifiers()..has(expression_flags::case_insensitive), inner, string_rep);
     }
@@ -2100,6 +2068,17 @@ octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     return r;
 }
 
+// TODO: @enum as template parameter yields two error:
+//     error: type 'range_flags' of non-type template parameter is not a structural type
+//     error: non-type template parameter has incomplete type 'range_flags'
+
+// Options for range matching.
+range_flags: type = {
+    not_greedy: int == 1;  // Try to take as few as possible.
+    greedy:     int == 2;  // Try to take as many as possible.
+    possessive: int == 3;  // Do not give back after a greedy match. No backtracking.
+}
+
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 range_token: @polymorphic_base type = {
@@ -2583,7 +2562,7 @@ regex_parser:  type = {
         source += "  context: type == cpp2::regex::match_context;";
 
         gen_ctx: generation_context = ();
-        source += gen_ctx..run(parse_ctx..get_tokens());
+        source += gen_ctx..run(parse_ctx..get_as_token());
         source += "  entry: (cur: Iter, inout ctx: context) -> cpp2::regex::match_return = {\n";
         source += "    ctx..set_group_start(0, cur);\n";
         source += "    r := (gen_ctx..get_entry_func())$(cur, ctx, cpp2::regex::true_end_func());\n";
@@ -2594,7 +2573,7 @@ regex_parser:  type = {
         source += gen_ctx..create_named_group_lookup(parse_ctx.named_groups);
         source += "}\n";
 
-        string := parse_ctx..get_tokens()*..to_string();
+        string := parse_ctx..get_as_token()*..to_string();
         source += "  to_string: () -> std::string = { return R\"((modifier_escape)$(string)$(modifier_escape)$(modifier)$)\"; }\n";
         source += "}\n";
 

From 65406dcc352ac0cf77096b9a92d4617799a3695d Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 27 Jun 2024 11:13:13 +0200
Subject: [PATCH 136/161] Continuation of cleanup.

---
 include/cpp2regex.h | 1382 ++++++++++++++++++++-----------------------
 source/reflect.h    |   18 +-
 source/reflect.h2   |    8 +-
 source/regex.h2     |  226 ++++---
 4 files changed, 774 insertions(+), 860 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index e4e9c9bdb8..c71d38fdc6 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,164 +10,160 @@
 
 #line 1 "regex.h2"
 
-#line 19 "regex.h2"
+#line 21 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 35 "regex.h2"
+#line 37 "regex.h2"
 class expression_flags;
     
 
-#line 46 "regex.h2"
+#line 48 "regex.h2"
 template class match_group;
     
 
-#line 55 "regex.h2"
+#line 57 "regex.h2"
 template class match_return;
     
 
-#line 62 "regex.h2"
+#line 64 "regex.h2"
 template class match_context;
 
-#line 124 "regex.h2"
+#line 126 "regex.h2"
 class true_end_func;
     
 
-#line 130 "regex.h2"
+#line 132 "regex.h2"
 class no_reset;
     
 
-#line 135 "regex.h2"
+#line 137 "regex.h2"
 template class on_return;
 
-#line 160 "regex.h2"
+#line 162 "regex.h2"
 template class single_class_entry;
 
-#line 168 "regex.h2"
+#line 170 "regex.h2"
 template class range_class_entry;
 
-#line 176 "regex.h2"
+#line 178 "regex.h2"
 template class combined_class_entry;
     
 
-#line 183 "regex.h2"
+#line 185 "regex.h2"
 template class list_class_entry;
     
 
-#line 190 "regex.h2"
+#line 192 "regex.h2"
 template class named_class_entry;
     
 
-#line 195 "regex.h2"
+#line 197 "regex.h2"
 template class negated_class_entry;
     
 
-#line 202 "regex.h2"
+#line 204 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 254 "regex.h2"
+#line 256 "regex.h2"
 class regex_token;
 
-#line 277 "regex.h2"
-class regex_token_list;
+#line 281 "regex.h2"
+class regex_token_check;
     
 
-#line 317 "regex.h2"
-class parse_context_group_state;
-
-#line 378 "regex.h2"
-class parse_context_branch_reset_state;
+#line 297 "regex.h2"
+class regex_token_code;
     
 
-#line 419 "regex.h2"
-class parse_context;
+#line 313 "regex.h2"
+class regex_token_empty;
     
 
-#line 800 "regex.h2"
-class generation_function_context;
+#line 327 "regex.h2"
+class regex_token_list;
     
 
-#line 817 "regex.h2"
-class generation_context;
+#line 367 "regex.h2"
+class parse_context_group_state;
 
-#line 1015 "regex.h2"
-class regex_token_base;
+#line 428 "regex.h2"
+class parse_context_branch_reset_state;
     
 
-#line 1029 "regex.h2"
-class regex_token_check;
+#line 469 "regex.h2"
+class parse_context;
     
 
-#line 1044 "regex.h2"
-class regex_token_code;
+#line 854 "regex.h2"
+class generation_function_context;
     
 
-#line 1060 "regex.h2"
-class regex_token_empty;
-    
+#line 871 "regex.h2"
+class generation_context;
 
-#line 1076 "regex.h2"
+#line 1066 "regex.h2"
 class alternative_token;
     
 
-#line 1094 "regex.h2"
+#line 1080 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1140 "regex.h2"
+#line 1125 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1166 "regex.h2"
+#line 1151 "regex.h2"
 class any_token;
     
 
-#line 1197 "regex.h2"
+#line 1178 "regex.h2"
 class char_token;
     
 
-#line 1325 "regex.h2"
+#line 1306 "regex.h2"
 class class_token;
     
 
-#line 1460 "regex.h2"
+#line 1441 "regex.h2"
 template class class_token_matcher;
 
-#line 1558 "regex.h2"
+#line 1541 "regex.h2"
 class group_ref_token;
     
 
-#line 1692 "regex.h2"
+#line 1685 "regex.h2"
 class group_token;
     
 
-#line 1974 "regex.h2"
+#line 1969 "regex.h2"
 class lookahead_token;
     
 
-#line 2076 "regex.h2"
+#line 2071 "regex.h2"
 class range_flags;
     
 
-#line 2084 "regex.h2"
+#line 2079 "regex.h2"
 class range_token;
     
 
-#line 2221 "regex.h2"
+#line 2216 "regex.h2"
 template class range_token_matcher;
 
-#line 2346 "regex.h2"
+#line 2341 "regex.h2"
 class special_range_token;
     
 
-#line 2433 "regex.h2"
+#line 2428 "regex.h2"
 template class regular_expression;
 
-#line 2522 "regex.h2"
-template class regex_parser;
+#line 2517 "regex.h2"
+template class regex_generator;
 
-#line 2607 "regex.h2"
+#line 2589 "regex.h2"
 }
 }
 
@@ -193,7 +189,9 @@ template class regex_parser;
 template
 using matcher_wrapper_type = typename matcher_wrapper::wrap;
 
-#line 19 "regex.h2"
+using error_func = std::function;
+
+#line 21 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -201,7 +199,7 @@ namespace regex {
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
-#line 35 "regex.h2"
+#line 37 "regex.h2"
 class expression_flags {
 private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val);
 
@@ -231,10 +229,10 @@ public: constexpr auto operator=(expression_flags&& that) noexcept -> expression
 public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default;
 public: [[nodiscard]] auto to_string() const& -> std::string;
 
-#line 42 "regex.h2"
+#line 44 "regex.h2"
 };
 
-#line 46 "regex.h2"
+#line 48 "regex.h2"
 template class match_group {
     public: Iter start {}; 
     public: Iter end {}; 
@@ -242,13 +240,13 @@ template class match_group {
     public: bool matched {false}; 
 };
 
-#line 55 "regex.h2"
+#line 57 "regex.h2"
 template class match_return {
     public: bool matched {false}; 
     public: Iter pos {}; 
 };
 
-#line 62 "regex.h2"
+#line 64 "regex.h2"
 template class match_context
  {
     public: Iter begin; 
@@ -258,76 +256,76 @@ template class match_context
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     public: match_context(match_context const& that);
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-#line 78 "regex.h2"
+#line 80 "regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 86 "regex.h2"
+#line 88 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 92 "regex.h2"
+#line 94 "regex.h2"
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 99 "regex.h2"
+#line 101 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 104 "regex.h2"
+#line 106 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 108 "regex.h2"
+#line 110 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 112 "regex.h2"
+#line 114 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-#line 117 "regex.h2"
+#line 119 "regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> auto;
 
 };
 
-#line 124 "regex.h2"
+#line 126 "regex.h2"
 class true_end_func {
     public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
 };
 
-#line 130 "regex.h2"
+#line 132 "regex.h2"
 class no_reset {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
 
-#line 135 "regex.h2"
+#line 137 "regex.h2"
 template class on_return {
 
     private: Func func; 
 
     public: explicit on_return(Func const& f);
-#line 139 "regex.h2"
+#line 141 "regex.h2"
     public: auto operator=(Func const& f) -> on_return& ;
 
-#line 143 "regex.h2"
+#line 145 "regex.h2"
     public: ~on_return() noexcept;
     public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(on_return const&) -> void = delete;
 
 
-#line 146 "regex.h2"
+#line 148 "regex.h2"
 };
 
-#line 149 "regex.h2"
+#line 151 "regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
 
-#line 160 "regex.h2"
+#line 162 "regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -336,10 +334,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 164 "regex.h2"
+#line 166 "regex.h2"
 };
 
-#line 168 "regex.h2"
+#line 170 "regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -348,10 +346,10 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 172 "regex.h2"
+#line 174 "regex.h2"
 };
 
-#line 176 "regex.h2"
+#line 178 "regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -359,10 +357,10 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 179 "regex.h2"
+#line 181 "regex.h2"
 };
 
-#line 183 "regex.h2"
+#line 185 "regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -370,10 +368,10 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 186 "regex.h2"
+#line 188 "regex.h2"
 };
 
-#line 190 "regex.h2"
+#line 192 "regex.h2"
 template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -381,7 +379,7 @@ template class named_class_en
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 193 "regex.h2"
+#line 195 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -391,10 +389,10 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 198 "regex.h2"
+#line 200 "regex.h2"
 };
 
-#line 202 "regex.h2"
+#line 204 "regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -402,15 +400,15 @@ template class shorthand_clas
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 205 "regex.h2"
+#line 207 "regex.h2"
 };
 
-#line 210 "regex.h2"
+#line 212 "regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 216 "regex.h2"
+#line 218 "regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -425,31 +423,31 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 232 "regex.h2"
+#line 234 "regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 239 "regex.h2"
+#line 241 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 254 "regex.h2"
+#line 256 "regex.h2"
 class regex_token {
 
     public: std::string string_rep; 
 
     public: explicit regex_token(cpp2::impl::in str);
 
-#line 262 "regex.h2"
+#line 264 "regex.h2"
     public: explicit regex_token();
 
-#line 267 "regex.h2"
+#line 269 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void;
@@ -460,26 +458,84 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 272 "regex.h2"
+#line 274 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
 using token_vec = std::vector;
 
+// Adds a check in code generation.
+//
+class regex_token_check: public regex_token {
+
+#line 284 "regex.h2"
+    private: std::string check; 
+
+    public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
+
+#line 291 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~regex_token_check() noexcept;
+
+    public: regex_token_check(regex_token_check const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_check const&) -> void = delete;
+
+
+#line 294 "regex.h2"
+};
+
+// Adds code in code generation.
+class regex_token_code: public regex_token {
+
+#line 300 "regex.h2"
+    private: std::string code; 
+
+    public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
+
+#line 307 "regex.h2"
+    public: auto generate_code(generation_context& ctx) const -> void override;
+    public: virtual ~regex_token_code() noexcept;
+
+    public: regex_token_code(regex_token_code const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_code const&) -> void = delete;
+
+
+#line 310 "regex.h2"
+};
+
+// Token that does not influence the matching. E.g. comment.
+class regex_token_empty: public regex_token {
+
+#line 316 "regex.h2"
+    public: explicit regex_token_empty(cpp2::impl::in str);
+
+#line 320 "regex.h2"
+    public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
+    public: virtual ~regex_token_empty() noexcept;
+
+    public: regex_token_empty(regex_token_empty const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_token_empty const&) -> void = delete;
+
+
+#line 323 "regex.h2"
+};
+
+// Represents a list of regex tokens as one token.
+//
 class regex_token_list: public regex_token {
 
-#line 280 "regex.h2"
+#line 330 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 287 "regex.h2"
+#line 337 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 293 "regex.h2"
+#line 343 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 299 "regex.h2"
+#line 349 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -487,7 +543,7 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 306 "regex.h2"
+#line 356 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -501,7 +557,7 @@ class regex_token_list: public regex_token {
 //
 class parse_context_group_state {
 
-#line 320 "regex.h2"
+#line 370 "regex.h2"
     public: token_vec cur_match_list {};           // Current list of matchers.
     public: token_vec alternate_match_lists {};    // List of alternate matcher lists. E.g. ab|cd|xy.
     public: expression_flags modifiers {};         // Current modifiers for the group/regular expression.
@@ -509,27 +565,27 @@ class parse_context_group_state {
     // Start a new alternative.
     public: auto next_alternative() & -> void;
 
-#line 332 "regex.h2"
+#line 382 "regex.h2"
     // Swap this state with the other one.
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 339 "regex.h2"
+#line 389 "regex.h2"
     // Convert this state into a regex token.
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 351 "regex.h2"
+#line 401 "regex.h2"
     // Add a token to the current matcher list.
     public: auto add(cpp2::impl::in token) & -> void;
 
-#line 356 "regex.h2"
+#line 406 "regex.h2"
     // True if current matcher list is empty.
     public: [[nodiscard]] auto empty() const& -> bool;
 
-#line 360 "regex.h2"
+#line 410 "regex.h2"
     // Apply optimizations to the matcher list.
     public: static auto post_process_list(token_vec& list) -> void;
 
-#line 374 "regex.h2"
+#line 424 "regex.h2"
 };
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
@@ -543,19 +599,19 @@ class parse_context_branch_reset_state {
     // Next group identifier.
     public: [[nodiscard]] auto next() & -> int;
 
-#line 393 "regex.h2"
+#line 443 "regex.h2"
     // Set next group identifier.
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 399 "regex.h2"
+#line 449 "regex.h2"
     // Start a new alternative branch.
     public: auto next_alternative() & -> void;
 
-#line 406 "regex.h2"
+#line 456 "regex.h2"
     // Initialize for a branch reset group.
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
 
-#line 413 "regex.h2"
+#line 463 "regex.h2"
 };
 
 // Context during parsing of the regular expressions.
@@ -570,74 +626,74 @@ class parse_context {
     private: parse_context_group_state cur_group_state {}; 
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
 
-#line 428 "regex.h2"
+#line 478 "regex.h2"
            public: std::map named_groups {}; 
-           public: std::string error_text {""}; 
 
-    public: explicit parse_context(cpp2::impl::in r);
-#line 431 "regex.h2"
-    public: auto operator=(cpp2::impl::in r) -> parse_context& ;
+    private: error_func error_out; // TODO: Declaring std::function fails for cpp2.
+    private: bool has_error {false}; 
+
+    public: explicit parse_context(cpp2::impl::in r, auto const& e);
 
-#line 436 "regex.h2"
+#line 489 "regex.h2"
     // State management functions
     //
 
     // Returned group state needs to be stored and provided in `end_group`.
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 448 "regex.h2"
+#line 501 "regex.h2"
     // `old_state` argument needs to be from start group.
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 455 "regex.h2"
+#line 508 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 459 "regex.h2"
+#line 512 "regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 463 "regex.h2"
+#line 516 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 474 "regex.h2"
+#line 527 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 480 "regex.h2"
+#line 533 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 485 "regex.h2"
+#line 538 "regex.h2"
     // Regex token management
     //
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 492 "regex.h2"
+#line 545 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 496 "regex.h2"
+#line 549 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 506 "regex.h2"
+#line 559 "regex.h2"
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 510 "regex.h2"
+#line 563 "regex.h2"
     // Group management
     //
 
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 517 "regex.h2"
+#line 570 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 521 "regex.h2"
+#line 574 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 527 "regex.h2"
+#line 580 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 537 "regex.h2"
+#line 590 "regex.h2"
     // Position management functions
     //
 
@@ -646,36 +702,36 @@ class parse_context {
     // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 581 "regex.h2"
+#line 634 "regex.h2"
     // Return true if next token is available.
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 592 "regex.h2"
+#line 645 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 605 "regex.h2"
+#line 658 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 627 "regex.h2"
+#line 680 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 643 "regex.h2"
+#line 696 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 663 "regex.h2"
+#line 716 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 673 "regex.h2"
+#line 726 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -684,13 +740,13 @@ class parse_context {
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 734 "regex.h2"
+#line 787 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 771 "regex.h2"
+#line 824 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
 
-#line 785 "regex.h2"
+#line 838 "regex.h2"
     // Misc functions
 
     public: [[nodiscard]] auto get_pos() const& -> auto;
@@ -702,7 +758,7 @@ class parse_context {
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 795 "regex.h2"
+#line 849 "regex.h2"
 };
 
 // Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
@@ -714,10 +770,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 811 "regex.h2"
+#line 865 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 814 "regex.h2"
+#line 868 "regex.h2"
 };
 
 // Context for generating the state machine.
@@ -740,71 +796,71 @@ class generation_context {
     // Add code line.
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 839 "regex.h2"
+#line 893 "regex.h2"
     // Add check for token. The check needs to be a function call that returns a boolean.
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 845 "regex.h2"
+#line 899 "regex.h2"
     // Add a statefull check. The check needs to return a `match_return`.
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void;
 
-#line 853 "regex.h2"
+#line 907 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 863 "regex.h2"
+#line 917 "regex.h2"
     protected: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 869 "regex.h2"
+#line 923 "regex.h2"
     protected: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 887 "regex.h2"
+#line 941 "regex.h2"
     // Generate the function for a token.
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 896 "regex.h2"
+#line 950 "regex.h2"
     // Generate the reset for a list of group identifiers.
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 918 "regex.h2"
+#line 972 "regex.h2"
     // Name generation
     //
 
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 927 "regex.h2"
+#line 981 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 931 "regex.h2"
+#line 985 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 937 "regex.h2"
+#line 991 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 943 "regex.h2"
+#line 997 "regex.h2"
     // Context management
     //
 
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 954 "regex.h2"
+#line 1008 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 962 "regex.h2"
+#line 1016 "regex.h2"
     // Misc functions
     //
 
     private: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 969 "regex.h2"
+#line 1023 "regex.h2"
     private: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 973 "regex.h2"
+#line 1027 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 977 "regex.h2"
+#line 1031 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
 
-#line 1000 "regex.h2"
+#line 1054 "regex.h2"
     // Run the generation for the token.
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
     public: generation_context() = default;
@@ -812,123 +868,42 @@ class generation_context {
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1006 "regex.h2"
-};
-
-//-----------------------------------------------------------------------
-//
-// Matchers and generators for regular expressions.
-//
-//-----------------------------------------------------------------------
-//
-
-class regex_token_base: public regex_token {
-
-#line 1018 "regex.h2"
-    public: explicit regex_token_base(cpp2::impl::in str);
-
-#line 1022 "regex.h2"
-    public: explicit regex_token_base();
-
-#line 1026 "regex.h2"
-    public: auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void override;
-    public: virtual ~regex_token_base() noexcept;
-
-    public: regex_token_base(regex_token_base const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regex_token_base const&) -> void = delete;
-
-#line 1027 "regex.h2"
-};
-
-class regex_token_check: public regex_token_base {
-
-#line 1032 "regex.h2"
-    private: std::string check; 
-
-    public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
-
-#line 1039 "regex.h2"
-    public: auto generate_code(generation_context& ctx) const -> void override;
-    public: virtual ~regex_token_check() noexcept;
-
-    public: regex_token_check(regex_token_check const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regex_token_check const&) -> void = delete;
-
-
-#line 1042 "regex.h2"
-};
-
-class regex_token_code: public regex_token_base {
-
-#line 1047 "regex.h2"
-    private: std::string code; 
-
-    public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
-
-#line 1054 "regex.h2"
-    public: auto generate_code(generation_context& ctx) const -> void override;
-    public: virtual ~regex_token_code() noexcept;
-
-    public: regex_token_code(regex_token_code const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regex_token_code const&) -> void = delete;
-
-
-#line 1057 "regex.h2"
-};
-
 #line 1060 "regex.h2"
-class regex_token_empty: public regex_token_base {
-
-#line 1063 "regex.h2"
-    public: explicit regex_token_empty(cpp2::impl::in str);
-
-#line 1067 "regex.h2"
-    public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
-    public: virtual ~regex_token_empty() noexcept;
-
-    public: regex_token_empty(regex_token_empty const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regex_token_empty const&) -> void = delete;
-
-
-#line 1070 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen.
 //
-class alternative_token: public regex_token_base {
+class alternative_token: public regex_token_empty {
+                                     // No code gen here. alternative_token_gen is created in the parse_context
 
-#line 1079 "regex.h2"
     public: explicit alternative_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
-
-#line 1089 "regex.h2"
-    public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~alternative_token() noexcept;
 
     public: alternative_token(alternative_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1092 "regex.h2"
+#line 1078 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1098 "regex.h2"
+#line 1083 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1105 "regex.h2"
+#line 1090 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1121 "regex.h2"
+#line 1106 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1127 "regex.h2"
+#line 1112 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -936,73 +911,70 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1138 "regex.h2"
+#line 1123 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1145 "regex.h2"
+#line 1130 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1162 "regex.h2"
+#line 1147 "regex.h2"
 };
 
 //  Regex syntax: .
 //
-class any_token: public regex_token_base {
+class any_token: public regex_token_check {
 
-#line 1169 "regex.h2"
-    private: bool single_line; 
+#line 1154 "regex.h2"
+    public: explicit any_token(cpp2::impl::in single_line);
 
-    public: explicit any_token(cpp2::impl::in single_line_);
-
-#line 1175 "regex.h2"
+#line 1158 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
-
-#line 1181 "regex.h2"
-    public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~any_token() noexcept;
 
     public: any_token(any_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1184 "regex.h2"
+#line 1163 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1197 "regex.h2"
-class char_token: public regex_token_base {
+#line 1176 "regex.h2"
+// Regex syntax: a
+//
+class char_token: public regex_token {
 
-#line 1200 "regex.h2"
+#line 1181 "regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1209 "regex.h2"
+#line 1190 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1213 "regex.h2"
+#line 1194 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1235 "regex.h2"
+#line 1216 "regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1255 "regex.h2"
+#line 1236 "regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1272 "regex.h2"
+#line 1253 "regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1284 "regex.h2"
+#line 1265 "regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -1010,7 +982,7 @@ class char_token: public regex_token_base {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1288 "regex.h2"
+#line 1269 "regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1048,23 +1020,23 @@ class char_token: public regex_token_base {
 
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
-class class_token: public regex_token_base {
+class class_token: public regex_token {
 
-#line 1328 "regex.h2"
+#line 1309 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1339 "regex.h2"
+#line 1320 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1447 "regex.h2"
+#line 1428 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1452 "regex.h2"
+#line 1433 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1072,21 +1044,21 @@ class class_token: public regex_token_base {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1458 "regex.h2"
+#line 1439 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1483 "regex.h2"
+#line 1464 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1495 "regex.h2"
+#line 1476 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1098,35 +1070,37 @@ template c
 
     //     return r;
     // }
-#line 1506 "regex.h2"
+#line 1487 "regex.h2"
 };
 
+// Regex syntax: \a or \n or \[
+//
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1543 "regex.h2"
+#line 1526 "regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1552 "regex.h2"
+#line 1535 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
 //               \k
 //               \k'name_or_number'
 //
-class group_ref_token: public regex_token_base {
+class group_ref_token: public regex_token {
 
-#line 1561 "regex.h2"
+#line 1544 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1570 "regex.h2"
+#line 1553 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1662 "regex.h2"
+#line 1645 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1134,30 +1108,40 @@ class group_ref_token: public regex_token_base {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1665 "regex.h2"
+#line 1648 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1692 "regex.h2"
+#line 1675 "regex.h2"
+// Regex syntax: ()      Example: (abc)
+//               (?:)  (?i:abc)
+//               (?<>:)     (?:abc)
+//               (?#)            (#Step 1 finished)
+//               (?|)             (?|(abc)|(cde))
+//               (?=)             (?=abc)
+//               (?!)             (?!abc)
+//               (*: syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1711 "regex.h2"
+#line 1704 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1838 "regex.h2"
+#line 1831 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1855 "regex.h2"
+#line 1848 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1874 "regex.h2"
+#line 1867 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1166,44 +1150,46 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1880 "regex.h2"
+#line 1873 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1923 "regex.h2"
+#line 1916 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1941 "regex.h2"
+#line 1934 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1953 "regex.h2"
+#line 1946 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1967 "regex.h2"
+#line 1960 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1972 "regex.h2"
+#line 1965 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
+// Parsed in group_token.
+//
 class lookahead_token: public regex_token {
 
-#line 1977 "regex.h2"
+#line 1972 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1984 "regex.h2"
+#line 1979 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1990 "regex.h2"
+#line 1985 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1211,18 +1197,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1993 "regex.h2"
+#line 1988 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 2004 "regex.h2"
+#line 1999 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2031 "regex.h2"
+#line 2026 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1236,12 +1222,12 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2045 "regex.h2"
+#line 2040 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2071 "regex.h2"
+#line 2066 "regex.h2"
 // TODO: @enum as template parameter yields two error:
 //     error: type 'range_flags' of non-type template parameter is not a structural type
 //     error: non-type template parameter has incomplete type 'range_flags'
@@ -1256,13 +1242,13 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2081 "regex.h2"
+#line 2076 "regex.h2"
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2087 "regex.h2"
+#line 2082 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1272,19 +1258,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2164 "regex.h2"
+#line 2159 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2175 "regex.h2"
+#line 2170 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2187 "regex.h2"
+#line 2182 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2205 "regex.h2"
+#line 2200 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2215 "regex.h2"
+#line 2210 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1292,46 +1278,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2219 "regex.h2"
+#line 2214 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2235 "regex.h2"
+#line 2230 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2240 "regex.h2"
+#line 2235 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2245 "regex.h2"
+#line 2240 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2251 "regex.h2"
+#line 2246 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2266 "regex.h2"
+#line 2261 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2294 "regex.h2"
+#line 2289 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2318 "regex.h2"
+#line 2313 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2342 "regex.h2"
+#line 2337 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2349 "regex.h2"
+#line 2344 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1340,7 +1326,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2378 "regex.h2"
+#line 2373 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1349,10 +1335,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2400 "regex.h2"
+#line 2395 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2425 "regex.h2"
+#line 2420 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1363,18 +1349,17 @@ template [[nodiscard]] auto word_boundary_token_mat
 // Regular expression implementation
 template class regular_expression {
 
-#line 2436 "regex.h2"
     public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     public: template using context = matcher::context;
 
-    // TODO: Named multiple return has problems with templates.
     public: template class search_return {
         public: bool matched; 
         public: context ctx; 
+        public: int pos; 
 
-        public: explicit search_return(cpp2::impl::in matched_, context const& ctx_);
+        public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2449 "regex.h2"
+#line 2444 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1389,7 +1374,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2465 "regex.h2"
+#line 2460 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1397,13 +1382,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2477 "regex.h2"
+#line 2472 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2499 "regex.h2"
+#line 2494 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1415,7 +1400,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2512 "regex.h2"
+#line 2507 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1426,43 +1411,33 @@ template class regular_expression {
 //
 
 // Parser and generator for regular expressions.
-template class regex_parser {
+template class regex_generator {
 
     private: std::string_view regex; 
     private: std::string modifier {""}; 
     private: std::string modifier_escape {""}; 
-    private: Error_out error_out; 
 
-    private: size_t pos {0}; 
-    private: bool has_error {false}; 
+    private: Error_out error_out; 
 
     private: std::string source {""}; 
 
-    public: explicit regex_parser(cpp2::impl::in r, Error_out const& e);
-
-#line 2539 "regex.h2"
-    // Misc functions
-    //
-    public: auto error(cpp2::impl::in message) & -> void;
-
-#line 2546 "regex.h2"
-    // Parsing functions
-    //
+    public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
+#line 2532 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2585 "regex.h2"
+#line 2567 "regex.h2"
     private: auto extract_modifiers() & -> void;
-    public: regex_parser(regex_parser const&) = delete; /* No 'that' constructor, suppress copy */
-    public: auto operator=(regex_parser const&) -> void = delete;
+    public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
+    public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2598 "regex.h2"
+#line 2580 "regex.h2"
 };
 
-template [[nodiscard]] auto generate_template(cpp2::impl::in regex, Err const& err) -> std::string;
+template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2607 "regex.h2"
+#line 2589 "regex.h2"
 }
 }
 
@@ -1471,7 +1446,7 @@ template [[nodiscard]] auto generate_template(cpp2::impl::in match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 72 "regex.h2"
+#line 74 "regex.h2"
     }
 
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }{}
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    return *this; }
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }{}
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1596,24 +1571,24 @@ return cpp2::move(_ret) + ")";
 
     // Getter and setter for groups
     //
-#line 78 "regex.h2"
+#line 80 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 80 "regex.h2"
+#line 82 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 86 "regex.h2"
+#line 88 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 92 "regex.h2"
+#line 94 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
@@ -1621,72 +1596,72 @@ return cpp2::move(_ret) + ")";
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 99 "regex.h2"
+#line 101 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 104 "regex.h2"
+#line 106 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 108 "regex.h2"
+#line 110 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 112 "regex.h2"
+#line 114 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
     // Misc functions
     //
 
-#line 117 "regex.h2"
+#line 119 "regex.h2"
     template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
-#line 118 "regex.h2"
+#line 120 "regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 122 "regex.h2"
+#line 124 "regex.h2"
 // End function that returns a valid match.
 //
 
-#line 125 "regex.h2"
+#line 127 "regex.h2"
     [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur);  }
 
-#line 128 "regex.h2"
+#line 130 "regex.h2"
 // Empty group reset function.
 //
 
-#line 131 "regex.h2"
+#line 133 "regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 134 "regex.h2"
+#line 136 "regex.h2"
 // Evaluate func on destruction of the handle.
 
-#line 139 "regex.h2"
+#line 141 "regex.h2"
     template  on_return::on_return(Func const& f)
         : func{ f }{
 
-#line 141 "regex.h2"
+#line 143 "regex.h2"
     }
-#line 139 "regex.h2"
+#line 141 "regex.h2"
     template  auto on_return::operator=(Func const& f) -> on_return& {
         func = f;
         return *this;
 
-#line 141 "regex.h2"
+#line 143 "regex.h2"
     }
 
-#line 143 "regex.h2"
+#line 145 "regex.h2"
     template  on_return::~on_return() noexcept{
         cpp2::move(*this).func();
     }
 
-#line 148 "regex.h2"
+#line 150 "regex.h2"
 // Helper for auto deduction of the Func type.
-#line 149 "regex.h2"
+#line 151 "regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
 //-----------------------------------------------------------------------
@@ -1699,72 +1674,72 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 // Class syntax:  Example: a
 //
 
-#line 162 "regex.h2"
+#line 164 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C;  }
-#line 163 "regex.h2"
+#line 165 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 166 "regex.h2"
+#line 168 "regex.h2"
 // Class syntax: - Example: a-c
 //
 
-#line 170 "regex.h2"
+#line 172 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }();  }
-#line 171 "regex.h2"
+#line 173 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 174 "regex.h2"
+#line 176 "regex.h2"
 // Helper for combining two character classes
 //
 
-#line 177 "regex.h2"
+#line 179 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 178 "regex.h2"
+#line 180 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 181 "regex.h2"
+#line 183 "regex.h2"
 // Class syntax:   Example: abcd
 //
 
-#line 184 "regex.h2"
+#line 186 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c));  }
-#line 185 "regex.h2"
+#line 187 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 188 "regex.h2"
+#line 190 "regex.h2"
 // Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 192 "regex.h2"
+#line 194 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
 
-#line 197 "regex.h2"
+#line 199 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 200 "regex.h2"
+#line 202 "regex.h2"
 // Short class syntax: \  Example: \w
 //
 
-#line 203 "regex.h2"
+#line 205 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 204 "regex.h2"
+#line 206 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
 
-#line 208 "regex.h2"
+#line 210 "regex.h2"
 // Named basic character classes
 //
 
-#line 214 "regex.h2"
+#line 216 "regex.h2"
 // Named other classes
 //
 
-#line 230 "regex.h2"
+#line 232 "regex.h2"
 // Shorthand class entries
 //
 
-#line 245 "regex.h2"
+#line 247 "regex.h2"
 //-----------------------------------------------------------------------
 //
 // Tokens for regular expressions.
@@ -1775,55 +1750,99 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 // Basic class for a regex token.
 //
 
-#line 258 "regex.h2"
+#line 260 "regex.h2"
     regex_token::regex_token(cpp2::impl::in str)
         : string_rep{ str }{
 
-#line 260 "regex.h2"
+#line 262 "regex.h2"
     }
 
-#line 262 "regex.h2"
+#line 264 "regex.h2"
     regex_token::regex_token()
         : string_rep{ "" }{
 
-#line 264 "regex.h2"
+#line 266 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
                                                                        // Generate the matching code.
 
-#line 269 "regex.h2"
+#line 271 "regex.h2"
     auto regex_token::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}// Adds all group indices to the set.
-#line 270 "regex.h2"
+#line 272 "regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }// Create a string representation.
-#line 271 "regex.h2"
+#line 273 "regex.h2"
     auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}// Set the string representation.
 
-#line 282 "regex.h2"
+#line 286 "regex.h2"
+    regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
+        : regex_token{ str }
+        , check{ check_ }{
+
+#line 289 "regex.h2"
+    }
+
+#line 291 "regex.h2"
+    auto regex_token_check::generate_code(generation_context& ctx) const -> void{
+        ctx.add_check(check + "(" + ctx.match_parameters() + ")");
+    }
+
+    regex_token_check::~regex_token_check() noexcept{}
+
+#line 302 "regex.h2"
+    regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
+        : regex_token{ str }
+        , code{ code_ }{
+
+#line 305 "regex.h2"
+    }
+
+#line 307 "regex.h2"
+    auto regex_token_code::generate_code(generation_context& ctx) const -> void{
+        ctx.add(code);
+    }
+
+    regex_token_code::~regex_token_code() noexcept{}
+
+#line 316 "regex.h2"
+    regex_token_empty::regex_token_empty(cpp2::impl::in str)
+        : regex_token{ str }{
+
+#line 318 "regex.h2"
+    }
+
+#line 320 "regex.h2"
+    auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
+        // Nothing.
+    }
+
+    regex_token_empty::~regex_token_empty() noexcept{}
+
+#line 332 "regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 285 "regex.h2"
+#line 335 "regex.h2"
     }
 
-#line 287 "regex.h2"
+#line 337 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
         }
     }
 
-#line 293 "regex.h2"
+#line 343 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).add_groups(groups);
         }
     }
 
-#line 299 "regex.h2"
+#line 349 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -1834,7 +1853,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 325 "regex.h2"
+#line 375 "regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
@@ -1842,14 +1861,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 333 "regex.h2"
+#line 383 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 340 "regex.h2"
+#line 390 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_as_token() & -> token_ptr{
         if (alternate_match_lists.empty()) {
             post_process_list(cur_match_list);
@@ -1861,15 +1880,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 352 "regex.h2"
+#line 402 "regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void{
         cur_match_list.push_back(token);
     }
 
-#line 357 "regex.h2"
+#line 407 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty();  }
 
-#line 361 "regex.h2"
+#line 411 "regex.h2"
     auto parse_context_group_state::post_process_list(token_vec& list) -> void{
         // Merge all characters
         auto merge_pos {CPP2_UFCS(begin)(list)}; 
@@ -1884,7 +1903,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 385 "regex.h2"
+#line 435 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1893,20 +1912,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 394 "regex.h2"
+#line 444 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 400 "regex.h2"
+#line 450 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 407 "regex.h2"
+#line 457 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1914,28 +1933,16 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 431 "regex.h2"
-    parse_context::parse_context(cpp2::impl::in r)
+#line 483 "regex.h2"
+    parse_context::parse_context(cpp2::impl::in r, auto const& e)
         : regex{ r }
-        , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }{
-
-#line 434 "regex.h2"
-    }
-#line 431 "regex.h2"
-    auto parse_context::operator=(cpp2::impl::in r) -> parse_context& {
-        regex = r;
-        pos = 0;
-        root = CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "");
-        cur_group_state = {};
-        cur_branch_reset_state = {};
-        named_groups = {};
-        error_text = "";
-        return *this;
+        , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }
+        , error_out{ e }{
 
-#line 434 "regex.h2"
+#line 487 "regex.h2"
     }
 
-#line 440 "regex.h2"
+#line 493 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         old_state.swap(cur_group_state);
@@ -1944,24 +1951,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 449 "regex.h2"
+#line 502 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
         auto inner {cur_group_state.get_as_token()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 455 "regex.h2"
+#line 508 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 459 "regex.h2"
+#line 512 "regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 466 "regex.h2"
+#line 519 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -1970,30 +1977,30 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 474 "regex.h2"
+#line 527 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 480 "regex.h2"
+#line 533 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
-#line 488 "regex.h2"
+#line 541 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         cur_group_state.add(token);
     }
 
-#line 492 "regex.h2"
+#line 545 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(cur_group_state.empty()); 
     }
 
-#line 496 "regex.h2"
+#line 549 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2004,29 +2011,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 506 "regex.h2"
+#line 559 "regex.h2"
     [[nodiscard]] auto parse_context::get_as_token() & -> token_ptr{
         return root; 
     }
 
-#line 513 "regex.h2"
+#line 566 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 517 "regex.h2"
+#line 570 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return cur_branch_reset_state.next(); 
     }
 
-#line 521 "regex.h2"
+#line 574 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 527 "regex.h2"
+#line 580 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {named_groups.find(name)}; 
         if (iter == named_groups.end()) {
@@ -2037,10 +2044,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 540 "regex.h2"
+#line 593 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 543 "regex.h2"
+#line 596 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2079,7 +2086,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 582 "regex.h2"
+#line 635 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != regex.size()) {
@@ -2090,14 +2097,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 592 "regex.h2"
+#line 645 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 593 "regex.h2"
+#line 646 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 594 "regex.h2"
+#line 647 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 596 "regex.h2"
+#line 649 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2107,10 +2114,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 605 "regex.h2"
+#line 658 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
 
-#line 607 "regex.h2"
+#line 660 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto end {pos}; 
         if (any) {
@@ -2131,14 +2138,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 627 "regex.h2"
+#line 680 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 628 "regex.h2"
+#line 681 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 629 "regex.h2"
+#line 682 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 631 "regex.h2"
+#line 684 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
             r.construct(regex.substr(pos, n));
@@ -2151,7 +2158,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 643 "regex.h2"
+#line 696 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2172,7 +2179,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(r.value()); 
     }
 
-#line 663 "regex.h2"
+#line 716 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,regex.size())) {
@@ -2183,12 +2190,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 673 "regex.h2"
+#line 726 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 674 "regex.h2"
+#line 727 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 679 "regex.h2"
+#line 732 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2244,7 +2251,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 734 "regex.h2"
+#line 787 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2282,7 +2289,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 771 "regex.h2"
+#line 824 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2297,20 +2304,21 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 787 "regex.h2"
+#line 840 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; }
-#line 788 "regex.h2"
+#line 841 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
-#line 789 "regex.h2"
-    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && error_text.empty(); }
+#line 842 "regex.h2"
+    [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && !(has_error); }
 
-#line 791 "regex.h2"
+#line 844 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
-        error_text = err;
+        has_error = true;
+        error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(err)));
         return nullptr; 
     }
 
-#line 804 "regex.h2"
+#line 858 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2318,27 +2326,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 811 "regex.h2"
+#line 865 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
 
-#line 829 "regex.h2"
+#line 883 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 834 "regex.h2"
+#line 888 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 840 "regex.h2"
+#line 894 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n");
     }
 
-#line 846 "regex.h2"
+#line 900 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void{
         end_func_statefull(check);
 
@@ -2346,7 +2354,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(cpp2::move(name));
     }
 
-#line 853 "regex.h2"
+#line 907 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2357,14 +2365,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 863 "regex.h2"
+#line 917 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 869 "regex.h2"
+#line 923 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
@@ -2383,7 +2391,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 888 "regex.h2"
+#line 942 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         (*cpp2::impl::assert_not_null(token)).generate_code((*this));
@@ -2392,7 +2400,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 897 "regex.h2"
+#line 951 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
@@ -2414,33 +2422,33 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(name) + "()"; 
     }
 
-#line 921 "regex.h2"
+#line 975 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 927 "regex.h2"
+#line 981 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 931 "regex.h2"
+#line 985 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 937 "regex.h2"
+#line 991 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 946 "regex.h2"
+#line 1000 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2449,7 +2457,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 954 "regex.h2"
+#line 1008 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2458,22 +2466,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         gen_stack.pop_back();
     }
 
-#line 965 "regex.h2"
+#line 1019 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &gen_stack.back(); 
     }
 
-#line 969 "regex.h2"
+#line 1023 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 973 "regex.h2"
+#line 1027 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 977 "regex.h2"
+#line 1031 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2496,81 +2504,18 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1001 "regex.h2"
+#line 1055 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 1018 "regex.h2"
-    regex_token_base::regex_token_base(cpp2::impl::in str)
-        : regex_token{ str }{
-
-#line 1020 "regex.h2"
-    }
-
-#line 1022 "regex.h2"
-    regex_token_base::regex_token_base()
-        : regex_token{  }{
-
-#line 1024 "regex.h2"
-    }
-
-#line 1026 "regex.h2"
-    auto regex_token_base::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}
-
-    regex_token_base::~regex_token_base() noexcept{}
-
-#line 1034 "regex.h2"
-    regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
-        : regex_token_base{ str }
-        , check{ check_ }{
-
-#line 1037 "regex.h2"
-    }
-
-#line 1039 "regex.h2"
-    auto regex_token_check::generate_code(generation_context& ctx) const -> void{
-        ctx.add_check(check + "(" + ctx.match_parameters() + ")");
-    }
-
-    regex_token_check::~regex_token_check() noexcept{}
-
-#line 1049 "regex.h2"
-    regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
-        : regex_token_base{ str }
-        , code{ code_ }{
-
-#line 1052 "regex.h2"
-    }
-
-#line 1054 "regex.h2"
-    auto regex_token_code::generate_code(generation_context& ctx) const -> void{
-        ctx.add(code);
-    }
-
-    regex_token_code::~regex_token_code() noexcept{}
-
-#line 1063 "regex.h2"
-    regex_token_empty::regex_token_empty(cpp2::impl::in str)
-        : regex_token_base{ str }{
-
-#line 1065 "regex.h2"
-    }
-
-#line 1067 "regex.h2"
-    auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
-        // Nothing.
-    }
-
-    regex_token_empty::~regex_token_empty() noexcept{}
-
-#line 1079 "regex.h2"
+#line 1069 "regex.h2"
     alternative_token::alternative_token()
-                            : regex_token_base{  }{}
+                            : regex_token_empty{ "" }{}
 
-#line 1081 "regex.h2"
+#line 1071 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2579,22 +2524,17 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared); 
     }
 
-#line 1089 "regex.h2"
-    auto alternative_token::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
-        // No code gen here. alternative_token_gen is created in the parse_context
-    }
-
     alternative_token::~alternative_token() noexcept{}
 
-#line 1100 "regex.h2"
+#line 1085 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1103 "regex.h2"
+#line 1088 "regex.h2"
     }
 
-#line 1105 "regex.h2"
+#line 1090 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2611,14 +2551,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         ctx.add_statefull(next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1121 "regex.h2"
+#line 1106 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1127 "regex.h2"
+#line 1112 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2633,11 +2573,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1142 "regex.h2"
+#line 1127 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1145 "regex.h2"
+#line 1130 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2656,29 +2596,23 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1171 "regex.h2"
-    any_token::any_token(cpp2::impl::in single_line_)
-        : regex_token_base{ "." }
-        , single_line{ single_line_ }{
+#line 1154 "regex.h2"
+    any_token::any_token(cpp2::impl::in single_line)
+        : regex_token_check{ ".", ("any_token_matcher") }{
 
-#line 1173 "regex.h2"
+#line 1156 "regex.h2"
     }
 
-#line 1175 "regex.h2"
+#line 1158 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.get_modifiers().has(expression_flags::single_line)); 
     }
 
-#line 1181 "regex.h2"
-    auto any_token::generate_code(generation_context& ctx) const -> void{
-        ctx.add_check(("any_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
-    }
-
     any_token::~any_token() noexcept{}
 
-#line 1186 "regex.h2"
+#line 1165 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2690,21 +2624,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1203 "regex.h2"
+#line 1184 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
-        : regex_token_base{ std::string(1, t) }
+        : regex_token{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1207 "regex.h2"
+#line 1188 "regex.h2"
     }
 
-#line 1209 "regex.h2"
+#line 1190 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1213 "regex.h2"
+#line 1194 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             std::string upper {token}; 
@@ -2712,14 +2646,14 @@ template [[nodiscard]] auto any_token_matcher(
 {
 size_t i{0};
 
-#line 1218 "regex.h2"
+#line 1199 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1223 "regex.h2"
+#line 1204 "regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2732,7 +2666,7 @@ size_t i{0};
         }
     }
 
-#line 1235 "regex.h2"
+#line 1216 "regex.h2"
     auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         std::string lower_name {"lower_" + cpp2::to_string(name)}; 
@@ -2753,7 +2687,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1255 "regex.h2"
+#line 1236 "regex.h2"
     auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         auto size {token.size()}; 
@@ -2771,7 +2705,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1272 "regex.h2"
+#line 1253 "regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
         str = replace_all(str, "\\", "\\\\");
         str = replace_all(str, "\a", "\\a");
@@ -2784,7 +2718,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1284 "regex.h2"
+#line 1265 "regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2792,17 +2726,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1332 "regex.h2"
+#line 1313 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
-        : regex_token_base{ str }
+        : regex_token{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1337 "regex.h2"
+#line 1318 "regex.h2"
     }
 
-#line 1340 "regex.h2"
+#line 1321 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -2839,7 +2773,7 @@ size_t i{0};
             else {if (ctx.current() == '\\') {
                 if (ctx. next_no_skip()  && (ctx. current() != ']')) {
                     if ( ' ' == ctx. current() && ctx. get_modifiers(). has(expression_flags::perl_code_syntax) && ctx. get_modifiers(). has(expression_flags::perl_code_syntax_in_classes)) {
-                        classes.push_back(std::string(1, ctx.current()));   // TODO: UFCS error with char as argument.
+                        classes.push_back(std::string(1, ctx.current()));
                     }
                     else {
                         auto name {""}; 
@@ -2910,12 +2844,12 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1447 "regex.h2"
+#line 1428 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
-#line 1452 "regex.h2"
+#line 1433 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
@@ -2925,7 +2859,7 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1462 "regex.h2"
+#line 1443 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -2947,7 +2881,7 @@ size_t i{0};
         }
     }
 
-#line 1483 "regex.h2"
+#line 1464 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2960,11 +2894,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1508 "regex.h2"
+#line 1491 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1512 "regex.h2"
+#line 1495 "regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -2996,7 +2930,7 @@ size_t i{0};
 
 }
 
-#line 1545 "regex.h2"
+#line 1528 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -3004,16 +2938,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1564 "regex.h2"
+#line 1547 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
-        : regex_token_base{ str }
+        : regex_token{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1568 "regex.h2"
+#line 1551 "regex.h2"
     }
 
-#line 1570 "regex.h2"
+#line 1553 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3106,14 +3040,14 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1662 "regex.h2"
+#line 1645 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1667 "regex.h2"
+#line 1650 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
@@ -3139,7 +3073,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1698 "regex.h2"
+#line 1691 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3153,7 +3087,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1711 "regex.h2"
+#line 1704 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3281,7 +3215,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1838 "regex.h2"
+#line 1831 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3299,7 +3233,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1855 "regex.h2"
+#line 1848 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add(("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3319,7 +3253,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1874 "regex.h2"
+#line 1867 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3329,7 +3263,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1884 "regex.h2"
+#line 1877 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3369,7 +3303,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1925 "regex.h2"
+#line 1918 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3386,7 +3320,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1941 "regex.h2"
+#line 1934 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3399,7 +3333,7 @@ template [[
     }}
 }
 
-#line 1955 "regex.h2"
+#line 1948 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3412,35 +3346,35 @@ template [[
     }
 }
 
-#line 1967 "regex.h2"
+#line 1960 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1980 "regex.h2"
+#line 1975 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1982 "regex.h2"
+#line 1977 "regex.h2"
     }
 
-#line 1984 "regex.h2"
+#line 1979 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1990 "regex.h2"
+#line 1985 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1995 "regex.h2"
+#line 1990 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3450,14 +3384,14 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2007 "regex.h2"
+#line 2002 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
     auto name {""}; 
     auto c_next {ctx.peek()}; 
 
-    if ('d' == c_next) {name = "named_class_digits"; }
+    if (     'd' == c_next) { name = "named_class_digits"; }
     else {if ('D' == c_next) {name = "named_class_not_digits"; }
     else {if ('h' == c_next) {name = "named_class_hor_space"; }
     else {if ('H' == c_next) {name = "named_class_not_hor_space"; }
@@ -3468,14 +3402,14 @@ template [[nodiscard]] auto lookahead_token_match
     else {if ('V' == c_next) {name = "named_class_not_ver_space"; }
     else {if ('w' == c_next) {name = "named_class_word"; }
     else {if ('W' == cpp2::move(c_next)) {name = "named_class_not_word"; }
-    else {return nullptr; }}}}}}}}}}}
+    else                  { return nullptr; }}}}}}}}}}}
 
     static_cast(ctx.next());// Skip escape
 
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2047 "regex.h2"
+#line 2042 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3500,16 +3434,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2077 "regex.h2"
+#line 2072 "regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2092 "regex.h2"
+#line 2087 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2094 "regex.h2"
+#line 2089 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3553,7 +3487,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2138 "regex.h2"
+#line 2133 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3580,7 +3514,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2164 "regex.h2"
+#line 2159 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3592,7 +3526,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2175 "regex.h2"
+#line 2170 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3605,7 +3539,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2187 "regex.h2"
+#line 2182 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3624,7 +3558,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2205 "regex.h2"
+#line 2200 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3635,14 +3569,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2215 "regex.h2"
+#line 2210 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2223 "regex.h2"
+#line 2218 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3655,26 +3589,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2235 "regex.h2"
+#line 2230 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2240 "regex.h2"
+#line 2235 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2245 "regex.h2"
+#line 2240 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2251 "regex.h2"
+#line 2246 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3690,7 +3624,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2266 "regex.h2"
+#line 2261 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3719,7 +3653,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2294 "regex.h2"
+#line 2289 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3744,7 +3678,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2318 "regex.h2"
+#line 2313 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3770,7 +3704,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2349 "regex.h2"
+#line 2344 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3793,7 +3727,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2372 "regex.h2"
+#line 2367 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3803,7 +3737,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2384 "regex.h2"
+#line 2379 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3820,7 +3754,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2400 "regex.h2"
+#line 2395 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3845,31 +3779,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2444 "regex.h2"
-        template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_)
+#line 2438 "regex.h2"
+        template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
-            , ctx{ ctx_ }{
+            , ctx{ ctx_ }
+            , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2447 "regex.h2"
+#line 2442 "regex.h2"
         }
 
-#line 2449 "regex.h2"
+#line 2444 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2450 "regex.h2"
+#line 2445 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2451 "regex.h2"
+#line 2446 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2452 "regex.h2"
+#line 2447 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2454 "regex.h2"
+#line 2449 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2455 "regex.h2"
+#line 2450 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2456 "regex.h2"
+#line 2451 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2458 "regex.h2"
+#line 2453 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3878,35 +3813,35 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2467 "regex.h2"
+#line 2462 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2468 "regex.h2"
+#line 2463 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2469 "regex.h2"
+#line 2464 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2470 "regex.h2"
+#line 2465 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
         auto r {matcher::entry(start, ctx)}; 
-        return search_return(r.matched && r.pos == end, cpp2::move(ctx)); 
+        return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2477 "regex.h2"
+#line 2472 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2478 "regex.h2"
+#line 2473 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2479 "regex.h2"
+#line 2474 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2480 "regex.h2"
+#line 2475 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
-        auto matched {false}; 
         context ctx {start, end}; 
+        auto r {CPP2_UFCS(fail)(ctx)}; 
 
         auto cur {start}; 
         for( ; true; (++cur) ) {
-            if (matcher::entry(cur, ctx).matched) {
-                matched = true;
+            r = matcher::entry(cur, ctx);
+            if (r.matched) {
                 break;
             }
 
@@ -3915,13 +3850,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             }
         }
 
-        return search_return(cpp2::move(matched), cpp2::move(ctx)); 
+        return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2499 "regex.h2"
+#line 2494 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2504 "regex.h2"
+#line 2499 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3931,30 +3866,23 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2534 "regex.h2"
-    template  regex_parser::regex_parser(cpp2::impl::in r, Error_out const& e)
+#line 2527 "regex.h2"
+    template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2537 "regex.h2"
-    }
-
-#line 2541 "regex.h2"
-    template  auto regex_parser::error(cpp2::impl::in message) & -> void{
-        error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(message)));
-        has_error = true;
+#line 2530 "regex.h2"
     }
 
-#line 2549 "regex.h2"
-    template  [[nodiscard]] auto regex_parser::parse() & -> std::string{
+#line 2532 "regex.h2"
+    template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
         extract_modifiers();
 
-        parse_context parse_ctx {regex}; 
+        parse_context parse_ctx {regex, error_out}; 
         if (!(parse_ctx.parse(modifier))) {
-            error(parse_ctx.error_text);
-            return "Error"; 
+            return ""; 
         }
 
         source += "{\n";
@@ -3982,8 +3910,8 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2585 "regex.h2"
-    template  auto regex_parser::extract_modifiers() & -> void{
+#line 2567 "regex.h2"
+    template  auto regex_generator::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
 
@@ -3997,9 +3925,9 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2600 "regex.h2"
-template [[nodiscard]] auto generate_template(cpp2::impl::in regex, Err const& err) -> std::string{
-    regex_parser parser {regex, err}; 
+#line 2582 "regex.h2"
+template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
+    regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
     static_cast(cpp2::move(parser));
     return r; 
diff --git a/source/reflect.h b/source/reflect.h
index 736d3334e9..61a7e1e6ea 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -39,7 +39,7 @@ class alias_declaration;
 #line 966 "reflect.h2"
 class value_member_info;
 
-#line 1552 "reflect.h2"
+#line 1554 "reflect.h2"
 }
 
 }
@@ -781,7 +781,7 @@ auto print(cpp2::impl::in t) -> void;
 //
 auto regex_gen(meta::type_declaration& t) -> void;
 
-#line 1442 "reflect.h2"
+#line 1444 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  apply_metafunctions
@@ -792,7 +792,7 @@ auto regex_gen(meta::type_declaration& t) -> void;
     auto const& error
     ) -> bool;
 
-#line 1552 "reflect.h2"
+#line 1554 "reflect.h2"
 }
 
 }
@@ -2061,14 +2061,16 @@ auto regex_gen(meta::type_declaration& t) -> void
     CPP2_UFCS(remove_marked_members)(t);
 
     for ( auto const& expr : cpp2::move(expressions) ) {
-        auto regular_expression {::cpp2::regex::generate_template(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
+        auto regular_expression {::cpp2::regex::generate_regex(expr.second, [_0 = t](auto const& message) mutable -> void { CPP2_UFCS(error)(_0, message);  })}; 
 
-        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(cpp2::move(regular_expression))));
-        CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression = ();"));
+        if (!(regular_expression.empty())) {
+            CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + "_matcher: type = " + cpp2::to_string(cpp2::move(regular_expression))));
+            CPP2_UFCS(add_member)(t, ("public " + cpp2::to_string(expr.first) + ": cpp2::regex::regular_expression = ();"));
+        }
     }
 }
 
-#line 1446 "reflect.h2"
+#line 1448 "reflect.h2"
 [[nodiscard]] auto apply_metafunctions(
     declaration_node& n, 
     type_declaration& rtype, 
@@ -2174,7 +2176,7 @@ auto regex_gen(meta::type_declaration& t) -> void
     return true; 
 }
 
-#line 1552 "reflect.h2"
+#line 1554 "reflect.h2"
 }
 
 }
diff --git a/source/reflect.h2 b/source/reflect.h2
index 31a943c0e3..fa66b85e81 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1431,10 +1431,12 @@ regex_gen: (inout t: meta::type_declaration) =
     t.remove_marked_members();
 
     for expressions do (expr) {
-        regular_expression:= ::cpp2::regex::generate_template(expr.second, :(message: _) = t$.error(message););
+        regular_expression := ::cpp2::regex::generate_regex(expr.second, :(message) = t$.error(message););
 
-        t.add_member("public (expr.first)$_matcher: type = (regular_expression)$");
-        t.add_member("public (expr.first)$: cpp2::regex::regular_expression = ();");
+        if !regular_expression..empty() {
+            t.add_member("public (expr.first)$_matcher: type = (regular_expression)$");
+            t.add_member("public (expr.first)$: cpp2::regex::regular_expression = ();");
+        }
     }
 }
 
diff --git a/source/regex.h2 b/source/regex.h2
index 4426b68d25..8cd850f2cb 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -16,6 +16,8 @@
 template
 using matcher_wrapper_type = typename matcher_wrapper::wrap;
 
+using error_func = std::function;
+
 cpp2: namespace = {
 
 regex: namespace = {
@@ -274,6 +276,54 @@ regex_token: @polymorphic_base type = {
 token_ptr : type == std::shared_ptr;
 token_vec: type == std::vector;
 
+// Adds a check in code generation.
+//
+regex_token_check: @polymorphic_base type = {
+    this: regex_token;
+
+    check: std::string;
+
+    operator=:(out this, str: std::string, check_: std::string) = {
+        regex_token = (str);
+        check = check_;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx..add_check(check + "(" + ctx..match_parameters() + ")");
+    }
+}
+
+// Adds code in code generation.
+regex_token_code: @polymorphic_base type = {
+    this: regex_token;
+
+    code: std::string;
+
+    operator=:(out this, str: std::string, code_: std::string) = {
+        regex_token = (str);
+        code = code_;
+    }
+
+    generate_code: (override this, inout ctx: generation_context) = {
+        ctx..add(code);
+    }
+}
+
+// Token that does not influence the matching. E.g. comment.
+regex_token_empty: @polymorphic_base type = {
+    this: regex_token;
+
+    operator=:(out this, str: std::string) = {
+        regex_token = (str);
+    }
+
+    generate_code: (override this, inout _: generation_context) = {
+        // Nothing.
+    }
+}
+
+// Represents a list of regex tokens as one token.
+//
 regex_token_list: @polymorphic_base type = {
     this: regex_token;
 
@@ -426,11 +476,14 @@ parse_context: type = {
 
     
     public named_groups:  std::map = ();
-    public error_text:    std::string = "";
 
-    operator=:(out this, r: std::string_view) = {
+    error_out: error_func; // TODO: Declaring std::function fails for cpp2.
+    has_error: bool      = false;
+
+    operator=:(out this, r: std::string_view, e) = {
         regex = r;
         root = shared.new("");
+        error_out = e;
     }
 
     // State management functions
@@ -786,10 +839,11 @@ parse_context: type = {
 
     get_pos:   (this)                       pos;
     get_range: (this, start: int, end: int) std::string(regex..substr(start, end - start + 1));
-    valid:     (this) -> bool               = { return has_next() && error_text..empty(); }
+    valid:     (this) -> bool               = { return has_next() && !has_error; }
 
     error: (inout this, err: std::string) -> token_ptr = {
-        error_text = err;
+        has_error = true;
+        error_out("Error during parsing of regex '(regex)$' at position '(pos)$': (err)$");
         return nullptr;
     }
 }
@@ -1005,76 +1059,12 @@ generation_context: type = {
     }
 }
 
-//-----------------------------------------------------------------------
-//
-// Matchers and generators for regular expressions.
-//
-//-----------------------------------------------------------------------
-//
-
-regex_token_base: @polymorphic_base type = {
-    this: regex_token;
-
-    operator=:(out this, str: std::string) = {
-        regex_token = (str);
-    }
-
-    operator=:(out this) = {
-        regex_token = ();
-    }
-
-    add_groups: (override this, inout _: std::set) = {}
-}
-
-regex_token_check: @polymorphic_base type = {
-    this: regex_token_base;
-
-    check: std::string;
-
-    operator=:(out this, str: std::string, check_: std::string) = {
-        regex_token_base = (str);
-        check = check_;
-    }
-
-    generate_code: (override this, inout ctx: generation_context) = {
-        ctx..add_check(check + "(" + ctx..match_parameters() + ")");
-    }
-}
-
-regex_token_code: @polymorphic_base type = {
-    this: regex_token_base;
-
-    code: std::string;
-
-    operator=:(out this, str: std::string, code_: std::string) = {
-        regex_token_base = (str);
-        code = code_;
-    }
-
-    generate_code: (override this, inout ctx: generation_context) = {
-        ctx..add(code);
-    }
-}
-
-
-regex_token_empty: @polymorphic_base type = {
-    this: regex_token_base;
-
-    operator=:(out this, str: std::string) = {
-        regex_token_base = (str);
-    }
-
-    generate_code: (override this, inout _: generation_context) = {
-        // Nothing.
-    }
-}
-
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen.
 //
 alternative_token: @polymorphic_base type = {
-    this: regex_token_base = ();
+    this: regex_token_empty = ("");  // No code gen here. alternative_token_gen is created in the parse_context
 
     operator=:(out this) = {}
 
@@ -1085,16 +1075,11 @@ alternative_token: @polymorphic_base type = {
         ctx..next_alternative();
         return shared.new();
     }
-
-    generate_code: (override this, inout _: generation_context) = {
-        // No code gen here. alternative_token_gen is created in the parse_context
-    }
 }
 
 alternative_token_gen: @polymorphic_base type = {
     this: regex_token;
 
-
     alternatives: token_vec;
 
     operator=: (out this, a: token_vec) = {
@@ -1164,12 +1149,10 @@ alternative_token_matcher:  type = {
 //  Regex syntax: .
 //
 any_token: @polymorphic_base type = {
-    this: regex_token_base = (".");
-
-    single_line: bool;
+    this: regex_token_check = (".");
 
-    operator=:(out this, single_line_: bool) = {
-        single_line = single_line_;
+    operator=:(out this, single_line: bool) = {
+        regex_token_check = (".", "any_token_matcher");
     }
 
     parse: (inout ctx: parse_context) -> token_ptr = {
@@ -1177,10 +1160,6 @@ any_token: @polymorphic_base type = {
 
         return shared.new(ctx..get_modifiers()..has(expression_flags::single_line));
     }
-
-    generate_code: (override this, inout ctx: generation_context) = {
-        ctx..add_check("any_token_matcher((ctx..match_parameters())$)");
-    }
 }
 
 any_token_matcher:  (inout cur, inout ctx) -> bool = {
@@ -1194,14 +1173,16 @@ any_token_matcher:  (inout cur, inout ctx) -> bool = {
     }
 }
 
+// Regex syntax: a
+//
 char_token: @polymorphic_base type = {
-    this: regex_token_base;
+    this: regex_token;
 
     token: std::string;
     ignore_case: bool;
 
     operator=: (out this, t: char, ignore_case_: bool) = {
-        regex_token_base = (std::string(1, t));
+        regex_token = (std::string(1, t));
         token = t;
         ignore_case = ignore_case_;
     }
@@ -1323,14 +1304,14 @@ char_token: @polymorphic_base type = {
 // Regex syntax: []  Example: [abcx-y[:digits:]]
 //
 class_token: @polymorphic_base type = {
-    this: regex_token_base = ();
+    this: regex_token = ();
 
     negate: bool;
     case_insensitive: bool;
     class_str: std::string;
 
     operator=: (out this, negate_: bool, case_insensitive_: bool, class_str_: std::string, str: std::string) = {
-        regex_token_base = str;
+        regex_token = str;
         negate = negate_;
         case_insensitive = case_insensitive_;
         class_str = class_str_;
@@ -1373,7 +1354,7 @@ class_token: @polymorphic_base type = {
             else if ctx..current() == '\\' {
                 if ctx..next_no_skip()  && (ctx..current() != ']') {
                     if  ' ' == ctx..current() && ctx..get_modifiers()..has(expression_flags::perl_code_syntax) && ctx..get_modifiers()..has(expression_flags::perl_code_syntax_in_classes) {
-                        classes..push_back(std::string(1, ctx..current())); // TODO: UFCS error with char as argument.
+                        classes..push_back(std::string(1, ctx..current()));
                     }
                     else {
                         name := "";
@@ -1505,6 +1486,8 @@ class_token_matcher:  typ
     // }
 }
 
+// Regex syntax: \a or \n or \[
+//
 escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
     if ctx..current() != '\\' { return nullptr; }
 
@@ -1556,13 +1539,13 @@ global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = {
 //               \k'name_or_number'
 //
 group_ref_token: @polymorphic_base type = {
-    this: regex_token_base = ();
+    this: regex_token = ();
 
     id: int;
     case_insensitive: bool;
 
     operator=:(out this, id_: int, case_insensitive_: bool, str: std::string) = {
-        regex_token_base = str;
+        regex_token = str;
         id = id_;
         case_insensitive = case_insensitive_;
     }
@@ -1689,6 +1672,16 @@ group_ref_token_matcher:  (inout cur,
     }
 }
 
+// Regex syntax: ()      Example: (abc)
+//               (?:)  (?i:abc)
+//               (?<>:)     (?:abc)
+//               (?#)            (#Step 1 finished)
+//               (?|)             (?|(abc)|(cde))
+//               (?=)             (?=abc)
+//               (?!)             (?!abc)
+//               (*: (cur, inout ctx) -> bool
 
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
+// Parsed in group_token.
+//
 lookahead_token: @polymorphic_base type = {
     this: regex_token = ("");
 
@@ -2010,7 +2005,7 @@ named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
     name := "";
     c_next := ctx..peek();
 
-    if 'd' == c_next { name = "named_class_digits"; }
+    if      'd' == c_next { name = "named_class_digits"; }
     else if 'D' == c_next { name = "named_class_not_digits"; }
     else if 'h' == c_next { name = "named_class_hor_space"; }
     else if 'H' == c_next { name = "named_class_not_hor_space"; }
@@ -2021,7 +2016,7 @@ named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
     else if 'V' == c_next { name = "named_class_not_ver_space"; }
     else if 'w' == c_next { name = "named_class_word"; }
     else if 'W' == c_next { name = "named_class_not_word"; }
-    else { return nullptr; }
+    else                  { return nullptr; }
 
     _ = ctx..next(); // Skip escape
 
@@ -2432,18 +2427,18 @@ word_boundary_token_matcher:  (inout cur, inout ctx) -> boo
 // Regular expression implementation
 regular_expression:  type = {
 
-
     matcher:  type == matcher_wrapper_type; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     context:  type == matcher::context;
 
-    // TODO: Named multiple return has problems with templates.
     search_return:  type = {
         public matched: bool;
-        public ctx: context;
+        public ctx:     context;
+        public pos:     int;
 
-        operator=:(out this, matched_: bool, ctx_: context) = {
+        operator=:(out this, matched_: bool, ctx_: context, pos_: Iter) = {
             matched = matched_;
             ctx = ctx_;
+            pos = unsafe_narrow(std::distance(ctx_.begin, pos_));
         }
 
         group_number: (this) ctx..size();
@@ -2471,20 +2466,20 @@ regular_expression:  type = {
         ctx: context = (start, end);
 
         r := matcher::entry(start, ctx);
-        return search_return(r.matched && r.pos == end, ctx);
+        return search_return(r.matched && r.pos == end, ctx, r.pos);
     }
 
     search: (in this, str: bview)                 search(str..begin(), str..end());
     search: (in this, str: bview, start)          search(get_iter(str, start), str..end());
     search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
     search:  (in this, start: Iter, end: Iter) -> search_return = {
-        matched := false;
         ctx: context = (start, end);
+        r := ctx.fail();
 
         cur:= start;
         while true next (cur++) {
-            if matcher::entry(cur, ctx).matched {
-                matched = true;
+            r = matcher::entry(cur, ctx);
+            if r.matched {
                 break;
             }
 
@@ -2493,7 +2488,7 @@ regular_expression:  type = {
             }
         }
 
-        return search_return(matched, ctx);
+        return search_return(r.matched, ctx, r.pos);
     }
 
     to_string: (in this) matcher_wrapper::to_string();
@@ -2519,42 +2514,29 @@ regular_expression:  type = {
 //
 
 // Parser and generator for regular expressions.
-regex_parser:  type = {
+regex_generator:  type = {
 
     regex:           std::string_view;
     modifier:        std::string = "";
     modifier_escape: std::string = "";
-    error_out:       Error_out;
 
-    pos:                    size_t = 0;
-    has_error:              bool = false;
+    error_out: Error_out;
 
     source: std::string = "";
 
     operator=: (out this, r: std::string_view, e: Error_out) = {
-        this.regex = r;
-        this.error_out = e;
-    }
-
-    // Misc functions
-    //
-    error:(inout this, message: std::string) = {
-        error_out("Error during parsing of regex '(regex)$' at position '(pos)$': (message)$");
-        has_error = true;
+        regex = r;
+        error_out = e;
     }
 
-    // Parsing functions
-    //
-
     parse:(inout this) -> std::string = {
 
         // Extract modifiers and adapt regex.
         extract_modifiers();
 
-        parse_ctx: parse_context = (regex);
+        parse_ctx: parse_context = (regex, error_out);
         if !parse_ctx..parse(modifier) {
-            error(parse_ctx.error_text);
-            return "Error";
+            return "";
         }
 
         source += "{\n";
@@ -2597,8 +2579,8 @@ regex_parser:  type = {
     }
 }
 
-generate_template:  (regex: std::string_view, err: Err) -> std::string = {
-    parser: regex_parser = (regex, err);
+generate_regex:  (regex: std::string_view, err: Err) -> std::string = {
+    parser: regex_generator = (regex, err);
     r := parser..parse();
     _ = parser;
     return r;

From 8f250d3194bbcdb19051f9316dbf947297550c07 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Thu, 27 Jun 2024 15:53:13 +0200
Subject: [PATCH 137/161] Added namespace ot string_util.h.

---
 include/cpp2regex.h   | 76 +++++++++++++++++++++----------------------
 include/string_util.h |  8 ++++-
 source/reflect.h      |  2 +-
 source/reflect.h2     |  2 +-
 source/regex.h2       | 64 ++++++++++++++++++------------------
 5 files changed, 79 insertions(+), 73 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index c71d38fdc6..1edec50a5f 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -56,7 +56,7 @@ template class list_class_entry;
     
 
 #line 192 "regex.h2"
-template class named_class_entry;
+template class named_class_entry;
     
 
 #line 197 "regex.h2"
@@ -64,7 +64,7 @@ template class negated_class_entry;
     
 
 #line 204 "regex.h2"
-template class shorthand_class_entry;
+template class shorthand_class_entry;
     
 
 #line 256 "regex.h2"
@@ -372,7 +372,7 @@ template class list_class_entry {
 };
 
 #line 192 "regex.h2"
-template class named_class_entry {
+template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: named_class_entry() = default;
@@ -393,7 +393,7 @@ template class negated_class_entry: public Inner
 };
 
 #line 204 "regex.h2"
-template class shorthand_class_entry {
+template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: shorthand_class_entry() = default;
@@ -986,7 +986,7 @@ class char_token: public regex_token {
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
-// char_token_matcher:  (inout cur, inout ctx) -> bool = {
+// char_token_matcher:  (inout cur, inout ctx) -> bool = {
 //     if !(std::distance(cur, ctx.end) < tokens..size()) {
 //         return false;
 //     }
@@ -1002,7 +1002,7 @@ class char_token: public regex_token {
 //     return matched;
 // }
 
-// char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
+// char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
 //     if !(std::distance(cur, ctx.end) < lower..size()) {
 //         return false;
 //     }
@@ -1711,9 +1711,9 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 //
 
 #line 193 "regex.h2"
-    template  [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
+    template  [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
 #line 194 "regex.h2"
-    template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
+    template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
 
 #line 199 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
@@ -1723,9 +1723,9 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 //
 
 #line 205 "regex.h2"
-    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
+    template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
 #line 206 "regex.h2"
-    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
+    template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
 
 #line 210 "regex.h2"
 // Named basic character classes
@@ -2648,8 +2648,8 @@ size_t i{0};
 
 #line 1199 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
-                CPP2_ASSERT_IN_BOUNDS(lower, i) = safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
-                CPP2_ASSERT_IN_BOUNDS(upper, i) = safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
+                CPP2_ASSERT_IN_BOUNDS(lower, i) = string_util::safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
+                CPP2_ASSERT_IN_BOUNDS(upper, i) = string_util::safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
@@ -2707,13 +2707,13 @@ size_t i{0};
 
 #line 1253 "regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
-        str = replace_all(str, "\\", "\\\\");
-        str = replace_all(str, "\a", "\\a");
-        str = replace_all(str, "\f", "\\f");
-        str = replace_all(str, "\e", "\\e");
-        str = replace_all(str, "\n", "\\n");
-        str = replace_all(str, "\r", "\\r");
-        str = replace_all(str, "\t", "\\t");
+        str = string_util::replace_all(str, "\\", "\\\\");
+        str = string_util::replace_all(str, "\a", "\\a");
+        str = string_util::replace_all(str, "\f", "\\f");
+        str = string_util::replace_all(str, "\e", "\\e");
+        str = string_util::replace_all(str, "\n", "\\n");
+        str = string_util::replace_all(str, "\r", "\\r");
+        str = string_util::replace_all(str, "\t", "\\t");
 
         return cpp2::move(str); 
     }
@@ -2763,7 +2763,7 @@ size_t i{0};
                 std::string name {""}; 
                 if (!(ctx.grab_until(":]", cpp2::impl::out(&name)))) {return ctx.error("Could not find end of character class."); }
                 if (supported_classes.end() == std::find(supported_classes.begin(), supported_classes.end(), name)) {
-                    return ctx.error(("Unsupported character class. Supported ones are: " + cpp2::to_string(join(supported_classes)))); 
+                    return ctx.error(("Unsupported character class. Supported ones are: " + cpp2::to_string(string_util::join(supported_classes)))); 
                 }
 
                 classes.push_back(("[:" + cpp2::to_string(cpp2::move(name)) + ":]"));
@@ -2777,7 +2777,7 @@ size_t i{0};
                     }
                     else {
                         auto name {""}; 
-                            if ('d' == ctx.current()) {name = "short_digits"; }
+                        if (     'd' == ctx. current()) { name = "short_digits"; }
                         else {if ('D' == ctx.current()) {name = "short_not_digits"; }
                         else {if ('h' == ctx.current()) {name = "short_hor_space"; }
                         else {if ('H' == ctx.current()) {name = "short_not_hor_space"; }
@@ -2839,7 +2839,7 @@ size_t i{0};
             }}
         }
 
-        auto inner {join(cpp2::move(classes))}; 
+        auto inner {string_util::join(cpp2::move(classes))}; 
         auto string_rep {ctx.get_range(cpp2::move(start_pos), cpp2::move(end_pos))}; 
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
@@ -2862,7 +2862,7 @@ size_t i{0};
 #line 1443 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
-            if (cur != ctx.end && negate != (match_any(safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
+            if (cur != ctx.end && negate != (match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
                 cur += 1;
                 return true; 
             }
@@ -2960,12 +2960,12 @@ size_t i{0};
             if (cpp2::impl::cmp_greater_eq(group.size(),cpp2::impl::as_())) {
                 // Octal syntax (\000) not a group ref matcher.
                 auto number {0}; 
-                if (!(string_to_int(group, number, 8))) {return ctx.error("Could not convert octal to int."); }
+                if (!(string_util::string_to_int(group, number, 8))) {return ctx.error("Could not convert octal to int."); }
 
                 char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
                 auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
-                (*cpp2::impl::assert_not_null(token)).set_string(("\\" + cpp2::to_string(int_to_string(cpp2::impl::as_(cpp2::move(number_as_char)), 8))));
+                (*cpp2::impl::assert_not_null(token)).set_string(("\\" + cpp2::to_string(string_util::int_to_string(cpp2::impl::as_(cpp2::move(number_as_char)), 8))));
 
                 return token; 
             }
@@ -3016,9 +3016,9 @@ size_t i{0};
         }}}
 
         // Parse the group
-        group = trim_copy(group);
+        group = string_util::trim_copy(group);
         int group_id {0}; 
-        if (string_to_int(group, group_id)) {
+        if (string_util::string_to_int(group, group_id)) {
             if (cpp2::impl::cmp_less(group_id,0)) {
                 group_id = ctx.get_cur_group() + group_id;
 
@@ -3054,7 +3054,7 @@ template [[nodiscard]] auto gr
     auto group_pos {cpp2::move(g).start}; 
     for( ; group_pos != g.end && cur != ctx.end; (++group_pos, ++cur) ) {
         if constexpr (case_insensitive) {
-            if (safe_tolower(*cpp2::impl::assert_not_null(group_pos)) != safe_tolower(*cpp2::impl::assert_not_null(cur))) {
+            if (string_util::safe_tolower(*cpp2::impl::assert_not_null(group_pos)) != string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) {
                 return false; 
             }
         }
@@ -3287,12 +3287,12 @@ template [[nodiscard]] auto gr
     }
 
     auto number {0}; 
-    if (!(string_to_int(cpp2::move(number_str), number, 16))) {return ctx.error("Could not convert hexadecimal to int."); }
+    if (!(string_util::string_to_int(cpp2::move(number_str), number, 16))) {return ctx.error("Could not convert hexadecimal to int."); }
 
     // TODO: Change for unicode.
     char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-    std::string syntax {int_to_string(cpp2::impl::as_(number_as_char), 16)}; 
+    std::string syntax {string_util::int_to_string(cpp2::impl::as_(number_as_char), 16)}; 
     if (cpp2::move(has_brackets)) {
         syntax = { "{" + cpp2::to_string(syntax) + "}" };
     }
@@ -3423,12 +3423,12 @@ template [[nodiscard]] auto lookahead_token_match
     if (!(ctx.grab_until('}', cpp2::impl::out(&number_str)))) {return ctx.error("No ending bracket for \\o"); }
 
     auto number {0}; 
-    if (!(string_to_int(cpp2::move(number_str), number, 8))) {return ctx.error("Could not convert octal to int."); }
+    if (!(string_util::string_to_int(cpp2::move(number_str), number, 8))) {return ctx.error("Could not convert octal to int."); }
 
     // TODO: Change for unicode.
     char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-    std::string syntax {"\\o{" + cpp2::to_string(int_to_string(cpp2::impl::as_(number_as_char), 8)) + "}"}; 
+    std::string syntax {"\\o{" + cpp2::to_string(string_util::int_to_string(cpp2::impl::as_(number_as_char), 8)) + "}"}; 
     auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
     (*cpp2::impl::assert_not_null(r)).set_string(cpp2::move(syntax));
     return r; 
@@ -3452,7 +3452,7 @@ template [[nodiscard]] auto lookahead_token_match
             std::string inner {""}; 
             if (!(ctx.grab_until('}', cpp2::impl::out(&inner)))) {return ctx.error("Missing closing bracket '}'."); }
 
-            inner = trim_copy(inner.substr(1));  // Remove '{' and white spaces.
+            inner = string_util::trim_copy(inner.substr(1));  // Remove '{' and white spaces.
             if (inner.empty()) {return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
             // Non-greedy or possessive
@@ -3466,12 +3466,12 @@ template [[nodiscard]] auto lookahead_token_match
             if (sep == std::string::npos) {
                 min_count_str = inner;
                 max_count_str = inner;
-                if (!(string_to_int(cpp2::move(inner), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); }
+                if (!(string_util::string_to_int(cpp2::move(inner), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); }
                 (*cpp2::impl::assert_not_null(r)).max_count = (*cpp2::impl::assert_not_null(r)).min_count;
             }
             else {
-                std::string inner_first {trim_copy(inner.substr(0, sep))}; 
-                std::string inner_last {trim_copy(cpp2::move(inner).substr(cpp2::move(sep) + 1))}; 
+                std::string inner_first {string_util::trim_copy(inner.substr(0, sep))}; 
+                std::string inner_last {string_util::trim_copy(cpp2::move(inner).substr(cpp2::move(sep) + 1))}; 
 
                 if ((inner_first.empty() && inner_last.empty())) {
                     return ctx.error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); 
@@ -3479,11 +3479,11 @@ template [[nodiscard]] auto lookahead_token_match
 
                 if (!(inner_first.empty())) {
                     min_count_str = inner_first;
-                    if (!(string_to_int(cpp2::move(inner_first), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); }
+                    if (!(string_util::string_to_int(cpp2::move(inner_first), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); }
                 }
                 if (!(inner_last.empty())) {
                     max_count_str = inner_last;
-                    if (!(string_to_int(cpp2::move(inner_last), (*cpp2::impl::assert_not_null(r)).max_count))) {return ctx.error("Could not convert range to number."); }
+                    if (!(string_util::string_to_int(cpp2::move(inner_last), (*cpp2::impl::assert_not_null(r)).max_count))) {return ctx.error("Could not convert range to number."); }
                 }
             }
 
diff --git a/include/string_util.h b/include/string_util.h
index 37d3ede1f0..678e643438 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -4,6 +4,9 @@
 #include 
 #include 
 
+namespace cpp2 {
+namespace string_util {
+
 // From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring
 
 // trim from start (in place)
@@ -139,4 +142,7 @@ inline std::string join(List const& list) {
     }
 
     return r;
-}
\ No newline at end of file
+}
+
+} // namespace string_util
+} // namespace cpp2
\ No newline at end of file
diff --git a/source/reflect.h b/source/reflect.h
index 61a7e1e6ea..3412fd892c 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -2047,7 +2047,7 @@ auto regex_gen(meta::type_declaration& t) -> void
             if (CPP2_UFCS(starts_with)(expr, "R\"(") && CPP2_UFCS(ends_with)(expr, ")\"")) {
                 expr = CPP2_UFCS(substr)(expr, 3, CPP2_UFCS(size)(expr) - 5);
             }
-            else {if (CPP2_UFCS(is_escaped)(expr)) {
+            else {if (string_util::is_escaped(expr)) {
                 expr = CPP2_UFCS(substr)(expr, 1, CPP2_UFCS(size)(expr) - 2);
             }
             else {
diff --git a/source/reflect.h2 b/source/reflect.h2
index fa66b85e81..d261b9f87f 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1417,7 +1417,7 @@ regex_gen: (inout t: meta::type_declaration) =
             if expr.starts_with("R\"(") && expr.ends_with(")\"") {
                 expr = expr.substr(3, expr.size() - 5);
             }
-            else if expr.is_escaped() {
+            else if string_util::is_escaped(expr) {
                 expr = expr.substr(1, expr.size() - 2);
             }
             else {
diff --git a/source/regex.h2 b/source/regex.h2
index 8cd850f2cb..c42563fad7 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -189,7 +189,7 @@ list_class_entry:  type = {
 
 // Class syntax: [: type = {
+named_class_entry:  type = {
     includes: (c: CharT) Inner::includes(c);
     to_string: ()        "[:(Name..data())$:]";
 }
@@ -201,7 +201,7 @@ negated_class_entry:  type = {
 
 // Short class syntax: \  Example: \w
 //
-shorthand_class_entry:  type = {
+shorthand_class_entry:  type = {
     includes: (c: CharT) Inner::includes(c);
     to_string: ()        Name..str();
 }
@@ -1197,8 +1197,8 @@ char_token: @polymorphic_base type = {
             lower: std::string = token;
 
             (copy i: size_t = 0) while i < token..size() next i += 1 {
-                lower[i] = safe_tolower(token[i]);
-                upper[i] = safe_toupper(token[i]);
+                lower[i] = string_util::safe_tolower(token[i]);
+                upper[i] = string_util::safe_toupper(token[i]);
             }
 
             if upper != lower {
@@ -1251,13 +1251,13 @@ char_token: @polymorphic_base type = {
     }
 
     add_escapes: (this, copy str: std::string) -> std::string = {
-        str = replace_all(str, "\\", "\\\\");
-        str = replace_all(str, "\a", "\\a");
-        str = replace_all(str, "\f", "\\f");
-        str = replace_all(str, "\e", "\\e");
-        str = replace_all(str, "\n", "\\n");
-        str = replace_all(str, "\r", "\\r");
-        str = replace_all(str, "\t", "\\t");
+        str = string_util::replace_all(str, "\\", "\\\\");
+        str = string_util::replace_all(str, "\a", "\\a");
+        str = string_util::replace_all(str, "\f", "\\f");
+        str = string_util::replace_all(str, "\e", "\\e");
+        str = string_util::replace_all(str, "\n", "\\n");
+        str = string_util::replace_all(str, "\r", "\\r");
+        str = string_util::replace_all(str, "\t", "\\t");
 
         return str;
     }
@@ -1269,7 +1269,7 @@ char_token: @polymorphic_base type = {
 }
 
 // TODO: Check if vectorization works at some point with this implementation.
-// char_token_matcher:  (inout cur, inout ctx) -> bool = {
+// char_token_matcher:  (inout cur, inout ctx) -> bool = {
 //     if !(std::distance(cur, ctx.end) < tokens..size()) {
 //         return false;
 //     }
@@ -1285,7 +1285,7 @@ char_token: @polymorphic_base type = {
 //     return matched;
 // }
 
-// char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
+// char_token_case_insensitive_matcher:  (inout cur, inout ctx) -> bool = {
 //     if !(std::distance(cur, ctx.end) < lower..size()) {
 //         return false;
 //     }
@@ -1344,7 +1344,7 @@ class_token: @polymorphic_base type = {
                 name: std::string = "";
                 if !ctx..grab_until(":]", out name) { return ctx..error("Could not find end of character class."); }
                 if supported_classes..end() == std::find(supported_classes..begin(), supported_classes..end(), name) {
-                    return ctx..error("Unsupported character class. Supported ones are: (join(supported_classes))$");
+                    return ctx..error("Unsupported character class. Supported ones are: (string_util::join(supported_classes))$");
                 }
 
                 classes..push_back("[:(name)$:]");
@@ -1358,7 +1358,7 @@ class_token: @polymorphic_base type = {
                     }
                     else {
                         name := "";
-                            if 'd' == ctx..current() { name = "short_digits"; }
+                        if      'd' == ctx..current() { name = "short_digits"; }
                         else if 'D' == ctx..current() { name = "short_not_digits"; }
                         else if 'h' == ctx..current() { name = "short_hor_space"; }
                         else if 'H' == ctx..current() { name = "short_not_hor_space"; }
@@ -1420,7 +1420,7 @@ class_token: @polymorphic_base type = {
             }
         }
 
-        inner := join(classes);
+        inner := string_util::join(classes);
         string_rep := ctx..get_range(start_pos, end_pos);
         return shared.new(is_negate, ctx..get_modifiers()..has(expression_flags::case_insensitive), inner, string_rep);
     }
@@ -1442,7 +1442,7 @@ class_token_matcher:  typ
 {
     match: (inout cur, inout ctx) -> bool = {
         if constexpr case_insensitive {
-            if cur != ctx.end && negate != ( match_any(safe_tolower(cur*)) || match_any(safe_toupper(cur*))) {
+            if cur != ctx.end && negate != ( match_any(string_util::safe_tolower(cur*)) || match_any(string_util::safe_toupper(cur*))) {
                 cur += 1;
                 return true;
             }
@@ -1562,12 +1562,12 @@ group_ref_token: @polymorphic_base type = {
             if group..size() >= 3 as size_t {
                 // Octal syntax (\000) not a group ref matcher.
                 number := 0;
-                if !string_to_int(group, number, 8) { return ctx..error("Could not convert octal to int."); }
+                if !string_util::string_to_int(group, number, 8) { return ctx..error("Could not convert octal to int."); }
 
                 number_as_char : char = unsafe_narrow(number);
 
                 token := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
-                token*..set_string("\\(int_to_string(number_as_char as int, 8))$");
+                token*..set_string("\\(string_util::int_to_string(number_as_char as int, 8))$");
 
                 return token;
             }
@@ -1618,9 +1618,9 @@ group_ref_token: @polymorphic_base type = {
         }
 
         // Parse the group
-        group = trim_copy(group);
+        group = string_util::trim_copy(group);
         group_id : int = 0;
-        if string_to_int(group, group_id) {
+        if string_util::string_to_int(group, group_id) {
             if group_id < 0 {
                 group_id = ctx..get_cur_group() + group_id;
 
@@ -1653,7 +1653,7 @@ group_ref_token_matcher:  (inout cur,
     group_pos := g.start;
     while group_pos != g.end && cur != ctx.end next (group_pos++, cur++) {
         if constexpr case_insensitive {
-            if safe_tolower(group_pos*) != safe_tolower(cur*) {
+            if string_util::safe_tolower(group_pos*) != string_util::safe_tolower(cur*) {
                 return false;
             }
         }
@@ -1897,12 +1897,12 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
 
     number := 0;
-    if !string_to_int(number_str, number, 16) { return ctx..error("Could not convert hexadecimal to int."); }
+    if !string_util::string_to_int(number_str, number, 16) { return ctx..error("Could not convert hexadecimal to int."); }
 
     // TODO: Change for unicode.
     number_as_char : char = unsafe_narrow(number);
 
-    syntax: std::string = int_to_string(number_as_char as int, 16);
+    syntax: std::string = string_util::int_to_string(number_as_char as int, 16);
     if has_brackets {
         syntax = "{(syntax)$}";
     }
@@ -2052,12 +2052,12 @@ octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     if !ctx..grab_until('}', out number_str) { return ctx..error("No ending bracket for \\o"); }
 
     number := 0;
-    if !string_to_int(number_str, number, 8) { return ctx..error("Could not convert octal to int."); }
+    if !string_util::string_to_int(number_str, number, 8) { return ctx..error("Could not convert octal to int."); }
 
     // TODO: Change for unicode.
     number_as_char : char = unsafe_narrow(number);
 
-    syntax: std::string = "\\o{(int_to_string(number_as_char as int, 8))$}";
+    syntax: std::string = "\\o{(string_util::int_to_string(number_as_char as int, 8))$}";
     r := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
     r*..set_string(syntax);
     return r;
@@ -2094,7 +2094,7 @@ range_token: @polymorphic_base type = {
             inner: std::string = "";
             if !ctx..grab_until('}', out inner) { return ctx..error("Missing closing bracket '}'."); }
 
-            inner = trim_copy(inner..substr(1)); // Remove '{' and white spaces.
+            inner = string_util::trim_copy(inner..substr(1)); // Remove '{' and white spaces.
             if inner..empty() { return ctx..error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'"); }
 
             // Non-greedy or possessive
@@ -2108,12 +2108,12 @@ range_token: @polymorphic_base type = {
             if sep == std::string::npos {
                 min_count_str = inner;
                 max_count_str = inner;
-                if !string_to_int(inner, r*.min_count) { return ctx..error("Could not convert range to number."); }
+                if !string_util::string_to_int(inner, r*.min_count) { return ctx..error("Could not convert range to number."); }
                 r*.max_count = r*.min_count;
             }
             else {
-                inner_first: std::string = trim_copy(inner..substr(0, sep));
-                inner_last: std::string = trim_copy(inner..substr(sep + 1));
+                inner_first: std::string = string_util::trim_copy(inner..substr(0, sep));
+                inner_last: std::string = string_util::trim_copy(inner..substr(sep + 1));
 
                 if (inner_first..empty() && inner_last..empty()) {
                     return ctx..error("Empty range specifier. Either '{n}', '{n,}', '{,m}' '{n,m}'");
@@ -2121,11 +2121,11 @@ range_token: @polymorphic_base type = {
 
                 if !inner_first..empty() {
                     min_count_str = inner_first;
-                    if !string_to_int(inner_first, r*.min_count) { return ctx..error("Could not convert range to number."); }
+                    if !string_util::string_to_int(inner_first, r*.min_count) { return ctx..error("Could not convert range to number."); }
                 }
                 if !inner_last..empty() {
                     max_count_str = inner_last;
-                    if !string_to_int(inner_last, r*.max_count) { return ctx..error("Could not convert range to number."); }
+                    if !string_util::string_to_int(inner_last, r*.max_count) { return ctx..error("Could not convert range to number."); }
                 }
             }
 

From 4c492c16e061c33d75ebf7fe9f66a037c0b44dd6 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 28 Jun 2024 11:06:20 +0200
Subject: [PATCH 138/161] Fixes for compiler warnings.

---
 include/cpp2regex.h | 523 ++++++++++++++++++++++----------------------
 source/regex.h2     |  11 +-
 2 files changed, 264 insertions(+), 270 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 1edec50a5f..ed01c237ae 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -97,73 +97,73 @@ class parse_context_branch_reset_state;
 class parse_context;
     
 
-#line 854 "regex.h2"
+#line 851 "regex.h2"
 class generation_function_context;
     
 
-#line 871 "regex.h2"
+#line 868 "regex.h2"
 class generation_context;
 
-#line 1066 "regex.h2"
+#line 1063 "regex.h2"
 class alternative_token;
     
 
-#line 1080 "regex.h2"
+#line 1077 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1125 "regex.h2"
+#line 1122 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1151 "regex.h2"
+#line 1148 "regex.h2"
 class any_token;
     
 
-#line 1178 "regex.h2"
+#line 1175 "regex.h2"
 class char_token;
     
 
-#line 1306 "regex.h2"
+#line 1303 "regex.h2"
 class class_token;
     
 
-#line 1441 "regex.h2"
+#line 1438 "regex.h2"
 template class class_token_matcher;
 
-#line 1541 "regex.h2"
+#line 1538 "regex.h2"
 class group_ref_token;
     
 
-#line 1685 "regex.h2"
+#line 1682 "regex.h2"
 class group_token;
     
 
-#line 1969 "regex.h2"
+#line 1966 "regex.h2"
 class lookahead_token;
     
 
-#line 2071 "regex.h2"
+#line 2068 "regex.h2"
 class range_flags;
     
 
-#line 2079 "regex.h2"
+#line 2076 "regex.h2"
 class range_token;
     
 
-#line 2216 "regex.h2"
+#line 2213 "regex.h2"
 template class range_token_matcher;
 
-#line 2341 "regex.h2"
+#line 2338 "regex.h2"
 class special_range_token;
     
 
-#line 2428 "regex.h2"
+#line 2425 "regex.h2"
 template class regular_expression;
 
-#line 2517 "regex.h2"
+#line 2514 "regex.h2"
 template class regex_generator;
 
-#line 2589 "regex.h2"
+#line 2586 "regex.h2"
 }
 }
 
@@ -187,7 +187,7 @@ template class regex_generator;
 #include 
 
 template
-using matcher_wrapper_type = typename matcher_wrapper::wrap;
+using matcher_wrapper_type = typename matcher_wrapper::template wrap;
 
 using error_func = std::function;
 
@@ -740,13 +740,13 @@ class parse_context {
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 787 "regex.h2"
+#line 784 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 824 "regex.h2"
+#line 821 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
 
-#line 838 "regex.h2"
+#line 835 "regex.h2"
     // Misc functions
 
     public: [[nodiscard]] auto get_pos() const& -> auto;
@@ -758,7 +758,7 @@ class parse_context {
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 849 "regex.h2"
+#line 846 "regex.h2"
 };
 
 // Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
@@ -770,10 +770,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 865 "regex.h2"
+#line 862 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 868 "regex.h2"
+#line 865 "regex.h2"
 };
 
 // Context for generating the state machine.
@@ -796,71 +796,71 @@ class generation_context {
     // Add code line.
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 893 "regex.h2"
+#line 890 "regex.h2"
     // Add check for token. The check needs to be a function call that returns a boolean.
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 899 "regex.h2"
+#line 896 "regex.h2"
     // Add a statefull check. The check needs to return a `match_return`.
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void;
 
-#line 907 "regex.h2"
+#line 904 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 917 "regex.h2"
+#line 914 "regex.h2"
     protected: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 923 "regex.h2"
+#line 920 "regex.h2"
     protected: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 941 "regex.h2"
+#line 938 "regex.h2"
     // Generate the function for a token.
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 950 "regex.h2"
+#line 947 "regex.h2"
     // Generate the reset for a list of group identifiers.
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 972 "regex.h2"
+#line 969 "regex.h2"
     // Name generation
     //
 
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 981 "regex.h2"
+#line 978 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 985 "regex.h2"
+#line 982 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 991 "regex.h2"
+#line 988 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 997 "regex.h2"
+#line 994 "regex.h2"
     // Context management
     //
 
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1008 "regex.h2"
+#line 1005 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 1016 "regex.h2"
+#line 1013 "regex.h2"
     // Misc functions
     //
 
     private: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 1023 "regex.h2"
+#line 1020 "regex.h2"
     private: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 1027 "regex.h2"
+#line 1024 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 1031 "regex.h2"
+#line 1028 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
 
-#line 1054 "regex.h2"
+#line 1051 "regex.h2"
     // Run the generation for the token.
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
     public: generation_context() = default;
@@ -868,7 +868,7 @@ class generation_context {
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1060 "regex.h2"
+#line 1057 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -887,23 +887,23 @@ class alternative_token: public regex_token_empty {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1078 "regex.h2"
+#line 1075 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1083 "regex.h2"
+#line 1080 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1090 "regex.h2"
+#line 1087 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1106 "regex.h2"
+#line 1103 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1112 "regex.h2"
+#line 1109 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -911,31 +911,31 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1123 "regex.h2"
+#line 1120 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1130 "regex.h2"
+#line 1127 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1147 "regex.h2"
+#line 1144 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_check {
 
-#line 1154 "regex.h2"
+#line 1151 "regex.h2"
     public: explicit any_token(cpp2::impl::in single_line);
 
-#line 1158 "regex.h2"
+#line 1155 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~any_token() noexcept;
 
@@ -943,38 +943,38 @@ class any_token: public regex_token_check {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1163 "regex.h2"
+#line 1160 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1176 "regex.h2"
+#line 1173 "regex.h2"
 // Regex syntax: a
 //
 class char_token: public regex_token {
 
-#line 1181 "regex.h2"
+#line 1178 "regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1190 "regex.h2"
+#line 1187 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1194 "regex.h2"
+#line 1191 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1216 "regex.h2"
+#line 1213 "regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1236 "regex.h2"
+#line 1233 "regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1253 "regex.h2"
+#line 1250 "regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1265 "regex.h2"
+#line 1262 "regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -982,7 +982,7 @@ class char_token: public regex_token {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1269 "regex.h2"
+#line 1266 "regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1022,21 +1022,21 @@ class char_token: public regex_token {
 //
 class class_token: public regex_token {
 
-#line 1309 "regex.h2"
+#line 1306 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1320 "regex.h2"
+#line 1317 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1428 "regex.h2"
+#line 1425 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1433 "regex.h2"
+#line 1430 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1044,21 +1044,21 @@ class class_token: public regex_token {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1439 "regex.h2"
+#line 1436 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1464 "regex.h2"
+#line 1461 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1476 "regex.h2"
+#line 1473 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1070,19 +1070,19 @@ template c
 
     //     return r;
     // }
-#line 1487 "regex.h2"
+#line 1484 "regex.h2"
 };
 
 // Regex syntax: \a or \n or \[
 //
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1526 "regex.h2"
+#line 1523 "regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1535 "regex.h2"
+#line 1532 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1091,16 +1091,16 @@ template c
 //
 class group_ref_token: public regex_token {
 
-#line 1544 "regex.h2"
+#line 1541 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1553 "regex.h2"
+#line 1550 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1645 "regex.h2"
+#line 1642 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1108,12 +1108,12 @@ class group_ref_token: public regex_token {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1648 "regex.h2"
+#line 1645 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1675 "regex.h2"
+#line 1672 "regex.h2"
 // Regex syntax: ()      Example: (abc)
 //               (?:)  (?i:abc)
@@ -1126,22 +1126,22 @@ template [[nodiscard]] auto gr
 //
 class group_token: public regex_token {
 
-#line 1688 "regex.h2"
+#line 1685 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1704 "regex.h2"
+#line 1701 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1831 "regex.h2"
+#line 1828 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1848 "regex.h2"
+#line 1845 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1867 "regex.h2"
+#line 1864 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1150,46 +1150,46 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1873 "regex.h2"
+#line 1870 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1916 "regex.h2"
+#line 1913 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1934 "regex.h2"
+#line 1931 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1946 "regex.h2"
+#line 1943 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1960 "regex.h2"
+#line 1957 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1965 "regex.h2"
+#line 1962 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 // Parsed in group_token.
 //
 class lookahead_token: public regex_token {
 
-#line 1972 "regex.h2"
+#line 1969 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1979 "regex.h2"
+#line 1976 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1985 "regex.h2"
+#line 1982 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1197,18 +1197,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1988 "regex.h2"
+#line 1985 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1999 "regex.h2"
+#line 1996 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2026 "regex.h2"
+#line 2023 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1222,12 +1222,12 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2040 "regex.h2"
+#line 2037 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2066 "regex.h2"
+#line 2063 "regex.h2"
 // TODO: @enum as template parameter yields two error:
 //     error: type 'range_flags' of non-type template parameter is not a structural type
 //     error: non-type template parameter has incomplete type 'range_flags'
@@ -1242,13 +1242,13 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2076 "regex.h2"
+#line 2073 "regex.h2"
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2082 "regex.h2"
+#line 2079 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1258,19 +1258,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2159 "regex.h2"
+#line 2156 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2170 "regex.h2"
+#line 2167 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2182 "regex.h2"
+#line 2179 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2200 "regex.h2"
+#line 2197 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2210 "regex.h2"
+#line 2207 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1278,46 +1278,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2214 "regex.h2"
+#line 2211 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2230 "regex.h2"
+#line 2227 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2235 "regex.h2"
+#line 2232 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2240 "regex.h2"
+#line 2237 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2246 "regex.h2"
+#line 2243 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2261 "regex.h2"
+#line 2258 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2289 "regex.h2"
+#line 2286 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2313 "regex.h2"
+#line 2310 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2337 "regex.h2"
+#line 2334 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2344 "regex.h2"
+#line 2341 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1326,7 +1326,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2373 "regex.h2"
+#line 2370 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1335,10 +1335,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2395 "regex.h2"
+#line 2392 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2420 "regex.h2"
+#line 2417 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1359,7 +1359,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2444 "regex.h2"
+#line 2441 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1374,7 +1374,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2460 "regex.h2"
+#line 2457 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1382,13 +1382,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2472 "regex.h2"
+#line 2469 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2494 "regex.h2"
+#line 2491 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1400,7 +1400,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2507 "regex.h2"
+#line 2504 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1423,21 +1423,21 @@ template class regex_generator {
 
     public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
-#line 2532 "regex.h2"
+#line 2529 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2567 "regex.h2"
+#line 2564 "regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2580 "regex.h2"
+#line 2577 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2589 "regex.h2"
+#line 2586 "regex.h2"
 }
 }
 
@@ -2200,9 +2200,6 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         auto is_negative {false}; 
         auto is_reset {false}; 
 
-        auto add {0}; 
-        auto remove {0}; 
-
         auto apply {[&, _1 = (&is_negative), _2 = (&parser_modifiers)](cpp2::impl::in flag) mutable -> void{
             if (*cpp2::impl::assert_not_null(_1)) {
                 (*cpp2::impl::assert_not_null(_2)).clear(flag);
@@ -2251,7 +2248,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 787 "regex.h2"
+#line 784 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2289,7 +2286,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 824 "regex.h2"
+#line 821 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2304,21 +2301,21 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 840 "regex.h2"
+#line 837 "regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; }
-#line 841 "regex.h2"
+#line 838 "regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
-#line 842 "regex.h2"
+#line 839 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && !(has_error); }
 
-#line 844 "regex.h2"
+#line 841 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         has_error = true;
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(err)));
         return nullptr; 
     }
 
-#line 858 "regex.h2"
+#line 855 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2326,27 +2323,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 865 "regex.h2"
+#line 862 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
 
-#line 883 "regex.h2"
+#line 880 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 888 "regex.h2"
+#line 885 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 894 "regex.h2"
+#line 891 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n");
     }
 
-#line 900 "regex.h2"
+#line 897 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void{
         end_func_statefull(check);
 
@@ -2354,7 +2351,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(cpp2::move(name));
     }
 
-#line 907 "regex.h2"
+#line 904 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2365,14 +2362,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 917 "regex.h2"
+#line 914 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 923 "regex.h2"
+#line 920 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
@@ -2391,7 +2388,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 942 "regex.h2"
+#line 939 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         (*cpp2::impl::assert_not_null(token)).generate_code((*this));
@@ -2400,7 +2397,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 951 "regex.h2"
+#line 948 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
@@ -2422,33 +2419,33 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(name) + "()"; 
     }
 
-#line 975 "regex.h2"
+#line 972 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 981 "regex.h2"
+#line 978 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 985 "regex.h2"
+#line 982 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 991 "regex.h2"
+#line 988 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 1000 "regex.h2"
+#line 997 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2457,7 +2454,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1008 "regex.h2"
+#line 1005 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2466,22 +2463,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         gen_stack.pop_back();
     }
 
-#line 1019 "regex.h2"
+#line 1016 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &gen_stack.back(); 
     }
 
-#line 1023 "regex.h2"
+#line 1020 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 1027 "regex.h2"
+#line 1024 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 1031 "regex.h2"
+#line 1028 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2504,18 +2501,18 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1055 "regex.h2"
+#line 1052 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 1069 "regex.h2"
+#line 1066 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_empty{ "" }{}
 
-#line 1071 "regex.h2"
+#line 1068 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2526,15 +2523,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1085 "regex.h2"
+#line 1082 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1088 "regex.h2"
+#line 1085 "regex.h2"
     }
 
-#line 1090 "regex.h2"
+#line 1087 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2551,14 +2548,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         ctx.add_statefull(next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1106 "regex.h2"
+#line 1103 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1112 "regex.h2"
+#line 1109 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2573,11 +2570,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1127 "regex.h2"
+#line 1124 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1130 "regex.h2"
+#line 1127 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2596,14 +2593,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1154 "regex.h2"
+#line 1151 "regex.h2"
     any_token::any_token(cpp2::impl::in single_line)
         : regex_token_check{ ".", ("any_token_matcher") }{
 
-#line 1156 "regex.h2"
+#line 1153 "regex.h2"
     }
 
-#line 1158 "regex.h2"
+#line 1155 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
@@ -2612,7 +2609,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     any_token::~any_token() noexcept{}
 
-#line 1165 "regex.h2"
+#line 1162 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2624,21 +2621,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1184 "regex.h2"
+#line 1181 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1188 "regex.h2"
+#line 1185 "regex.h2"
     }
 
-#line 1190 "regex.h2"
+#line 1187 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1194 "regex.h2"
+#line 1191 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             std::string upper {token}; 
@@ -2646,14 +2643,14 @@ template [[nodiscard]] auto any_token_matcher(
 {
 size_t i{0};
 
-#line 1199 "regex.h2"
+#line 1196 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = string_util::safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = string_util::safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1204 "regex.h2"
+#line 1201 "regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2666,7 +2663,7 @@ size_t i{0};
         }
     }
 
-#line 1216 "regex.h2"
+#line 1213 "regex.h2"
     auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         std::string lower_name {"lower_" + cpp2::to_string(name)}; 
@@ -2687,7 +2684,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1236 "regex.h2"
+#line 1233 "regex.h2"
     auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         auto size {token.size()}; 
@@ -2705,12 +2702,12 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1253 "regex.h2"
+#line 1250 "regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
-        str = string_util::replace_all(str, "\e", "\\e");
+        str = string_util::replace_all(str, "\x1b", "\\e"); // TODO: A bug in gcc prevents us from using the safe "\\x{1b}". \x{1b} is replaced despite the escape.
         str = string_util::replace_all(str, "\n", "\\n");
         str = string_util::replace_all(str, "\r", "\\r");
         str = string_util::replace_all(str, "\t", "\\t");
@@ -2718,7 +2715,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1265 "regex.h2"
+#line 1262 "regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2726,17 +2723,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1313 "regex.h2"
+#line 1310 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1318 "regex.h2"
+#line 1315 "regex.h2"
     }
 
-#line 1321 "regex.h2"
+#line 1318 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -2751,7 +2748,7 @@ size_t i{0};
         auto is_negate {false}; 
         auto first {true}; 
         auto range {false}; 
-        while( ctx.next_in_class() & (ctx.current() != ']' || first) ) {
+        while( ctx.next_in_class() && (ctx.current() != ']' || first) ) {
             if (ctx.current() == '^') {
                 is_negate = true;
                 continue; // Skip rest of the loop. Also the first update.
@@ -2844,12 +2841,12 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1428 "regex.h2"
+#line 1425 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
-#line 1433 "regex.h2"
+#line 1430 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
@@ -2859,7 +2856,7 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1443 "regex.h2"
+#line 1440 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -2881,7 +2878,7 @@ size_t i{0};
         }
     }
 
-#line 1464 "regex.h2"
+#line 1461 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2894,11 +2891,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1491 "regex.h2"
+#line 1488 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1495 "regex.h2"
+#line 1492 "regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -2910,7 +2907,7 @@ size_t i{0};
         char t {'\0'}; 
         if (     'a' == ctx. current()) { t = '\a'; }
         else {if ('f' == ctx.current()) {t = '\f'; }
-        else {if ('e' == ctx.current()) {t = '\e'; }
+        else {if ('e' == ctx.current()) {t = '\x1b'; }
         else {if ('n' == ctx.current()) {t = '\n'; }
         else {if ('r' == ctx.current()) {t = '\r'; }
         else {if ('t' == ctx.current()) {t = '\t'; }
@@ -2930,7 +2927,7 @@ size_t i{0};
 
 }
 
-#line 1528 "regex.h2"
+#line 1525 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -2938,16 +2935,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1547 "regex.h2"
+#line 1544 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1551 "regex.h2"
+#line 1548 "regex.h2"
     }
 
-#line 1553 "regex.h2"
+#line 1550 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3040,14 +3037,14 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1645 "regex.h2"
+#line 1642 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1650 "regex.h2"
+#line 1647 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
@@ -3073,7 +3070,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1691 "regex.h2"
+#line 1688 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3087,7 +3084,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1704 "regex.h2"
+#line 1701 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3215,7 +3212,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1831 "regex.h2"
+#line 1828 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3233,7 +3230,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1848 "regex.h2"
+#line 1845 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add(("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3253,7 +3250,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1867 "regex.h2"
+#line 1864 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3263,7 +3260,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1877 "regex.h2"
+#line 1874 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3303,7 +3300,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1918 "regex.h2"
+#line 1915 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3320,7 +3317,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1934 "regex.h2"
+#line 1931 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3333,7 +3330,7 @@ template [[
     }}
 }
 
-#line 1948 "regex.h2"
+#line 1945 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3346,35 +3343,35 @@ template [[
     }
 }
 
-#line 1960 "regex.h2"
+#line 1957 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1975 "regex.h2"
+#line 1972 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1977 "regex.h2"
+#line 1974 "regex.h2"
     }
 
-#line 1979 "regex.h2"
+#line 1976 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1985 "regex.h2"
+#line 1982 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1990 "regex.h2"
+#line 1987 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3384,7 +3381,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2002 "regex.h2"
+#line 1999 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3409,7 +3406,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2042 "regex.h2"
+#line 2039 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3434,16 +3431,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2072 "regex.h2"
+#line 2069 "regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2087 "regex.h2"
+#line 2084 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2089 "regex.h2"
+#line 2086 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3487,7 +3484,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2133 "regex.h2"
+#line 2130 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3514,7 +3511,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2159 "regex.h2"
+#line 2156 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3526,7 +3523,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2170 "regex.h2"
+#line 2167 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3539,7 +3536,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2182 "regex.h2"
+#line 2179 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3558,7 +3555,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2200 "regex.h2"
+#line 2197 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3569,14 +3566,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2210 "regex.h2"
+#line 2207 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2218 "regex.h2"
+#line 2215 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3589,26 +3586,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2230 "regex.h2"
+#line 2227 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2235 "regex.h2"
+#line 2232 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2240 "regex.h2"
+#line 2237 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2246 "regex.h2"
+#line 2243 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3624,7 +3621,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2261 "regex.h2"
+#line 2258 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3653,7 +3650,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2289 "regex.h2"
+#line 2286 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3678,7 +3675,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2313 "regex.h2"
+#line 2310 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3704,7 +3701,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2344 "regex.h2"
+#line 2341 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3727,7 +3724,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2367 "regex.h2"
+#line 2364 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3737,7 +3734,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2379 "regex.h2"
+#line 2376 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3754,7 +3751,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2395 "regex.h2"
+#line 2392 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3779,32 +3776,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2438 "regex.h2"
+#line 2435 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
             , ctx{ ctx_ }
             , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2442 "regex.h2"
+#line 2439 "regex.h2"
         }
 
-#line 2444 "regex.h2"
+#line 2441 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2445 "regex.h2"
+#line 2442 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2446 "regex.h2"
+#line 2443 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2447 "regex.h2"
+#line 2444 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2449 "regex.h2"
+#line 2446 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2450 "regex.h2"
+#line 2447 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2451 "regex.h2"
+#line 2448 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2453 "regex.h2"
+#line 2450 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3813,13 +3810,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2462 "regex.h2"
+#line 2459 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2463 "regex.h2"
+#line 2460 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2464 "regex.h2"
+#line 2461 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2465 "regex.h2"
+#line 2462 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3827,13 +3824,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2472 "regex.h2"
+#line 2469 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2473 "regex.h2"
+#line 2470 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2474 "regex.h2"
+#line 2471 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2475 "regex.h2"
+#line 2472 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
         auto r {CPP2_UFCS(fail)(ctx)}; 
@@ -3853,10 +3850,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2494 "regex.h2"
+#line 2491 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2499 "regex.h2"
+#line 2496 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3866,15 +3863,15 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2527 "regex.h2"
+#line 2524 "regex.h2"
     template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2530 "regex.h2"
+#line 2527 "regex.h2"
     }
 
-#line 2532 "regex.h2"
+#line 2529 "regex.h2"
     template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
@@ -3910,7 +3907,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2567 "regex.h2"
+#line 2564 "regex.h2"
     template  auto regex_generator::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
@@ -3925,7 +3922,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2582 "regex.h2"
+#line 2579 "regex.h2"
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
     regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
diff --git a/source/regex.h2 b/source/regex.h2
index c42563fad7..84e8c1a126 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -14,7 +14,7 @@
 #include 
 
 template
-using matcher_wrapper_type = typename matcher_wrapper::wrap;
+using matcher_wrapper_type = typename matcher_wrapper::template wrap;
 
 using error_func = std::function;
 
@@ -733,9 +733,6 @@ parse_context: type = {
         is_negative := false;
         is_reset    := false;
 
-        add    := 0;
-        remove := 0;
-
         apply := :(flag: expression_flags) = {
             if is_negative&$* {
                 parser_modifiers&$*..clear(flag);
@@ -1254,7 +1251,7 @@ char_token: @polymorphic_base type = {
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
-        str = string_util::replace_all(str, "\e", "\\e");
+        str = string_util::replace_all(str, "\x1b", "\\e"); // TODO: A bug in gcc prevents us from using the safe "\\x{1b}". \x{1b} is replaced despite the escape.
         str = string_util::replace_all(str, "\n", "\\n");
         str = string_util::replace_all(str, "\r", "\\r");
         str = string_util::replace_all(str, "\t", "\\t");
@@ -1332,7 +1329,7 @@ class_token: @polymorphic_base type = {
         is_negate:= false;
         first:= true;
         range:= false;
-        while ctx..next_in_class() & (ctx..current() != ']' || first) {
+        while ctx..next_in_class() && (ctx..current() != ']' || first) {
             if ctx..current() == '^' {
                 is_negate = true;
                 continue; // Skip rest of the loop. Also the first update.
@@ -1503,7 +1500,7 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
         t : char = '\0';
         if      'a' == ctx..current() { t = '\a'; }
         else if 'f' == ctx..current() { t = '\f'; }
-        else if 'e' == ctx..current() { t = '\e'; }
+        else if 'e' == ctx..current() { t = '\x1b'; }
         else if 'n' == ctx..current() { t = '\n'; }
         else if 'r' == ctx..current() { t = '\r'; }
         else if 't' == ctx..current() { t = '\t'; }

From 7fa74b1388d16857c2b11189d3dbf2ebc2c91e3f Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Fri, 28 Jun 2024 12:17:54 +0200
Subject: [PATCH 139/161] Added new tests.

---
 regression-tests/pure2-regex-partial.cpp2     |  2579 --
 regression-tests/pure2-regex.cpp2             |  2579 --
 .../pure2-regex_01_char_matcher.cpp2          |   185 +
 regression-tests/pure2-regex_02_ranges.cpp2   |   241 +
 regression-tests/pure2-regex_03_wildcard.cpp2 |   201 +
 .../pure2-regex_04_start_end.cpp2             |   179 +
 regression-tests/pure2-regex_05_classes.cpp2  |   199 +
 .../pure2-regex_06_boundaries.cpp2            |   195 +
 .../pure2-regex_07_short_classes.cpp2         |   209 +
 .../pure2-regex_08_alternatives.cpp2          |   165 +
 regression-tests/pure2-regex_09_groups.cpp2   |   183 +
 regression-tests/pure2-regex_10_escapes.cpp2  |   201 +
 .../pure2-regex_11_group_references.cpp2      |   209 +
 .../pure2-regex_12_case_insensitive.cpp2      |   399 +
 .../pure2-regex_13_posessive_modifier.cpp2    |   257 +
 .../pure2-regex_14_multiline_modifier.cpp2    |   559 +
 .../pure2-regex_15_group_modifiers.cpp2       |   267 +
 .../pure2-regex_16_perl_syntax_modifier.cpp2  |   227 +
 regression-tests/pure2-regex_17_comments.cpp2 |   167 +
 .../pure2-regex_18_branch_reset.cpp2          |   191 +
 .../pure2-regex_19_lookahead.cpp2             |   251 +
 .../gcc-13/pure2-regex.cpp.execution          |  1124 -
 .../gcc-13/pure2-regex.cpp.output             |   326 -
 .../pure2-regex_01_char_matcher.cpp.execution |    14 +
 .../pure2-regex_01_char_matcher.cpp.output    |     0
 .../pure2-regex_02_ranges.cpp.execution       |    42 +
 .../gcc-13/pure2-regex_02_ranges.cpp.output   |     0
 .../pure2-regex_03_wildcard.cpp.execution     |    22 +
 .../gcc-13/pure2-regex_03_wildcard.cpp.output |     0
 .../pure2-regex_04_start_end.cpp.execution    |    11 +
 .../pure2-regex_04_start_end.cpp.output       |     0
 .../pure2-regex_05_classes.cpp.execution      |    21 +
 .../gcc-13/pure2-regex_05_classes.cpp.output  |     0
 .../pure2-regex_06_boundaries.cpp.execution   |    19 +
 .../pure2-regex_06_boundaries.cpp.output      |     0
 ...pure2-regex_07_short_classes.cpp.execution |    26 +
 .../pure2-regex_07_short_classes.cpp.output   |     0
 .../pure2-regex_08_alternatives.cpp.execution |     4 +
 .../pure2-regex_08_alternatives.cpp.output    |     0
 .../pure2-regex_09_groups.cpp.execution       |    13 +
 .../gcc-13/pure2-regex_09_groups.cpp.output   |     0
 .../pure2-regex_10_escapes.cpp.execution      |    39 +
 .../gcc-13/pure2-regex_10_escapes.cpp.output  |     0
 ...e2-regex_11_group_references.cpp.execution |    26 +
 ...pure2-regex_11_group_references.cpp.output |     0
 ...e2-regex_12_case_insensitive.cpp.execution |   121 +
 ...pure2-regex_12_case_insensitive.cpp.output |     0
 ...-regex_13_posessive_modifier.cpp.execution |    50 +
 ...re2-regex_13_posessive_modifier.cpp.output |     0
 ...-regex_14_multiline_modifier.cpp.execution |   533 +
 ...re2-regex_14_multiline_modifier.cpp.output |     0
 ...re2-regex_15_group_modifiers.cpp.execution |    87 +
 .../pure2-regex_15_group_modifiers.cpp.output |     0
 ...egex_16_perl_syntax_modifier.cpp.execution |    35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |     0
 .../pure2-regex_17_comments.cpp.execution     |     5 +
 .../gcc-13/pure2-regex_17_comments.cpp.output |     0
 .../pure2-regex_18_branch_reset.cpp.execution |    17 +
 .../pure2-regex_18_branch_reset.cpp.output    |     0
 .../pure2-regex_19_lookahead.cpp.execution    |    77 +
 .../pure2-regex_19_lookahead.cpp.output       |     0
 regression-tests/test-results/pure2-regex.cpp |  3344 ---
 .../test-results/pure2-regex.cpp2.output      |     2 -
 .../pure2-regex_01_char_matcher.cpp           |  1141 +
 .../pure2-regex_01_char_matcher.cpp2.output   |     2 +
 .../test-results/pure2-regex_02_ranges.cpp    |  6285 +++++
 .../pure2-regex_02_ranges.cpp2.output         |     2 +
 .../test-results/pure2-regex_03_wildcard.cpp  |  2483 ++
 .../pure2-regex_03_wildcard.cpp2.output       |     2 +
 .../test-results/pure2-regex_04_start_end.cpp |   891 +
 .../pure2-regex_04_start_end.cpp2.output      |     2 +
 .../test-results/pure2-regex_05_classes.cpp   |  1837 ++
 .../pure2-regex_05_classes.cpp2.output        |     2 +
 .../pure2-regex_06_boundaries.cpp             |  1535 ++
 .../pure2-regex_06_boundaries.cpp2.output     |     2 +
 .../pure2-regex_07_short_classes.cpp          |  1989 ++
 .../pure2-regex_07_short_classes.cpp2.output  |     2 +
 .../pure2-regex_08_alternatives.cpp           |   527 +
 .../pure2-regex_08_alternatives.cpp2.output   |     2 +
 .../test-results/pure2-regex_09_groups.cpp    |  1368 ++
 .../pure2-regex_09_groups.cpp2.output         |     2 +
 .../test-results/pure2-regex_10_escapes.cpp   |  2428 ++
 .../pure2-regex_10_escapes.cpp2.output        |     2 +
 .../pure2-regex_11_group_references.cpp       |  3684 +++
 ...ure2-regex_11_group_references.cpp2.output |     2 +
 .../pure2-regex_12_case_insensitive.cpp       | 19920 ++++++++++++++++
 ...ure2-regex_12_case_insensitive.cpp2.output |     2 +
 .../pure2-regex_13_posessive_modifier.cpp     | 10101 ++++++++
 ...e2-regex_13_posessive_modifier.cpp2.output |     2 +
 .../pure2-regex_14_multiline_modifier.cpp     | 15675 ++++++++++++
 ...e2-regex_14_multiline_modifier.cpp2.output |     2 +
 .../pure2-regex_15_group_modifiers.cpp        |  5583 +++++
 ...pure2-regex_15_group_modifiers.cpp2.output |     2 +
 .../pure2-regex_16_perl_syntax_modifier.cpp   |  3282 +++
 ...-regex_16_perl_syntax_modifier.cpp2.output |     2 +
 .../test-results/pure2-regex_17_comments.cpp  |   561 +
 .../pure2-regex_17_comments.cpp2.output       |     2 +
 .../pure2-regex_18_branch_reset.cpp           |  7000 ++++++
 .../pure2-regex_18_branch_reset.cpp2.output   |     2 +
 .../test-results/pure2-regex_19_lookahead.cpp |  9643 ++++++++
 .../pure2-regex_19_lookahead.cpp2.output      |     2 +
 101 files changed, 101618 insertions(+), 9954 deletions(-)
 delete mode 100644 regression-tests/pure2-regex-partial.cpp2
 delete mode 100644 regression-tests/pure2-regex.cpp2
 create mode 100644 regression-tests/pure2-regex_01_char_matcher.cpp2
 create mode 100644 regression-tests/pure2-regex_02_ranges.cpp2
 create mode 100644 regression-tests/pure2-regex_03_wildcard.cpp2
 create mode 100644 regression-tests/pure2-regex_04_start_end.cpp2
 create mode 100644 regression-tests/pure2-regex_05_classes.cpp2
 create mode 100644 regression-tests/pure2-regex_06_boundaries.cpp2
 create mode 100644 regression-tests/pure2-regex_07_short_classes.cpp2
 create mode 100644 regression-tests/pure2-regex_08_alternatives.cpp2
 create mode 100644 regression-tests/pure2-regex_09_groups.cpp2
 create mode 100644 regression-tests/pure2-regex_10_escapes.cpp2
 create mode 100644 regression-tests/pure2-regex_11_group_references.cpp2
 create mode 100644 regression-tests/pure2-regex_12_case_insensitive.cpp2
 create mode 100644 regression-tests/pure2-regex_13_posessive_modifier.cpp2
 create mode 100644 regression-tests/pure2-regex_14_multiline_modifier.cpp2
 create mode 100644 regression-tests/pure2-regex_15_group_modifiers.cpp2
 create mode 100644 regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2
 create mode 100644 regression-tests/pure2-regex_17_comments.cpp2
 create mode 100644 regression-tests/pure2-regex_18_branch_reset.cpp2
 create mode 100644 regression-tests/pure2-regex_19_lookahead.cpp2
 delete mode 100644 regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
 delete mode 100644 regression-tests/test-results/gcc-13/pure2-regex.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.output
 delete mode 100644 regression-tests/test-results/pure2-regex.cpp
 delete mode 100644 regression-tests/test-results/pure2-regex.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_01_char_matcher.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_01_char_matcher.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_02_ranges.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_02_ranges.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_03_wildcard.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_03_wildcard.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_04_start_end.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_04_start_end.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_05_classes.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_05_classes.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_06_boundaries.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_06_boundaries.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_07_short_classes.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_07_short_classes.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_08_alternatives.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_08_alternatives.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_09_groups.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_09_groups.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_10_escapes.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_10_escapes.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_11_group_references.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_11_group_references.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_12_case_insensitive.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_12_case_insensitive.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_15_group_modifiers.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_15_group_modifiers.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_17_comments.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_17_comments.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_18_branch_reset.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_18_branch_reset.cpp2.output
 create mode 100644 regression-tests/test-results/pure2-regex_19_lookahead.cpp
 create mode 100644 regression-tests/test-results/pure2-regex_19_lookahead.cpp2.output

diff --git a/regression-tests/pure2-regex-partial.cpp2 b/regression-tests/pure2-regex-partial.cpp2
deleted file mode 100644
index cf6712ef2a..0000000000
--- a/regression-tests/pure2-regex-partial.cpp2
+++ /dev/null
@@ -1,2579 +0,0 @@
-create_result: (resultExpr: std::string, r) -> std::string = {
-  result: std::string = "";
-
-  get_next := :(iter) -> _ = {
-		start := std::distance(resultExpr&$*.cbegin(), iter);
-    firstDollar := resultExpr&$*.find("$", start);
-    firstAt := resultExpr&$*.find("@", start);
-
-		end := std::min(firstDollar, firstAt);
-		if end != std::string::npos {
-			return resultExpr&$*.cbegin() + end;
-		}
-		else {
-			return resultExpr&$*.cend();
-		}
-  };
-  extract_group_and_advance := :(inout iter) -> _ = {
-    start := iter;
-
-    while std::isdigit(iter*) next iter++ {}
-
-    return std::stoi(std::string(start, iter));
-  };
-  extract_until := :(inout iter, to: char) -> _ = {
-    start := iter;
-
-    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
-
-    return std::string(start, iter);
-  };
-
-  iter := resultExpr.begin();
-
-  while iter != resultExpr.end() {
-    next := get_next(iter);
-
-    if next != iter {
-      result += std::string(iter, next);
-    }
-    if next != resultExpr.end() {
-      if next* == '$' {
-        next++;
-
-        if next* == '&' {
-          next++;
-          result += r.group(0);
-        }
-        else if next* == '-' || next* == '+' {
-          is_start := next* == '-';
-          next++;
-          if next* == '{' {
-            next++; // Skip {
-            group := extract_until(next, '}');
-            next++; // Skip }
-            result += r.group(group);
-          }
-          else if next* == '[' {
-            next++; // Skip [
-            group := extract_group_and_advance(next);
-            next++; // Skip ]
-
-            if is_start {
-              result += std::to_string(r.group_start(group));
-            }
-            else {
-              result += std::to_string(r.group_end(group));
-            }
-          }
-          else {
-            // Return max group
-            result += r.group(r.group_number() - 1);
-          }
-        }
-        else if std::isdigit(next*) {
-          group := extract_group_and_advance(next);
-          result += r.group(group);
-        }
-        else {
-          std::cerr << "Not implemented";
-        }
-      }
-      else if next* == '@' {
-        next++;
-
-        if next* == '-'  || next* == '+' {
-          i := 0;
-          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
-            pos := 0;
-            if next* == '-' {
-              pos = r.group_start(i);
-            }
-            else {
-              pos = r.group_end(i);
-            }
-            result +=  std::to_string(pos);
-          }
-        }
-        else {
-          std::cerr << "Not implemented";
-        }
-      }
-      else {
-        std::cerr << "Not implemented.";
-      }
-    }
-    iter = next;
-  }
-
-  return result;
-}
-
-test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
-           resultExpected: std::string) = {
-
-  warning: std::string = "";
-  if regex.to_string() != regex_str {
-    warning = "Warning: Parsed regex does not match.";
-  }
-
-  status: std::string = "OK";
-
-  r := regex.search(str);
-
-  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
-    if !r.matched {
-      status = "Failure: Regex should apply.";
-    }
-    else {
-      // Have a match check the result
-
-      result := create_result(resultExpr, r);
-
-      if result != resultExpected {
-        status = "Failure: Result is wrong. (is: (result)$)";
-      }
-    }
-  }
-  else if "n" == kind {
-    if r.matched {
-      status = "Failure: Regex should not apply.";
-    }
-  } else {
-    status = "Unknown kind '(kind)$'";
-  }
-
-  if !warning.empty() {
-    warning += " ";
-  }
-  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
-}
-
-
-test_perl_tests_general: @regex type = {
-  regex_0 := "abc";
-  var_regex_0 : std::string = "abc";
-  regex_1 := "abc";
-  var_regex_1 : std::string = "abc";
-  regex_2 := "abc";
-  var_regex_2 : std::string = "abc";
-  regex_3 := "abc";
-  var_regex_3 : std::string = "abc";
-  regex_4 := "abc";
-  var_regex_4 : std::string = "abc";
-  regex_5 := "abc";
-  var_regex_5 : std::string = "abc";
-  regex_6 := "abc";
-  var_regex_6 : std::string = "abc";
-  regex_7 := "abc";
-  var_regex_7 : std::string = "abc";
-  regex_8 := "abc";
-  var_regex_8 : std::string = "abc";
-  regex_9 := "abc";
-  var_regex_9 : std::string = "abc";
-  regex_10 := "abc";
-  var_regex_10 : std::string = "abc";
-  regex_11 := "abc";
-  var_regex_11 : std::string = "abc";
-  regex_12 := "ab*c";
-  var_regex_12 : std::string = "ab*c";
-  regex_13 := "ab*c";
-  var_regex_13 : std::string = "ab*c";
-  regex_14 := "ab*c";
-  var_regex_14 : std::string = "ab*c";
-  regex_15 := "ab*bc";
-  var_regex_15 : std::string = "ab*bc";
-  regex_16 := "ab*bc";
-  var_regex_16 : std::string = "ab*bc";
-  regex_17 := "ab*bc";
-  var_regex_17 : std::string = "ab*bc";
-  regex_18 := "ab*bc";
-  var_regex_18 : std::string = "ab*bc";
-  regex_19 := "ab*bc";
-  var_regex_19 : std::string = "ab*bc";
-  regex_20 := "ab*bc";
-  var_regex_20 : std::string = "ab*bc";
-  regex_21 := "ab*bc";
-  var_regex_21 : std::string = "ab*bc";
-  regex_22 := "ab*bc";
-  var_regex_22 : std::string = "ab*bc";
-  regex_23 := "ab*bc";
-  var_regex_23 : std::string = "ab*bc";
-  regex_24 := ".{1}";
-  var_regex_24 : std::string = ".{1}";
-  regex_25 := ".{1}";
-  var_regex_25 : std::string = ".{1}";
-  regex_26 := ".{1}";
-  var_regex_26 : std::string = ".{1}";
-  regex_27 := ".{3,4}";
-  var_regex_27 : std::string = ".{3,4}";
-  regex_28 := ".{3,4}";
-  var_regex_28 : std::string = ".{3,4}";
-  regex_29 := ".{3,4}";
-  var_regex_29 : std::string = ".{3,4}";
-  regex_30 := "\N{1}";
-  var_regex_30 : std::string = "\\N{1}";
-  regex_31 := "\N{1}";
-  var_regex_31 : std::string = "\\N{1}";
-  regex_32 := "\N{1}";
-  var_regex_32 : std::string = "\\N{1}";
-  regex_33 := "\N{3,4}";
-  var_regex_33 : std::string = "\\N{3,4}";
-  regex_34 := "\N{3,4}";
-  var_regex_34 : std::string = "\\N{3,4}";
-  regex_35 := "\N{3,4}";
-  var_regex_35 : std::string = "\\N{3,4}";
-  regex_36 := "\N{ 3 , 4 }";
-  var_regex_36 : std::string = "\\N{ 3 , 4 }";
-  regex_37 := "ab{0,}bc";
-  var_regex_37 : std::string = "ab{0,}bc";
-  regex_38 := "ab{0,}bc";
-  var_regex_38 : std::string = "ab{0,}bc";
-  regex_39 := "ab{0,}bc";
-  var_regex_39 : std::string = "ab{0,}bc";
-  regex_40 := "ab+bc";
-  var_regex_40 : std::string = "ab+bc";
-  regex_41 := "ab+bc";
-  var_regex_41 : std::string = "ab+bc";
-  regex_42 := "ab+bc";
-  var_regex_42 : std::string = "ab+bc";
-  regex_43 := "ab+bc";
-  var_regex_43 : std::string = "ab+bc";
-  regex_44 := "ab+bc";
-  var_regex_44 : std::string = "ab+bc";
-  regex_45 := "ab{1,}bc";
-  var_regex_45 : std::string = "ab{1,}bc";
-  regex_46 := "ab+bc";
-  var_regex_46 : std::string = "ab+bc";
-  regex_47 := "ab+bc";
-  var_regex_47 : std::string = "ab+bc";
-  regex_48 := "ab+bc";
-  var_regex_48 : std::string = "ab+bc";
-  regex_49 := "ab{1,}bc";
-  var_regex_49 : std::string = "ab{1,}bc";
-  regex_50 := "ab{1,}bc";
-  var_regex_50 : std::string = "ab{1,}bc";
-  regex_51 := "ab{1,}bc";
-  var_regex_51 : std::string = "ab{1,}bc";
-  regex_52 := "ab{1,3}bc";
-  var_regex_52 : std::string = "ab{1,3}bc";
-  regex_53 := "ab{1,3}bc";
-  var_regex_53 : std::string = "ab{1,3}bc";
-  regex_54 := "ab{1,3}bc";
-  var_regex_54 : std::string = "ab{1,3}bc";
-  regex_55 := "ab{3,4}bc";
-  var_regex_55 : std::string = "ab{3,4}bc";
-  regex_56 := "ab{3,4}bc";
-  var_regex_56 : std::string = "ab{3,4}bc";
-  regex_57 := "ab{3,4}bc";
-  var_regex_57 : std::string = "ab{3,4}bc";
-  regex_58 := "ab{4,5}bc";
-  var_regex_58 : std::string = "ab{4,5}bc";
-  regex_59 := "ab?bc";
-  var_regex_59 : std::string = "ab?bc";
-  regex_60 := "ab?bc";
-  var_regex_60 : std::string = "ab?bc";
-  regex_61 := "ab{0,1}bc";
-  var_regex_61 : std::string = "ab{0,1}bc";
-  regex_62 := "ab?bc";
-  var_regex_62 : std::string = "ab?bc";
-  regex_63 := "ab?c";
-  var_regex_63 : std::string = "ab?c";
-  regex_64 := "ab{0,1}c";
-  var_regex_64 : std::string = "ab{0,1}c";
-  regex_65 := "^abc\$";
-  var_regex_65 : std::string = "^abc\$";
-  regex_66 := "^abc\$";
-  var_regex_66 : std::string = "^abc\$";
-  regex_67 := "^abc";
-  var_regex_67 : std::string = "^abc";
-  regex_68 := "^abc\$";
-  var_regex_68 : std::string = "^abc\$";
-  regex_69 := "abc\$";
-  var_regex_69 : std::string = "abc\$";
-  regex_70 := "abc\$";
-  var_regex_70 : std::string = "abc\$";
-  regex_71 := "^";
-  var_regex_71 : std::string = "^";
-  regex_72 := "\$";
-  var_regex_72 : std::string = "\$";
-  regex_73 := "a.c";
-  var_regex_73 : std::string = "a.c";
-  regex_74 := "a.c";
-  var_regex_74 : std::string = "a.c";
-  regex_75 := "a\Nc";
-  var_regex_75 : std::string = "a\\Nc";
-  regex_76 := "a.*c";
-  var_regex_76 : std::string = "a.*c";
-  regex_77 := "a\N*c";
-  var_regex_77 : std::string = "a\\N*c";
-  regex_78 := "a.*c";
-  var_regex_78 : std::string = "a.*c";
-  regex_79 := "a\N*c";
-  var_regex_79 : std::string = "a\\N*c";
-//   regex_80 := "a[bc]d";
-//   var_regex_80 : std::string = "a[bc]d";
-//   regex_81 := "a[bc]d";
-//   var_regex_81 : std::string = "a[bc]d";
-//   regex_82 := "a[b]d";
-//   var_regex_82 : std::string = "a[b]d";
-//   regex_83 := "[a][b][d]";
-//   var_regex_83 : std::string = "[a][b][d]";
-//   regex_84 := ".[b].";
-//   var_regex_84 : std::string = ".[b].";
-//   regex_85 := ".[b].";
-//   var_regex_85 : std::string = ".[b].";
-//   regex_86 := "a[b-d]e";
-//   var_regex_86 : std::string = "a[b-d]e";
-//   regex_87 := "a[b-d]e";
-//   var_regex_87 : std::string = "a[b-d]e";
-//   regex_88 := "a[b-d]";
-//   var_regex_88 : std::string = "a[b-d]";
-//   regex_89 := "a[-b]";
-//   var_regex_89 : std::string = "a[-b]";
-//   regex_90 := "a[b-]";
-//   var_regex_90 : std::string = "a[b-]";
-  regex_91 := "a]";
-  var_regex_91 : std::string = "a]";
-  regex_92 := "a[]]b";
-  var_regex_92 : std::string = "a[]]b";
-//   regex_93 := "a[^bc]d";
-//   var_regex_93 : std::string = "a[^bc]d";
-//   regex_94 := "a[^bc]d";
-//   var_regex_94 : std::string = "a[^bc]d";
-//   regex_95 := "a[^-b]c";
-//   var_regex_95 : std::string = "a[^-b]c";
-//   regex_96 := "a[^-b]c";
-//   var_regex_96 : std::string = "a[^-b]c";
-//   regex_97 := "a[^]b]c";
-//   var_regex_97 : std::string = "a[^]b]c";
-//   regex_98 := "a[^]b]c";
-//   var_regex_98 : std::string = "a[^]b]c";
-  regex_99 := "\ba\b";
-  var_regex_99 : std::string = "\ba\b";
-  regex_100 := "\ba\b";
-  var_regex_100 : std::string = "\ba\b";
-  regex_101 := "\ba\b";
-  var_regex_101 : std::string = "\ba\b";
-  regex_102 := "\by\b";
-  var_regex_102 : std::string = "\by\b";
-  regex_103 := "\by\b";
-  var_regex_103 : std::string = "\by\b";
-  regex_104 := "\by\b";
-  var_regex_104 : std::string = "\by\b";
-  regex_105 := "\Ba\B";
-  var_regex_105 : std::string = "\Ba\B";
-  regex_106 := "\Ba\B";
-  var_regex_106 : std::string = "\Ba\B";
-  regex_107 := "\Ba\B";
-  var_regex_107 : std::string = "\Ba\B";
-  regex_108 := "\By\b";
-  var_regex_108 : std::string = "\By\b";
-  regex_109 := "\By\b";
-  var_regex_109 : std::string = "\By\b";
-  regex_110 := "\By\b";
-  var_regex_110 : std::string = "\By\b";
-  regex_111 := "\By\b";
-  var_regex_111 : std::string = "\By\b";
-  regex_112 := "\by\B";
-  var_regex_112 : std::string = "\by\B";
-  regex_113 := "\By\B";
-  var_regex_113 : std::string = "\By\B";
-  regex_114 := "\b";
-  var_regex_114 : std::string = "\b";
-  regex_115 := "\B";
-  var_regex_115 : std::string = "\B";
-  regex_116 := "\w";
-  var_regex_116 : std::string = "\w";
-  regex_117 := "\w";
-  var_regex_117 : std::string = "\w";
-  regex_118 := "\W";
-  var_regex_118 : std::string = "\W";
-  regex_119 := "\W";
-  var_regex_119 : std::string = "\W";
-  regex_120 := "a\sb";
-  var_regex_120 : std::string = "a\sb";
-  regex_121 := "a\sb";
-  var_regex_121 : std::string = "a\sb";
-  regex_122 := "a\Sb";
-  var_regex_122 : std::string = "a\Sb";
-  regex_123 := "a\Sb";
-  var_regex_123 : std::string = "a\Sb";
-  regex_124 := "\d";
-  var_regex_124 : std::string = "\d";
-  regex_125 := "\d";
-  var_regex_125 : std::string = "\d";
-  regex_126 := "\D";
-  var_regex_126 : std::string = "\D";
-  regex_127 := "\D";
-  var_regex_127 : std::string = "\D";
-//   regex_128 := "[\w]";
-//   var_regex_128 : std::string = "[\w]";
-//   regex_129 := "[\w]";
-//   var_regex_129 : std::string = "[\w]";
-//   regex_130 := "[\W]";
-//   var_regex_130 : std::string = "[\W]";
-//   regex_131 := "[\W]";
-//   var_regex_131 : std::string = "[\W]";
-//   regex_132 := "a[\s]b";
-//   var_regex_132 : std::string = "a[\s]b";
-//   regex_133 := "a[\s]b";
-//   var_regex_133 : std::string = "a[\s]b";
-//   regex_134 := "a[\S]b";
-//   var_regex_134 : std::string = "a[\S]b";
-//   regex_135 := "a[\S]b";
-//   var_regex_135 : std::string = "a[\S]b";
-//   regex_136 := "[\d]";
-//   var_regex_136 : std::string = "[\d]";
-//   regex_137 := "[\d]";
-//   var_regex_137 : std::string = "[\d]";
-//   regex_138 := "[\D]";
-//   var_regex_138 : std::string = "[\D]";
-//   regex_139 := "[\D]";
-  var_regex_139 : std::string = "[\D]";
-  regex_140 := "ab|cd";
-  var_regex_140 : std::string = "ab|cd";
-  regex_141 := "ab|cd";
-  var_regex_141 : std::string = "ab|cd";
-  regex_142 := "()ef";
-  var_regex_142 : std::string = "()ef";
-  regex_143 := "()ef";
-  var_regex_143 : std::string = "()ef";
-  regex_144 := "()ef";
-  var_regex_144 : std::string = "()ef";
-  regex_145 := "()ef";
-  var_regex_145 : std::string = "()ef";
-  regex_146 := "()ef";
-  var_regex_146 : std::string = "()ef";
-  regex_147 := "\$b";
-  var_regex_147 : std::string = "\$b";
-  regex_148 := "a\(b";
-  var_regex_148 : std::string = "a\(b";
-  regex_149 := "a\(*b";
-  var_regex_149 : std::string = "a\(*b";
-  regex_150 := "a\(*b";
-  var_regex_150 : std::string = "a\(*b";
-  regex_151 := "a\\b";
-  var_regex_151 : std::string = "a\\b";
-  regex_152 := "((a))";
-  var_regex_152 : std::string = "((a))";
-  regex_153 := "((a))";
-  var_regex_153 : std::string = "((a))";
-  regex_154 := "((a))";
-  var_regex_154 : std::string = "((a))";
-  regex_155 := "(foo)(\g-2)";
-  var_regex_155 : std::string = "(foo)(\g-2)";
-  regex_156 := "(foo)(\g-2)(foo)(\g-2)";
-  var_regex_156 : std::string = "(foo)(\g-2)(foo)(\g-2)";
-//   regex_157 := "(([abc]+) \g-1)(([abc]+) \g{-1})";
-//   var_regex_157 : std::string = "(([abc]+) \g-1)(([abc]+) \g{-1})";
-  regex_158 := "(a)(b)(c)\g1\g2\g3";
-  var_regex_158 : std::string = "(a)(b)(c)\g1\g2\g3";
-  regex_159 := "abc";
-  regex_159_mod := "i";
-  var_regex_159 : std::string = "abc";
-  regex_160 := "abc";
-  regex_160_mod := "i";
-  var_regex_160 : std::string = "abc";
-  regex_161 := "abc";
-  regex_161_mod := "i";
-  var_regex_161 : std::string = "abc";
-  regex_162 := "abc";
-  regex_162_mod := "i";
-  var_regex_162 : std::string = "abc";
-  regex_163 := "abc";
-  regex_163_mod := "i";
-  var_regex_163 : std::string = "abc";
-  regex_164 := "abc";
-  regex_164_mod := "i";
-  var_regex_164 : std::string = "abc";
-  regex_165 := "ab*c";
-  regex_165_mod := "i";
-  var_regex_165 : std::string = "ab*c";
-  regex_166 := "ab*bc";
-  regex_166_mod := "i";
-  var_regex_166 : std::string = "ab*bc";
-  regex_167 := "ab*bc";
-  regex_167_mod := "i";
-  var_regex_167 : std::string = "ab*bc";
-  regex_168 := "ab*?bc";
-  regex_168_mod := "i";
-  var_regex_168 : std::string = "ab*?bc";
-  regex_169 := "ab{0,}?bc";
-  regex_169_mod := "i";
-  var_regex_169 : std::string = "ab{0,}?bc";
-  regex_170 := "ab+?bc";
-  regex_170_mod := "i";
-  var_regex_170 : std::string = "ab+?bc";
-  regex_171 := "ab+bc";
-  regex_171_mod := "i";
-  var_regex_171 : std::string = "ab+bc";
-  regex_172 := "ab+bc";
-  regex_172_mod := "i";
-  var_regex_172 : std::string = "ab+bc";
-  regex_173 := "ab{1,}bc";
-  regex_173_mod := "i";
-  var_regex_173 : std::string = "ab{1,}bc";
-  regex_174 := "ab+bc";
-  regex_174_mod := "i";
-  var_regex_174 : std::string = "ab+bc";
-  regex_175 := "ab{1,}?bc";
-  regex_175_mod := "i";
-  var_regex_175 : std::string = "ab{1,}?bc";
-  regex_176 := "ab{1,3}?bc";
-  regex_176_mod := "i";
-  var_regex_176 : std::string = "ab{1,3}?bc";
-  regex_177 := "ab{3,4}?bc";
-  regex_177_mod := "i";
-  var_regex_177 : std::string = "ab{3,4}?bc";
-  regex_178 := "ab{4,5}?bc";
-  regex_178_mod := "i";
-  var_regex_178 : std::string = "ab{4,5}?bc";
-  regex_179 := "ab??bc";
-  regex_179_mod := "i";
-  var_regex_179 : std::string = "ab??bc";
-  regex_180 := "ab??bc";
-  regex_180_mod := "i";
-  var_regex_180 : std::string = "ab??bc";
-  regex_181 := "ab{0,1}?bc";
-  regex_181_mod := "i";
-  var_regex_181 : std::string = "ab{0,1}?bc";
-  regex_182 := "ab??bc";
-  regex_182_mod := "i";
-  var_regex_182 : std::string = "ab??bc";
-  regex_183 := "ab??c";
-  regex_183_mod := "i";
-  var_regex_183 : std::string = "ab??c";
-  regex_184 := "ab{0,1}?c";
-  regex_184_mod := "i";
-  var_regex_184 : std::string = "ab{0,1}?c";
-  regex_185 := "^abc\$";
-  regex_185_mod := "i";
-  var_regex_185 : std::string = "^abc\$";
-  regex_186 := "^abc\$";
-  regex_186_mod := "i";
-  var_regex_186 : std::string = "^abc\$";
-  regex_187 := "^abc";
-  regex_187_mod := "i";
-  var_regex_187 : std::string = "^abc";
-  regex_188 := "^abc\$";
-  regex_188_mod := "i";
-  var_regex_188 : std::string = "^abc\$";
-  regex_189 := "abc\$";
-  regex_189_mod := "i";
-  var_regex_189 : std::string = "abc\$";
-  regex_190 := "^";
-  regex_190_mod := "i";
-  var_regex_190 : std::string = "^";
-  regex_191 := "\$";
-  regex_191_mod := "i";
-  var_regex_191 : std::string = "\$";
-  regex_192 := "a.c";
-  regex_192_mod := "i";
-  var_regex_192 : std::string = "a.c";
-  regex_193 := "a.c";
-  regex_193_mod := "i";
-  var_regex_193 : std::string = "a.c";
-  regex_194 := "a\Nc";
-  regex_194_mod := "i";
-  var_regex_194 : std::string = "a\\Nc";
-  regex_195 := "a.*?c";
-  regex_195_mod := "i";
-  var_regex_195 : std::string = "a.*?c";
-  regex_196 := "a.*c";
-  regex_196_mod := "i";
-  var_regex_196 : std::string = "a.*c";
-//   regex_197 := "a[bc]d";
-//   regex_197_mod := "i";
-//   var_regex_197 : std::string = "a[bc]d";
-//   regex_198 := "a[bc]d";
-//   regex_198_mod := "i";
-//   var_regex_198 : std::string = "a[bc]d";
-//   regex_199 := "a[b-d]e";
-//   regex_199_mod := "i";
-//   var_regex_199 : std::string = "a[b-d]e";
-//   regex_200 := "a[b-d]e";
-//   regex_200_mod := "i";
-//   var_regex_200 : std::string = "a[b-d]e";
-//   regex_201 := "a[b-d]";
-//   regex_201_mod := "i";
-//   var_regex_201 : std::string = "a[b-d]";
-//   regex_202 := "a[-b]";
-//   regex_202_mod := "i";
-//   var_regex_202 : std::string = "a[-b]";
-//   regex_203 := "a[b-]";
-//   regex_203_mod := "i";
-//   var_regex_203 : std::string = "a[b-]";
-  regex_204 := "a]";
-  regex_204_mod := "i";
-  var_regex_204 : std::string = "a]";
-  regex_205 := "a[]]b";
-  regex_205_mod := "i";
-  var_regex_205 : std::string = "a[]]b";
-//   regex_206 := "a[^bc]d";
-//   regex_206_mod := "i";
-//   var_regex_206 : std::string = "a[^bc]d";
-//   regex_207 := "a[^bc]d";
-//   regex_207_mod := "i";
-//   var_regex_207 : std::string = "a[^bc]d";
-//   regex_208 := "a[^-b]c";
-//   regex_208_mod := "i";
-//   var_regex_208 : std::string = "a[^-b]c";
-//   regex_209 := "a[^-b]c";
-//   regex_209_mod := "i";
-//   var_regex_209 : std::string = "a[^-b]c";
-//   regex_210 := "a[^]b]c";
-//   regex_210_mod := "i";
-//   var_regex_210 : std::string = "a[^]b]c";
-//   regex_211 := "a[^]b]c";
-//   regex_211_mod := "i";
-//   var_regex_211 : std::string = "a[^]b]c";
-  regex_212 := "ab|cd";
-  regex_212_mod := "i";
-  var_regex_212 : std::string = "ab|cd";
-  regex_213 := "ab|cd";
-  regex_213_mod := "i";
-  var_regex_213 : std::string = "ab|cd";
-  regex_214 := "()ef";
-  regex_214_mod := "i";
-  var_regex_214 : std::string = "()ef";
-  regex_215 := "\$b";
-  regex_215_mod := "i";
-  var_regex_215 : std::string = "\$b";
-  regex_216 := "a\(b";
-  regex_216_mod := "i";
-  var_regex_216 : std::string = "a\(b";
-  regex_217 := "a\(*b";
-  regex_217_mod := "i";
-  var_regex_217 : std::string = "a\(*b";
-  regex_218 := "a\(*b";
-  regex_218_mod := "i";
-  var_regex_218 : std::string = "a\(*b";
-  regex_219 := "a\\b";
-  regex_219_mod := "i";
-  var_regex_219 : std::string = "a\\b";
-  regex_220 := "((a))";
-  regex_220_mod := "i";
-  var_regex_220 : std::string = "((a))";
-  regex_221 := "(a)b(c)";
-  regex_221_mod := "i";
-  var_regex_221 : std::string = "(a)b(c)";
-  regex_222 := "a+b+c";
-  regex_222_mod := "i";
-  var_regex_222 : std::string = "a+b+c";
-  regex_223 := "a{1,}b{1,}c";
-  regex_223_mod := "i";
-  var_regex_223 : std::string = "a{1,}b{1,}c";
-  regex_224 := "a.+?c";
-  regex_224_mod := "i";
-  var_regex_224 : std::string = "a.+?c";
-  regex_225 := "a.*?c";
-  regex_225_mod := "i";
-  var_regex_225 : std::string = "a.*?c";
-  regex_226 := "a.{0,5}?c";
-  regex_226_mod := "i";
-  var_regex_226 : std::string = "a.{0,5}?c";
-  regex_227 := "(a+|b)*";
-  regex_227_mod := "i";
-  var_regex_227 : std::string = "(a+|b)*";
-  regex_228 := "(a+|b){0,}";
-  regex_228_mod := "i";
-  var_regex_228 : std::string = "(a+|b){0,}";
-  regex_229 := "(a+|b)+";
-  regex_229_mod := "i";
-  var_regex_229 : std::string = "(a+|b)+";
-  regex_230 := "(a+|b){1,}";
-  regex_230_mod := "i";
-  var_regex_230 : std::string = "(a+|b){1,}";
-  regex_231 := "(a+|b)?";
-  regex_231_mod := "i";
-  var_regex_231 : std::string = "(a+|b)?";
-  regex_232 := "(a+|b){0,1}";
-  regex_232_mod := "i";
-  var_regex_232 : std::string = "(a+|b){0,1}";
-  regex_233 := "(a+|b){0,1}?";
-  regex_233_mod := "i";
-  var_regex_233 : std::string = "(a+|b){0,1}?";
-//   regex_234 := "[^ab]*";
-//   regex_234_mod := "i";
-//   var_regex_234 : std::string = "[^ab]*";
-  regex_235 := "abc";
-  regex_235_mod := "i";
-  var_regex_235 : std::string = "abc";
-  regex_236 := "a*";
-  regex_236_mod := "i";
-  var_regex_236 : std::string = "a*";
-//   regex_237 := "([abc])*d";
-//   regex_237_mod := "i";
-//   var_regex_237 : std::string = "([abc])*d";
-//   regex_238 := "([abc])*bcd";
-//   regex_238_mod := "i";
-//   var_regex_238 : std::string = "([abc])*bcd";
-  regex_239 := "a|b|c|d|e";
-  regex_239_mod := "i";
-  var_regex_239 : std::string = "a|b|c|d|e";
-  regex_240 := "(a|b|c|d|e)f";
-  regex_240_mod := "i";
-  var_regex_240 : std::string = "(a|b|c|d|e)f";
-  regex_241 := "abcd*efg";
-  regex_241_mod := "i";
-  var_regex_241 : std::string = "abcd*efg";
-  regex_242 := "ab*";
-  regex_242_mod := "i";
-  var_regex_242 : std::string = "ab*";
-  regex_243 := "ab*";
-  regex_243_mod := "i";
-  var_regex_243 : std::string = "ab*";
-  regex_244 := "(ab|cd)e";
-  regex_244_mod := "i";
-  var_regex_244 : std::string = "(ab|cd)e";
-//   regex_245 := "[abhgefdc]ij";
-//   regex_245_mod := "i";
-//   var_regex_245 : std::string = "[abhgefdc]ij";
-  regex_246 := "^(ab|cd)e";
-  regex_246_mod := "i";
-  var_regex_246 : std::string = "^(ab|cd)e";
-  regex_247 := "(abc|)ef";
-  regex_247_mod := "i";
-  var_regex_247 : std::string = "(abc|)ef";
-  regex_248 := "(a|b)c*d";
-  regex_248_mod := "i";
-  var_regex_248 : std::string = "(a|b)c*d";
-  regex_249 := "(ab|ab*)bc";
-  regex_249_mod := "i";
-  var_regex_249 : std::string = "(ab|ab*)bc";
-//   regex_250 := "a([bc]*)c*";
-//   regex_250_mod := "i";
-//   var_regex_250 : std::string = "a([bc]*)c*";
-//   regex_251 := "a([bc]*)(c*d)";
-//   regex_251_mod := "i";
-//   var_regex_251 : std::string = "a([bc]*)(c*d)";
-//   regex_252 := "a([bc]+)(c*d)";
-//   regex_252_mod := "i";
-//   var_regex_252 : std::string = "a([bc]+)(c*d)";
-//   regex_253 := "a([bc]*)(c+d)";
-//   regex_253_mod := "i";
-//   var_regex_253 : std::string = "a([bc]*)(c+d)";
-//   regex_254 := "a[bcd]*dcdcde";
-//   regex_254_mod := "i";
-//   var_regex_254 : std::string = "a[bcd]*dcdcde";
-//   regex_255 := "a[bcd]+dcdcde";
-//   regex_255_mod := "i";
-//   var_regex_255 : std::string = "a[bcd]+dcdcde";
-  regex_256 := "(ab|a)b*c";
-  regex_256_mod := "i";
-  var_regex_256 : std::string = "(ab|a)b*c";
-  regex_257 := "((a)(b)c)(d)";
-  regex_257_mod := "i";
-  var_regex_257 : std::string = "((a)(b)c)(d)";
-//   regex_258 := "[a-zA-Z_][a-zA-Z0-9_]*";
-//   regex_258_mod := "i";
-//   var_regex_258 : std::string = "[a-zA-Z_][a-zA-Z0-9_]*";
-//   regex_259 := "^a(bc+|b[eh])g|.h\$";
-//   regex_259_mod := "i";
-//   var_regex_259 : std::string = "^a(bc+|b[eh])g|.h\$";
-  regex_260 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_260_mod := "i";
-  var_regex_260 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_261 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_261_mod := "i";
-  var_regex_261 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_262 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_262_mod := "i";
-  var_regex_262 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_263 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_263_mod := "i";
-  var_regex_263 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_264 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_264_mod := "i";
-  var_regex_264 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_265 := "((((((((((a))))))))))";
-  regex_265_mod := "i";
-  var_regex_265 : std::string = "((((((((((a))))))))))";
-  regex_266 := "((((((((((a))))))))))\10";
-  regex_266_mod := "i";
-  var_regex_266 : std::string = "((((((((((a))))))))))\10";
-  regex_267 := "(((((((((a)))))))))";
-  regex_267_mod := "i";
-  var_regex_267 : std::string = "(((((((((a)))))))))";
-  regex_268 := "multiple words of text";
-  regex_268_mod := "i";
-  var_regex_268 : std::string = "multiple words of text";
-  regex_269 := "multiple words";
-  regex_269_mod := "i";
-  var_regex_269 : std::string = "multiple words";
-  regex_270 := "(.*)c(.*)";
-  regex_270_mod := "i";
-  var_regex_270 : std::string = "(.*)c(.*)";
-  regex_271 := "\((.*), (.*)\)";
-  regex_271_mod := "i";
-  var_regex_271 : std::string = "\((.*), (.*)\)";
-//   regex_272 := "[k]";
-//   regex_272_mod := "i";
-//   var_regex_272 : std::string = "[k]";
-  regex_273 := "abcd";
-  regex_273_mod := "i";
-  var_regex_273 : std::string = "abcd";
-  regex_274 := "a(bc)d";
-  regex_274_mod := "i";
-  var_regex_274 : std::string = "a(bc)d";
-//   regex_275 := "a[-]?c";
-//   regex_275_mod := "i";
-//   var_regex_275 : std::string = "a[-]?c";
-  regex_276 := "(abc)\1";
-  regex_276_mod := "i";
-  var_regex_276 : std::string = "(abc)\1";
-//   regex_277 := "([a-c]*)\1";
-//   regex_277_mod := "i";
-//   var_regex_277 : std::string = "([a-c]*)\1";
-  regex_278 := "a++a";
-  var_regex_278 : std::string = "a++a";
-  regex_279 := "a*+a";
-  var_regex_279 : std::string = "a*+a";
-  regex_280 := "a{1,5}+a";
-  var_regex_280 : std::string = "a{1,5}+a";
-  regex_281 := "a?+a";
-  var_regex_281 : std::string = "a?+a";
-  regex_282 := "a++b";
-  var_regex_282 : std::string = "a++b";
-  regex_283 := "a*+b";
-  var_regex_283 : std::string = "a*+b";
-  regex_284 := "a{1,5}+b";
-  var_regex_284 : std::string = "a{1,5}+b";
-  regex_285 := "a?+b";
-  var_regex_285 : std::string = "a?+b";
-  regex_286 := "fooa++a";
-  var_regex_286 : std::string = "fooa++a";
-  regex_287 := "fooa*+a";
-  var_regex_287 : std::string = "fooa*+a";
-  regex_288 := "fooa{1,5}+a";
-  var_regex_288 : std::string = "fooa{1,5}+a";
-  regex_289 := "fooa?+a";
-  var_regex_289 : std::string = "fooa?+a";
-  regex_290 := "fooa++b";
-  var_regex_290 : std::string = "fooa++b";
-  regex_291 := "fooa*+b";
-  var_regex_291 : std::string = "fooa*+b";
-  regex_292 := "fooa{1,5}+b";
-  var_regex_292 : std::string = "fooa{1,5}+b";
-  regex_293 := "fooa?+b";
-  var_regex_293 : std::string = "fooa?+b";
-  regex_294 := "(aA)++(aA)";
-  var_regex_294 : std::string = "(aA)++(aA)";
-  regex_295 := "(aA|bB)++(aA|bB)";
-  var_regex_295 : std::string = "(aA|bB)++(aA|bB)";
-  regex_296 := "(aA)*+(aA)";
-  var_regex_296 : std::string = "(aA)*+(aA)";
-  regex_297 := "(aA|bB)*+(aA|bB)";
-  var_regex_297 : std::string = "(aA|bB)*+(aA|bB)";
-  regex_298 := "(aA){1,5}+(aA)";
-  var_regex_298 : std::string = "(aA){1,5}+(aA)";
-  regex_299 := "(aA|bB){1,5}+(aA|bB)";
-  var_regex_299 : std::string = "(aA|bB){1,5}+(aA|bB)";
-  regex_300 := "(aA)?+(aA)";
-  var_regex_300 : std::string = "(aA)?+(aA)";
-  regex_301 := "(aA|bB)?+(aA|bB)";
-  var_regex_301 : std::string = "(aA|bB)?+(aA|bB)";
-  regex_302 := "(aA)++b";
-  var_regex_302 : std::string = "(aA)++b";
-  regex_303 := "(aA|bB)++b";
-  var_regex_303 : std::string = "(aA|bB)++b";
-  regex_304 := "(aA)*+b";
-  var_regex_304 : std::string = "(aA)*+b";
-  regex_305 := "(aA|bB)*+b";
-  var_regex_305 : std::string = "(aA|bB)*+b";
-  regex_306 := "(aA){1,5}+b";
-  var_regex_306 : std::string = "(aA){1,5}+b";
-  regex_307 := "(aA|bB){1,5}+b";
-  var_regex_307 : std::string = "(aA|bB){1,5}+b";
-  regex_308 := "(aA)?+b";
-  var_regex_308 : std::string = "(aA)?+b";
-  regex_309 := "(aA|bB)?+b";
-  var_regex_309 : std::string = "(aA|bB)?+b";
-  regex_310 := "foo(aA)++(aA)";
-  var_regex_310 : std::string = "foo(aA)++(aA)";
-  regex_311 := "foo(aA|bB)++(aA|bB)";
-  var_regex_311 : std::string = "foo(aA|bB)++(aA|bB)";
-  regex_312 := "foo(aA)*+(aA)";
-  var_regex_312 : std::string = "foo(aA)*+(aA)";
-  regex_313 := "foo(aA|bB)*+(aA|bB)";
-  var_regex_313 : std::string = "foo(aA|bB)*+(aA|bB)";
-  regex_314 := "foo(aA){1,5}+(aA)";
-  var_regex_314 : std::string = "foo(aA){1,5}+(aA)";
-  regex_315 := "foo(aA|bB){1,5}+(aA|bB)";
-  var_regex_315 : std::string = "foo(aA|bB){1,5}+(aA|bB)";
-  regex_316 := "foo(aA)?+(aA)";
-  var_regex_316 : std::string = "foo(aA)?+(aA)";
-  regex_317 := "foo(aA|bB)?+(aA|bB)";
-  var_regex_317 : std::string = "foo(aA|bB)?+(aA|bB)";
-  regex_318 := "foo(aA)++b";
-  var_regex_318 : std::string = "foo(aA)++b";
-  regex_319 := "foo(aA|bB)++b";
-  var_regex_319 : std::string = "foo(aA|bB)++b";
-  regex_320 := "foo(aA)*+b";
-  var_regex_320 : std::string = "foo(aA)*+b";
-  regex_321 := "foo(aA|bB)*+b";
-  var_regex_321 : std::string = "foo(aA|bB)*+b";
-  regex_322 := "foo(aA){1,5}+b";
-  var_regex_322 : std::string = "foo(aA){1,5}+b";
-  regex_323 := "foo(aA|bB){1,5}+b";
-  var_regex_323 : std::string = "foo(aA|bB){1,5}+b";
-  regex_324 := "foo(aA)?+b";
-  var_regex_324 : std::string = "foo(aA)?+b";
-  regex_325 := "foo(aA|bB)?+b";
-  var_regex_325 : std::string = "foo(aA|bB)?+b";
-  regex_326 := "foo(\h+)bar";
-  var_regex_326 : std::string = "foo(\h+)bar";
-  regex_327 := "(\H+)(\h)";
-  var_regex_327 : std::string = "(\H+)(\h)";
-  regex_328 := "(\h+)(\H)";
-  var_regex_328 : std::string = "(\h+)(\H)";
-  regex_329 := "foo(\h)bar";
-  var_regex_329 : std::string = "foo(\h)bar";
-  regex_330 := "(\H)(\h)";
-  var_regex_330 : std::string = "(\H)(\h)";
-  regex_331 := "(\h)(\H)";
-  var_regex_331 : std::string = "(\h)(\H)";
-  regex_332 := "foo(\v+)bar";
-  var_regex_332 : std::string = "foo(\v+)bar";
-  regex_333 := "(\V+)(\v)";
-  var_regex_333 : std::string = "(\V+)(\v)";
-  regex_334 := "(\v+)(\V)";
-  var_regex_334 : std::string = "(\v+)(\V)";
-  regex_335 := "foo(\v)bar";
-  var_regex_335 : std::string = "foo(\v)bar";
-  regex_336 := "(\V)(\v)";
-  var_regex_336 : std::string = "(\V)(\v)";
-  regex_337 := "(\v)(\V)";
-  var_regex_337 : std::string = "(\v)(\V)";
-  regex_338 := "(?:(?i)a)b";
-  var_regex_338 : std::string = "(?:(?i)a)b";
-  regex_339 := "((?i)a)b";
-  var_regex_339 : std::string = "((?i)a)b";
-  regex_340 := "(?:(?i)a)b";
-  var_regex_340 : std::string = "(?:(?i)a)b";
-  regex_341 := "((?i)a)b";
-  var_regex_341 : std::string = "((?i)a)b";
-  regex_342 := "(?:(?i)a)b";
-  var_regex_342 : std::string = "(?:(?i)a)b";
-  regex_343 := "((?i)a)b";
-  var_regex_343 : std::string = "((?i)a)b";
-  regex_344 := "(?i:a)b";
-  var_regex_344 : std::string = "(?i:a)b";
-  regex_345 := "((?i:a))b";
-  var_regex_345 : std::string = "((?i:a))b";
-  regex_346 := "(?i:a)b";
-  var_regex_346 : std::string = "(?i:a)b";
-  regex_347 := "((?i:a))b";
-  var_regex_347 : std::string = "((?i:a))b";
-  regex_348 := "(?i:a)b";
-  var_regex_348 : std::string = "(?i:a)b";
-  regex_349 := "((?i:a))b";
-  var_regex_349 : std::string = "((?i:a))b";
-  regex_350 := "(?:(?-i)a)b";
-  regex_350_mod := "i";
-  var_regex_350 : std::string = "(?:(?-i)a)b";
-  regex_351 := "((?-i)a)b";
-  regex_351_mod := "i";
-  var_regex_351 : std::string = "((?-i)a)b";
-  regex_352 := "(?:(?-i)a)b";
-  regex_352_mod := "i";
-  var_regex_352 : std::string = "(?:(?-i)a)b";
-  regex_353 := "((?-i)a)b";
-  regex_353_mod := "i";
-  var_regex_353 : std::string = "((?-i)a)b";
-  regex_354 := "(?:(?-i)a)b";
-  regex_354_mod := "i";
-  var_regex_354 : std::string = "(?:(?-i)a)b";
-  regex_355 := "((?-i)a)b";
-  regex_355_mod := "i";
-  var_regex_355 : std::string = "((?-i)a)b";
-  regex_356 := "(?:(?-i)a)b";
-  regex_356_mod := "i";
-  var_regex_356 : std::string = "(?:(?-i)a)b";
-  regex_357 := "((?-i)a)b";
-  regex_357_mod := "i";
-  var_regex_357 : std::string = "((?-i)a)b";
-  regex_358 := "(?:(?-i)a)b";
-  regex_358_mod := "i";
-  var_regex_358 : std::string = "(?:(?-i)a)b";
-  regex_359 := "((?-i)a)b";
-  regex_359_mod := "i";
-  var_regex_359 : std::string = "((?-i)a)b";
-  regex_360 := "(?-i:a)b";
-  regex_360_mod := "i";
-  var_regex_360 : std::string = "(?-i:a)b";
-  regex_361 := "((?-i:a))b";
-  regex_361_mod := "i";
-  var_regex_361 : std::string = "((?-i:a))b";
-  regex_362 := "(?-i:a)b";
-  regex_362_mod := "i";
-  var_regex_362 : std::string = "(?-i:a)b";
-  regex_363 := "((?-i:a))b";
-  regex_363_mod := "i";
-  var_regex_363 : std::string = "((?-i:a))b";
-  regex_364 := "(?-i:a)b";
-  regex_364_mod := "i";
-  var_regex_364 : std::string = "(?-i:a)b";
-  regex_365 := "((?-i:a))b";
-  regex_365_mod := "i";
-  var_regex_365 : std::string = "((?-i:a))b";
-  regex_366 := "(?-i:a)b";
-  regex_366_mod := "i";
-  var_regex_366 : std::string = "(?-i:a)b";
-  regex_367 := "((?-i:a))b";
-  regex_367_mod := "i";
-  var_regex_367 : std::string = "((?-i:a))b";
-  regex_368 := "(?-i:a)b";
-  regex_368_mod := "i";
-  var_regex_368 : std::string = "(?-i:a)b";
-  regex_369 := "((?-i:a))b";
-  regex_369_mod := "i";
-  var_regex_369 : std::string = "((?-i:a))b";
-  regex_370 := "((?-i:a.))b";
-  regex_370_mod := "i";
-  var_regex_370 : std::string = "((?-i:a.))b";
-  regex_371 := "((?-i:a\N))b";
-  regex_371_mod := "i";
-  var_regex_371 : std::string = "((?-i:a\\N))b";
-  regex_372 := "((?s-i:a.))b";
-  regex_372_mod := "i";
-  var_regex_372 : std::string = "((?s-i:a.))b";
-  regex_373 := "((?s-i:a\N))b";
-  regex_373_mod := "i";
-  var_regex_373 : std::string = "((?s-i:a\\N))b";
-  regex_374 := "((?s-i:a.))b";
-  regex_374_mod := "i";
-  var_regex_374 : std::string = "((?s-i:a.))b";
-  regex_375 := "((?s-i:a\N))b";
-  regex_375_mod := "i";
-  var_regex_375 : std::string = "((?s-i:a\\N))b";
-  regex_376 := "^(?:a?b?)*\$";
-  var_regex_376 : std::string = "^(?:a?b?)*\$";
-  regex_377 := "((?s)^a(.))((?m)^b\$)";
-  var_regex_377 : std::string = "((?s)^a(.))((?m)^b\$)";
-  regex_378 := "((?m)^b\$)";
-  var_regex_378 : std::string = "((?m)^b\$)";
-  regex_379 := "(?m)^b";
-  var_regex_379 : std::string = "(?m)^b";
-  regex_380 := "(?m)^(b)";
-  var_regex_380 : std::string = "(?m)^(b)";
-  regex_381 := "((?m)^b)";
-  var_regex_381 : std::string = "((?m)^b)";
-  regex_382 := "\n((?m)^b)";
-  var_regex_382 : std::string = "\n((?m)^b)";
-  regex_383 := "^b";
-  var_regex_383 : std::string = "^b";
-  regex_384 := "()^b";
-  var_regex_384 : std::string = "()^b";
-  regex_385 := "((?m)^b)";
-  var_regex_385 : std::string = "((?m)^b)";
-  regex_386 := "\Z";
-  var_regex_386 : std::string = "\Z";
-  regex_387 := "\z";
-  var_regex_387 : std::string = "\z";
-  regex_388 := "\$";
-  var_regex_388 : std::string = "\$";
-  regex_389 := "\Z";
-  var_regex_389 : std::string = "\Z";
-  regex_390 := "\z";
-  var_regex_390 : std::string = "\z";
-  regex_391 := "\$";
-  var_regex_391 : std::string = "\$";
-  regex_392 := "\Z";
-  var_regex_392 : std::string = "\Z";
-  regex_393 := "\z";
-  var_regex_393 : std::string = "\z";
-  regex_394 := "\$";
-  var_regex_394 : std::string = "\$";
-  regex_395 := "\Z";
-  regex_395_mod := "m";
-  var_regex_395 : std::string = "\Z";
-  regex_396 := "\z";
-  regex_396_mod := "m";
-  var_regex_396 : std::string = "\z";
-  regex_397 := "\$";
-  regex_397_mod := "m";
-  var_regex_397 : std::string = "\$";
-  regex_398 := "\Z";
-  regex_398_mod := "m";
-  var_regex_398 : std::string = "\Z";
-  regex_399 := "\z";
-  regex_399_mod := "m";
-  var_regex_399 : std::string = "\z";
-  regex_400 := "\$";
-  regex_400_mod := "m";
-  var_regex_400 : std::string = "\$";
-  regex_401 := "\Z";
-  regex_401_mod := "m";
-  var_regex_401 : std::string = "\Z";
-  regex_402 := "\z";
-  regex_402_mod := "m";
-  var_regex_402 : std::string = "\z";
-  regex_403 := "\$";
-  regex_403_mod := "m";
-  var_regex_403 : std::string = "\$";
-  regex_404 := "a\Z";
-  var_regex_404 : std::string = "a\Z";
-  regex_405 := "a\z";
-  var_regex_405 : std::string = "a\z";
-  regex_406 := "a\$";
-  var_regex_406 : std::string = "a\$";
-  regex_407 := "a\Z";
-  var_regex_407 : std::string = "a\Z";
-  regex_408 := "a\z";
-  var_regex_408 : std::string = "a\z";
-  regex_409 := "a\$";
-  var_regex_409 : std::string = "a\$";
-  regex_410 := "a\Z";
-  var_regex_410 : std::string = "a\Z";
-  regex_411 := "a\z";
-  var_regex_411 : std::string = "a\z";
-  regex_412 := "a\$";
-  var_regex_412 : std::string = "a\$";
-  regex_413 := "a\Z";
-  regex_413_mod := "m";
-  var_regex_413 : std::string = "a\Z";
-  regex_414 := "a\z";
-  regex_414_mod := "m";
-  var_regex_414 : std::string = "a\z";
-  regex_415 := "a\$";
-  regex_415_mod := "m";
-  var_regex_415 : std::string = "a\$";
-  regex_416 := "a\Z";
-  regex_416_mod := "m";
-  var_regex_416 : std::string = "a\Z";
-  regex_417 := "a\z";
-  regex_417_mod := "m";
-  var_regex_417 : std::string = "a\z";
-  regex_418 := "a\$";
-  regex_418_mod := "m";
-  var_regex_418 : std::string = "a\$";
-  regex_419 := "a\Z";
-  regex_419_mod := "m";
-  var_regex_419 : std::string = "a\Z";
-  regex_420 := "a\z";
-  regex_420_mod := "m";
-  var_regex_420 : std::string = "a\z";
-  regex_421 := "a\$";
-  regex_421_mod := "m";
-  var_regex_421 : std::string = "a\$";
-  regex_422 := "aa\Z";
-  var_regex_422 : std::string = "aa\Z";
-  regex_423 := "aa\z";
-  var_regex_423 : std::string = "aa\z";
-  regex_424 := "aa\$";
-  var_regex_424 : std::string = "aa\$";
-  regex_425 := "aa\Z";
-  var_regex_425 : std::string = "aa\Z";
-  regex_426 := "aa\z";
-  var_regex_426 : std::string = "aa\z";
-  regex_427 := "aa\$";
-  var_regex_427 : std::string = "aa\$";
-  regex_428 := "aa\Z";
-  var_regex_428 : std::string = "aa\Z";
-  regex_429 := "aa\z";
-  var_regex_429 : std::string = "aa\z";
-  regex_430 := "aa\$";
-  var_regex_430 : std::string = "aa\$";
-  regex_431 := "aa\Z";
-  regex_431_mod := "m";
-  var_regex_431 : std::string = "aa\Z";
-  regex_432 := "aa\z";
-  regex_432_mod := "m";
-  var_regex_432 : std::string = "aa\z";
-  regex_433 := "aa\$";
-  regex_433_mod := "m";
-  var_regex_433 : std::string = "aa\$";
-  regex_434 := "aa\Z";
-  regex_434_mod := "m";
-  var_regex_434 : std::string = "aa\Z";
-  regex_435 := "aa\z";
-  regex_435_mod := "m";
-  var_regex_435 : std::string = "aa\z";
-  regex_436 := "aa\$";
-  regex_436_mod := "m";
-  var_regex_436 : std::string = "aa\$";
-  regex_437 := "aa\Z";
-  regex_437_mod := "m";
-  var_regex_437 : std::string = "aa\Z";
-  regex_438 := "aa\z";
-  regex_438_mod := "m";
-  var_regex_438 : std::string = "aa\z";
-  regex_439 := "aa\$";
-  regex_439_mod := "m";
-  var_regex_439 : std::string = "aa\$";
-  regex_440 := "aa\Z";
-  var_regex_440 : std::string = "aa\Z";
-  regex_441 := "aa\z";
-  var_regex_441 : std::string = "aa\z";
-  regex_442 := "aa\$";
-  var_regex_442 : std::string = "aa\$";
-  regex_443 := "aa\Z";
-  var_regex_443 : std::string = "aa\Z";
-  regex_444 := "aa\z";
-  var_regex_444 : std::string = "aa\z";
-  regex_445 := "aa\$";
-  var_regex_445 : std::string = "aa\$";
-  regex_446 := "aa\Z";
-  var_regex_446 : std::string = "aa\Z";
-  regex_447 := "aa\z";
-  var_regex_447 : std::string = "aa\z";
-  regex_448 := "aa\$";
-  var_regex_448 : std::string = "aa\$";
-  regex_449 := "aa\Z";
-  regex_449_mod := "m";
-  var_regex_449 : std::string = "aa\Z";
-  regex_450 := "aa\z";
-  regex_450_mod := "m";
-  var_regex_450 : std::string = "aa\z";
-  regex_451 := "aa\$";
-  regex_451_mod := "m";
-  var_regex_451 : std::string = "aa\$";
-  regex_452 := "aa\Z";
-  regex_452_mod := "m";
-  var_regex_452 : std::string = "aa\Z";
-  regex_453 := "aa\z";
-  regex_453_mod := "m";
-  var_regex_453 : std::string = "aa\z";
-  regex_454 := "aa\$";
-  regex_454_mod := "m";
-  var_regex_454 : std::string = "aa\$";
-  regex_455 := "aa\Z";
-  regex_455_mod := "m";
-  var_regex_455 : std::string = "aa\Z";
-  regex_456 := "aa\z";
-  regex_456_mod := "m";
-  var_regex_456 : std::string = "aa\z";
-  regex_457 := "aa\$";
-  regex_457_mod := "m";
-  var_regex_457 : std::string = "aa\$";
-  regex_458 := "aa\Z";
-  var_regex_458 : std::string = "aa\Z";
-  regex_459 := "aa\z";
-  var_regex_459 : std::string = "aa\z";
-  regex_460 := "aa\$";
-  var_regex_460 : std::string = "aa\$";
-  regex_461 := "aa\Z";
-  var_regex_461 : std::string = "aa\Z";
-  regex_462 := "aa\z";
-  var_regex_462 : std::string = "aa\z";
-  regex_463 := "aa\$";
-  var_regex_463 : std::string = "aa\$";
-  regex_464 := "aa\Z";
-  var_regex_464 : std::string = "aa\Z";
-  regex_465 := "aa\z";
-  var_regex_465 : std::string = "aa\z";
-  regex_466 := "aa\$";
-  var_regex_466 : std::string = "aa\$";
-  regex_467 := "aa\Z";
-  regex_467_mod := "m";
-  var_regex_467 : std::string = "aa\Z";
-  regex_468 := "aa\z";
-  regex_468_mod := "m";
-  var_regex_468 : std::string = "aa\z";
-  regex_469 := "aa\$";
-  regex_469_mod := "m";
-  var_regex_469 : std::string = "aa\$";
-  regex_470 := "aa\Z";
-  regex_470_mod := "m";
-  var_regex_470 : std::string = "aa\Z";
-  regex_471 := "aa\z";
-  regex_471_mod := "m";
-  var_regex_471 : std::string = "aa\z";
-  regex_472 := "aa\$";
-  regex_472_mod := "m";
-  var_regex_472 : std::string = "aa\$";
-  regex_473 := "aa\Z";
-  regex_473_mod := "m";
-  var_regex_473 : std::string = "aa\Z";
-  regex_474 := "aa\z";
-  regex_474_mod := "m";
-  var_regex_474 : std::string = "aa\z";
-  regex_475 := "aa\$";
-  regex_475_mod := "m";
-  var_regex_475 : std::string = "aa\$";
-  regex_476 := "ab\Z";
-  var_regex_476 : std::string = "ab\Z";
-  regex_477 := "ab\z";
-  var_regex_477 : std::string = "ab\z";
-  regex_478 := "ab\$";
-  var_regex_478 : std::string = "ab\$";
-  regex_479 := "ab\Z";
-  var_regex_479 : std::string = "ab\Z";
-  regex_480 := "ab\z";
-  var_regex_480 : std::string = "ab\z";
-  regex_481 := "ab\$";
-  var_regex_481 : std::string = "ab\$";
-  regex_482 := "ab\Z";
-  var_regex_482 : std::string = "ab\Z";
-  regex_483 := "ab\z";
-  var_regex_483 : std::string = "ab\z";
-  regex_484 := "ab\$";
-  var_regex_484 : std::string = "ab\$";
-  regex_485 := "ab\Z";
-  regex_485_mod := "m";
-  var_regex_485 : std::string = "ab\Z";
-  regex_486 := "ab\z";
-  regex_486_mod := "m";
-  var_regex_486 : std::string = "ab\z";
-  regex_487 := "ab\$";
-  regex_487_mod := "m";
-  var_regex_487 : std::string = "ab\$";
-  regex_488 := "ab\Z";
-  regex_488_mod := "m";
-  var_regex_488 : std::string = "ab\Z";
-  regex_489 := "ab\z";
-  regex_489_mod := "m";
-  var_regex_489 : std::string = "ab\z";
-  regex_490 := "ab\$";
-  regex_490_mod := "m";
-  var_regex_490 : std::string = "ab\$";
-  regex_491 := "ab\Z";
-  regex_491_mod := "m";
-  var_regex_491 : std::string = "ab\Z";
-  regex_492 := "ab\z";
-  regex_492_mod := "m";
-  var_regex_492 : std::string = "ab\z";
-  regex_493 := "ab\$";
-  regex_493_mod := "m";
-  var_regex_493 : std::string = "ab\$";
-  regex_494 := "ab\Z";
-  var_regex_494 : std::string = "ab\Z";
-  regex_495 := "ab\z";
-  var_regex_495 : std::string = "ab\z";
-  regex_496 := "ab\$";
-  var_regex_496 : std::string = "ab\$";
-  regex_497 := "ab\Z";
-  var_regex_497 : std::string = "ab\Z";
-  regex_498 := "ab\z";
-  var_regex_498 : std::string = "ab\z";
-  regex_499 := "ab\$";
-  var_regex_499 : std::string = "ab\$";
-  regex_500 := "ab\Z";
-  var_regex_500 : std::string = "ab\Z";
-  regex_501 := "ab\z";
-  var_regex_501 : std::string = "ab\z";
-  regex_502 := "ab\$";
-  var_regex_502 : std::string = "ab\$";
-  regex_503 := "ab\Z";
-  regex_503_mod := "m";
-  var_regex_503 : std::string = "ab\Z";
-  regex_504 := "ab\z";
-  regex_504_mod := "m";
-  var_regex_504 : std::string = "ab\z";
-  regex_505 := "ab\$";
-  regex_505_mod := "m";
-  var_regex_505 : std::string = "ab\$";
-  regex_506 := "ab\Z";
-  regex_506_mod := "m";
-  var_regex_506 : std::string = "ab\Z";
-  regex_507 := "ab\z";
-  regex_507_mod := "m";
-  var_regex_507 : std::string = "ab\z";
-  regex_508 := "ab\$";
-  regex_508_mod := "m";
-  var_regex_508 : std::string = "ab\$";
-  regex_509 := "ab\Z";
-  regex_509_mod := "m";
-  var_regex_509 : std::string = "ab\Z";
-  regex_510 := "ab\z";
-  regex_510_mod := "m";
-  var_regex_510 : std::string = "ab\z";
-  regex_511 := "ab\$";
-  regex_511_mod := "m";
-  var_regex_511 : std::string = "ab\$";
-  regex_512 := "ab\Z";
-  var_regex_512 : std::string = "ab\Z";
-  regex_513 := "ab\z";
-  var_regex_513 : std::string = "ab\z";
-  regex_514 := "ab\$";
-  var_regex_514 : std::string = "ab\$";
-  regex_515 := "ab\Z";
-  var_regex_515 : std::string = "ab\Z";
-  regex_516 := "ab\z";
-  var_regex_516 : std::string = "ab\z";
-  regex_517 := "ab\$";
-  var_regex_517 : std::string = "ab\$";
-  regex_518 := "ab\Z";
-  var_regex_518 : std::string = "ab\Z";
-  regex_519 := "ab\z";
-  var_regex_519 : std::string = "ab\z";
-  regex_520 := "ab\$";
-  var_regex_520 : std::string = "ab\$";
-  regex_521 := "ab\Z";
-  regex_521_mod := "m";
-  var_regex_521 : std::string = "ab\Z";
-  regex_522 := "ab\z";
-  regex_522_mod := "m";
-  var_regex_522 : std::string = "ab\z";
-  regex_523 := "ab\$";
-  regex_523_mod := "m";
-  var_regex_523 : std::string = "ab\$";
-  regex_524 := "ab\Z";
-  regex_524_mod := "m";
-  var_regex_524 : std::string = "ab\Z";
-  regex_525 := "ab\z";
-  regex_525_mod := "m";
-  var_regex_525 : std::string = "ab\z";
-  regex_526 := "ab\$";
-  regex_526_mod := "m";
-  var_regex_526 : std::string = "ab\$";
-  regex_527 := "ab\Z";
-  regex_527_mod := "m";
-  var_regex_527 : std::string = "ab\Z";
-  regex_528 := "ab\z";
-  regex_528_mod := "m";
-  var_regex_528 : std::string = "ab\z";
-  regex_529 := "ab\$";
-  regex_529_mod := "m";
-  var_regex_529 : std::string = "ab\$";
-  regex_530 := "abb\Z";
-  var_regex_530 : std::string = "abb\Z";
-  regex_531 := "abb\z";
-  var_regex_531 : std::string = "abb\z";
-  regex_532 := "abb\$";
-  var_regex_532 : std::string = "abb\$";
-  regex_533 := "abb\Z";
-  var_regex_533 : std::string = "abb\Z";
-  regex_534 := "abb\z";
-  var_regex_534 : std::string = "abb\z";
-  regex_535 := "abb\$";
-  var_regex_535 : std::string = "abb\$";
-  regex_536 := "abb\Z";
-  var_regex_536 : std::string = "abb\Z";
-  regex_537 := "abb\z";
-  var_regex_537 : std::string = "abb\z";
-  regex_538 := "abb\$";
-  var_regex_538 : std::string = "abb\$";
-  regex_539 := "abb\Z";
-  regex_539_mod := "m";
-  var_regex_539 : std::string = "abb\Z";
-  regex_540 := "abb\z";
-  regex_540_mod := "m";
-  var_regex_540 : std::string = "abb\z";
-  regex_541 := "abb\$";
-  regex_541_mod := "m";
-  var_regex_541 : std::string = "abb\$";
-  regex_542 := "abb\Z";
-  regex_542_mod := "m";
-  var_regex_542 : std::string = "abb\Z";
-  regex_543 := "abb\z";
-  regex_543_mod := "m";
-  var_regex_543 : std::string = "abb\z";
-  regex_544 := "abb\$";
-  regex_544_mod := "m";
-  var_regex_544 : std::string = "abb\$";
-  regex_545 := "abb\Z";
-  regex_545_mod := "m";
-  var_regex_545 : std::string = "abb\Z";
-  regex_546 := "abb\z";
-  regex_546_mod := "m";
-  var_regex_546 : std::string = "abb\z";
-  regex_547 := "abb\$";
-  regex_547_mod := "m";
-  var_regex_547 : std::string = "abb\$";
-  regex_548 := "abb\Z";
-  var_regex_548 : std::string = "abb\Z";
-  regex_549 := "abb\z";
-  var_regex_549 : std::string = "abb\z";
-  regex_550 := "abb\$";
-  var_regex_550 : std::string = "abb\$";
-  regex_551 := "abb\Z";
-  var_regex_551 : std::string = "abb\Z";
-  regex_552 := "abb\z";
-  var_regex_552 : std::string = "abb\z";
-  regex_553 := "abb\$";
-  var_regex_553 : std::string = "abb\$";
-  regex_554 := "abb\Z";
-  var_regex_554 : std::string = "abb\Z";
-  regex_555 := "abb\z";
-  var_regex_555 : std::string = "abb\z";
-  regex_556 := "abb\$";
-  var_regex_556 : std::string = "abb\$";
-  regex_557 := "abb\Z";
-  regex_557_mod := "m";
-  var_regex_557 : std::string = "abb\Z";
-  regex_558 := "abb\z";
-  regex_558_mod := "m";
-  var_regex_558 : std::string = "abb\z";
-  regex_559 := "abb\$";
-  regex_559_mod := "m";
-  var_regex_559 : std::string = "abb\$";
-  regex_560 := "abb\Z";
-  regex_560_mod := "m";
-  var_regex_560 : std::string = "abb\Z";
-  regex_561 := "abb\z";
-  regex_561_mod := "m";
-  var_regex_561 : std::string = "abb\z";
-  regex_562 := "abb\$";
-  regex_562_mod := "m";
-  var_regex_562 : std::string = "abb\$";
-  regex_563 := "abb\Z";
-  regex_563_mod := "m";
-  var_regex_563 : std::string = "abb\Z";
-  regex_564 := "abb\z";
-  regex_564_mod := "m";
-  var_regex_564 : std::string = "abb\z";
-  regex_565 := "abb\$";
-  regex_565_mod := "m";
-  var_regex_565 : std::string = "abb\$";
-  regex_566 := "abb\Z";
-  var_regex_566 : std::string = "abb\Z";
-  regex_567 := "abb\z";
-  var_regex_567 : std::string = "abb\z";
-  regex_568 := "abb\$";
-  var_regex_568 : std::string = "abb\$";
-  regex_569 := "abb\Z";
-  var_regex_569 : std::string = "abb\Z";
-  regex_570 := "abb\z";
-  var_regex_570 : std::string = "abb\z";
-  regex_571 := "abb\$";
-  var_regex_571 : std::string = "abb\$";
-  regex_572 := "abb\Z";
-  var_regex_572 : std::string = "abb\Z";
-  regex_573 := "abb\z";
-  var_regex_573 : std::string = "abb\z";
-  regex_574 := "abb\$";
-  var_regex_574 : std::string = "abb\$";
-  regex_575 := "abb\Z";
-  regex_575_mod := "m";
-  var_regex_575 : std::string = "abb\Z";
-  regex_576 := "abb\z";
-  regex_576_mod := "m";
-  var_regex_576 : std::string = "abb\z";
-  regex_577 := "abb\$";
-  regex_577_mod := "m";
-  var_regex_577 : std::string = "abb\$";
-  regex_578 := "abb\Z";
-  regex_578_mod := "m";
-  var_regex_578 : std::string = "abb\Z";
-  regex_579 := "abb\z";
-  regex_579_mod := "m";
-  var_regex_579 : std::string = "abb\z";
-  regex_580 := "abb\$";
-  regex_580_mod := "m";
-  var_regex_580 : std::string = "abb\$";
-  regex_581 := "abb\Z";
-  regex_581_mod := "m";
-  var_regex_581 : std::string = "abb\Z";
-  regex_582 := "abb\z";
-  regex_582_mod := "m";
-  var_regex_582 : std::string = "abb\z";
-  regex_583 := "abb\$";
-  regex_583_mod := "m";
-  var_regex_583 : std::string = "abb\$";
-  regex_584 := "\Aa\$";
-  regex_584_mod := "m";
-  var_regex_584 : std::string = "\Aa\$";
-//   regex_585 := "(?i:.[b].)";
-//   var_regex_585 : std::string = "(?i:.[b].)";
-//   regex_586 := "(?i:\N[b]\N)";
-//   var_regex_586 : std::string = "(?i:\\N[b]\\N)";
-  regex_587 := "\N {1}";
-  regex_587_mod := "x";
-  var_regex_587 : std::string = "\\N {1}";
-  regex_588 := "\N {1}";
-  regex_588_mod := "x";
-  var_regex_588 : std::string = "\\N {1}";
-  regex_589 := "\N {1}";
-  regex_589_mod := "x";
-  var_regex_589 : std::string = "\\N {1}";
-  regex_590 := "\N {3,4}";
-  regex_590_mod := "x";
-  var_regex_590 : std::string = "\\N {3,4}";
-  regex_591 := "\N {3,4}";
-  regex_591_mod := "x";
-  var_regex_591 : std::string = "\\N {3,4}";
-  regex_592 := "\N {3,4}";
-  regex_592_mod := "x";
-  var_regex_592 : std::string = "\\N {3,4}";
-  regex_593 := "a\N c";
-  regex_593_mod := "x";
-  var_regex_593 : std::string = "a\\N c";
-  regex_594 := "a\N *c";
-  regex_594_mod := "x";
-  var_regex_594 : std::string = "a\\N *c";
-  regex_595 := "a\N *c";
-  regex_595_mod := "x";
-  var_regex_595 : std::string = "a\\N *c";
-//   regex_596 := "[a b]";
-//   regex_596_mod := "x";
-//   var_regex_596 : std::string = "[a b]";
-//   regex_597 := "[a b]";
-//   regex_597_mod := "xx";
-//   var_regex_597 : std::string = "[a b]";
-//   regex_598 := "[a\ b]";
-//   regex_598_mod := "xx";
-//   var_regex_598 : std::string = "[a\ b]";
-//   regex_599 := "[ ^ a b ]";
-//   regex_599_mod := "xx";
-//   var_regex_599 : std::string = "[ ^ a b ]";
-//   regex_600 := "[ ^ a b ]";
-//   regex_600_mod := "xx";
-//   var_regex_600 : std::string = "[ ^ a b ]";
-//   regex_601 := "[ ^ a b ]";
-//   regex_601_mod := "xx";
-//   var_regex_601 : std::string = "[ ^ a b ]";
-//   regex_602 := "(?x:[a b])";
-//   regex_602_mod := "xx";
-//   var_regex_602 : std::string = "(?x:[a b])";
-//   regex_603 := "(?xx:[a b])";
-//   regex_603_mod := "x";
-//   var_regex_603 : std::string = "(?xx:[a b])";
-//   regex_604 := "(?x)[a b]";
-//   regex_604_mod := "xx";
-//   var_regex_604 : std::string = "(?x)[a b]";
-//   regex_605 := "(?xx)[a b]";
-//   regex_605_mod := "x";
-//   var_regex_605 : std::string = "(?xx)[a b]";
-//   regex_606 := "(?-x:[a b])";
-//   regex_606_mod := "xx";
-//   var_regex_606 : std::string = "(?-x:[a b])";
-  regex_607 := "\N {1}";
-  regex_607_mod := "x";
-  var_regex_607 : std::string = "\\N {1}";
-  regex_608 := "\N {1}";
-  regex_608_mod := "x";
-  var_regex_608 : std::string = "\\N {1}";
-  regex_609 := "\N {1}";
-  regex_609_mod := "x";
-  var_regex_609 : std::string = "\\N {1}";
-  regex_610 := "\N {3,4}";
-  regex_610_mod := "x";
-  var_regex_610 : std::string = "\\N {3,4}";
-  regex_611 := "\N {3,4}";
-  regex_611_mod := "x";
-  var_regex_611 : std::string = "\\N {3,4}";
-  regex_612 := "\N {3,4}";
-  regex_612_mod := "x";
-  var_regex_612 : std::string = "\\N {3,4}";
-  regex_613 := "a\N c";
-  regex_613_mod := "x";
-  var_regex_613 : std::string = "a\\N c";
-  regex_614 := "a\N *c";
-  regex_614_mod := "x";
-  var_regex_614 : std::string = "a\\N *c";
-  regex_615 := "a\N *c";
-  regex_615_mod := "x";
-  var_regex_615 : std::string = "a\\N *c";
-//   regex_616 := "[#]";
-//   var_regex_616 : std::string = "[#]";
-//   regex_617 := "[#]b";
-//   var_regex_617 : std::string = "[#]b";
-//   regex_618 := "[#]";
-//   regex_618_mod := "x";
-//   var_regex_618 : std::string = "[#]";
-//   regex_619 := "[#]b";
-//   regex_619_mod := "x";
-//   var_regex_619 : std::string = "[#]b";
-  regex_620 := "(?'n'foo) \g{n}";
-  var_regex_620 : std::string = "(?'n'foo) \g{n}";
-  regex_621 := "(?'n'foo) \g{ n }";
-  var_regex_621 : std::string = "(?'n'foo) \g{ n }";
-  regex_622 := "(?'n'foo) \g{n}";
-  var_regex_622 : std::string = "(?'n'foo) \g{n}";
-  regex_623 := "(?foo) \g{n}";
-  var_regex_623 : std::string = "(?foo) \g{n}";
-  regex_624 := "(?foo) \g{n}";
-  var_regex_624 : std::string = "(?foo) \g{n}";
-  regex_625 := "(?as) (\w+) \g{as} (\w+)";
-  var_regex_625 : std::string = "(?as) (\w+) \g{as} (\w+)";
-  regex_626 := "(?'n'foo) \k";
-  var_regex_626 : std::string = "(?'n'foo) \k";
-  regex_627 := "(?'n'foo) \k";
-  var_regex_627 : std::string = "(?'n'foo) \k";
-  regex_628 := "(?foo) \k'n'";
-  var_regex_628 : std::string = "(?foo) \k'n'";
-  regex_629 := "(?foo) \k'n'";
-  var_regex_629 : std::string = "(?foo) \k'n'";
-  regex_630 := "(?'a1'foo) \k'a1'";
-  var_regex_630 : std::string = "(?'a1'foo) \k'a1'";
-  regex_631 := "(?foo) \k";
-  var_regex_631 : std::string = "(?foo) \k";
-  regex_632 := "(?'_'foo) \k'_'";
-  var_regex_632 : std::string = "(?'_'foo) \k'_'";
-  regex_633 := "(?<_>foo) \k<_>";
-  var_regex_633 : std::string = "(?<_>foo) \k<_>";
-  regex_634 := "(?'_0_'foo) \k'_0_'";
-  var_regex_634 : std::string = "(?'_0_'foo) \k'_0_'";
-  regex_635 := "(?<_0_>foo) \k<_0_>";
-  var_regex_635 : std::string = "(?<_0_>foo) \k<_0_>";
-  regex_636 := "(?as) (\w+) \k (\w+)";
-  var_regex_636 : std::string = "(?as) (\w+) \k (\w+)";
-  regex_637 := "(?as) (\w+) \k{as} (\w+)";
-  var_regex_637 : std::string = "(?as) (\w+) \k{as} (\w+)";
-  regex_638 := "(?as) (\w+) \k'as' (\w+)";
-  var_regex_638 : std::string = "(?as) (\w+) \k'as' (\w+)";
-  regex_639 := "(?as) (\w+) \k{ as } (\w+)";
-  var_regex_639 : std::string = "(?as) (\w+) \k{ as } (\w+)";
-  regex_640 := "^a(?#xxx){3}c";
-  var_regex_640 : std::string = "^a(?#xxx){3}c";
-  regex_641 := "^a (?#xxx) (?#yyy) {3}c";
-  regex_641_mod := "x";
-  var_regex_641 : std::string = "^a (?#xxx) (?#yyy) {3}c";
-  regex_642 := "(?|(a))";
-  var_regex_642 : std::string = "(?|(a))";
-  regex_643 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  var_regex_643 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  regex_644 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  var_regex_644 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  regex_645 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  var_regex_645 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  regex_646 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_646 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_647 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_647 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_648 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_648 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_649 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_649 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_650 := "(.)(?|(.)(.)x|(.)d)(.)";
-  var_regex_650 : std::string = "(.)(?|(.)(.)x|(.)d)(.)";
-  regex_651 := "(\N)(?|(\N)(\N)x|(\N)d)(\N)";
-  var_regex_651 : std::string = "(\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N)";
-  regex_652 := "(?|(?x))";
-  var_regex_652 : std::string = "(?|(?x))";
-  regex_653 := "(?|(?x)|(?y))";
-  var_regex_653 : std::string = "(?|(?x)|(?y))";
-  regex_654 := "(?|(?y)|(?x))";
-  var_regex_654 : std::string = "(?|(?y)|(?x))";
-  regex_655 := "(?)(?|(?x))";
-  var_regex_655 : std::string = "(?)(?|(?x))";
-  regex_656 := "foo\Kbar";
-  var_regex_656 : std::string = "foo\Kbar";
-  regex_657 := "foo\t\n\r\f\a\ebar";
-  var_regex_657 : std::string = "foo\t\n\r\f\a\ebar";
-  regex_658 := "(foo)";
-  regex_658_mod := "n";
-  var_regex_658 : std::string = "(foo)";
-  regex_659 := "(?-n)(foo)(?n)(bar)";
-  regex_659_mod := "n";
-  var_regex_659 : std::string = "(?-n)(foo)(?n)(bar)";
-  regex_660 := "(?-n:(foo)(?n:(bar)))";
-  regex_660_mod := "n";
-  var_regex_660 : std::string = "(?-n:(foo)(?n:(bar)))";
-  regex_661 := "foo # Match foo";
-  regex_661_mod := "x";
-  var_regex_661 : std::string = "foo # Match foo";
-  regex_662 := "\x41\x42";
-  var_regex_662 : std::string = "\x41\x42";
-  regex_663 := "\101\o{102}";
-  var_regex_663 : std::string = "\101\o{102}";
-  run: (this) = {
-    std::cout << "Running perl_tests_general:"<< std::endl;
-    test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
-    test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
-    test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
-    test(regex_3, 3, "abc", "xbc", "n", "-", "-");
-    test(regex_4, 4, "abc", "axc", "n", "-", "-");
-    test(regex_5, 5, "abc", "abx", "n", "-", "-");
-    test(regex_6, 6, "abc", "xabcy", "y", "$&", "abc");
-    test(regex_7, 7, "abc", "xabcy", "y", "$-[0]", "1");
-    test(regex_8, 8, "abc", "xabcy", "y", "$+[0]", "4");
-    test(regex_9, 9, "abc", "ababc", "y", "$&", "abc");
-    test(regex_10, 10, "abc", "ababc", "y", "$-[0]", "2");
-    test(regex_11, 11, "abc", "ababc", "y", "$+[0]", "5");
-    test(regex_12, 12, "ab*c", "abc", "y", "$&", "abc");
-    test(regex_13, 13, "ab*c", "abc", "y", "$-[0]", "0");
-    test(regex_14, 14, "ab*c", "abc", "y", "$+[0]", "3");
-    test(regex_15, 15, "ab*bc", "abc", "y", "$&", "abc");
-    test(regex_16, 16, "ab*bc", "abc", "y", "$-[0]", "0");
-    test(regex_17, 17, "ab*bc", "abc", "y", "$+[0]", "3");
-    test(regex_18, 18, "ab*bc", "abbc", "y", "$&", "abbc");
-    test(regex_19, 19, "ab*bc", "abbc", "y", "$-[0]", "0");
-    test(regex_20, 20, "ab*bc", "abbc", "y", "$+[0]", "4");
-    test(regex_21, 21, "ab*bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_22, 22, "ab*bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_23, 23, "ab*bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_24, 24, ".{1}", "abbbbc", "y", "$&", "a");
-    test(regex_25, 25, ".{1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_26, 26, ".{1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_27, 27, ".{3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_28, 28, ".{3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_29, 29, ".{3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_30, 30, "\\\\N{1}", "abbbbc", "y", "$&", "a");
-    test(regex_31, 31, "\\\\N{1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_32, 32, "\\\\N{1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_33, 33, "\\\\N{3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_34, 34, "\\\\N{3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_35, 35, "\\\\N{3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_36, 36, "\\\\N{ 3 , 4 }", "abbbbc", "y", "$+[0]", "4");
-    test(regex_37, 37, "ab{0,}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_38, 38, "ab{0,}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_39, 39, "ab{0,}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_40, 40, "ab+bc", "abbc", "y", "$&", "abbc");
-    test(regex_41, 41, "ab+bc", "abbc", "y", "$-[0]", "0");
-    test(regex_42, 42, "ab+bc", "abbc", "y", "$+[0]", "4");
-    test(regex_43, 43, "ab+bc", "abc", "n", "-", "-");
-    test(regex_44, 44, "ab+bc", "abq", "n", "-", "-");
-    test(regex_45, 45, "ab{1,}bc", "abq", "n", "-", "-");
-    test(regex_46, 46, "ab+bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_47, 47, "ab+bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_48, 48, "ab+bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_49, 49, "ab{1,}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_50, 50, "ab{1,}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_51, 51, "ab{1,}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_52, 52, "ab{1,3}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_53, 53, "ab{1,3}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_54, 54, "ab{1,3}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_55, 55, "ab{3,4}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_56, 56, "ab{3,4}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_57, 57, "ab{3,4}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_58, 58, "ab{4,5}bc", "abbbbc", "n", "-", "-");
-    test(regex_59, 59, "ab?bc", "abbc", "y", "$&", "abbc");
-    test(regex_60, 60, "ab?bc", "abc", "y", "$&", "abc");
-    test(regex_61, 61, "ab{0,1}bc", "abc", "y", "$&", "abc");
-    test(regex_62, 62, "ab?bc", "abbbbc", "n", "-", "-");
-    test(regex_63, 63, "ab?c", "abc", "y", "$&", "abc");
-    test(regex_64, 64, "ab{0,1}c", "abc", "y", "$&", "abc");
-    test(regex_65, 65, "^abc\\$", "abc", "y", "$&", "abc");
-    test(regex_66, 66, "^abc\\$", "abcc", "n", "-", "-");
-    test(regex_67, 67, "^abc", "abcc", "y", "$&", "abc");
-    test(regex_68, 68, "^abc\\$", "aabc", "n", "-", "-");
-    test(regex_69, 69, "abc\\$", "aabc", "y", "$&", "abc");
-    test(regex_70, 70, "abc\\$", "aabcd", "n", "-", "-");
-    test(regex_71, 71, "^", "abc", "y", "$&", "");
-    test(regex_72, 72, "\\$", "abc", "y", "$&", "");
-    test(regex_73, 73, "a.c", "abc", "y", "$&", "abc");
-    test(regex_74, 74, "a.c", "axc", "y", "$&", "axc");
-    test(regex_75, 75, "a\\\\Nc", "abc", "y", "$&", "abc");
-    test(regex_76, 76, "a.*c", "axyzc", "y", "$&", "axyzc");
-    test(regex_77, 77, "a\\\\N*c", "axyzc", "y", "$&", "axyzc");
-    test(regex_78, 78, "a.*c", "axyzd", "n", "-", "-");
-    test(regex_79, 79, "a\\\\N*c", "axyzd", "n", "-", "-");
-    // test(regex_80, 80, "a[bc]d", "abc", "n", "-", "-");
-    // test(regex_81, 81, "a[bc]d", "abd", "y", "$&", "abd");
-    // test(regex_82, 82, "a[b]d", "abd", "y", "$&", "abd");
-    // test(regex_83, 83, "[a][b][d]", "abd", "y", "$&", "abd");
-    // test(regex_84, 84, ".[b].", "abd", "y", "$&", "abd");
-    // test(regex_85, 85, ".[b].", "aBd", "n", "-", "-");
-    // test(regex_86, 86, "a[b-d]e", "abd", "n", "-", "-");
-    // test(regex_87, 87, "a[b-d]e", "ace", "y", "$&", "ace");
-    // test(regex_88, 88, "a[b-d]", "aac", "y", "$&", "ac");
-    // test(regex_89, 89, "a[-b]", "a-", "y", "$&", "a-");
-    // test(regex_90, 90, "a[b-]", "a-", "y", "$&", "a-");
-    test(regex_91, 91, "a]", "a]", "y", "$&", "a]");
-    test(regex_92, 92, "a[]]b", "a]b", "y", "$&", "a]b");
-    // test(regex_93, 93, "a[^bc]d", "aed", "y", "$&", "aed");
-    // test(regex_94, 94, "a[^bc]d", "abd", "n", "-", "-");
-    // test(regex_95, 95, "a[^-b]c", "adc", "y", "$&", "adc");
-    // test(regex_96, 96, "a[^-b]c", "a-c", "n", "-", "-");
-    // test(regex_97, 97, "a[^]b]c", "a]c", "n", "-", "-");
-    // test(regex_98, 98, "a[^]b]c", "adc", "y", "$&", "adc");
-    test(regex_99, 99, "\\ba\\b", "a-", "y", "-", "-");
-    test(regex_100, 100, "\\ba\\b", "-a", "y", "-", "-");
-    test(regex_101, 101, "\\ba\\b", "-a-", "y", "-", "-");
-    test(regex_102, 102, "\\by\\b", "xy", "n", "-", "-");
-    test(regex_103, 103, "\\by\\b", "yz", "n", "-", "-");
-    test(regex_104, 104, "\\by\\b", "xyz", "n", "-", "-");
-    test(regex_105, 105, "\\Ba\\B", "a-", "n", "-", "-");
-    test(regex_106, 106, "\\Ba\\B", "-a", "n", "-", "-");
-    test(regex_107, 107, "\\Ba\\B", "-a-", "n", "-", "-");
-    test(regex_108, 108, "\\By\\b", "xy", "y", "-", "-");
-    test(regex_109, 109, "\\By\\b", "xy", "y", "$-[0]", "1");
-    test(regex_110, 110, "\\By\\b", "xy", "y", "$+[0]", "2");
-    test(regex_111, 111, "\\By\\b", "xy", "y", "-", "-");
-    test(regex_112, 112, "\\by\\B", "yz", "y", "-", "-");
-    test(regex_113, 113, "\\By\\B", "xyz", "y", "-", "-");
-    test(regex_114, 114, "\\b", "", "n", "-", "-");
-    test(regex_115, 115, "\\B", "", "y", "-", "-");
-    test(regex_116, 116, "\\w", "a", "y", "-", "-");
-    test(regex_117, 117, "\\w", "-", "n", "-", "-");
-    test(regex_118, 118, "\\W", "a", "n", "-", "-");
-    test(regex_119, 119, "\\W", "-", "y", "-", "-");
-    test(regex_120, 120, "a\\sb", "a b", "y", "-", "-");
-    test(regex_121, 121, "a\\sb", "a-b", "n", "-", "-");
-    test(regex_122, 122, "a\\Sb", "a b", "n", "-", "-");
-    test(regex_123, 123, "a\\Sb", "a-b", "y", "-", "-");
-    test(regex_124, 124, "\\d", "1", "y", "-", "-");
-    test(regex_125, 125, "\\d", "-", "n", "-", "-");
-    test(regex_126, 126, "\\D", "1", "n", "-", "-");
-    test(regex_127, 127, "\\D", "-", "y", "-", "-");
-    // test(regex_128, 128, "[\\w]", "a", "y", "-", "-");
-    // test(regex_129, 129, "[\\w]", "-", "n", "-", "-");
-    // test(regex_130, 130, "[\\W]", "a", "n", "-", "-");
-    // test(regex_131, 131, "[\\W]", "-", "y", "-", "-");
-    // test(regex_132, 132, "a[\\s]b", "a b", "y", "-", "-");
-    // test(regex_133, 133, "a[\\s]b", "a-b", "n", "-", "-");
-    // test(regex_134, 134, "a[\\S]b", "a b", "n", "-", "-");
-    // test(regex_135, 135, "a[\\S]b", "a-b", "y", "-", "-");
-    // test(regex_136, 136, "[\\d]", "1", "y", "-", "-");
-    // test(regex_137, 137, "[\\d]", "-", "n", "-", "-");
-    // test(regex_138, 138, "[\\D]", "1", "n", "-", "-");
-    // test(regex_139, 139, "[\\D]", "-", "y", "-", "-");
-    test(regex_140, 140, "ab|cd", "abc", "y", "$&", "ab");
-    test(regex_141, 141, "ab|cd", "abcd", "y", "$&", "ab");
-    test(regex_142, 142, "()ef", "def", "y", "$&-$1", "ef-");
-    test(regex_143, 143, "()ef", "def", "y", "$-[0]", "1");
-    test(regex_144, 144, "()ef", "def", "y", "$+[0]", "3");
-    test(regex_145, 145, "()ef", "def", "y", "$-[1]", "1");
-    test(regex_146, 146, "()ef", "def", "y", "$+[1]", "1");
-    test(regex_147, 147, "\\$b", "b", "n", "-", "-");
-    test(regex_148, 148, "a\\(b", "a(b", "y", "$&-$1", "a(b-");
-    test(regex_149, 149, "a\\(*b", "ab", "y", "$&", "ab");
-    test(regex_150, 150, "a\\(*b", "a((b", "y", "$&", "a((b");
-    test(regex_151, 151, "a\\\\b", "a\\b", "y", "$&", "a\\b");
-    test(regex_152, 152, "((a))", "abc", "y", "$&-$1-$2", "a-a-a");
-    test(regex_153, 153, "((a))", "abc", "y", "$-[0]-$-[1]-$-[2]", "0-0-0");
-    test(regex_154, 154, "((a))", "abc", "y", "$+[0]-$+[1]-$+[2]", "1-1-1");
-    test(regex_155, 155, "(foo)(\\g-2)", "foofoo", "y", "$1-$2", "foo-foo");
-    test(regex_156, 156, "(foo)(\\g-2)(foo)(\\g-2)", "foofoofoofoo", "y", "$1-$2-$3-$4", "foo-foo-foo-foo");
-    // test(regex_157, 157, "(([abc]+) \\g-1)(([abc]+) \\g{-1})", "abc abccba cba", "y", "$2-$4", "abc-cba");
-    test(regex_158, 158, "(a)(b)(c)\\g1\\g2\\g3", "abcabc", "y", "$1$2$3", "abc");
-    test(regex_159, 159, "abc", "ABC", "y", "$&", "ABC");
-    test(regex_160, 160, "abc", "XBC", "n", "-", "-");
-    test(regex_161, 161, "abc", "AXC", "n", "-", "-");
-    test(regex_162, 162, "abc", "ABX", "n", "-", "-");
-    test(regex_163, 163, "abc", "XABCY", "y", "$&", "ABC");
-    test(regex_164, 164, "abc", "ABABC", "y", "$&", "ABC");
-    test(regex_165, 165, "ab*c", "ABC", "y", "$&", "ABC");
-    test(regex_166, 166, "ab*bc", "ABC", "y", "$&", "ABC");
-    test(regex_167, 167, "ab*bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_168, 168, "ab*?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_169, 169, "ab{0,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_170, 170, "ab+?bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_171, 171, "ab+bc", "ABC", "n", "-", "-");
-    test(regex_172, 172, "ab+bc", "ABQ", "n", "-", "-");
-    test(regex_173, 173, "ab{1,}bc", "ABQ", "n", "-", "-");
-    test(regex_174, 174, "ab+bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_175, 175, "ab{1,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_176, 176, "ab{1,3}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_177, 177, "ab{3,4}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_178, 178, "ab{4,5}?bc", "ABBBBC", "n", "-", "-");
-    test(regex_179, 179, "ab??bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_180, 180, "ab??bc", "ABC", "y", "$&", "ABC");
-    test(regex_181, 181, "ab{0,1}?bc", "ABC", "y", "$&", "ABC");
-    test(regex_182, 182, "ab??bc", "ABBBBC", "n", "-", "-");
-    test(regex_183, 183, "ab??c", "ABC", "y", "$&", "ABC");
-    test(regex_184, 184, "ab{0,1}?c", "ABC", "y", "$&", "ABC");
-    test(regex_185, 185, "^abc\\$", "ABC", "y", "$&", "ABC");
-    test(regex_186, 186, "^abc\\$", "ABCC", "n", "-", "-");
-    test(regex_187, 187, "^abc", "ABCC", "y", "$&", "ABC");
-    test(regex_188, 188, "^abc\\$", "AABC", "n", "-", "-");
-    test(regex_189, 189, "abc\\$", "AABC", "y", "$&", "ABC");
-    test(regex_190, 190, "^", "ABC", "y", "$&", "");
-    test(regex_191, 191, "\\$", "ABC", "y", "$&", "");
-    test(regex_192, 192, "a.c", "ABC", "y", "$&", "ABC");
-    test(regex_193, 193, "a.c", "AXC", "y", "$&", "AXC");
-    test(regex_194, 194, "a\\\\Nc", "ABC", "y", "$&", "ABC");
-    test(regex_195, 195, "a.*?c", "AXYZC", "y", "$&", "AXYZC");
-    test(regex_196, 196, "a.*c", "AXYZD", "n", "-", "-");
-    // test(regex_197, 197, "a[bc]d", "ABC", "n", "-", "-");
-    // test(regex_198, 198, "a[bc]d", "ABD", "y", "$&", "ABD");
-    // test(regex_199, 199, "a[b-d]e", "ABD", "n", "-", "-");
-    // test(regex_200, 200, "a[b-d]e", "ACE", "y", "$&", "ACE");
-    // test(regex_201, 201, "a[b-d]", "AAC", "y", "$&", "AC");
-    // test(regex_202, 202, "a[-b]", "A-", "y", "$&", "A-");
-    // test(regex_203, 203, "a[b-]", "A-", "y", "$&", "A-");
-    test(regex_204, 204, "a]", "A]", "y", "$&", "A]");
-    test(regex_205, 205, "a[]]b", "A]B", "y", "$&", "A]B");
-    // test(regex_206, 206, "a[^bc]d", "AED", "y", "$&", "AED");
-    // test(regex_207, 207, "a[^bc]d", "ABD", "n", "-", "-");
-    // test(regex_208, 208, "a[^-b]c", "ADC", "y", "$&", "ADC");
-    // test(regex_209, 209, "a[^-b]c", "A-C", "n", "-", "-");
-    // test(regex_210, 210, "a[^]b]c", "A]C", "n", "-", "-");
-    // test(regex_211, 211, "a[^]b]c", "ADC", "y", "$&", "ADC");
-    test(regex_212, 212, "ab|cd", "ABC", "y", "$&", "AB");
-    test(regex_213, 213, "ab|cd", "ABCD", "y", "$&", "AB");
-    test(regex_214, 214, "()ef", "DEF", "y", "$&-$1", "EF-");
-    test(regex_215, 215, "\\$b", "B", "n", "-", "-");
-    test(regex_216, 216, "a\\(b", "A(B", "y", "$&-$1", "A(B-");
-    test(regex_217, 217, "a\\(*b", "AB", "y", "$&", "AB");
-    test(regex_218, 218, "a\\(*b", "A((B", "y", "$&", "A((B");
-    test(regex_219, 219, "a\\\\b", "A\\B", "y", "$&", "A\\B");
-    test(regex_220, 220, "((a))", "ABC", "y", "$&-$1-$2", "A-A-A");
-    test(regex_221, 221, "(a)b(c)", "ABC", "y", "$&-$1-$2", "ABC-A-C");
-    test(regex_222, 222, "a+b+c", "AABBABC", "y", "$&", "ABC");
-    test(regex_223, 223, "a{1,}b{1,}c", "AABBABC", "y", "$&", "ABC");
-    test(regex_224, 224, "a.+?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_225, 225, "a.*?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_226, 226, "a.{0,5}?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_227, 227, "(a+|b)*", "AB", "y", "$&-$1", "AB-B");
-    test(regex_228, 228, "(a+|b){0,}", "AB", "y", "$&-$1", "AB-B");
-    test(regex_229, 229, "(a+|b)+", "AB", "y", "$&-$1", "AB-B");
-    test(regex_230, 230, "(a+|b){1,}", "AB", "y", "$&-$1", "AB-B");
-    test(regex_231, 231, "(a+|b)?", "AB", "y", "$&-$1", "A-A");
-    test(regex_232, 232, "(a+|b){0,1}", "AB", "y", "$&-$1", "A-A");
-    test(regex_233, 233, "(a+|b){0,1}?", "AB", "y", "$&-$1", "-");
-    // test(regex_234, 234, "[^ab]*", "CDE", "y", "$&", "CDE");
-    test(regex_235, 235, "abc", "", "n", "-", "-");
-    test(regex_236, 236, "a*", "", "y", "$&", "");
-    // test(regex_237, 237, "([abc])*d", "ABBBCD", "y", "$&-$1", "ABBBCD-C");
-    // test(regex_238, 238, "([abc])*bcd", "ABCD", "y", "$&-$1", "ABCD-A");
-    test(regex_239, 239, "a|b|c|d|e", "E", "y", "$&", "E");
-    test(regex_240, 240, "(a|b|c|d|e)f", "EF", "y", "$&-$1", "EF-E");
-    test(regex_241, 241, "abcd*efg", "ABCDEFG", "y", "$&", "ABCDEFG");
-    test(regex_242, 242, "ab*", "XABYABBBZ", "y", "$&", "AB");
-    test(regex_243, 243, "ab*", "XAYABBBZ", "y", "$&", "A");
-    test(regex_244, 244, "(ab|cd)e", "ABCDE", "y", "$&-$1", "CDE-CD");
-    // test(regex_245, 245, "[abhgefdc]ij", "HIJ", "y", "$&", "HIJ");
-    test(regex_246, 246, "^(ab|cd)e", "ABCDE", "n", "x$1y", "XY");
-    test(regex_247, 247, "(abc|)ef", "ABCDEF", "y", "$&-$1", "EF-");
-    test(regex_248, 248, "(a|b)c*d", "ABCD", "y", "$&-$1", "BCD-B");
-    test(regex_249, 249, "(ab|ab*)bc", "ABC", "y", "$&-$1", "ABC-A");
-    // test(regex_250, 250, "a([bc]*)c*", "ABC", "y", "$&-$1", "ABC-BC");
-    // test(regex_251, 251, "a([bc]*)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
-    // test(regex_252, 252, "a([bc]+)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
-    // test(regex_253, 253, "a([bc]*)(c+d)", "ABCD", "y", "$&-$1-$2", "ABCD-B-CD");
-    // test(regex_254, 254, "a[bcd]*dcdcde", "ADCDCDE", "y", "$&", "ADCDCDE");
-    // test(regex_255, 255, "a[bcd]+dcdcde", "ADCDCDE", "n", "-", "-");
-    test(regex_256, 256, "(ab|a)b*c", "ABC", "y", "$&-$1", "ABC-AB");
-    test(regex_257, 257, "((a)(b)c)(d)", "ABCD", "y", "$1-$2-$3-$4", "ABC-A-B-D");
-    // test(regex_258, 258, "[a-zA-Z_][a-zA-Z0-9_]*", "ALPHA", "y", "$&", "ALPHA");
-    // test(regex_259, 259, "^a(bc+|b[eh])g|.h\\$", "ABH", "y", "$&-$1", "BH-");
-    test(regex_260, 260, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
-    test(regex_261, 261, "(bc+d\\$|ef*g.|h?i(j|k))", "IJ", "y", "$&-$1-$2", "IJ-IJ-J");
-    test(regex_262, 262, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFG", "n", "-", "-");
-    test(regex_263, 263, "(bc+d\\$|ef*g.|h?i(j|k))", "BCDD", "n", "-", "-");
-    test(regex_264, 264, "(bc+d\\$|ef*g.|h?i(j|k))", "REFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
-    test(regex_265, 265, "((((((((((a))))))))))", "A", "y", "$10", "A");
-    test(regex_266, 266, "((((((((((a))))))))))\\10", "AA", "y", "$&", "AA");
-    test(regex_267, 267, "(((((((((a)))))))))", "A", "y", "$&", "A");
-    test(regex_268, 268, "multiple words of text", "UH-UH", "n", "-", "-");
-    test(regex_269, 269, "multiple words", "MULTIPLE WORDS, YEAH", "y", "$&", "MULTIPLE WORDS");
-    test(regex_270, 270, "(.*)c(.*)", "ABCDE", "y", "$&-$1-$2", "ABCDE-AB-DE");
-    test(regex_271, 271, "\\((.*), (.*)\\)", "(A, B)", "y", "($2, $1)", "(B, A)");
-    // test(regex_272, 272, "[k]", "AB", "n", "-", "-");
-    test(regex_273, 273, "abcd", "ABCD", "y", "$&", "ABCD");
-    test(regex_274, 274, "a(bc)d", "ABCD", "y", "$1", "BC");
-    // test(regex_275, 275, "a[-]?c", "AC", "y", "$&", "AC");
-    test(regex_276, 276, "(abc)\\1", "ABCABC", "y", "$1", "ABC");
-    // test(regex_277, 277, "([a-c]*)\\1", "ABCABC", "y", "$1", "ABC");
-    test(regex_278, 278, "a++a", "aaaaa", "n", "-", "-");
-    test(regex_279, 279, "a*+a", "aaaaa", "n", "-", "-");
-    test(regex_280, 280, "a{1,5}+a", "aaaaa", "n", "-", "-");
-    test(regex_281, 281, "a?+a", "ab", "n", "-", "-");
-    test(regex_282, 282, "a++b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_283, 283, "a*+b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_284, 284, "a{1,5}+b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_285, 285, "a?+b", "ab", "y", "$&", "ab");
-    test(regex_286, 286, "fooa++a", "fooaaaaa", "n", "-", "-");
-    test(regex_287, 287, "fooa*+a", "fooaaaaa", "n", "-", "-");
-    test(regex_288, 288, "fooa{1,5}+a", "fooaaaaa", "n", "-", "-");
-    test(regex_289, 289, "fooa?+a", "fooab", "n", "-", "-");
-    test(regex_290, 290, "fooa++b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_291, 291, "fooa*+b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_292, 292, "fooa{1,5}+b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_293, 293, "fooa?+b", "fooab", "y", "$&", "fooab");
-    test(regex_294, 294, "(aA)++(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_295, 295, "(aA|bB)++(aA|bB)", "aAaAbBaAbB", "n", "-", "aAaAbBaAbB");
-    test(regex_296, 296, "(aA)*+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_297, 297, "(aA|bB)*+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
-    test(regex_298, 298, "(aA){1,5}+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_299, 299, "(aA|bB){1,5}+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
-    test(regex_300, 300, "(aA)?+(aA)", "aAb", "n", "-", "aAb");
-    test(regex_301, 301, "(aA|bB)?+(aA|bB)", "bBb", "n", "-", "bBb");
-    test(regex_302, 302, "(aA)++b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_303, 303, "(aA|bB)++b", "aAbBaAaAbBb", "y", "$&", "aAbBaAaAbBb");
-    test(regex_304, 304, "(aA)*+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_305, 305, "(aA|bB)*+b", "bBbBbBbBbBb", "y", "$&", "bBbBbBbBbBb");
-    test(regex_306, 306, "(aA){1,5}+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_307, 307, "(aA|bB){1,5}+b", "bBaAbBaAbBb", "y", "$&", "bBaAbBaAbBb");
-    test(regex_308, 308, "(aA)?+b", "aAb", "y", "$&", "aAb");
-    test(regex_309, 309, "(aA|bB)?+b", "bBb", "y", "$&", "bBb");
-    test(regex_310, 310, "foo(aA)++(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_311, 311, "foo(aA|bB)++(aA|bB)", "foobBbBbBaAaA", "n", "-", "foobBbBbBaAaA");
-    test(regex_312, 312, "foo(aA)*+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_313, 313, "foo(aA|bB)*+(aA|bB)", "foobBaAbBaAaA", "n", "-", "foobBaAbBaAaA");
-    test(regex_314, 314, "foo(aA){1,5}+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_315, 315, "foo(aA|bB){1,5}+(aA|bB)", "fooaAbBbBaAaA", "n", "-", "fooaAbBbBaAaA");
-    test(regex_316, 316, "foo(aA)?+(aA)", "fooaAb", "n", "-", "fooaAb");
-    test(regex_317, 317, "foo(aA|bB)?+(aA|bB)", "foobBb", "n", "-", "foobBb");
-    test(regex_318, 318, "foo(aA)++b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_319, 319, "foo(aA|bB)++b", "foobBaAbBaAbBb", "y", "$&", "foobBaAbBaAbBb");
-    test(regex_320, 320, "foo(aA)*+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_321, 321, "foo(aA|bB)*+b", "foobBbBaAaAaAb", "y", "$&", "foobBbBaAaAaAb");
-    test(regex_322, 322, "foo(aA){1,5}+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_323, 323, "foo(aA|bB){1,5}+b", "foobBaAaAaAaAb", "y", "$&", "foobBaAaAaAaAb");
-    test(regex_324, 324, "foo(aA)?+b", "fooaAb", "y", "$&", "fooaAb");
-    test(regex_325, 325, "foo(aA|bB)?+b", "foobBb", "y", "$&", "foobBb");
-    test(regex_326, 326, "foo(\\h+)bar", "foo\tbar", "y", "$1", "\t");
-    test(regex_327, 327, "(\\H+)(\\h)", "foo\tbar", "y", "$1-$2", "foo-\t");
-    test(regex_328, 328, "(\\h+)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
-    test(regex_329, 329, "foo(\\h)bar", "foo\tbar", "y", "$1", "\t");
-    test(regex_330, 330, "(\\H)(\\h)", "foo\tbar", "y", "$1-$2", "o-\t");
-    test(regex_331, 331, "(\\h)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
-    test(regex_332, 332, "foo(\\v+)bar", "foo\r\n\r\n\nbar", "y", "$1", "\r\n\r\n\n");
-    test(regex_333, 333, "(\\V+)(\\v)", "foo\r\n\r\n\nbar", "y", "$1-$2", "foo-\r");
-    test(regex_334, 334, "(\\v+)(\\V)", "foo\r\n\r\n\nbar", "y", "$1-$2", "\r\n\r\n\n-b");
-    test(regex_335, 335, "foo(\\v)bar", "foo\rbar", "y", "$1", "\r");
-    test(regex_336, 336, "(\\V)(\\v)", "foo\rbar", "y", "$1-$2", "o-\r");
-    test(regex_337, 337, "(\\v)(\\V)", "foo\rbar", "y", "$1-$2", "\r-b");
-    test(regex_338, 338, "(?:(?i)a)b", "ab", "y", "$&", "ab");
-    test(regex_339, 339, "((?i)a)b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_340, 340, "(?:(?i)a)b", "Ab", "y", "$&", "Ab");
-    test(regex_341, 341, "((?i)a)b", "Ab", "y", "$&:$1", "Ab:A");
-    test(regex_342, 342, "(?:(?i)a)b", "aB", "n", "-", "-");
-    test(regex_343, 343, "((?i)a)b", "aB", "n", "-", "-");
-    test(regex_344, 344, "(?i:a)b", "ab", "y", "$&", "ab");
-    test(regex_345, 345, "((?i:a))b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_346, 346, "(?i:a)b", "Ab", "y", "$&", "Ab");
-    test(regex_347, 347, "((?i:a))b", "Ab", "y", "$&:$1", "Ab:A");
-    test(regex_348, 348, "(?i:a)b", "aB", "n", "-", "-");
-    test(regex_349, 349, "((?i:a))b", "aB", "n", "-", "-");
-    test(regex_350, 350, "(?:(?-i)a)b", "ab", "y", "$&", "ab");
-    test(regex_351, 351, "((?-i)a)b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_352, 352, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
-    test(regex_353, 353, "((?-i)a)b", "aB", "y", "$&:$1", "aB:a");
-    test(regex_354, 354, "(?:(?-i)a)b", "Ab", "n", "-", "-");
-    test(regex_355, 355, "((?-i)a)b", "Ab", "n", "-", "-");
-    test(regex_356, 356, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
-    test(regex_357, 357, "((?-i)a)b", "aB", "y", "$1", "a");
-    test(regex_358, 358, "(?:(?-i)a)b", "AB", "n", "-", "-");
-    test(regex_359, 359, "((?-i)a)b", "AB", "n", "-", "-");
-    test(regex_360, 360, "(?-i:a)b", "ab", "y", "$&", "ab");
-    test(regex_361, 361, "((?-i:a))b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_362, 362, "(?-i:a)b", "aB", "y", "$&", "aB");
-    test(regex_363, 363, "((?-i:a))b", "aB", "y", "$&:$1", "aB:a");
-    test(regex_364, 364, "(?-i:a)b", "Ab", "n", "-", "-");
-    test(regex_365, 365, "((?-i:a))b", "Ab", "n", "-", "-");
-    test(regex_366, 366, "(?-i:a)b", "aB", "y", "$&", "aB");
-    test(regex_367, 367, "((?-i:a))b", "aB", "y", "$1", "a");
-    test(regex_368, 368, "(?-i:a)b", "AB", "n", "-", "-");
-    test(regex_369, 369, "((?-i:a))b", "AB", "n", "-", "-");
-    test(regex_370, 370, "((?-i:a.))b", "a\nB", "n", "-", "-");
-    test(regex_371, 371, "((?-i:a\\\\N))b", "a\nB", "n", "-", "-");
-    test(regex_372, 372, "((?s-i:a.))b", "a\nB", "y", "$1", "a\n");
-    test(regex_373, 373, "((?s-i:a\\\\N))b", "a\nB", "n", "-", "-");
-    test(regex_374, 374, "((?s-i:a.))b", "B\nB", "n", "-", "-");
-    test(regex_375, 375, "((?s-i:a\\\\N))b", "B\nB", "n", "-", "-");
-    test(regex_376, 376, "^(?:a?b?)*\\$", "a--", "n", "-", "-");
-    test(regex_377, 377, "((?s)^a(.))((?m)^b\\$)", "a\nb\nc\n", "y", "$1;$2;$3", "a\n;\n;b");
-    test(regex_378, 378, "((?m)^b\\$)", "a\nb\nc\n", "y", "$1", "b");
-    test(regex_379, 379, "(?m)^b", "a\nb\n", "y", "$&", "b");
-    test(regex_380, 380, "(?m)^(b)", "a\nb\n", "y", "$1", "b");
-    test(regex_381, 381, "((?m)^b)", "a\nb\n", "y", "$1", "b");
-    test(regex_382, 382, "\\n((?m)^b)", "a\nb\n", "y", "$1", "b");
-    test(regex_383, 383, "^b", "a\nb\nc\n", "n", "-", "-");
-    test(regex_384, 384, "()^b", "a\nb\nc\n", "n", "-", "-");
-    test(regex_385, 385, "((?m)^b)", "a\nb\nc\n", "y", "$1", "b");
-    test(regex_386, 386, "\\Z", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_387, 387, "\\z", "a\nb\n", "y", "$-[0]", "4");
-    test(regex_388, 388, "\\$", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_389, 389, "\\Z", "b\na\n", "y", "$-[0]", "3");
-    test(regex_390, 390, "\\z", "b\na\n", "y", "$-[0]", "4");
-    test(regex_391, 391, "\\$", "b\na\n", "y", "$-[0]", "3");
-    test(regex_392, 392, "\\Z", "b\na", "y", "$-[0]", "3");
-    test(regex_393, 393, "\\z", "b\na", "y", "$-[0]", "3");
-    test(regex_394, 394, "\\$", "b\na", "y", "$-[0]", "3");
-    test(regex_395, 395, "\\Z", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_396, 396, "\\z", "a\nb\n", "y", "$-[0]", "4");
-    test(regex_397, 397, "\\$", "a\nb\n", "y", "$-[0]", "1");
-    test(regex_398, 398, "\\Z", "b\na\n", "y", "$-[0]", "3");
-    test(regex_399, 399, "\\z", "b\na\n", "y", "$-[0]", "4");
-    test(regex_400, 400, "\\$", "b\na\n", "y", "$-[0]", "1");
-    test(regex_401, 401, "\\Z", "b\na", "y", "$-[0]", "3");
-    test(regex_402, 402, "\\z", "b\na", "y", "$-[0]", "3");
-    test(regex_403, 403, "\\$", "b\na", "y", "$-[0]", "1");
-    test(regex_404, 404, "a\\Z", "a\nb\n", "n", "-", "-");
-    test(regex_405, 405, "a\\z", "a\nb\n", "n", "-", "-");
-    test(regex_406, 406, "a\\$", "a\nb\n", "n", "-", "-");
-    test(regex_407, 407, "a\\Z", "b\na\n", "y", "$-[0]", "2");
-    test(regex_408, 408, "a\\z", "b\na\n", "n", "-", "-");
-    test(regex_409, 409, "a\\$", "b\na\n", "y", "$-[0]", "2");
-    test(regex_410, 410, "a\\Z", "b\na", "y", "$-[0]", "2");
-    test(regex_411, 411, "a\\z", "b\na", "y", "$-[0]", "2");
-    test(regex_412, 412, "a\\$", "b\na", "y", "$-[0]", "2");
-    test(regex_413, 413, "a\\Z", "a\nb\n", "n", "-", "-");
-    test(regex_414, 414, "a\\z", "a\nb\n", "n", "-", "-");
-    test(regex_415, 415, "a\\$", "a\nb\n", "y", "$-[0]", "0");
-    test(regex_416, 416, "a\\Z", "b\na\n", "y", "$-[0]", "2");
-    test(regex_417, 417, "a\\z", "b\na\n", "n", "-", "-");
-    test(regex_418, 418, "a\\$", "b\na\n", "y", "$-[0]", "2");
-    test(regex_419, 419, "a\\Z", "b\na", "y", "$-[0]", "2");
-    test(regex_420, 420, "a\\z", "b\na", "y", "$-[0]", "2");
-    test(regex_421, 421, "a\\$", "b\na", "y", "$-[0]", "2");
-    test(regex_422, 422, "aa\\Z", "aa\nb\n", "n", "-", "-");
-    test(regex_423, 423, "aa\\z", "aa\nb\n", "n", "-", "-");
-    test(regex_424, 424, "aa\\$", "aa\nb\n", "n", "-", "-");
-    test(regex_425, 425, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_426, 426, "aa\\z", "b\naa\n", "n", "-", "-");
-    test(regex_427, 427, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_428, 428, "aa\\Z", "b\naa", "y", "$-[0]", "2");
-    test(regex_429, 429, "aa\\z", "b\naa", "y", "$-[0]", "2");
-    test(regex_430, 430, "aa\\$", "b\naa", "y", "$-[0]", "2");
-    test(regex_431, 431, "aa\\Z", "aa\nb\n", "n", "-", "-");
-    test(regex_432, 432, "aa\\z", "aa\nb\n", "n", "-", "-");
-    test(regex_433, 433, "aa\\$", "aa\nb\n", "y", "$-[0]", "0");
-    test(regex_434, 434, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_435, 435, "aa\\z", "b\naa\n", "n", "-", "-");
-    test(regex_436, 436, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_437, 437, "aa\\Z", "b\naa", "y", "$-[0]", "2");
-    test(regex_438, 438, "aa\\z", "b\naa", "y", "$-[0]", "2");
-    test(regex_439, 439, "aa\\$", "b\naa", "y", "$-[0]", "2");
-    test(regex_440, 440, "aa\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_441, 441, "aa\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_442, 442, "aa\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_443, 443, "aa\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_444, 444, "aa\\z", "b\nac\n", "n", "-", "-");
-    test(regex_445, 445, "aa\\$", "b\nac\n", "n", "-", "-");
-    test(regex_446, 446, "aa\\Z", "b\nac", "n", "-", "-");
-    test(regex_447, 447, "aa\\z", "b\nac", "n", "-", "-");
-    test(regex_448, 448, "aa\\$", "b\nac", "n", "-", "-");
-    test(regex_449, 449, "aa\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_450, 450, "aa\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_451, 451, "aa\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_452, 452, "aa\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_453, 453, "aa\\z", "b\nac\n", "n", "-", "-");
-    test(regex_454, 454, "aa\\$", "b\nac\n", "n", "-", "-");
-    test(regex_455, 455, "aa\\Z", "b\nac", "n", "-", "-");
-    test(regex_456, 456, "aa\\z", "b\nac", "n", "-", "-");
-    test(regex_457, 457, "aa\\$", "b\nac", "n", "-", "-");
-    test(regex_458, 458, "aa\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_459, 459, "aa\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_460, 460, "aa\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_461, 461, "aa\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_462, 462, "aa\\z", "b\nca\n", "n", "-", "-");
-    test(regex_463, 463, "aa\\$", "b\nca\n", "n", "-", "-");
-    test(regex_464, 464, "aa\\Z", "b\nca", "n", "-", "-");
-    test(regex_465, 465, "aa\\z", "b\nca", "n", "-", "-");
-    test(regex_466, 466, "aa\\$", "b\nca", "n", "-", "-");
-    test(regex_467, 467, "aa\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_468, 468, "aa\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_469, 469, "aa\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_470, 470, "aa\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_471, 471, "aa\\z", "b\nca\n", "n", "-", "-");
-    test(regex_472, 472, "aa\\$", "b\nca\n", "n", "-", "-");
-    test(regex_473, 473, "aa\\Z", "b\nca", "n", "-", "-");
-    test(regex_474, 474, "aa\\z", "b\nca", "n", "-", "-");
-    test(regex_475, 475, "aa\\$", "b\nca", "n", "-", "-");
-    test(regex_476, 476, "ab\\Z", "ab\nb\n", "n", "-", "-");
-    test(regex_477, 477, "ab\\z", "ab\nb\n", "n", "-", "-");
-    test(regex_478, 478, "ab\\$", "ab\nb\n", "n", "-", "-");
-    test(regex_479, 479, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_480, 480, "ab\\z", "b\nab\n", "n", "-", "-");
-    test(regex_481, 481, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_482, 482, "ab\\Z", "b\nab", "y", "$-[0]", "2");
-    test(regex_483, 483, "ab\\z", "b\nab", "y", "$-[0]", "2");
-    test(regex_484, 484, "ab\\$", "b\nab", "y", "$-[0]", "2");
-    test(regex_485, 485, "ab\\Z", "ab\nb\n", "n", "-", "-");
-    test(regex_486, 486, "ab\\z", "ab\nb\n", "n", "-", "-");
-    test(regex_487, 487, "ab\\$", "ab\nb\n", "y", "$-[0]", "0");
-    test(regex_488, 488, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_489, 489, "ab\\z", "b\nab\n", "n", "-", "-");
-    test(regex_490, 490, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_491, 491, "ab\\Z", "b\nab", "y", "$-[0]", "2");
-    test(regex_492, 492, "ab\\z", "b\nab", "y", "$-[0]", "2");
-    test(regex_493, 493, "ab\\$", "b\nab", "y", "$-[0]", "2");
-    test(regex_494, 494, "ab\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_495, 495, "ab\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_496, 496, "ab\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_497, 497, "ab\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_498, 498, "ab\\z", "b\nac\n", "n", "-", "-");
-    test(regex_499, 499, "ab\\$", "b\nac\n", "n", "-", "-");
-    test(regex_500, 500, "ab\\Z", "b\nac", "n", "-", "-");
-    test(regex_501, 501, "ab\\z", "b\nac", "n", "-", "-");
-    test(regex_502, 502, "ab\\$", "b\nac", "n", "-", "-");
-    test(regex_503, 503, "ab\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_504, 504, "ab\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_505, 505, "ab\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_506, 506, "ab\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_507, 507, "ab\\z", "b\nac\n", "n", "-", "-");
-    test(regex_508, 508, "ab\\$", "b\nac\n", "n", "-", "-");
-    test(regex_509, 509, "ab\\Z", "b\nac", "n", "-", "-");
-    test(regex_510, 510, "ab\\z", "b\nac", "n", "-", "-");
-    test(regex_511, 511, "ab\\$", "b\nac", "n", "-", "-");
-    test(regex_512, 512, "ab\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_513, 513, "ab\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_514, 514, "ab\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_515, 515, "ab\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_516, 516, "ab\\z", "b\nca\n", "n", "-", "-");
-    test(regex_517, 517, "ab\\$", "b\nca\n", "n", "-", "-");
-    test(regex_518, 518, "ab\\Z", "b\nca", "n", "-", "-");
-    test(regex_519, 519, "ab\\z", "b\nca", "n", "-", "-");
-    test(regex_520, 520, "ab\\$", "b\nca", "n", "-", "-");
-    test(regex_521, 521, "ab\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_522, 522, "ab\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_523, 523, "ab\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_524, 524, "ab\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_525, 525, "ab\\z", "b\nca\n", "n", "-", "-");
-    test(regex_526, 526, "ab\\$", "b\nca\n", "n", "-", "-");
-    test(regex_527, 527, "ab\\Z", "b\nca", "n", "-", "-");
-    test(regex_528, 528, "ab\\z", "b\nca", "n", "-", "-");
-    test(regex_529, 529, "ab\\$", "b\nca", "n", "-", "-");
-    test(regex_530, 530, "abb\\Z", "abb\nb\n", "n", "-", "-");
-    test(regex_531, 531, "abb\\z", "abb\nb\n", "n", "-", "-");
-    test(regex_532, 532, "abb\\$", "abb\nb\n", "n", "-", "-");
-    test(regex_533, 533, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_534, 534, "abb\\z", "b\nabb\n", "n", "-", "-");
-    test(regex_535, 535, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_536, 536, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_537, 537, "abb\\z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_538, 538, "abb\\$", "b\nabb", "y", "$-[0]", "2");
-    test(regex_539, 539, "abb\\Z", "abb\nb\n", "n", "-", "-");
-    test(regex_540, 540, "abb\\z", "abb\nb\n", "n", "-", "-");
-    test(regex_541, 541, "abb\\$", "abb\nb\n", "y", "$-[0]", "0");
-    test(regex_542, 542, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_543, 543, "abb\\z", "b\nabb\n", "n", "-", "-");
-    test(regex_544, 544, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_545, 545, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_546, 546, "abb\\z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_547, 547, "abb\\$", "b\nabb", "y", "$-[0]", "2");
-    test(regex_548, 548, "abb\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_549, 549, "abb\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_550, 550, "abb\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_551, 551, "abb\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_552, 552, "abb\\z", "b\nac\n", "n", "-", "-");
-    test(regex_553, 553, "abb\\$", "b\nac\n", "n", "-", "-");
-    test(regex_554, 554, "abb\\Z", "b\nac", "n", "-", "-");
-    test(regex_555, 555, "abb\\z", "b\nac", "n", "-", "-");
-    test(regex_556, 556, "abb\\$", "b\nac", "n", "-", "-");
-    test(regex_557, 557, "abb\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_558, 558, "abb\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_559, 559, "abb\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_560, 560, "abb\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_561, 561, "abb\\z", "b\nac\n", "n", "-", "-");
-    test(regex_562, 562, "abb\\$", "b\nac\n", "n", "-", "-");
-    test(regex_563, 563, "abb\\Z", "b\nac", "n", "-", "-");
-    test(regex_564, 564, "abb\\z", "b\nac", "n", "-", "-");
-    test(regex_565, 565, "abb\\$", "b\nac", "n", "-", "-");
-    test(regex_566, 566, "abb\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_567, 567, "abb\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_568, 568, "abb\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_569, 569, "abb\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_570, 570, "abb\\z", "b\nca\n", "n", "-", "-");
-    test(regex_571, 571, "abb\\$", "b\nca\n", "n", "-", "-");
-    test(regex_572, 572, "abb\\Z", "b\nca", "n", "-", "-");
-    test(regex_573, 573, "abb\\z", "b\nca", "n", "-", "-");
-    test(regex_574, 574, "abb\\$", "b\nca", "n", "-", "-");
-    test(regex_575, 575, "abb\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_576, 576, "abb\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_577, 577, "abb\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_578, 578, "abb\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_579, 579, "abb\\z", "b\nca\n", "n", "-", "-");
-    test(regex_580, 580, "abb\\$", "b\nca\n", "n", "-", "-");
-    test(regex_581, 581, "abb\\Z", "b\nca", "n", "-", "-");
-    test(regex_582, 582, "abb\\z", "b\nca", "n", "-", "-");
-    test(regex_583, 583, "abb\\$", "b\nca", "n", "-", "-");
-    test(regex_584, 584, "\\Aa\\$", "a\n\n", "y", "$&", "a");
-    // test(regex_585, 585, "(?i:.[b].)", "abd", "y", "$&", "abd");
-    // test(regex_586, 586, "(?i:\\\\N[b]\\\\N)", "abd", "y", "$&", "abd");
-    test(regex_587, 587, "\\\\N {1}", "abbbbc", "y", "$&", "a");
-    test(regex_588, 588, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_589, 589, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_590, 590, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_591, 591, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_592, 592, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_593, 593, "a\\\\N c", "abc", "y", "$&", "abc");
-    test(regex_594, 594, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
-    test(regex_595, 595, "a\\\\N *c", "axyzd", "n", "-", "-");
-    // test(regex_596, 596, "[a b]", " ", "yS", "$&", " ");
-    // test(regex_597, 597, "[a b]", " ", "n", "-", "-");
-    // test(regex_598, 598, "[a\\ b]", " ", "y", "$&", " ");
-    // test(regex_599, 599, "[ ^ a b ]", "a", "n", "-", "-");
-    // test(regex_600, 600, "[ ^ a b ]", "b", "n", "-", "-");
-    // test(regex_601, 601, "[ ^ a b ]", "A", "y", "$&", "A");
-    // test(regex_602, 602, "(?x:[a b])", " ", "yS", "$&", " ");
-    // test(regex_603, 603, "(?xx:[a b])", " ", "n", "-", "-");
-    // test(regex_604, 604, "(?x)[a b]", " ", "yS", "$&", " ");
-    // test(regex_605, 605, "(?xx)[a b]", " ", "n", "-", "-");
-    // test(regex_606, 606, "(?-x:[a b])", " ", "yS", "$&", " ");
-    test(regex_607, 607, "\\\\N {1}", "abbbbc", "y", "$&", "a");
-    test(regex_608, 608, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_609, 609, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_610, 610, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_611, 611, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_612, 612, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_613, 613, "a\\\\N c", "abc", "y", "$&", "abc");
-    test(regex_614, 614, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
-    test(regex_615, 615, "a\\\\N *c", "axyzd", "n", "-", "-");
-    // test(regex_616, 616, "[#]", "a#b", "y", "$&", "#");
-    // test(regex_617, 617, "[#]b", "a#b", "y", "$&", "#b");
-    // test(regex_618, 618, "[#]", "a#b", "y", "$&", "#");
-    // test(regex_619, 619, "[#]b", "a#b", "y", "$&", "#b");
-    test(regex_620, 620, "(?'n'foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
-    test(regex_621, 621, "(?'n'foo) \\g{ n }", "..foo foo..", "y", "$1", "foo");
-    test(regex_622, 622, "(?'n'foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_623, 623, "(?foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
-    test(regex_624, 624, "(?foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_625, 625, "(?as) (\\w+) \\g{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_626, 626, "(?'n'foo) \\k", "..foo foo..", "y", "$1", "foo");
-    test(regex_627, 627, "(?'n'foo) \\k", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_628, 628, "(?foo) \\k'n'", "..foo foo..", "y", "$1", "foo");
-    test(regex_629, 629, "(?foo) \\k'n'", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_630, 630, "(?'a1'foo) \\k'a1'", "..foo foo..", "yM", "$+{a1}", "foo");
-    test(regex_631, 631, "(?foo) \\k", "..foo foo..", "yM", "$+{a1}", "foo");
-    test(regex_632, 632, "(?'_'foo) \\k'_'", "..foo foo..", "yM", "$+{_}", "foo");
-    test(regex_633, 633, "(?<_>foo) \\k<_>", "..foo foo..", "yM", "$+{_}", "foo");
-    test(regex_634, 634, "(?'_0_'foo) \\k'_0_'", "..foo foo..", "yM", "$+{_0_}", "foo");
-    test(regex_635, 635, "(?<_0_>foo) \\k<_0_>", "..foo foo..", "yM", "$+{_0_}", "foo");
-    test(regex_636, 636, "(?as) (\\w+) \\k (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_637, 637, "(?as) (\\w+) \\k{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_638, 638, "(?as) (\\w+) \\k'as' (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_639, 639, "(?as) (\\w+) \\k{ as } (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_640, 640, "^a(?#xxx){3}c", "aaac", "y", "$&", "aaac");
-    test(regex_641, 641, "^a (?#xxx) (?#yyy) {3}c", "aaac", "y", "$&", "aaac");
-    test(regex_642, 642, "(?|(a))", "a", "y", "$1-$+", "a-a");
-    test(regex_643, 643, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "d!o!da", "y", "$1-$2-$3", "!o!-o-a");
-    test(regex_644, 644, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "aabc", "y", "$1-$2-$3", "a--c");
-    test(regex_645, 645, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "ixyjp", "y", "$1-$2-$3", "x-y-p");
-    test(regex_646, 646, "(?|(?|(a)|(b))|(?|(c)|(d)))", "a", "y", "$1", "a");
-    test(regex_647, 647, "(?|(?|(a)|(b))|(?|(c)|(d)))", "b", "y", "$1", "b");
-    test(regex_648, 648, "(?|(?|(a)|(b))|(?|(c)|(d)))", "c", "y", "$1", "c");
-    test(regex_649, 649, "(?|(?|(a)|(b))|(?|(c)|(d)))", "d", "y", "$1", "d");
-    test(regex_650, 650, "(.)(?|(.)(.)x|(.)d)(.)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
-    test(regex_651, 651, "(\\\\N)(?|(\\\\N)(\\\\N)x|(\\\\N)d)(\\\\N)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
-    test(regex_652, 652, "(?|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_653, 653, "(?|(?x)|(?y))", "x", "yM", "$+{foo}", "x");
-    test(regex_654, 654, "(?|(?y)|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_655, 655, "(?)(?|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_656, 656, "foo\\Kbar", "foobar", "y", "$&", "bar");
-    test(regex_657, 657, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
-    test(regex_658, 658, "(foo)", "foobar", "y", "$&-$1", "foo-");
-    test(regex_659, 659, "(?-n)(foo)(?n)(bar)", "foobar", "y", "$&-$1-$2", "foobar-foo-");
-    test(regex_660, 660, "(?-n:(foo)(?n:(bar)))", "foobar", "y", "$&-$1-$2", "foobar-foo-");
-    test(regex_661, 661, "foo # Match foo", "foobar", "y", "$&", "foo");
-    test(regex_662, 662, "\\x41\\x42", "AB", "y", "$&", "AB");
-    test(regex_663, 663, "\\101\\o{102}", "AB", "y", "$&", "AB");
-    std::cout << std::endl;
-  }
-}
-test_perl_tests_lookahead: @regex type = {
-  regex_0 := "a(?!b).";
-  var_regex_0 : std::string = "a(?!b).";
-  regex_1 := "(?=)a";
-  var_regex_1 : std::string = "(?=)a";
-  regex_2 := "a(?=d).";
-  var_regex_2 : std::string = "a(?=d).";
-  regex_3 := "a(?=c|d).";
-  var_regex_3 : std::string = "a(?=c|d).";
-  regex_4 := "^(?:b|a(?=(.)))*\1";
-  var_regex_4 : std::string = "^(?:b|a(?=(.)))*\1";
-  regex_5 := "(?=(a+?))(\1ab)";
-  var_regex_5 : std::string = "(?=(a+?))(\1ab)";
-  regex_6 := "^(?=(a+?))\1ab";
-  var_regex_6 : std::string = "^(?=(a+?))\1ab";
-  regex_7 := "(?=(a+?))(\1ab)";
-  var_regex_7 : std::string = "(?=(a+?))(\1ab)";
-  regex_8 := "^(?=(a+?))\1ab";
-  var_regex_8 : std::string = "^(?=(a+?))\1ab";
-  regex_9 := "(.*)(?=c)";
-  var_regex_9 : std::string = "(.*)(?=c)";
-  regex_10 := "(.*)(?=c)c";
-  var_regex_10 : std::string = "(.*)(?=c)c";
-  regex_11 := "(.*)(?=b|c)";
-  var_regex_11 : std::string = "(.*)(?=b|c)";
-  regex_12 := "(.*)(?=b|c)c";
-  var_regex_12 : std::string = "(.*)(?=b|c)c";
-  regex_13 := "(.*)(?=c|b)";
-  var_regex_13 : std::string = "(.*)(?=c|b)";
-  regex_14 := "(.*)(?=c|b)c";
-  var_regex_14 : std::string = "(.*)(?=c|b)c";
-//   regex_15 := "(.*)(?=[bc])";
-//   var_regex_15 : std::string = "(.*)(?=[bc])";
-//   regex_16 := "(.*)(?=[bc])c";
-//   var_regex_16 : std::string = "(.*)(?=[bc])c";
-  regex_17 := "(.*?)(?=c)";
-  var_regex_17 : std::string = "(.*?)(?=c)";
-  regex_18 := "(.*?)(?=c)c";
-  var_regex_18 : std::string = "(.*?)(?=c)c";
-  regex_19 := "(.*?)(?=b|c)";
-  var_regex_19 : std::string = "(.*?)(?=b|c)";
-  regex_20 := "(.*?)(?=b|c)c";
-  var_regex_20 : std::string = "(.*?)(?=b|c)c";
-  regex_21 := "(.*?)(?=c|b)";
-  var_regex_21 : std::string = "(.*?)(?=c|b)";
-  regex_22 := "(.*?)(?=c|b)c";
-  var_regex_22 : std::string = "(.*?)(?=c|b)c";
-//   regex_23 := "(.*?)(?=[bc])";
-//   var_regex_23 : std::string = "(.*?)(?=[bc])";
-//   regex_24 := "(.*?)(?=[bc])c";
-//   var_regex_24 : std::string = "(.*?)(?=[bc])c";
-  regex_25 := "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
-  var_regex_25 : std::string = "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
-  regex_26 := "a(?!b(?!c))(..)";
-  var_regex_26 : std::string = "a(?!b(?!c))(..)";
-  regex_27 := "a(?!b(?=a))(..)";
-  var_regex_27 : std::string = "a(?!b(?=a))(..)";
-  regex_28 := "X(\w+)(?=\s)|X(\w+)";
-  var_regex_28 : std::string = "X(\w+)(?=\s)|X(\w+)";
-  regex_29 := "^a*(?=b)b";
-  var_regex_29 : std::string = "^a*(?=b)b";
-  regex_30 := "(?!\A)x";
-  regex_30_mod := "m";
-  var_regex_30 : std::string = "(?!\A)x";
-  regex_31 := "^(o)(?!.*\1)";
-  regex_31_mod := "i";
-  var_regex_31 : std::string = "^(o)(?!.*\1)";
-  regex_32 := ".*a(?!(b|cd)*e).*f";
-  var_regex_32 : std::string = ".*a(?!(b|cd)*e).*f";
-  regex_33 := "^(a*?)(?!(aa|aaaa)*\$)";
-  var_regex_33 : std::string = "^(a*?)(?!(aa|aaaa)*\$)";
-  regex_34 := "(?!)+?|(.{2,4})";
-  var_regex_34 : std::string = "(?!)+?|(.{2,4})";
-  regex_35 := "^(a*?)(?!(a{6}|a{5})*\$)";
-  var_regex_35 : std::string = "^(a*?)(?!(a{6}|a{5})*\$)";
-  regex_36 := "a(?!b(?!c(?!d(?!e))))...(.)";
-  var_regex_36 : std::string = "a(?!b(?!c(?!d(?!e))))...(.)";
-  regex_37 := "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
-  var_regex_37 : std::string = "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
-  regex_38 := "((?s).)c(?!.)";
-  var_regex_38 : std::string = "((?s).)c(?!.)";
-  regex_39 := "((?s).)c(?!.)";
-  var_regex_39 : std::string = "((?s).)c(?!.)";
-  regex_40 := "((?s)b.)c(?!.)";
-  var_regex_40 : std::string = "((?s)b.)c(?!.)";
-  regex_41 := "((?s)b.)c(?!.)";
-  var_regex_41 : std::string = "((?s)b.)c(?!.)";
-  regex_42 := "((?s)b.)c(?!\N)";
-  var_regex_42 : std::string = "((?s)b.)c(?!\\N)";
-  regex_43 := "(b.)c(?!\N)";
-  regex_43_mod := "s";
-  var_regex_43 : std::string = "(b.)c(?!\\N)";
-  regex_44 := "a*(?!)";
-  var_regex_44 : std::string = "a*(?!)";
-  run: (this) = {
-    std::cout << "Running perl_tests_lookahead:"<< std::endl;
-    test(regex_0, 0, "a(?!b).", "abad", "y", "$&", "ad");
-    test(regex_1, 1, "(?=)a", "a", "y", "$&", "a");
-    test(regex_2, 2, "a(?=d).", "abad", "y", "$&", "ad");
-    test(regex_3, 3, "a(?=c|d).", "abad", "y", "$&", "ad");
-    test(regex_4, 4, "^(?:b|a(?=(.)))*\\1", "abc", "y", "$&", "ab");
-    test(regex_5, 5, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
-    test(regex_6, 6, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
-    test(regex_7, 7, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
-    test(regex_8, 8, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
-    test(regex_9, 9, "(.*)(?=c)", "abcd", "y", "$1", "ab");
-    test(regex_10, 10, "(.*)(?=c)c", "abcd", "yB", "$1", "ab");
-    test(regex_11, 11, "(.*)(?=b|c)", "abcd", "y", "$1", "ab");
-    test(regex_12, 12, "(.*)(?=b|c)c", "abcd", "y", "$1", "ab");
-    test(regex_13, 13, "(.*)(?=c|b)", "abcd", "y", "$1", "ab");
-    test(regex_14, 14, "(.*)(?=c|b)c", "abcd", "y", "$1", "ab");
-    test(regex_15, 15, "(.*)(?=[bc])", "abcd", "y", "$1", "ab");
-    test(regex_16, 16, "(.*)(?=[bc])c", "abcd", "yB", "$1", "ab");
-    test(regex_17, 17, "(.*?)(?=c)", "abcd", "y", "$1", "ab");
-    test(regex_18, 18, "(.*?)(?=c)c", "abcd", "yB", "$1", "ab");
-    test(regex_19, 19, "(.*?)(?=b|c)", "abcd", "y", "$1", "a");
-    test(regex_20, 20, "(.*?)(?=b|c)c", "abcd", "y", "$1", "ab");
-    test(regex_21, 21, "(.*?)(?=c|b)", "abcd", "y", "$1", "a");
-    test(regex_22, 22, "(.*?)(?=c|b)c", "abcd", "y", "$1", "ab");
-    test(regex_23, 23, "(.*?)(?=[bc])", "abcd", "y", "$1", "a");
-    test(regex_24, 24, "(.*?)(?=[bc])c", "abcd", "yB", "$1", "ab");
-    test(regex_25, 25, "^(a*?)(?!(aa|aaaa)*\\$)(?=a\\z)", "aaaaaaaa", "y", "$1", "aaaaaaa");
-    test(regex_26, 26, "a(?!b(?!c))(..)", "abababc", "y", "$1", "bc");
-    test(regex_27, 27, "a(?!b(?=a))(..)", "abababc", "y", "$1", "bc");
-    test(regex_28, 28, "X(\\w+)(?=\\s)|X(\\w+)", "Xab", "y", "[$1-$2]", "[-ab]");
-    test(regex_29, 29, "^a*(?=b)b", "ab", "y", "$&", "ab");
-    test(regex_30, 30, "(?!\\A)x", "a\nxb\n", "y", "-", "-");
-    test(regex_31, 31, "^(o)(?!.*\\1)", "Oo", "n", "-", "-");
-    test(regex_32, 32, ".*a(?!(b|cd)*e).*f", "......abef", "n", "-", "-");
-    test(regex_33, 33, "^(a*?)(?!(aa|aaaa)*\\$)", "aaaaaaaaaaaaaaaaaaaa", "y", "$1", "a");
-    test(regex_34, 34, "(?!)+?|(.{2,4})", "abcde", "y", "$1", "abcd");
-    test(regex_35, 35, "^(a*?)(?!(a{6}|a{5})*\\$)", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", "$+[1]", "12");
-    test(regex_36, 36, "a(?!b(?!c(?!d(?!e))))...(.)", "abxabcdxabcde", "y", "$1", "e");
-    test(regex_37, 37, "X(?!b+(?!(c+)*(?!(c+)*d))).*X", "aXbbbbbbbcccccccccccccaaaX", "y", "-", "-");
-    test(regex_38, 38, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1", "\n");
-    test(regex_39, 39, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "\n:\nc");
-    test(regex_40, 40, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1", "b\n");
-    test(regex_41, 41, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_42, 42, "((?s)b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_43, 43, "(b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_44, 44, "a*(?!)", "aaaab", "n", "-", "-");
-    std::cout << std::endl;
-  }
-}
-main: () = {
-    test_perl_tests_general().run();
-    test_perl_tests_lookahead().run();
-}
diff --git a/regression-tests/pure2-regex.cpp2 b/regression-tests/pure2-regex.cpp2
deleted file mode 100644
index ee690581fa..0000000000
--- a/regression-tests/pure2-regex.cpp2
+++ /dev/null
@@ -1,2579 +0,0 @@
-create_result: (resultExpr: std::string, r) -> std::string = {
-  result: std::string = "";
-
-  get_next := :(iter) -> _ = {
-		start := std::distance(resultExpr&$*.cbegin(), iter);
-    firstDollar := resultExpr&$*.find("$", start);
-    firstAt := resultExpr&$*.find("@", start);
-
-		end := std::min(firstDollar, firstAt);
-		if end != std::string::npos {
-			return resultExpr&$*.cbegin() + end;
-		}
-		else {
-			return resultExpr&$*.cend();
-		}
-  };
-  extract_group_and_advance := :(inout iter) -> _ = {
-    start := iter;
-
-    while std::isdigit(iter*) next iter++ {}
-
-    return std::stoi(std::string(start, iter));
-  };
-  extract_until := :(inout iter, to: char) -> _ = {
-    start := iter;
-
-    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
-
-    return std::string(start, iter);
-  };
-
-  iter := resultExpr.begin();
-
-  while iter != resultExpr.end() {
-    next := get_next(iter);
-
-    if next != iter {
-      result += std::string(iter, next);
-    }
-    if next != resultExpr.end() {
-      if next* == '$' {
-        next++;
-
-        if next* == '&' {
-          next++;
-          result += r.group(0);
-        }
-        else if next* == '-' || next* == '+' {
-          is_start := next* == '-';
-          next++;
-          if next* == '{' {
-            next++; // Skip {
-            group := extract_until(next, '}');
-            next++; // Skip }
-            result += r.group(group);
-          }
-          else if next* == '[' {
-            next++; // Skip [
-            group := extract_group_and_advance(next);
-            next++; // Skip ]
-
-            if is_start {
-              result += std::to_string(r.group_start(group));
-            }
-            else {
-              result += std::to_string(r.group_end(group));
-            }
-          }
-          else {
-            // Return max group
-            result += r.group(r.group_number() - 1);
-          }
-        }
-        else if std::isdigit(next*) {
-          group := extract_group_and_advance(next);
-          result += r.group(group);
-        }
-        else {
-          std::cerr << "Not implemented";
-        }
-      }
-      else if next* == '@' {
-        next++;
-        
-        if next* == '-'  || next* == '+' {
-          i := 0;
-          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
-            pos := 0;
-            if next* == '-' {
-              pos = r.group_start(i);
-            }
-            else {
-              pos = r.group_end(i);
-            }
-            result +=  std::to_string(pos);
-          }
-        }
-        else {
-          std::cerr << "Not implemented";
-        }
-      }
-      else {
-        std::cerr << "Not implemented.";
-      }
-    }
-    iter = next;
-  }
-
-  return result;
-}
-
-test:  (regex: M, id: int, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
-           resultExpected: std::string) = {
-  
-  warning: std::string = "";
-  if regex.to_string() != regex_str {
-    warning = "Warning: Parsed regex does not match.";
-  }
-
-  status: std::string = "OK";
-
-  r := regex.search(str);
-
-  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
-    if !r.matched {
-      status = "Failure: Regex should apply.";
-    }
-    else {
-      // Have a match check the result
-
-      result := create_result(resultExpr, r);
-
-      if result != resultExpected {
-        status = "Failure: Result is wrong. (is: (result)$)";
-      }
-    }
-  }
-  else if "n" == kind {
-    if r.matched {
-      status = "Failure: Regex should not apply.";
-    }
-  } else {
-    status = "Unknown kind '(kind)$'";
-  }
-
-  if !warning.empty() {
-    warning += " ";
-  }
-  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
-}
-
-
-test_perl_tests_general: @regex type = {
-  regex_0 := "abc";
-  var_regex_0 : std::string = "abc";
-  regex_1 := "abc";
-  var_regex_1 : std::string = "abc";
-  regex_2 := "abc";
-  var_regex_2 : std::string = "abc";
-  regex_3 := "abc";
-  var_regex_3 : std::string = "abc";
-  regex_4 := "abc";
-  var_regex_4 : std::string = "abc";
-  regex_5 := "abc";
-  var_regex_5 : std::string = "abc";
-  regex_6 := "abc";
-  var_regex_6 : std::string = "abc";
-  regex_7 := "abc";
-  var_regex_7 : std::string = "abc";
-  regex_8 := "abc";
-  var_regex_8 : std::string = "abc";
-  regex_9 := "abc";
-  var_regex_9 : std::string = "abc";
-  regex_10 := "abc";
-  var_regex_10 : std::string = "abc";
-  regex_11 := "abc";
-  var_regex_11 : std::string = "abc";
-  regex_12 := "ab*c";
-  var_regex_12 : std::string = "ab*c";
-  regex_13 := "ab*c";
-  var_regex_13 : std::string = "ab*c";
-  regex_14 := "ab*c";
-  var_regex_14 : std::string = "ab*c";
-  regex_15 := "ab*bc";
-  var_regex_15 : std::string = "ab*bc";
-  regex_16 := "ab*bc";
-  var_regex_16 : std::string = "ab*bc";
-  regex_17 := "ab*bc";
-  var_regex_17 : std::string = "ab*bc";
-  regex_18 := "ab*bc";
-  var_regex_18 : std::string = "ab*bc";
-  regex_19 := "ab*bc";
-  var_regex_19 : std::string = "ab*bc";
-  regex_20 := "ab*bc";
-  var_regex_20 : std::string = "ab*bc";
-  regex_21 := "ab*bc";
-  var_regex_21 : std::string = "ab*bc";
-  regex_22 := "ab*bc";
-  var_regex_22 : std::string = "ab*bc";
-  regex_23 := "ab*bc";
-  var_regex_23 : std::string = "ab*bc";
-  regex_24 := ".{1}";
-  var_regex_24 : std::string = ".{1}";
-  regex_25 := ".{1}";
-  var_regex_25 : std::string = ".{1}";
-  regex_26 := ".{1}";
-  var_regex_26 : std::string = ".{1}";
-  regex_27 := ".{3,4}";
-  var_regex_27 : std::string = ".{3,4}";
-  regex_28 := ".{3,4}";
-  var_regex_28 : std::string = ".{3,4}";
-  regex_29 := ".{3,4}";
-  var_regex_29 : std::string = ".{3,4}";
-  regex_30 := "\N{1}";
-  var_regex_30 : std::string = "\\N{1}";
-  regex_31 := "\N{1}";
-  var_regex_31 : std::string = "\\N{1}";
-  regex_32 := "\N{1}";
-  var_regex_32 : std::string = "\\N{1}";
-  regex_33 := "\N{3,4}";
-  var_regex_33 : std::string = "\\N{3,4}";
-  regex_34 := "\N{3,4}";
-  var_regex_34 : std::string = "\\N{3,4}";
-  regex_35 := "\N{3,4}";
-  var_regex_35 : std::string = "\\N{3,4}";
-  regex_36 := "\N{ 3 , 4 }";
-  var_regex_36 : std::string = "\\N{ 3 , 4 }";
-  regex_37 := "ab{0,}bc";
-  var_regex_37 : std::string = "ab{0,}bc";
-  regex_38 := "ab{0,}bc";
-  var_regex_38 : std::string = "ab{0,}bc";
-  regex_39 := "ab{0,}bc";
-  var_regex_39 : std::string = "ab{0,}bc";
-  regex_40 := "ab+bc";
-  var_regex_40 : std::string = "ab+bc";
-  regex_41 := "ab+bc";
-  var_regex_41 : std::string = "ab+bc";
-  regex_42 := "ab+bc";
-  var_regex_42 : std::string = "ab+bc";
-  regex_43 := "ab+bc";
-  var_regex_43 : std::string = "ab+bc";
-  regex_44 := "ab+bc";
-  var_regex_44 : std::string = "ab+bc";
-  regex_45 := "ab{1,}bc";
-  var_regex_45 : std::string = "ab{1,}bc";
-  regex_46 := "ab+bc";
-  var_regex_46 : std::string = "ab+bc";
-  regex_47 := "ab+bc";
-  var_regex_47 : std::string = "ab+bc";
-  regex_48 := "ab+bc";
-  var_regex_48 : std::string = "ab+bc";
-  regex_49 := "ab{1,}bc";
-  var_regex_49 : std::string = "ab{1,}bc";
-  regex_50 := "ab{1,}bc";
-  var_regex_50 : std::string = "ab{1,}bc";
-  regex_51 := "ab{1,}bc";
-  var_regex_51 : std::string = "ab{1,}bc";
-  regex_52 := "ab{1,3}bc";
-  var_regex_52 : std::string = "ab{1,3}bc";
-  regex_53 := "ab{1,3}bc";
-  var_regex_53 : std::string = "ab{1,3}bc";
-  regex_54 := "ab{1,3}bc";
-  var_regex_54 : std::string = "ab{1,3}bc";
-  regex_55 := "ab{3,4}bc";
-  var_regex_55 : std::string = "ab{3,4}bc";
-  regex_56 := "ab{3,4}bc";
-  var_regex_56 : std::string = "ab{3,4}bc";
-  regex_57 := "ab{3,4}bc";
-  var_regex_57 : std::string = "ab{3,4}bc";
-  regex_58 := "ab{4,5}bc";
-  var_regex_58 : std::string = "ab{4,5}bc";
-  regex_59 := "ab?bc";
-  var_regex_59 : std::string = "ab?bc";
-  regex_60 := "ab?bc";
-  var_regex_60 : std::string = "ab?bc";
-  regex_61 := "ab{0,1}bc";
-  var_regex_61 : std::string = "ab{0,1}bc";
-  regex_62 := "ab?bc";
-  var_regex_62 : std::string = "ab?bc";
-  regex_63 := "ab?c";
-  var_regex_63 : std::string = "ab?c";
-  regex_64 := "ab{0,1}c";
-  var_regex_64 : std::string = "ab{0,1}c";
-  regex_65 := "^abc\$";
-  var_regex_65 : std::string = "^abc\$";
-  regex_66 := "^abc\$";
-  var_regex_66 : std::string = "^abc\$";
-  regex_67 := "^abc";
-  var_regex_67 : std::string = "^abc";
-  regex_68 := "^abc\$";
-  var_regex_68 : std::string = "^abc\$";
-  regex_69 := "abc\$";
-  var_regex_69 : std::string = "abc\$";
-  regex_70 := "abc\$";
-  var_regex_70 : std::string = "abc\$";
-  regex_71 := "^";
-  var_regex_71 : std::string = "^";
-  regex_72 := "\$";
-  var_regex_72 : std::string = "\$";
-  regex_73 := "a.c";
-  var_regex_73 : std::string = "a.c";
-  regex_74 := "a.c";
-  var_regex_74 : std::string = "a.c";
-  regex_75 := "a\Nc";
-  var_regex_75 : std::string = "a\\Nc";
-  regex_76 := "a.*c";
-  var_regex_76 : std::string = "a.*c";
-  regex_77 := "a\N*c";
-  var_regex_77 : std::string = "a\\N*c";
-  regex_78 := "a.*c";
-  var_regex_78 : std::string = "a.*c";
-  regex_79 := "a\N*c";
-  var_regex_79 : std::string = "a\\N*c";
-  regex_80 := "a[bc]d";
-  var_regex_80 : std::string = "a[bc]d";
-  regex_81 := "a[bc]d";
-  var_regex_81 : std::string = "a[bc]d";
-  regex_82 := "a[b]d";
-  var_regex_82 : std::string = "a[b]d";
-  regex_83 := "[a][b][d]";
-  var_regex_83 : std::string = "[a][b][d]";
-  regex_84 := ".[b].";
-  var_regex_84 : std::string = ".[b].";
-  regex_85 := ".[b].";
-  var_regex_85 : std::string = ".[b].";
-  regex_86 := "a[b-d]e";
-  var_regex_86 : std::string = "a[b-d]e";
-  regex_87 := "a[b-d]e";
-  var_regex_87 : std::string = "a[b-d]e";
-  regex_88 := "a[b-d]";
-  var_regex_88 : std::string = "a[b-d]";
-  regex_89 := "a[-b]";
-  var_regex_89 : std::string = "a[-b]";
-  regex_90 := "a[b-]";
-  var_regex_90 : std::string = "a[b-]";
-  regex_91 := "a]";
-  var_regex_91 : std::string = "a]";
-  regex_92 := "a[]]b";
-  var_regex_92 : std::string = "a[]]b";
-  regex_93 := "a[^bc]d";
-  var_regex_93 : std::string = "a[^bc]d";
-  regex_94 := "a[^bc]d";
-  var_regex_94 : std::string = "a[^bc]d";
-  regex_95 := "a[^-b]c";
-  var_regex_95 : std::string = "a[^-b]c";
-  regex_96 := "a[^-b]c";
-  var_regex_96 : std::string = "a[^-b]c";
-  regex_97 := "a[^]b]c";
-  var_regex_97 : std::string = "a[^]b]c";
-  regex_98 := "a[^]b]c";
-  var_regex_98 : std::string = "a[^]b]c";
-  regex_99 := "\ba\b";
-  var_regex_99 : std::string = "\ba\b";
-  regex_100 := "\ba\b";
-  var_regex_100 : std::string = "\ba\b";
-  regex_101 := "\ba\b";
-  var_regex_101 : std::string = "\ba\b";
-  regex_102 := "\by\b";
-  var_regex_102 : std::string = "\by\b";
-  regex_103 := "\by\b";
-  var_regex_103 : std::string = "\by\b";
-  regex_104 := "\by\b";
-  var_regex_104 : std::string = "\by\b";
-  regex_105 := "\Ba\B";
-  var_regex_105 : std::string = "\Ba\B";
-  regex_106 := "\Ba\B";
-  var_regex_106 : std::string = "\Ba\B";
-  regex_107 := "\Ba\B";
-  var_regex_107 : std::string = "\Ba\B";
-  regex_108 := "\By\b";
-  var_regex_108 : std::string = "\By\b";
-  regex_109 := "\By\b";
-  var_regex_109 : std::string = "\By\b";
-  regex_110 := "\By\b";
-  var_regex_110 : std::string = "\By\b";
-  regex_111 := "\By\b";
-  var_regex_111 : std::string = "\By\b";
-  regex_112 := "\by\B";
-  var_regex_112 : std::string = "\by\B";
-  regex_113 := "\By\B";
-  var_regex_113 : std::string = "\By\B";
-  regex_114 := "\b";
-  var_regex_114 : std::string = "\b";
-  regex_115 := "\B";
-  var_regex_115 : std::string = "\B";
-  regex_116 := "\w";
-  var_regex_116 : std::string = "\w";
-  regex_117 := "\w";
-  var_regex_117 : std::string = "\w";
-  regex_118 := "\W";
-  var_regex_118 : std::string = "\W";
-  regex_119 := "\W";
-  var_regex_119 : std::string = "\W";
-  regex_120 := "a\sb";
-  var_regex_120 : std::string = "a\sb";
-  regex_121 := "a\sb";
-  var_regex_121 : std::string = "a\sb";
-  regex_122 := "a\Sb";
-  var_regex_122 : std::string = "a\Sb";
-  regex_123 := "a\Sb";
-  var_regex_123 : std::string = "a\Sb";
-  regex_124 := "\d";
-  var_regex_124 : std::string = "\d";
-  regex_125 := "\d";
-  var_regex_125 : std::string = "\d";
-  regex_126 := "\D";
-  var_regex_126 : std::string = "\D";
-  regex_127 := "\D";
-  var_regex_127 : std::string = "\D";
-  regex_128 := "[\w]";
-  var_regex_128 : std::string = "[\w]";
-  regex_129 := "[\w]";
-  var_regex_129 : std::string = "[\w]";
-  regex_130 := "[\W]";
-  var_regex_130 : std::string = "[\W]";
-  regex_131 := "[\W]";
-  var_regex_131 : std::string = "[\W]";
-  regex_132 := "a[\s]b";
-  var_regex_132 : std::string = "a[\s]b";
-  regex_133 := "a[\s]b";
-  var_regex_133 : std::string = "a[\s]b";
-  regex_134 := "a[\S]b";
-  var_regex_134 : std::string = "a[\S]b";
-  regex_135 := "a[\S]b";
-  var_regex_135 : std::string = "a[\S]b";
-  regex_136 := "[\d]";
-  var_regex_136 : std::string = "[\d]";
-  regex_137 := "[\d]";
-  var_regex_137 : std::string = "[\d]";
-  regex_138 := "[\D]";
-  var_regex_138 : std::string = "[\D]";
-  regex_139 := "[\D]";
-  var_regex_139 : std::string = "[\D]";
-  regex_140 := "ab|cd";
-  var_regex_140 : std::string = "ab|cd";
-  regex_141 := "ab|cd";
-  var_regex_141 : std::string = "ab|cd";
-  regex_142 := "()ef";
-  var_regex_142 : std::string = "()ef";
-  regex_143 := "()ef";
-  var_regex_143 : std::string = "()ef";
-  regex_144 := "()ef";
-  var_regex_144 : std::string = "()ef";
-  regex_145 := "()ef";
-  var_regex_145 : std::string = "()ef";
-  regex_146 := "()ef";
-  var_regex_146 : std::string = "()ef";
-  regex_147 := "\$b";
-  var_regex_147 : std::string = "\$b";
-  regex_148 := "a\(b";
-  var_regex_148 : std::string = "a\(b";
-  regex_149 := "a\(*b";
-  var_regex_149 : std::string = "a\(*b";
-  regex_150 := "a\(*b";
-  var_regex_150 : std::string = "a\(*b";
-  regex_151 := "a\\b";
-  var_regex_151 : std::string = "a\\b";
-  regex_152 := "((a))";
-  var_regex_152 : std::string = "((a))";
-  regex_153 := "((a))";
-  var_regex_153 : std::string = "((a))";
-  regex_154 := "((a))";
-  var_regex_154 : std::string = "((a))";
-  regex_155 := "(foo)(\g-2)";
-  var_regex_155 : std::string = "(foo)(\g-2)";
-  regex_156 := "(foo)(\g-2)(foo)(\g-2)";
-  var_regex_156 : std::string = "(foo)(\g-2)(foo)(\g-2)";
-  regex_157 := "(([abc]+) \g-1)(([abc]+) \g{-1})";
-  var_regex_157 : std::string = "(([abc]+) \g-1)(([abc]+) \g{-1})";
-  regex_158 := "(a)(b)(c)\g1\g2\g3";
-  var_regex_158 : std::string = "(a)(b)(c)\g1\g2\g3";
-  regex_159 := "abc";
-  regex_159_mod := "i";
-  var_regex_159 : std::string = "abc";
-  regex_160 := "abc";
-  regex_160_mod := "i";
-  var_regex_160 : std::string = "abc";
-  regex_161 := "abc";
-  regex_161_mod := "i";
-  var_regex_161 : std::string = "abc";
-  regex_162 := "abc";
-  regex_162_mod := "i";
-  var_regex_162 : std::string = "abc";
-  regex_163 := "abc";
-  regex_163_mod := "i";
-  var_regex_163 : std::string = "abc";
-  regex_164 := "abc";
-  regex_164_mod := "i";
-  var_regex_164 : std::string = "abc";
-  regex_165 := "ab*c";
-  regex_165_mod := "i";
-  var_regex_165 : std::string = "ab*c";
-  regex_166 := "ab*bc";
-  regex_166_mod := "i";
-  var_regex_166 : std::string = "ab*bc";
-  regex_167 := "ab*bc";
-  regex_167_mod := "i";
-  var_regex_167 : std::string = "ab*bc";
-  regex_168 := "ab*?bc";
-  regex_168_mod := "i";
-  var_regex_168 : std::string = "ab*?bc";
-  regex_169 := "ab{0,}?bc";
-  regex_169_mod := "i";
-  var_regex_169 : std::string = "ab{0,}?bc";
-  regex_170 := "ab+?bc";
-  regex_170_mod := "i";
-  var_regex_170 : std::string = "ab+?bc";
-  regex_171 := "ab+bc";
-  regex_171_mod := "i";
-  var_regex_171 : std::string = "ab+bc";
-  regex_172 := "ab+bc";
-  regex_172_mod := "i";
-  var_regex_172 : std::string = "ab+bc";
-  regex_173 := "ab{1,}bc";
-  regex_173_mod := "i";
-  var_regex_173 : std::string = "ab{1,}bc";
-  regex_174 := "ab+bc";
-  regex_174_mod := "i";
-  var_regex_174 : std::string = "ab+bc";
-  regex_175 := "ab{1,}?bc";
-  regex_175_mod := "i";
-  var_regex_175 : std::string = "ab{1,}?bc";
-  regex_176 := "ab{1,3}?bc";
-  regex_176_mod := "i";
-  var_regex_176 : std::string = "ab{1,3}?bc";
-  regex_177 := "ab{3,4}?bc";
-  regex_177_mod := "i";
-  var_regex_177 : std::string = "ab{3,4}?bc";
-  regex_178 := "ab{4,5}?bc";
-  regex_178_mod := "i";
-  var_regex_178 : std::string = "ab{4,5}?bc";
-  regex_179 := "ab??bc";
-  regex_179_mod := "i";
-  var_regex_179 : std::string = "ab??bc";
-  regex_180 := "ab??bc";
-  regex_180_mod := "i";
-  var_regex_180 : std::string = "ab??bc";
-  regex_181 := "ab{0,1}?bc";
-  regex_181_mod := "i";
-  var_regex_181 : std::string = "ab{0,1}?bc";
-  regex_182 := "ab??bc";
-  regex_182_mod := "i";
-  var_regex_182 : std::string = "ab??bc";
-  regex_183 := "ab??c";
-  regex_183_mod := "i";
-  var_regex_183 : std::string = "ab??c";
-  regex_184 := "ab{0,1}?c";
-  regex_184_mod := "i";
-  var_regex_184 : std::string = "ab{0,1}?c";
-  regex_185 := "^abc\$";
-  regex_185_mod := "i";
-  var_regex_185 : std::string = "^abc\$";
-  regex_186 := "^abc\$";
-  regex_186_mod := "i";
-  var_regex_186 : std::string = "^abc\$";
-  regex_187 := "^abc";
-  regex_187_mod := "i";
-  var_regex_187 : std::string = "^abc";
-  regex_188 := "^abc\$";
-  regex_188_mod := "i";
-  var_regex_188 : std::string = "^abc\$";
-  regex_189 := "abc\$";
-  regex_189_mod := "i";
-  var_regex_189 : std::string = "abc\$";
-  regex_190 := "^";
-  regex_190_mod := "i";
-  var_regex_190 : std::string = "^";
-  regex_191 := "\$";
-  regex_191_mod := "i";
-  var_regex_191 : std::string = "\$";
-  regex_192 := "a.c";
-  regex_192_mod := "i";
-  var_regex_192 : std::string = "a.c";
-  regex_193 := "a.c";
-  regex_193_mod := "i";
-  var_regex_193 : std::string = "a.c";
-  regex_194 := "a\Nc";
-  regex_194_mod := "i";
-  var_regex_194 : std::string = "a\\Nc";
-  regex_195 := "a.*?c";
-  regex_195_mod := "i";
-  var_regex_195 : std::string = "a.*?c";
-  regex_196 := "a.*c";
-  regex_196_mod := "i";
-  var_regex_196 : std::string = "a.*c";
-  regex_197 := "a[bc]d";
-  regex_197_mod := "i";
-  var_regex_197 : std::string = "a[bc]d";
-  regex_198 := "a[bc]d";
-  regex_198_mod := "i";
-  var_regex_198 : std::string = "a[bc]d";
-  regex_199 := "a[b-d]e";
-  regex_199_mod := "i";
-  var_regex_199 : std::string = "a[b-d]e";
-  regex_200 := "a[b-d]e";
-  regex_200_mod := "i";
-  var_regex_200 : std::string = "a[b-d]e";
-  regex_201 := "a[b-d]";
-  regex_201_mod := "i";
-  var_regex_201 : std::string = "a[b-d]";
-  regex_202 := "a[-b]";
-  regex_202_mod := "i";
-  var_regex_202 : std::string = "a[-b]";
-  regex_203 := "a[b-]";
-  regex_203_mod := "i";
-  var_regex_203 : std::string = "a[b-]";
-  regex_204 := "a]";
-  regex_204_mod := "i";
-  var_regex_204 : std::string = "a]";
-  regex_205 := "a[]]b";
-  regex_205_mod := "i";
-  var_regex_205 : std::string = "a[]]b";
-  regex_206 := "a[^bc]d";
-  regex_206_mod := "i";
-  var_regex_206 : std::string = "a[^bc]d";
-  regex_207 := "a[^bc]d";
-  regex_207_mod := "i";
-  var_regex_207 : std::string = "a[^bc]d";
-  regex_208 := "a[^-b]c";
-  regex_208_mod := "i";
-  var_regex_208 : std::string = "a[^-b]c";
-  regex_209 := "a[^-b]c";
-  regex_209_mod := "i";
-  var_regex_209 : std::string = "a[^-b]c";
-  regex_210 := "a[^]b]c";
-  regex_210_mod := "i";
-  var_regex_210 : std::string = "a[^]b]c";
-  regex_211 := "a[^]b]c";
-  regex_211_mod := "i";
-  var_regex_211 : std::string = "a[^]b]c";
-  regex_212 := "ab|cd";
-  regex_212_mod := "i";
-  var_regex_212 : std::string = "ab|cd";
-  regex_213 := "ab|cd";
-  regex_213_mod := "i";
-  var_regex_213 : std::string = "ab|cd";
-  regex_214 := "()ef";
-  regex_214_mod := "i";
-  var_regex_214 : std::string = "()ef";
-  regex_215 := "\$b";
-  regex_215_mod := "i";
-  var_regex_215 : std::string = "\$b";
-  regex_216 := "a\(b";
-  regex_216_mod := "i";
-  var_regex_216 : std::string = "a\(b";
-  regex_217 := "a\(*b";
-  regex_217_mod := "i";
-  var_regex_217 : std::string = "a\(*b";
-  regex_218 := "a\(*b";
-  regex_218_mod := "i";
-  var_regex_218 : std::string = "a\(*b";
-  regex_219 := "a\\b";
-  regex_219_mod := "i";
-  var_regex_219 : std::string = "a\\b";
-  regex_220 := "((a))";
-  regex_220_mod := "i";
-  var_regex_220 : std::string = "((a))";
-  regex_221 := "(a)b(c)";
-  regex_221_mod := "i";
-  var_regex_221 : std::string = "(a)b(c)";
-  regex_222 := "a+b+c";
-  regex_222_mod := "i";
-  var_regex_222 : std::string = "a+b+c";
-  regex_223 := "a{1,}b{1,}c";
-  regex_223_mod := "i";
-  var_regex_223 : std::string = "a{1,}b{1,}c";
-  regex_224 := "a.+?c";
-  regex_224_mod := "i";
-  var_regex_224 : std::string = "a.+?c";
-  regex_225 := "a.*?c";
-  regex_225_mod := "i";
-  var_regex_225 : std::string = "a.*?c";
-  regex_226 := "a.{0,5}?c";
-  regex_226_mod := "i";
-  var_regex_226 : std::string = "a.{0,5}?c";
-  regex_227 := "(a+|b)*";
-  regex_227_mod := "i";
-  var_regex_227 : std::string = "(a+|b)*";
-  regex_228 := "(a+|b){0,}";
-  regex_228_mod := "i";
-  var_regex_228 : std::string = "(a+|b){0,}";
-  regex_229 := "(a+|b)+";
-  regex_229_mod := "i";
-  var_regex_229 : std::string = "(a+|b)+";
-  regex_230 := "(a+|b){1,}";
-  regex_230_mod := "i";
-  var_regex_230 : std::string = "(a+|b){1,}";
-  regex_231 := "(a+|b)?";
-  regex_231_mod := "i";
-  var_regex_231 : std::string = "(a+|b)?";
-  regex_232 := "(a+|b){0,1}";
-  regex_232_mod := "i";
-  var_regex_232 : std::string = "(a+|b){0,1}";
-  regex_233 := "(a+|b){0,1}?";
-  regex_233_mod := "i";
-  var_regex_233 : std::string = "(a+|b){0,1}?";
-  regex_234 := "[^ab]*";
-  regex_234_mod := "i";
-  var_regex_234 : std::string = "[^ab]*";
-  regex_235 := "abc";
-  regex_235_mod := "i";
-  var_regex_235 : std::string = "abc";
-  regex_236 := "a*";
-  regex_236_mod := "i";
-  var_regex_236 : std::string = "a*";
-  regex_237 := "([abc])*d";
-  regex_237_mod := "i";
-  var_regex_237 : std::string = "([abc])*d";
-  regex_238 := "([abc])*bcd";
-  regex_238_mod := "i";
-  var_regex_238 : std::string = "([abc])*bcd";
-  regex_239 := "a|b|c|d|e";
-  regex_239_mod := "i";
-  var_regex_239 : std::string = "a|b|c|d|e";
-  regex_240 := "(a|b|c|d|e)f";
-  regex_240_mod := "i";
-  var_regex_240 : std::string = "(a|b|c|d|e)f";
-  regex_241 := "abcd*efg";
-  regex_241_mod := "i";
-  var_regex_241 : std::string = "abcd*efg";
-  regex_242 := "ab*";
-  regex_242_mod := "i";
-  var_regex_242 : std::string = "ab*";
-  regex_243 := "ab*";
-  regex_243_mod := "i";
-  var_regex_243 : std::string = "ab*";
-  regex_244 := "(ab|cd)e";
-  regex_244_mod := "i";
-  var_regex_244 : std::string = "(ab|cd)e";
-  regex_245 := "[abhgefdc]ij";
-  regex_245_mod := "i";
-  var_regex_245 : std::string = "[abhgefdc]ij";
-  regex_246 := "^(ab|cd)e";
-  regex_246_mod := "i";
-  var_regex_246 : std::string = "^(ab|cd)e";
-  regex_247 := "(abc|)ef";
-  regex_247_mod := "i";
-  var_regex_247 : std::string = "(abc|)ef";
-  regex_248 := "(a|b)c*d";
-  regex_248_mod := "i";
-  var_regex_248 : std::string = "(a|b)c*d";
-  regex_249 := "(ab|ab*)bc";
-  regex_249_mod := "i";
-  var_regex_249 : std::string = "(ab|ab*)bc";
-  regex_250 := "a([bc]*)c*";
-  regex_250_mod := "i";
-  var_regex_250 : std::string = "a([bc]*)c*";
-  regex_251 := "a([bc]*)(c*d)";
-  regex_251_mod := "i";
-  var_regex_251 : std::string = "a([bc]*)(c*d)";
-  regex_252 := "a([bc]+)(c*d)";
-  regex_252_mod := "i";
-  var_regex_252 : std::string = "a([bc]+)(c*d)";
-  regex_253 := "a([bc]*)(c+d)";
-  regex_253_mod := "i";
-  var_regex_253 : std::string = "a([bc]*)(c+d)";
-  regex_254 := "a[bcd]*dcdcde";
-  regex_254_mod := "i";
-  var_regex_254 : std::string = "a[bcd]*dcdcde";
-  regex_255 := "a[bcd]+dcdcde";
-  regex_255_mod := "i";
-  var_regex_255 : std::string = "a[bcd]+dcdcde";
-  regex_256 := "(ab|a)b*c";
-  regex_256_mod := "i";
-  var_regex_256 : std::string = "(ab|a)b*c";
-  regex_257 := "((a)(b)c)(d)";
-  regex_257_mod := "i";
-  var_regex_257 : std::string = "((a)(b)c)(d)";
-  regex_258 := "[a-zA-Z_][a-zA-Z0-9_]*";
-  regex_258_mod := "i";
-  var_regex_258 : std::string = "[a-zA-Z_][a-zA-Z0-9_]*";
-  regex_259 := "^a(bc+|b[eh])g|.h\$";
-  regex_259_mod := "i";
-  var_regex_259 : std::string = "^a(bc+|b[eh])g|.h\$";
-  regex_260 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_260_mod := "i";
-  var_regex_260 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_261 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_261_mod := "i";
-  var_regex_261 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_262 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_262_mod := "i";
-  var_regex_262 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_263 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_263_mod := "i";
-  var_regex_263 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_264 := "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_264_mod := "i";
-  var_regex_264 : std::string = "(bc+d\$|ef*g.|h?i(j|k))";
-  regex_265 := "((((((((((a))))))))))";
-  regex_265_mod := "i";
-  var_regex_265 : std::string = "((((((((((a))))))))))";
-  regex_266 := "((((((((((a))))))))))\10";
-  regex_266_mod := "i";
-  var_regex_266 : std::string = "((((((((((a))))))))))\10";
-  regex_267 := "(((((((((a)))))))))";
-  regex_267_mod := "i";
-  var_regex_267 : std::string = "(((((((((a)))))))))";
-  regex_268 := "multiple words of text";
-  regex_268_mod := "i";
-  var_regex_268 : std::string = "multiple words of text";
-  regex_269 := "multiple words";
-  regex_269_mod := "i";
-  var_regex_269 : std::string = "multiple words";
-  regex_270 := "(.*)c(.*)";
-  regex_270_mod := "i";
-  var_regex_270 : std::string = "(.*)c(.*)";
-  regex_271 := "\((.*), (.*)\)";
-  regex_271_mod := "i";
-  var_regex_271 : std::string = "\((.*), (.*)\)";
-  regex_272 := "[k]";
-  regex_272_mod := "i";
-  var_regex_272 : std::string = "[k]";
-  regex_273 := "abcd";
-  regex_273_mod := "i";
-  var_regex_273 : std::string = "abcd";
-  regex_274 := "a(bc)d";
-  regex_274_mod := "i";
-  var_regex_274 : std::string = "a(bc)d";
-  regex_275 := "a[-]?c";
-  regex_275_mod := "i";
-  var_regex_275 : std::string = "a[-]?c";
-  regex_276 := "(abc)\1";
-  regex_276_mod := "i";
-  var_regex_276 : std::string = "(abc)\1";
-  regex_277 := "([a-c]*)\1";
-  regex_277_mod := "i";
-  var_regex_277 : std::string = "([a-c]*)\1";
-  regex_278 := "a++a";
-  var_regex_278 : std::string = "a++a";
-  regex_279 := "a*+a";
-  var_regex_279 : std::string = "a*+a";
-  regex_280 := "a{1,5}+a";
-  var_regex_280 : std::string = "a{1,5}+a";
-  regex_281 := "a?+a";
-  var_regex_281 : std::string = "a?+a";
-  regex_282 := "a++b";
-  var_regex_282 : std::string = "a++b";
-  regex_283 := "a*+b";
-  var_regex_283 : std::string = "a*+b";
-  regex_284 := "a{1,5}+b";
-  var_regex_284 : std::string = "a{1,5}+b";
-  regex_285 := "a?+b";
-  var_regex_285 : std::string = "a?+b";
-  regex_286 := "fooa++a";
-  var_regex_286 : std::string = "fooa++a";
-  regex_287 := "fooa*+a";
-  var_regex_287 : std::string = "fooa*+a";
-  regex_288 := "fooa{1,5}+a";
-  var_regex_288 : std::string = "fooa{1,5}+a";
-  regex_289 := "fooa?+a";
-  var_regex_289 : std::string = "fooa?+a";
-  regex_290 := "fooa++b";
-  var_regex_290 : std::string = "fooa++b";
-  regex_291 := "fooa*+b";
-  var_regex_291 : std::string = "fooa*+b";
-  regex_292 := "fooa{1,5}+b";
-  var_regex_292 : std::string = "fooa{1,5}+b";
-  regex_293 := "fooa?+b";
-  var_regex_293 : std::string = "fooa?+b";
-  regex_294 := "(aA)++(aA)";
-  var_regex_294 : std::string = "(aA)++(aA)";
-  regex_295 := "(aA|bB)++(aA|bB)";
-  var_regex_295 : std::string = "(aA|bB)++(aA|bB)";
-  regex_296 := "(aA)*+(aA)";
-  var_regex_296 : std::string = "(aA)*+(aA)";
-  regex_297 := "(aA|bB)*+(aA|bB)";
-  var_regex_297 : std::string = "(aA|bB)*+(aA|bB)";
-  regex_298 := "(aA){1,5}+(aA)";
-  var_regex_298 : std::string = "(aA){1,5}+(aA)";
-  regex_299 := "(aA|bB){1,5}+(aA|bB)";
-  var_regex_299 : std::string = "(aA|bB){1,5}+(aA|bB)";
-  regex_300 := "(aA)?+(aA)";
-  var_regex_300 : std::string = "(aA)?+(aA)";
-  regex_301 := "(aA|bB)?+(aA|bB)";
-  var_regex_301 : std::string = "(aA|bB)?+(aA|bB)";
-  regex_302 := "(aA)++b";
-  var_regex_302 : std::string = "(aA)++b";
-  regex_303 := "(aA|bB)++b";
-  var_regex_303 : std::string = "(aA|bB)++b";
-  regex_304 := "(aA)*+b";
-  var_regex_304 : std::string = "(aA)*+b";
-  regex_305 := "(aA|bB)*+b";
-  var_regex_305 : std::string = "(aA|bB)*+b";
-  regex_306 := "(aA){1,5}+b";
-  var_regex_306 : std::string = "(aA){1,5}+b";
-  regex_307 := "(aA|bB){1,5}+b";
-  var_regex_307 : std::string = "(aA|bB){1,5}+b";
-  regex_308 := "(aA)?+b";
-  var_regex_308 : std::string = "(aA)?+b";
-  regex_309 := "(aA|bB)?+b";
-  var_regex_309 : std::string = "(aA|bB)?+b";
-  regex_310 := "foo(aA)++(aA)";
-  var_regex_310 : std::string = "foo(aA)++(aA)";
-  regex_311 := "foo(aA|bB)++(aA|bB)";
-  var_regex_311 : std::string = "foo(aA|bB)++(aA|bB)";
-  regex_312 := "foo(aA)*+(aA)";
-  var_regex_312 : std::string = "foo(aA)*+(aA)";
-  regex_313 := "foo(aA|bB)*+(aA|bB)";
-  var_regex_313 : std::string = "foo(aA|bB)*+(aA|bB)";
-  regex_314 := "foo(aA){1,5}+(aA)";
-  var_regex_314 : std::string = "foo(aA){1,5}+(aA)";
-  regex_315 := "foo(aA|bB){1,5}+(aA|bB)";
-  var_regex_315 : std::string = "foo(aA|bB){1,5}+(aA|bB)";
-  regex_316 := "foo(aA)?+(aA)";
-  var_regex_316 : std::string = "foo(aA)?+(aA)";
-  regex_317 := "foo(aA|bB)?+(aA|bB)";
-  var_regex_317 : std::string = "foo(aA|bB)?+(aA|bB)";
-  regex_318 := "foo(aA)++b";
-  var_regex_318 : std::string = "foo(aA)++b";
-  regex_319 := "foo(aA|bB)++b";
-  var_regex_319 : std::string = "foo(aA|bB)++b";
-  regex_320 := "foo(aA)*+b";
-  var_regex_320 : std::string = "foo(aA)*+b";
-  regex_321 := "foo(aA|bB)*+b";
-  var_regex_321 : std::string = "foo(aA|bB)*+b";
-  regex_322 := "foo(aA){1,5}+b";
-  var_regex_322 : std::string = "foo(aA){1,5}+b";
-  regex_323 := "foo(aA|bB){1,5}+b";
-  var_regex_323 : std::string = "foo(aA|bB){1,5}+b";
-  regex_324 := "foo(aA)?+b";
-  var_regex_324 : std::string = "foo(aA)?+b";
-  regex_325 := "foo(aA|bB)?+b";
-  var_regex_325 : std::string = "foo(aA|bB)?+b";
-  regex_326 := "foo(\h+)bar";
-  var_regex_326 : std::string = "foo(\h+)bar";
-  regex_327 := "(\H+)(\h)";
-  var_regex_327 : std::string = "(\H+)(\h)";
-  regex_328 := "(\h+)(\H)";
-  var_regex_328 : std::string = "(\h+)(\H)";
-  regex_329 := "foo(\h)bar";
-  var_regex_329 : std::string = "foo(\h)bar";
-  regex_330 := "(\H)(\h)";
-  var_regex_330 : std::string = "(\H)(\h)";
-  regex_331 := "(\h)(\H)";
-  var_regex_331 : std::string = "(\h)(\H)";
-  regex_332 := "foo(\v+)bar";
-  var_regex_332 : std::string = "foo(\v+)bar";
-  regex_333 := "(\V+)(\v)";
-  var_regex_333 : std::string = "(\V+)(\v)";
-  regex_334 := "(\v+)(\V)";
-  var_regex_334 : std::string = "(\v+)(\V)";
-  regex_335 := "foo(\v)bar";
-  var_regex_335 : std::string = "foo(\v)bar";
-  regex_336 := "(\V)(\v)";
-  var_regex_336 : std::string = "(\V)(\v)";
-  regex_337 := "(\v)(\V)";
-  var_regex_337 : std::string = "(\v)(\V)";
-  regex_338 := "(?:(?i)a)b";
-  var_regex_338 : std::string = "(?:(?i)a)b";
-  regex_339 := "((?i)a)b";
-  var_regex_339 : std::string = "((?i)a)b";
-  regex_340 := "(?:(?i)a)b";
-  var_regex_340 : std::string = "(?:(?i)a)b";
-  regex_341 := "((?i)a)b";
-  var_regex_341 : std::string = "((?i)a)b";
-  regex_342 := "(?:(?i)a)b";
-  var_regex_342 : std::string = "(?:(?i)a)b";
-  regex_343 := "((?i)a)b";
-  var_regex_343 : std::string = "((?i)a)b";
-  regex_344 := "(?i:a)b";
-  var_regex_344 : std::string = "(?i:a)b";
-  regex_345 := "((?i:a))b";
-  var_regex_345 : std::string = "((?i:a))b";
-  regex_346 := "(?i:a)b";
-  var_regex_346 : std::string = "(?i:a)b";
-  regex_347 := "((?i:a))b";
-  var_regex_347 : std::string = "((?i:a))b";
-  regex_348 := "(?i:a)b";
-  var_regex_348 : std::string = "(?i:a)b";
-  regex_349 := "((?i:a))b";
-  var_regex_349 : std::string = "((?i:a))b";
-  regex_350 := "(?:(?-i)a)b";
-  regex_350_mod := "i";
-  var_regex_350 : std::string = "(?:(?-i)a)b";
-  regex_351 := "((?-i)a)b";
-  regex_351_mod := "i";
-  var_regex_351 : std::string = "((?-i)a)b";
-  regex_352 := "(?:(?-i)a)b";
-  regex_352_mod := "i";
-  var_regex_352 : std::string = "(?:(?-i)a)b";
-  regex_353 := "((?-i)a)b";
-  regex_353_mod := "i";
-  var_regex_353 : std::string = "((?-i)a)b";
-  regex_354 := "(?:(?-i)a)b";
-  regex_354_mod := "i";
-  var_regex_354 : std::string = "(?:(?-i)a)b";
-  regex_355 := "((?-i)a)b";
-  regex_355_mod := "i";
-  var_regex_355 : std::string = "((?-i)a)b";
-  regex_356 := "(?:(?-i)a)b";
-  regex_356_mod := "i";
-  var_regex_356 : std::string = "(?:(?-i)a)b";
-  regex_357 := "((?-i)a)b";
-  regex_357_mod := "i";
-  var_regex_357 : std::string = "((?-i)a)b";
-  regex_358 := "(?:(?-i)a)b";
-  regex_358_mod := "i";
-  var_regex_358 : std::string = "(?:(?-i)a)b";
-  regex_359 := "((?-i)a)b";
-  regex_359_mod := "i";
-  var_regex_359 : std::string = "((?-i)a)b";
-  regex_360 := "(?-i:a)b";
-  regex_360_mod := "i";
-  var_regex_360 : std::string = "(?-i:a)b";
-  regex_361 := "((?-i:a))b";
-  regex_361_mod := "i";
-  var_regex_361 : std::string = "((?-i:a))b";
-  regex_362 := "(?-i:a)b";
-  regex_362_mod := "i";
-  var_regex_362 : std::string = "(?-i:a)b";
-  regex_363 := "((?-i:a))b";
-  regex_363_mod := "i";
-  var_regex_363 : std::string = "((?-i:a))b";
-  regex_364 := "(?-i:a)b";
-  regex_364_mod := "i";
-  var_regex_364 : std::string = "(?-i:a)b";
-  regex_365 := "((?-i:a))b";
-  regex_365_mod := "i";
-  var_regex_365 : std::string = "((?-i:a))b";
-  regex_366 := "(?-i:a)b";
-  regex_366_mod := "i";
-  var_regex_366 : std::string = "(?-i:a)b";
-  regex_367 := "((?-i:a))b";
-  regex_367_mod := "i";
-  var_regex_367 : std::string = "((?-i:a))b";
-  regex_368 := "(?-i:a)b";
-  regex_368_mod := "i";
-  var_regex_368 : std::string = "(?-i:a)b";
-  regex_369 := "((?-i:a))b";
-  regex_369_mod := "i";
-  var_regex_369 : std::string = "((?-i:a))b";
-  regex_370 := "((?-i:a.))b";
-  regex_370_mod := "i";
-  var_regex_370 : std::string = "((?-i:a.))b";
-  regex_371 := "((?-i:a\N))b";
-  regex_371_mod := "i";
-  var_regex_371 : std::string = "((?-i:a\\N))b";
-  regex_372 := "((?s-i:a.))b";
-  regex_372_mod := "i";
-  var_regex_372 : std::string = "((?s-i:a.))b";
-  regex_373 := "((?s-i:a\N))b";
-  regex_373_mod := "i";
-  var_regex_373 : std::string = "((?s-i:a\\N))b";
-  regex_374 := "((?s-i:a.))b";
-  regex_374_mod := "i";
-  var_regex_374 : std::string = "((?s-i:a.))b";
-  regex_375 := "((?s-i:a\N))b";
-  regex_375_mod := "i";
-  var_regex_375 : std::string = "((?s-i:a\\N))b";
-  regex_376 := "^(?:a?b?)*\$";
-  var_regex_376 : std::string = "^(?:a?b?)*\$";
-  regex_377 := "((?s)^a(.))((?m)^b\$)";
-  var_regex_377 : std::string = "((?s)^a(.))((?m)^b\$)";
-  regex_378 := "((?m)^b\$)";
-  var_regex_378 : std::string = "((?m)^b\$)";
-  regex_379 := "(?m)^b";
-  var_regex_379 : std::string = "(?m)^b";
-  regex_380 := "(?m)^(b)";
-  var_regex_380 : std::string = "(?m)^(b)";
-  regex_381 := "((?m)^b)";
-  var_regex_381 : std::string = "((?m)^b)";
-  regex_382 := "\n((?m)^b)";
-  var_regex_382 : std::string = "\n((?m)^b)";
-  regex_383 := "^b";
-  var_regex_383 : std::string = "^b";
-  regex_384 := "()^b";
-  var_regex_384 : std::string = "()^b";
-  regex_385 := "((?m)^b)";
-  var_regex_385 : std::string = "((?m)^b)";
-  regex_386 := "\Z";
-  var_regex_386 : std::string = "\Z";
-  regex_387 := "\z";
-  var_regex_387 : std::string = "\z";
-  regex_388 := "\$";
-  var_regex_388 : std::string = "\$";
-  regex_389 := "\Z";
-  var_regex_389 : std::string = "\Z";
-  regex_390 := "\z";
-  var_regex_390 : std::string = "\z";
-  regex_391 := "\$";
-  var_regex_391 : std::string = "\$";
-  regex_392 := "\Z";
-  var_regex_392 : std::string = "\Z";
-  regex_393 := "\z";
-  var_regex_393 : std::string = "\z";
-  regex_394 := "\$";
-  var_regex_394 : std::string = "\$";
-  regex_395 := "\Z";
-  regex_395_mod := "m";
-  var_regex_395 : std::string = "\Z";
-  regex_396 := "\z";
-  regex_396_mod := "m";
-  var_regex_396 : std::string = "\z";
-  regex_397 := "\$";
-  regex_397_mod := "m";
-  var_regex_397 : std::string = "\$";
-  regex_398 := "\Z";
-  regex_398_mod := "m";
-  var_regex_398 : std::string = "\Z";
-  regex_399 := "\z";
-  regex_399_mod := "m";
-  var_regex_399 : std::string = "\z";
-  regex_400 := "\$";
-  regex_400_mod := "m";
-  var_regex_400 : std::string = "\$";
-  regex_401 := "\Z";
-  regex_401_mod := "m";
-  var_regex_401 : std::string = "\Z";
-  regex_402 := "\z";
-  regex_402_mod := "m";
-  var_regex_402 : std::string = "\z";
-  regex_403 := "\$";
-  regex_403_mod := "m";
-  var_regex_403 : std::string = "\$";
-  regex_404 := "a\Z";
-  var_regex_404 : std::string = "a\Z";
-  regex_405 := "a\z";
-  var_regex_405 : std::string = "a\z";
-  regex_406 := "a\$";
-  var_regex_406 : std::string = "a\$";
-  regex_407 := "a\Z";
-  var_regex_407 : std::string = "a\Z";
-  regex_408 := "a\z";
-  var_regex_408 : std::string = "a\z";
-  regex_409 := "a\$";
-  var_regex_409 : std::string = "a\$";
-  regex_410 := "a\Z";
-  var_regex_410 : std::string = "a\Z";
-  regex_411 := "a\z";
-  var_regex_411 : std::string = "a\z";
-  regex_412 := "a\$";
-  var_regex_412 : std::string = "a\$";
-  regex_413 := "a\Z";
-  regex_413_mod := "m";
-  var_regex_413 : std::string = "a\Z";
-  regex_414 := "a\z";
-  regex_414_mod := "m";
-  var_regex_414 : std::string = "a\z";
-  regex_415 := "a\$";
-  regex_415_mod := "m";
-  var_regex_415 : std::string = "a\$";
-  regex_416 := "a\Z";
-  regex_416_mod := "m";
-  var_regex_416 : std::string = "a\Z";
-  regex_417 := "a\z";
-  regex_417_mod := "m";
-  var_regex_417 : std::string = "a\z";
-  regex_418 := "a\$";
-  regex_418_mod := "m";
-  var_regex_418 : std::string = "a\$";
-  regex_419 := "a\Z";
-  regex_419_mod := "m";
-  var_regex_419 : std::string = "a\Z";
-  regex_420 := "a\z";
-  regex_420_mod := "m";
-  var_regex_420 : std::string = "a\z";
-  regex_421 := "a\$";
-  regex_421_mod := "m";
-  var_regex_421 : std::string = "a\$";
-  regex_422 := "aa\Z";
-  var_regex_422 : std::string = "aa\Z";
-  regex_423 := "aa\z";
-  var_regex_423 : std::string = "aa\z";
-  regex_424 := "aa\$";
-  var_regex_424 : std::string = "aa\$";
-  regex_425 := "aa\Z";
-  var_regex_425 : std::string = "aa\Z";
-  regex_426 := "aa\z";
-  var_regex_426 : std::string = "aa\z";
-  regex_427 := "aa\$";
-  var_regex_427 : std::string = "aa\$";
-  regex_428 := "aa\Z";
-  var_regex_428 : std::string = "aa\Z";
-  regex_429 := "aa\z";
-  var_regex_429 : std::string = "aa\z";
-  regex_430 := "aa\$";
-  var_regex_430 : std::string = "aa\$";
-  regex_431 := "aa\Z";
-  regex_431_mod := "m";
-  var_regex_431 : std::string = "aa\Z";
-  regex_432 := "aa\z";
-  regex_432_mod := "m";
-  var_regex_432 : std::string = "aa\z";
-  regex_433 := "aa\$";
-  regex_433_mod := "m";
-  var_regex_433 : std::string = "aa\$";
-  regex_434 := "aa\Z";
-  regex_434_mod := "m";
-  var_regex_434 : std::string = "aa\Z";
-  regex_435 := "aa\z";
-  regex_435_mod := "m";
-  var_regex_435 : std::string = "aa\z";
-  regex_436 := "aa\$";
-  regex_436_mod := "m";
-  var_regex_436 : std::string = "aa\$";
-  regex_437 := "aa\Z";
-  regex_437_mod := "m";
-  var_regex_437 : std::string = "aa\Z";
-  regex_438 := "aa\z";
-  regex_438_mod := "m";
-  var_regex_438 : std::string = "aa\z";
-  regex_439 := "aa\$";
-  regex_439_mod := "m";
-  var_regex_439 : std::string = "aa\$";
-  regex_440 := "aa\Z";
-  var_regex_440 : std::string = "aa\Z";
-  regex_441 := "aa\z";
-  var_regex_441 : std::string = "aa\z";
-  regex_442 := "aa\$";
-  var_regex_442 : std::string = "aa\$";
-  regex_443 := "aa\Z";
-  var_regex_443 : std::string = "aa\Z";
-  regex_444 := "aa\z";
-  var_regex_444 : std::string = "aa\z";
-  regex_445 := "aa\$";
-  var_regex_445 : std::string = "aa\$";
-  regex_446 := "aa\Z";
-  var_regex_446 : std::string = "aa\Z";
-  regex_447 := "aa\z";
-  var_regex_447 : std::string = "aa\z";
-  regex_448 := "aa\$";
-  var_regex_448 : std::string = "aa\$";
-  regex_449 := "aa\Z";
-  regex_449_mod := "m";
-  var_regex_449 : std::string = "aa\Z";
-  regex_450 := "aa\z";
-  regex_450_mod := "m";
-  var_regex_450 : std::string = "aa\z";
-  regex_451 := "aa\$";
-  regex_451_mod := "m";
-  var_regex_451 : std::string = "aa\$";
-  regex_452 := "aa\Z";
-  regex_452_mod := "m";
-  var_regex_452 : std::string = "aa\Z";
-  regex_453 := "aa\z";
-  regex_453_mod := "m";
-  var_regex_453 : std::string = "aa\z";
-  regex_454 := "aa\$";
-  regex_454_mod := "m";
-  var_regex_454 : std::string = "aa\$";
-  regex_455 := "aa\Z";
-  regex_455_mod := "m";
-  var_regex_455 : std::string = "aa\Z";
-  regex_456 := "aa\z";
-  regex_456_mod := "m";
-  var_regex_456 : std::string = "aa\z";
-  regex_457 := "aa\$";
-  regex_457_mod := "m";
-  var_regex_457 : std::string = "aa\$";
-  regex_458 := "aa\Z";
-  var_regex_458 : std::string = "aa\Z";
-  regex_459 := "aa\z";
-  var_regex_459 : std::string = "aa\z";
-  regex_460 := "aa\$";
-  var_regex_460 : std::string = "aa\$";
-  regex_461 := "aa\Z";
-  var_regex_461 : std::string = "aa\Z";
-  regex_462 := "aa\z";
-  var_regex_462 : std::string = "aa\z";
-  regex_463 := "aa\$";
-  var_regex_463 : std::string = "aa\$";
-  regex_464 := "aa\Z";
-  var_regex_464 : std::string = "aa\Z";
-  regex_465 := "aa\z";
-  var_regex_465 : std::string = "aa\z";
-  regex_466 := "aa\$";
-  var_regex_466 : std::string = "aa\$";
-  regex_467 := "aa\Z";
-  regex_467_mod := "m";
-  var_regex_467 : std::string = "aa\Z";
-  regex_468 := "aa\z";
-  regex_468_mod := "m";
-  var_regex_468 : std::string = "aa\z";
-  regex_469 := "aa\$";
-  regex_469_mod := "m";
-  var_regex_469 : std::string = "aa\$";
-  regex_470 := "aa\Z";
-  regex_470_mod := "m";
-  var_regex_470 : std::string = "aa\Z";
-  regex_471 := "aa\z";
-  regex_471_mod := "m";
-  var_regex_471 : std::string = "aa\z";
-  regex_472 := "aa\$";
-  regex_472_mod := "m";
-  var_regex_472 : std::string = "aa\$";
-  regex_473 := "aa\Z";
-  regex_473_mod := "m";
-  var_regex_473 : std::string = "aa\Z";
-  regex_474 := "aa\z";
-  regex_474_mod := "m";
-  var_regex_474 : std::string = "aa\z";
-  regex_475 := "aa\$";
-  regex_475_mod := "m";
-  var_regex_475 : std::string = "aa\$";
-  regex_476 := "ab\Z";
-  var_regex_476 : std::string = "ab\Z";
-  regex_477 := "ab\z";
-  var_regex_477 : std::string = "ab\z";
-  regex_478 := "ab\$";
-  var_regex_478 : std::string = "ab\$";
-  regex_479 := "ab\Z";
-  var_regex_479 : std::string = "ab\Z";
-  regex_480 := "ab\z";
-  var_regex_480 : std::string = "ab\z";
-  regex_481 := "ab\$";
-  var_regex_481 : std::string = "ab\$";
-  regex_482 := "ab\Z";
-  var_regex_482 : std::string = "ab\Z";
-  regex_483 := "ab\z";
-  var_regex_483 : std::string = "ab\z";
-  regex_484 := "ab\$";
-  var_regex_484 : std::string = "ab\$";
-  regex_485 := "ab\Z";
-  regex_485_mod := "m";
-  var_regex_485 : std::string = "ab\Z";
-  regex_486 := "ab\z";
-  regex_486_mod := "m";
-  var_regex_486 : std::string = "ab\z";
-  regex_487 := "ab\$";
-  regex_487_mod := "m";
-  var_regex_487 : std::string = "ab\$";
-  regex_488 := "ab\Z";
-  regex_488_mod := "m";
-  var_regex_488 : std::string = "ab\Z";
-  regex_489 := "ab\z";
-  regex_489_mod := "m";
-  var_regex_489 : std::string = "ab\z";
-  regex_490 := "ab\$";
-  regex_490_mod := "m";
-  var_regex_490 : std::string = "ab\$";
-  regex_491 := "ab\Z";
-  regex_491_mod := "m";
-  var_regex_491 : std::string = "ab\Z";
-  regex_492 := "ab\z";
-  regex_492_mod := "m";
-  var_regex_492 : std::string = "ab\z";
-  regex_493 := "ab\$";
-  regex_493_mod := "m";
-  var_regex_493 : std::string = "ab\$";
-  regex_494 := "ab\Z";
-  var_regex_494 : std::string = "ab\Z";
-  regex_495 := "ab\z";
-  var_regex_495 : std::string = "ab\z";
-  regex_496 := "ab\$";
-  var_regex_496 : std::string = "ab\$";
-  regex_497 := "ab\Z";
-  var_regex_497 : std::string = "ab\Z";
-  regex_498 := "ab\z";
-  var_regex_498 : std::string = "ab\z";
-  regex_499 := "ab\$";
-  var_regex_499 : std::string = "ab\$";
-  regex_500 := "ab\Z";
-  var_regex_500 : std::string = "ab\Z";
-  regex_501 := "ab\z";
-  var_regex_501 : std::string = "ab\z";
-  regex_502 := "ab\$";
-  var_regex_502 : std::string = "ab\$";
-  regex_503 := "ab\Z";
-  regex_503_mod := "m";
-  var_regex_503 : std::string = "ab\Z";
-  regex_504 := "ab\z";
-  regex_504_mod := "m";
-  var_regex_504 : std::string = "ab\z";
-  regex_505 := "ab\$";
-  regex_505_mod := "m";
-  var_regex_505 : std::string = "ab\$";
-  regex_506 := "ab\Z";
-  regex_506_mod := "m";
-  var_regex_506 : std::string = "ab\Z";
-  regex_507 := "ab\z";
-  regex_507_mod := "m";
-  var_regex_507 : std::string = "ab\z";
-  regex_508 := "ab\$";
-  regex_508_mod := "m";
-  var_regex_508 : std::string = "ab\$";
-  regex_509 := "ab\Z";
-  regex_509_mod := "m";
-  var_regex_509 : std::string = "ab\Z";
-  regex_510 := "ab\z";
-  regex_510_mod := "m";
-  var_regex_510 : std::string = "ab\z";
-  regex_511 := "ab\$";
-  regex_511_mod := "m";
-  var_regex_511 : std::string = "ab\$";
-  regex_512 := "ab\Z";
-  var_regex_512 : std::string = "ab\Z";
-  regex_513 := "ab\z";
-  var_regex_513 : std::string = "ab\z";
-  regex_514 := "ab\$";
-  var_regex_514 : std::string = "ab\$";
-  regex_515 := "ab\Z";
-  var_regex_515 : std::string = "ab\Z";
-  regex_516 := "ab\z";
-  var_regex_516 : std::string = "ab\z";
-  regex_517 := "ab\$";
-  var_regex_517 : std::string = "ab\$";
-  regex_518 := "ab\Z";
-  var_regex_518 : std::string = "ab\Z";
-  regex_519 := "ab\z";
-  var_regex_519 : std::string = "ab\z";
-  regex_520 := "ab\$";
-  var_regex_520 : std::string = "ab\$";
-  regex_521 := "ab\Z";
-  regex_521_mod := "m";
-  var_regex_521 : std::string = "ab\Z";
-  regex_522 := "ab\z";
-  regex_522_mod := "m";
-  var_regex_522 : std::string = "ab\z";
-  regex_523 := "ab\$";
-  regex_523_mod := "m";
-  var_regex_523 : std::string = "ab\$";
-  regex_524 := "ab\Z";
-  regex_524_mod := "m";
-  var_regex_524 : std::string = "ab\Z";
-  regex_525 := "ab\z";
-  regex_525_mod := "m";
-  var_regex_525 : std::string = "ab\z";
-  regex_526 := "ab\$";
-  regex_526_mod := "m";
-  var_regex_526 : std::string = "ab\$";
-  regex_527 := "ab\Z";
-  regex_527_mod := "m";
-  var_regex_527 : std::string = "ab\Z";
-  regex_528 := "ab\z";
-  regex_528_mod := "m";
-  var_regex_528 : std::string = "ab\z";
-  regex_529 := "ab\$";
-  regex_529_mod := "m";
-  var_regex_529 : std::string = "ab\$";
-  regex_530 := "abb\Z";
-  var_regex_530 : std::string = "abb\Z";
-  regex_531 := "abb\z";
-  var_regex_531 : std::string = "abb\z";
-  regex_532 := "abb\$";
-  var_regex_532 : std::string = "abb\$";
-  regex_533 := "abb\Z";
-  var_regex_533 : std::string = "abb\Z";
-  regex_534 := "abb\z";
-  var_regex_534 : std::string = "abb\z";
-  regex_535 := "abb\$";
-  var_regex_535 : std::string = "abb\$";
-  regex_536 := "abb\Z";
-  var_regex_536 : std::string = "abb\Z";
-  regex_537 := "abb\z";
-  var_regex_537 : std::string = "abb\z";
-  regex_538 := "abb\$";
-  var_regex_538 : std::string = "abb\$";
-  regex_539 := "abb\Z";
-  regex_539_mod := "m";
-  var_regex_539 : std::string = "abb\Z";
-  regex_540 := "abb\z";
-  regex_540_mod := "m";
-  var_regex_540 : std::string = "abb\z";
-  regex_541 := "abb\$";
-  regex_541_mod := "m";
-  var_regex_541 : std::string = "abb\$";
-  regex_542 := "abb\Z";
-  regex_542_mod := "m";
-  var_regex_542 : std::string = "abb\Z";
-  regex_543 := "abb\z";
-  regex_543_mod := "m";
-  var_regex_543 : std::string = "abb\z";
-  regex_544 := "abb\$";
-  regex_544_mod := "m";
-  var_regex_544 : std::string = "abb\$";
-  regex_545 := "abb\Z";
-  regex_545_mod := "m";
-  var_regex_545 : std::string = "abb\Z";
-  regex_546 := "abb\z";
-  regex_546_mod := "m";
-  var_regex_546 : std::string = "abb\z";
-  regex_547 := "abb\$";
-  regex_547_mod := "m";
-  var_regex_547 : std::string = "abb\$";
-  regex_548 := "abb\Z";
-  var_regex_548 : std::string = "abb\Z";
-  regex_549 := "abb\z";
-  var_regex_549 : std::string = "abb\z";
-  regex_550 := "abb\$";
-  var_regex_550 : std::string = "abb\$";
-  regex_551 := "abb\Z";
-  var_regex_551 : std::string = "abb\Z";
-  regex_552 := "abb\z";
-  var_regex_552 : std::string = "abb\z";
-  regex_553 := "abb\$";
-  var_regex_553 : std::string = "abb\$";
-  regex_554 := "abb\Z";
-  var_regex_554 : std::string = "abb\Z";
-  regex_555 := "abb\z";
-  var_regex_555 : std::string = "abb\z";
-  regex_556 := "abb\$";
-  var_regex_556 : std::string = "abb\$";
-  regex_557 := "abb\Z";
-  regex_557_mod := "m";
-  var_regex_557 : std::string = "abb\Z";
-  regex_558 := "abb\z";
-  regex_558_mod := "m";
-  var_regex_558 : std::string = "abb\z";
-  regex_559 := "abb\$";
-  regex_559_mod := "m";
-  var_regex_559 : std::string = "abb\$";
-  regex_560 := "abb\Z";
-  regex_560_mod := "m";
-  var_regex_560 : std::string = "abb\Z";
-  regex_561 := "abb\z";
-  regex_561_mod := "m";
-  var_regex_561 : std::string = "abb\z";
-  regex_562 := "abb\$";
-  regex_562_mod := "m";
-  var_regex_562 : std::string = "abb\$";
-  regex_563 := "abb\Z";
-  regex_563_mod := "m";
-  var_regex_563 : std::string = "abb\Z";
-  regex_564 := "abb\z";
-  regex_564_mod := "m";
-  var_regex_564 : std::string = "abb\z";
-  regex_565 := "abb\$";
-  regex_565_mod := "m";
-  var_regex_565 : std::string = "abb\$";
-  regex_566 := "abb\Z";
-  var_regex_566 : std::string = "abb\Z";
-  regex_567 := "abb\z";
-  var_regex_567 : std::string = "abb\z";
-  regex_568 := "abb\$";
-  var_regex_568 : std::string = "abb\$";
-  regex_569 := "abb\Z";
-  var_regex_569 : std::string = "abb\Z";
-  regex_570 := "abb\z";
-  var_regex_570 : std::string = "abb\z";
-  regex_571 := "abb\$";
-  var_regex_571 : std::string = "abb\$";
-  regex_572 := "abb\Z";
-  var_regex_572 : std::string = "abb\Z";
-  regex_573 := "abb\z";
-  var_regex_573 : std::string = "abb\z";
-  regex_574 := "abb\$";
-  var_regex_574 : std::string = "abb\$";
-  regex_575 := "abb\Z";
-  regex_575_mod := "m";
-  var_regex_575 : std::string = "abb\Z";
-  regex_576 := "abb\z";
-  regex_576_mod := "m";
-  var_regex_576 : std::string = "abb\z";
-  regex_577 := "abb\$";
-  regex_577_mod := "m";
-  var_regex_577 : std::string = "abb\$";
-  regex_578 := "abb\Z";
-  regex_578_mod := "m";
-  var_regex_578 : std::string = "abb\Z";
-  regex_579 := "abb\z";
-  regex_579_mod := "m";
-  var_regex_579 : std::string = "abb\z";
-  regex_580 := "abb\$";
-  regex_580_mod := "m";
-  var_regex_580 : std::string = "abb\$";
-  regex_581 := "abb\Z";
-  regex_581_mod := "m";
-  var_regex_581 : std::string = "abb\Z";
-  regex_582 := "abb\z";
-  regex_582_mod := "m";
-  var_regex_582 : std::string = "abb\z";
-  regex_583 := "abb\$";
-  regex_583_mod := "m";
-  var_regex_583 : std::string = "abb\$";
-  regex_584 := "\Aa\$";
-  regex_584_mod := "m";
-  var_regex_584 : std::string = "\Aa\$";
-  regex_585 := "(?i:.[b].)";
-  var_regex_585 : std::string = "(?i:.[b].)";
-  regex_586 := "(?i:\N[b]\N)";
-  var_regex_586 : std::string = "(?i:\\N[b]\\N)";
-  regex_587 := "\N {1}";
-  regex_587_mod := "x";
-  var_regex_587 : std::string = "\\N {1}";
-  regex_588 := "\N {1}";
-  regex_588_mod := "x";
-  var_regex_588 : std::string = "\\N {1}";
-  regex_589 := "\N {1}";
-  regex_589_mod := "x";
-  var_regex_589 : std::string = "\\N {1}";
-  regex_590 := "\N {3,4}";
-  regex_590_mod := "x";
-  var_regex_590 : std::string = "\\N {3,4}";
-  regex_591 := "\N {3,4}";
-  regex_591_mod := "x";
-  var_regex_591 : std::string = "\\N {3,4}";
-  regex_592 := "\N {3,4}";
-  regex_592_mod := "x";
-  var_regex_592 : std::string = "\\N {3,4}";
-  regex_593 := "a\N c";
-  regex_593_mod := "x";
-  var_regex_593 : std::string = "a\\N c";
-  regex_594 := "a\N *c";
-  regex_594_mod := "x";
-  var_regex_594 : std::string = "a\\N *c";
-  regex_595 := "a\N *c";
-  regex_595_mod := "x";
-  var_regex_595 : std::string = "a\\N *c";
-  regex_596 := "[a b]";
-  regex_596_mod := "x";
-  var_regex_596 : std::string = "[a b]";
-  regex_597 := "[a b]";
-  regex_597_mod := "xx";
-  var_regex_597 : std::string = "[a b]";
-  regex_598 := "[a\ b]";
-  regex_598_mod := "xx";
-  var_regex_598 : std::string = "[a\ b]";
-  regex_599 := "[ ^ a b ]";
-  regex_599_mod := "xx";
-  var_regex_599 : std::string = "[ ^ a b ]";
-  regex_600 := "[ ^ a b ]";
-  regex_600_mod := "xx";
-  var_regex_600 : std::string = "[ ^ a b ]";
-  regex_601 := "[ ^ a b ]";
-  regex_601_mod := "xx";
-  var_regex_601 : std::string = "[ ^ a b ]";
-  regex_602 := "(?x:[a b])";
-  regex_602_mod := "xx";
-  var_regex_602 : std::string = "(?x:[a b])";
-  regex_603 := "(?xx:[a b])";
-  regex_603_mod := "x";
-  var_regex_603 : std::string = "(?xx:[a b])";
-  regex_604 := "(?x)[a b]";
-  regex_604_mod := "xx";
-  var_regex_604 : std::string = "(?x)[a b]";
-  regex_605 := "(?xx)[a b]";
-  regex_605_mod := "x";
-  var_regex_605 : std::string = "(?xx)[a b]";
-  regex_606 := "(?-x:[a b])";
-  regex_606_mod := "xx";
-  var_regex_606 : std::string = "(?-x:[a b])";
-  regex_607 := "\N {1}";
-  regex_607_mod := "x";
-  var_regex_607 : std::string = "\\N {1}";
-  regex_608 := "\N {1}";
-  regex_608_mod := "x";
-  var_regex_608 : std::string = "\\N {1}";
-  regex_609 := "\N {1}";
-  regex_609_mod := "x";
-  var_regex_609 : std::string = "\\N {1}";
-  regex_610 := "\N {3,4}";
-  regex_610_mod := "x";
-  var_regex_610 : std::string = "\\N {3,4}";
-  regex_611 := "\N {3,4}";
-  regex_611_mod := "x";
-  var_regex_611 : std::string = "\\N {3,4}";
-  regex_612 := "\N {3,4}";
-  regex_612_mod := "x";
-  var_regex_612 : std::string = "\\N {3,4}";
-  regex_613 := "a\N c";
-  regex_613_mod := "x";
-  var_regex_613 : std::string = "a\\N c";
-  regex_614 := "a\N *c";
-  regex_614_mod := "x";
-  var_regex_614 : std::string = "a\\N *c";
-  regex_615 := "a\N *c";
-  regex_615_mod := "x";
-  var_regex_615 : std::string = "a\\N *c";
-  regex_616 := "[#]";
-  var_regex_616 : std::string = "[#]";
-  regex_617 := "[#]b";
-  var_regex_617 : std::string = "[#]b";
-  regex_618 := "[#]";
-  regex_618_mod := "x";
-  var_regex_618 : std::string = "[#]";
-  regex_619 := "[#]b";
-  regex_619_mod := "x";
-  var_regex_619 : std::string = "[#]b";
-  regex_620 := "(?'n'foo) \g{n}";
-  var_regex_620 : std::string = "(?'n'foo) \g{n}";
-  regex_621 := "(?'n'foo) \g{ n }";
-  var_regex_621 : std::string = "(?'n'foo) \g{ n }";
-  regex_622 := "(?'n'foo) \g{n}";
-  var_regex_622 : std::string = "(?'n'foo) \g{n}";
-  regex_623 := "(?foo) \g{n}";
-  var_regex_623 : std::string = "(?foo) \g{n}";
-  regex_624 := "(?foo) \g{n}";
-  var_regex_624 : std::string = "(?foo) \g{n}";
-  regex_625 := "(?as) (\w+) \g{as} (\w+)";
-  var_regex_625 : std::string = "(?as) (\w+) \g{as} (\w+)";
-  regex_626 := "(?'n'foo) \k";
-  var_regex_626 : std::string = "(?'n'foo) \k";
-  regex_627 := "(?'n'foo) \k";
-  var_regex_627 : std::string = "(?'n'foo) \k";
-  regex_628 := "(?foo) \k'n'";
-  var_regex_628 : std::string = "(?foo) \k'n'";
-  regex_629 := "(?foo) \k'n'";
-  var_regex_629 : std::string = "(?foo) \k'n'";
-  regex_630 := "(?'a1'foo) \k'a1'";
-  var_regex_630 : std::string = "(?'a1'foo) \k'a1'";
-  regex_631 := "(?foo) \k";
-  var_regex_631 : std::string = "(?foo) \k";
-  regex_632 := "(?'_'foo) \k'_'";
-  var_regex_632 : std::string = "(?'_'foo) \k'_'";
-  regex_633 := "(?<_>foo) \k<_>";
-  var_regex_633 : std::string = "(?<_>foo) \k<_>";
-  regex_634 := "(?'_0_'foo) \k'_0_'";
-  var_regex_634 : std::string = "(?'_0_'foo) \k'_0_'";
-  regex_635 := "(?<_0_>foo) \k<_0_>";
-  var_regex_635 : std::string = "(?<_0_>foo) \k<_0_>";
-  regex_636 := "(?as) (\w+) \k (\w+)";
-  var_regex_636 : std::string = "(?as) (\w+) \k (\w+)";
-  regex_637 := "(?as) (\w+) \k{as} (\w+)";
-  var_regex_637 : std::string = "(?as) (\w+) \k{as} (\w+)";
-  regex_638 := "(?as) (\w+) \k'as' (\w+)";
-  var_regex_638 : std::string = "(?as) (\w+) \k'as' (\w+)";
-  regex_639 := "(?as) (\w+) \k{ as } (\w+)";
-  var_regex_639 : std::string = "(?as) (\w+) \k{ as } (\w+)";
-  regex_640 := "^a(?#xxx){3}c";
-  var_regex_640 : std::string = "^a(?#xxx){3}c";
-  regex_641 := "^a (?#xxx) (?#yyy) {3}c";
-  regex_641_mod := "x";
-  var_regex_641 : std::string = "^a (?#xxx) (?#yyy) {3}c";
-  regex_642 := "(?|(a))";
-  var_regex_642 : std::string = "(?|(a))";
-  regex_643 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  var_regex_643 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  regex_644 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  var_regex_644 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  regex_645 := "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  var_regex_645 : std::string = "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)";
-  regex_646 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_646 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_647 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_647 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_648 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_648 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_649 := "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  var_regex_649 : std::string = "(?|(?|(a)|(b))|(?|(c)|(d)))";
-  regex_650 := "(.)(?|(.)(.)x|(.)d)(.)";
-  var_regex_650 : std::string = "(.)(?|(.)(.)x|(.)d)(.)";
-  regex_651 := "(\N)(?|(\N)(\N)x|(\N)d)(\N)";
-  var_regex_651 : std::string = "(\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N)";
-  regex_652 := "(?|(?x))";
-  var_regex_652 : std::string = "(?|(?x))";
-  regex_653 := "(?|(?x)|(?y))";
-  var_regex_653 : std::string = "(?|(?x)|(?y))";
-  regex_654 := "(?|(?y)|(?x))";
-  var_regex_654 : std::string = "(?|(?y)|(?x))";
-  regex_655 := "(?)(?|(?x))";
-  var_regex_655 : std::string = "(?)(?|(?x))";
-  regex_656 := "foo\Kbar";
-  var_regex_656 : std::string = "foo\Kbar";
-  regex_657 := "foo\t\n\r\f\a\ebar";
-  var_regex_657 : std::string = "foo\t\n\r\f\a\ebar";
-  regex_658 := "(foo)";
-  regex_658_mod := "n";
-  var_regex_658 : std::string = "(foo)";
-  regex_659 := "(?-n)(foo)(?n)(bar)";
-  regex_659_mod := "n";
-  var_regex_659 : std::string = "(?-n)(foo)(?n)(bar)";
-  regex_660 := "(?-n:(foo)(?n:(bar)))";
-  regex_660_mod := "n";
-  var_regex_660 : std::string = "(?-n:(foo)(?n:(bar)))";
-  regex_661 := "foo # Match foo";
-  regex_661_mod := "x";
-  var_regex_661 : std::string = "foo # Match foo";
-  regex_662 := "\x41\x42";
-  var_regex_662 : std::string = "\x41\x42";
-  regex_663 := "\101\o{102}";
-  var_regex_663 : std::string = "\101\o{102}";
-  run: (this) = {
-    std::cout << "Running perl_tests_general:"<< std::endl;
-    test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
-    test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
-    test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
-    test(regex_3, 3, "abc", "xbc", "n", "-", "-");
-    test(regex_4, 4, "abc", "axc", "n", "-", "-");
-    test(regex_5, 5, "abc", "abx", "n", "-", "-");
-    test(regex_6, 6, "abc", "xabcy", "y", "$&", "abc");
-    test(regex_7, 7, "abc", "xabcy", "y", "$-[0]", "1");
-    test(regex_8, 8, "abc", "xabcy", "y", "$+[0]", "4");
-    test(regex_9, 9, "abc", "ababc", "y", "$&", "abc");
-    test(regex_10, 10, "abc", "ababc", "y", "$-[0]", "2");
-    test(regex_11, 11, "abc", "ababc", "y", "$+[0]", "5");
-    test(regex_12, 12, "ab*c", "abc", "y", "$&", "abc");
-    test(regex_13, 13, "ab*c", "abc", "y", "$-[0]", "0");
-    test(regex_14, 14, "ab*c", "abc", "y", "$+[0]", "3");
-    test(regex_15, 15, "ab*bc", "abc", "y", "$&", "abc");
-    test(regex_16, 16, "ab*bc", "abc", "y", "$-[0]", "0");
-    test(regex_17, 17, "ab*bc", "abc", "y", "$+[0]", "3");
-    test(regex_18, 18, "ab*bc", "abbc", "y", "$&", "abbc");
-    test(regex_19, 19, "ab*bc", "abbc", "y", "$-[0]", "0");
-    test(regex_20, 20, "ab*bc", "abbc", "y", "$+[0]", "4");
-    test(regex_21, 21, "ab*bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_22, 22, "ab*bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_23, 23, "ab*bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_24, 24, ".{1}", "abbbbc", "y", "$&", "a");
-    test(regex_25, 25, ".{1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_26, 26, ".{1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_27, 27, ".{3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_28, 28, ".{3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_29, 29, ".{3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_30, 30, "\\\\N{1}", "abbbbc", "y", "$&", "a");
-    test(regex_31, 31, "\\\\N{1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_32, 32, "\\\\N{1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_33, 33, "\\\\N{3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_34, 34, "\\\\N{3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_35, 35, "\\\\N{3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_36, 36, "\\\\N{ 3 , 4 }", "abbbbc", "y", "$+[0]", "4");
-    test(regex_37, 37, "ab{0,}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_38, 38, "ab{0,}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_39, 39, "ab{0,}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_40, 40, "ab+bc", "abbc", "y", "$&", "abbc");
-    test(regex_41, 41, "ab+bc", "abbc", "y", "$-[0]", "0");
-    test(regex_42, 42, "ab+bc", "abbc", "y", "$+[0]", "4");
-    test(regex_43, 43, "ab+bc", "abc", "n", "-", "-");
-    test(regex_44, 44, "ab+bc", "abq", "n", "-", "-");
-    test(regex_45, 45, "ab{1,}bc", "abq", "n", "-", "-");
-    test(regex_46, 46, "ab+bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_47, 47, "ab+bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_48, 48, "ab+bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_49, 49, "ab{1,}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_50, 50, "ab{1,}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_51, 51, "ab{1,}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_52, 52, "ab{1,3}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_53, 53, "ab{1,3}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_54, 54, "ab{1,3}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_55, 55, "ab{3,4}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_56, 56, "ab{3,4}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_57, 57, "ab{3,4}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_58, 58, "ab{4,5}bc", "abbbbc", "n", "-", "-");
-    test(regex_59, 59, "ab?bc", "abbc", "y", "$&", "abbc");
-    test(regex_60, 60, "ab?bc", "abc", "y", "$&", "abc");
-    test(regex_61, 61, "ab{0,1}bc", "abc", "y", "$&", "abc");
-    test(regex_62, 62, "ab?bc", "abbbbc", "n", "-", "-");
-    test(regex_63, 63, "ab?c", "abc", "y", "$&", "abc");
-    test(regex_64, 64, "ab{0,1}c", "abc", "y", "$&", "abc");
-    test(regex_65, 65, "^abc\\$", "abc", "y", "$&", "abc");
-    test(regex_66, 66, "^abc\\$", "abcc", "n", "-", "-");
-    test(regex_67, 67, "^abc", "abcc", "y", "$&", "abc");
-    test(regex_68, 68, "^abc\\$", "aabc", "n", "-", "-");
-    test(regex_69, 69, "abc\\$", "aabc", "y", "$&", "abc");
-    test(regex_70, 70, "abc\\$", "aabcd", "n", "-", "-");
-    test(regex_71, 71, "^", "abc", "y", "$&", "");
-    test(regex_72, 72, "\\$", "abc", "y", "$&", "");
-    test(regex_73, 73, "a.c", "abc", "y", "$&", "abc");
-    test(regex_74, 74, "a.c", "axc", "y", "$&", "axc");
-    test(regex_75, 75, "a\\\\Nc", "abc", "y", "$&", "abc");
-    test(regex_76, 76, "a.*c", "axyzc", "y", "$&", "axyzc");
-    test(regex_77, 77, "a\\\\N*c", "axyzc", "y", "$&", "axyzc");
-    test(regex_78, 78, "a.*c", "axyzd", "n", "-", "-");
-    test(regex_79, 79, "a\\\\N*c", "axyzd", "n", "-", "-");
-    test(regex_80, 80, "a[bc]d", "abc", "n", "-", "-");
-    test(regex_81, 81, "a[bc]d", "abd", "y", "$&", "abd");
-    test(regex_82, 82, "a[b]d", "abd", "y", "$&", "abd");
-    test(regex_83, 83, "[a][b][d]", "abd", "y", "$&", "abd");
-    test(regex_84, 84, ".[b].", "abd", "y", "$&", "abd");
-    test(regex_85, 85, ".[b].", "aBd", "n", "-", "-");
-    test(regex_86, 86, "a[b-d]e", "abd", "n", "-", "-");
-    test(regex_87, 87, "a[b-d]e", "ace", "y", "$&", "ace");
-    test(regex_88, 88, "a[b-d]", "aac", "y", "$&", "ac");
-    test(regex_89, 89, "a[-b]", "a-", "y", "$&", "a-");
-    test(regex_90, 90, "a[b-]", "a-", "y", "$&", "a-");
-    test(regex_91, 91, "a]", "a]", "y", "$&", "a]");
-    test(regex_92, 92, "a[]]b", "a]b", "y", "$&", "a]b");
-    test(regex_93, 93, "a[^bc]d", "aed", "y", "$&", "aed");
-    test(regex_94, 94, "a[^bc]d", "abd", "n", "-", "-");
-    test(regex_95, 95, "a[^-b]c", "adc", "y", "$&", "adc");
-    test(regex_96, 96, "a[^-b]c", "a-c", "n", "-", "-");
-    test(regex_97, 97, "a[^]b]c", "a]c", "n", "-", "-");
-    test(regex_98, 98, "a[^]b]c", "adc", "y", "$&", "adc");
-    test(regex_99, 99, "\\ba\\b", "a-", "y", "-", "-");
-    test(regex_100, 100, "\\ba\\b", "-a", "y", "-", "-");
-    test(regex_101, 101, "\\ba\\b", "-a-", "y", "-", "-");
-    test(regex_102, 102, "\\by\\b", "xy", "n", "-", "-");
-    test(regex_103, 103, "\\by\\b", "yz", "n", "-", "-");
-    test(regex_104, 104, "\\by\\b", "xyz", "n", "-", "-");
-    test(regex_105, 105, "\\Ba\\B", "a-", "n", "-", "-");
-    test(regex_106, 106, "\\Ba\\B", "-a", "n", "-", "-");
-    test(regex_107, 107, "\\Ba\\B", "-a-", "n", "-", "-");
-    test(regex_108, 108, "\\By\\b", "xy", "y", "-", "-");
-    test(regex_109, 109, "\\By\\b", "xy", "y", "$-[0]", "1");
-    test(regex_110, 110, "\\By\\b", "xy", "y", "$+[0]", "2");
-    test(regex_111, 111, "\\By\\b", "xy", "y", "-", "-");
-    test(regex_112, 112, "\\by\\B", "yz", "y", "-", "-");
-    test(regex_113, 113, "\\By\\B", "xyz", "y", "-", "-");
-    test(regex_114, 114, "\\b", "", "n", "-", "-");
-    test(regex_115, 115, "\\B", "", "y", "-", "-");
-    test(regex_116, 116, "\\w", "a", "y", "-", "-");
-    test(regex_117, 117, "\\w", "-", "n", "-", "-");
-    test(regex_118, 118, "\\W", "a", "n", "-", "-");
-    test(regex_119, 119, "\\W", "-", "y", "-", "-");
-    test(regex_120, 120, "a\\sb", "a b", "y", "-", "-");
-    test(regex_121, 121, "a\\sb", "a-b", "n", "-", "-");
-    test(regex_122, 122, "a\\Sb", "a b", "n", "-", "-");
-    test(regex_123, 123, "a\\Sb", "a-b", "y", "-", "-");
-    test(regex_124, 124, "\\d", "1", "y", "-", "-");
-    test(regex_125, 125, "\\d", "-", "n", "-", "-");
-    test(regex_126, 126, "\\D", "1", "n", "-", "-");
-    test(regex_127, 127, "\\D", "-", "y", "-", "-");
-    test(regex_128, 128, "[\\w]", "a", "y", "-", "-");
-    test(regex_129, 129, "[\\w]", "-", "n", "-", "-");
-    test(regex_130, 130, "[\\W]", "a", "n", "-", "-");
-    test(regex_131, 131, "[\\W]", "-", "y", "-", "-");
-    test(regex_132, 132, "a[\\s]b", "a b", "y", "-", "-");
-    test(regex_133, 133, "a[\\s]b", "a-b", "n", "-", "-");
-    test(regex_134, 134, "a[\\S]b", "a b", "n", "-", "-");
-    test(regex_135, 135, "a[\\S]b", "a-b", "y", "-", "-");
-    test(regex_136, 136, "[\\d]", "1", "y", "-", "-");
-    test(regex_137, 137, "[\\d]", "-", "n", "-", "-");
-    test(regex_138, 138, "[\\D]", "1", "n", "-", "-");
-    test(regex_139, 139, "[\\D]", "-", "y", "-", "-");
-    test(regex_140, 140, "ab|cd", "abc", "y", "$&", "ab");
-    test(regex_141, 141, "ab|cd", "abcd", "y", "$&", "ab");
-    test(regex_142, 142, "()ef", "def", "y", "$&-$1", "ef-");
-    test(regex_143, 143, "()ef", "def", "y", "$-[0]", "1");
-    test(regex_144, 144, "()ef", "def", "y", "$+[0]", "3");
-    test(regex_145, 145, "()ef", "def", "y", "$-[1]", "1");
-    test(regex_146, 146, "()ef", "def", "y", "$+[1]", "1");
-    test(regex_147, 147, "\\$b", "b", "n", "-", "-");
-    test(regex_148, 148, "a\\(b", "a(b", "y", "$&-$1", "a(b-");
-    test(regex_149, 149, "a\\(*b", "ab", "y", "$&", "ab");
-    test(regex_150, 150, "a\\(*b", "a((b", "y", "$&", "a((b");
-    test(regex_151, 151, "a\\\\b", "a\\b", "y", "$&", "a\\b");
-    test(regex_152, 152, "((a))", "abc", "y", "$&-$1-$2", "a-a-a");
-    test(regex_153, 153, "((a))", "abc", "y", "$-[0]-$-[1]-$-[2]", "0-0-0");
-    test(regex_154, 154, "((a))", "abc", "y", "$+[0]-$+[1]-$+[2]", "1-1-1");
-    test(regex_155, 155, "(foo)(\\g-2)", "foofoo", "y", "$1-$2", "foo-foo");
-    test(regex_156, 156, "(foo)(\\g-2)(foo)(\\g-2)", "foofoofoofoo", "y", "$1-$2-$3-$4", "foo-foo-foo-foo");
-    test(regex_157, 157, "(([abc]+) \\g-1)(([abc]+) \\g{-1})", "abc abccba cba", "y", "$2-$4", "abc-cba");
-    test(regex_158, 158, "(a)(b)(c)\\g1\\g2\\g3", "abcabc", "y", "$1$2$3", "abc");
-    test(regex_159, 159, "abc", "ABC", "y", "$&", "ABC");
-    test(regex_160, 160, "abc", "XBC", "n", "-", "-");
-    test(regex_161, 161, "abc", "AXC", "n", "-", "-");
-    test(regex_162, 162, "abc", "ABX", "n", "-", "-");
-    test(regex_163, 163, "abc", "XABCY", "y", "$&", "ABC");
-    test(regex_164, 164, "abc", "ABABC", "y", "$&", "ABC");
-    test(regex_165, 165, "ab*c", "ABC", "y", "$&", "ABC");
-    test(regex_166, 166, "ab*bc", "ABC", "y", "$&", "ABC");
-    test(regex_167, 167, "ab*bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_168, 168, "ab*?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_169, 169, "ab{0,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_170, 170, "ab+?bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_171, 171, "ab+bc", "ABC", "n", "-", "-");
-    test(regex_172, 172, "ab+bc", "ABQ", "n", "-", "-");
-    test(regex_173, 173, "ab{1,}bc", "ABQ", "n", "-", "-");
-    test(regex_174, 174, "ab+bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_175, 175, "ab{1,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_176, 176, "ab{1,3}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_177, 177, "ab{3,4}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_178, 178, "ab{4,5}?bc", "ABBBBC", "n", "-", "-");
-    test(regex_179, 179, "ab??bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_180, 180, "ab??bc", "ABC", "y", "$&", "ABC");
-    test(regex_181, 181, "ab{0,1}?bc", "ABC", "y", "$&", "ABC");
-    test(regex_182, 182, "ab??bc", "ABBBBC", "n", "-", "-");
-    test(regex_183, 183, "ab??c", "ABC", "y", "$&", "ABC");
-    test(regex_184, 184, "ab{0,1}?c", "ABC", "y", "$&", "ABC");
-    test(regex_185, 185, "^abc\\$", "ABC", "y", "$&", "ABC");
-    test(regex_186, 186, "^abc\\$", "ABCC", "n", "-", "-");
-    test(regex_187, 187, "^abc", "ABCC", "y", "$&", "ABC");
-    test(regex_188, 188, "^abc\\$", "AABC", "n", "-", "-");
-    test(regex_189, 189, "abc\\$", "AABC", "y", "$&", "ABC");
-    test(regex_190, 190, "^", "ABC", "y", "$&", "");
-    test(regex_191, 191, "\\$", "ABC", "y", "$&", "");
-    test(regex_192, 192, "a.c", "ABC", "y", "$&", "ABC");
-    test(regex_193, 193, "a.c", "AXC", "y", "$&", "AXC");
-    test(regex_194, 194, "a\\\\Nc", "ABC", "y", "$&", "ABC");
-    test(regex_195, 195, "a.*?c", "AXYZC", "y", "$&", "AXYZC");
-    test(regex_196, 196, "a.*c", "AXYZD", "n", "-", "-");
-    test(regex_197, 197, "a[bc]d", "ABC", "n", "-", "-");
-    test(regex_198, 198, "a[bc]d", "ABD", "y", "$&", "ABD");
-    test(regex_199, 199, "a[b-d]e", "ABD", "n", "-", "-");
-    test(regex_200, 200, "a[b-d]e", "ACE", "y", "$&", "ACE");
-    test(regex_201, 201, "a[b-d]", "AAC", "y", "$&", "AC");
-    test(regex_202, 202, "a[-b]", "A-", "y", "$&", "A-");
-    test(regex_203, 203, "a[b-]", "A-", "y", "$&", "A-");
-    test(regex_204, 204, "a]", "A]", "y", "$&", "A]");
-    test(regex_205, 205, "a[]]b", "A]B", "y", "$&", "A]B");
-    test(regex_206, 206, "a[^bc]d", "AED", "y", "$&", "AED");
-    test(regex_207, 207, "a[^bc]d", "ABD", "n", "-", "-");
-    test(regex_208, 208, "a[^-b]c", "ADC", "y", "$&", "ADC");
-    test(regex_209, 209, "a[^-b]c", "A-C", "n", "-", "-");
-    test(regex_210, 210, "a[^]b]c", "A]C", "n", "-", "-");
-    test(regex_211, 211, "a[^]b]c", "ADC", "y", "$&", "ADC");
-    test(regex_212, 212, "ab|cd", "ABC", "y", "$&", "AB");
-    test(regex_213, 213, "ab|cd", "ABCD", "y", "$&", "AB");
-    test(regex_214, 214, "()ef", "DEF", "y", "$&-$1", "EF-");
-    test(regex_215, 215, "\\$b", "B", "n", "-", "-");
-    test(regex_216, 216, "a\\(b", "A(B", "y", "$&-$1", "A(B-");
-    test(regex_217, 217, "a\\(*b", "AB", "y", "$&", "AB");
-    test(regex_218, 218, "a\\(*b", "A((B", "y", "$&", "A((B");
-    test(regex_219, 219, "a\\\\b", "A\\B", "y", "$&", "A\\B");
-    test(regex_220, 220, "((a))", "ABC", "y", "$&-$1-$2", "A-A-A");
-    test(regex_221, 221, "(a)b(c)", "ABC", "y", "$&-$1-$2", "ABC-A-C");
-    test(regex_222, 222, "a+b+c", "AABBABC", "y", "$&", "ABC");
-    test(regex_223, 223, "a{1,}b{1,}c", "AABBABC", "y", "$&", "ABC");
-    test(regex_224, 224, "a.+?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_225, 225, "a.*?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_226, 226, "a.{0,5}?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_227, 227, "(a+|b)*", "AB", "y", "$&-$1", "AB-B");
-    test(regex_228, 228, "(a+|b){0,}", "AB", "y", "$&-$1", "AB-B");
-    test(regex_229, 229, "(a+|b)+", "AB", "y", "$&-$1", "AB-B");
-    test(regex_230, 230, "(a+|b){1,}", "AB", "y", "$&-$1", "AB-B");
-    test(regex_231, 231, "(a+|b)?", "AB", "y", "$&-$1", "A-A");
-    test(regex_232, 232, "(a+|b){0,1}", "AB", "y", "$&-$1", "A-A");
-    test(regex_233, 233, "(a+|b){0,1}?", "AB", "y", "$&-$1", "-");
-    test(regex_234, 234, "[^ab]*", "CDE", "y", "$&", "CDE");
-    test(regex_235, 235, "abc", "", "n", "-", "-");
-    test(regex_236, 236, "a*", "", "y", "$&", "");
-    test(regex_237, 237, "([abc])*d", "ABBBCD", "y", "$&-$1", "ABBBCD-C");
-    test(regex_238, 238, "([abc])*bcd", "ABCD", "y", "$&-$1", "ABCD-A");
-    test(regex_239, 239, "a|b|c|d|e", "E", "y", "$&", "E");
-    test(regex_240, 240, "(a|b|c|d|e)f", "EF", "y", "$&-$1", "EF-E");
-    test(regex_241, 241, "abcd*efg", "ABCDEFG", "y", "$&", "ABCDEFG");
-    test(regex_242, 242, "ab*", "XABYABBBZ", "y", "$&", "AB");
-    test(regex_243, 243, "ab*", "XAYABBBZ", "y", "$&", "A");
-    test(regex_244, 244, "(ab|cd)e", "ABCDE", "y", "$&-$1", "CDE-CD");
-    test(regex_245, 245, "[abhgefdc]ij", "HIJ", "y", "$&", "HIJ");
-    test(regex_246, 246, "^(ab|cd)e", "ABCDE", "n", "x$1y", "XY");
-    test(regex_247, 247, "(abc|)ef", "ABCDEF", "y", "$&-$1", "EF-");
-    test(regex_248, 248, "(a|b)c*d", "ABCD", "y", "$&-$1", "BCD-B");
-    test(regex_249, 249, "(ab|ab*)bc", "ABC", "y", "$&-$1", "ABC-A");
-    test(regex_250, 250, "a([bc]*)c*", "ABC", "y", "$&-$1", "ABC-BC");
-    test(regex_251, 251, "a([bc]*)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
-    test(regex_252, 252, "a([bc]+)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
-    test(regex_253, 253, "a([bc]*)(c+d)", "ABCD", "y", "$&-$1-$2", "ABCD-B-CD");
-    test(regex_254, 254, "a[bcd]*dcdcde", "ADCDCDE", "y", "$&", "ADCDCDE");
-    test(regex_255, 255, "a[bcd]+dcdcde", "ADCDCDE", "n", "-", "-");
-    test(regex_256, 256, "(ab|a)b*c", "ABC", "y", "$&-$1", "ABC-AB");
-    test(regex_257, 257, "((a)(b)c)(d)", "ABCD", "y", "$1-$2-$3-$4", "ABC-A-B-D");
-    test(regex_258, 258, "[a-zA-Z_][a-zA-Z0-9_]*", "ALPHA", "y", "$&", "ALPHA");
-    test(regex_259, 259, "^a(bc+|b[eh])g|.h\\$", "ABH", "y", "$&-$1", "BH-");
-    test(regex_260, 260, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
-    test(regex_261, 261, "(bc+d\\$|ef*g.|h?i(j|k))", "IJ", "y", "$&-$1-$2", "IJ-IJ-J");
-    test(regex_262, 262, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFG", "n", "-", "-");
-    test(regex_263, 263, "(bc+d\\$|ef*g.|h?i(j|k))", "BCDD", "n", "-", "-");
-    test(regex_264, 264, "(bc+d\\$|ef*g.|h?i(j|k))", "REFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
-    test(regex_265, 265, "((((((((((a))))))))))", "A", "y", "$10", "A");
-    test(regex_266, 266, "((((((((((a))))))))))\\10", "AA", "y", "$&", "AA");
-    test(regex_267, 267, "(((((((((a)))))))))", "A", "y", "$&", "A");
-    test(regex_268, 268, "multiple words of text", "UH-UH", "n", "-", "-");
-    test(regex_269, 269, "multiple words", "MULTIPLE WORDS, YEAH", "y", "$&", "MULTIPLE WORDS");
-    test(regex_270, 270, "(.*)c(.*)", "ABCDE", "y", "$&-$1-$2", "ABCDE-AB-DE");
-    test(regex_271, 271, "\\((.*), (.*)\\)", "(A, B)", "y", "($2, $1)", "(B, A)");
-    test(regex_272, 272, "[k]", "AB", "n", "-", "-");
-    test(regex_273, 273, "abcd", "ABCD", "y", "$&", "ABCD");
-    test(regex_274, 274, "a(bc)d", "ABCD", "y", "$1", "BC");
-    test(regex_275, 275, "a[-]?c", "AC", "y", "$&", "AC");
-    test(regex_276, 276, "(abc)\\1", "ABCABC", "y", "$1", "ABC");
-    test(regex_277, 277, "([a-c]*)\\1", "ABCABC", "y", "$1", "ABC");
-    test(regex_278, 278, "a++a", "aaaaa", "n", "-", "-");
-    test(regex_279, 279, "a*+a", "aaaaa", "n", "-", "-");
-    test(regex_280, 280, "a{1,5}+a", "aaaaa", "n", "-", "-");
-    test(regex_281, 281, "a?+a", "ab", "n", "-", "-");
-    test(regex_282, 282, "a++b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_283, 283, "a*+b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_284, 284, "a{1,5}+b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_285, 285, "a?+b", "ab", "y", "$&", "ab");
-    test(regex_286, 286, "fooa++a", "fooaaaaa", "n", "-", "-");
-    test(regex_287, 287, "fooa*+a", "fooaaaaa", "n", "-", "-");
-    test(regex_288, 288, "fooa{1,5}+a", "fooaaaaa", "n", "-", "-");
-    test(regex_289, 289, "fooa?+a", "fooab", "n", "-", "-");
-    test(regex_290, 290, "fooa++b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_291, 291, "fooa*+b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_292, 292, "fooa{1,5}+b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_293, 293, "fooa?+b", "fooab", "y", "$&", "fooab");
-    test(regex_294, 294, "(aA)++(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_295, 295, "(aA|bB)++(aA|bB)", "aAaAbBaAbB", "n", "-", "aAaAbBaAbB");
-    test(regex_296, 296, "(aA)*+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_297, 297, "(aA|bB)*+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
-    test(regex_298, 298, "(aA){1,5}+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_299, 299, "(aA|bB){1,5}+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
-    test(regex_300, 300, "(aA)?+(aA)", "aAb", "n", "-", "aAb");
-    test(regex_301, 301, "(aA|bB)?+(aA|bB)", "bBb", "n", "-", "bBb");
-    test(regex_302, 302, "(aA)++b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_303, 303, "(aA|bB)++b", "aAbBaAaAbBb", "y", "$&", "aAbBaAaAbBb");
-    test(regex_304, 304, "(aA)*+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_305, 305, "(aA|bB)*+b", "bBbBbBbBbBb", "y", "$&", "bBbBbBbBbBb");
-    test(regex_306, 306, "(aA){1,5}+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_307, 307, "(aA|bB){1,5}+b", "bBaAbBaAbBb", "y", "$&", "bBaAbBaAbBb");
-    test(regex_308, 308, "(aA)?+b", "aAb", "y", "$&", "aAb");
-    test(regex_309, 309, "(aA|bB)?+b", "bBb", "y", "$&", "bBb");
-    test(regex_310, 310, "foo(aA)++(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_311, 311, "foo(aA|bB)++(aA|bB)", "foobBbBbBaAaA", "n", "-", "foobBbBbBaAaA");
-    test(regex_312, 312, "foo(aA)*+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_313, 313, "foo(aA|bB)*+(aA|bB)", "foobBaAbBaAaA", "n", "-", "foobBaAbBaAaA");
-    test(regex_314, 314, "foo(aA){1,5}+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_315, 315, "foo(aA|bB){1,5}+(aA|bB)", "fooaAbBbBaAaA", "n", "-", "fooaAbBbBaAaA");
-    test(regex_316, 316, "foo(aA)?+(aA)", "fooaAb", "n", "-", "fooaAb");
-    test(regex_317, 317, "foo(aA|bB)?+(aA|bB)", "foobBb", "n", "-", "foobBb");
-    test(regex_318, 318, "foo(aA)++b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_319, 319, "foo(aA|bB)++b", "foobBaAbBaAbBb", "y", "$&", "foobBaAbBaAbBb");
-    test(regex_320, 320, "foo(aA)*+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_321, 321, "foo(aA|bB)*+b", "foobBbBaAaAaAb", "y", "$&", "foobBbBaAaAaAb");
-    test(regex_322, 322, "foo(aA){1,5}+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_323, 323, "foo(aA|bB){1,5}+b", "foobBaAaAaAaAb", "y", "$&", "foobBaAaAaAaAb");
-    test(regex_324, 324, "foo(aA)?+b", "fooaAb", "y", "$&", "fooaAb");
-    test(regex_325, 325, "foo(aA|bB)?+b", "foobBb", "y", "$&", "foobBb");
-    test(regex_326, 326, "foo(\\h+)bar", "foo\tbar", "y", "$1", "\t");
-    test(regex_327, 327, "(\\H+)(\\h)", "foo\tbar", "y", "$1-$2", "foo-\t");
-    test(regex_328, 328, "(\\h+)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
-    test(regex_329, 329, "foo(\\h)bar", "foo\tbar", "y", "$1", "\t");
-    test(regex_330, 330, "(\\H)(\\h)", "foo\tbar", "y", "$1-$2", "o-\t");
-    test(regex_331, 331, "(\\h)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
-    test(regex_332, 332, "foo(\\v+)bar", "foo\r\n\r\n\nbar", "y", "$1", "\r\n\r\n\n");
-    test(regex_333, 333, "(\\V+)(\\v)", "foo\r\n\r\n\nbar", "y", "$1-$2", "foo-\r");
-    test(regex_334, 334, "(\\v+)(\\V)", "foo\r\n\r\n\nbar", "y", "$1-$2", "\r\n\r\n\n-b");
-    test(regex_335, 335, "foo(\\v)bar", "foo\rbar", "y", "$1", "\r");
-    test(regex_336, 336, "(\\V)(\\v)", "foo\rbar", "y", "$1-$2", "o-\r");
-    test(regex_337, 337, "(\\v)(\\V)", "foo\rbar", "y", "$1-$2", "\r-b");
-    test(regex_338, 338, "(?:(?i)a)b", "ab", "y", "$&", "ab");
-    test(regex_339, 339, "((?i)a)b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_340, 340, "(?:(?i)a)b", "Ab", "y", "$&", "Ab");
-    test(regex_341, 341, "((?i)a)b", "Ab", "y", "$&:$1", "Ab:A");
-    test(regex_342, 342, "(?:(?i)a)b", "aB", "n", "-", "-");
-    test(regex_343, 343, "((?i)a)b", "aB", "n", "-", "-");
-    test(regex_344, 344, "(?i:a)b", "ab", "y", "$&", "ab");
-    test(regex_345, 345, "((?i:a))b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_346, 346, "(?i:a)b", "Ab", "y", "$&", "Ab");
-    test(regex_347, 347, "((?i:a))b", "Ab", "y", "$&:$1", "Ab:A");
-    test(regex_348, 348, "(?i:a)b", "aB", "n", "-", "-");
-    test(regex_349, 349, "((?i:a))b", "aB", "n", "-", "-");
-    test(regex_350, 350, "(?:(?-i)a)b", "ab", "y", "$&", "ab");
-    test(regex_351, 351, "((?-i)a)b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_352, 352, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
-    test(regex_353, 353, "((?-i)a)b", "aB", "y", "$&:$1", "aB:a");
-    test(regex_354, 354, "(?:(?-i)a)b", "Ab", "n", "-", "-");
-    test(regex_355, 355, "((?-i)a)b", "Ab", "n", "-", "-");
-    test(regex_356, 356, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
-    test(regex_357, 357, "((?-i)a)b", "aB", "y", "$1", "a");
-    test(regex_358, 358, "(?:(?-i)a)b", "AB", "n", "-", "-");
-    test(regex_359, 359, "((?-i)a)b", "AB", "n", "-", "-");
-    test(regex_360, 360, "(?-i:a)b", "ab", "y", "$&", "ab");
-    test(regex_361, 361, "((?-i:a))b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_362, 362, "(?-i:a)b", "aB", "y", "$&", "aB");
-    test(regex_363, 363, "((?-i:a))b", "aB", "y", "$&:$1", "aB:a");
-    test(regex_364, 364, "(?-i:a)b", "Ab", "n", "-", "-");
-    test(regex_365, 365, "((?-i:a))b", "Ab", "n", "-", "-");
-    test(regex_366, 366, "(?-i:a)b", "aB", "y", "$&", "aB");
-    test(regex_367, 367, "((?-i:a))b", "aB", "y", "$1", "a");
-    test(regex_368, 368, "(?-i:a)b", "AB", "n", "-", "-");
-    test(regex_369, 369, "((?-i:a))b", "AB", "n", "-", "-");
-    test(regex_370, 370, "((?-i:a.))b", "a\nB", "n", "-", "-");
-    test(regex_371, 371, "((?-i:a\\\\N))b", "a\nB", "n", "-", "-");
-    test(regex_372, 372, "((?s-i:a.))b", "a\nB", "y", "$1", "a\n");
-    test(regex_373, 373, "((?s-i:a\\\\N))b", "a\nB", "n", "-", "-");
-    test(regex_374, 374, "((?s-i:a.))b", "B\nB", "n", "-", "-");
-    test(regex_375, 375, "((?s-i:a\\\\N))b", "B\nB", "n", "-", "-");
-    test(regex_376, 376, "^(?:a?b?)*\\$", "a--", "n", "-", "-");
-    test(regex_377, 377, "((?s)^a(.))((?m)^b\\$)", "a\nb\nc\n", "y", "$1;$2;$3", "a\n;\n;b");
-    test(regex_378, 378, "((?m)^b\\$)", "a\nb\nc\n", "y", "$1", "b");
-    test(regex_379, 379, "(?m)^b", "a\nb\n", "y", "$&", "b");
-    test(regex_380, 380, "(?m)^(b)", "a\nb\n", "y", "$1", "b");
-    test(regex_381, 381, "((?m)^b)", "a\nb\n", "y", "$1", "b");
-    test(regex_382, 382, "\\n((?m)^b)", "a\nb\n", "y", "$1", "b");
-    test(regex_383, 383, "^b", "a\nb\nc\n", "n", "-", "-");
-    test(regex_384, 384, "()^b", "a\nb\nc\n", "n", "-", "-");
-    test(regex_385, 385, "((?m)^b)", "a\nb\nc\n", "y", "$1", "b");
-    test(regex_386, 386, "\\Z", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_387, 387, "\\z", "a\nb\n", "y", "$-[0]", "4");
-    test(regex_388, 388, "\\$", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_389, 389, "\\Z", "b\na\n", "y", "$-[0]", "3");
-    test(regex_390, 390, "\\z", "b\na\n", "y", "$-[0]", "4");
-    test(regex_391, 391, "\\$", "b\na\n", "y", "$-[0]", "3");
-    test(regex_392, 392, "\\Z", "b\na", "y", "$-[0]", "3");
-    test(regex_393, 393, "\\z", "b\na", "y", "$-[0]", "3");
-    test(regex_394, 394, "\\$", "b\na", "y", "$-[0]", "3");
-    test(regex_395, 395, "\\Z", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_396, 396, "\\z", "a\nb\n", "y", "$-[0]", "4");
-    test(regex_397, 397, "\\$", "a\nb\n", "y", "$-[0]", "1");
-    test(regex_398, 398, "\\Z", "b\na\n", "y", "$-[0]", "3");
-    test(regex_399, 399, "\\z", "b\na\n", "y", "$-[0]", "4");
-    test(regex_400, 400, "\\$", "b\na\n", "y", "$-[0]", "1");
-    test(regex_401, 401, "\\Z", "b\na", "y", "$-[0]", "3");
-    test(regex_402, 402, "\\z", "b\na", "y", "$-[0]", "3");
-    test(regex_403, 403, "\\$", "b\na", "y", "$-[0]", "1");
-    test(regex_404, 404, "a\\Z", "a\nb\n", "n", "-", "-");
-    test(regex_405, 405, "a\\z", "a\nb\n", "n", "-", "-");
-    test(regex_406, 406, "a\\$", "a\nb\n", "n", "-", "-");
-    test(regex_407, 407, "a\\Z", "b\na\n", "y", "$-[0]", "2");
-    test(regex_408, 408, "a\\z", "b\na\n", "n", "-", "-");
-    test(regex_409, 409, "a\\$", "b\na\n", "y", "$-[0]", "2");
-    test(regex_410, 410, "a\\Z", "b\na", "y", "$-[0]", "2");
-    test(regex_411, 411, "a\\z", "b\na", "y", "$-[0]", "2");
-    test(regex_412, 412, "a\\$", "b\na", "y", "$-[0]", "2");
-    test(regex_413, 413, "a\\Z", "a\nb\n", "n", "-", "-");
-    test(regex_414, 414, "a\\z", "a\nb\n", "n", "-", "-");
-    test(regex_415, 415, "a\\$", "a\nb\n", "y", "$-[0]", "0");
-    test(regex_416, 416, "a\\Z", "b\na\n", "y", "$-[0]", "2");
-    test(regex_417, 417, "a\\z", "b\na\n", "n", "-", "-");
-    test(regex_418, 418, "a\\$", "b\na\n", "y", "$-[0]", "2");
-    test(regex_419, 419, "a\\Z", "b\na", "y", "$-[0]", "2");
-    test(regex_420, 420, "a\\z", "b\na", "y", "$-[0]", "2");
-    test(regex_421, 421, "a\\$", "b\na", "y", "$-[0]", "2");
-    test(regex_422, 422, "aa\\Z", "aa\nb\n", "n", "-", "-");
-    test(regex_423, 423, "aa\\z", "aa\nb\n", "n", "-", "-");
-    test(regex_424, 424, "aa\\$", "aa\nb\n", "n", "-", "-");
-    test(regex_425, 425, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_426, 426, "aa\\z", "b\naa\n", "n", "-", "-");
-    test(regex_427, 427, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_428, 428, "aa\\Z", "b\naa", "y", "$-[0]", "2");
-    test(regex_429, 429, "aa\\z", "b\naa", "y", "$-[0]", "2");
-    test(regex_430, 430, "aa\\$", "b\naa", "y", "$-[0]", "2");
-    test(regex_431, 431, "aa\\Z", "aa\nb\n", "n", "-", "-");
-    test(regex_432, 432, "aa\\z", "aa\nb\n", "n", "-", "-");
-    test(regex_433, 433, "aa\\$", "aa\nb\n", "y", "$-[0]", "0");
-    test(regex_434, 434, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_435, 435, "aa\\z", "b\naa\n", "n", "-", "-");
-    test(regex_436, 436, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_437, 437, "aa\\Z", "b\naa", "y", "$-[0]", "2");
-    test(regex_438, 438, "aa\\z", "b\naa", "y", "$-[0]", "2");
-    test(regex_439, 439, "aa\\$", "b\naa", "y", "$-[0]", "2");
-    test(regex_440, 440, "aa\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_441, 441, "aa\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_442, 442, "aa\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_443, 443, "aa\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_444, 444, "aa\\z", "b\nac\n", "n", "-", "-");
-    test(regex_445, 445, "aa\\$", "b\nac\n", "n", "-", "-");
-    test(regex_446, 446, "aa\\Z", "b\nac", "n", "-", "-");
-    test(regex_447, 447, "aa\\z", "b\nac", "n", "-", "-");
-    test(regex_448, 448, "aa\\$", "b\nac", "n", "-", "-");
-    test(regex_449, 449, "aa\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_450, 450, "aa\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_451, 451, "aa\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_452, 452, "aa\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_453, 453, "aa\\z", "b\nac\n", "n", "-", "-");
-    test(regex_454, 454, "aa\\$", "b\nac\n", "n", "-", "-");
-    test(regex_455, 455, "aa\\Z", "b\nac", "n", "-", "-");
-    test(regex_456, 456, "aa\\z", "b\nac", "n", "-", "-");
-    test(regex_457, 457, "aa\\$", "b\nac", "n", "-", "-");
-    test(regex_458, 458, "aa\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_459, 459, "aa\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_460, 460, "aa\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_461, 461, "aa\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_462, 462, "aa\\z", "b\nca\n", "n", "-", "-");
-    test(regex_463, 463, "aa\\$", "b\nca\n", "n", "-", "-");
-    test(regex_464, 464, "aa\\Z", "b\nca", "n", "-", "-");
-    test(regex_465, 465, "aa\\z", "b\nca", "n", "-", "-");
-    test(regex_466, 466, "aa\\$", "b\nca", "n", "-", "-");
-    test(regex_467, 467, "aa\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_468, 468, "aa\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_469, 469, "aa\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_470, 470, "aa\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_471, 471, "aa\\z", "b\nca\n", "n", "-", "-");
-    test(regex_472, 472, "aa\\$", "b\nca\n", "n", "-", "-");
-    test(regex_473, 473, "aa\\Z", "b\nca", "n", "-", "-");
-    test(regex_474, 474, "aa\\z", "b\nca", "n", "-", "-");
-    test(regex_475, 475, "aa\\$", "b\nca", "n", "-", "-");
-    test(regex_476, 476, "ab\\Z", "ab\nb\n", "n", "-", "-");
-    test(regex_477, 477, "ab\\z", "ab\nb\n", "n", "-", "-");
-    test(regex_478, 478, "ab\\$", "ab\nb\n", "n", "-", "-");
-    test(regex_479, 479, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_480, 480, "ab\\z", "b\nab\n", "n", "-", "-");
-    test(regex_481, 481, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_482, 482, "ab\\Z", "b\nab", "y", "$-[0]", "2");
-    test(regex_483, 483, "ab\\z", "b\nab", "y", "$-[0]", "2");
-    test(regex_484, 484, "ab\\$", "b\nab", "y", "$-[0]", "2");
-    test(regex_485, 485, "ab\\Z", "ab\nb\n", "n", "-", "-");
-    test(regex_486, 486, "ab\\z", "ab\nb\n", "n", "-", "-");
-    test(regex_487, 487, "ab\\$", "ab\nb\n", "y", "$-[0]", "0");
-    test(regex_488, 488, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_489, 489, "ab\\z", "b\nab\n", "n", "-", "-");
-    test(regex_490, 490, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_491, 491, "ab\\Z", "b\nab", "y", "$-[0]", "2");
-    test(regex_492, 492, "ab\\z", "b\nab", "y", "$-[0]", "2");
-    test(regex_493, 493, "ab\\$", "b\nab", "y", "$-[0]", "2");
-    test(regex_494, 494, "ab\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_495, 495, "ab\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_496, 496, "ab\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_497, 497, "ab\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_498, 498, "ab\\z", "b\nac\n", "n", "-", "-");
-    test(regex_499, 499, "ab\\$", "b\nac\n", "n", "-", "-");
-    test(regex_500, 500, "ab\\Z", "b\nac", "n", "-", "-");
-    test(regex_501, 501, "ab\\z", "b\nac", "n", "-", "-");
-    test(regex_502, 502, "ab\\$", "b\nac", "n", "-", "-");
-    test(regex_503, 503, "ab\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_504, 504, "ab\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_505, 505, "ab\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_506, 506, "ab\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_507, 507, "ab\\z", "b\nac\n", "n", "-", "-");
-    test(regex_508, 508, "ab\\$", "b\nac\n", "n", "-", "-");
-    test(regex_509, 509, "ab\\Z", "b\nac", "n", "-", "-");
-    test(regex_510, 510, "ab\\z", "b\nac", "n", "-", "-");
-    test(regex_511, 511, "ab\\$", "b\nac", "n", "-", "-");
-    test(regex_512, 512, "ab\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_513, 513, "ab\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_514, 514, "ab\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_515, 515, "ab\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_516, 516, "ab\\z", "b\nca\n", "n", "-", "-");
-    test(regex_517, 517, "ab\\$", "b\nca\n", "n", "-", "-");
-    test(regex_518, 518, "ab\\Z", "b\nca", "n", "-", "-");
-    test(regex_519, 519, "ab\\z", "b\nca", "n", "-", "-");
-    test(regex_520, 520, "ab\\$", "b\nca", "n", "-", "-");
-    test(regex_521, 521, "ab\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_522, 522, "ab\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_523, 523, "ab\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_524, 524, "ab\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_525, 525, "ab\\z", "b\nca\n", "n", "-", "-");
-    test(regex_526, 526, "ab\\$", "b\nca\n", "n", "-", "-");
-    test(regex_527, 527, "ab\\Z", "b\nca", "n", "-", "-");
-    test(regex_528, 528, "ab\\z", "b\nca", "n", "-", "-");
-    test(regex_529, 529, "ab\\$", "b\nca", "n", "-", "-");
-    test(regex_530, 530, "abb\\Z", "abb\nb\n", "n", "-", "-");
-    test(regex_531, 531, "abb\\z", "abb\nb\n", "n", "-", "-");
-    test(regex_532, 532, "abb\\$", "abb\nb\n", "n", "-", "-");
-    test(regex_533, 533, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_534, 534, "abb\\z", "b\nabb\n", "n", "-", "-");
-    test(regex_535, 535, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_536, 536, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_537, 537, "abb\\z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_538, 538, "abb\\$", "b\nabb", "y", "$-[0]", "2");
-    test(regex_539, 539, "abb\\Z", "abb\nb\n", "n", "-", "-");
-    test(regex_540, 540, "abb\\z", "abb\nb\n", "n", "-", "-");
-    test(regex_541, 541, "abb\\$", "abb\nb\n", "y", "$-[0]", "0");
-    test(regex_542, 542, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_543, 543, "abb\\z", "b\nabb\n", "n", "-", "-");
-    test(regex_544, 544, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_545, 545, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_546, 546, "abb\\z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_547, 547, "abb\\$", "b\nabb", "y", "$-[0]", "2");
-    test(regex_548, 548, "abb\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_549, 549, "abb\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_550, 550, "abb\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_551, 551, "abb\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_552, 552, "abb\\z", "b\nac\n", "n", "-", "-");
-    test(regex_553, 553, "abb\\$", "b\nac\n", "n", "-", "-");
-    test(regex_554, 554, "abb\\Z", "b\nac", "n", "-", "-");
-    test(regex_555, 555, "abb\\z", "b\nac", "n", "-", "-");
-    test(regex_556, 556, "abb\\$", "b\nac", "n", "-", "-");
-    test(regex_557, 557, "abb\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_558, 558, "abb\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_559, 559, "abb\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_560, 560, "abb\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_561, 561, "abb\\z", "b\nac\n", "n", "-", "-");
-    test(regex_562, 562, "abb\\$", "b\nac\n", "n", "-", "-");
-    test(regex_563, 563, "abb\\Z", "b\nac", "n", "-", "-");
-    test(regex_564, 564, "abb\\z", "b\nac", "n", "-", "-");
-    test(regex_565, 565, "abb\\$", "b\nac", "n", "-", "-");
-    test(regex_566, 566, "abb\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_567, 567, "abb\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_568, 568, "abb\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_569, 569, "abb\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_570, 570, "abb\\z", "b\nca\n", "n", "-", "-");
-    test(regex_571, 571, "abb\\$", "b\nca\n", "n", "-", "-");
-    test(regex_572, 572, "abb\\Z", "b\nca", "n", "-", "-");
-    test(regex_573, 573, "abb\\z", "b\nca", "n", "-", "-");
-    test(regex_574, 574, "abb\\$", "b\nca", "n", "-", "-");
-    test(regex_575, 575, "abb\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_576, 576, "abb\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_577, 577, "abb\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_578, 578, "abb\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_579, 579, "abb\\z", "b\nca\n", "n", "-", "-");
-    test(regex_580, 580, "abb\\$", "b\nca\n", "n", "-", "-");
-    test(regex_581, 581, "abb\\Z", "b\nca", "n", "-", "-");
-    test(regex_582, 582, "abb\\z", "b\nca", "n", "-", "-");
-    test(regex_583, 583, "abb\\$", "b\nca", "n", "-", "-");
-    test(regex_584, 584, "\\Aa\\$", "a\n\n", "y", "$&", "a");
-    test(regex_585, 585, "(?i:.[b].)", "abd", "y", "$&", "abd");
-    test(regex_586, 586, "(?i:\\\\N[b]\\\\N)", "abd", "y", "$&", "abd");
-    test(regex_587, 587, "\\\\N {1}", "abbbbc", "y", "$&", "a");
-    test(regex_588, 588, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_589, 589, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_590, 590, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_591, 591, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_592, 592, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_593, 593, "a\\\\N c", "abc", "y", "$&", "abc");
-    test(regex_594, 594, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
-    test(regex_595, 595, "a\\\\N *c", "axyzd", "n", "-", "-");
-    test(regex_596, 596, "[a b]", " ", "yS", "$&", " ");
-    test(regex_597, 597, "[a b]", " ", "n", "-", "-");
-    test(regex_598, 598, "[a\\ b]", " ", "y", "$&", " ");
-    test(regex_599, 599, "[ ^ a b ]", "a", "n", "-", "-");
-    test(regex_600, 600, "[ ^ a b ]", "b", "n", "-", "-");
-    test(regex_601, 601, "[ ^ a b ]", "A", "y", "$&", "A");
-    test(regex_602, 602, "(?x:[a b])", " ", "yS", "$&", " ");
-    test(regex_603, 603, "(?xx:[a b])", " ", "n", "-", "-");
-    test(regex_604, 604, "(?x)[a b]", " ", "yS", "$&", " ");
-    test(regex_605, 605, "(?xx)[a b]", " ", "n", "-", "-");
-    test(regex_606, 606, "(?-x:[a b])", " ", "yS", "$&", " ");
-    test(regex_607, 607, "\\\\N {1}", "abbbbc", "y", "$&", "a");
-    test(regex_608, 608, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_609, 609, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_610, 610, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_611, 611, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_612, 612, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_613, 613, "a\\\\N c", "abc", "y", "$&", "abc");
-    test(regex_614, 614, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
-    test(regex_615, 615, "a\\\\N *c", "axyzd", "n", "-", "-");
-    test(regex_616, 616, "[#]", "a#b", "y", "$&", "#");
-    test(regex_617, 617, "[#]b", "a#b", "y", "$&", "#b");
-    test(regex_618, 618, "[#]", "a#b", "y", "$&", "#");
-    test(regex_619, 619, "[#]b", "a#b", "y", "$&", "#b");
-    test(regex_620, 620, "(?'n'foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
-    test(regex_621, 621, "(?'n'foo) \\g{ n }", "..foo foo..", "y", "$1", "foo");
-    test(regex_622, 622, "(?'n'foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_623, 623, "(?foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
-    test(regex_624, 624, "(?foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_625, 625, "(?as) (\\w+) \\g{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_626, 626, "(?'n'foo) \\k", "..foo foo..", "y", "$1", "foo");
-    test(regex_627, 627, "(?'n'foo) \\k", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_628, 628, "(?foo) \\k'n'", "..foo foo..", "y", "$1", "foo");
-    test(regex_629, 629, "(?foo) \\k'n'", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_630, 630, "(?'a1'foo) \\k'a1'", "..foo foo..", "yM", "$+{a1}", "foo");
-    test(regex_631, 631, "(?foo) \\k", "..foo foo..", "yM", "$+{a1}", "foo");
-    test(regex_632, 632, "(?'_'foo) \\k'_'", "..foo foo..", "yM", "$+{_}", "foo");
-    test(regex_633, 633, "(?<_>foo) \\k<_>", "..foo foo..", "yM", "$+{_}", "foo");
-    test(regex_634, 634, "(?'_0_'foo) \\k'_0_'", "..foo foo..", "yM", "$+{_0_}", "foo");
-    test(regex_635, 635, "(?<_0_>foo) \\k<_0_>", "..foo foo..", "yM", "$+{_0_}", "foo");
-    test(regex_636, 636, "(?as) (\\w+) \\k (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_637, 637, "(?as) (\\w+) \\k{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_638, 638, "(?as) (\\w+) \\k'as' (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_639, 639, "(?as) (\\w+) \\k{ as } (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_640, 640, "^a(?#xxx){3}c", "aaac", "y", "$&", "aaac");
-    test(regex_641, 641, "^a (?#xxx) (?#yyy) {3}c", "aaac", "y", "$&", "aaac");
-    test(regex_642, 642, "(?|(a))", "a", "y", "$1-$+", "a-a");
-    test(regex_643, 643, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "d!o!da", "y", "$1-$2-$3", "!o!-o-a");
-    test(regex_644, 644, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "aabc", "y", "$1-$2-$3", "a--c");
-    test(regex_645, 645, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "ixyjp", "y", "$1-$2-$3", "x-y-p");
-    test(regex_646, 646, "(?|(?|(a)|(b))|(?|(c)|(d)))", "a", "y", "$1", "a");
-    test(regex_647, 647, "(?|(?|(a)|(b))|(?|(c)|(d)))", "b", "y", "$1", "b");
-    test(regex_648, 648, "(?|(?|(a)|(b))|(?|(c)|(d)))", "c", "y", "$1", "c");
-    test(regex_649, 649, "(?|(?|(a)|(b))|(?|(c)|(d)))", "d", "y", "$1", "d");
-    test(regex_650, 650, "(.)(?|(.)(.)x|(.)d)(.)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
-    test(regex_651, 651, "(\\\\N)(?|(\\\\N)(\\\\N)x|(\\\\N)d)(\\\\N)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
-    test(regex_652, 652, "(?|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_653, 653, "(?|(?x)|(?y))", "x", "yM", "$+{foo}", "x");
-    test(regex_654, 654, "(?|(?y)|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_655, 655, "(?)(?|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_656, 656, "foo\\Kbar", "foobar", "y", "$&", "bar");
-    test(regex_657, 657, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
-    test(regex_658, 658, "(foo)", "foobar", "y", "$&-$1", "foo-");
-    test(regex_659, 659, "(?-n)(foo)(?n)(bar)", "foobar", "y", "$&-$1-$2", "foobar-foo-");
-    test(regex_660, 660, "(?-n:(foo)(?n:(bar)))", "foobar", "y", "$&-$1-$2", "foobar-foo-");
-    test(regex_661, 661, "foo # Match foo", "foobar", "y", "$&", "foo");
-    test(regex_662, 662, "\\x41\\x42", "AB", "y", "$&", "AB");
-    test(regex_663, 663, "\\101\\o{102}", "AB", "y", "$&", "AB");
-    std::cout << std::endl;
-  }
-}
-test_perl_tests_lookahead: @regex type = {
-  regex_0 := "a(?!b).";
-  var_regex_0 : std::string = "a(?!b).";
-  regex_1 := "(?=)a";
-  var_regex_1 : std::string = "(?=)a";
-  regex_2 := "a(?=d).";
-  var_regex_2 : std::string = "a(?=d).";
-  regex_3 := "a(?=c|d).";
-  var_regex_3 : std::string = "a(?=c|d).";
-  regex_4 := "^(?:b|a(?=(.)))*\1";
-  var_regex_4 : std::string = "^(?:b|a(?=(.)))*\1";
-  regex_5 := "(?=(a+?))(\1ab)";
-  var_regex_5 : std::string = "(?=(a+?))(\1ab)";
-  regex_6 := "^(?=(a+?))\1ab";
-  var_regex_6 : std::string = "^(?=(a+?))\1ab";
-  regex_7 := "(?=(a+?))(\1ab)";
-  var_regex_7 : std::string = "(?=(a+?))(\1ab)";
-  regex_8 := "^(?=(a+?))\1ab";
-  var_regex_8 : std::string = "^(?=(a+?))\1ab";
-  regex_9 := "(.*)(?=c)";
-  var_regex_9 : std::string = "(.*)(?=c)";
-  regex_10 := "(.*)(?=c)c";
-  var_regex_10 : std::string = "(.*)(?=c)c";
-  regex_11 := "(.*)(?=b|c)";
-  var_regex_11 : std::string = "(.*)(?=b|c)";
-  regex_12 := "(.*)(?=b|c)c";
-  var_regex_12 : std::string = "(.*)(?=b|c)c";
-  regex_13 := "(.*)(?=c|b)";
-  var_regex_13 : std::string = "(.*)(?=c|b)";
-  regex_14 := "(.*)(?=c|b)c";
-  var_regex_14 : std::string = "(.*)(?=c|b)c";
-  regex_15 := "(.*)(?=[bc])";
-  var_regex_15 : std::string = "(.*)(?=[bc])";
-  regex_16 := "(.*)(?=[bc])c";
-  var_regex_16 : std::string = "(.*)(?=[bc])c";
-  regex_17 := "(.*?)(?=c)";
-  var_regex_17 : std::string = "(.*?)(?=c)";
-  regex_18 := "(.*?)(?=c)c";
-  var_regex_18 : std::string = "(.*?)(?=c)c";
-  regex_19 := "(.*?)(?=b|c)";
-  var_regex_19 : std::string = "(.*?)(?=b|c)";
-  regex_20 := "(.*?)(?=b|c)c";
-  var_regex_20 : std::string = "(.*?)(?=b|c)c";
-  regex_21 := "(.*?)(?=c|b)";
-  var_regex_21 : std::string = "(.*?)(?=c|b)";
-  regex_22 := "(.*?)(?=c|b)c";
-  var_regex_22 : std::string = "(.*?)(?=c|b)c";
-  regex_23 := "(.*?)(?=[bc])";
-  var_regex_23 : std::string = "(.*?)(?=[bc])";
-  regex_24 := "(.*?)(?=[bc])c";
-  var_regex_24 : std::string = "(.*?)(?=[bc])c";
-  regex_25 := "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
-  var_regex_25 : std::string = "^(a*?)(?!(aa|aaaa)*\$)(?=a\z)";
-  regex_26 := "a(?!b(?!c))(..)";
-  var_regex_26 : std::string = "a(?!b(?!c))(..)";
-  regex_27 := "a(?!b(?=a))(..)";
-  var_regex_27 : std::string = "a(?!b(?=a))(..)";
-  regex_28 := "X(\w+)(?=\s)|X(\w+)";
-  var_regex_28 : std::string = "X(\w+)(?=\s)|X(\w+)";
-  regex_29 := "^a*(?=b)b";
-  var_regex_29 : std::string = "^a*(?=b)b";
-  regex_30 := "(?!\A)x";
-  regex_30_mod := "m";
-  var_regex_30 : std::string = "(?!\A)x";
-  regex_31 := "^(o)(?!.*\1)";
-  regex_31_mod := "i";
-  var_regex_31 : std::string = "^(o)(?!.*\1)";
-  regex_32 := ".*a(?!(b|cd)*e).*f";
-  var_regex_32 : std::string = ".*a(?!(b|cd)*e).*f";
-  regex_33 := "^(a*?)(?!(aa|aaaa)*\$)";
-  var_regex_33 : std::string = "^(a*?)(?!(aa|aaaa)*\$)";
-  regex_34 := "(?!)+?|(.{2,4})";
-  var_regex_34 : std::string = "(?!)+?|(.{2,4})";
-  regex_35 := "^(a*?)(?!(a{6}|a{5})*\$)";
-  var_regex_35 : std::string = "^(a*?)(?!(a{6}|a{5})*\$)";
-  regex_36 := "a(?!b(?!c(?!d(?!e))))...(.)";
-  var_regex_36 : std::string = "a(?!b(?!c(?!d(?!e))))...(.)";
-  regex_37 := "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
-  var_regex_37 : std::string = "X(?!b+(?!(c+)*(?!(c+)*d))).*X";
-  regex_38 := "((?s).)c(?!.)";
-  var_regex_38 : std::string = "((?s).)c(?!.)";
-  regex_39 := "((?s).)c(?!.)";
-  var_regex_39 : std::string = "((?s).)c(?!.)";
-  regex_40 := "((?s)b.)c(?!.)";
-  var_regex_40 : std::string = "((?s)b.)c(?!.)";
-  regex_41 := "((?s)b.)c(?!.)";
-  var_regex_41 : std::string = "((?s)b.)c(?!.)";
-  regex_42 := "((?s)b.)c(?!\N)";
-  var_regex_42 : std::string = "((?s)b.)c(?!\\N)";
-  regex_43 := "(b.)c(?!\N)";
-  regex_43_mod := "s";
-  var_regex_43 : std::string = "(b.)c(?!\\N)";
-  regex_44 := "a*(?!)";
-  var_regex_44 : std::string = "a*(?!)";
-  run: (this) = {
-    std::cout << "Running perl_tests_lookahead:"<< std::endl;
-    test(regex_0, 0, "a(?!b).", "abad", "y", "$&", "ad");
-    test(regex_1, 1, "(?=)a", "a", "y", "$&", "a");
-    test(regex_2, 2, "a(?=d).", "abad", "y", "$&", "ad");
-    test(regex_3, 3, "a(?=c|d).", "abad", "y", "$&", "ad");
-    test(regex_4, 4, "^(?:b|a(?=(.)))*\\1", "abc", "y", "$&", "ab");
-    test(regex_5, 5, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
-    test(regex_6, 6, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
-    test(regex_7, 7, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
-    test(regex_8, 8, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
-    test(regex_9, 9, "(.*)(?=c)", "abcd", "y", "$1", "ab");
-    test(regex_10, 10, "(.*)(?=c)c", "abcd", "yB", "$1", "ab");
-    test(regex_11, 11, "(.*)(?=b|c)", "abcd", "y", "$1", "ab");
-    test(regex_12, 12, "(.*)(?=b|c)c", "abcd", "y", "$1", "ab");
-    test(regex_13, 13, "(.*)(?=c|b)", "abcd", "y", "$1", "ab");
-    test(regex_14, 14, "(.*)(?=c|b)c", "abcd", "y", "$1", "ab");
-    test(regex_15, 15, "(.*)(?=[bc])", "abcd", "y", "$1", "ab");
-    test(regex_16, 16, "(.*)(?=[bc])c", "abcd", "yB", "$1", "ab");
-    test(regex_17, 17, "(.*?)(?=c)", "abcd", "y", "$1", "ab");
-    test(regex_18, 18, "(.*?)(?=c)c", "abcd", "yB", "$1", "ab");
-    test(regex_19, 19, "(.*?)(?=b|c)", "abcd", "y", "$1", "a");
-    test(regex_20, 20, "(.*?)(?=b|c)c", "abcd", "y", "$1", "ab");
-    test(regex_21, 21, "(.*?)(?=c|b)", "abcd", "y", "$1", "a");
-    test(regex_22, 22, "(.*?)(?=c|b)c", "abcd", "y", "$1", "ab");
-    test(regex_23, 23, "(.*?)(?=[bc])", "abcd", "y", "$1", "a");
-    test(regex_24, 24, "(.*?)(?=[bc])c", "abcd", "yB", "$1", "ab");
-    test(regex_25, 25, "^(a*?)(?!(aa|aaaa)*\\$)(?=a\\z)", "aaaaaaaa", "y", "$1", "aaaaaaa");
-    test(regex_26, 26, "a(?!b(?!c))(..)", "abababc", "y", "$1", "bc");
-    test(regex_27, 27, "a(?!b(?=a))(..)", "abababc", "y", "$1", "bc");
-    test(regex_28, 28, "X(\\w+)(?=\\s)|X(\\w+)", "Xab", "y", "[$1-$2]", "[-ab]");
-    test(regex_29, 29, "^a*(?=b)b", "ab", "y", "$&", "ab");
-    test(regex_30, 30, "(?!\\A)x", "a\nxb\n", "y", "-", "-");
-    test(regex_31, 31, "^(o)(?!.*\\1)", "Oo", "n", "-", "-");
-    test(regex_32, 32, ".*a(?!(b|cd)*e).*f", "......abef", "n", "-", "-");
-    test(regex_33, 33, "^(a*?)(?!(aa|aaaa)*\\$)", "aaaaaaaaaaaaaaaaaaaa", "y", "$1", "a");
-    test(regex_34, 34, "(?!)+?|(.{2,4})", "abcde", "y", "$1", "abcd");
-    test(regex_35, 35, "^(a*?)(?!(a{6}|a{5})*\\$)", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", "$+[1]", "12");
-    test(regex_36, 36, "a(?!b(?!c(?!d(?!e))))...(.)", "abxabcdxabcde", "y", "$1", "e");
-    test(regex_37, 37, "X(?!b+(?!(c+)*(?!(c+)*d))).*X", "aXbbbbbbbcccccccccccccaaaX", "y", "-", "-");
-    test(regex_38, 38, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1", "\n");
-    test(regex_39, 39, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "\n:\nc");
-    test(regex_40, 40, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1", "b\n");
-    test(regex_41, 41, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_42, 42, "((?s)b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_43, 43, "(b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_44, 44, "a*(?!)", "aaaab", "n", "-", "-");
-    std::cout << std::endl;
-  }
-}
-main: () = {
-    test_perl_tests_general().run();
-    test_perl_tests_lookahead().run();
-}
diff --git a/regression-tests/pure2-regex_01_char_matcher.cpp2 b/regression-tests/pure2-regex_01_char_matcher.cpp2
new file mode 100644
index 0000000000..0d965a40e0
--- /dev/null
+++ b/regression-tests/pure2-regex_01_char_matcher.cpp2
@@ -0,0 +1,185 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_01_char_matcher: @regex type = {
+  regex_01 := R"(abc)";
+  regex_02 := R"(abc)";
+  regex_03 := R"(abc)";
+  regex_04 := R"(abc)";
+  regex_05 := R"(abc)";
+  regex_06 := R"(abc)";
+  regex_07 := R"(abc)";
+  regex_08 := R"(abc)";
+  regex_09 := R"(abc)";
+  regex_10 := R"(abc)";
+  regex_11 := R"(abc)";
+  regex_12 := R"(abc)";
+  run: (this) = {
+    std::cout << "Running tests_01_char_matcher:"<< std::endl;
+    test(regex_01, "01", R"(abc)", "abc", "y", R"($&)", "abc");
+    test(regex_02, "02", R"(abc)", "abc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(abc)", "abc", "y", R"($+[0])", "3");
+    test(regex_04, "04", R"(abc)", "xbc", "n", R"(-)", "-");
+    test(regex_05, "05", R"(abc)", "axc", "n", R"(-)", "-");
+    test(regex_06, "06", R"(abc)", "abx", "n", R"(-)", "-");
+    test(regex_07, "07", R"(abc)", "xabcy", "y", R"($&)", "abc");
+    test(regex_08, "08", R"(abc)", "xabcy", "y", R"($-[0])", "1");
+    test(regex_09, "09", R"(abc)", "xabcy", "y", R"($+[0])", "4");
+    test(regex_10, "10", R"(abc)", "ababc", "y", R"($&)", "abc");
+    test(regex_11, "11", R"(abc)", "ababc", "y", R"($-[0])", "2");
+    test(regex_12, "12", R"(abc)", "ababc", "y", R"($+[0])", "5");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_01_char_matcher().run();
+}
diff --git a/regression-tests/pure2-regex_02_ranges.cpp2 b/regression-tests/pure2-regex_02_ranges.cpp2
new file mode 100644
index 0000000000..a122bdcf01
--- /dev/null
+++ b/regression-tests/pure2-regex_02_ranges.cpp2
@@ -0,0 +1,241 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_02_ranges: @regex type = {
+  regex_01 := R"(ab*c)";
+  regex_02 := R"(ab*c)";
+  regex_03 := R"(ab*c)";
+  regex_04 := R"(ab*bc)";
+  regex_05 := R"(ab*bc)";
+  regex_06 := R"(ab*bc)";
+  regex_07 := R"(ab*bc)";
+  regex_08 := R"(ab*bc)";
+  regex_09 := R"(ab*bc)";
+  regex_10 := R"(ab*bc)";
+  regex_11 := R"(ab*bc)";
+  regex_12 := R"(ab*bc)";
+  regex_13 := R"(ab{0,}bc)";
+  regex_14 := R"(ab{0,}bc)";
+  regex_15 := R"(ab{0,}bc)";
+  regex_16 := R"(ab+bc)";
+  regex_17 := R"(ab+bc)";
+  regex_18 := R"(ab+bc)";
+  regex_19 := R"(ab+bc)";
+  regex_20 := R"(ab+bc)";
+  regex_21 := R"(ab{1,}bc)";
+  regex_22 := R"(ab+bc)";
+  regex_23 := R"(ab+bc)";
+  regex_24 := R"(ab+bc)";
+  regex_25 := R"(ab{1,}bc)";
+  regex_26 := R"(ab{1,}bc)";
+  regex_27 := R"(ab{1,}bc)";
+  regex_28 := R"(ab{1,3}bc)";
+  regex_29 := R"(ab{1,3}bc)";
+  regex_30 := R"(ab{1,3}bc)";
+  regex_31 := R"(ab{3,4}bc)";
+  regex_32 := R"(ab{3,4}bc)";
+  regex_33 := R"(ab{3,4}bc)";
+  regex_34 := R"(ab{4,5}bc)";
+  regex_35 := R"(ab?bc)";
+  regex_36 := R"(ab?bc)";
+  regex_37 := R"(ab{0,1}bc)";
+  regex_38 := R"(ab?bc)";
+  regex_39 := R"(ab?c)";
+  regex_40 := R"(ab{0,1}c)";
+  run: (this) = {
+    std::cout << "Running tests_02_ranges:"<< std::endl;
+    test(regex_01, "01", R"(ab*c)", "abc", "y", R"($&)", "abc");
+    test(regex_02, "02", R"(ab*c)", "abc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(ab*c)", "abc", "y", R"($+[0])", "3");
+    test(regex_04, "04", R"(ab*bc)", "abc", "y", R"($&)", "abc");
+    test(regex_05, "05", R"(ab*bc)", "abc", "y", R"($-[0])", "0");
+    test(regex_06, "06", R"(ab*bc)", "abc", "y", R"($+[0])", "3");
+    test(regex_07, "07", R"(ab*bc)", "abbc", "y", R"($&)", "abbc");
+    test(regex_08, "08", R"(ab*bc)", "abbc", "y", R"($-[0])", "0");
+    test(regex_09, "09", R"(ab*bc)", "abbc", "y", R"($+[0])", "4");
+    test(regex_10, "10", R"(ab*bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_11, "11", R"(ab*bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_12, "12", R"(ab*bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_13, "13", R"(ab{0,}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_14, "14", R"(ab{0,}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_15, "15", R"(ab{0,}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_16, "16", R"(ab+bc)", "abbc", "y", R"($&)", "abbc");
+    test(regex_17, "17", R"(ab+bc)", "abbc", "y", R"($-[0])", "0");
+    test(regex_18, "18", R"(ab+bc)", "abbc", "y", R"($+[0])", "4");
+    test(regex_19, "19", R"(ab+bc)", "abc", "n", R"(-)", "-");
+    test(regex_20, "20", R"(ab+bc)", "abq", "n", R"(-)", "-");
+    test(regex_21, "21", R"(ab{1,}bc)", "abq", "n", R"(-)", "-");
+    test(regex_22, "22", R"(ab+bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_23, "23", R"(ab+bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_24, "24", R"(ab+bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_25, "25", R"(ab{1,}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_26, "26", R"(ab{1,}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_27, "27", R"(ab{1,}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_28, "28", R"(ab{1,3}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_29, "29", R"(ab{1,3}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_30, "30", R"(ab{1,3}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_31, "31", R"(ab{3,4}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_32, "32", R"(ab{3,4}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_33, "33", R"(ab{3,4}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_34, "34", R"(ab{4,5}bc)", "abbbbc", "n", R"(-)", "-");
+    test(regex_35, "35", R"(ab?bc)", "abbc", "y", R"($&)", "abbc");
+    test(regex_36, "36", R"(ab?bc)", "abc", "y", R"($&)", "abc");
+    test(regex_37, "37", R"(ab{0,1}bc)", "abc", "y", R"($&)", "abc");
+    test(regex_38, "38", R"(ab?bc)", "abbbbc", "n", R"(-)", "-");
+    test(regex_39, "39", R"(ab?c)", "abc", "y", R"($&)", "abc");
+    test(regex_40, "40", R"(ab{0,1}c)", "abc", "y", R"($&)", "abc");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_02_ranges().run();
+}
diff --git a/regression-tests/pure2-regex_03_wildcard.cpp2 b/regression-tests/pure2-regex_03_wildcard.cpp2
new file mode 100644
index 0000000000..6f5ec0236d
--- /dev/null
+++ b/regression-tests/pure2-regex_03_wildcard.cpp2
@@ -0,0 +1,201 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_03_wildcard: @regex type = {
+  regex_01 := R"(.{1})";
+  regex_02 := R"(.{1})";
+  regex_03 := R"(.{1})";
+  regex_04 := R"(.{3,4})";
+  regex_05 := R"(.{3,4})";
+  regex_06 := R"(.{3,4})";
+  regex_07 := R"(\N{1})";
+  regex_08 := R"(\N{1})";
+  regex_09 := R"(\N{1})";
+  regex_10 := R"(\N{3,4})";
+  regex_11 := R"(\N{3,4})";
+  regex_12 := R"(\N{3,4})";
+  regex_13 := R"(\N{ 3 , 4 })";
+  regex_14 := R"(a.c)";
+  regex_15 := R"(a.c)";
+  regex_16 := R"(a\Nc)";
+  regex_17 := R"(a.*c)";
+  regex_18 := R"(a\N*c)";
+  regex_19 := R"(a.*c)";
+  regex_20 := R"(a\N*c)";
+  run: (this) = {
+    std::cout << "Running tests_03_wildcard:"<< std::endl;
+    test(regex_01, "01", R"(.{1})", "abbbbc", "y", R"($&)", "a");
+    test(regex_02, "02", R"(.{1})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(.{1})", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_04, "04", R"(.{3,4})", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_05, "05", R"(.{3,4})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_06, "06", R"(.{3,4})", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_07, "07", R"(\N{1})", "abbbbc", "y", R"($&)", "a");
+    test(regex_08, "08", R"(\N{1})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_09, "09", R"(\N{1})", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_10, "10", R"(\N{3,4})", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_11, "11", R"(\N{3,4})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_12, "12", R"(\N{3,4})", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_13, "13", R"(\N{ 3 , 4 })", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_14, "14", R"(a.c)", "abc", "y", R"($&)", "abc");
+    test(regex_15, "15", R"(a.c)", "axc", "y", R"($&)", "axc");
+    test(regex_16, "16", R"(a\Nc)", "abc", "y", R"($&)", "abc");
+    test(regex_17, "17", R"(a.*c)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_18, "18", R"(a\N*c)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_19, "19", R"(a.*c)", "axyzd", "n", R"(-)", "-");
+    test(regex_20, "20", R"(a\N*c)", "axyzd", "n", R"(-)", "-");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_03_wildcard().run();
+}
diff --git a/regression-tests/pure2-regex_04_start_end.cpp2 b/regression-tests/pure2-regex_04_start_end.cpp2
new file mode 100644
index 0000000000..31db32c85d
--- /dev/null
+++ b/regression-tests/pure2-regex_04_start_end.cpp2
@@ -0,0 +1,179 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_04_start_end: @regex type = {
+  regex_01 := R"(^abc$)";
+  regex_02 := R"(^abc$)";
+  regex_03 := R"(^abc)";
+  regex_04 := R"(^abc$)";
+  regex_05 := R"(abc$)";
+  regex_06 := R"(abc$)";
+  regex_07 := R"(^)";
+  regex_08 := R"($)";
+  regex_09 := R"($b)";
+  run: (this) = {
+    std::cout << "Running tests_04_start_end:"<< std::endl;
+    test(regex_01, "01", R"(^abc$)", "abc", "y", R"($&)", "abc");
+    test(regex_02, "02", R"(^abc$)", "abcc", "n", R"(-)", "-");
+    test(regex_03, "03", R"(^abc)", "abcc", "y", R"($&)", "abc");
+    test(regex_04, "04", R"(^abc$)", "aabc", "n", R"(-)", "-");
+    test(regex_05, "05", R"(abc$)", "aabc", "y", R"($&)", "abc");
+    test(regex_06, "06", R"(abc$)", "aabcd", "n", R"(-)", "-");
+    test(regex_07, "07", R"(^)", "abc", "y", R"($&)", "");
+    test(regex_08, "08", R"($)", "abc", "y", R"($&)", "");
+    test(regex_09, "09", R"($b)", "b", "n", R"(-)", "-");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_04_start_end().run();
+}
diff --git a/regression-tests/pure2-regex_05_classes.cpp2 b/regression-tests/pure2-regex_05_classes.cpp2
new file mode 100644
index 0000000000..8be092235a
--- /dev/null
+++ b/regression-tests/pure2-regex_05_classes.cpp2
@@ -0,0 +1,199 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_05_classes: @regex type = {
+  regex_01 := R"(a[bc]d)";
+  regex_02 := R"(a[bc]d)";
+  regex_03 := R"(a[b]d)";
+  regex_04 := R"([a][b][d])";
+  regex_05 := R"(.[b].)";
+  regex_06 := R"(.[b].)";
+  regex_07 := R"(a[b-d]e)";
+  regex_08 := R"(a[b-d]e)";
+  regex_09 := R"(a[b-d])";
+  regex_10 := R"(a[-b])";
+  regex_11 := R"(a[b-])";
+  regex_12 := R"(a])";
+  regex_13 := R"(a[]]b)";
+  regex_14 := R"(a[^bc]d)";
+  regex_15 := R"(a[^bc]d)";
+  regex_16 := R"(a[^-b]c)";
+  regex_17 := R"(a[^-b]c)";
+  regex_18 := R"(a[^]b]c)";
+  regex_19 := R"(a[^]b]c)";
+  run: (this) = {
+    std::cout << "Running tests_05_classes:"<< std::endl;
+    test(regex_01, "01", R"(a[bc]d)", "abc", "n", R"(-)", "-");
+    test(regex_02, "02", R"(a[bc]d)", "abd", "y", R"($&)", "abd");
+    test(regex_03, "03", R"(a[b]d)", "abd", "y", R"($&)", "abd");
+    test(regex_04, "04", R"([a][b][d])", "abd", "y", R"($&)", "abd");
+    test(regex_05, "05", R"(.[b].)", "abd", "y", R"($&)", "abd");
+    test(regex_06, "06", R"(.[b].)", "aBd", "n", R"(-)", "-");
+    test(regex_07, "07", R"(a[b-d]e)", "abd", "n", R"(-)", "-");
+    test(regex_08, "08", R"(a[b-d]e)", "ace", "y", R"($&)", "ace");
+    test(regex_09, "09", R"(a[b-d])", "aac", "y", R"($&)", "ac");
+    test(regex_10, "10", R"(a[-b])", "a-", "y", R"($&)", "a-");
+    test(regex_11, "11", R"(a[b-])", "a-", "y", R"($&)", "a-");
+    test(regex_12, "12", R"(a])", "a]", "y", R"($&)", "a]");
+    test(regex_13, "13", R"(a[]]b)", "a]b", "y", R"($&)", "a]b");
+    test(regex_14, "14", R"(a[^bc]d)", "aed", "y", R"($&)", "aed");
+    test(regex_15, "15", R"(a[^bc]d)", "abd", "n", R"(-)", "-");
+    test(regex_16, "16", R"(a[^-b]c)", "adc", "y", R"($&)", "adc");
+    test(regex_17, "17", R"(a[^-b]c)", "a-c", "n", R"(-)", "-");
+    test(regex_18, "18", R"(a[^]b]c)", "a]c", "n", R"(-)", "-");
+    test(regex_19, "19", R"(a[^]b]c)", "adc", "y", R"($&)", "adc");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_05_classes().run();
+}
diff --git a/regression-tests/pure2-regex_06_boundaries.cpp2 b/regression-tests/pure2-regex_06_boundaries.cpp2
new file mode 100644
index 0000000000..fdef8e1c32
--- /dev/null
+++ b/regression-tests/pure2-regex_06_boundaries.cpp2
@@ -0,0 +1,195 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_06_boundaries: @regex type = {
+  regex_01 := R"(\ba\b)";
+  regex_02 := R"(\ba\b)";
+  regex_03 := R"(\ba\b)";
+  regex_04 := R"(\by\b)";
+  regex_05 := R"(\by\b)";
+  regex_06 := R"(\by\b)";
+  regex_07 := R"(\Ba\B)";
+  regex_08 := R"(\Ba\B)";
+  regex_09 := R"(\Ba\B)";
+  regex_10 := R"(\By\b)";
+  regex_11 := R"(\By\b)";
+  regex_12 := R"(\By\b)";
+  regex_13 := R"(\By\b)";
+  regex_14 := R"(\by\B)";
+  regex_15 := R"(\By\B)";
+  regex_16 := R"(\b)";
+  regex_17 := R"(\B)";
+  run: (this) = {
+    std::cout << "Running tests_06_boundaries:"<< std::endl;
+    test(regex_01, "01", R"(\ba\b)", "a-", "y", R"(-)", "-");
+    test(regex_02, "02", R"(\ba\b)", "-a", "y", R"(-)", "-");
+    test(regex_03, "03", R"(\ba\b)", "-a-", "y", R"(-)", "-");
+    test(regex_04, "04", R"(\by\b)", "xy", "n", R"(-)", "-");
+    test(regex_05, "05", R"(\by\b)", "yz", "n", R"(-)", "-");
+    test(regex_06, "06", R"(\by\b)", "xyz", "n", R"(-)", "-");
+    test(regex_07, "07", R"(\Ba\B)", "a-", "n", R"(-)", "-");
+    test(regex_08, "08", R"(\Ba\B)", "-a", "n", R"(-)", "-");
+    test(regex_09, "09", R"(\Ba\B)", "-a-", "n", R"(-)", "-");
+    test(regex_10, "10", R"(\By\b)", "xy", "y", R"(-)", "-");
+    test(regex_11, "11", R"(\By\b)", "xy", "y", R"($-[0])", "1");
+    test(regex_12, "12", R"(\By\b)", "xy", "y", R"($+[0])", "2");
+    test(regex_13, "13", R"(\By\b)", "xy", "y", R"(-)", "-");
+    test(regex_14, "14", R"(\by\B)", "yz", "y", R"(-)", "-");
+    test(regex_15, "15", R"(\By\B)", "xyz", "y", R"(-)", "-");
+    test(regex_16, "16", R"(\b)", "", "n", R"(-)", "-");
+    test(regex_17, "17", R"(\B)", "", "y", R"(-)", "-");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_06_boundaries().run();
+}
diff --git a/regression-tests/pure2-regex_07_short_classes.cpp2 b/regression-tests/pure2-regex_07_short_classes.cpp2
new file mode 100644
index 0000000000..8e9b5b0242
--- /dev/null
+++ b/regression-tests/pure2-regex_07_short_classes.cpp2
@@ -0,0 +1,209 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_07_short_classes: @regex type = {
+  regex_01 := R"(\w)";
+  regex_02 := R"(\w)";
+  regex_03 := R"(\W)";
+  regex_04 := R"(\W)";
+  regex_05 := R"(a\sb)";
+  regex_06 := R"(a\sb)";
+  regex_07 := R"(a\Sb)";
+  regex_08 := R"(a\Sb)";
+  regex_09 := R"(\d)";
+  regex_10 := R"(\d)";
+  regex_11 := R"(\D)";
+  regex_12 := R"(\D)";
+  regex_13 := R"([\w])";
+  regex_14 := R"([\w])";
+  regex_15 := R"([\W])";
+  regex_16 := R"([\W])";
+  regex_17 := R"(a[\s]b)";
+  regex_18 := R"(a[\s]b)";
+  regex_19 := R"(a[\S]b)";
+  regex_20 := R"(a[\S]b)";
+  regex_21 := R"([\d])";
+  regex_22 := R"([\d])";
+  regex_23 := R"([\D])";
+  regex_24 := R"([\D])";
+  run: (this) = {
+    std::cout << "Running tests_07_short_classes:"<< std::endl;
+    test(regex_01, "01", R"(\w)", "a", "y", R"(-)", "-");
+    test(regex_02, "02", R"(\w)", "-", "n", R"(-)", "-");
+    test(regex_03, "03", R"(\W)", "a", "n", R"(-)", "-");
+    test(regex_04, "04", R"(\W)", "-", "y", R"(-)", "-");
+    test(regex_05, "05", R"(a\sb)", "a b", "y", R"(-)", "-");
+    test(regex_06, "06", R"(a\sb)", "a-b", "n", R"(-)", "-");
+    test(regex_07, "07", R"(a\Sb)", "a b", "n", R"(-)", "-");
+    test(regex_08, "08", R"(a\Sb)", "a-b", "y", R"(-)", "-");
+    test(regex_09, "09", R"(\d)", "1", "y", R"(-)", "-");
+    test(regex_10, "10", R"(\d)", "-", "n", R"(-)", "-");
+    test(regex_11, "11", R"(\D)", "1", "n", R"(-)", "-");
+    test(regex_12, "12", R"(\D)", "-", "y", R"(-)", "-");
+    test(regex_13, "13", R"([\w])", "a", "y", R"(-)", "-");
+    test(regex_14, "14", R"([\w])", "-", "n", R"(-)", "-");
+    test(regex_15, "15", R"([\W])", "a", "n", R"(-)", "-");
+    test(regex_16, "16", R"([\W])", "-", "y", R"(-)", "-");
+    test(regex_17, "17", R"(a[\s]b)", "a b", "y", R"(-)", "-");
+    test(regex_18, "18", R"(a[\s]b)", "a-b", "n", R"(-)", "-");
+    test(regex_19, "19", R"(a[\S]b)", "a b", "n", R"(-)", "-");
+    test(regex_20, "20", R"(a[\S]b)", "a-b", "y", R"(-)", "-");
+    test(regex_21, "21", R"([\d])", "1", "y", R"(-)", "-");
+    test(regex_22, "22", R"([\d])", "-", "n", R"(-)", "-");
+    test(regex_23, "23", R"([\D])", "1", "n", R"(-)", "-");
+    test(regex_24, "24", R"([\D])", "-", "y", R"(-)", "-");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_07_short_classes().run();
+}
diff --git a/regression-tests/pure2-regex_08_alternatives.cpp2 b/regression-tests/pure2-regex_08_alternatives.cpp2
new file mode 100644
index 0000000000..0ff9f7c67e
--- /dev/null
+++ b/regression-tests/pure2-regex_08_alternatives.cpp2
@@ -0,0 +1,165 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_08_alternatives: @regex type = {
+  regex_01 := R"(ab|cd)";
+  regex_02 := R"(ab|cd)";
+  run: (this) = {
+    std::cout << "Running tests_08_alternatives:"<< std::endl;
+    test(regex_01, "01", R"(ab|cd)", "abc", "y", R"($&)", "ab");
+    test(regex_02, "02", R"(ab|cd)", "abcd", "y", R"($&)", "ab");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_08_alternatives().run();
+}
diff --git a/regression-tests/pure2-regex_09_groups.cpp2 b/regression-tests/pure2-regex_09_groups.cpp2
new file mode 100644
index 0000000000..580391b51b
--- /dev/null
+++ b/regression-tests/pure2-regex_09_groups.cpp2
@@ -0,0 +1,183 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_09_groups: @regex type = {
+  regex_01 := R"(()ef)";
+  regex_02 := R"(()ef)";
+  regex_03 := R"(()ef)";
+  regex_04 := R"(()ef)";
+  regex_05 := R"(()ef)";
+  regex_06 := R"(((a)))";
+  regex_07 := R"(((a)))";
+  regex_08 := R"(((a)))";
+  regex_09 := R"((a)b(c))";
+  regex_10 := R"((a)b(c))";
+  regex_11 := R"((a)b(c))";
+  run: (this) = {
+    std::cout << "Running tests_09_groups:"<< std::endl;
+    test(regex_01, "01", R"(()ef)", "def", "y", R"($&-$1)", "ef-");
+    test(regex_02, "02", R"(()ef)", "def", "y", R"($-[0])", "1");
+    test(regex_03, "03", R"(()ef)", "def", "y", R"($+[0])", "3");
+    test(regex_04, "04", R"(()ef)", "def", "y", R"($-[1])", "1");
+    test(regex_05, "05", R"(()ef)", "def", "y", R"($+[1])", "1");
+    test(regex_06, "06", R"(((a)))", "abc", "y", R"($&-$1-$2)", "a-a-a");
+    test(regex_07, "07", R"(((a)))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-0");
+    test(regex_08, "08", R"(((a)))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "1-1-1");
+    test(regex_09, "09", R"((a)b(c))", "abc", "y", R"($&-$1-$2)", "abc-a-c");
+    test(regex_10, "10", R"((a)b(c))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-2");
+    test(regex_11, "11", R"((a)b(c))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "3-1-3");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_09_groups().run();
+}
diff --git a/regression-tests/pure2-regex_10_escapes.cpp2 b/regression-tests/pure2-regex_10_escapes.cpp2
new file mode 100644
index 0000000000..2d67da8fb4
--- /dev/null
+++ b/regression-tests/pure2-regex_10_escapes.cpp2
@@ -0,0 +1,201 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_10_escapes: @regex type = {
+  regex_01 := R"(a\(b)";
+  regex_02 := R"(a\(*b)";
+  regex_03 := R"(a\(*b)";
+  regex_04 := R"(a\\b)";
+  regex_05 := R"(foo(\h+)bar)";
+  regex_06 := R"((\H+)(\h))";
+  regex_07 := R"((\h+)(\H))";
+  regex_08 := R"(foo(\h)bar)";
+  regex_09 := R"((\H)(\h))";
+  regex_10 := R"((\h)(\H))";
+  regex_11 := R"(foo(\v+)bar)";
+  regex_12 := R"((\V+)(\v))";
+  regex_13 := R"((\v+)(\V))";
+  regex_14 := R"(foo(\v)bar)";
+  regex_15 := R"((\V)(\v))";
+  regex_16 := R"((\v)(\V))";
+  regex_17 := R"(foo\t\n\r\f\a\ebar)";
+  regex_18 := R"(foo\Kbar)";
+  regex_19 := R"(\x41\x42)";
+  regex_20 := R"(\101\o{102})";
+  run: (this) = {
+    std::cout << "Running tests_10_escapes:"<< std::endl;
+    test(regex_01, "01", R"(a\(b)", "a(b", "y", R"($&-$1)", "a(b-");
+    test(regex_02, "02", R"(a\(*b)", "ab", "y", R"($&)", "ab");
+    test(regex_03, "03", R"(a\(*b)", "a((b", "y", R"($&)", "a((b");
+    test(regex_04, "04", R"(a\\b)", "a\\b", "y", R"($&)", "a\\b");
+    test(regex_05, "05", R"(foo(\h+)bar)", "foo\tbar", "y", R"($1)", "\t");
+    test(regex_06, "06", R"((\H+)(\h))", "foo\tbar", "y", R"($1-$2)", "foo-\t");
+    test(regex_07, "07", R"((\h+)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b");
+    test(regex_08, "08", R"(foo(\h)bar)", "foo\tbar", "y", R"($1)", "\t");
+    test(regex_09, "09", R"((\H)(\h))", "foo\tbar", "y", R"($1-$2)", "o-\t");
+    test(regex_10, "10", R"((\h)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b");
+    test(regex_11, "11", R"(foo(\v+)bar)", "foo\r\n\r\n\nbar", "y", R"($1)", "\r\n\r\n\n");
+    test(regex_12, "12", R"((\V+)(\v))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "foo-\r");
+    test(regex_13, "13", R"((\v+)(\V))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "\r\n\r\n\n-b");
+    test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r");
+    test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r");
+    test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b");
+    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a\ebar", "y", R"($&)", "foo\t\n\r\f\a\ebar");
+    test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar");
+    test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB");
+    test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_10_escapes().run();
+}
diff --git a/regression-tests/pure2-regex_11_group_references.cpp2 b/regression-tests/pure2-regex_11_group_references.cpp2
new file mode 100644
index 0000000000..076f98d773
--- /dev/null
+++ b/regression-tests/pure2-regex_11_group_references.cpp2
@@ -0,0 +1,209 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_11_group_references: @regex type = {
+  regex_01 := R"((foo)(\g-2))";
+  regex_02 := R"((foo)(\g-2)(foo)(\g-2))";
+  regex_03 := R"((([abc]+) \g-1)(([abc]+) \g{-1}))";
+  regex_04 := R"((a)(b)(c)\g1\g2\g3)";
+  regex_05 := R"(/(?'n'foo) \g{n}/)";
+  regex_06 := R"(/(?'n'foo) \g{ n }/)";
+  regex_07 := R"(/(?'n'foo) \g{n}/)";
+  regex_08 := R"(/(?foo) \g{n}/)";
+  regex_09 := R"(/(?foo) \g{n}/)";
+  regex_10 := R"(/(?as) (\w+) \g{as} (\w+)/)";
+  regex_11 := R"(/(?'n'foo) \k/)";
+  regex_12 := R"(/(?'n'foo) \k/)";
+  regex_13 := R"(/(?foo) \k'n'/)";
+  regex_14 := R"(/(?foo) \k'n'/)";
+  regex_15 := R"(/(?'a1'foo) \k'a1'/)";
+  regex_16 := R"(/(?foo) \k/)";
+  regex_17 := R"(/(?'_'foo) \k'_'/)";
+  regex_18 := R"(/(?<_>foo) \k<_>/)";
+  regex_19 := R"(/(?'_0_'foo) \k'_0_'/)";
+  regex_20 := R"(/(?<_0_>foo) \k<_0_>/)";
+  regex_21 := R"(/(?as) (\w+) \k (\w+)/)";
+  regex_22 := R"(/(?as) (\w+) \k{as} (\w+)/)";
+  regex_23 := R"(/(?as) (\w+) \k'as' (\w+)/)";
+  regex_24 := R"(/(?as) (\w+) \k{ as } (\w+)/)";
+  run: (this) = {
+    std::cout << "Running tests_11_group_references:"<< std::endl;
+    test(regex_01, "01", R"((foo)(\g-2))", "foofoo", "y", R"($1-$2)", "foo-foo");
+    test(regex_02, "02", R"((foo)(\g-2)(foo)(\g-2))", "foofoofoofoo", "y", R"($1-$2-$3-$4)", "foo-foo-foo-foo");
+    test(regex_03, "03", R"((([abc]+) \g-1)(([abc]+) \g{-1}))", "abc abccba cba", "y", R"($2-$4)", "abc-cba");
+    test(regex_04, "04", R"((a)(b)(c)\g1\g2\g3)", "abcabc", "y", R"($1$2$3)", "abc");
+    test(regex_05, "05", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_06, "06", R"(/(?'n'foo) \g{ n }/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_07, "07", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_08, "08", R"(/(?foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_09, "09", R"(/(?foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_10, "10", R"(/(?as) (\w+) \g{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_11, "11", R"(/(?'n'foo) \k/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_12, "12", R"(/(?'n'foo) \k/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_13, "13", R"(/(?foo) \k'n'/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_14, "14", R"(/(?foo) \k'n'/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_15, "15", R"(/(?'a1'foo) \k'a1'/)", "..foo foo..", "yM", R"($+{a1})", "foo");
+    test(regex_16, "16", R"(/(?foo) \k/)", "..foo foo..", "yM", R"($+{a1})", "foo");
+    test(regex_17, "17", R"(/(?'_'foo) \k'_'/)", "..foo foo..", "yM", R"($+{_})", "foo");
+    test(regex_18, "18", R"(/(?<_>foo) \k<_>/)", "..foo foo..", "yM", R"($+{_})", "foo");
+    test(regex_19, "19", R"(/(?'_0_'foo) \k'_0_'/)", "..foo foo..", "yM", R"($+{_0_})", "foo");
+    test(regex_20, "20", R"(/(?<_0_>foo) \k<_0_>/)", "..foo foo..", "yM", R"($+{_0_})", "foo");
+    test(regex_21, "21", R"(/(?as) (\w+) \k (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_22, "22", R"(/(?as) (\w+) \k{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_23, "23", R"(/(?as) (\w+) \k'as' (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_24, "24", R"(/(?as) (\w+) \k{ as } (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_11_group_references().run();
+}
diff --git a/regression-tests/pure2-regex_12_case_insensitive.cpp2 b/regression-tests/pure2-regex_12_case_insensitive.cpp2
new file mode 100644
index 0000000000..a6610b10ef
--- /dev/null
+++ b/regression-tests/pure2-regex_12_case_insensitive.cpp2
@@ -0,0 +1,399 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_12_case_insensitive: @regex type = {
+  regex_01 := R"('abc'i)";
+  regex_02 := R"('abc'i)";
+  regex_03 := R"('abc'i)";
+  regex_04 := R"('abc'i)";
+  regex_05 := R"('abc'i)";
+  regex_06 := R"('abc'i)";
+  regex_07 := R"('ab*c'i)";
+  regex_08 := R"('ab*bc'i)";
+  regex_09 := R"('ab*bc'i)";
+  regex_10 := R"('ab*?bc'i)";
+  regex_11 := R"('ab{0,}?bc'i)";
+  regex_12 := R"('ab+?bc'i)";
+  regex_13 := R"('ab+bc'i)";
+  regex_14 := R"('ab+bc'i)";
+  regex_15 := R"('ab{1,}bc'i)";
+  regex_16 := R"('ab+bc'i)";
+  regex_17 := R"('ab{1,}?bc'i)";
+  regex_18 := R"('ab{1,3}?bc'i)";
+  regex_19 := R"('ab{3,4}?bc'i)";
+  regex_20 := R"('ab{4,5}?bc'i)";
+  regex_21 := R"('ab??bc'i)";
+  regex_22 := R"('ab??bc'i)";
+  regex_23 := R"('ab{0,1}?bc'i)";
+  regex_24 := R"('ab??bc'i)";
+  regex_25 := R"('ab??c'i)";
+  regex_26 := R"('ab{0,1}?c'i)";
+  regex_27 := R"('^abc$'i)";
+  regex_28 := R"('^abc$'i)";
+  regex_29 := R"('^abc'i)";
+  regex_30 := R"('^abc$'i)";
+  regex_31 := R"('abc$'i)";
+  regex_32 := R"('^'i)";
+  regex_33 := R"('$'i)";
+  regex_34 := R"('a.c'i)";
+  regex_35 := R"('a.c'i)";
+  regex_36 := R"('a\Nc'i)";
+  regex_37 := R"('a.*?c'i)";
+  regex_38 := R"('a.*c'i)";
+  regex_39 := R"('a[bc]d'i)";
+  regex_40 := R"('a[bc]d'i)";
+  regex_41 := R"('a[b-d]e'i)";
+  regex_42 := R"('a[b-d]e'i)";
+  regex_43 := R"('a[b-d]'i)";
+  regex_44 := R"('a[-b]'i)";
+  regex_45 := R"('a[b-]'i)";
+  regex_46 := R"('a]'i)";
+  regex_47 := R"('a[]]b'i)";
+  regex_48 := R"('a[^bc]d'i)";
+  regex_49 := R"('a[^bc]d'i)";
+  regex_50 := R"('a[^-b]c'i)";
+  regex_51 := R"('a[^-b]c'i)";
+  regex_52 := R"('a[^]b]c'i)";
+  regex_53 := R"('a[^]b]c'i)";
+  regex_54 := R"('ab|cd'i)";
+  regex_55 := R"('ab|cd'i)";
+  regex_56 := R"('()ef'i)";
+  regex_57 := R"('$b'i)";
+  regex_58 := R"('a\(b'i)";
+  regex_59 := R"('a\(*b'i)";
+  regex_60 := R"('a\(*b'i)";
+  regex_61 := R"('a\\b'i)";
+  regex_62 := R"('((a))'i)";
+  regex_63 := R"('(a)b(c)'i)";
+  regex_64 := R"('a+b+c'i)";
+  regex_65 := R"('a{1,}b{1,}c'i)";
+  regex_66 := R"('a.+?c'i)";
+  regex_67 := R"('a.*?c'i)";
+  regex_68 := R"('a.{0,5}?c'i)";
+  regex_69 := R"('(a+|b)*'i)";
+  regex_70 := R"('(a+|b){0,}'i)";
+  regex_71 := R"('(a+|b)+'i)";
+  regex_72 := R"('(a+|b){1,}'i)";
+  regex_73 := R"('(a+|b)?'i)";
+  regex_74 := R"('(a+|b){0,1}'i)";
+  regex_75 := R"('(a+|b){0,1}?'i)";
+  regex_76 := R"('[^ab]*'i)";
+  regex_77 := R"('abc'i)";
+  regex_78 := R"('a*'i)";
+  regex_79 := R"('([abc])*d'i)";
+  regex_80 := R"('([abc])*bcd'i)";
+  regex_81 := R"('a|b|c|d|e'i)";
+  regex_82 := R"('(a|b|c|d|e)f'i)";
+  regex_83 := R"('abcd*efg'i)";
+  regex_84 := R"('ab*'i)";
+  regex_85 := R"('ab*'i)";
+  regex_86 := R"('(ab|cd)e'i)";
+  regex_87 := R"('[abhgefdc]ij'i)";
+  regex_88 := R"('^(ab|cd)e'i)";
+  regex_89 := R"('(abc|)ef'i)";
+  regex_90 := R"('(a|b)c*d'i)";
+  regex_91 := R"('(ab|ab*)bc'i)";
+  regex_92 := R"('a([bc]*)c*'i)";
+  regex_93 := R"('a([bc]*)(c*d)'i)";
+  regex_94 := R"('a([bc]+)(c*d)'i)";
+  regex_95 := R"('a([bc]*)(c+d)'i)";
+  regex_96 := R"('a[bcd]*dcdcde'i)";
+  regex_97 := R"('a[bcd]+dcdcde'i)";
+  regex_98 := R"('(ab|a)b*c'i)";
+  regex_99 := R"('((a)(b)c)(d)'i)";
+  regex_100 := R"('[a-zA-Z_][a-zA-Z0-9_]*'i)";
+  regex_101 := R"('^a(bc+|b[eh])g|.h$'i)";
+  regex_102 := R"('(bc+d$|ef*g.|h?i(j|k))'i)";
+  regex_103 := R"('(bc+d$|ef*g.|h?i(j|k))'i)";
+  regex_104 := R"('(bc+d$|ef*g.|h?i(j|k))'i)";
+  regex_105 := R"('(bc+d$|ef*g.|h?i(j|k))'i)";
+  regex_106 := R"('(bc+d$|ef*g.|h?i(j|k))'i)";
+  regex_107 := R"('((((((((((a))))))))))'i)";
+  regex_108 := R"('((((((((((a))))))))))\10'i)";
+  regex_109 := R"('(((((((((a)))))))))'i)";
+  regex_110 := R"('multiple words of text'i)";
+  regex_111 := R"('multiple words'i)";
+  regex_112 := R"('(.*)c(.*)'i)";
+  regex_113 := R"('\((.*), (.*)\)'i)";
+  regex_114 := R"('[k]'i)";
+  regex_115 := R"('abcd'i)";
+  regex_116 := R"('a(bc)d'i)";
+  regex_117 := R"('a[-]?c'i)";
+  regex_118 := R"('(abc)\1'i)";
+  regex_119 := R"('([a-c]*)\1'i)";
+  run: (this) = {
+    std::cout << "Running tests_12_case_insensitive:"<< std::endl;
+    test(regex_01, "01", R"('abc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_02, "02", R"('abc'i)", "XBC", "n", R"(-)", "-");
+    test(regex_03, "03", R"('abc'i)", "AXC", "n", R"(-)", "-");
+    test(regex_04, "04", R"('abc'i)", "ABX", "n", R"(-)", "-");
+    test(regex_05, "05", R"('abc'i)", "XABCY", "y", R"($&)", "ABC");
+    test(regex_06, "06", R"('abc'i)", "ABABC", "y", R"($&)", "ABC");
+    test(regex_07, "07", R"('ab*c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_08, "08", R"('ab*bc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_09, "09", R"('ab*bc'i)", "ABBC", "y", R"($&)", "ABBC");
+    test(regex_10, "10", R"('ab*?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_11, "11", R"('ab{0,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_12, "12", R"('ab+?bc'i)", "ABBC", "y", R"($&)", "ABBC");
+    test(regex_13, "13", R"('ab+bc'i)", "ABC", "n", R"(-)", "-");
+    test(regex_14, "14", R"('ab+bc'i)", "ABQ", "n", R"(-)", "-");
+    test(regex_15, "15", R"('ab{1,}bc'i)", "ABQ", "n", R"(-)", "-");
+    test(regex_16, "16", R"('ab+bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_17, "17", R"('ab{1,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_18, "18", R"('ab{1,3}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_19, "19", R"('ab{3,4}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_20, "20", R"('ab{4,5}?bc'i)", "ABBBBC", "n", R"(-)", "-");
+    test(regex_21, "21", R"('ab??bc'i)", "ABBC", "y", R"($&)", "ABBC");
+    test(regex_22, "22", R"('ab??bc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_23, "23", R"('ab{0,1}?bc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_24, "24", R"('ab??bc'i)", "ABBBBC", "n", R"(-)", "-");
+    test(regex_25, "25", R"('ab??c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_26, "26", R"('ab{0,1}?c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_27, "27", R"('^abc$'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_28, "28", R"('^abc$'i)", "ABCC", "n", R"(-)", "-");
+    test(regex_29, "29", R"('^abc'i)", "ABCC", "y", R"($&)", "ABC");
+    test(regex_30, "30", R"('^abc$'i)", "AABC", "n", R"(-)", "-");
+    test(regex_31, "31", R"('abc$'i)", "AABC", "y", R"($&)", "ABC");
+    test(regex_32, "32", R"('^'i)", "ABC", "y", R"($&)", "");
+    test(regex_33, "33", R"('$'i)", "ABC", "y", R"($&)", "");
+    test(regex_34, "34", R"('a.c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_35, "35", R"('a.c'i)", "AXC", "y", R"($&)", "AXC");
+    test(regex_36, "36", R"('a\Nc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_37, "37", R"('a.*?c'i)", "AXYZC", "y", R"($&)", "AXYZC");
+    test(regex_38, "38", R"('a.*c'i)", "AXYZD", "n", R"(-)", "-");
+    test(regex_39, "39", R"('a[bc]d'i)", "ABC", "n", R"(-)", "-");
+    test(regex_40, "40", R"('a[bc]d'i)", "ABD", "y", R"($&)", "ABD");
+    test(regex_41, "41", R"('a[b-d]e'i)", "ABD", "n", R"(-)", "-");
+    test(regex_42, "42", R"('a[b-d]e'i)", "ACE", "y", R"($&)", "ACE");
+    test(regex_43, "43", R"('a[b-d]'i)", "AAC", "y", R"($&)", "AC");
+    test(regex_44, "44", R"('a[-b]'i)", "A-", "y", R"($&)", "A-");
+    test(regex_45, "45", R"('a[b-]'i)", "A-", "y", R"($&)", "A-");
+    test(regex_46, "46", R"('a]'i)", "A]", "y", R"($&)", "A]");
+    test(regex_47, "47", R"('a[]]b'i)", "A]B", "y", R"($&)", "A]B");
+    test(regex_48, "48", R"('a[^bc]d'i)", "AED", "y", R"($&)", "AED");
+    test(regex_49, "49", R"('a[^bc]d'i)", "ABD", "n", R"(-)", "-");
+    test(regex_50, "50", R"('a[^-b]c'i)", "ADC", "y", R"($&)", "ADC");
+    test(regex_51, "51", R"('a[^-b]c'i)", "A-C", "n", R"(-)", "-");
+    test(regex_52, "52", R"('a[^]b]c'i)", "A]C", "n", R"(-)", "-");
+    test(regex_53, "53", R"('a[^]b]c'i)", "ADC", "y", R"($&)", "ADC");
+    test(regex_54, "54", R"('ab|cd'i)", "ABC", "y", R"($&)", "AB");
+    test(regex_55, "55", R"('ab|cd'i)", "ABCD", "y", R"($&)", "AB");
+    test(regex_56, "56", R"('()ef'i)", "DEF", "y", R"($&-$1)", "EF-");
+    test(regex_57, "57", R"('$b'i)", "B", "n", R"(-)", "-");
+    test(regex_58, "58", R"('a\(b'i)", "A(B", "y", R"($&-$1)", "A(B-");
+    test(regex_59, "59", R"('a\(*b'i)", "AB", "y", R"($&)", "AB");
+    test(regex_60, "60", R"('a\(*b'i)", "A((B", "y", R"($&)", "A((B");
+    test(regex_61, "61", R"('a\\b'i)", "A\\B", "y", R"($&)", "A\\B");
+    test(regex_62, "62", R"('((a))'i)", "ABC", "y", R"($&-$1-$2)", "A-A-A");
+    test(regex_63, "63", R"('(a)b(c)'i)", "ABC", "y", R"($&-$1-$2)", "ABC-A-C");
+    test(regex_64, "64", R"('a+b+c'i)", "AABBABC", "y", R"($&)", "ABC");
+    test(regex_65, "65", R"('a{1,}b{1,}c'i)", "AABBABC", "y", R"($&)", "ABC");
+    test(regex_66, "66", R"('a.+?c'i)", "ABCABC", "y", R"($&)", "ABC");
+    test(regex_67, "67", R"('a.*?c'i)", "ABCABC", "y", R"($&)", "ABC");
+    test(regex_68, "68", R"('a.{0,5}?c'i)", "ABCABC", "y", R"($&)", "ABC");
+    test(regex_69, "69", R"('(a+|b)*'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_70, "70", R"('(a+|b){0,}'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_71, "71", R"('(a+|b)+'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_72, "72", R"('(a+|b){1,}'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_73, "73", R"('(a+|b)?'i)", "AB", "y", R"($&-$1)", "A-A");
+    test(regex_74, "74", R"('(a+|b){0,1}'i)", "AB", "y", R"($&-$1)", "A-A");
+    test(regex_75, "75", R"('(a+|b){0,1}?'i)", "AB", "y", R"($&-$1)", "-");
+    test(regex_76, "76", R"('[^ab]*'i)", "CDE", "y", R"($&)", "CDE");
+    test(regex_77, "77", R"('abc'i)", "", "n", R"(-)", "-");
+    test(regex_78, "78", R"('a*'i)", "", "y", R"($&)", "");
+    test(regex_79, "79", R"('([abc])*d'i)", "ABBBCD", "y", R"($&-$1)", "ABBBCD-C");
+    test(regex_80, "80", R"('([abc])*bcd'i)", "ABCD", "y", R"($&-$1)", "ABCD-A");
+    test(regex_81, "81", R"('a|b|c|d|e'i)", "E", "y", R"($&)", "E");
+    test(regex_82, "82", R"('(a|b|c|d|e)f'i)", "EF", "y", R"($&-$1)", "EF-E");
+    test(regex_83, "83", R"('abcd*efg'i)", "ABCDEFG", "y", R"($&)", "ABCDEFG");
+    test(regex_84, "84", R"('ab*'i)", "XABYABBBZ", "y", R"($&)", "AB");
+    test(regex_85, "85", R"('ab*'i)", "XAYABBBZ", "y", R"($&)", "A");
+    test(regex_86, "86", R"('(ab|cd)e'i)", "ABCDE", "y", R"($&-$1)", "CDE-CD");
+    test(regex_87, "87", R"('[abhgefdc]ij'i)", "HIJ", "y", R"($&)", "HIJ");
+    test(regex_88, "88", R"('^(ab|cd)e'i)", "ABCDE", "n", R"(x$1y)", "XY");
+    test(regex_89, "89", R"('(abc|)ef'i)", "ABCDEF", "y", R"($&-$1)", "EF-");
+    test(regex_90, "90", R"('(a|b)c*d'i)", "ABCD", "y", R"($&-$1)", "BCD-B");
+    test(regex_91, "91", R"('(ab|ab*)bc'i)", "ABC", "y", R"($&-$1)", "ABC-A");
+    test(regex_92, "92", R"('a([bc]*)c*'i)", "ABC", "y", R"($&-$1)", "ABC-BC");
+    test(regex_93, "93", R"('a([bc]*)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D");
+    test(regex_94, "94", R"('a([bc]+)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D");
+    test(regex_95, "95", R"('a([bc]*)(c+d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-B-CD");
+    test(regex_96, "96", R"('a[bcd]*dcdcde'i)", "ADCDCDE", "y", R"($&)", "ADCDCDE");
+    test(regex_97, "97", R"('a[bcd]+dcdcde'i)", "ADCDCDE", "n", R"(-)", "-");
+    test(regex_98, "98", R"('(ab|a)b*c'i)", "ABC", "y", R"($&-$1)", "ABC-AB");
+    test(regex_99, "99", R"('((a)(b)c)(d)'i)", "ABCD", "y", R"($1-$2-$3-$4)", "ABC-A-B-D");
+    test(regex_100, "100", R"('[a-zA-Z_][a-zA-Z0-9_]*'i)", "ALPHA", "y", R"($&)", "ALPHA");
+    test(regex_101, "101", R"('^a(bc+|b[eh])g|.h$'i)", "ABH", "y", R"($&-$1)", "BH-");
+    test(regex_102, "102", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-");
+    test(regex_103, "103", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "IJ", "y", R"($&-$1-$2)", "IJ-IJ-J");
+    test(regex_104, "104", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFG", "n", R"(-)", "-");
+    test(regex_105, "105", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "BCDD", "n", R"(-)", "-");
+    test(regex_106, "106", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "REFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-");
+    test(regex_107, "107", R"('((((((((((a))))))))))'i)", "A", "y", R"($10)", "A");
+    test(regex_108, "108", R"('((((((((((a))))))))))\10'i)", "AA", "y", R"($&)", "AA");
+    test(regex_109, "109", R"('(((((((((a)))))))))'i)", "A", "y", R"($&)", "A");
+    test(regex_110, "110", R"('multiple words of text'i)", "UH-UH", "n", R"(-)", "-");
+    test(regex_111, "111", R"('multiple words'i)", "MULTIPLE WORDS, YEAH", "y", R"($&)", "MULTIPLE WORDS");
+    test(regex_112, "112", R"('(.*)c(.*)'i)", "ABCDE", "y", R"($&-$1-$2)", "ABCDE-AB-DE");
+    test(regex_113, "113", R"('\((.*), (.*)\)'i)", "(A, B)", "y", R"(($2, $1))", "(B, A)");
+    test(regex_114, "114", R"('[k]'i)", "AB", "n", R"(-)", "-");
+    test(regex_115, "115", R"('abcd'i)", "ABCD", "y", R"($&)", "ABCD");
+    test(regex_116, "116", R"('a(bc)d'i)", "ABCD", "y", R"($1)", "BC");
+    test(regex_117, "117", R"('a[-]?c'i)", "AC", "y", R"($&)", "AC");
+    test(regex_118, "118", R"('(abc)\1'i)", "ABCABC", "y", R"($1)", "ABC");
+    test(regex_119, "119", R"('([a-c]*)\1'i)", "ABCABC", "y", R"($1)", "ABC");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_12_case_insensitive().run();
+}
diff --git a/regression-tests/pure2-regex_13_posessive_modifier.cpp2 b/regression-tests/pure2-regex_13_posessive_modifier.cpp2
new file mode 100644
index 0000000000..688fe8aa1b
--- /dev/null
+++ b/regression-tests/pure2-regex_13_posessive_modifier.cpp2
@@ -0,0 +1,257 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_13_posessive_modifier: @regex type = {
+  regex_01 := R"(a++a)";
+  regex_02 := R"(a*+a)";
+  regex_03 := R"(a{1,5}+a)";
+  regex_04 := R"(a?+a)";
+  regex_05 := R"(a++b)";
+  regex_06 := R"(a*+b)";
+  regex_07 := R"(a{1,5}+b)";
+  regex_08 := R"(a?+b)";
+  regex_09 := R"(fooa++a)";
+  regex_10 := R"(fooa*+a)";
+  regex_11 := R"(fooa{1,5}+a)";
+  regex_12 := R"(fooa?+a)";
+  regex_13 := R"(fooa++b)";
+  regex_14 := R"(fooa*+b)";
+  regex_15 := R"(fooa{1,5}+b)";
+  regex_16 := R"(fooa?+b)";
+  regex_17 := R"((aA)++(aA))";
+  regex_18 := R"((aA|bB)++(aA|bB))";
+  regex_19 := R"((aA)*+(aA))";
+  regex_20 := R"((aA|bB)*+(aA|bB))";
+  regex_21 := R"((aA){1,5}+(aA))";
+  regex_22 := R"((aA|bB){1,5}+(aA|bB))";
+  regex_23 := R"((aA)?+(aA))";
+  regex_24 := R"((aA|bB)?+(aA|bB))";
+  regex_25 := R"((aA)++b)";
+  regex_26 := R"((aA|bB)++b)";
+  regex_27 := R"((aA)*+b)";
+  regex_28 := R"((aA|bB)*+b)";
+  regex_29 := R"((aA){1,5}+b)";
+  regex_30 := R"((aA|bB){1,5}+b)";
+  regex_31 := R"((aA)?+b)";
+  regex_32 := R"((aA|bB)?+b)";
+  regex_33 := R"(foo(aA)++(aA))";
+  regex_34 := R"(foo(aA|bB)++(aA|bB))";
+  regex_35 := R"(foo(aA)*+(aA))";
+  regex_36 := R"(foo(aA|bB)*+(aA|bB))";
+  regex_37 := R"(foo(aA){1,5}+(aA))";
+  regex_38 := R"(foo(aA|bB){1,5}+(aA|bB))";
+  regex_39 := R"(foo(aA)?+(aA))";
+  regex_40 := R"(foo(aA|bB)?+(aA|bB))";
+  regex_41 := R"(foo(aA)++b)";
+  regex_42 := R"(foo(aA|bB)++b)";
+  regex_43 := R"(foo(aA)*+b)";
+  regex_44 := R"(foo(aA|bB)*+b)";
+  regex_45 := R"(foo(aA){1,5}+b)";
+  regex_46 := R"(foo(aA|bB){1,5}+b)";
+  regex_47 := R"(foo(aA)?+b)";
+  regex_48 := R"(foo(aA|bB)?+b)";
+  run: (this) = {
+    std::cout << "Running tests_13_posessive_modifier:"<< std::endl;
+    test(regex_01, "01", R"(a++a)", "aaaaa", "n", R"(-)", "-");
+    test(regex_02, "02", R"(a*+a)", "aaaaa", "n", R"(-)", "-");
+    test(regex_03, "03", R"(a{1,5}+a)", "aaaaa", "n", R"(-)", "-");
+    test(regex_04, "04", R"(a?+a)", "ab", "n", R"(-)", "-");
+    test(regex_05, "05", R"(a++b)", "aaaaab", "y", R"($&)", "aaaaab");
+    test(regex_06, "06", R"(a*+b)", "aaaaab", "y", R"($&)", "aaaaab");
+    test(regex_07, "07", R"(a{1,5}+b)", "aaaaab", "y", R"($&)", "aaaaab");
+    test(regex_08, "08", R"(a?+b)", "ab", "y", R"($&)", "ab");
+    test(regex_09, "09", R"(fooa++a)", "fooaaaaa", "n", R"(-)", "-");
+    test(regex_10, "10", R"(fooa*+a)", "fooaaaaa", "n", R"(-)", "-");
+    test(regex_11, "11", R"(fooa{1,5}+a)", "fooaaaaa", "n", R"(-)", "-");
+    test(regex_12, "12", R"(fooa?+a)", "fooab", "n", R"(-)", "-");
+    test(regex_13, "13", R"(fooa++b)", "fooaaaaab", "y", R"($&)", "fooaaaaab");
+    test(regex_14, "14", R"(fooa*+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab");
+    test(regex_15, "15", R"(fooa{1,5}+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab");
+    test(regex_16, "16", R"(fooa?+b)", "fooab", "y", R"($&)", "fooab");
+    test(regex_17, "17", R"((aA)++(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA");
+    test(regex_18, "18", R"((aA|bB)++(aA|bB))", "aAaAbBaAbB", "n", R"(-)", "aAaAbBaAbB");
+    test(regex_19, "19", R"((aA)*+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA");
+    test(regex_20, "20", R"((aA|bB)*+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA");
+    test(regex_21, "21", R"((aA){1,5}+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA");
+    test(regex_22, "22", R"((aA|bB){1,5}+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA");
+    test(regex_23, "23", R"((aA)?+(aA))", "aAb", "n", R"(-)", "aAb");
+    test(regex_24, "24", R"((aA|bB)?+(aA|bB))", "bBb", "n", R"(-)", "bBb");
+    test(regex_25, "25", R"((aA)++b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb");
+    test(regex_26, "26", R"((aA|bB)++b)", "aAbBaAaAbBb", "y", R"($&)", "aAbBaAaAbBb");
+    test(regex_27, "27", R"((aA)*+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb");
+    test(regex_28, "28", R"((aA|bB)*+b)", "bBbBbBbBbBb", "y", R"($&)", "bBbBbBbBbBb");
+    test(regex_29, "29", R"((aA){1,5}+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb");
+    test(regex_30, "30", R"((aA|bB){1,5}+b)", "bBaAbBaAbBb", "y", R"($&)", "bBaAbBaAbBb");
+    test(regex_31, "31", R"((aA)?+b)", "aAb", "y", R"($&)", "aAb");
+    test(regex_32, "32", R"((aA|bB)?+b)", "bBb", "y", R"($&)", "bBb");
+    test(regex_33, "33", R"(foo(aA)++(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA");
+    test(regex_34, "34", R"(foo(aA|bB)++(aA|bB))", "foobBbBbBaAaA", "n", R"(-)", "foobBbBbBaAaA");
+    test(regex_35, "35", R"(foo(aA)*+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA");
+    test(regex_36, "36", R"(foo(aA|bB)*+(aA|bB))", "foobBaAbBaAaA", "n", R"(-)", "foobBaAbBaAaA");
+    test(regex_37, "37", R"(foo(aA){1,5}+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA");
+    test(regex_38, "38", R"(foo(aA|bB){1,5}+(aA|bB))", "fooaAbBbBaAaA", "n", R"(-)", "fooaAbBbBaAaA");
+    test(regex_39, "39", R"(foo(aA)?+(aA))", "fooaAb", "n", R"(-)", "fooaAb");
+    test(regex_40, "40", R"(foo(aA|bB)?+(aA|bB))", "foobBb", "n", R"(-)", "foobBb");
+    test(regex_41, "41", R"(foo(aA)++b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb");
+    test(regex_42, "42", R"(foo(aA|bB)++b)", "foobBaAbBaAbBb", "y", R"($&)", "foobBaAbBaAbBb");
+    test(regex_43, "43", R"(foo(aA)*+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb");
+    test(regex_44, "44", R"(foo(aA|bB)*+b)", "foobBbBaAaAaAb", "y", R"($&)", "foobBbBaAaAaAb");
+    test(regex_45, "45", R"(foo(aA){1,5}+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb");
+    test(regex_46, "46", R"(foo(aA|bB){1,5}+b)", "foobBaAaAaAaAb", "y", R"($&)", "foobBaAaAaAaAb");
+    test(regex_47, "47", R"(foo(aA)?+b)", "fooaAb", "y", R"($&)", "fooaAb");
+    test(regex_48, "48", R"(foo(aA|bB)?+b)", "foobBb", "y", R"($&)", "foobBb");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_13_posessive_modifier().run();
+}
diff --git a/regression-tests/pure2-regex_14_multiline_modifier.cpp2 b/regression-tests/pure2-regex_14_multiline_modifier.cpp2
new file mode 100644
index 0000000000..a48e3e4d53
--- /dev/null
+++ b/regression-tests/pure2-regex_14_multiline_modifier.cpp2
@@ -0,0 +1,559 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_14_multiline_modifier: @regex type = {
+  regex_01 := R"(\Z)";
+  regex_02 := R"(\z)";
+  regex_03 := R"($)";
+  regex_04 := R"(\Z)";
+  regex_05 := R"(\z)";
+  regex_06 := R"($)";
+  regex_07 := R"(\Z)";
+  regex_08 := R"(\z)";
+  regex_09 := R"($)";
+  regex_10 := R"('\Z'm)";
+  regex_11 := R"('\z'm)";
+  regex_12 := R"('$'m)";
+  regex_13 := R"('\Z'm)";
+  regex_14 := R"('\z'm)";
+  regex_15 := R"('$'m)";
+  regex_16 := R"('\Z'm)";
+  regex_17 := R"('\z'm)";
+  regex_18 := R"('$'m)";
+  regex_19 := R"(a\Z)";
+  regex_20 := R"(a\z)";
+  regex_21 := R"(a$)";
+  regex_22 := R"(a\Z)";
+  regex_23 := R"(a\z)";
+  regex_24 := R"(a$)";
+  regex_25 := R"(a\Z)";
+  regex_26 := R"(a\z)";
+  regex_27 := R"(a$)";
+  regex_28 := R"('a\Z'm)";
+  regex_29 := R"('a\z'm)";
+  regex_30 := R"('a$'m)";
+  regex_31 := R"('a\Z'm)";
+  regex_32 := R"('a\z'm)";
+  regex_33 := R"('a$'m)";
+  regex_34 := R"('a\Z'm)";
+  regex_35 := R"('a\z'm)";
+  regex_36 := R"('a$'m)";
+  regex_37 := R"(aa\Z)";
+  regex_38 := R"(aa\z)";
+  regex_39 := R"(aa$)";
+  regex_40 := R"(aa\Z)";
+  regex_41 := R"(aa\z)";
+  regex_42 := R"(aa$)";
+  regex_43 := R"(aa\Z)";
+  regex_44 := R"(aa\z)";
+  regex_45 := R"(aa$)";
+  regex_46 := R"('aa\Z'm)";
+  regex_47 := R"('aa\z'm)";
+  regex_48 := R"('aa$'m)";
+  regex_49 := R"('aa\Z'm)";
+  regex_50 := R"('aa\z'm)";
+  regex_51 := R"('aa$'m)";
+  regex_52 := R"('aa\Z'm)";
+  regex_53 := R"('aa\z'm)";
+  regex_54 := R"('aa$'m)";
+  regex_55 := R"(aa\Z)";
+  regex_56 := R"(aa\z)";
+  regex_57 := R"(aa$)";
+  regex_58 := R"(aa\Z)";
+  regex_59 := R"(aa\z)";
+  regex_60 := R"(aa$)";
+  regex_61 := R"(aa\Z)";
+  regex_62 := R"(aa\z)";
+  regex_63 := R"(aa$)";
+  regex_64 := R"('aa\Z'm)";
+  regex_65 := R"('aa\z'm)";
+  regex_66 := R"('aa$'m)";
+  regex_67 := R"('aa\Z'm)";
+  regex_68 := R"('aa\z'm)";
+  regex_69 := R"('aa$'m)";
+  regex_70 := R"('aa\Z'm)";
+  regex_71 := R"('aa\z'm)";
+  regex_72 := R"('aa$'m)";
+  regex_73 := R"(aa\Z)";
+  regex_74 := R"(aa\z)";
+  regex_75 := R"(aa$)";
+  regex_76 := R"(aa\Z)";
+  regex_77 := R"(aa\z)";
+  regex_78 := R"(aa$)";
+  regex_79 := R"(aa\Z)";
+  regex_80 := R"(aa\z)";
+  regex_81 := R"(aa$)";
+  regex_82 := R"('aa\Z'm)";
+  regex_83 := R"('aa\z'm)";
+  regex_84 := R"('aa$'m)";
+  regex_85 := R"('aa\Z'm)";
+  regex_86 := R"('aa\z'm)";
+  regex_87 := R"('aa$'m)";
+  regex_88 := R"('aa\Z'm)";
+  regex_89 := R"('aa\z'm)";
+  regex_90 := R"('aa$'m)";
+  regex_91 := R"(ab\Z)";
+  regex_92 := R"(ab\z)";
+  regex_93 := R"(ab$)";
+  regex_94 := R"(ab\Z)";
+  regex_95 := R"(ab\z)";
+  regex_96 := R"(ab$)";
+  regex_97 := R"(ab\Z)";
+  regex_98 := R"(ab\z)";
+  regex_99 := R"(ab$)";
+  regex_100 := R"('ab\Z'm)";
+  regex_101 := R"('ab\z'm)";
+  regex_102 := R"('ab$'m)";
+  regex_103 := R"('ab\Z'm)";
+  regex_104 := R"('ab\z'm)";
+  regex_105 := R"('ab$'m)";
+  regex_106 := R"('ab\Z'm)";
+  regex_107 := R"('ab\z'm)";
+  regex_108 := R"('ab$'m)";
+  regex_109 := R"(ab\Z)";
+  regex_110 := R"(ab\z)";
+  regex_111 := R"(ab$)";
+  regex_112 := R"(ab\Z)";
+  regex_113 := R"(ab\z)";
+  regex_114 := R"(ab$)";
+  regex_115 := R"(ab\Z)";
+  regex_116 := R"(ab\z)";
+  regex_117 := R"(ab$)";
+  regex_118 := R"('ab\Z'm)";
+  regex_119 := R"('ab\z'm)";
+  regex_120 := R"('ab$'m)";
+  regex_121 := R"('ab\Z'm)";
+  regex_122 := R"('ab\z'm)";
+  regex_123 := R"('ab$'m)";
+  regex_124 := R"('ab\Z'm)";
+  regex_125 := R"('ab\z'm)";
+  regex_126 := R"('ab$'m)";
+  regex_127 := R"(ab\Z)";
+  regex_128 := R"(ab\z)";
+  regex_129 := R"(ab$)";
+  regex_130 := R"(ab\Z)";
+  regex_131 := R"(ab\z)";
+  regex_132 := R"(ab$)";
+  regex_133 := R"(ab\Z)";
+  regex_134 := R"(ab\z)";
+  regex_135 := R"(ab$)";
+  regex_136 := R"('ab\Z'm)";
+  regex_137 := R"('ab\z'm)";
+  regex_138 := R"('ab$'m)";
+  regex_139 := R"('ab\Z'm)";
+  regex_140 := R"('ab\z'm)";
+  regex_141 := R"('ab$'m)";
+  regex_142 := R"('ab\Z'm)";
+  regex_143 := R"('ab\z'm)";
+  regex_144 := R"('ab$'m)";
+  regex_145 := R"(abb\Z)";
+  regex_146 := R"(abb\z)";
+  regex_147 := R"(abb$)";
+  regex_148 := R"(abb\Z)";
+  regex_149 := R"(abb\z)";
+  regex_150 := R"(abb$)";
+  regex_151 := R"(abb\Z)";
+  regex_152 := R"(abb\z)";
+  regex_153 := R"(abb$)";
+  regex_154 := R"('abb\Z'm)";
+  regex_155 := R"('abb\z'm)";
+  regex_156 := R"('abb$'m)";
+  regex_157 := R"('abb\Z'm)";
+  regex_158 := R"('abb\z'm)";
+  regex_159 := R"('abb$'m)";
+  regex_160 := R"('abb\Z'm)";
+  regex_161 := R"('abb\z'm)";
+  regex_162 := R"('abb$'m)";
+  regex_163 := R"(abb\Z)";
+  regex_164 := R"(abb\z)";
+  regex_165 := R"(abb$)";
+  regex_166 := R"(abb\Z)";
+  regex_167 := R"(abb\z)";
+  regex_168 := R"(abb$)";
+  regex_169 := R"(abb\Z)";
+  regex_170 := R"(abb\z)";
+  regex_171 := R"(abb$)";
+  regex_172 := R"('abb\Z'm)";
+  regex_173 := R"('abb\z'm)";
+  regex_174 := R"('abb$'m)";
+  regex_175 := R"('abb\Z'm)";
+  regex_176 := R"('abb\z'm)";
+  regex_177 := R"('abb$'m)";
+  regex_178 := R"('abb\Z'm)";
+  regex_179 := R"('abb\z'm)";
+  regex_180 := R"('abb$'m)";
+  regex_181 := R"(abb\Z)";
+  regex_182 := R"(abb\z)";
+  regex_183 := R"(abb$)";
+  regex_184 := R"(abb\Z)";
+  regex_185 := R"(abb\z)";
+  regex_186 := R"(abb$)";
+  regex_187 := R"(abb\Z)";
+  regex_188 := R"(abb\z)";
+  regex_189 := R"(abb$)";
+  regex_190 := R"('abb\Z'm)";
+  regex_191 := R"('abb\z'm)";
+  regex_192 := R"('abb$'m)";
+  regex_193 := R"('abb\Z'm)";
+  regex_194 := R"('abb\z'm)";
+  regex_195 := R"('abb$'m)";
+  regex_196 := R"('abb\Z'm)";
+  regex_197 := R"('abb\z'm)";
+  regex_198 := R"('abb$'m)";
+  regex_199 := R"('\Aa$'m)";
+  run: (this) = {
+    std::cout << "Running tests_14_multiline_modifier:"<< std::endl;
+    test(regex_01, "01", R"(\Z)", "a\nb\n", "y", R"($-[0])", "3");
+    test(regex_02, "02", R"(\z)", "a\nb\n", "y", R"($-[0])", "4");
+    test(regex_03, "03", R"($)", "a\nb\n", "y", R"($-[0])", "3");
+    test(regex_04, "04", R"(\Z)", "b\na\n", "y", R"($-[0])", "3");
+    test(regex_05, "05", R"(\z)", "b\na\n", "y", R"($-[0])", "4");
+    test(regex_06, "06", R"($)", "b\na\n", "y", R"($-[0])", "3");
+    test(regex_07, "07", R"(\Z)", "b\na", "y", R"($-[0])", "3");
+    test(regex_08, "08", R"(\z)", "b\na", "y", R"($-[0])", "3");
+    test(regex_09, "09", R"($)", "b\na", "y", R"($-[0])", "3");
+    test(regex_10, "10", R"('\Z'm)", "a\nb\n", "y", R"($-[0])", "3");
+    test(regex_11, "11", R"('\z'm)", "a\nb\n", "y", R"($-[0])", "4");
+    test(regex_12, "12", R"('$'m)", "a\nb\n", "y", R"($-[0])", "1");
+    test(regex_13, "13", R"('\Z'm)", "b\na\n", "y", R"($-[0])", "3");
+    test(regex_14, "14", R"('\z'm)", "b\na\n", "y", R"($-[0])", "4");
+    test(regex_15, "15", R"('$'m)", "b\na\n", "y", R"($-[0])", "1");
+    test(regex_16, "16", R"('\Z'm)", "b\na", "y", R"($-[0])", "3");
+    test(regex_17, "17", R"('\z'm)", "b\na", "y", R"($-[0])", "3");
+    test(regex_18, "18", R"('$'m)", "b\na", "y", R"($-[0])", "1");
+    test(regex_19, "19", R"(a\Z)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_20, "20", R"(a\z)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_21, "21", R"(a$)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_22, "22", R"(a\Z)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_23, "23", R"(a\z)", "b\na\n", "n", R"(-)", "-");
+    test(regex_24, "24", R"(a$)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_25, "25", R"(a\Z)", "b\na", "y", R"($-[0])", "2");
+    test(regex_26, "26", R"(a\z)", "b\na", "y", R"($-[0])", "2");
+    test(regex_27, "27", R"(a$)", "b\na", "y", R"($-[0])", "2");
+    test(regex_28, "28", R"('a\Z'm)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_29, "29", R"('a\z'm)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_30, "30", R"('a$'m)", "a\nb\n", "y", R"($-[0])", "0");
+    test(regex_31, "31", R"('a\Z'm)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_32, "32", R"('a\z'm)", "b\na\n", "n", R"(-)", "-");
+    test(regex_33, "33", R"('a$'m)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_34, "34", R"('a\Z'm)", "b\na", "y", R"($-[0])", "2");
+    test(regex_35, "35", R"('a\z'm)", "b\na", "y", R"($-[0])", "2");
+    test(regex_36, "36", R"('a$'m)", "b\na", "y", R"($-[0])", "2");
+    test(regex_37, "37", R"(aa\Z)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_38, "38", R"(aa\z)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_39, "39", R"(aa$)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_40, "40", R"(aa\Z)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_41, "41", R"(aa\z)", "b\naa\n", "n", R"(-)", "-");
+    test(regex_42, "42", R"(aa$)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_43, "43", R"(aa\Z)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_44, "44", R"(aa\z)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_45, "45", R"(aa$)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_46, "46", R"('aa\Z'm)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_47, "47", R"('aa\z'm)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_48, "48", R"('aa$'m)", "aa\nb\n", "y", R"($-[0])", "0");
+    test(regex_49, "49", R"('aa\Z'm)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_50, "50", R"('aa\z'm)", "b\naa\n", "n", R"(-)", "-");
+    test(regex_51, "51", R"('aa$'m)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_52, "52", R"('aa\Z'm)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_53, "53", R"('aa\z'm)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_54, "54", R"('aa$'m)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_55, "55", R"(aa\Z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_56, "56", R"(aa\z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_57, "57", R"(aa$)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_58, "58", R"(aa\Z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_59, "59", R"(aa\z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_60, "60", R"(aa$)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_61, "61", R"(aa\Z)", "b\nac", "n", R"(-)", "-");
+    test(regex_62, "62", R"(aa\z)", "b\nac", "n", R"(-)", "-");
+    test(regex_63, "63", R"(aa$)", "b\nac", "n", R"(-)", "-");
+    test(regex_64, "64", R"('aa\Z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_65, "65", R"('aa\z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_66, "66", R"('aa$'m)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_67, "67", R"('aa\Z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_68, "68", R"('aa\z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_69, "69", R"('aa$'m)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_70, "70", R"('aa\Z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_71, "71", R"('aa\z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_72, "72", R"('aa$'m)", "b\nac", "n", R"(-)", "-");
+    test(regex_73, "73", R"(aa\Z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_74, "74", R"(aa\z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_75, "75", R"(aa$)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_76, "76", R"(aa\Z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_77, "77", R"(aa\z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_78, "78", R"(aa$)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_79, "79", R"(aa\Z)", "b\nca", "n", R"(-)", "-");
+    test(regex_80, "80", R"(aa\z)", "b\nca", "n", R"(-)", "-");
+    test(regex_81, "81", R"(aa$)", "b\nca", "n", R"(-)", "-");
+    test(regex_82, "82", R"('aa\Z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_83, "83", R"('aa\z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_84, "84", R"('aa$'m)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_85, "85", R"('aa\Z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_86, "86", R"('aa\z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_87, "87", R"('aa$'m)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_88, "88", R"('aa\Z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_89, "89", R"('aa\z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_90, "90", R"('aa$'m)", "b\nca", "n", R"(-)", "-");
+    test(regex_91, "91", R"(ab\Z)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_92, "92", R"(ab\z)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_93, "93", R"(ab$)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_94, "94", R"(ab\Z)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_95, "95", R"(ab\z)", "b\nab\n", "n", R"(-)", "-");
+    test(regex_96, "96", R"(ab$)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_97, "97", R"(ab\Z)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_98, "98", R"(ab\z)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_99, "99", R"(ab$)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_100, "100", R"('ab\Z'm)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_101, "101", R"('ab\z'm)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_102, "102", R"('ab$'m)", "ab\nb\n", "y", R"($-[0])", "0");
+    test(regex_103, "103", R"('ab\Z'm)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_104, "104", R"('ab\z'm)", "b\nab\n", "n", R"(-)", "-");
+    test(regex_105, "105", R"('ab$'m)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_106, "106", R"('ab\Z'm)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_107, "107", R"('ab\z'm)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_108, "108", R"('ab$'m)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_109, "109", R"(ab\Z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_110, "110", R"(ab\z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_111, "111", R"(ab$)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_112, "112", R"(ab\Z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_113, "113", R"(ab\z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_114, "114", R"(ab$)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_115, "115", R"(ab\Z)", "b\nac", "n", R"(-)", "-");
+    test(regex_116, "116", R"(ab\z)", "b\nac", "n", R"(-)", "-");
+    test(regex_117, "117", R"(ab$)", "b\nac", "n", R"(-)", "-");
+    test(regex_118, "118", R"('ab\Z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_119, "119", R"('ab\z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_120, "120", R"('ab$'m)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_121, "121", R"('ab\Z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_122, "122", R"('ab\z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_123, "123", R"('ab$'m)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_124, "124", R"('ab\Z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_125, "125", R"('ab\z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_126, "126", R"('ab$'m)", "b\nac", "n", R"(-)", "-");
+    test(regex_127, "127", R"(ab\Z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_128, "128", R"(ab\z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_129, "129", R"(ab$)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_130, "130", R"(ab\Z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_131, "131", R"(ab\z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_132, "132", R"(ab$)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_133, "133", R"(ab\Z)", "b\nca", "n", R"(-)", "-");
+    test(regex_134, "134", R"(ab\z)", "b\nca", "n", R"(-)", "-");
+    test(regex_135, "135", R"(ab$)", "b\nca", "n", R"(-)", "-");
+    test(regex_136, "136", R"('ab\Z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_137, "137", R"('ab\z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_138, "138", R"('ab$'m)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_139, "139", R"('ab\Z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_140, "140", R"('ab\z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_141, "141", R"('ab$'m)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_142, "142", R"('ab\Z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_143, "143", R"('ab\z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_144, "144", R"('ab$'m)", "b\nca", "n", R"(-)", "-");
+    test(regex_145, "145", R"(abb\Z)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_146, "146", R"(abb\z)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_147, "147", R"(abb$)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_148, "148", R"(abb\Z)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_149, "149", R"(abb\z)", "b\nabb\n", "n", R"(-)", "-");
+    test(regex_150, "150", R"(abb$)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_151, "151", R"(abb\Z)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_152, "152", R"(abb\z)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_153, "153", R"(abb$)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_154, "154", R"('abb\Z'm)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_155, "155", R"('abb\z'm)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_156, "156", R"('abb$'m)", "abb\nb\n", "y", R"($-[0])", "0");
+    test(regex_157, "157", R"('abb\Z'm)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_158, "158", R"('abb\z'm)", "b\nabb\n", "n", R"(-)", "-");
+    test(regex_159, "159", R"('abb$'m)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_160, "160", R"('abb\Z'm)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_161, "161", R"('abb\z'm)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_162, "162", R"('abb$'m)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_163, "163", R"(abb\Z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_164, "164", R"(abb\z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_165, "165", R"(abb$)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_166, "166", R"(abb\Z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_167, "167", R"(abb\z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_168, "168", R"(abb$)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_169, "169", R"(abb\Z)", "b\nac", "n", R"(-)", "-");
+    test(regex_170, "170", R"(abb\z)", "b\nac", "n", R"(-)", "-");
+    test(regex_171, "171", R"(abb$)", "b\nac", "n", R"(-)", "-");
+    test(regex_172, "172", R"('abb\Z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_173, "173", R"('abb\z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_174, "174", R"('abb$'m)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_175, "175", R"('abb\Z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_176, "176", R"('abb\z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_177, "177", R"('abb$'m)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_178, "178", R"('abb\Z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_179, "179", R"('abb\z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_180, "180", R"('abb$'m)", "b\nac", "n", R"(-)", "-");
+    test(regex_181, "181", R"(abb\Z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_182, "182", R"(abb\z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_183, "183", R"(abb$)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_184, "184", R"(abb\Z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_185, "185", R"(abb\z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_186, "186", R"(abb$)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_187, "187", R"(abb\Z)", "b\nca", "n", R"(-)", "-");
+    test(regex_188, "188", R"(abb\z)", "b\nca", "n", R"(-)", "-");
+    test(regex_189, "189", R"(abb$)", "b\nca", "n", R"(-)", "-");
+    test(regex_190, "190", R"('abb\Z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_191, "191", R"('abb\z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_192, "192", R"('abb$'m)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_193, "193", R"('abb\Z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_194, "194", R"('abb\z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_195, "195", R"('abb$'m)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_196, "196", R"('abb\Z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_197, "197", R"('abb\z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_198, "198", R"('abb$'m)", "b\nca", "n", R"(-)", "-");
+    test(regex_199, "199", R"('\Aa$'m)", "a\n\n", "y", R"($&)", "a");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_14_multiline_modifier().run();
+}
diff --git a/regression-tests/pure2-regex_15_group_modifiers.cpp2 b/regression-tests/pure2-regex_15_group_modifiers.cpp2
new file mode 100644
index 0000000000..d0db986c9f
--- /dev/null
+++ b/regression-tests/pure2-regex_15_group_modifiers.cpp2
@@ -0,0 +1,267 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_15_group_modifiers: @regex type = {
+  regex_01 := R"((?:(?i)a)b)";
+  regex_02 := R"(((?i)a)b)";
+  regex_03 := R"((?:(?i)a)b)";
+  regex_04 := R"(((?i)a)b)";
+  regex_05 := R"((?:(?i)a)b)";
+  regex_06 := R"(((?i)a)b)";
+  regex_07 := R"((?i:a)b)";
+  regex_08 := R"(((?i:a))b)";
+  regex_09 := R"((?i:a)b)";
+  regex_10 := R"(((?i:a))b)";
+  regex_11 := R"((?i:a)b)";
+  regex_12 := R"(((?i:a))b)";
+  regex_13 := R"('(?:(?-i)a)b'i)";
+  regex_14 := R"('((?-i)a)b'i)";
+  regex_15 := R"('(?:(?-i)a)b'i)";
+  regex_16 := R"('((?-i)a)b'i)";
+  regex_17 := R"('(?:(?-i)a)b'i)";
+  regex_18 := R"('((?-i)a)b'i)";
+  regex_19 := R"('(?:(?-i)a)b'i)";
+  regex_20 := R"('((?-i)a)b'i)";
+  regex_21 := R"('(?:(?-i)a)b'i)";
+  regex_22 := R"('((?-i)a)b'i)";
+  regex_23 := R"('(?-i:a)b'i)";
+  regex_24 := R"('((?-i:a))b'i)";
+  regex_25 := R"('(?-i:a)b'i)";
+  regex_26 := R"('((?-i:a))b'i)";
+  regex_27 := R"('(?-i:a)b'i)";
+  regex_28 := R"('((?-i:a))b'i)";
+  regex_29 := R"('(?-i:a)b'i)";
+  regex_30 := R"('((?-i:a))b'i)";
+  regex_31 := R"('(?-i:a)b'i)";
+  regex_32 := R"('((?-i:a))b'i)";
+  regex_33 := R"('((?-i:a.))b'i)";
+  regex_34 := R"('((?-i:a\N))b'i)";
+  regex_35 := R"('((?s-i:a.))b'i)";
+  regex_36 := R"('((?s-i:a\N))b'i)";
+  regex_37 := R"('((?s-i:a.))b'i)";
+  regex_38 := R"('((?s-i:a\N))b'i)";
+  regex_39 := R"((?i:.[b].))";
+  regex_40 := R"((?i:\N[b]\N))";
+  regex_41 := R"(^(?:a?b?)*$)";
+  regex_42 := R"(((?s)^a(.))((?m)^b$))";
+  regex_43 := R"(((?m)^b$))";
+  regex_44 := R"((?m)^b)";
+  regex_45 := R"((?m)^(b))";
+  regex_46 := R"(((?m)^b))";
+  regex_47 := R"(\n((?m)^b))";
+  regex_48 := R"(^b)";
+  regex_49 := R"(()^b)";
+  regex_50 := R"(((?m)^b))";
+  regex_51 := R"('(foo)'n)";
+  regex_52 := R"('(?-n)(foo)(?n)(bar)'n)";
+  regex_53 := R"('(?-n:(foo)(?n:(bar)))'n)";
+  run: (this) = {
+    std::cout << "Running tests_15_group_modifiers:"<< std::endl;
+    test(regex_01, "01", R"((?:(?i)a)b)", "ab", "y", R"($&)", "ab");
+    test(regex_02, "02", R"(((?i)a)b)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_03, "03", R"((?:(?i)a)b)", "Ab", "y", R"($&)", "Ab");
+    test(regex_04, "04", R"(((?i)a)b)", "Ab", "y", R"($&:$1)", "Ab:A");
+    test(regex_05, "05", R"((?:(?i)a)b)", "aB", "n", R"(-)", "-");
+    test(regex_06, "06", R"(((?i)a)b)", "aB", "n", R"(-)", "-");
+    test(regex_07, "07", R"((?i:a)b)", "ab", "y", R"($&)", "ab");
+    test(regex_08, "08", R"(((?i:a))b)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_09, "09", R"((?i:a)b)", "Ab", "y", R"($&)", "Ab");
+    test(regex_10, "10", R"(((?i:a))b)", "Ab", "y", R"($&:$1)", "Ab:A");
+    test(regex_11, "11", R"((?i:a)b)", "aB", "n", R"(-)", "-");
+    test(regex_12, "12", R"(((?i:a))b)", "aB", "n", R"(-)", "-");
+    test(regex_13, "13", R"('(?:(?-i)a)b'i)", "ab", "y", R"($&)", "ab");
+    test(regex_14, "14", R"('((?-i)a)b'i)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_15, "15", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_16, "16", R"('((?-i)a)b'i)", "aB", "y", R"($&:$1)", "aB:a");
+    test(regex_17, "17", R"('(?:(?-i)a)b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_18, "18", R"('((?-i)a)b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_19, "19", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_20, "20", R"('((?-i)a)b'i)", "aB", "y", R"($1)", "a");
+    test(regex_21, "21", R"('(?:(?-i)a)b'i)", "AB", "n", R"(-)", "-");
+    test(regex_22, "22", R"('((?-i)a)b'i)", "AB", "n", R"(-)", "-");
+    test(regex_23, "23", R"('(?-i:a)b'i)", "ab", "y", R"($&)", "ab");
+    test(regex_24, "24", R"('((?-i:a))b'i)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_25, "25", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_26, "26", R"('((?-i:a))b'i)", "aB", "y", R"($&:$1)", "aB:a");
+    test(regex_27, "27", R"('(?-i:a)b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_28, "28", R"('((?-i:a))b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_29, "29", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_30, "30", R"('((?-i:a))b'i)", "aB", "y", R"($1)", "a");
+    test(regex_31, "31", R"('(?-i:a)b'i)", "AB", "n", R"(-)", "-");
+    test(regex_32, "32", R"('((?-i:a))b'i)", "AB", "n", R"(-)", "-");
+    test(regex_33, "33", R"('((?-i:a.))b'i)", "a\nB", "n", R"(-)", "-");
+    test(regex_34, "34", R"('((?-i:a\N))b'i)", "a\nB", "n", R"(-)", "-");
+    test(regex_35, "35", R"('((?s-i:a.))b'i)", "a\nB", "y", R"($1)", "a\n");
+    test(regex_36, "36", R"('((?s-i:a\N))b'i)", "a\nB", "n", R"(-)", "-");
+    test(regex_37, "37", R"('((?s-i:a.))b'i)", "B\nB", "n", R"(-)", "-");
+    test(regex_38, "38", R"('((?s-i:a\N))b'i)", "B\nB", "n", R"(-)", "-");
+    test(regex_39, "39", R"((?i:.[b].))", "abd", "y", R"($&)", "abd");
+    test(regex_40, "40", R"((?i:\N[b]\N))", "abd", "y", R"($&)", "abd");
+    test(regex_41, "41", R"(^(?:a?b?)*$)", "a--", "n", R"(-)", "-");
+    test(regex_42, "42", R"(((?s)^a(.))((?m)^b$))", "a\nb\nc\n", "y", R"($1;$2;$3)", "a\n;\n;b");
+    test(regex_43, "43", R"(((?m)^b$))", "a\nb\nc\n", "y", R"($1)", "b");
+    test(regex_44, "44", R"((?m)^b)", "a\nb\n", "y", R"($&)", "b");
+    test(regex_45, "45", R"((?m)^(b))", "a\nb\n", "y", R"($1)", "b");
+    test(regex_46, "46", R"(((?m)^b))", "a\nb\n", "y", R"($1)", "b");
+    test(regex_47, "47", R"(\n((?m)^b))", "a\nb\n", "y", R"($1)", "b");
+    test(regex_48, "48", R"(^b)", "a\nb\nc\n", "n", R"(-)", "-");
+    test(regex_49, "49", R"(()^b)", "a\nb\nc\n", "n", R"(-)", "-");
+    test(regex_50, "50", R"(((?m)^b))", "a\nb\nc\n", "y", R"($1)", "b");
+    test(regex_51, "51", R"('(foo)'n)", "foobar", "y", R"($&-$1)", "foo-");
+    test(regex_52, "52", R"('(?-n)(foo)(?n)(bar)'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-");
+    test(regex_53, "53", R"('(?-n:(foo)(?n:(bar)))'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_15_group_modifiers().run();
+}
diff --git a/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2 b/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2
new file mode 100644
index 0000000000..c586d1fc01
--- /dev/null
+++ b/regression-tests/pure2-regex_16_perl_syntax_modifier.cpp2
@@ -0,0 +1,227 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_16_perl_syntax_modifier: @regex type = {
+  regex_01 := R"(/\N {1}/x)";
+  regex_02 := R"(/\N {1}/x)";
+  regex_03 := R"(/\N {1}/x)";
+  regex_04 := R"(/\N {3,4}/x)";
+  regex_05 := R"(/\N {3,4}/x)";
+  regex_06 := R"(/\N {3,4}/x)";
+  regex_07 := R"(/a\N c/x)";
+  regex_08 := R"(/a\N *c/x)";
+  regex_09 := R"(/a\N *c/x)";
+  regex_10 := R"(/[a b]/x)";
+  regex_11 := R"(/[a b]/xx)";
+  regex_12 := R"(/[a\ b]/xx)";
+  regex_13 := R"(/[ ^ a b ]/xx)";
+  regex_14 := R"(/[ ^ a b ]/xx)";
+  regex_15 := R"(/[ ^ a b ]/xx)";
+  regex_16 := R"(/(?x:[a b])/xx)";
+  regex_17 := R"(/(?xx:[a b])/x)";
+  regex_18 := R"(/(?x)[a b]/xx)";
+  regex_19 := R"(/(?xx)[a b]/x)";
+  regex_20 := R"(/(?-x:[a b])/xx)";
+  regex_21 := R"(/\N {1}/x)";
+  regex_22 := R"(/\N {1}/x)";
+  regex_23 := R"(/\N {1}/x)";
+  regex_24 := R"(/\N {3,4}/x)";
+  regex_25 := R"(/\N {3,4}/x)";
+  regex_26 := R"(/\N {3,4}/x)";
+  regex_27 := R"(/a\N c/x)";
+  regex_28 := R"(/a\N *c/x)";
+  regex_29 := R"(/a\N *c/x)";
+  regex_30 := R"(/[#]/)";
+  regex_31 := R"(/[#]b/)";
+  regex_32 := R"(/[#]/x)";
+  regex_33 := R"(/[#]b/x)";
+  run: (this) = {
+    std::cout << "Running tests_16_perl_syntax_modifier:"<< std::endl;
+    test(regex_01, "01", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a");
+    test(regex_02, "02", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_04, "04", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_05, "05", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_06, "06", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_07, "07", R"(/a\N c/x)", "abc", "y", R"($&)", "abc");
+    test(regex_08, "08", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_09, "09", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-");
+    test(regex_10, "10", R"(/[a b]/x)", " ", "yS", R"($&)", " ");
+    test(regex_11, "11", R"(/[a b]/xx)", " ", "n", R"(-)", "-");
+    test(regex_12, "12", R"(/[a\ b]/xx)", " ", "y", R"($&)", " ");
+    test(regex_13, "13", R"(/[ ^ a b ]/xx)", "a", "n", R"(-)", "-");
+    test(regex_14, "14", R"(/[ ^ a b ]/xx)", "b", "n", R"(-)", "-");
+    test(regex_15, "15", R"(/[ ^ a b ]/xx)", "A", "y", R"($&)", "A");
+    test(regex_16, "16", R"(/(?x:[a b])/xx)", " ", "yS", R"($&)", " ");
+    test(regex_17, "17", R"(/(?xx:[a b])/x)", " ", "n", R"(-)", "-");
+    test(regex_18, "18", R"(/(?x)[a b]/xx)", " ", "yS", R"($&)", " ");
+    test(regex_19, "19", R"(/(?xx)[a b]/x)", " ", "n", R"(-)", "-");
+    test(regex_20, "20", R"(/(?-x:[a b])/xx)", " ", "yS", R"($&)", " ");
+    test(regex_21, "21", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a");
+    test(regex_22, "22", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_23, "23", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_24, "24", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_25, "25", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_26, "26", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_27, "27", R"(/a\N c/x)", "abc", "y", R"($&)", "abc");
+    test(regex_28, "28", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_29, "29", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-");
+    test(regex_30, "30", R"(/[#]/)", "a#b", "y", R"($&)", "#");
+    test(regex_31, "31", R"(/[#]b/)", "a#b", "y", R"($&)", "#b");
+    test(regex_32, "32", R"(/[#]/x)", "a#b", "y", R"($&)", "#");
+    test(regex_33, "33", R"(/[#]b/x)", "a#b", "y", R"($&)", "#b");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_16_perl_syntax_modifier().run();
+}
diff --git a/regression-tests/pure2-regex_17_comments.cpp2 b/regression-tests/pure2-regex_17_comments.cpp2
new file mode 100644
index 0000000000..00c3c96a9d
--- /dev/null
+++ b/regression-tests/pure2-regex_17_comments.cpp2
@@ -0,0 +1,167 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_17_comments: @regex type = {
+  regex_01 := R"(^a(?#xxx){3}c)";
+  regex_02 := R"('^a (?#xxx) (?#yyy) {3}c'x)";
+  regex_03 := R"('foo # Match foo'x)";
+  run: (this) = {
+    std::cout << "Running tests_17_comments:"<< std::endl;
+    test(regex_01, "01", R"(^a(?#xxx){3}c)", "aaac", "y", R"($&)", "aaac");
+    test(regex_02, "02", R"('^a (?#xxx) (?#yyy) {3}c'x)", "aaac", "y", R"($&)", "aaac");
+    test(regex_03, "03", R"('foo # Match foo'x)", "foobar", "y", R"($&)", "foo");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_17_comments().run();
+}
diff --git a/regression-tests/pure2-regex_18_branch_reset.cpp2 b/regression-tests/pure2-regex_18_branch_reset.cpp2
new file mode 100644
index 0000000000..7d79aec1a6
--- /dev/null
+++ b/regression-tests/pure2-regex_18_branch_reset.cpp2
@@ -0,0 +1,191 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_18_branch_reset: @regex type = {
+  regex_01 := R"((?|(a)))";
+  regex_02 := R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))";
+  regex_03 := R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))";
+  regex_04 := R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))";
+  regex_05 := R"((?|(?|(a)|(b))|(?|(c)|(d))))";
+  regex_06 := R"((?|(?|(a)|(b))|(?|(c)|(d))))";
+  regex_07 := R"((?|(?|(a)|(b))|(?|(c)|(d))))";
+  regex_08 := R"((?|(?|(a)|(b))|(?|(c)|(d))))";
+  regex_09 := R"((.)(?|(.)(.)x|(.)d)(.))";
+  regex_10 := R"((\N)(?|(\N)(\N)x|(\N)d)(\N))";
+  regex_11 := R"((?|(?x)))";
+  regex_12 := R"((?|(?x)|(?y)))";
+  regex_13 := R"((?|(?y)|(?x)))";
+  regex_14 := R"((?)(?|(?x)))";
+  regex_15 := R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))";
+  run: (this) = {
+    std::cout << "Running tests_18_branch_reset:"<< std::endl;
+    test(regex_01, "01", R"((?|(a)))", "a", "y", R"($1-$+)", "a-a");
+    test(regex_02, "02", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "d!o!da", "y", R"($1-$2-$3)", "!o!-o-a");
+    test(regex_03, "03", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "aabc", "y", R"($1-$2-$3)", "a--c");
+    test(regex_04, "04", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "ixyjp", "y", R"($1-$2-$3)", "x-y-p");
+    test(regex_05, "05", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "a", "y", R"($1)", "a");
+    test(regex_06, "06", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "b", "y", R"($1)", "b");
+    test(regex_07, "07", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "c", "y", R"($1)", "c");
+    test(regex_08, "08", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "d", "y", R"($1)", "d");
+    test(regex_09, "09", R"((.)(?|(.)(.)x|(.)d)(.))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--");
+    test(regex_10, "10", R"((\N)(?|(\N)(\N)x|(\N)d)(\N))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--");
+    test(regex_11, "11", R"((?|(?x)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_12, "12", R"((?|(?x)|(?y)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_13, "13", R"((?|(?y)|(?x)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_14, "14", R"((?)(?|(?x)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_15, "15", R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))", "a", "y", R"($&)", "a");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_18_branch_reset().run();
+}
diff --git a/regression-tests/pure2-regex_19_lookahead.cpp2 b/regression-tests/pure2-regex_19_lookahead.cpp2
new file mode 100644
index 0000000000..209d0eb8d4
--- /dev/null
+++ b/regression-tests/pure2-regex_19_lookahead.cpp2
@@ -0,0 +1,251 @@
+create_result: (resultExpr: std::string, r) -> std::string = {
+  result: std::string = "";
+
+  get_next := :(iter) -> _ = {
+		start := std::distance(resultExpr&$*.cbegin(), iter);
+    firstDollar := resultExpr&$*.find("$", start);
+    firstAt := resultExpr&$*.find("@", start);
+
+		end := std::min(firstDollar, firstAt);
+		if end != std::string::npos {
+			return resultExpr&$*.cbegin() + end;
+		}
+		else {
+			return resultExpr&$*.cend();
+		}
+  };
+  extract_group_and_advance := :(inout iter) -> _ = {
+    start := iter;
+
+    while std::isdigit(iter*) next iter++ {}
+
+    return std::stoi(std::string(start, iter));
+  };
+  extract_until := :(inout iter, to: char) -> _ = {
+    start := iter;
+
+    while (to != iter*) next iter++ {} // TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(start, iter);
+  };
+
+  iter := resultExpr.begin();
+
+  while iter != resultExpr.end() {
+    next := get_next(iter);
+
+    if next != iter {
+      result += std::string(iter, next);
+    }
+    if next != resultExpr.end() {
+      if next* == '$' {
+        next++;
+
+        if next* == '&' {
+          next++;
+          result += r.group(0);
+        }
+        else if next* == '-' || next* == '+' {
+          is_start := next* == '-';
+          next++;
+          if next* == '{' {
+            next++; // Skip {
+            group := extract_until(next, '}');
+            next++; // Skip }
+            result += r.group(group);
+          }
+          else if next* == '[' {
+            next++; // Skip [
+            group := extract_group_and_advance(next);
+            next++; // Skip ]
+
+            if is_start {
+              result += std::to_string(r.group_start(group));
+            }
+            else {
+              result += std::to_string(r.group_end(group));
+            }
+          }
+          else {
+            // Return max group
+            result += r.group(r.group_number() - 1);
+          }
+        }
+        else if std::isdigit(next*) {
+          group := extract_group_and_advance(next);
+          result += r.group(group);
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else if next* == '@' {
+        next++;
+        
+        if next* == '-'  || next* == '+' {
+          i := 0;
+          while i < cpp2::unsafe_narrow(r.group_number()) next i++ {
+            pos := 0;
+            if next* == '-' {
+              pos = r.group_start(i);
+            }
+            else {
+              pos = r.group_end(i);
+            }
+            result +=  std::to_string(pos);
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }
+    }
+    iter = next;
+  }
+
+  return result;
+}
+
+test:  (regex: M, id: std::string, regex_str: std::string, str: std::string, kind: std::string, resultExpr: std::string,
+           resultExpected: std::string) = {
+  
+  warning: std::string = "";
+  if regex.to_string() != regex_str {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  status: std::string = "OK";
+
+  r := regex.search(str);
+
+  if "y" == kind || "yM" == kind || "yS" == kind || "yB" == kind {
+    if !r.matched {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      result := create_result(resultExpr, r);
+
+      if result != resultExpected {
+        status = "Failure: Result is wrong. (is: (result)$)";
+      }
+    }
+  }
+  else if "n" == kind {
+    if r.matched {
+      status = "Failure: Regex should not apply. Result is '(r.group(0))$'";
+    }
+  } else {
+    status = "Unknown kind '(kind)$'";
+  }
+
+  if !warning.empty() {
+    warning += " ";
+  }
+  std::cout << "(id)$_(kind)$: (status)$ (warning)$regex: (regex_str)$ parsed_regex: (regex.to_string())$ str: (str)$ result_expr: (resultExpr)$ expected_results (resultExpected)$" << std::endl;
+}
+
+
+test_tests_19_lookahead: @regex type = {
+  regex_01 := R"(a(?!b).)";
+  regex_02 := R"((?=)a)";
+  regex_03 := R"(a(?=d).)";
+  regex_04 := R"(a(?=c|d).)";
+  regex_05 := R"(^(?:b|a(?=(.)))*\1)";
+  regex_06 := R"((?=(a+?))(\1ab))";
+  regex_07 := R"(^(?=(a+?))\1ab)";
+  regex_08 := R"((?=(a+?))(\1ab))";
+  regex_09 := R"(^(?=(a+?))\1ab)";
+  regex_10 := R"((.*)(?=c))";
+  regex_11 := R"((.*)(?=c)c)";
+  regex_12 := R"((.*)(?=b|c))";
+  regex_13 := R"((.*)(?=b|c)c)";
+  regex_14 := R"((.*)(?=c|b))";
+  regex_15 := R"((.*)(?=c|b)c)";
+  regex_16 := R"((.*)(?=[bc]))";
+  regex_17 := R"((.*)(?=[bc])c)";
+  regex_18 := R"((.*?)(?=c))";
+  regex_19 := R"((.*?)(?=c)c)";
+  regex_20 := R"((.*?)(?=b|c))";
+  regex_21 := R"((.*?)(?=b|c)c)";
+  regex_22 := R"((.*?)(?=c|b))";
+  regex_23 := R"((.*?)(?=c|b)c)";
+  regex_24 := R"((.*?)(?=[bc]))";
+  regex_25 := R"((.*?)(?=[bc])c)";
+  regex_26 := R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))";
+  regex_27 := R"(a(?!b(?!c))(..))";
+  regex_28 := R"(a(?!b(?=a))(..))";
+  regex_37 := R"(X(\w+)(?=\s)|X(\w+))";
+  regex_38 := R"(^a*(?=b)b)";
+  regex_39 := R"('(?!\A)x'm)";
+  regex_40 := R"('^(o)(?!.*\1)'i)";
+  regex_41 := R"(.*a(?!(b|cd)*e).*f)";
+  regex_42 := R"(^(a*?)(?!(aa|aaaa)*$))";
+  regex_43 := R"((?!)+?|(.{2,4}))";
+  regex_44 := R"(^(a*?)(?!(a{6}|a{5})*$))";
+  regex_45 := R"(a(?!b(?!c(?!d(?!e))))...(.))";
+  regex_46 := R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)";
+  regex_47 := R"(((?s).)c(?!.))";
+  regex_48 := R"(((?s).)c(?!.))";
+  regex_49 := R"(((?s)b.)c(?!.))";
+  regex_50 := R"(((?s)b.)c(?!.))";
+  regex_51 := R"(((?s)b.)c(?!\N))";
+  regex_52 := R"('(b.)c(?!\N)'s)";
+  regex_53 := R"(a*(?!))";
+  run: (this) = {
+    std::cout << "Running tests_19_lookahead:"<< std::endl;
+    test(regex_01, "01", R"(a(?!b).)", "abad", "y", R"($&)", "ad");
+    test(regex_02, "02", R"((?=)a)", "a", "y", R"($&)", "a");
+    test(regex_03, "03", R"(a(?=d).)", "abad", "y", R"($&)", "ad");
+    test(regex_04, "04", R"(a(?=c|d).)", "abad", "y", R"($&)", "ad");
+    test(regex_05, "05", R"(^(?:b|a(?=(.)))*\1)", "abc", "y", R"($&)", "ab");
+    test(regex_06, "06", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab");
+    test(regex_07, "07", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-");
+    test(regex_08, "08", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab");
+    test(regex_09, "09", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-");
+    test(regex_10, "10", R"((.*)(?=c))", "abcd", "y", R"($1)", "ab");
+    test(regex_11, "11", R"((.*)(?=c)c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_12, "12", R"((.*)(?=b|c))", "abcd", "y", R"($1)", "ab");
+    test(regex_13, "13", R"((.*)(?=b|c)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_14, "14", R"((.*)(?=c|b))", "abcd", "y", R"($1)", "ab");
+    test(regex_15, "15", R"((.*)(?=c|b)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_16, "16", R"((.*)(?=[bc]))", "abcd", "y", R"($1)", "ab");
+    test(regex_17, "17", R"((.*)(?=[bc])c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_18, "18", R"((.*?)(?=c))", "abcd", "y", R"($1)", "ab");
+    test(regex_19, "19", R"((.*?)(?=c)c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_20, "20", R"((.*?)(?=b|c))", "abcd", "y", R"($1)", "a");
+    test(regex_21, "21", R"((.*?)(?=b|c)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_22, "22", R"((.*?)(?=c|b))", "abcd", "y", R"($1)", "a");
+    test(regex_23, "23", R"((.*?)(?=c|b)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_24, "24", R"((.*?)(?=[bc]))", "abcd", "y", R"($1)", "a");
+    test(regex_25, "25", R"((.*?)(?=[bc])c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_26, "26", R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))", "aaaaaaaa", "y", R"($1)", "aaaaaaa");
+    test(regex_27, "27", R"(a(?!b(?!c))(..))", "abababc", "y", R"($1)", "bc");
+    test(regex_28, "28", R"(a(?!b(?=a))(..))", "abababc", "y", R"($1)", "bc");
+    test(regex_37, "37", R"(X(\w+)(?=\s)|X(\w+))", "Xab", "y", R"([$1-$2])", "[-ab]");
+    test(regex_38, "38", R"(^a*(?=b)b)", "ab", "y", R"($&)", "ab");
+    test(regex_39, "39", R"('(?!\A)x'm)", "a\nxb\n", "y", R"(-)", "-");
+    test(regex_40, "40", R"('^(o)(?!.*\1)'i)", "Oo", "n", R"(-)", "-");
+    test(regex_41, "41", R"(.*a(?!(b|cd)*e).*f)", "......abef", "n", R"(-)", "-");
+    test(regex_42, "42", R"(^(a*?)(?!(aa|aaaa)*$))", "aaaaaaaaaaaaaaaaaaaa", "y", R"($1)", "a");
+    test(regex_43, "43", R"((?!)+?|(.{2,4}))", "abcde", "y", R"($1)", "abcd");
+    test(regex_44, "44", R"(^(a*?)(?!(a{6}|a{5})*$))", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", R"($+[1])", "12");
+    test(regex_45, "45", R"(a(?!b(?!c(?!d(?!e))))...(.))", "abxabcdxabcde", "y", R"($1)", "e");
+    test(regex_46, "46", R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)", "aXbbbbbbbcccccccccccccaaaX", "y", R"(-)", "-");
+    test(regex_47, "47", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1)", "\n");
+    test(regex_48, "48", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "\n:\nc");
+    test(regex_49, "49", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1)", "b\n");
+    test(regex_50, "50", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc");
+    test(regex_51, "51", R"(((?s)b.)c(?!\N))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc");
+    test(regex_52, "52", R"('(b.)c(?!\N)'s)", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc");
+    test(regex_53, "53", R"(a*(?!))", "aaaab", "n", R"(-)", "-");
+    std::cout << std::endl;
+  }
+}
+main: () = {
+    test_tests_19_lookahead().run();
+}
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
deleted file mode 100644
index 0c4f04cab7..0000000000
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.execution
+++ /dev/null
@@ -1,1124 +0,0 @@
-Running perl_tests_general:
-0_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
-1_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
-2_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
-3_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
-4_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
-5_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
-6_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
-7_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
-8_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
-9_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
-10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
-11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
-12_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
-13_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
-14_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
-15_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
-16_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
-17_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
-18_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
-19_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
-20_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
-21_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
-22_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
-23_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
-24_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
-25_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
-26_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
-27_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
-28_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
-29_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
-30_y: OK regex: \\N{1} parsed_regex: \\N{1} str: abbbbc result_expr: $& expected_results a
-31_y: OK regex: \\N{1} parsed_regex: \\N{1} str: abbbbc result_expr: $-[0] expected_results 0
-32_y: OK regex: \\N{1} parsed_regex: \\N{1} str: abbbbc result_expr: $+[0] expected_results 1
-33_y: OK regex: \\N{3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $& expected_results abbb
-34_y: OK regex: \\N{3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
-35_y: OK regex: \\N{3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
-36_y: OK Warning: Parsed regex does not match. regex: \\N{ 3 , 4 } parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
-37_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
-38_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
-39_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
-40_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
-41_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
-42_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
-43_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
-44_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
-45_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
-46_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
-47_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
-48_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
-49_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
-50_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
-51_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
-52_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
-53_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
-54_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
-55_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
-56_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
-57_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
-58_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
-59_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
-60_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
-61_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
-62_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
-63_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
-64_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
-65_y: OK regex: ^abc\$ parsed_regex: ^abc\$ str: abc result_expr: $& expected_results abc
-66_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: abcc result_expr: - expected_results -
-67_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
-68_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: aabc result_expr: - expected_results -
-69_y: OK regex: abc\$ parsed_regex: abc\$ str: aabc result_expr: $& expected_results abc
-70_n: OK regex: abc\$ parsed_regex: abc\$ str: aabcd result_expr: - expected_results -
-71_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
-72_y: OK regex: \$ parsed_regex: \$ str: abc result_expr: $& expected_results 
-73_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
-74_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
-75_y: OK regex: a\\Nc parsed_regex: a\\Nc str: abc result_expr: $& expected_results abc
-76_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
-77_y: OK regex: a\\N*c parsed_regex: a\\N*c str: axyzc result_expr: $& expected_results axyzc
-78_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
-79_n: OK regex: a\\N*c parsed_regex: a\\N*c str: axyzd result_expr: - expected_results -
-80_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
-81_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
-82_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
-83_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
-84_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
-85_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
-86_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
-87_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
-88_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
-89_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
-90_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
-91_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
-92_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
-93_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
-94_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
-95_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
-96_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
-97_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
-98_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
-99_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
-100_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
-101_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
-102_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
-103_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
-104_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
-105_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
-106_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
-107_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
-108_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
-109_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
-110_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
-111_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
-112_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
-113_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
-114_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
-115_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
-116_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
-117_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
-118_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
-119_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
-120_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
-121_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
-122_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
-123_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
-124_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
-125_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
-126_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
-127_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
-128_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
-129_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
-130_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
-131_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
-132_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
-133_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
-134_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
-135_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
-136_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
-137_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
-138_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
-139_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
-140_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
-141_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
-142_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
-143_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
-144_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
-145_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
-146_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
-147_n: OK regex: \$b parsed_regex: \$b str: b result_expr: - expected_results -
-148_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
-149_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
-150_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
-151_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
-152_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
-153_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
-154_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
-155_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
-156_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
-157_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
-158_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
-159_y: OK regex: abc parsed_regex: abc str: ABC result_expr: $& expected_results ABC
-160_n: OK regex: abc parsed_regex: abc str: XBC result_expr: - expected_results -
-161_n: OK regex: abc parsed_regex: abc str: AXC result_expr: - expected_results -
-162_n: OK regex: abc parsed_regex: abc str: ABX result_expr: - expected_results -
-163_y: OK regex: abc parsed_regex: abc str: XABCY result_expr: $& expected_results ABC
-164_y: OK regex: abc parsed_regex: abc str: ABABC result_expr: $& expected_results ABC
-165_y: OK regex: ab*c parsed_regex: ab*c str: ABC result_expr: $& expected_results ABC
-166_y: OK regex: ab*bc parsed_regex: ab*bc str: ABC result_expr: $& expected_results ABC
-167_y: OK regex: ab*bc parsed_regex: ab*bc str: ABBC result_expr: $& expected_results ABBC
-168_y: OK regex: ab*?bc parsed_regex: ab*?bc str: ABBBBC result_expr: $& expected_results ABBBBC
-169_y: OK regex: ab{0,}?bc parsed_regex: ab{0,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
-170_y: OK regex: ab+?bc parsed_regex: ab+?bc str: ABBC result_expr: $& expected_results ABBC
-171_n: OK regex: ab+bc parsed_regex: ab+bc str: ABC result_expr: - expected_results -
-172_n: OK regex: ab+bc parsed_regex: ab+bc str: ABQ result_expr: - expected_results -
-173_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: ABQ result_expr: - expected_results -
-174_y: OK regex: ab+bc parsed_regex: ab+bc str: ABBBBC result_expr: $& expected_results ABBBBC
-175_y: OK regex: ab{1,}?bc parsed_regex: ab{1,}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
-176_y: OK regex: ab{1,3}?bc parsed_regex: ab{1,3}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
-177_y: OK regex: ab{3,4}?bc parsed_regex: ab{3,4}?bc str: ABBBBC result_expr: $& expected_results ABBBBC
-178_n: OK regex: ab{4,5}?bc parsed_regex: ab{4,5}?bc str: ABBBBC result_expr: - expected_results -
-179_y: OK regex: ab??bc parsed_regex: ab??bc str: ABBC result_expr: $& expected_results ABBC
-180_y: OK regex: ab??bc parsed_regex: ab??bc str: ABC result_expr: $& expected_results ABC
-181_y: OK regex: ab{0,1}?bc parsed_regex: ab{0,1}?bc str: ABC result_expr: $& expected_results ABC
-182_n: OK regex: ab??bc parsed_regex: ab??bc str: ABBBBC result_expr: - expected_results -
-183_y: OK regex: ab??c parsed_regex: ab??c str: ABC result_expr: $& expected_results ABC
-184_y: OK regex: ab{0,1}?c parsed_regex: ab{0,1}?c str: ABC result_expr: $& expected_results ABC
-185_y: OK regex: ^abc\$ parsed_regex: ^abc\$ str: ABC result_expr: $& expected_results ABC
-186_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: ABCC result_expr: - expected_results -
-187_y: OK regex: ^abc parsed_regex: ^abc str: ABCC result_expr: $& expected_results ABC
-188_n: OK regex: ^abc\$ parsed_regex: ^abc\$ str: AABC result_expr: - expected_results -
-189_y: OK regex: abc\$ parsed_regex: abc\$ str: AABC result_expr: $& expected_results ABC
-190_y: OK regex: ^ parsed_regex: ^ str: ABC result_expr: $& expected_results 
-191_y: OK regex: \$ parsed_regex: \$ str: ABC result_expr: $& expected_results 
-192_y: OK regex: a.c parsed_regex: a.c str: ABC result_expr: $& expected_results ABC
-193_y: OK regex: a.c parsed_regex: a.c str: AXC result_expr: $& expected_results AXC
-194_y: OK regex: a\\Nc parsed_regex: a\\Nc str: ABC result_expr: $& expected_results ABC
-195_y: OK regex: a.*?c parsed_regex: a.*?c str: AXYZC result_expr: $& expected_results AXYZC
-196_n: OK regex: a.*c parsed_regex: a.*c str: AXYZD result_expr: - expected_results -
-197_n: OK regex: a[bc]d parsed_regex: a[bc]d str: ABC result_expr: - expected_results -
-198_y: OK regex: a[bc]d parsed_regex: a[bc]d str: ABD result_expr: $& expected_results ABD
-199_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ABD result_expr: - expected_results -
-200_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ACE result_expr: $& expected_results ACE
-201_y: OK regex: a[b-d] parsed_regex: a[b-d] str: AAC result_expr: $& expected_results AC
-202_y: OK regex: a[-b] parsed_regex: a[-b] str: A- result_expr: $& expected_results A-
-203_y: OK regex: a[b-] parsed_regex: a[b-] str: A- result_expr: $& expected_results A-
-204_y: OK regex: a] parsed_regex: a] str: A] result_expr: $& expected_results A]
-205_y: OK regex: a[]]b parsed_regex: a[]]b str: A]B result_expr: $& expected_results A]B
-206_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: AED result_expr: $& expected_results AED
-207_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: ABD result_expr: - expected_results -
-208_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: ADC result_expr: $& expected_results ADC
-209_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: A-C result_expr: - expected_results -
-210_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: A]C result_expr: - expected_results -
-211_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: ADC result_expr: $& expected_results ADC
-212_y: OK regex: ab|cd parsed_regex: ab|cd str: ABC result_expr: $& expected_results AB
-213_y: OK regex: ab|cd parsed_regex: ab|cd str: ABCD result_expr: $& expected_results AB
-214_y: OK regex: ()ef parsed_regex: ()ef str: DEF result_expr: $&-$1 expected_results EF-
-215_n: OK regex: \$b parsed_regex: \$b str: B result_expr: - expected_results -
-216_y: OK regex: a\(b parsed_regex: a\(b str: A(B result_expr: $&-$1 expected_results A(B-
-217_y: OK regex: a\(*b parsed_regex: a\(*b str: AB result_expr: $& expected_results AB
-218_y: OK regex: a\(*b parsed_regex: a\(*b str: A((B result_expr: $& expected_results A((B
-219_y: OK regex: a\\b parsed_regex: a\\b str: A\B result_expr: $& expected_results A\B
-220_y: OK regex: ((a)) parsed_regex: ((a)) str: ABC result_expr: $&-$1-$2 expected_results A-A-A
-221_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
-222_y: OK regex: a+b+c parsed_regex: a+b+c str: AABBABC result_expr: $& expected_results ABC
-223_y: OK regex: a{1,}b{1,}c parsed_regex: a{1,}b{1,}c str: AABBABC result_expr: $& expected_results ABC
-224_y: OK regex: a.+?c parsed_regex: a.+?c str: ABCABC result_expr: $& expected_results ABC
-225_y: OK regex: a.*?c parsed_regex: a.*?c str: ABCABC result_expr: $& expected_results ABC
-226_y: OK regex: a.{0,5}?c parsed_regex: a.{0,5}?c str: ABCABC result_expr: $& expected_results ABC
-227_y: OK regex: (a+|b)* parsed_regex: (a+|b)* str: AB result_expr: $&-$1 expected_results AB-B
-228_y: OK regex: (a+|b){0,} parsed_regex: (a+|b){0,} str: AB result_expr: $&-$1 expected_results AB-B
-229_y: OK regex: (a+|b)+ parsed_regex: (a+|b)+ str: AB result_expr: $&-$1 expected_results AB-B
-230_y: OK regex: (a+|b){1,} parsed_regex: (a+|b){1,} str: AB result_expr: $&-$1 expected_results AB-B
-231_y: OK regex: (a+|b)? parsed_regex: (a+|b)? str: AB result_expr: $&-$1 expected_results A-A
-232_y: OK regex: (a+|b){0,1} parsed_regex: (a+|b){0,1} str: AB result_expr: $&-$1 expected_results A-A
-233_y: OK regex: (a+|b){0,1}? parsed_regex: (a+|b){0,1}? str: AB result_expr: $&-$1 expected_results -
-234_y: OK regex: [^ab]* parsed_regex: [^ab]* str: CDE result_expr: $& expected_results CDE
-235_n: OK regex: abc parsed_regex: abc str:  result_expr: - expected_results -
-236_y: OK regex: a* parsed_regex: a* str:  result_expr: $& expected_results 
-237_y: OK regex: ([abc])*d parsed_regex: ([abc])*d str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
-238_y: OK regex: ([abc])*bcd parsed_regex: ([abc])*bcd str: ABCD result_expr: $&-$1 expected_results ABCD-A
-239_y: OK regex: a|b|c|d|e parsed_regex: a|b|c|d|e str: E result_expr: $& expected_results E
-240_y: OK regex: (a|b|c|d|e)f parsed_regex: (a|b|c|d|e)f str: EF result_expr: $&-$1 expected_results EF-E
-241_y: OK regex: abcd*efg parsed_regex: abcd*efg str: ABCDEFG result_expr: $& expected_results ABCDEFG
-242_y: OK regex: ab* parsed_regex: ab* str: XABYABBBZ result_expr: $& expected_results AB
-243_y: OK regex: ab* parsed_regex: ab* str: XAYABBBZ result_expr: $& expected_results A
-244_y: OK regex: (ab|cd)e parsed_regex: (ab|cd)e str: ABCDE result_expr: $&-$1 expected_results CDE-CD
-245_y: OK regex: [abhgefdc]ij parsed_regex: [abhgefdc]ij str: HIJ result_expr: $& expected_results HIJ
-246_n: OK regex: ^(ab|cd)e parsed_regex: ^(ab|cd)e str: ABCDE result_expr: x$1y expected_results XY
-247_y: OK regex: (abc|)ef parsed_regex: (abc|)ef str: ABCDEF result_expr: $&-$1 expected_results EF-
-248_y: OK regex: (a|b)c*d parsed_regex: (a|b)c*d str: ABCD result_expr: $&-$1 expected_results BCD-B
-249_y: OK regex: (ab|ab*)bc parsed_regex: (ab|ab*)bc str: ABC result_expr: $&-$1 expected_results ABC-A
-250_y: OK regex: a([bc]*)c* parsed_regex: a([bc]*)c* str: ABC result_expr: $&-$1 expected_results ABC-BC
-251_y: OK regex: a([bc]*)(c*d) parsed_regex: a([bc]*)(c*d) str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
-252_y: OK regex: a([bc]+)(c*d) parsed_regex: a([bc]+)(c*d) str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
-253_y: OK regex: a([bc]*)(c+d) parsed_regex: a([bc]*)(c+d) str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
-254_y: OK regex: a[bcd]*dcdcde parsed_regex: a[bcd]*dcdcde str: ADCDCDE result_expr: $& expected_results ADCDCDE
-255_n: OK regex: a[bcd]+dcdcde parsed_regex: a[bcd]+dcdcde str: ADCDCDE result_expr: - expected_results -
-256_y: OK regex: (ab|a)b*c parsed_regex: (ab|a)b*c str: ABC result_expr: $&-$1 expected_results ABC-AB
-257_y: OK regex: ((a)(b)c)(d) parsed_regex: ((a)(b)c)(d) str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
-258_y: OK regex: [a-zA-Z_][a-zA-Z0-9_]* parsed_regex: [a-zA-Z_][a-zA-Z0-9_]* str: ALPHA result_expr: $& expected_results ALPHA
-259_y: OK regex: ^a(bc+|b[eh])g|.h\$ parsed_regex: ^a(bc+|b[eh])g|.h\$ str: ABH result_expr: $&-$1 expected_results BH-
-260_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
-261_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
-262_n: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: EFFG result_expr: - expected_results -
-263_n: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: BCDD result_expr: - expected_results -
-264_y: OK regex: (bc+d\$|ef*g.|h?i(j|k)) parsed_regex: (bc+d\$|ef*g.|h?i(j|k)) str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
-265_y: OK regex: ((((((((((a)))))))))) parsed_regex: ((((((((((a)))))))))) str: A result_expr: $10 expected_results A
-266_y: OK regex: ((((((((((a))))))))))\10 parsed_regex: ((((((((((a))))))))))\10 str: AA result_expr: $& expected_results AA
-267_y: OK regex: (((((((((a))))))))) parsed_regex: (((((((((a))))))))) str: A result_expr: $& expected_results A
-268_n: OK regex: multiple words of text parsed_regex: multiple words of text str: UH-UH result_expr: - expected_results -
-269_y: OK regex: multiple words parsed_regex: multiple words str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
-270_y: OK regex: (.*)c(.*) parsed_regex: (.*)c(.*) str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
-271_y: OK regex: \((.*), (.*)\) parsed_regex: \((.*), (.*)\) str: (A, B) result_expr: ($2, $1) expected_results (B, A)
-272_n: OK regex: [k] parsed_regex: [k] str: AB result_expr: - expected_results -
-273_y: OK regex: abcd parsed_regex: abcd str: ABCD result_expr: $& expected_results ABCD
-274_y: OK regex: a(bc)d parsed_regex: a(bc)d str: ABCD result_expr: $1 expected_results BC
-275_y: OK regex: a[-]?c parsed_regex: a[-]?c str: AC result_expr: $& expected_results AC
-276_y: OK regex: (abc)\1 parsed_regex: (abc)\1 str: ABCABC result_expr: $1 expected_results ABC
-277_y: OK regex: ([a-c]*)\1 parsed_regex: ([a-c]*)\1 str: ABCABC result_expr: $1 expected_results ABC
-278_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
-279_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
-280_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
-281_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
-282_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
-283_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
-284_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
-285_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
-286_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
-287_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
-288_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
-289_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
-290_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
-291_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
-292_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
-293_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
-294_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
-295_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
-296_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
-297_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
-298_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
-299_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
-300_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
-301_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
-302_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
-303_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
-304_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
-305_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
-306_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
-307_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
-308_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
-309_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
-310_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
-311_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
-312_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
-313_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
-314_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
-315_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
-316_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
-317_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
-318_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
-319_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
-320_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
-321_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
-322_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
-323_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
-324_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
-325_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
-326_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
-327_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
-328_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
-329_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
-330_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
-331_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
-332_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
-
-
-bar result_expr: $1 expected_results 
-
-
-
-333_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
-
-
-bar result_expr: $1-$2 expected_results foo-
-334_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
-
-
-bar result_expr: $1-$2 expected_results 
-
-
--b
-335_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
-336_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
-337_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
-338_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
-339_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
-340_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
-341_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
-342_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
-343_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
-344_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
-345_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
-346_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
-347_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
-348_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
-349_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
-350_y: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: ab result_expr: $& expected_results ab
-351_y: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: ab result_expr: $&:$1 expected_results ab:a
-352_y: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: aB result_expr: $& expected_results aB
-353_y: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: aB result_expr: $&:$1 expected_results aB:a
-354_n: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: Ab result_expr: - expected_results -
-355_n: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: Ab result_expr: - expected_results -
-356_y: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: aB result_expr: $& expected_results aB
-357_y: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: aB result_expr: $1 expected_results a
-358_n: OK regex: (?:(?-i)a)b parsed_regex: (?:(?-i)a)b str: AB result_expr: - expected_results -
-359_n: OK regex: ((?-i)a)b parsed_regex: ((?-i)a)b str: AB result_expr: - expected_results -
-360_y: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: ab result_expr: $& expected_results ab
-361_y: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: ab result_expr: $&:$1 expected_results ab:a
-362_y: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: aB result_expr: $& expected_results aB
-363_y: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: aB result_expr: $&:$1 expected_results aB:a
-364_n: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: Ab result_expr: - expected_results -
-365_n: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: Ab result_expr: - expected_results -
-366_y: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: aB result_expr: $& expected_results aB
-367_y: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: aB result_expr: $1 expected_results a
-368_n: OK regex: (?-i:a)b parsed_regex: (?-i:a)b str: AB result_expr: - expected_results -
-369_n: OK regex: ((?-i:a))b parsed_regex: ((?-i:a))b str: AB result_expr: - expected_results -
-370_n: OK regex: ((?-i:a.))b parsed_regex: ((?-i:a.))b str: a
-B result_expr: - expected_results -
-371_n: OK regex: ((?-i:a\\N))b parsed_regex: ((?-i:a\\N))b str: a
-B result_expr: - expected_results -
-372_y: OK regex: ((?s-i:a.))b parsed_regex: ((?s-i:a.))b str: a
-B result_expr: $1 expected_results a
-
-373_n: OK regex: ((?s-i:a\\N))b parsed_regex: ((?s-i:a\\N))b str: a
-B result_expr: - expected_results -
-374_n: OK regex: ((?s-i:a.))b parsed_regex: ((?s-i:a.))b str: B
-B result_expr: - expected_results -
-375_n: OK regex: ((?s-i:a\\N))b parsed_regex: ((?s-i:a\\N))b str: B
-B result_expr: - expected_results -
-376_n: OK regex: ^(?:a?b?)*\$ parsed_regex: ^(?:a?b?)*\$ str: a-- result_expr: - expected_results -
-377_y: OK regex: ((?s)^a(.))((?m)^b\$) parsed_regex: ((?s)^a(.))((?m)^b\$) str: a
-b
-c
- result_expr: $1;$2;$3 expected_results a
-;
-;b
-378_y: OK regex: ((?m)^b\$) parsed_regex: ((?m)^b\$) str: a
-b
-c
- result_expr: $1 expected_results b
-379_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
-b
- result_expr: $& expected_results b
-380_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
-b
- result_expr: $1 expected_results b
-381_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
-b
- result_expr: $1 expected_results b
-382_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
-b
- result_expr: $1 expected_results b
-383_n: OK regex: ^b parsed_regex: ^b str: a
-b
-c
- result_expr: - expected_results -
-384_n: OK regex: ()^b parsed_regex: ()^b str: a
-b
-c
- result_expr: - expected_results -
-385_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
-b
-c
- result_expr: $1 expected_results b
-386_y: OK regex: \Z parsed_regex: \Z str: a
-b
- result_expr: $-[0] expected_results 3
-387_y: OK regex: \z parsed_regex: \z str: a
-b
- result_expr: $-[0] expected_results 4
-388_y: OK regex: \$ parsed_regex: \$ str: a
-b
- result_expr: $-[0] expected_results 3
-389_y: OK regex: \Z parsed_regex: \Z str: b
-a
- result_expr: $-[0] expected_results 3
-390_y: OK regex: \z parsed_regex: \z str: b
-a
- result_expr: $-[0] expected_results 4
-391_y: OK regex: \$ parsed_regex: \$ str: b
-a
- result_expr: $-[0] expected_results 3
-392_y: OK regex: \Z parsed_regex: \Z str: b
-a result_expr: $-[0] expected_results 3
-393_y: OK regex: \z parsed_regex: \z str: b
-a result_expr: $-[0] expected_results 3
-394_y: OK regex: \$ parsed_regex: \$ str: b
-a result_expr: $-[0] expected_results 3
-395_y: OK regex: \Z parsed_regex: \Z str: a
-b
- result_expr: $-[0] expected_results 3
-396_y: OK regex: \z parsed_regex: \z str: a
-b
- result_expr: $-[0] expected_results 4
-397_y: OK regex: \$ parsed_regex: \$ str: a
-b
- result_expr: $-[0] expected_results 1
-398_y: OK regex: \Z parsed_regex: \Z str: b
-a
- result_expr: $-[0] expected_results 3
-399_y: OK regex: \z parsed_regex: \z str: b
-a
- result_expr: $-[0] expected_results 4
-400_y: OK regex: \$ parsed_regex: \$ str: b
-a
- result_expr: $-[0] expected_results 1
-401_y: OK regex: \Z parsed_regex: \Z str: b
-a result_expr: $-[0] expected_results 3
-402_y: OK regex: \z parsed_regex: \z str: b
-a result_expr: $-[0] expected_results 3
-403_y: OK regex: \$ parsed_regex: \$ str: b
-a result_expr: $-[0] expected_results 1
-404_n: OK regex: a\Z parsed_regex: a\Z str: a
-b
- result_expr: - expected_results -
-405_n: OK regex: a\z parsed_regex: a\z str: a
-b
- result_expr: - expected_results -
-406_n: OK regex: a\$ parsed_regex: a\$ str: a
-b
- result_expr: - expected_results -
-407_y: OK regex: a\Z parsed_regex: a\Z str: b
-a
- result_expr: $-[0] expected_results 2
-408_n: OK regex: a\z parsed_regex: a\z str: b
-a
- result_expr: - expected_results -
-409_y: OK regex: a\$ parsed_regex: a\$ str: b
-a
- result_expr: $-[0] expected_results 2
-410_y: OK regex: a\Z parsed_regex: a\Z str: b
-a result_expr: $-[0] expected_results 2
-411_y: OK regex: a\z parsed_regex: a\z str: b
-a result_expr: $-[0] expected_results 2
-412_y: OK regex: a\$ parsed_regex: a\$ str: b
-a result_expr: $-[0] expected_results 2
-413_n: OK regex: a\Z parsed_regex: a\Z str: a
-b
- result_expr: - expected_results -
-414_n: OK regex: a\z parsed_regex: a\z str: a
-b
- result_expr: - expected_results -
-415_y: OK regex: a\$ parsed_regex: a\$ str: a
-b
- result_expr: $-[0] expected_results 0
-416_y: OK regex: a\Z parsed_regex: a\Z str: b
-a
- result_expr: $-[0] expected_results 2
-417_n: OK regex: a\z parsed_regex: a\z str: b
-a
- result_expr: - expected_results -
-418_y: OK regex: a\$ parsed_regex: a\$ str: b
-a
- result_expr: $-[0] expected_results 2
-419_y: OK regex: a\Z parsed_regex: a\Z str: b
-a result_expr: $-[0] expected_results 2
-420_y: OK regex: a\z parsed_regex: a\z str: b
-a result_expr: $-[0] expected_results 2
-421_y: OK regex: a\$ parsed_regex: a\$ str: b
-a result_expr: $-[0] expected_results 2
-422_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
-b
- result_expr: - expected_results -
-423_n: OK regex: aa\z parsed_regex: aa\z str: aa
-b
- result_expr: - expected_results -
-424_n: OK regex: aa\$ parsed_regex: aa\$ str: aa
-b
- result_expr: - expected_results -
-425_y: OK regex: aa\Z parsed_regex: aa\Z str: b
-aa
- result_expr: $-[0] expected_results 2
-426_n: OK regex: aa\z parsed_regex: aa\z str: b
-aa
- result_expr: - expected_results -
-427_y: OK regex: aa\$ parsed_regex: aa\$ str: b
-aa
- result_expr: $-[0] expected_results 2
-428_y: OK regex: aa\Z parsed_regex: aa\Z str: b
-aa result_expr: $-[0] expected_results 2
-429_y: OK regex: aa\z parsed_regex: aa\z str: b
-aa result_expr: $-[0] expected_results 2
-430_y: OK regex: aa\$ parsed_regex: aa\$ str: b
-aa result_expr: $-[0] expected_results 2
-431_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
-b
- result_expr: - expected_results -
-432_n: OK regex: aa\z parsed_regex: aa\z str: aa
-b
- result_expr: - expected_results -
-433_y: OK regex: aa\$ parsed_regex: aa\$ str: aa
-b
- result_expr: $-[0] expected_results 0
-434_y: OK regex: aa\Z parsed_regex: aa\Z str: b
-aa
- result_expr: $-[0] expected_results 2
-435_n: OK regex: aa\z parsed_regex: aa\z str: b
-aa
- result_expr: - expected_results -
-436_y: OK regex: aa\$ parsed_regex: aa\$ str: b
-aa
- result_expr: $-[0] expected_results 2
-437_y: OK regex: aa\Z parsed_regex: aa\Z str: b
-aa result_expr: $-[0] expected_results 2
-438_y: OK regex: aa\z parsed_regex: aa\z str: b
-aa result_expr: $-[0] expected_results 2
-439_y: OK regex: aa\$ parsed_regex: aa\$ str: b
-aa result_expr: $-[0] expected_results 2
-440_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
-b
- result_expr: - expected_results -
-441_n: OK regex: aa\z parsed_regex: aa\z str: ac
-b
- result_expr: - expected_results -
-442_n: OK regex: aa\$ parsed_regex: aa\$ str: ac
-b
- result_expr: - expected_results -
-443_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ac
- result_expr: - expected_results -
-444_n: OK regex: aa\z parsed_regex: aa\z str: b
-ac
- result_expr: - expected_results -
-445_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ac
- result_expr: - expected_results -
-446_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ac result_expr: - expected_results -
-447_n: OK regex: aa\z parsed_regex: aa\z str: b
-ac result_expr: - expected_results -
-448_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ac result_expr: - expected_results -
-449_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
-b
- result_expr: - expected_results -
-450_n: OK regex: aa\z parsed_regex: aa\z str: ac
-b
- result_expr: - expected_results -
-451_n: OK regex: aa\$ parsed_regex: aa\$ str: ac
-b
- result_expr: - expected_results -
-452_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ac
- result_expr: - expected_results -
-453_n: OK regex: aa\z parsed_regex: aa\z str: b
-ac
- result_expr: - expected_results -
-454_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ac
- result_expr: - expected_results -
-455_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ac result_expr: - expected_results -
-456_n: OK regex: aa\z parsed_regex: aa\z str: b
-ac result_expr: - expected_results -
-457_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ac result_expr: - expected_results -
-458_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
-b
- result_expr: - expected_results -
-459_n: OK regex: aa\z parsed_regex: aa\z str: ca
-b
- result_expr: - expected_results -
-460_n: OK regex: aa\$ parsed_regex: aa\$ str: ca
-b
- result_expr: - expected_results -
-461_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ca
- result_expr: - expected_results -
-462_n: OK regex: aa\z parsed_regex: aa\z str: b
-ca
- result_expr: - expected_results -
-463_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ca
- result_expr: - expected_results -
-464_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ca result_expr: - expected_results -
-465_n: OK regex: aa\z parsed_regex: aa\z str: b
-ca result_expr: - expected_results -
-466_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ca result_expr: - expected_results -
-467_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
-b
- result_expr: - expected_results -
-468_n: OK regex: aa\z parsed_regex: aa\z str: ca
-b
- result_expr: - expected_results -
-469_n: OK regex: aa\$ parsed_regex: aa\$ str: ca
-b
- result_expr: - expected_results -
-470_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ca
- result_expr: - expected_results -
-471_n: OK regex: aa\z parsed_regex: aa\z str: b
-ca
- result_expr: - expected_results -
-472_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ca
- result_expr: - expected_results -
-473_n: OK regex: aa\Z parsed_regex: aa\Z str: b
-ca result_expr: - expected_results -
-474_n: OK regex: aa\z parsed_regex: aa\z str: b
-ca result_expr: - expected_results -
-475_n: OK regex: aa\$ parsed_regex: aa\$ str: b
-ca result_expr: - expected_results -
-476_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
-b
- result_expr: - expected_results -
-477_n: OK regex: ab\z parsed_regex: ab\z str: ab
-b
- result_expr: - expected_results -
-478_n: OK regex: ab\$ parsed_regex: ab\$ str: ab
-b
- result_expr: - expected_results -
-479_y: OK regex: ab\Z parsed_regex: ab\Z str: b
-ab
- result_expr: $-[0] expected_results 2
-480_n: OK regex: ab\z parsed_regex: ab\z str: b
-ab
- result_expr: - expected_results -
-481_y: OK regex: ab\$ parsed_regex: ab\$ str: b
-ab
- result_expr: $-[0] expected_results 2
-482_y: OK regex: ab\Z parsed_regex: ab\Z str: b
-ab result_expr: $-[0] expected_results 2
-483_y: OK regex: ab\z parsed_regex: ab\z str: b
-ab result_expr: $-[0] expected_results 2
-484_y: OK regex: ab\$ parsed_regex: ab\$ str: b
-ab result_expr: $-[0] expected_results 2
-485_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
-b
- result_expr: - expected_results -
-486_n: OK regex: ab\z parsed_regex: ab\z str: ab
-b
- result_expr: - expected_results -
-487_y: OK regex: ab\$ parsed_regex: ab\$ str: ab
-b
- result_expr: $-[0] expected_results 0
-488_y: OK regex: ab\Z parsed_regex: ab\Z str: b
-ab
- result_expr: $-[0] expected_results 2
-489_n: OK regex: ab\z parsed_regex: ab\z str: b
-ab
- result_expr: - expected_results -
-490_y: OK regex: ab\$ parsed_regex: ab\$ str: b
-ab
- result_expr: $-[0] expected_results 2
-491_y: OK regex: ab\Z parsed_regex: ab\Z str: b
-ab result_expr: $-[0] expected_results 2
-492_y: OK regex: ab\z parsed_regex: ab\z str: b
-ab result_expr: $-[0] expected_results 2
-493_y: OK regex: ab\$ parsed_regex: ab\$ str: b
-ab result_expr: $-[0] expected_results 2
-494_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
-b
- result_expr: - expected_results -
-495_n: OK regex: ab\z parsed_regex: ab\z str: ac
-b
- result_expr: - expected_results -
-496_n: OK regex: ab\$ parsed_regex: ab\$ str: ac
-b
- result_expr: - expected_results -
-497_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ac
- result_expr: - expected_results -
-498_n: OK regex: ab\z parsed_regex: ab\z str: b
-ac
- result_expr: - expected_results -
-499_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ac
- result_expr: - expected_results -
-500_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ac result_expr: - expected_results -
-501_n: OK regex: ab\z parsed_regex: ab\z str: b
-ac result_expr: - expected_results -
-502_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ac result_expr: - expected_results -
-503_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
-b
- result_expr: - expected_results -
-504_n: OK regex: ab\z parsed_regex: ab\z str: ac
-b
- result_expr: - expected_results -
-505_n: OK regex: ab\$ parsed_regex: ab\$ str: ac
-b
- result_expr: - expected_results -
-506_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ac
- result_expr: - expected_results -
-507_n: OK regex: ab\z parsed_regex: ab\z str: b
-ac
- result_expr: - expected_results -
-508_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ac
- result_expr: - expected_results -
-509_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ac result_expr: - expected_results -
-510_n: OK regex: ab\z parsed_regex: ab\z str: b
-ac result_expr: - expected_results -
-511_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ac result_expr: - expected_results -
-512_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
-b
- result_expr: - expected_results -
-513_n: OK regex: ab\z parsed_regex: ab\z str: ca
-b
- result_expr: - expected_results -
-514_n: OK regex: ab\$ parsed_regex: ab\$ str: ca
-b
- result_expr: - expected_results -
-515_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ca
- result_expr: - expected_results -
-516_n: OK regex: ab\z parsed_regex: ab\z str: b
-ca
- result_expr: - expected_results -
-517_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ca
- result_expr: - expected_results -
-518_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ca result_expr: - expected_results -
-519_n: OK regex: ab\z parsed_regex: ab\z str: b
-ca result_expr: - expected_results -
-520_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ca result_expr: - expected_results -
-521_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
-b
- result_expr: - expected_results -
-522_n: OK regex: ab\z parsed_regex: ab\z str: ca
-b
- result_expr: - expected_results -
-523_n: OK regex: ab\$ parsed_regex: ab\$ str: ca
-b
- result_expr: - expected_results -
-524_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ca
- result_expr: - expected_results -
-525_n: OK regex: ab\z parsed_regex: ab\z str: b
-ca
- result_expr: - expected_results -
-526_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ca
- result_expr: - expected_results -
-527_n: OK regex: ab\Z parsed_regex: ab\Z str: b
-ca result_expr: - expected_results -
-528_n: OK regex: ab\z parsed_regex: ab\z str: b
-ca result_expr: - expected_results -
-529_n: OK regex: ab\$ parsed_regex: ab\$ str: b
-ca result_expr: - expected_results -
-530_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
-b
- result_expr: - expected_results -
-531_n: OK regex: abb\z parsed_regex: abb\z str: abb
-b
- result_expr: - expected_results -
-532_n: OK regex: abb\$ parsed_regex: abb\$ str: abb
-b
- result_expr: - expected_results -
-533_y: OK regex: abb\Z parsed_regex: abb\Z str: b
-abb
- result_expr: $-[0] expected_results 2
-534_n: OK regex: abb\z parsed_regex: abb\z str: b
-abb
- result_expr: - expected_results -
-535_y: OK regex: abb\$ parsed_regex: abb\$ str: b
-abb
- result_expr: $-[0] expected_results 2
-536_y: OK regex: abb\Z parsed_regex: abb\Z str: b
-abb result_expr: $-[0] expected_results 2
-537_y: OK regex: abb\z parsed_regex: abb\z str: b
-abb result_expr: $-[0] expected_results 2
-538_y: OK regex: abb\$ parsed_regex: abb\$ str: b
-abb result_expr: $-[0] expected_results 2
-539_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
-b
- result_expr: - expected_results -
-540_n: OK regex: abb\z parsed_regex: abb\z str: abb
-b
- result_expr: - expected_results -
-541_y: OK regex: abb\$ parsed_regex: abb\$ str: abb
-b
- result_expr: $-[0] expected_results 0
-542_y: OK regex: abb\Z parsed_regex: abb\Z str: b
-abb
- result_expr: $-[0] expected_results 2
-543_n: OK regex: abb\z parsed_regex: abb\z str: b
-abb
- result_expr: - expected_results -
-544_y: OK regex: abb\$ parsed_regex: abb\$ str: b
-abb
- result_expr: $-[0] expected_results 2
-545_y: OK regex: abb\Z parsed_regex: abb\Z str: b
-abb result_expr: $-[0] expected_results 2
-546_y: OK regex: abb\z parsed_regex: abb\z str: b
-abb result_expr: $-[0] expected_results 2
-547_y: OK regex: abb\$ parsed_regex: abb\$ str: b
-abb result_expr: $-[0] expected_results 2
-548_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
-b
- result_expr: - expected_results -
-549_n: OK regex: abb\z parsed_regex: abb\z str: ac
-b
- result_expr: - expected_results -
-550_n: OK regex: abb\$ parsed_regex: abb\$ str: ac
-b
- result_expr: - expected_results -
-551_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ac
- result_expr: - expected_results -
-552_n: OK regex: abb\z parsed_regex: abb\z str: b
-ac
- result_expr: - expected_results -
-553_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ac
- result_expr: - expected_results -
-554_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ac result_expr: - expected_results -
-555_n: OK regex: abb\z parsed_regex: abb\z str: b
-ac result_expr: - expected_results -
-556_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ac result_expr: - expected_results -
-557_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
-b
- result_expr: - expected_results -
-558_n: OK regex: abb\z parsed_regex: abb\z str: ac
-b
- result_expr: - expected_results -
-559_n: OK regex: abb\$ parsed_regex: abb\$ str: ac
-b
- result_expr: - expected_results -
-560_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ac
- result_expr: - expected_results -
-561_n: OK regex: abb\z parsed_regex: abb\z str: b
-ac
- result_expr: - expected_results -
-562_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ac
- result_expr: - expected_results -
-563_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ac result_expr: - expected_results -
-564_n: OK regex: abb\z parsed_regex: abb\z str: b
-ac result_expr: - expected_results -
-565_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ac result_expr: - expected_results -
-566_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
-b
- result_expr: - expected_results -
-567_n: OK regex: abb\z parsed_regex: abb\z str: ca
-b
- result_expr: - expected_results -
-568_n: OK regex: abb\$ parsed_regex: abb\$ str: ca
-b
- result_expr: - expected_results -
-569_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ca
- result_expr: - expected_results -
-570_n: OK regex: abb\z parsed_regex: abb\z str: b
-ca
- result_expr: - expected_results -
-571_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ca
- result_expr: - expected_results -
-572_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ca result_expr: - expected_results -
-573_n: OK regex: abb\z parsed_regex: abb\z str: b
-ca result_expr: - expected_results -
-574_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ca result_expr: - expected_results -
-575_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
-b
- result_expr: - expected_results -
-576_n: OK regex: abb\z parsed_regex: abb\z str: ca
-b
- result_expr: - expected_results -
-577_n: OK regex: abb\$ parsed_regex: abb\$ str: ca
-b
- result_expr: - expected_results -
-578_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ca
- result_expr: - expected_results -
-579_n: OK regex: abb\z parsed_regex: abb\z str: b
-ca
- result_expr: - expected_results -
-580_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ca
- result_expr: - expected_results -
-581_n: OK regex: abb\Z parsed_regex: abb\Z str: b
-ca result_expr: - expected_results -
-582_n: OK regex: abb\z parsed_regex: abb\z str: b
-ca result_expr: - expected_results -
-583_n: OK regex: abb\$ parsed_regex: abb\$ str: b
-ca result_expr: - expected_results -
-584_y: OK regex: \Aa\$ parsed_regex: \Aa\$ str: a
-
- result_expr: $& expected_results a
-585_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
-586_y: OK regex: (?i:\\N[b]\\N) parsed_regex: (?i:\\N[b]\\N) str: abd result_expr: $& expected_results abd
-587_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $& expected_results a
-588_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $-[0] expected_results 0
-589_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $+[0] expected_results 1
-590_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $& expected_results abbb
-591_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
-592_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
-593_y: OK Warning: Parsed regex does not match. regex: a\\N c parsed_regex: a\\Nc str: abc result_expr: $& expected_results abc
-594_y: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzc result_expr: $& expected_results axyzc
-595_n: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzd result_expr: - expected_results -
-596_yS: OK regex: [a b] parsed_regex: [a b] str:   result_expr: $& expected_results  
-597_n: OK Warning: Parsed regex does not match. regex: [a b] parsed_regex: [ab] str:   result_expr: - expected_results -
-598_y: OK Warning: Parsed regex does not match. regex: [a\ b] parsed_regex: [a b] str:   result_expr: $& expected_results  
-599_n: OK Warning: Parsed regex does not match. regex: [ ^ a b ] parsed_regex: [^ab] str: a result_expr: - expected_results -
-600_n: OK Warning: Parsed regex does not match. regex: [ ^ a b ] parsed_regex: [^ab] str: b result_expr: - expected_results -
-601_y: OK Warning: Parsed regex does not match. regex: [ ^ a b ] parsed_regex: [^ab] str: A result_expr: $& expected_results A
-602_yS: OK regex: (?x:[a b]) parsed_regex: (?x:[a b]) str:   result_expr: $& expected_results  
-603_n: OK Warning: Parsed regex does not match. regex: (?xx:[a b]) parsed_regex: (?xx:[ab]) str:   result_expr: - expected_results -
-604_yS: OK regex: (?x)[a b] parsed_regex: (?x)[a b] str:   result_expr: $& expected_results  
-605_n: OK Warning: Parsed regex does not match. regex: (?xx)[a b] parsed_regex: (?xx)[ab] str:   result_expr: - expected_results -
-606_yS: OK regex: (?-x:[a b]) parsed_regex: (?-x:[a b]) str:   result_expr: $& expected_results  
-607_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $& expected_results a
-608_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $-[0] expected_results 0
-609_y: OK Warning: Parsed regex does not match. regex: \\N {1} parsed_regex: \\N{1} str: abbbbc result_expr: $+[0] expected_results 1
-610_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $& expected_results abbb
-611_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
-612_y: OK Warning: Parsed regex does not match. regex: \\N {3,4} parsed_regex: \\N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
-613_y: OK Warning: Parsed regex does not match. regex: a\\N c parsed_regex: a\\Nc str: abc result_expr: $& expected_results abc
-614_y: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzc result_expr: $& expected_results axyzc
-615_n: OK Warning: Parsed regex does not match. regex: a\\N *c parsed_regex: a\\N*c str: axyzd result_expr: - expected_results -
-616_y: OK regex: [#] parsed_regex: [#] str: a#b result_expr: $& expected_results #
-617_y: OK regex: [#]b parsed_regex: [#]b str: a#b result_expr: $& expected_results #b
-618_y: OK regex: [#] parsed_regex: [#] str: a#b result_expr: $& expected_results #
-619_y: OK regex: [#]b parsed_regex: [#]b str: a#b result_expr: $& expected_results #b
-620_y: OK regex: (?'n'foo) \g{n} parsed_regex: (?'n'foo) \g{n} str: ..foo foo.. result_expr: $1 expected_results foo
-621_y: OK regex: (?'n'foo) \g{ n } parsed_regex: (?'n'foo) \g{ n } str: ..foo foo.. result_expr: $1 expected_results foo
-622_yM: OK regex: (?'n'foo) \g{n} parsed_regex: (?'n'foo) \g{n} str: ..foo foo.. result_expr: $+{n} expected_results foo
-623_y: OK regex: (?foo) \g{n} parsed_regex: (?foo) \g{n} str: ..foo foo.. result_expr: $1 expected_results foo
-624_yM: OK regex: (?foo) \g{n} parsed_regex: (?foo) \g{n} str: ..foo foo.. result_expr: $+{n} expected_results foo
-625_y: OK regex: (?as) (\w+) \g{as} (\w+) parsed_regex: (?as) (\w+) \g{as} (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
-626_y: OK regex: (?'n'foo) \k parsed_regex: (?'n'foo) \k str: ..foo foo.. result_expr: $1 expected_results foo
-627_yM: OK regex: (?'n'foo) \k parsed_regex: (?'n'foo) \k str: ..foo foo.. result_expr: $+{n} expected_results foo
-628_y: OK regex: (?foo) \k'n' parsed_regex: (?foo) \k'n' str: ..foo foo.. result_expr: $1 expected_results foo
-629_yM: OK regex: (?foo) \k'n' parsed_regex: (?foo) \k'n' str: ..foo foo.. result_expr: $+{n} expected_results foo
-630_yM: OK regex: (?'a1'foo) \k'a1' parsed_regex: (?'a1'foo) \k'a1' str: ..foo foo.. result_expr: $+{a1} expected_results foo
-631_yM: OK regex: (?foo) \k parsed_regex: (?foo) \k str: ..foo foo.. result_expr: $+{a1} expected_results foo
-632_yM: OK regex: (?'_'foo) \k'_' parsed_regex: (?'_'foo) \k'_' str: ..foo foo.. result_expr: $+{_} expected_results foo
-633_yM: OK regex: (?<_>foo) \k<_> parsed_regex: (?<_>foo) \k<_> str: ..foo foo.. result_expr: $+{_} expected_results foo
-634_yM: OK regex: (?'_0_'foo) \k'_0_' parsed_regex: (?'_0_'foo) \k'_0_' str: ..foo foo.. result_expr: $+{_0_} expected_results foo
-635_yM: OK regex: (?<_0_>foo) \k<_0_> parsed_regex: (?<_0_>foo) \k<_0_> str: ..foo foo.. result_expr: $+{_0_} expected_results foo
-636_y: OK regex: (?as) (\w+) \k (\w+) parsed_regex: (?as) (\w+) \k (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
-637_y: OK regex: (?as) (\w+) \k{as} (\w+) parsed_regex: (?as) (\w+) \k{as} (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
-638_y: OK regex: (?as) (\w+) \k'as' (\w+) parsed_regex: (?as) (\w+) \k'as' (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
-639_y: OK regex: (?as) (\w+) \k{ as } (\w+) parsed_regex: (?as) (\w+) \k{ as } (\w+) str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
-640_y: OK Warning: Parsed regex does not match. regex: ^a(?#xxx){3}c parsed_regex: ^a{3}c str: aaac result_expr: $& expected_results aaac
-641_y: OK Warning: Parsed regex does not match. regex: ^a (?#xxx) (?#yyy) {3}c parsed_regex: ^a{3}c str: aaac result_expr: $& expected_results aaac
-642_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
-643_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
-644_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
-645_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
-646_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
-647_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
-648_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
-649_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
-650_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
-651_y: OK regex: (\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N) parsed_regex: (\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
-652_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
-653_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
-654_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
-655_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
-656_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
-657_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
-
bar result_expr: $& expected_results foo	
-
bar
-658_y: OK regex: (foo) parsed_regex: (foo) str: foobar result_expr: $&-$1 expected_results foo-
-659_y: OK regex: (?-n)(foo)(?n)(bar) parsed_regex: (?-n)(foo)(?n)(bar) str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
-660_y: OK regex: (?-n:(foo)(?n:(bar))) parsed_regex: (?-n:(foo)(?n:(bar))) str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
-661_y: OK Warning: Parsed regex does not match. regex: foo # Match foo parsed_regex: foo str: foobar result_expr: $& expected_results foo
-662_y: OK Warning: Parsed regex does not match. regex: \x41\x42 parsed_regex: AB str: AB result_expr: $& expected_results AB
-663_y: OK Warning: Parsed regex does not match. regex: \101\o{102} parsed_regex: AB str: AB result_expr: $& expected_results AB
-
-Running perl_tests_lookahead:
-0_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
-1_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
-2_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
-3_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
-4_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
-5_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
-6_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
-7_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
-8_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
-9_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
-10_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
-11_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
-12_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
-13_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
-14_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
-15_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
-16_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
-17_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
-18_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
-19_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
-20_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
-21_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
-22_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
-23_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
-24_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
-25_y: OK regex: ^(a*?)(?!(aa|aaaa)*\$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*\$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
-26_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
-27_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
-28_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
-29_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
-30_y: OK regex: (?!\A)x parsed_regex: (?!\A)x str: a
-xb
- result_expr: - expected_results -
-31_n: OK regex: ^(o)(?!.*\1) parsed_regex: ^(o)(?!.*\1) str: Oo result_expr: - expected_results -
-32_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
-33_y: OK regex: ^(a*?)(?!(aa|aaaa)*\$) parsed_regex: ^(a*?)(?!(aa|aaaa)*\$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
-34_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
-35_y: OK regex: ^(a*?)(?!(a{6}|a{5})*\$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*\$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
-36_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
-37_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
-38_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
-b
-c
- result_expr: $1 expected_results 
-
-39_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
-b
-c
- result_expr: $1:$& expected_results 
-:
-c
-40_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
-b
-c
- result_expr: $1 expected_results b
-
-41_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
-b
-c
- result_expr: $1:$& expected_results b
-:b
-c
-42_y: OK regex: ((?s)b.)c(?!\\N) parsed_regex: ((?s)b.)c(?!\\N) str: a
-b
-c
- result_expr: $1:$& expected_results b
-:b
-c
-43_y: OK regex: (b.)c(?!\\N) parsed_regex: (b.)c(?!\\N) str: a
-b
-c
- result_expr: $1:$& expected_results b
-:b
-c
-44_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
-
diff --git a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
deleted file mode 100644
index b0517cebae..0000000000
--- a/regression-tests/test-results/gcc-13/pure2-regex.cpp.output
+++ /dev/null
@@ -1,326 +0,0 @@
-pure2-regex.cpp2:1764: warning: unknown escape sequence: '\)'
-pure2-regex.cpp2:1764: warning: unknown escape sequence: '\)'
-pure2-regex.cpp2:1764: warning: unknown escape sequence: '\)'
-pure2-regex.cpp2:285:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:287:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:291:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:293:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:295:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:299:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:365:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:365:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:367:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:367:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:369:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:369:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:371:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:373:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:375:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:377:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:379:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:381:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:381:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:385:39: warning: unknown escape sequence: '\B'
-pure2-regex.cpp2:387:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:389:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:391:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:393:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:395:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:397:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:399:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:401:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:403:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:405:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:407:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:409:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:411:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:413:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:415:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:417:39: warning: unknown escape sequence: '\W'
-pure2-regex.cpp2:419:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:421:39: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:423:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:425:39: warning: unknown escape sequence: '\S'
-pure2-regex.cpp2:427:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:429:39: warning: unknown escape sequence: '\d'
-pure2-regex.cpp2:431:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:433:39: warning: unknown escape sequence: '\D'
-pure2-regex.cpp2:449:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:465:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:467:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:467:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:469:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:469:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:471:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:471:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:471:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:552:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:555:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:561:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:564:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:570:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:642:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:774:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:777:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:780:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:783:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:786:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:789:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:810:39: warning: unknown escape sequence: '\)'
-pure2-regex.cpp2:926:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:928:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:928:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:930:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:930:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:932:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:934:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:934:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:936:39: warning: unknown escape sequence: '\h'
-pure2-regex.cpp2:936:39: warning: unknown escape sequence: '\H'
-pure2-regex.cpp2:940:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:942:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:946:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:948:39: warning: unknown escape sequence: '\V'
-pure2-regex.cpp2:1052:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1054:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1056:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1072:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1074:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1076:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1078:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1080:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1082:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1084:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1086:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1088:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1091:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1094:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1097:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1100:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1103:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1106:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1109:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1112:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1115:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1117:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1119:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1121:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1123:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1125:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1127:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1129:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1131:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1133:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1136:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1139:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1142:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1145:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1148:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1151:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1154:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1157:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1160:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1162:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1164:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1166:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1168:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1170:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1172:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1174:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1176:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1178:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1181:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1184:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1187:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1190:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1193:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1196:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1199:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1202:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1205:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1207:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1209:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1211:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1213:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1215:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1217:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1219:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1221:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1223:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1226:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1229:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1232:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1235:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1238:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1241:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1244:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1247:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1250:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1252:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1254:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1256:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1258:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1260:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1262:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1264:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1266:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1268:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1271:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1274:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1277:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1280:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1283:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1286:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1289:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1292:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1295:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1297:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1299:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1301:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1303:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1305:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1307:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1309:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1311:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1313:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1316:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1319:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1322:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1325:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1328:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1331:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1334:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1337:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1340:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1342:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1344:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1346:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1348:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1350:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1352:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1354:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1356:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1358:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1361:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1364:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1367:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1370:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1373:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1376:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1379:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1382:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1385:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1387:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1389:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1391:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1393:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1395:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1397:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1399:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1401:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1403:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1406:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1409:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1412:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1415:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1418:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1421:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1424:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1427:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1430:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1432:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1434:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1436:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1438:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1440:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1442:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1444:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1446:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1448:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1451:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1454:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1457:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1460:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1463:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1466:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1469:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1472:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1475:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1477:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1479:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1481:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1483:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1485:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1487:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1489:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1491:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1493:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1496:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1499:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1502:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1505:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1508:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1511:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1514:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1517:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1520:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1522:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1524:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1526:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1528:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1530:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1532:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1534:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1536:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1538:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1541:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1544:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1547:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1550:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1553:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1556:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1559:39: warning: unknown escape sequence: '\Z'
-pure2-regex.cpp2:1562:39: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:1565:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1568:39: warning: unknown escape sequence: '\A'
-pure2-regex.cpp2:1568:39: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:1608:39: warning: unknown escape sequence: '\040'
-pure2-regex.cpp2:1671:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:1673:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:1675:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:1677:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:1679:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:1681:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1681:39: warning: unknown escape sequence: '\g'
-pure2-regex.cpp2:1681:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1683:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1685:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1687:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1689:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1691:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1693:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1695:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1697:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1699:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1701:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1703:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1703:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1703:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1705:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1705:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1705:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1707:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1707:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1707:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\k'
-pure2-regex.cpp2:1709:39: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:1744:39: warning: unknown escape sequence: '\K'
-pure2-regex.cpp2:2484:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:2484:38: warning: unknown escape sequence: '\z'
-pure2-regex.cpp2:2490:38: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:2490:38: warning: unknown escape sequence: '\s'
-pure2-regex.cpp2:2490:38: warning: unknown escape sequence: '\w'
-pure2-regex.cpp2:2495:38: warning: unknown escape sequence: '\A'
-pure2-regex.cpp2:2502:38: warning: unknown escape sequence: '\$'
-pure2-regex.cpp2:2506:38: warning: unknown escape sequence: '\$'
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/pure2-regex.cpp b/regression-tests/test-results/pure2-regex.cpp
deleted file mode 100644
index 287b24836f..0000000000
--- a/regression-tests/test-results/pure2-regex.cpp
+++ /dev/null
@@ -1,3344 +0,0 @@
-
-#define CPP2_IMPORT_STD          Yes
-
-//=== Cpp2 type declarations ====================================================
-
-
-#include "cpp2util.h"
-
-#line 1 "pure2-regex.cpp2"
-
-#line 153 "pure2-regex.cpp2"
-class test_perl_tests_general;
-  
-
-#line 2432 "pure2-regex.cpp2"
-class test_perl_tests_lookahead;
-  
-
-//=== Cpp2 type definitions and function declarations ===========================
-
-#line 1 "pure2-regex.cpp2"
-[[nodiscard]] auto create_result(cpp2::in resultExpr, auto const& r) -> std::string;
-
-#line 112 "pure2-regex.cpp2"
-template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in kind, cpp2::in resultExpr, 
-           cpp2::in resultExpected) -> void;
-
-#line 153 "pure2-regex.cpp2"
-class test_perl_tests_general {
-
-  private: std::string var_regex_0 {"abc"}; 
-
-  private: std::string var_regex_1 {"abc"}; 
-
-  private: std::string var_regex_2 {"abc"}; 
-
-  private: std::string var_regex_3 {"abc"}; 
-
-  private: std::string var_regex_4 {"abc"}; 
-
-  private: std::string var_regex_5 {"abc"}; 
-
-  private: std::string var_regex_6 {"abc"}; 
-
-  private: std::string var_regex_7 {"abc"}; 
-
-  private: std::string var_regex_8 {"abc"}; 
-
-  private: std::string var_regex_9 {"abc"}; 
-
-  private: std::string var_regex_10 {"abc"}; 
-
-  private: std::string var_regex_11 {"abc"}; 
-
-  private: std::string var_regex_12 {"ab*c"}; 
-
-  private: std::string var_regex_13 {"ab*c"}; 
-
-  private: std::string var_regex_14 {"ab*c"}; 
-
-  private: std::string var_regex_15 {"ab*bc"}; 
-
-  private: std::string var_regex_16 {"ab*bc"}; 
-
-  private: std::string var_regex_17 {"ab*bc"}; 
-
-  private: std::string var_regex_18 {"ab*bc"}; 
-
-  private: std::string var_regex_19 {"ab*bc"}; 
-
-  private: std::string var_regex_20 {"ab*bc"}; 
-
-  private: std::string var_regex_21 {"ab*bc"}; 
-
-  private: std::string var_regex_22 {"ab*bc"}; 
-
-  private: std::string var_regex_23 {"ab*bc"}; 
-
-  private: std::string var_regex_24 {".{1}"}; 
-
-  private: std::string var_regex_25 {".{1}"}; 
-
-  private: std::string var_regex_26 {".{1}"}; 
-
-  private: std::string var_regex_27 {".{3,4}"}; 
-
-  private: std::string var_regex_28 {".{3,4}"}; 
-
-  private: std::string var_regex_29 {".{3,4}"}; 
-
-  private: std::string var_regex_30 {"\\N{1}"}; 
-
-  private: std::string var_regex_31 {"\\N{1}"}; 
-
-  private: std::string var_regex_32 {"\\N{1}"}; 
-
-  private: std::string var_regex_33 {"\\N{3,4}"}; 
-
-  private: std::string var_regex_34 {"\\N{3,4}"}; 
-
-  private: std::string var_regex_35 {"\\N{3,4}"}; 
-
-  private: std::string var_regex_36 {"\\N{ 3 , 4 }"}; 
-
-  private: std::string var_regex_37 {"ab{0,}bc"}; 
-
-  private: std::string var_regex_38 {"ab{0,}bc"}; 
-
-  private: std::string var_regex_39 {"ab{0,}bc"}; 
-
-  private: std::string var_regex_40 {"ab+bc"}; 
-
-  private: std::string var_regex_41 {"ab+bc"}; 
-
-  private: std::string var_regex_42 {"ab+bc"}; 
-
-  private: std::string var_regex_43 {"ab+bc"}; 
-
-  private: std::string var_regex_44 {"ab+bc"}; 
-
-  private: std::string var_regex_45 {"ab{1,}bc"}; 
-
-  private: std::string var_regex_46 {"ab+bc"}; 
-
-  private: std::string var_regex_47 {"ab+bc"}; 
-
-  private: std::string var_regex_48 {"ab+bc"}; 
-
-  private: std::string var_regex_49 {"ab{1,}bc"}; 
-
-  private: std::string var_regex_50 {"ab{1,}bc"}; 
-
-  private: std::string var_regex_51 {"ab{1,}bc"}; 
-
-  private: std::string var_regex_52 {"ab{1,3}bc"}; 
-
-  private: std::string var_regex_53 {"ab{1,3}bc"}; 
-
-  private: std::string var_regex_54 {"ab{1,3}bc"}; 
-
-  private: std::string var_regex_55 {"ab{3,4}bc"}; 
-
-  private: std::string var_regex_56 {"ab{3,4}bc"}; 
-
-  private: std::string var_regex_57 {"ab{3,4}bc"}; 
-
-  private: std::string var_regex_58 {"ab{4,5}bc"}; 
-
-  private: std::string var_regex_59 {"ab?bc"}; 
-
-  private: std::string var_regex_60 {"ab?bc"}; 
-
-  private: std::string var_regex_61 {"ab{0,1}bc"}; 
-
-  private: std::string var_regex_62 {"ab?bc"}; 
-
-  private: std::string var_regex_63 {"ab?c"}; 
-
-  private: std::string var_regex_64 {"ab{0,1}c"}; 
-
-  private: std::string var_regex_65 {"^abc\$"}; 
-
-  private: std::string var_regex_66 {"^abc\$"}; 
-
-  private: std::string var_regex_67 {"^abc"}; 
-
-  private: std::string var_regex_68 {"^abc\$"}; 
-
-  private: std::string var_regex_69 {"abc\$"}; 
-
-  private: std::string var_regex_70 {"abc\$"}; 
-
-  private: std::string var_regex_71 {"^"}; 
-
-  private: std::string var_regex_72 {"\$"}; 
-
-  private: std::string var_regex_73 {"a.c"}; 
-
-  private: std::string var_regex_74 {"a.c"}; 
-
-  private: std::string var_regex_75 {"a\\Nc"}; 
-
-  private: std::string var_regex_76 {"a.*c"}; 
-
-  private: std::string var_regex_77 {"a\\N*c"}; 
-
-  private: std::string var_regex_78 {"a.*c"}; 
-
-  private: std::string var_regex_79 {"a\\N*c"}; 
-
-  private: std::string var_regex_80 {"a[bc]d"}; 
-
-  private: std::string var_regex_81 {"a[bc]d"}; 
-
-  private: std::string var_regex_82 {"a[b]d"}; 
-
-  private: std::string var_regex_83 {"[a][b][d]"}; 
-
-  private: std::string var_regex_84 {".[b]."}; 
-
-  private: std::string var_regex_85 {".[b]."}; 
-
-  private: std::string var_regex_86 {"a[b-d]e"}; 
-
-  private: std::string var_regex_87 {"a[b-d]e"}; 
-
-  private: std::string var_regex_88 {"a[b-d]"}; 
-
-  private: std::string var_regex_89 {"a[-b]"}; 
-
-  private: std::string var_regex_90 {"a[b-]"}; 
-
-  private: std::string var_regex_91 {"a]"}; 
-
-  private: std::string var_regex_92 {"a[]]b"}; 
-
-  private: std::string var_regex_93 {"a[^bc]d"}; 
-
-  private: std::string var_regex_94 {"a[^bc]d"}; 
-
-  private: std::string var_regex_95 {"a[^-b]c"}; 
-
-  private: std::string var_regex_96 {"a[^-b]c"}; 
-
-  private: std::string var_regex_97 {"a[^]b]c"}; 
-
-  private: std::string var_regex_98 {"a[^]b]c"}; 
-
-  private: std::string var_regex_99 {"\ba\b"}; 
-
-  private: std::string var_regex_100 {"\ba\b"}; 
-
-  private: std::string var_regex_101 {"\ba\b"}; 
-
-  private: std::string var_regex_102 {"\by\b"}; 
-
-  private: std::string var_regex_103 {"\by\b"}; 
-
-  private: std::string var_regex_104 {"\by\b"}; 
-
-  private: std::string var_regex_105 {"\Ba\B"}; 
-
-  private: std::string var_regex_106 {"\Ba\B"}; 
-
-  private: std::string var_regex_107 {"\Ba\B"}; 
-
-  private: std::string var_regex_108 {"\By\b"}; 
-
-  private: std::string var_regex_109 {"\By\b"}; 
-
-  private: std::string var_regex_110 {"\By\b"}; 
-
-  private: std::string var_regex_111 {"\By\b"}; 
-
-  private: std::string var_regex_112 {"\by\B"}; 
-
-  private: std::string var_regex_113 {"\By\B"}; 
-
-  private: std::string var_regex_114 {"\b"}; 
-
-  private: std::string var_regex_115 {"\B"}; 
-
-  private: std::string var_regex_116 {"\w"}; 
-
-  private: std::string var_regex_117 {"\w"}; 
-
-  private: std::string var_regex_118 {"\W"}; 
-
-  private: std::string var_regex_119 {"\W"}; 
-
-  private: std::string var_regex_120 {"a\sb"}; 
-
-  private: std::string var_regex_121 {"a\sb"}; 
-
-  private: std::string var_regex_122 {"a\Sb"}; 
-
-  private: std::string var_regex_123 {"a\Sb"}; 
-
-  private: std::string var_regex_124 {"\d"}; 
-
-  private: std::string var_regex_125 {"\d"}; 
-
-  private: std::string var_regex_126 {"\D"}; 
-
-  private: std::string var_regex_127 {"\D"}; 
-
-  private: std::string var_regex_128 {"[\w]"}; 
-
-  private: std::string var_regex_129 {"[\w]"}; 
-
-  private: std::string var_regex_130 {"[\W]"}; 
-
-  private: std::string var_regex_131 {"[\W]"}; 
-
-  private: std::string var_regex_132 {"a[\s]b"}; 
-
-  private: std::string var_regex_133 {"a[\s]b"}; 
-
-  private: std::string var_regex_134 {"a[\S]b"}; 
-
-  private: std::string var_regex_135 {"a[\S]b"}; 
-
-  private: std::string var_regex_136 {"[\d]"}; 
-
-  private: std::string var_regex_137 {"[\d]"}; 
-
-  private: std::string var_regex_138 {"[\D]"}; 
-
-  private: std::string var_regex_139 {"[\D]"}; 
-
-  private: std::string var_regex_140 {"ab|cd"}; 
-
-  private: std::string var_regex_141 {"ab|cd"}; 
-
-  private: std::string var_regex_142 {"()ef"}; 
-
-  private: std::string var_regex_143 {"()ef"}; 
-
-  private: std::string var_regex_144 {"()ef"}; 
-
-  private: std::string var_regex_145 {"()ef"}; 
-
-  private: std::string var_regex_146 {"()ef"}; 
-
-  private: std::string var_regex_147 {"\$b"}; 
-
-  private: std::string var_regex_148 {"a\(b"}; 
-
-  private: std::string var_regex_149 {"a\(*b"}; 
-
-  private: std::string var_regex_150 {"a\(*b"}; 
-
-  private: std::string var_regex_151 {"a\\b"}; 
-
-  private: std::string var_regex_152 {"((a))"}; 
-
-  private: std::string var_regex_153 {"((a))"}; 
-
-  private: std::string var_regex_154 {"((a))"}; 
-
-  private: std::string var_regex_155 {"(foo)(\g-2)"}; 
-
-  private: std::string var_regex_156 {"(foo)(\g-2)(foo)(\g-2)"}; 
-
-  private: std::string var_regex_157 {"(([abc]+) \g-1)(([abc]+) \g{-1})"}; 
-
-  private: std::string var_regex_158 {"(a)(b)(c)\g1\g2\g3"}; 
-
-#line 474 "pure2-regex.cpp2"
-  private: std::string var_regex_159 {"abc"}; 
-
-#line 477 "pure2-regex.cpp2"
-  private: std::string var_regex_160 {"abc"}; 
-
-#line 480 "pure2-regex.cpp2"
-  private: std::string var_regex_161 {"abc"}; 
-
-#line 483 "pure2-regex.cpp2"
-  private: std::string var_regex_162 {"abc"}; 
-
-#line 486 "pure2-regex.cpp2"
-  private: std::string var_regex_163 {"abc"}; 
-
-#line 489 "pure2-regex.cpp2"
-  private: std::string var_regex_164 {"abc"}; 
-
-#line 492 "pure2-regex.cpp2"
-  private: std::string var_regex_165 {"ab*c"}; 
-
-#line 495 "pure2-regex.cpp2"
-  private: std::string var_regex_166 {"ab*bc"}; 
-
-#line 498 "pure2-regex.cpp2"
-  private: std::string var_regex_167 {"ab*bc"}; 
-
-#line 501 "pure2-regex.cpp2"
-  private: std::string var_regex_168 {"ab*?bc"}; 
-
-#line 504 "pure2-regex.cpp2"
-  private: std::string var_regex_169 {"ab{0,}?bc"}; 
-
-#line 507 "pure2-regex.cpp2"
-  private: std::string var_regex_170 {"ab+?bc"}; 
-
-#line 510 "pure2-regex.cpp2"
-  private: std::string var_regex_171 {"ab+bc"}; 
-
-#line 513 "pure2-regex.cpp2"
-  private: std::string var_regex_172 {"ab+bc"}; 
-
-#line 516 "pure2-regex.cpp2"
-  private: std::string var_regex_173 {"ab{1,}bc"}; 
-
-#line 519 "pure2-regex.cpp2"
-  private: std::string var_regex_174 {"ab+bc"}; 
-
-#line 522 "pure2-regex.cpp2"
-  private: std::string var_regex_175 {"ab{1,}?bc"}; 
-
-#line 525 "pure2-regex.cpp2"
-  private: std::string var_regex_176 {"ab{1,3}?bc"}; 
-
-#line 528 "pure2-regex.cpp2"
-  private: std::string var_regex_177 {"ab{3,4}?bc"}; 
-
-#line 531 "pure2-regex.cpp2"
-  private: std::string var_regex_178 {"ab{4,5}?bc"}; 
-
-#line 534 "pure2-regex.cpp2"
-  private: std::string var_regex_179 {"ab??bc"}; 
-
-#line 537 "pure2-regex.cpp2"
-  private: std::string var_regex_180 {"ab??bc"}; 
-
-#line 540 "pure2-regex.cpp2"
-  private: std::string var_regex_181 {"ab{0,1}?bc"}; 
-
-#line 543 "pure2-regex.cpp2"
-  private: std::string var_regex_182 {"ab??bc"}; 
-
-#line 546 "pure2-regex.cpp2"
-  private: std::string var_regex_183 {"ab??c"}; 
-
-#line 549 "pure2-regex.cpp2"
-  private: std::string var_regex_184 {"ab{0,1}?c"}; 
-
-#line 552 "pure2-regex.cpp2"
-  private: std::string var_regex_185 {"^abc\$"}; 
-
-#line 555 "pure2-regex.cpp2"
-  private: std::string var_regex_186 {"^abc\$"}; 
-
-#line 558 "pure2-regex.cpp2"
-  private: std::string var_regex_187 {"^abc"}; 
-
-#line 561 "pure2-regex.cpp2"
-  private: std::string var_regex_188 {"^abc\$"}; 
-
-#line 564 "pure2-regex.cpp2"
-  private: std::string var_regex_189 {"abc\$"}; 
-
-#line 567 "pure2-regex.cpp2"
-  private: std::string var_regex_190 {"^"}; 
-
-#line 570 "pure2-regex.cpp2"
-  private: std::string var_regex_191 {"\$"}; 
-
-#line 573 "pure2-regex.cpp2"
-  private: std::string var_regex_192 {"a.c"}; 
-
-#line 576 "pure2-regex.cpp2"
-  private: std::string var_regex_193 {"a.c"}; 
-
-#line 579 "pure2-regex.cpp2"
-  private: std::string var_regex_194 {"a\\Nc"}; 
-
-#line 582 "pure2-regex.cpp2"
-  private: std::string var_regex_195 {"a.*?c"}; 
-
-#line 585 "pure2-regex.cpp2"
-  private: std::string var_regex_196 {"a.*c"}; 
-
-#line 588 "pure2-regex.cpp2"
-  private: std::string var_regex_197 {"a[bc]d"}; 
-
-#line 591 "pure2-regex.cpp2"
-  private: std::string var_regex_198 {"a[bc]d"}; 
-
-#line 594 "pure2-regex.cpp2"
-  private: std::string var_regex_199 {"a[b-d]e"}; 
-
-#line 597 "pure2-regex.cpp2"
-  private: std::string var_regex_200 {"a[b-d]e"}; 
-
-#line 600 "pure2-regex.cpp2"
-  private: std::string var_regex_201 {"a[b-d]"}; 
-
-#line 603 "pure2-regex.cpp2"
-  private: std::string var_regex_202 {"a[-b]"}; 
-
-#line 606 "pure2-regex.cpp2"
-  private: std::string var_regex_203 {"a[b-]"}; 
-
-#line 609 "pure2-regex.cpp2"
-  private: std::string var_regex_204 {"a]"}; 
-
-#line 612 "pure2-regex.cpp2"
-  private: std::string var_regex_205 {"a[]]b"}; 
-
-#line 615 "pure2-regex.cpp2"
-  private: std::string var_regex_206 {"a[^bc]d"}; 
-
-#line 618 "pure2-regex.cpp2"
-  private: std::string var_regex_207 {"a[^bc]d"}; 
-
-#line 621 "pure2-regex.cpp2"
-  private: std::string var_regex_208 {"a[^-b]c"}; 
-
-#line 624 "pure2-regex.cpp2"
-  private: std::string var_regex_209 {"a[^-b]c"}; 
-
-#line 627 "pure2-regex.cpp2"
-  private: std::string var_regex_210 {"a[^]b]c"}; 
-
-#line 630 "pure2-regex.cpp2"
-  private: std::string var_regex_211 {"a[^]b]c"}; 
-
-#line 633 "pure2-regex.cpp2"
-  private: std::string var_regex_212 {"ab|cd"}; 
-
-#line 636 "pure2-regex.cpp2"
-  private: std::string var_regex_213 {"ab|cd"}; 
-
-#line 639 "pure2-regex.cpp2"
-  private: std::string var_regex_214 {"()ef"}; 
-
-#line 642 "pure2-regex.cpp2"
-  private: std::string var_regex_215 {"\$b"}; 
-
-#line 645 "pure2-regex.cpp2"
-  private: std::string var_regex_216 {"a\(b"}; 
-
-#line 648 "pure2-regex.cpp2"
-  private: std::string var_regex_217 {"a\(*b"}; 
-
-#line 651 "pure2-regex.cpp2"
-  private: std::string var_regex_218 {"a\(*b"}; 
-
-#line 654 "pure2-regex.cpp2"
-  private: std::string var_regex_219 {"a\\b"}; 
-
-#line 657 "pure2-regex.cpp2"
-  private: std::string var_regex_220 {"((a))"}; 
-
-#line 660 "pure2-regex.cpp2"
-  private: std::string var_regex_221 {"(a)b(c)"}; 
-
-#line 663 "pure2-regex.cpp2"
-  private: std::string var_regex_222 {"a+b+c"}; 
-
-#line 666 "pure2-regex.cpp2"
-  private: std::string var_regex_223 {"a{1,}b{1,}c"}; 
-
-#line 669 "pure2-regex.cpp2"
-  private: std::string var_regex_224 {"a.+?c"}; 
-
-#line 672 "pure2-regex.cpp2"
-  private: std::string var_regex_225 {"a.*?c"}; 
-
-#line 675 "pure2-regex.cpp2"
-  private: std::string var_regex_226 {"a.{0,5}?c"}; 
-
-#line 678 "pure2-regex.cpp2"
-  private: std::string var_regex_227 {"(a+|b)*"}; 
-
-#line 681 "pure2-regex.cpp2"
-  private: std::string var_regex_228 {"(a+|b){0,}"}; 
-
-#line 684 "pure2-regex.cpp2"
-  private: std::string var_regex_229 {"(a+|b)+"}; 
-
-#line 687 "pure2-regex.cpp2"
-  private: std::string var_regex_230 {"(a+|b){1,}"}; 
-
-#line 690 "pure2-regex.cpp2"
-  private: std::string var_regex_231 {"(a+|b)?"}; 
-
-#line 693 "pure2-regex.cpp2"
-  private: std::string var_regex_232 {"(a+|b){0,1}"}; 
-
-#line 696 "pure2-regex.cpp2"
-  private: std::string var_regex_233 {"(a+|b){0,1}?"}; 
-
-#line 699 "pure2-regex.cpp2"
-  private: std::string var_regex_234 {"[^ab]*"}; 
-
-#line 702 "pure2-regex.cpp2"
-  private: std::string var_regex_235 {"abc"}; 
-
-#line 705 "pure2-regex.cpp2"
-  private: std::string var_regex_236 {"a*"}; 
-
-#line 708 "pure2-regex.cpp2"
-  private: std::string var_regex_237 {"([abc])*d"}; 
-
-#line 711 "pure2-regex.cpp2"
-  private: std::string var_regex_238 {"([abc])*bcd"}; 
-
-#line 714 "pure2-regex.cpp2"
-  private: std::string var_regex_239 {"a|b|c|d|e"}; 
-
-#line 717 "pure2-regex.cpp2"
-  private: std::string var_regex_240 {"(a|b|c|d|e)f"}; 
-
-#line 720 "pure2-regex.cpp2"
-  private: std::string var_regex_241 {"abcd*efg"}; 
-
-#line 723 "pure2-regex.cpp2"
-  private: std::string var_regex_242 {"ab*"}; 
-
-#line 726 "pure2-regex.cpp2"
-  private: std::string var_regex_243 {"ab*"}; 
-
-#line 729 "pure2-regex.cpp2"
-  private: std::string var_regex_244 {"(ab|cd)e"}; 
-
-#line 732 "pure2-regex.cpp2"
-  private: std::string var_regex_245 {"[abhgefdc]ij"}; 
-
-#line 735 "pure2-regex.cpp2"
-  private: std::string var_regex_246 {"^(ab|cd)e"}; 
-
-#line 738 "pure2-regex.cpp2"
-  private: std::string var_regex_247 {"(abc|)ef"}; 
-
-#line 741 "pure2-regex.cpp2"
-  private: std::string var_regex_248 {"(a|b)c*d"}; 
-
-#line 744 "pure2-regex.cpp2"
-  private: std::string var_regex_249 {"(ab|ab*)bc"}; 
-
-#line 747 "pure2-regex.cpp2"
-  private: std::string var_regex_250 {"a([bc]*)c*"}; 
-
-#line 750 "pure2-regex.cpp2"
-  private: std::string var_regex_251 {"a([bc]*)(c*d)"}; 
-
-#line 753 "pure2-regex.cpp2"
-  private: std::string var_regex_252 {"a([bc]+)(c*d)"}; 
-
-#line 756 "pure2-regex.cpp2"
-  private: std::string var_regex_253 {"a([bc]*)(c+d)"}; 
-
-#line 759 "pure2-regex.cpp2"
-  private: std::string var_regex_254 {"a[bcd]*dcdcde"}; 
-
-#line 762 "pure2-regex.cpp2"
-  private: std::string var_regex_255 {"a[bcd]+dcdcde"}; 
-
-#line 765 "pure2-regex.cpp2"
-  private: std::string var_regex_256 {"(ab|a)b*c"}; 
-
-#line 768 "pure2-regex.cpp2"
-  private: std::string var_regex_257 {"((a)(b)c)(d)"}; 
-
-#line 771 "pure2-regex.cpp2"
-  private: std::string var_regex_258 {"[a-zA-Z_][a-zA-Z0-9_]*"}; 
-
-#line 774 "pure2-regex.cpp2"
-  private: std::string var_regex_259 {"^a(bc+|b[eh])g|.h\$"}; 
-
-#line 777 "pure2-regex.cpp2"
-  private: std::string var_regex_260 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
-
-#line 780 "pure2-regex.cpp2"
-  private: std::string var_regex_261 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
-
-#line 783 "pure2-regex.cpp2"
-  private: std::string var_regex_262 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
-
-#line 786 "pure2-regex.cpp2"
-  private: std::string var_regex_263 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
-
-#line 789 "pure2-regex.cpp2"
-  private: std::string var_regex_264 {"(bc+d\$|ef*g.|h?i(j|k))"}; 
-
-#line 792 "pure2-regex.cpp2"
-  private: std::string var_regex_265 {"((((((((((a))))))))))"}; 
-
-#line 795 "pure2-regex.cpp2"
-  private: std::string var_regex_266 {"((((((((((a))))))))))\10"}; 
-
-#line 798 "pure2-regex.cpp2"
-  private: std::string var_regex_267 {"(((((((((a)))))))))"}; 
-
-#line 801 "pure2-regex.cpp2"
-  private: std::string var_regex_268 {"multiple words of text"}; 
-
-#line 804 "pure2-regex.cpp2"
-  private: std::string var_regex_269 {"multiple words"}; 
-
-#line 807 "pure2-regex.cpp2"
-  private: std::string var_regex_270 {"(.*)c(.*)"}; 
-
-#line 810 "pure2-regex.cpp2"
-  private: std::string var_regex_271 {"\((.*), (.*)\)"}; 
-
-#line 813 "pure2-regex.cpp2"
-  private: std::string var_regex_272 {"[k]"}; 
-
-#line 816 "pure2-regex.cpp2"
-  private: std::string var_regex_273 {"abcd"}; 
-
-#line 819 "pure2-regex.cpp2"
-  private: std::string var_regex_274 {"a(bc)d"}; 
-
-#line 822 "pure2-regex.cpp2"
-  private: std::string var_regex_275 {"a[-]?c"}; 
-
-#line 825 "pure2-regex.cpp2"
-  private: std::string var_regex_276 {"(abc)\1"}; 
-
-#line 828 "pure2-regex.cpp2"
-  private: std::string var_regex_277 {"([a-c]*)\1"}; 
-
-  private: std::string var_regex_278 {"a++a"}; 
-
-  private: std::string var_regex_279 {"a*+a"}; 
-
-  private: std::string var_regex_280 {"a{1,5}+a"}; 
-
-  private: std::string var_regex_281 {"a?+a"}; 
-
-  private: std::string var_regex_282 {"a++b"}; 
-
-  private: std::string var_regex_283 {"a*+b"}; 
-
-  private: std::string var_regex_284 {"a{1,5}+b"}; 
-
-  private: std::string var_regex_285 {"a?+b"}; 
-
-  private: std::string var_regex_286 {"fooa++a"}; 
-
-  private: std::string var_regex_287 {"fooa*+a"}; 
-
-  private: std::string var_regex_288 {"fooa{1,5}+a"}; 
-
-  private: std::string var_regex_289 {"fooa?+a"}; 
-
-  private: std::string var_regex_290 {"fooa++b"}; 
-
-  private: std::string var_regex_291 {"fooa*+b"}; 
-
-  private: std::string var_regex_292 {"fooa{1,5}+b"}; 
-
-  private: std::string var_regex_293 {"fooa?+b"}; 
-
-  private: std::string var_regex_294 {"(aA)++(aA)"}; 
-
-  private: std::string var_regex_295 {"(aA|bB)++(aA|bB)"}; 
-
-  private: std::string var_regex_296 {"(aA)*+(aA)"}; 
-
-  private: std::string var_regex_297 {"(aA|bB)*+(aA|bB)"}; 
-
-  private: std::string var_regex_298 {"(aA){1,5}+(aA)"}; 
-
-  private: std::string var_regex_299 {"(aA|bB){1,5}+(aA|bB)"}; 
-
-  private: std::string var_regex_300 {"(aA)?+(aA)"}; 
-
-  private: std::string var_regex_301 {"(aA|bB)?+(aA|bB)"}; 
-
-  private: std::string var_regex_302 {"(aA)++b"}; 
-
-  private: std::string var_regex_303 {"(aA|bB)++b"}; 
-
-  private: std::string var_regex_304 {"(aA)*+b"}; 
-
-  private: std::string var_regex_305 {"(aA|bB)*+b"}; 
-
-  private: std::string var_regex_306 {"(aA){1,5}+b"}; 
-
-  private: std::string var_regex_307 {"(aA|bB){1,5}+b"}; 
-
-  private: std::string var_regex_308 {"(aA)?+b"}; 
-
-  private: std::string var_regex_309 {"(aA|bB)?+b"}; 
-
-  private: std::string var_regex_310 {"foo(aA)++(aA)"}; 
-
-  private: std::string var_regex_311 {"foo(aA|bB)++(aA|bB)"}; 
-
-  private: std::string var_regex_312 {"foo(aA)*+(aA)"}; 
-
-  private: std::string var_regex_313 {"foo(aA|bB)*+(aA|bB)"}; 
-
-  private: std::string var_regex_314 {"foo(aA){1,5}+(aA)"}; 
-
-  private: std::string var_regex_315 {"foo(aA|bB){1,5}+(aA|bB)"}; 
-
-  private: std::string var_regex_316 {"foo(aA)?+(aA)"}; 
-
-  private: std::string var_regex_317 {"foo(aA|bB)?+(aA|bB)"}; 
-
-  private: std::string var_regex_318 {"foo(aA)++b"}; 
-
-  private: std::string var_regex_319 {"foo(aA|bB)++b"}; 
-
-  private: std::string var_regex_320 {"foo(aA)*+b"}; 
-
-  private: std::string var_regex_321 {"foo(aA|bB)*+b"}; 
-
-  private: std::string var_regex_322 {"foo(aA){1,5}+b"}; 
-
-  private: std::string var_regex_323 {"foo(aA|bB){1,5}+b"}; 
-
-  private: std::string var_regex_324 {"foo(aA)?+b"}; 
-
-  private: std::string var_regex_325 {"foo(aA|bB)?+b"}; 
-
-  private: std::string var_regex_326 {"foo(\h+)bar"}; 
-
-  private: std::string var_regex_327 {"(\H+)(\h)"}; 
-
-  private: std::string var_regex_328 {"(\h+)(\H)"}; 
-
-  private: std::string var_regex_329 {"foo(\h)bar"}; 
-
-  private: std::string var_regex_330 {"(\H)(\h)"}; 
-
-  private: std::string var_regex_331 {"(\h)(\H)"}; 
-
-  private: std::string var_regex_332 {"foo(\v+)bar"}; 
-
-  private: std::string var_regex_333 {"(\V+)(\v)"}; 
-
-  private: std::string var_regex_334 {"(\v+)(\V)"}; 
-
-  private: std::string var_regex_335 {"foo(\v)bar"}; 
-
-  private: std::string var_regex_336 {"(\V)(\v)"}; 
-
-  private: std::string var_regex_337 {"(\v)(\V)"}; 
-
-  private: std::string var_regex_338 {"(?:(?i)a)b"}; 
-
-  private: std::string var_regex_339 {"((?i)a)b"}; 
-
-  private: std::string var_regex_340 {"(?:(?i)a)b"}; 
-
-  private: std::string var_regex_341 {"((?i)a)b"}; 
-
-  private: std::string var_regex_342 {"(?:(?i)a)b"}; 
-
-  private: std::string var_regex_343 {"((?i)a)b"}; 
-
-  private: std::string var_regex_344 {"(?i:a)b"}; 
-
-  private: std::string var_regex_345 {"((?i:a))b"}; 
-
-  private: std::string var_regex_346 {"(?i:a)b"}; 
-
-  private: std::string var_regex_347 {"((?i:a))b"}; 
-
-  private: std::string var_regex_348 {"(?i:a)b"}; 
-
-  private: std::string var_regex_349 {"((?i:a))b"}; 
-
-#line 975 "pure2-regex.cpp2"
-  private: std::string var_regex_350 {"(?:(?-i)a)b"}; 
-
-#line 978 "pure2-regex.cpp2"
-  private: std::string var_regex_351 {"((?-i)a)b"}; 
-
-#line 981 "pure2-regex.cpp2"
-  private: std::string var_regex_352 {"(?:(?-i)a)b"}; 
-
-#line 984 "pure2-regex.cpp2"
-  private: std::string var_regex_353 {"((?-i)a)b"}; 
-
-#line 987 "pure2-regex.cpp2"
-  private: std::string var_regex_354 {"(?:(?-i)a)b"}; 
-
-#line 990 "pure2-regex.cpp2"
-  private: std::string var_regex_355 {"((?-i)a)b"}; 
-
-#line 993 "pure2-regex.cpp2"
-  private: std::string var_regex_356 {"(?:(?-i)a)b"}; 
-
-#line 996 "pure2-regex.cpp2"
-  private: std::string var_regex_357 {"((?-i)a)b"}; 
-
-#line 999 "pure2-regex.cpp2"
-  private: std::string var_regex_358 {"(?:(?-i)a)b"}; 
-
-#line 1002 "pure2-regex.cpp2"
-  private: std::string var_regex_359 {"((?-i)a)b"}; 
-
-#line 1005 "pure2-regex.cpp2"
-  private: std::string var_regex_360 {"(?-i:a)b"}; 
-
-#line 1008 "pure2-regex.cpp2"
-  private: std::string var_regex_361 {"((?-i:a))b"}; 
-
-#line 1011 "pure2-regex.cpp2"
-  private: std::string var_regex_362 {"(?-i:a)b"}; 
-
-#line 1014 "pure2-regex.cpp2"
-  private: std::string var_regex_363 {"((?-i:a))b"}; 
-
-#line 1017 "pure2-regex.cpp2"
-  private: std::string var_regex_364 {"(?-i:a)b"}; 
-
-#line 1020 "pure2-regex.cpp2"
-  private: std::string var_regex_365 {"((?-i:a))b"}; 
-
-#line 1023 "pure2-regex.cpp2"
-  private: std::string var_regex_366 {"(?-i:a)b"}; 
-
-#line 1026 "pure2-regex.cpp2"
-  private: std::string var_regex_367 {"((?-i:a))b"}; 
-
-#line 1029 "pure2-regex.cpp2"
-  private: std::string var_regex_368 {"(?-i:a)b"}; 
-
-#line 1032 "pure2-regex.cpp2"
-  private: std::string var_regex_369 {"((?-i:a))b"}; 
-
-#line 1035 "pure2-regex.cpp2"
-  private: std::string var_regex_370 {"((?-i:a.))b"}; 
-
-#line 1038 "pure2-regex.cpp2"
-  private: std::string var_regex_371 {"((?-i:a\\N))b"}; 
-
-#line 1041 "pure2-regex.cpp2"
-  private: std::string var_regex_372 {"((?s-i:a.))b"}; 
-
-#line 1044 "pure2-regex.cpp2"
-  private: std::string var_regex_373 {"((?s-i:a\\N))b"}; 
-
-#line 1047 "pure2-regex.cpp2"
-  private: std::string var_regex_374 {"((?s-i:a.))b"}; 
-
-#line 1050 "pure2-regex.cpp2"
-  private: std::string var_regex_375 {"((?s-i:a\\N))b"}; 
-
-  private: std::string var_regex_376 {"^(?:a?b?)*\$"}; 
-
-  private: std::string var_regex_377 {"((?s)^a(.))((?m)^b\$)"}; 
-
-  private: std::string var_regex_378 {"((?m)^b\$)"}; 
-
-  private: std::string var_regex_379 {"(?m)^b"}; 
-
-  private: std::string var_regex_380 {"(?m)^(b)"}; 
-
-  private: std::string var_regex_381 {"((?m)^b)"}; 
-
-  private: std::string var_regex_382 {"\n((?m)^b)"}; 
-
-  private: std::string var_regex_383 {"^b"}; 
-
-  private: std::string var_regex_384 {"()^b"}; 
-
-  private: std::string var_regex_385 {"((?m)^b)"}; 
-
-  private: std::string var_regex_386 {"\Z"}; 
-
-  private: std::string var_regex_387 {"\z"}; 
-
-  private: std::string var_regex_388 {"\$"}; 
-
-  private: std::string var_regex_389 {"\Z"}; 
-
-  private: std::string var_regex_390 {"\z"}; 
-
-  private: std::string var_regex_391 {"\$"}; 
-
-  private: std::string var_regex_392 {"\Z"}; 
-
-  private: std::string var_regex_393 {"\z"}; 
-
-  private: std::string var_regex_394 {"\$"}; 
-
-#line 1091 "pure2-regex.cpp2"
-  private: std::string var_regex_395 {"\Z"}; 
-
-#line 1094 "pure2-regex.cpp2"
-  private: std::string var_regex_396 {"\z"}; 
-
-#line 1097 "pure2-regex.cpp2"
-  private: std::string var_regex_397 {"\$"}; 
-
-#line 1100 "pure2-regex.cpp2"
-  private: std::string var_regex_398 {"\Z"}; 
-
-#line 1103 "pure2-regex.cpp2"
-  private: std::string var_regex_399 {"\z"}; 
-
-#line 1106 "pure2-regex.cpp2"
-  private: std::string var_regex_400 {"\$"}; 
-
-#line 1109 "pure2-regex.cpp2"
-  private: std::string var_regex_401 {"\Z"}; 
-
-#line 1112 "pure2-regex.cpp2"
-  private: std::string var_regex_402 {"\z"}; 
-
-#line 1115 "pure2-regex.cpp2"
-  private: std::string var_regex_403 {"\$"}; 
-
-  private: std::string var_regex_404 {"a\Z"}; 
-
-  private: std::string var_regex_405 {"a\z"}; 
-
-  private: std::string var_regex_406 {"a\$"}; 
-
-  private: std::string var_regex_407 {"a\Z"}; 
-
-  private: std::string var_regex_408 {"a\z"}; 
-
-  private: std::string var_regex_409 {"a\$"}; 
-
-  private: std::string var_regex_410 {"a\Z"}; 
-
-  private: std::string var_regex_411 {"a\z"}; 
-
-  private: std::string var_regex_412 {"a\$"}; 
-
-#line 1136 "pure2-regex.cpp2"
-  private: std::string var_regex_413 {"a\Z"}; 
-
-#line 1139 "pure2-regex.cpp2"
-  private: std::string var_regex_414 {"a\z"}; 
-
-#line 1142 "pure2-regex.cpp2"
-  private: std::string var_regex_415 {"a\$"}; 
-
-#line 1145 "pure2-regex.cpp2"
-  private: std::string var_regex_416 {"a\Z"}; 
-
-#line 1148 "pure2-regex.cpp2"
-  private: std::string var_regex_417 {"a\z"}; 
-
-#line 1151 "pure2-regex.cpp2"
-  private: std::string var_regex_418 {"a\$"}; 
-
-#line 1154 "pure2-regex.cpp2"
-  private: std::string var_regex_419 {"a\Z"}; 
-
-#line 1157 "pure2-regex.cpp2"
-  private: std::string var_regex_420 {"a\z"}; 
-
-#line 1160 "pure2-regex.cpp2"
-  private: std::string var_regex_421 {"a\$"}; 
-
-  private: std::string var_regex_422 {"aa\Z"}; 
-
-  private: std::string var_regex_423 {"aa\z"}; 
-
-  private: std::string var_regex_424 {"aa\$"}; 
-
-  private: std::string var_regex_425 {"aa\Z"}; 
-
-  private: std::string var_regex_426 {"aa\z"}; 
-
-  private: std::string var_regex_427 {"aa\$"}; 
-
-  private: std::string var_regex_428 {"aa\Z"}; 
-
-  private: std::string var_regex_429 {"aa\z"}; 
-
-  private: std::string var_regex_430 {"aa\$"}; 
-
-#line 1181 "pure2-regex.cpp2"
-  private: std::string var_regex_431 {"aa\Z"}; 
-
-#line 1184 "pure2-regex.cpp2"
-  private: std::string var_regex_432 {"aa\z"}; 
-
-#line 1187 "pure2-regex.cpp2"
-  private: std::string var_regex_433 {"aa\$"}; 
-
-#line 1190 "pure2-regex.cpp2"
-  private: std::string var_regex_434 {"aa\Z"}; 
-
-#line 1193 "pure2-regex.cpp2"
-  private: std::string var_regex_435 {"aa\z"}; 
-
-#line 1196 "pure2-regex.cpp2"
-  private: std::string var_regex_436 {"aa\$"}; 
-
-#line 1199 "pure2-regex.cpp2"
-  private: std::string var_regex_437 {"aa\Z"}; 
-
-#line 1202 "pure2-regex.cpp2"
-  private: std::string var_regex_438 {"aa\z"}; 
-
-#line 1205 "pure2-regex.cpp2"
-  private: std::string var_regex_439 {"aa\$"}; 
-
-  private: std::string var_regex_440 {"aa\Z"}; 
-
-  private: std::string var_regex_441 {"aa\z"}; 
-
-  private: std::string var_regex_442 {"aa\$"}; 
-
-  private: std::string var_regex_443 {"aa\Z"}; 
-
-  private: std::string var_regex_444 {"aa\z"}; 
-
-  private: std::string var_regex_445 {"aa\$"}; 
-
-  private: std::string var_regex_446 {"aa\Z"}; 
-
-  private: std::string var_regex_447 {"aa\z"}; 
-
-  private: std::string var_regex_448 {"aa\$"}; 
-
-#line 1226 "pure2-regex.cpp2"
-  private: std::string var_regex_449 {"aa\Z"}; 
-
-#line 1229 "pure2-regex.cpp2"
-  private: std::string var_regex_450 {"aa\z"}; 
-
-#line 1232 "pure2-regex.cpp2"
-  private: std::string var_regex_451 {"aa\$"}; 
-
-#line 1235 "pure2-regex.cpp2"
-  private: std::string var_regex_452 {"aa\Z"}; 
-
-#line 1238 "pure2-regex.cpp2"
-  private: std::string var_regex_453 {"aa\z"}; 
-
-#line 1241 "pure2-regex.cpp2"
-  private: std::string var_regex_454 {"aa\$"}; 
-
-#line 1244 "pure2-regex.cpp2"
-  private: std::string var_regex_455 {"aa\Z"}; 
-
-#line 1247 "pure2-regex.cpp2"
-  private: std::string var_regex_456 {"aa\z"}; 
-
-#line 1250 "pure2-regex.cpp2"
-  private: std::string var_regex_457 {"aa\$"}; 
-
-  private: std::string var_regex_458 {"aa\Z"}; 
-
-  private: std::string var_regex_459 {"aa\z"}; 
-
-  private: std::string var_regex_460 {"aa\$"}; 
-
-  private: std::string var_regex_461 {"aa\Z"}; 
-
-  private: std::string var_regex_462 {"aa\z"}; 
-
-  private: std::string var_regex_463 {"aa\$"}; 
-
-  private: std::string var_regex_464 {"aa\Z"}; 
-
-  private: std::string var_regex_465 {"aa\z"}; 
-
-  private: std::string var_regex_466 {"aa\$"}; 
-
-#line 1271 "pure2-regex.cpp2"
-  private: std::string var_regex_467 {"aa\Z"}; 
-
-#line 1274 "pure2-regex.cpp2"
-  private: std::string var_regex_468 {"aa\z"}; 
-
-#line 1277 "pure2-regex.cpp2"
-  private: std::string var_regex_469 {"aa\$"}; 
-
-#line 1280 "pure2-regex.cpp2"
-  private: std::string var_regex_470 {"aa\Z"}; 
-
-#line 1283 "pure2-regex.cpp2"
-  private: std::string var_regex_471 {"aa\z"}; 
-
-#line 1286 "pure2-regex.cpp2"
-  private: std::string var_regex_472 {"aa\$"}; 
-
-#line 1289 "pure2-regex.cpp2"
-  private: std::string var_regex_473 {"aa\Z"}; 
-
-#line 1292 "pure2-regex.cpp2"
-  private: std::string var_regex_474 {"aa\z"}; 
-
-#line 1295 "pure2-regex.cpp2"
-  private: std::string var_regex_475 {"aa\$"}; 
-
-  private: std::string var_regex_476 {"ab\Z"}; 
-
-  private: std::string var_regex_477 {"ab\z"}; 
-
-  private: std::string var_regex_478 {"ab\$"}; 
-
-  private: std::string var_regex_479 {"ab\Z"}; 
-
-  private: std::string var_regex_480 {"ab\z"}; 
-
-  private: std::string var_regex_481 {"ab\$"}; 
-
-  private: std::string var_regex_482 {"ab\Z"}; 
-
-  private: std::string var_regex_483 {"ab\z"}; 
-
-  private: std::string var_regex_484 {"ab\$"}; 
-
-#line 1316 "pure2-regex.cpp2"
-  private: std::string var_regex_485 {"ab\Z"}; 
-
-#line 1319 "pure2-regex.cpp2"
-  private: std::string var_regex_486 {"ab\z"}; 
-
-#line 1322 "pure2-regex.cpp2"
-  private: std::string var_regex_487 {"ab\$"}; 
-
-#line 1325 "pure2-regex.cpp2"
-  private: std::string var_regex_488 {"ab\Z"}; 
-
-#line 1328 "pure2-regex.cpp2"
-  private: std::string var_regex_489 {"ab\z"}; 
-
-#line 1331 "pure2-regex.cpp2"
-  private: std::string var_regex_490 {"ab\$"}; 
-
-#line 1334 "pure2-regex.cpp2"
-  private: std::string var_regex_491 {"ab\Z"}; 
-
-#line 1337 "pure2-regex.cpp2"
-  private: std::string var_regex_492 {"ab\z"}; 
-
-#line 1340 "pure2-regex.cpp2"
-  private: std::string var_regex_493 {"ab\$"}; 
-
-  private: std::string var_regex_494 {"ab\Z"}; 
-
-  private: std::string var_regex_495 {"ab\z"}; 
-
-  private: std::string var_regex_496 {"ab\$"}; 
-
-  private: std::string var_regex_497 {"ab\Z"}; 
-
-  private: std::string var_regex_498 {"ab\z"}; 
-
-  private: std::string var_regex_499 {"ab\$"}; 
-
-  private: std::string var_regex_500 {"ab\Z"}; 
-
-  private: std::string var_regex_501 {"ab\z"}; 
-
-  private: std::string var_regex_502 {"ab\$"}; 
-
-#line 1361 "pure2-regex.cpp2"
-  private: std::string var_regex_503 {"ab\Z"}; 
-
-#line 1364 "pure2-regex.cpp2"
-  private: std::string var_regex_504 {"ab\z"}; 
-
-#line 1367 "pure2-regex.cpp2"
-  private: std::string var_regex_505 {"ab\$"}; 
-
-#line 1370 "pure2-regex.cpp2"
-  private: std::string var_regex_506 {"ab\Z"}; 
-
-#line 1373 "pure2-regex.cpp2"
-  private: std::string var_regex_507 {"ab\z"}; 
-
-#line 1376 "pure2-regex.cpp2"
-  private: std::string var_regex_508 {"ab\$"}; 
-
-#line 1379 "pure2-regex.cpp2"
-  private: std::string var_regex_509 {"ab\Z"}; 
-
-#line 1382 "pure2-regex.cpp2"
-  private: std::string var_regex_510 {"ab\z"}; 
-
-#line 1385 "pure2-regex.cpp2"
-  private: std::string var_regex_511 {"ab\$"}; 
-
-  private: std::string var_regex_512 {"ab\Z"}; 
-
-  private: std::string var_regex_513 {"ab\z"}; 
-
-  private: std::string var_regex_514 {"ab\$"}; 
-
-  private: std::string var_regex_515 {"ab\Z"}; 
-
-  private: std::string var_regex_516 {"ab\z"}; 
-
-  private: std::string var_regex_517 {"ab\$"}; 
-
-  private: std::string var_regex_518 {"ab\Z"}; 
-
-  private: std::string var_regex_519 {"ab\z"}; 
-
-  private: std::string var_regex_520 {"ab\$"}; 
-
-#line 1406 "pure2-regex.cpp2"
-  private: std::string var_regex_521 {"ab\Z"}; 
-
-#line 1409 "pure2-regex.cpp2"
-  private: std::string var_regex_522 {"ab\z"}; 
-
-#line 1412 "pure2-regex.cpp2"
-  private: std::string var_regex_523 {"ab\$"}; 
-
-#line 1415 "pure2-regex.cpp2"
-  private: std::string var_regex_524 {"ab\Z"}; 
-
-#line 1418 "pure2-regex.cpp2"
-  private: std::string var_regex_525 {"ab\z"}; 
-
-#line 1421 "pure2-regex.cpp2"
-  private: std::string var_regex_526 {"ab\$"}; 
-
-#line 1424 "pure2-regex.cpp2"
-  private: std::string var_regex_527 {"ab\Z"}; 
-
-#line 1427 "pure2-regex.cpp2"
-  private: std::string var_regex_528 {"ab\z"}; 
-
-#line 1430 "pure2-regex.cpp2"
-  private: std::string var_regex_529 {"ab\$"}; 
-
-  private: std::string var_regex_530 {"abb\Z"}; 
-
-  private: std::string var_regex_531 {"abb\z"}; 
-
-  private: std::string var_regex_532 {"abb\$"}; 
-
-  private: std::string var_regex_533 {"abb\Z"}; 
-
-  private: std::string var_regex_534 {"abb\z"}; 
-
-  private: std::string var_regex_535 {"abb\$"}; 
-
-  private: std::string var_regex_536 {"abb\Z"}; 
-
-  private: std::string var_regex_537 {"abb\z"}; 
-
-  private: std::string var_regex_538 {"abb\$"}; 
-
-#line 1451 "pure2-regex.cpp2"
-  private: std::string var_regex_539 {"abb\Z"}; 
-
-#line 1454 "pure2-regex.cpp2"
-  private: std::string var_regex_540 {"abb\z"}; 
-
-#line 1457 "pure2-regex.cpp2"
-  private: std::string var_regex_541 {"abb\$"}; 
-
-#line 1460 "pure2-regex.cpp2"
-  private: std::string var_regex_542 {"abb\Z"}; 
-
-#line 1463 "pure2-regex.cpp2"
-  private: std::string var_regex_543 {"abb\z"}; 
-
-#line 1466 "pure2-regex.cpp2"
-  private: std::string var_regex_544 {"abb\$"}; 
-
-#line 1469 "pure2-regex.cpp2"
-  private: std::string var_regex_545 {"abb\Z"}; 
-
-#line 1472 "pure2-regex.cpp2"
-  private: std::string var_regex_546 {"abb\z"}; 
-
-#line 1475 "pure2-regex.cpp2"
-  private: std::string var_regex_547 {"abb\$"}; 
-
-  private: std::string var_regex_548 {"abb\Z"}; 
-
-  private: std::string var_regex_549 {"abb\z"}; 
-
-  private: std::string var_regex_550 {"abb\$"}; 
-
-  private: std::string var_regex_551 {"abb\Z"}; 
-
-  private: std::string var_regex_552 {"abb\z"}; 
-
-  private: std::string var_regex_553 {"abb\$"}; 
-
-  private: std::string var_regex_554 {"abb\Z"}; 
-
-  private: std::string var_regex_555 {"abb\z"}; 
-
-  private: std::string var_regex_556 {"abb\$"}; 
-
-#line 1496 "pure2-regex.cpp2"
-  private: std::string var_regex_557 {"abb\Z"}; 
-
-#line 1499 "pure2-regex.cpp2"
-  private: std::string var_regex_558 {"abb\z"}; 
-
-#line 1502 "pure2-regex.cpp2"
-  private: std::string var_regex_559 {"abb\$"}; 
-
-#line 1505 "pure2-regex.cpp2"
-  private: std::string var_regex_560 {"abb\Z"}; 
-
-#line 1508 "pure2-regex.cpp2"
-  private: std::string var_regex_561 {"abb\z"}; 
-
-#line 1511 "pure2-regex.cpp2"
-  private: std::string var_regex_562 {"abb\$"}; 
-
-#line 1514 "pure2-regex.cpp2"
-  private: std::string var_regex_563 {"abb\Z"}; 
-
-#line 1517 "pure2-regex.cpp2"
-  private: std::string var_regex_564 {"abb\z"}; 
-
-#line 1520 "pure2-regex.cpp2"
-  private: std::string var_regex_565 {"abb\$"}; 
-
-  private: std::string var_regex_566 {"abb\Z"}; 
-
-  private: std::string var_regex_567 {"abb\z"}; 
-
-  private: std::string var_regex_568 {"abb\$"}; 
-
-  private: std::string var_regex_569 {"abb\Z"}; 
-
-  private: std::string var_regex_570 {"abb\z"}; 
-
-  private: std::string var_regex_571 {"abb\$"}; 
-
-  private: std::string var_regex_572 {"abb\Z"}; 
-
-  private: std::string var_regex_573 {"abb\z"}; 
-
-  private: std::string var_regex_574 {"abb\$"}; 
-
-#line 1541 "pure2-regex.cpp2"
-  private: std::string var_regex_575 {"abb\Z"}; 
-
-#line 1544 "pure2-regex.cpp2"
-  private: std::string var_regex_576 {"abb\z"}; 
-
-#line 1547 "pure2-regex.cpp2"
-  private: std::string var_regex_577 {"abb\$"}; 
-
-#line 1550 "pure2-regex.cpp2"
-  private: std::string var_regex_578 {"abb\Z"}; 
-
-#line 1553 "pure2-regex.cpp2"
-  private: std::string var_regex_579 {"abb\z"}; 
-
-#line 1556 "pure2-regex.cpp2"
-  private: std::string var_regex_580 {"abb\$"}; 
-
-#line 1559 "pure2-regex.cpp2"
-  private: std::string var_regex_581 {"abb\Z"}; 
-
-#line 1562 "pure2-regex.cpp2"
-  private: std::string var_regex_582 {"abb\z"}; 
-
-#line 1565 "pure2-regex.cpp2"
-  private: std::string var_regex_583 {"abb\$"}; 
-
-#line 1568 "pure2-regex.cpp2"
-  private: std::string var_regex_584 {"\Aa\$"}; 
-
-  private: std::string var_regex_585 {"(?i:.[b].)"}; 
-
-  private: std::string var_regex_586 {"(?i:\\N[b]\\N)"}; 
-
-#line 1575 "pure2-regex.cpp2"
-  private: std::string var_regex_587 {"\\N {1}"}; 
-
-#line 1578 "pure2-regex.cpp2"
-  private: std::string var_regex_588 {"\\N {1}"}; 
-
-#line 1581 "pure2-regex.cpp2"
-  private: std::string var_regex_589 {"\\N {1}"}; 
-
-#line 1584 "pure2-regex.cpp2"
-  private: std::string var_regex_590 {"\\N {3,4}"}; 
-
-#line 1587 "pure2-regex.cpp2"
-  private: std::string var_regex_591 {"\\N {3,4}"}; 
-
-#line 1590 "pure2-regex.cpp2"
-  private: std::string var_regex_592 {"\\N {3,4}"}; 
-
-#line 1593 "pure2-regex.cpp2"
-  private: std::string var_regex_593 {"a\\N c"}; 
-
-#line 1596 "pure2-regex.cpp2"
-  private: std::string var_regex_594 {"a\\N *c"}; 
-
-#line 1599 "pure2-regex.cpp2"
-  private: std::string var_regex_595 {"a\\N *c"}; 
-
-#line 1602 "pure2-regex.cpp2"
-  private: std::string var_regex_596 {"[a b]"}; 
-
-#line 1605 "pure2-regex.cpp2"
-  private: std::string var_regex_597 {"[a b]"}; 
-
-#line 1608 "pure2-regex.cpp2"
-  private: std::string var_regex_598 {"[a\ b]"}; 
-
-#line 1611 "pure2-regex.cpp2"
-  private: std::string var_regex_599 {"[ ^ a b ]"}; 
-
-#line 1614 "pure2-regex.cpp2"
-  private: std::string var_regex_600 {"[ ^ a b ]"}; 
-
-#line 1617 "pure2-regex.cpp2"
-  private: std::string var_regex_601 {"[ ^ a b ]"}; 
-
-#line 1620 "pure2-regex.cpp2"
-  private: std::string var_regex_602 {"(?x:[a b])"}; 
-
-#line 1623 "pure2-regex.cpp2"
-  private: std::string var_regex_603 {"(?xx:[a b])"}; 
-
-#line 1626 "pure2-regex.cpp2"
-  private: std::string var_regex_604 {"(?x)[a b]"}; 
-
-#line 1629 "pure2-regex.cpp2"
-  private: std::string var_regex_605 {"(?xx)[a b]"}; 
-
-#line 1632 "pure2-regex.cpp2"
-  private: std::string var_regex_606 {"(?-x:[a b])"}; 
-
-#line 1635 "pure2-regex.cpp2"
-  private: std::string var_regex_607 {"\\N {1}"}; 
-
-#line 1638 "pure2-regex.cpp2"
-  private: std::string var_regex_608 {"\\N {1}"}; 
-
-#line 1641 "pure2-regex.cpp2"
-  private: std::string var_regex_609 {"\\N {1}"}; 
-
-#line 1644 "pure2-regex.cpp2"
-  private: std::string var_regex_610 {"\\N {3,4}"}; 
-
-#line 1647 "pure2-regex.cpp2"
-  private: std::string var_regex_611 {"\\N {3,4}"}; 
-
-#line 1650 "pure2-regex.cpp2"
-  private: std::string var_regex_612 {"\\N {3,4}"}; 
-
-#line 1653 "pure2-regex.cpp2"
-  private: std::string var_regex_613 {"a\\N c"}; 
-
-#line 1656 "pure2-regex.cpp2"
-  private: std::string var_regex_614 {"a\\N *c"}; 
-
-#line 1659 "pure2-regex.cpp2"
-  private: std::string var_regex_615 {"a\\N *c"}; 
-
-  private: std::string var_regex_616 {"[#]"}; 
-
-  private: std::string var_regex_617 {"[#]b"}; 
-
-#line 1666 "pure2-regex.cpp2"
-  private: std::string var_regex_618 {"[#]"}; 
-
-#line 1669 "pure2-regex.cpp2"
-  private: std::string var_regex_619 {"[#]b"}; 
-
-  private: std::string var_regex_620 {"(?'n'foo) \g{n}"}; 
-
-  private: std::string var_regex_621 {"(?'n'foo) \g{ n }"}; 
-
-  private: std::string var_regex_622 {"(?'n'foo) \g{n}"}; 
-
-  private: std::string var_regex_623 {"(?foo) \g{n}"}; 
-
-  private: std::string var_regex_624 {"(?foo) \g{n}"}; 
-
-  private: std::string var_regex_625 {"(?as) (\w+) \g{as} (\w+)"}; 
-
-  private: std::string var_regex_626 {"(?'n'foo) \k"}; 
-
-  private: std::string var_regex_627 {"(?'n'foo) \k"}; 
-
-  private: std::string var_regex_628 {"(?foo) \k'n'"}; 
-
-  private: std::string var_regex_629 {"(?foo) \k'n'"}; 
-
-  private: std::string var_regex_630 {"(?'a1'foo) \k'a1'"}; 
-
-  private: std::string var_regex_631 {"(?foo) \k"}; 
-
-  private: std::string var_regex_632 {"(?'_'foo) \k'_'"}; 
-
-  private: std::string var_regex_633 {"(?<_>foo) \k<_>"}; 
-
-  private: std::string var_regex_634 {"(?'_0_'foo) \k'_0_'"}; 
-
-  private: std::string var_regex_635 {"(?<_0_>foo) \k<_0_>"}; 
-
-  private: std::string var_regex_636 {"(?as) (\w+) \k (\w+)"}; 
-
-  private: std::string var_regex_637 {"(?as) (\w+) \k{as} (\w+)"}; 
-
-  private: std::string var_regex_638 {"(?as) (\w+) \k'as' (\w+)"}; 
-
-  private: std::string var_regex_639 {"(?as) (\w+) \k{ as } (\w+)"}; 
-
-  private: std::string var_regex_640 {"^a(?#xxx){3}c"}; 
-
-#line 1714 "pure2-regex.cpp2"
-  private: std::string var_regex_641 {"^a (?#xxx) (?#yyy) {3}c"}; 
-
-  private: std::string var_regex_642 {"(?|(a))"}; 
-
-  private: std::string var_regex_643 {"(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)"}; 
-
-  private: std::string var_regex_644 {"(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)"}; 
-
-  private: std::string var_regex_645 {"(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)"}; 
-
-  private: std::string var_regex_646 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
-
-  private: std::string var_regex_647 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
-
-  private: std::string var_regex_648 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
-
-  private: std::string var_regex_649 {"(?|(?|(a)|(b))|(?|(c)|(d)))"}; 
-
-  private: std::string var_regex_650 {"(.)(?|(.)(.)x|(.)d)(.)"}; 
-
-  private: std::string var_regex_651 {"(\\N)(?|(\\N)(\\N)x|(\\N)d)(\\N)"}; 
-
-  private: std::string var_regex_652 {"(?|(?x))"}; 
-
-  private: std::string var_regex_653 {"(?|(?x)|(?y))"}; 
-
-  private: std::string var_regex_654 {"(?|(?y)|(?x))"}; 
-
-  private: std::string var_regex_655 {"(?)(?|(?x))"}; 
-
-  private: std::string var_regex_656 {"foo\Kbar"}; 
-
-  private: std::string var_regex_657 {"foo\t\n\r\f\a\ebar"}; 
-
-#line 1749 "pure2-regex.cpp2"
-  private: std::string var_regex_658 {"(foo)"}; 
-
-#line 1752 "pure2-regex.cpp2"
-  private: std::string var_regex_659 {"(?-n)(foo)(?n)(bar)"}; 
-
-#line 1755 "pure2-regex.cpp2"
-  private: std::string var_regex_660 {"(?-n:(foo)(?n:(bar)))"}; 
-
-#line 1758 "pure2-regex.cpp2"
-  private: std::string var_regex_661 {"foo # Match foo"}; 
-
-  private: std::string var_regex_662 {"\x41\x42"}; 
-
-  private: std::string var_regex_663 {"\101\o{102}"}; 
-  public: auto run() const& -> void;
-  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_100 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_101 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_102 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_103 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_104 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_105 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_106 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_107 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_108 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_109 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_110 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_111 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_112 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_113 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_114 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_115 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_116 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_117 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_118 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_119 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_120 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_121 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_122 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_not_space,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_123 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_124 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_125 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_126 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_127 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_128 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_129 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_130 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_131 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_132 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_133 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_134 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_135 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_136 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_137 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_138 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_139 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_140 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_141 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_142 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_143 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_144 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_145 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_146 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_147 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_148 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_149 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_150 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_151 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_152 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_153 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_154 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_155 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_156 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_157 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_158 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_159 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_160 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_161 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_162 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_163 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_164 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_165 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_166 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_167 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,1,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_168 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_169 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,1,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_170 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_171 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_172 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_173 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_174 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_175 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_176 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_177 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_178 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_179 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_180 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,1>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_181 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_182 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,1,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_183 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_184 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_185 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_186 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_187 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_188 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_189 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_190 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_191 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_192 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_193 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_194 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_195 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_196 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_197 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_198 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_199 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_200 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_201 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_202 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_203 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_204 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_205 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_206 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_207 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_208 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_209 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_210 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_211 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_212 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_213 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_214 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_215 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_216 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_217 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_218 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_219 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_220 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_221 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,2,'+'>,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_222 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,2>,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_223 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,1,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_224 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,1,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_225 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,5,1>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_226 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_227 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_228 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>> regex_229 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,1,-1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_230 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,2,'?'>>,::cpp2::regex::group_matcher_end_logic>> regex_231 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_232 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,0,1,1>>,::cpp2::regex::group_matcher_end_logic>> regex_233 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_234 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_235 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_236 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_237 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_238 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_239 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_240 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_241 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_242 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_243 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_244 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_245 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_246 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_247 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_248 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_249 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_250 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_251 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_252 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_253 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_254 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_255 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_256 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_257 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>> regex_258 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_259 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_260 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_261 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_262 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_263 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_264 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_265 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_266 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_267 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_268 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_269 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_270 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_271 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_272 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_273 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_274 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic>,0,1,2,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_275 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_276 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_277 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_278 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_279 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_280 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_281 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_282 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_283 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_284 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_285 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_286 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_287 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_288 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_289 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_290 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_291 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_292 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_293 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_294 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_295 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_296 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_297 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_298 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_299 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_300 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_301 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_302 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_303 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_304 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_305 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_306 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_307 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_308 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_309 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_310 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_311 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_312 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_313 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_314 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_315 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_316 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_317 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_318 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,-1,3,'+'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_319 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_320 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,3,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_321 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_322 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,1,5,3>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_323 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_324 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_range_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,1,3,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_325 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_326 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_327 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_328 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_329 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_330 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_331 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_332 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_333 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_334 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_335 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_336 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_337 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_338 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_339 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_340 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_341 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_342 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_343 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_344 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_345 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_346 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_347 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_348 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_349 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_350 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_351 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_352 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_353 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_354 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_355 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_356 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_357 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_358 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_359 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_360 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_361 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_362 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_363 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_364 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_365 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_366 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_367 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_368 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_369 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_370 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_371 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_372 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_373 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_374 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_375 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::matcher_list,0,1,2,'?'>,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_376 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_377 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_378 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_379 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_380 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_381 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_382 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_383 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_384 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::line_start_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_385 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_386 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_387 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_388 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_389 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_390 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_391 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_392 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_393 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_394 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_395 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_396 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_397 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_398 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_399 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_400 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_401 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_402 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_403 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_404 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_405 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_406 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_407 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_408 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_409 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_410 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_411 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_412 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_413 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_414 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_415 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_416 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_417 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_418 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_419 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_420 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_421 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_422 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_423 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_424 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_425 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_426 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_427 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_428 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_429 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_430 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_431 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_432 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_433 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_434 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_435 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_436 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_437 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_438 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_439 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_440 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_441 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_442 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_443 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_444 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_445 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_446 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_447 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_448 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_449 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_45 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_450 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_451 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_452 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_453 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_454 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_455 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_456 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_457 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_458 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_459 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_46 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_460 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_461 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_462 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_463 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_464 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_465 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_466 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_467 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_468 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_469 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_47 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_470 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_471 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_472 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_473 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_474 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_475 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_476 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_477 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_478 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_479 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,1,-1,2,'+'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_48 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_480 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_481 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_482 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_483 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_484 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_485 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_486 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_487 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_488 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_489 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_49 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_490 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_491 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_492 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_493 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_494 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_495 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_496 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_497 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_498 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_499 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_50 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_500 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_501 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_502 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_503 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_504 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_505 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_506 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_507 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_508 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_509 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,-1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_51 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_510 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_511 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_512 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_513 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_514 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_515 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_516 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_517 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_518 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_519 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_52 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_520 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_521 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_522 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_523 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_524 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_525 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_526 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_527 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_528 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_529 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_53 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_530 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_531 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_532 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_533 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_534 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_535 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_536 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_537 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_538 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_539 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,1,3,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_54 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_540 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_541 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_542 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_543 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_544 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_545 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_546 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_547 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_548 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_549 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_55 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_550 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_551 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_552 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_553 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_554 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_555 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_556 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_557 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_558 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_559 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_56 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_560 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_561 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_562 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_563 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_564 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_565 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_566 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_567 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_568 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_569 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,4,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_57 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_570 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_571 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_572 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_573 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_574 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_575 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_576 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_577 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_578 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_579 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,4,5,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_58 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_580 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end_or_before_new_line_at_end>,::cpp2::regex::group_matcher_end_logic>> regex_581 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::named_string_end>,::cpp2::regex::group_matcher_end_logic>> regex_582 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_583 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_584 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_585 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::named_class_no_new_line>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_586 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_587 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_588 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_589 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_59 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_590 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_591 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_592 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_593 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_594 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_595 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_596 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_597 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_598 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_599 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_60 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_600 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_601 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_602 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_603 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_604 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_605 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_606 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_607 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_608 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,1,1,2>>,::cpp2::regex::group_matcher_end_logic>> regex_609 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,2>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_61 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_610 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_611 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,3,4,2>>,::cpp2::regex::group_matcher_end_logic>> regex_612 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_613 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_614 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_615 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_616 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_617 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::group_matcher_end_logic>> regex_618 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_619 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_62 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_620 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_621 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_622 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_623 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_624 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_625 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_626 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_627 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_628 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_629 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,1,2,'?'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_63 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_630 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_631 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_632 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_633 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_634 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">>,::cpp2::regex::group_matcher_end_logic>> regex_635 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic">,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_636 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_637 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_638 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_639 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,0,1,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_64 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_640 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::range_matcher_logic,3,3,2>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_641 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_642 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_643 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_644 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_645 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_646 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_647 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_648 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_649 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_65 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_650 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_group_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_651 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_652 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_653 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_654 {}; public: ::cpp2::regex::regular_expression>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::special_group_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_655 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::global_group_reset,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_656 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::special_syntax_wrapper>,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_657 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_658 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::modifier_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_659 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_66 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::matcher_list,"",true>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_660 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_661 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_662 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::special_syntax_wrapper>>,::cpp2::regex::group_matcher_end_logic>> regex_663 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_67 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_68 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_69 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::line_end_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_70 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_71 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>> regex_72 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_73 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_74 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::named_class_no_new_line,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_75 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_76 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_77 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_78 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_79 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_80 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_81 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_82 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::class_matcher_logic>,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_83 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_84 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_85 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_86 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_87 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_88 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_89 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>>,::cpp2::regex::group_matcher_end_logic>> regex_90 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_91 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_92 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_93 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_94 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_95 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_96 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_97 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::class_matcher_logic,::cpp2::regex::single_class_entry>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_98 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::word_boundary_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_99 {}; 
-  public: test_perl_tests_general() = default;
-  public: test_perl_tests_general(test_perl_tests_general const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_perl_tests_general const&) -> void = delete;
-
-
-#line 2431 "pure2-regex.cpp2"
-};
-class test_perl_tests_lookahead {
-
-  private: std::string var_regex_0 {"a(?!b)."}; 
-
-  private: std::string var_regex_1 {"(?=)a"}; 
-
-  private: std::string var_regex_2 {"a(?=d)."}; 
-
-  private: std::string var_regex_3 {"a(?=c|d)."}; 
-
-  private: std::string var_regex_4 {"^(?:b|a(?=(.)))*\1"}; 
-
-  private: std::string var_regex_5 {"(?=(a+?))(\1ab)"}; 
-
-  private: std::string var_regex_6 {"^(?=(a+?))\1ab"}; 
-
-  private: std::string var_regex_7 {"(?=(a+?))(\1ab)"}; 
-
-  private: std::string var_regex_8 {"^(?=(a+?))\1ab"}; 
-
-  private: std::string var_regex_9 {"(.*)(?=c)"}; 
-
-  private: std::string var_regex_10 {"(.*)(?=c)c"}; 
-
-  private: std::string var_regex_11 {"(.*)(?=b|c)"}; 
-
-  private: std::string var_regex_12 {"(.*)(?=b|c)c"}; 
-
-  private: std::string var_regex_13 {"(.*)(?=c|b)"}; 
-
-  private: std::string var_regex_14 {"(.*)(?=c|b)c"}; 
-
-  private: std::string var_regex_15 {"(.*)(?=[bc])"}; 
-
-  private: std::string var_regex_16 {"(.*)(?=[bc])c"}; 
-
-  private: std::string var_regex_17 {"(.*?)(?=c)"}; 
-
-  private: std::string var_regex_18 {"(.*?)(?=c)c"}; 
-
-  private: std::string var_regex_19 {"(.*?)(?=b|c)"}; 
-
-  private: std::string var_regex_20 {"(.*?)(?=b|c)c"}; 
-
-  private: std::string var_regex_21 {"(.*?)(?=c|b)"}; 
-
-  private: std::string var_regex_22 {"(.*?)(?=c|b)c"}; 
-
-  private: std::string var_regex_23 {"(.*?)(?=[bc])"}; 
-
-  private: std::string var_regex_24 {"(.*?)(?=[bc])c"}; 
-
-  private: std::string var_regex_25 {"^(a*?)(?!(aa|aaaa)*\$)(?=a\z)"}; 
-
-  private: std::string var_regex_26 {"a(?!b(?!c))(..)"}; 
-
-  private: std::string var_regex_27 {"a(?!b(?=a))(..)"}; 
-
-  private: std::string var_regex_28 {"X(\w+)(?=\s)|X(\w+)"}; 
-
-  private: std::string var_regex_29 {"^a*(?=b)b"}; 
-
-#line 2495 "pure2-regex.cpp2"
-  private: std::string var_regex_30 {"(?!\A)x"}; 
-
-#line 2498 "pure2-regex.cpp2"
-  private: std::string var_regex_31 {"^(o)(?!.*\1)"}; 
-
-  private: std::string var_regex_32 {".*a(?!(b|cd)*e).*f"}; 
-
-  private: std::string var_regex_33 {"^(a*?)(?!(aa|aaaa)*\$)"}; 
-
-  private: std::string var_regex_34 {"(?!)+?|(.{2,4})"}; 
-
-  private: std::string var_regex_35 {"^(a*?)(?!(a{6}|a{5})*\$)"}; 
-
-  private: std::string var_regex_36 {"a(?!b(?!c(?!d(?!e))))...(.)"}; 
-
-  private: std::string var_regex_37 {"X(?!b+(?!(c+)*(?!(c+)*d))).*X"}; 
-
-  private: std::string var_regex_38 {"((?s).)c(?!.)"}; 
-
-  private: std::string var_regex_39 {"((?s).)c(?!.)"}; 
-
-  private: std::string var_regex_40 {"((?s)b.)c(?!.)"}; 
-
-  private: std::string var_regex_41 {"((?s)b.)c(?!.)"}; 
-
-  private: std::string var_regex_42 {"((?s)b.)c(?!\\N)"}; 
-
-#line 2523 "pure2-regex.cpp2"
-  private: std::string var_regex_43 {"(b.)c(?!\\N)"}; 
-
-  private: std::string var_regex_44 {"a*(?!)"}; 
-  public: auto run() const& -> void;
-  public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_0 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_1 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_10 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_11 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_12 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_13 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_14 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_15 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_16 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_17 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_18 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_19 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_2 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_20 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>>,::cpp2::regex::group_matcher_end_logic>> regex_21 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_22 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>>,::cpp2::regex::group_matcher_end_logic>> regex_23 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::single_class_entry>>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_24 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::named_string_end>>>,::cpp2::regex::group_matcher_end_logic>> regex_25 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_26 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_27 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_28 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_29 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic>,::cpp2::regex::matcher_list>>>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_3 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list>>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_30 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,0,-1,2,'*'>,::cpp2::regex::group_ref_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_31 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_32 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_33 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::alternative_matcher_logic>,1,-1,1,'+'>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,2,4,2>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_34 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,1,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::alternative_matcher_logic,6,6,2>>,::cpp2::regex::matcher_list,5,5,2>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::line_end_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_35 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>>>>>>,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::any_matcher_logic,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_36 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,1,-1,2,'+'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,2,'+'>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>>>>>>,::cpp2::regex::special_range_matcher_logic,0,-1,2,'*'>,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_37 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_38 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_39 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::special_range_matcher_logic,"",true>,::cpp2::regex::alternative_matcher_logic>,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list>,::cpp2::regex::group_matcher_end_logic>>>>>,::cpp2::regex::group_matcher_end_logic>,0,-1,2,'*'>,::cpp2::regex::group_ref_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_4 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_40 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_41 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list>,::cpp2::regex::char_matcher_logic,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_42 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::any_matcher_logic>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::char_matcher_logic,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_43 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,0,-1,2,'*'>,::cpp2::regex::lookahead_matcher_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_44 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_5 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_6 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>>,::cpp2::regex::group_matcher_end_logic>> regex_7 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::lookahead_matcher_logic,::cpp2::regex::matcher_list,1,-1,1,'+'>>,::cpp2::regex::group_matcher_end_logic>>>,::cpp2::regex::group_ref_matcher_logic,::cpp2::regex::char_matcher_logic,::cpp2::regex::char_matcher_logic>,::cpp2::regex::group_matcher_end_logic>> regex_8 {}; public: ::cpp2::regex::regular_expression,::cpp2::regex::matcher_list,::cpp2::regex::matcher_list,0,-1,2,'*'>>,::cpp2::regex::group_matcher_end_logic>,::cpp2::regex::lookahead_matcher_logic>>>,::cpp2::regex::group_matcher_end_logic>> regex_9 {}; 
-  public: test_perl_tests_lookahead() = default;
-  public: test_perl_tests_lookahead(test_perl_tests_lookahead const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_perl_tests_lookahead const&) -> void = delete;
-
-
-#line 2575 "pure2-regex.cpp2"
-};
-auto main() -> int;
-
-//=== Cpp2 function definitions =================================================
-
-#line 1 "pure2-regex.cpp2"
-[[nodiscard]] auto create_result(cpp2::in resultExpr, auto const& r) -> std::string{
-#line 2 "pure2-regex.cpp2"
-  std::string result {""}; 
-
-  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
-  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::assert_not_null(_0))), iter)}; 
-    auto firstDollar {CPP2_UFCS(find)((*cpp2::assert_not_null(_0)), "$", start)}; 
-    auto firstAt {CPP2_UFCS(find)((*cpp2::assert_not_null(_0)), "@", std::move(start))}; 
-
-  auto end {std::min(std::move(firstDollar), std::move(firstAt))}; 
-  if (end != std::string::npos) {
-   return CPP2_UFCS(cbegin)((*cpp2::assert_not_null(_0))) + std::move(end); 
-  }
-  else {
-   return CPP2_UFCS(cend)((*cpp2::assert_not_null(_0))); 
-  }
-  }}; 
-  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
-    auto start {iter}; 
-
-    for( ; std::isdigit(*cpp2::assert_not_null(iter)); ++iter ) {}
-
-    return std::stoi(std::string(std::move(start), iter)); 
-  }}; 
-  auto extract_until {[](auto& iter, cpp2::in to) mutable -> auto{
-    auto start {iter}; 
-
-    for( ; (to != *cpp2::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
-
-    return std::string(std::move(start), iter); 
-  }}; 
-
-  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
-
-  while( iter != CPP2_UFCS(end)(resultExpr) ) {
-    auto next {get_next(iter)}; 
-
-    if (next != iter) {
-      result += std::string(iter, next);
-    }
-    if (next != CPP2_UFCS(end)(resultExpr)) {
-      if (*cpp2::assert_not_null(next) == '$') {
-        ++next;
-
-        if (*cpp2::assert_not_null(next) == '&') {
-          ++next;
-          result += CPP2_UFCS(group)(r, 0);
-        }
-        else {if (*cpp2::assert_not_null(next) == '-' || *cpp2::assert_not_null(next) == '+') {
-          auto is_start {*cpp2::assert_not_null(next) == '-'}; 
-          ++next;
-          if (*cpp2::assert_not_null(next) == '{') {
-            ++next; // Skip {
-            auto group {extract_until(next, '}')}; 
-            ++next; // Skip }
-            result += CPP2_UFCS(group)(r, std::move(group));
-          }
-          else {if (*cpp2::assert_not_null(next) == '[') {
-            ++next; // Skip [
-            auto group {extract_group_and_advance(next)}; 
-            ++next; // Skip ]
-
-            if (std::move(is_start)) {
-              result += std::to_string(CPP2_UFCS(group_start)(r, std::move(group)));
-            }
-            else {
-              result += std::to_string(CPP2_UFCS(group_end)(r, std::move(group)));
-            }
-          }
-          else {
-            // Return max group
-            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
-          }}
-        }
-        else {if (std::isdigit(*cpp2::assert_not_null(next))) {
-          auto group {extract_group_and_advance(next)}; 
-          result += CPP2_UFCS(group)(r, std::move(group));
-        }
-        else {
-          std::cerr << "Not implemented";
-        }}}
-      }
-      else {if (*cpp2::assert_not_null(next) == '@') {
-        ++next;
-
-        if (*cpp2::assert_not_null(next) == '-' || *cpp2::assert_not_null(next) == '+') {
-          auto i {0}; 
-          for( ; cpp2::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
-            auto pos {0}; 
-            if (*cpp2::assert_not_null(next) == '-') {
-              pos = CPP2_UFCS(group_start)(r, i);
-            }
-            else {
-              pos = CPP2_UFCS(group_end)(r, i);
-            }
-            result +=  std::to_string(std::move(pos));
-          }
-        }
-        else {
-          std::cerr << "Not implemented";
-        }
-      }
-      else {
-        std::cerr << "Not implemented.";
-      }}
-    }
-    iter = std::move(next);
-  }
-
-  return result; 
-}
-
-#line 112 "pure2-regex.cpp2"
-template auto test(M const& regex, cpp2::in id, cpp2::in regex_str, cpp2::in str, cpp2::in kind, cpp2::in resultExpr, 
-           cpp2::in resultExpected) -> void{
-
-  std::string warning {""}; 
-  if (CPP2_UFCS(to_string)(regex) != regex_str) {
-    warning = "Warning: Parsed regex does not match.";
-  }
-
-  std::string status {"OK"}; 
-
-  auto r {CPP2_UFCS(search)(regex, str)}; 
-
-  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
-    if (!(r.matched)) {
-      status = "Failure: Regex should apply.";
-    }
-    else {
-      // Have a match check the result
-
-      auto result {create_result(resultExpr, std::move(r))}; 
-
-      if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(std::move(result)) + ")" };
-      }
-    }
-  }
-  else {if ("n" == kind) {
-    if (std::move(r).matched) {
-      status = "Failure: Regex should not apply.";
-    }
-  }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
-  }}
-
-  if (!(CPP2_UFCS(empty)(warning))) {
-    warning += " ";
-  }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(std::move(status)) + " " + cpp2::to_string(std::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
-}
-
-#line 1763 "pure2-regex.cpp2"
-  auto test_perl_tests_general::run() const& -> void{
-    std::cout << "Running perl_tests_general:" << std::endl;
-    test(regex_0, 0, "abc", "abc", "y", "$&", "abc");
-    test(regex_1, 1, "abc", "abc", "y", "$-[0]", "0");
-    test(regex_2, 2, "abc", "abc", "y", "$+[0]", "3");
-    test(regex_3, 3, "abc", "xbc", "n", "-", "-");
-    test(regex_4, 4, "abc", "axc", "n", "-", "-");
-    test(regex_5, 5, "abc", "abx", "n", "-", "-");
-    test(regex_6, 6, "abc", "xabcy", "y", "$&", "abc");
-    test(regex_7, 7, "abc", "xabcy", "y", "$-[0]", "1");
-    test(regex_8, 8, "abc", "xabcy", "y", "$+[0]", "4");
-    test(regex_9, 9, "abc", "ababc", "y", "$&", "abc");
-    test(regex_10, 10, "abc", "ababc", "y", "$-[0]", "2");
-    test(regex_11, 11, "abc", "ababc", "y", "$+[0]", "5");
-    test(regex_12, 12, "ab*c", "abc", "y", "$&", "abc");
-    test(regex_13, 13, "ab*c", "abc", "y", "$-[0]", "0");
-    test(regex_14, 14, "ab*c", "abc", "y", "$+[0]", "3");
-    test(regex_15, 15, "ab*bc", "abc", "y", "$&", "abc");
-    test(regex_16, 16, "ab*bc", "abc", "y", "$-[0]", "0");
-    test(regex_17, 17, "ab*bc", "abc", "y", "$+[0]", "3");
-    test(regex_18, 18, "ab*bc", "abbc", "y", "$&", "abbc");
-    test(regex_19, 19, "ab*bc", "abbc", "y", "$-[0]", "0");
-    test(regex_20, 20, "ab*bc", "abbc", "y", "$+[0]", "4");
-    test(regex_21, 21, "ab*bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_22, 22, "ab*bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_23, 23, "ab*bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_24, 24, ".{1}", "abbbbc", "y", "$&", "a");
-    test(regex_25, 25, ".{1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_26, 26, ".{1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_27, 27, ".{3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_28, 28, ".{3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_29, 29, ".{3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_30, 30, "\\\\N{1}", "abbbbc", "y", "$&", "a");
-    test(regex_31, 31, "\\\\N{1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_32, 32, "\\\\N{1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_33, 33, "\\\\N{3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_34, 34, "\\\\N{3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_35, 35, "\\\\N{3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_36, 36, "\\\\N{ 3 , 4 }", "abbbbc", "y", "$+[0]", "4");
-    test(regex_37, 37, "ab{0,}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_38, 38, "ab{0,}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_39, 39, "ab{0,}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_40, 40, "ab+bc", "abbc", "y", "$&", "abbc");
-    test(regex_41, 41, "ab+bc", "abbc", "y", "$-[0]", "0");
-    test(regex_42, 42, "ab+bc", "abbc", "y", "$+[0]", "4");
-    test(regex_43, 43, "ab+bc", "abc", "n", "-", "-");
-    test(regex_44, 44, "ab+bc", "abq", "n", "-", "-");
-    test(regex_45, 45, "ab{1,}bc", "abq", "n", "-", "-");
-    test(regex_46, 46, "ab+bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_47, 47, "ab+bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_48, 48, "ab+bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_49, 49, "ab{1,}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_50, 50, "ab{1,}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_51, 51, "ab{1,}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_52, 52, "ab{1,3}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_53, 53, "ab{1,3}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_54, 54, "ab{1,3}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_55, 55, "ab{3,4}bc", "abbbbc", "y", "$&", "abbbbc");
-    test(regex_56, 56, "ab{3,4}bc", "abbbbc", "y", "$-[0]", "0");
-    test(regex_57, 57, "ab{3,4}bc", "abbbbc", "y", "$+[0]", "6");
-    test(regex_58, 58, "ab{4,5}bc", "abbbbc", "n", "-", "-");
-    test(regex_59, 59, "ab?bc", "abbc", "y", "$&", "abbc");
-    test(regex_60, 60, "ab?bc", "abc", "y", "$&", "abc");
-    test(regex_61, 61, "ab{0,1}bc", "abc", "y", "$&", "abc");
-    test(regex_62, 62, "ab?bc", "abbbbc", "n", "-", "-");
-    test(regex_63, 63, "ab?c", "abc", "y", "$&", "abc");
-    test(regex_64, 64, "ab{0,1}c", "abc", "y", "$&", "abc");
-    test(regex_65, 65, "^abc\\$", "abc", "y", "$&", "abc");
-    test(regex_66, 66, "^abc\\$", "abcc", "n", "-", "-");
-    test(regex_67, 67, "^abc", "abcc", "y", "$&", "abc");
-    test(regex_68, 68, "^abc\\$", "aabc", "n", "-", "-");
-    test(regex_69, 69, "abc\\$", "aabc", "y", "$&", "abc");
-    test(regex_70, 70, "abc\\$", "aabcd", "n", "-", "-");
-    test(regex_71, 71, "^", "abc", "y", "$&", "");
-    test(regex_72, 72, "\\$", "abc", "y", "$&", "");
-    test(regex_73, 73, "a.c", "abc", "y", "$&", "abc");
-    test(regex_74, 74, "a.c", "axc", "y", "$&", "axc");
-    test(regex_75, 75, "a\\\\Nc", "abc", "y", "$&", "abc");
-    test(regex_76, 76, "a.*c", "axyzc", "y", "$&", "axyzc");
-    test(regex_77, 77, "a\\\\N*c", "axyzc", "y", "$&", "axyzc");
-    test(regex_78, 78, "a.*c", "axyzd", "n", "-", "-");
-    test(regex_79, 79, "a\\\\N*c", "axyzd", "n", "-", "-");
-    test(regex_80, 80, "a[bc]d", "abc", "n", "-", "-");
-    test(regex_81, 81, "a[bc]d", "abd", "y", "$&", "abd");
-    test(regex_82, 82, "a[b]d", "abd", "y", "$&", "abd");
-    test(regex_83, 83, "[a][b][d]", "abd", "y", "$&", "abd");
-    test(regex_84, 84, ".[b].", "abd", "y", "$&", "abd");
-    test(regex_85, 85, ".[b].", "aBd", "n", "-", "-");
-    test(regex_86, 86, "a[b-d]e", "abd", "n", "-", "-");
-    test(regex_87, 87, "a[b-d]e", "ace", "y", "$&", "ace");
-    test(regex_88, 88, "a[b-d]", "aac", "y", "$&", "ac");
-    test(regex_89, 89, "a[-b]", "a-", "y", "$&", "a-");
-    test(regex_90, 90, "a[b-]", "a-", "y", "$&", "a-");
-    test(regex_91, 91, "a]", "a]", "y", "$&", "a]");
-    test(regex_92, 92, "a[]]b", "a]b", "y", "$&", "a]b");
-    test(regex_93, 93, "a[^bc]d", "aed", "y", "$&", "aed");
-    test(regex_94, 94, "a[^bc]d", "abd", "n", "-", "-");
-    test(regex_95, 95, "a[^-b]c", "adc", "y", "$&", "adc");
-    test(regex_96, 96, "a[^-b]c", "a-c", "n", "-", "-");
-    test(regex_97, 97, "a[^]b]c", "a]c", "n", "-", "-");
-    test(regex_98, 98, "a[^]b]c", "adc", "y", "$&", "adc");
-    test(regex_99, 99, "\\ba\\b", "a-", "y", "-", "-");
-    test(regex_100, 100, "\\ba\\b", "-a", "y", "-", "-");
-    test(regex_101, 101, "\\ba\\b", "-a-", "y", "-", "-");
-    test(regex_102, 102, "\\by\\b", "xy", "n", "-", "-");
-    test(regex_103, 103, "\\by\\b", "yz", "n", "-", "-");
-    test(regex_104, 104, "\\by\\b", "xyz", "n", "-", "-");
-    test(regex_105, 105, "\\Ba\\B", "a-", "n", "-", "-");
-    test(regex_106, 106, "\\Ba\\B", "-a", "n", "-", "-");
-    test(regex_107, 107, "\\Ba\\B", "-a-", "n", "-", "-");
-    test(regex_108, 108, "\\By\\b", "xy", "y", "-", "-");
-    test(regex_109, 109, "\\By\\b", "xy", "y", "$-[0]", "1");
-    test(regex_110, 110, "\\By\\b", "xy", "y", "$+[0]", "2");
-    test(regex_111, 111, "\\By\\b", "xy", "y", "-", "-");
-    test(regex_112, 112, "\\by\\B", "yz", "y", "-", "-");
-    test(regex_113, 113, "\\By\\B", "xyz", "y", "-", "-");
-    test(regex_114, 114, "\\b", "", "n", "-", "-");
-    test(regex_115, 115, "\\B", "", "y", "-", "-");
-    test(regex_116, 116, "\\w", "a", "y", "-", "-");
-    test(regex_117, 117, "\\w", "-", "n", "-", "-");
-    test(regex_118, 118, "\\W", "a", "n", "-", "-");
-    test(regex_119, 119, "\\W", "-", "y", "-", "-");
-    test(regex_120, 120, "a\\sb", "a b", "y", "-", "-");
-    test(regex_121, 121, "a\\sb", "a-b", "n", "-", "-");
-    test(regex_122, 122, "a\\Sb", "a b", "n", "-", "-");
-    test(regex_123, 123, "a\\Sb", "a-b", "y", "-", "-");
-    test(regex_124, 124, "\\d", "1", "y", "-", "-");
-    test(regex_125, 125, "\\d", "-", "n", "-", "-");
-    test(regex_126, 126, "\\D", "1", "n", "-", "-");
-    test(regex_127, 127, "\\D", "-", "y", "-", "-");
-    test(regex_128, 128, "[\\w]", "a", "y", "-", "-");
-    test(regex_129, 129, "[\\w]", "-", "n", "-", "-");
-    test(regex_130, 130, "[\\W]", "a", "n", "-", "-");
-    test(regex_131, 131, "[\\W]", "-", "y", "-", "-");
-    test(regex_132, 132, "a[\\s]b", "a b", "y", "-", "-");
-    test(regex_133, 133, "a[\\s]b", "a-b", "n", "-", "-");
-    test(regex_134, 134, "a[\\S]b", "a b", "n", "-", "-");
-    test(regex_135, 135, "a[\\S]b", "a-b", "y", "-", "-");
-    test(regex_136, 136, "[\\d]", "1", "y", "-", "-");
-    test(regex_137, 137, "[\\d]", "-", "n", "-", "-");
-    test(regex_138, 138, "[\\D]", "1", "n", "-", "-");
-    test(regex_139, 139, "[\\D]", "-", "y", "-", "-");
-    test(regex_140, 140, "ab|cd", "abc", "y", "$&", "ab");
-    test(regex_141, 141, "ab|cd", "abcd", "y", "$&", "ab");
-    test(regex_142, 142, "()ef", "def", "y", "$&-$1", "ef-");
-    test(regex_143, 143, "()ef", "def", "y", "$-[0]", "1");
-    test(regex_144, 144, "()ef", "def", "y", "$+[0]", "3");
-    test(regex_145, 145, "()ef", "def", "y", "$-[1]", "1");
-    test(regex_146, 146, "()ef", "def", "y", "$+[1]", "1");
-    test(regex_147, 147, "\\$b", "b", "n", "-", "-");
-    test(regex_148, 148, "a\\(b", "a(b", "y", "$&-$1", "a(b-");
-    test(regex_149, 149, "a\\(*b", "ab", "y", "$&", "ab");
-    test(regex_150, 150, "a\\(*b", "a((b", "y", "$&", "a((b");
-    test(regex_151, 151, "a\\\\b", "a\\b", "y", "$&", "a\\b");
-    test(regex_152, 152, "((a))", "abc", "y", "$&-$1-$2", "a-a-a");
-    test(regex_153, 153, "((a))", "abc", "y", "$-[0]-$-[1]-$-[2]", "0-0-0");
-    test(regex_154, 154, "((a))", "abc", "y", "$+[0]-$+[1]-$+[2]", "1-1-1");
-    test(regex_155, 155, "(foo)(\\g-2)", "foofoo", "y", "$1-$2", "foo-foo");
-    test(regex_156, 156, "(foo)(\\g-2)(foo)(\\g-2)", "foofoofoofoo", "y", "$1-$2-$3-$4", "foo-foo-foo-foo");
-    test(regex_157, 157, "(([abc]+) \\g-1)(([abc]+) \\g{-1})", "abc abccba cba", "y", "$2-$4", "abc-cba");
-    test(regex_158, 158, "(a)(b)(c)\\g1\\g2\\g3", "abcabc", "y", "$1$2$3", "abc");
-    test(regex_159, 159, "abc", "ABC", "y", "$&", "ABC");
-    test(regex_160, 160, "abc", "XBC", "n", "-", "-");
-    test(regex_161, 161, "abc", "AXC", "n", "-", "-");
-    test(regex_162, 162, "abc", "ABX", "n", "-", "-");
-    test(regex_163, 163, "abc", "XABCY", "y", "$&", "ABC");
-    test(regex_164, 164, "abc", "ABABC", "y", "$&", "ABC");
-    test(regex_165, 165, "ab*c", "ABC", "y", "$&", "ABC");
-    test(regex_166, 166, "ab*bc", "ABC", "y", "$&", "ABC");
-    test(regex_167, 167, "ab*bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_168, 168, "ab*?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_169, 169, "ab{0,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_170, 170, "ab+?bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_171, 171, "ab+bc", "ABC", "n", "-", "-");
-    test(regex_172, 172, "ab+bc", "ABQ", "n", "-", "-");
-    test(regex_173, 173, "ab{1,}bc", "ABQ", "n", "-", "-");
-    test(regex_174, 174, "ab+bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_175, 175, "ab{1,}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_176, 176, "ab{1,3}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_177, 177, "ab{3,4}?bc", "ABBBBC", "y", "$&", "ABBBBC");
-    test(regex_178, 178, "ab{4,5}?bc", "ABBBBC", "n", "-", "-");
-    test(regex_179, 179, "ab??bc", "ABBC", "y", "$&", "ABBC");
-    test(regex_180, 180, "ab??bc", "ABC", "y", "$&", "ABC");
-    test(regex_181, 181, "ab{0,1}?bc", "ABC", "y", "$&", "ABC");
-    test(regex_182, 182, "ab??bc", "ABBBBC", "n", "-", "-");
-    test(regex_183, 183, "ab??c", "ABC", "y", "$&", "ABC");
-    test(regex_184, 184, "ab{0,1}?c", "ABC", "y", "$&", "ABC");
-    test(regex_185, 185, "^abc\\$", "ABC", "y", "$&", "ABC");
-    test(regex_186, 186, "^abc\\$", "ABCC", "n", "-", "-");
-    test(regex_187, 187, "^abc", "ABCC", "y", "$&", "ABC");
-    test(regex_188, 188, "^abc\\$", "AABC", "n", "-", "-");
-    test(regex_189, 189, "abc\\$", "AABC", "y", "$&", "ABC");
-    test(regex_190, 190, "^", "ABC", "y", "$&", "");
-    test(regex_191, 191, "\\$", "ABC", "y", "$&", "");
-    test(regex_192, 192, "a.c", "ABC", "y", "$&", "ABC");
-    test(regex_193, 193, "a.c", "AXC", "y", "$&", "AXC");
-    test(regex_194, 194, "a\\\\Nc", "ABC", "y", "$&", "ABC");
-    test(regex_195, 195, "a.*?c", "AXYZC", "y", "$&", "AXYZC");
-    test(regex_196, 196, "a.*c", "AXYZD", "n", "-", "-");
-    test(regex_197, 197, "a[bc]d", "ABC", "n", "-", "-");
-    test(regex_198, 198, "a[bc]d", "ABD", "y", "$&", "ABD");
-    test(regex_199, 199, "a[b-d]e", "ABD", "n", "-", "-");
-    test(regex_200, 200, "a[b-d]e", "ACE", "y", "$&", "ACE");
-    test(regex_201, 201, "a[b-d]", "AAC", "y", "$&", "AC");
-    test(regex_202, 202, "a[-b]", "A-", "y", "$&", "A-");
-    test(regex_203, 203, "a[b-]", "A-", "y", "$&", "A-");
-    test(regex_204, 204, "a]", "A]", "y", "$&", "A]");
-    test(regex_205, 205, "a[]]b", "A]B", "y", "$&", "A]B");
-    test(regex_206, 206, "a[^bc]d", "AED", "y", "$&", "AED");
-    test(regex_207, 207, "a[^bc]d", "ABD", "n", "-", "-");
-    test(regex_208, 208, "a[^-b]c", "ADC", "y", "$&", "ADC");
-    test(regex_209, 209, "a[^-b]c", "A-C", "n", "-", "-");
-    test(regex_210, 210, "a[^]b]c", "A]C", "n", "-", "-");
-    test(regex_211, 211, "a[^]b]c", "ADC", "y", "$&", "ADC");
-    test(regex_212, 212, "ab|cd", "ABC", "y", "$&", "AB");
-    test(regex_213, 213, "ab|cd", "ABCD", "y", "$&", "AB");
-    test(regex_214, 214, "()ef", "DEF", "y", "$&-$1", "EF-");
-    test(regex_215, 215, "\\$b", "B", "n", "-", "-");
-    test(regex_216, 216, "a\\(b", "A(B", "y", "$&-$1", "A(B-");
-    test(regex_217, 217, "a\\(*b", "AB", "y", "$&", "AB");
-    test(regex_218, 218, "a\\(*b", "A((B", "y", "$&", "A((B");
-    test(regex_219, 219, "a\\\\b", "A\\B", "y", "$&", "A\\B");
-    test(regex_220, 220, "((a))", "ABC", "y", "$&-$1-$2", "A-A-A");
-    test(regex_221, 221, "(a)b(c)", "ABC", "y", "$&-$1-$2", "ABC-A-C");
-    test(regex_222, 222, "a+b+c", "AABBABC", "y", "$&", "ABC");
-    test(regex_223, 223, "a{1,}b{1,}c", "AABBABC", "y", "$&", "ABC");
-    test(regex_224, 224, "a.+?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_225, 225, "a.*?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_226, 226, "a.{0,5}?c", "ABCABC", "y", "$&", "ABC");
-    test(regex_227, 227, "(a+|b)*", "AB", "y", "$&-$1", "AB-B");
-    test(regex_228, 228, "(a+|b){0,}", "AB", "y", "$&-$1", "AB-B");
-    test(regex_229, 229, "(a+|b)+", "AB", "y", "$&-$1", "AB-B");
-    test(regex_230, 230, "(a+|b){1,}", "AB", "y", "$&-$1", "AB-B");
-    test(regex_231, 231, "(a+|b)?", "AB", "y", "$&-$1", "A-A");
-    test(regex_232, 232, "(a+|b){0,1}", "AB", "y", "$&-$1", "A-A");
-    test(regex_233, 233, "(a+|b){0,1}?", "AB", "y", "$&-$1", "-");
-    test(regex_234, 234, "[^ab]*", "CDE", "y", "$&", "CDE");
-    test(regex_235, 235, "abc", "", "n", "-", "-");
-    test(regex_236, 236, "a*", "", "y", "$&", "");
-    test(regex_237, 237, "([abc])*d", "ABBBCD", "y", "$&-$1", "ABBBCD-C");
-    test(regex_238, 238, "([abc])*bcd", "ABCD", "y", "$&-$1", "ABCD-A");
-    test(regex_239, 239, "a|b|c|d|e", "E", "y", "$&", "E");
-    test(regex_240, 240, "(a|b|c|d|e)f", "EF", "y", "$&-$1", "EF-E");
-    test(regex_241, 241, "abcd*efg", "ABCDEFG", "y", "$&", "ABCDEFG");
-    test(regex_242, 242, "ab*", "XABYABBBZ", "y", "$&", "AB");
-    test(regex_243, 243, "ab*", "XAYABBBZ", "y", "$&", "A");
-    test(regex_244, 244, "(ab|cd)e", "ABCDE", "y", "$&-$1", "CDE-CD");
-    test(regex_245, 245, "[abhgefdc]ij", "HIJ", "y", "$&", "HIJ");
-    test(regex_246, 246, "^(ab|cd)e", "ABCDE", "n", "x$1y", "XY");
-    test(regex_247, 247, "(abc|)ef", "ABCDEF", "y", "$&-$1", "EF-");
-    test(regex_248, 248, "(a|b)c*d", "ABCD", "y", "$&-$1", "BCD-B");
-    test(regex_249, 249, "(ab|ab*)bc", "ABC", "y", "$&-$1", "ABC-A");
-    test(regex_250, 250, "a([bc]*)c*", "ABC", "y", "$&-$1", "ABC-BC");
-    test(regex_251, 251, "a([bc]*)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
-    test(regex_252, 252, "a([bc]+)(c*d)", "ABCD", "y", "$&-$1-$2", "ABCD-BC-D");
-    test(regex_253, 253, "a([bc]*)(c+d)", "ABCD", "y", "$&-$1-$2", "ABCD-B-CD");
-    test(regex_254, 254, "a[bcd]*dcdcde", "ADCDCDE", "y", "$&", "ADCDCDE");
-    test(regex_255, 255, "a[bcd]+dcdcde", "ADCDCDE", "n", "-", "-");
-    test(regex_256, 256, "(ab|a)b*c", "ABC", "y", "$&-$1", "ABC-AB");
-    test(regex_257, 257, "((a)(b)c)(d)", "ABCD", "y", "$1-$2-$3-$4", "ABC-A-B-D");
-    test(regex_258, 258, "[a-zA-Z_][a-zA-Z0-9_]*", "ALPHA", "y", "$&", "ALPHA");
-    test(regex_259, 259, "^a(bc+|b[eh])g|.h\\$", "ABH", "y", "$&-$1", "BH-");
-    test(regex_260, 260, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
-    test(regex_261, 261, "(bc+d\\$|ef*g.|h?i(j|k))", "IJ", "y", "$&-$1-$2", "IJ-IJ-J");
-    test(regex_262, 262, "(bc+d\\$|ef*g.|h?i(j|k))", "EFFG", "n", "-", "-");
-    test(regex_263, 263, "(bc+d\\$|ef*g.|h?i(j|k))", "BCDD", "n", "-", "-");
-    test(regex_264, 264, "(bc+d\\$|ef*g.|h?i(j|k))", "REFFGZ", "y", "$&-$1-$2", "EFFGZ-EFFGZ-");
-    test(regex_265, 265, "((((((((((a))))))))))", "A", "y", "$10", "A");
-    test(regex_266, 266, "((((((((((a))))))))))\\10", "AA", "y", "$&", "AA");
-    test(regex_267, 267, "(((((((((a)))))))))", "A", "y", "$&", "A");
-    test(regex_268, 268, "multiple words of text", "UH-UH", "n", "-", "-");
-    test(regex_269, 269, "multiple words", "MULTIPLE WORDS, YEAH", "y", "$&", "MULTIPLE WORDS");
-    test(regex_270, 270, "(.*)c(.*)", "ABCDE", "y", "$&-$1-$2", "ABCDE-AB-DE");
-    test(regex_271, 271, "\\((.*), (.*)\\)", "(A, B)", "y", "($2, $1)", "(B, A)");
-    test(regex_272, 272, "[k]", "AB", "n", "-", "-");
-    test(regex_273, 273, "abcd", "ABCD", "y", "$&", "ABCD");
-    test(regex_274, 274, "a(bc)d", "ABCD", "y", "$1", "BC");
-    test(regex_275, 275, "a[-]?c", "AC", "y", "$&", "AC");
-    test(regex_276, 276, "(abc)\\1", "ABCABC", "y", "$1", "ABC");
-    test(regex_277, 277, "([a-c]*)\\1", "ABCABC", "y", "$1", "ABC");
-    test(regex_278, 278, "a++a", "aaaaa", "n", "-", "-");
-    test(regex_279, 279, "a*+a", "aaaaa", "n", "-", "-");
-    test(regex_280, 280, "a{1,5}+a", "aaaaa", "n", "-", "-");
-    test(regex_281, 281, "a?+a", "ab", "n", "-", "-");
-    test(regex_282, 282, "a++b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_283, 283, "a*+b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_284, 284, "a{1,5}+b", "aaaaab", "y", "$&", "aaaaab");
-    test(regex_285, 285, "a?+b", "ab", "y", "$&", "ab");
-    test(regex_286, 286, "fooa++a", "fooaaaaa", "n", "-", "-");
-    test(regex_287, 287, "fooa*+a", "fooaaaaa", "n", "-", "-");
-    test(regex_288, 288, "fooa{1,5}+a", "fooaaaaa", "n", "-", "-");
-    test(regex_289, 289, "fooa?+a", "fooab", "n", "-", "-");
-    test(regex_290, 290, "fooa++b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_291, 291, "fooa*+b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_292, 292, "fooa{1,5}+b", "fooaaaaab", "y", "$&", "fooaaaaab");
-    test(regex_293, 293, "fooa?+b", "fooab", "y", "$&", "fooab");
-    test(regex_294, 294, "(aA)++(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_295, 295, "(aA|bB)++(aA|bB)", "aAaAbBaAbB", "n", "-", "aAaAbBaAbB");
-    test(regex_296, 296, "(aA)*+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_297, 297, "(aA|bB)*+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
-    test(regex_298, 298, "(aA){1,5}+(aA)", "aAaAaAaAaA", "n", "-", "aAaAaAaAaA");
-    test(regex_299, 299, "(aA|bB){1,5}+(aA|bB)", "aAaAbBaAaA", "n", "-", "aAaAbBaAaA");
-    test(regex_300, 300, "(aA)?+(aA)", "aAb", "n", "-", "aAb");
-    test(regex_301, 301, "(aA|bB)?+(aA|bB)", "bBb", "n", "-", "bBb");
-    test(regex_302, 302, "(aA)++b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_303, 303, "(aA|bB)++b", "aAbBaAaAbBb", "y", "$&", "aAbBaAaAbBb");
-    test(regex_304, 304, "(aA)*+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_305, 305, "(aA|bB)*+b", "bBbBbBbBbBb", "y", "$&", "bBbBbBbBbBb");
-    test(regex_306, 306, "(aA){1,5}+b", "aAaAaAaAaAb", "y", "$&", "aAaAaAaAaAb");
-    test(regex_307, 307, "(aA|bB){1,5}+b", "bBaAbBaAbBb", "y", "$&", "bBaAbBaAbBb");
-    test(regex_308, 308, "(aA)?+b", "aAb", "y", "$&", "aAb");
-    test(regex_309, 309, "(aA|bB)?+b", "bBb", "y", "$&", "bBb");
-    test(regex_310, 310, "foo(aA)++(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_311, 311, "foo(aA|bB)++(aA|bB)", "foobBbBbBaAaA", "n", "-", "foobBbBbBaAaA");
-    test(regex_312, 312, "foo(aA)*+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_313, 313, "foo(aA|bB)*+(aA|bB)", "foobBaAbBaAaA", "n", "-", "foobBaAbBaAaA");
-    test(regex_314, 314, "foo(aA){1,5}+(aA)", "fooaAaAaAaAaA", "n", "-", "fooaAaAaAaAaA");
-    test(regex_315, 315, "foo(aA|bB){1,5}+(aA|bB)", "fooaAbBbBaAaA", "n", "-", "fooaAbBbBaAaA");
-    test(regex_316, 316, "foo(aA)?+(aA)", "fooaAb", "n", "-", "fooaAb");
-    test(regex_317, 317, "foo(aA|bB)?+(aA|bB)", "foobBb", "n", "-", "foobBb");
-    test(regex_318, 318, "foo(aA)++b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_319, 319, "foo(aA|bB)++b", "foobBaAbBaAbBb", "y", "$&", "foobBaAbBaAbBb");
-    test(regex_320, 320, "foo(aA)*+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_321, 321, "foo(aA|bB)*+b", "foobBbBaAaAaAb", "y", "$&", "foobBbBaAaAaAb");
-    test(regex_322, 322, "foo(aA){1,5}+b", "fooaAaAaAaAaAb", "y", "$&", "fooaAaAaAaAaAb");
-    test(regex_323, 323, "foo(aA|bB){1,5}+b", "foobBaAaAaAaAb", "y", "$&", "foobBaAaAaAaAb");
-    test(regex_324, 324, "foo(aA)?+b", "fooaAb", "y", "$&", "fooaAb");
-    test(regex_325, 325, "foo(aA|bB)?+b", "foobBb", "y", "$&", "foobBb");
-    test(regex_326, 326, "foo(\\h+)bar", "foo\tbar", "y", "$1", "\t");
-    test(regex_327, 327, "(\\H+)(\\h)", "foo\tbar", "y", "$1-$2", "foo-\t");
-    test(regex_328, 328, "(\\h+)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
-    test(regex_329, 329, "foo(\\h)bar", "foo\tbar", "y", "$1", "\t");
-    test(regex_330, 330, "(\\H)(\\h)", "foo\tbar", "y", "$1-$2", "o-\t");
-    test(regex_331, 331, "(\\h)(\\H)", "foo\tbar", "y", "$1-$2", "\t-b");
-    test(regex_332, 332, "foo(\\v+)bar", "foo\r\n\r\n\nbar", "y", "$1", "\r\n\r\n\n");
-    test(regex_333, 333, "(\\V+)(\\v)", "foo\r\n\r\n\nbar", "y", "$1-$2", "foo-\r");
-    test(regex_334, 334, "(\\v+)(\\V)", "foo\r\n\r\n\nbar", "y", "$1-$2", "\r\n\r\n\n-b");
-    test(regex_335, 335, "foo(\\v)bar", "foo\rbar", "y", "$1", "\r");
-    test(regex_336, 336, "(\\V)(\\v)", "foo\rbar", "y", "$1-$2", "o-\r");
-    test(regex_337, 337, "(\\v)(\\V)", "foo\rbar", "y", "$1-$2", "\r-b");
-    test(regex_338, 338, "(?:(?i)a)b", "ab", "y", "$&", "ab");
-    test(regex_339, 339, "((?i)a)b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_340, 340, "(?:(?i)a)b", "Ab", "y", "$&", "Ab");
-    test(regex_341, 341, "((?i)a)b", "Ab", "y", "$&:$1", "Ab:A");
-    test(regex_342, 342, "(?:(?i)a)b", "aB", "n", "-", "-");
-    test(regex_343, 343, "((?i)a)b", "aB", "n", "-", "-");
-    test(regex_344, 344, "(?i:a)b", "ab", "y", "$&", "ab");
-    test(regex_345, 345, "((?i:a))b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_346, 346, "(?i:a)b", "Ab", "y", "$&", "Ab");
-    test(regex_347, 347, "((?i:a))b", "Ab", "y", "$&:$1", "Ab:A");
-    test(regex_348, 348, "(?i:a)b", "aB", "n", "-", "-");
-    test(regex_349, 349, "((?i:a))b", "aB", "n", "-", "-");
-    test(regex_350, 350, "(?:(?-i)a)b", "ab", "y", "$&", "ab");
-    test(regex_351, 351, "((?-i)a)b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_352, 352, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
-    test(regex_353, 353, "((?-i)a)b", "aB", "y", "$&:$1", "aB:a");
-    test(regex_354, 354, "(?:(?-i)a)b", "Ab", "n", "-", "-");
-    test(regex_355, 355, "((?-i)a)b", "Ab", "n", "-", "-");
-    test(regex_356, 356, "(?:(?-i)a)b", "aB", "y", "$&", "aB");
-    test(regex_357, 357, "((?-i)a)b", "aB", "y", "$1", "a");
-    test(regex_358, 358, "(?:(?-i)a)b", "AB", "n", "-", "-");
-    test(regex_359, 359, "((?-i)a)b", "AB", "n", "-", "-");
-    test(regex_360, 360, "(?-i:a)b", "ab", "y", "$&", "ab");
-    test(regex_361, 361, "((?-i:a))b", "ab", "y", "$&:$1", "ab:a");
-    test(regex_362, 362, "(?-i:a)b", "aB", "y", "$&", "aB");
-    test(regex_363, 363, "((?-i:a))b", "aB", "y", "$&:$1", "aB:a");
-    test(regex_364, 364, "(?-i:a)b", "Ab", "n", "-", "-");
-    test(regex_365, 365, "((?-i:a))b", "Ab", "n", "-", "-");
-    test(regex_366, 366, "(?-i:a)b", "aB", "y", "$&", "aB");
-    test(regex_367, 367, "((?-i:a))b", "aB", "y", "$1", "a");
-    test(regex_368, 368, "(?-i:a)b", "AB", "n", "-", "-");
-    test(regex_369, 369, "((?-i:a))b", "AB", "n", "-", "-");
-    test(regex_370, 370, "((?-i:a.))b", "a\nB", "n", "-", "-");
-    test(regex_371, 371, "((?-i:a\\\\N))b", "a\nB", "n", "-", "-");
-    test(regex_372, 372, "((?s-i:a.))b", "a\nB", "y", "$1", "a\n");
-    test(regex_373, 373, "((?s-i:a\\\\N))b", "a\nB", "n", "-", "-");
-    test(regex_374, 374, "((?s-i:a.))b", "B\nB", "n", "-", "-");
-    test(regex_375, 375, "((?s-i:a\\\\N))b", "B\nB", "n", "-", "-");
-    test(regex_376, 376, "^(?:a?b?)*\\$", "a--", "n", "-", "-");
-    test(regex_377, 377, "((?s)^a(.))((?m)^b\\$)", "a\nb\nc\n", "y", "$1;$2;$3", "a\n;\n;b");
-    test(regex_378, 378, "((?m)^b\\$)", "a\nb\nc\n", "y", "$1", "b");
-    test(regex_379, 379, "(?m)^b", "a\nb\n", "y", "$&", "b");
-    test(regex_380, 380, "(?m)^(b)", "a\nb\n", "y", "$1", "b");
-    test(regex_381, 381, "((?m)^b)", "a\nb\n", "y", "$1", "b");
-    test(regex_382, 382, "\\n((?m)^b)", "a\nb\n", "y", "$1", "b");
-    test(regex_383, 383, "^b", "a\nb\nc\n", "n", "-", "-");
-    test(regex_384, 384, "()^b", "a\nb\nc\n", "n", "-", "-");
-    test(regex_385, 385, "((?m)^b)", "a\nb\nc\n", "y", "$1", "b");
-    test(regex_386, 386, "\\Z", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_387, 387, "\\z", "a\nb\n", "y", "$-[0]", "4");
-    test(regex_388, 388, "\\$", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_389, 389, "\\Z", "b\na\n", "y", "$-[0]", "3");
-    test(regex_390, 390, "\\z", "b\na\n", "y", "$-[0]", "4");
-    test(regex_391, 391, "\\$", "b\na\n", "y", "$-[0]", "3");
-    test(regex_392, 392, "\\Z", "b\na", "y", "$-[0]", "3");
-    test(regex_393, 393, "\\z", "b\na", "y", "$-[0]", "3");
-    test(regex_394, 394, "\\$", "b\na", "y", "$-[0]", "3");
-    test(regex_395, 395, "\\Z", "a\nb\n", "y", "$-[0]", "3");
-    test(regex_396, 396, "\\z", "a\nb\n", "y", "$-[0]", "4");
-    test(regex_397, 397, "\\$", "a\nb\n", "y", "$-[0]", "1");
-    test(regex_398, 398, "\\Z", "b\na\n", "y", "$-[0]", "3");
-    test(regex_399, 399, "\\z", "b\na\n", "y", "$-[0]", "4");
-    test(regex_400, 400, "\\$", "b\na\n", "y", "$-[0]", "1");
-    test(regex_401, 401, "\\Z", "b\na", "y", "$-[0]", "3");
-    test(regex_402, 402, "\\z", "b\na", "y", "$-[0]", "3");
-    test(regex_403, 403, "\\$", "b\na", "y", "$-[0]", "1");
-    test(regex_404, 404, "a\\Z", "a\nb\n", "n", "-", "-");
-    test(regex_405, 405, "a\\z", "a\nb\n", "n", "-", "-");
-    test(regex_406, 406, "a\\$", "a\nb\n", "n", "-", "-");
-    test(regex_407, 407, "a\\Z", "b\na\n", "y", "$-[0]", "2");
-    test(regex_408, 408, "a\\z", "b\na\n", "n", "-", "-");
-    test(regex_409, 409, "a\\$", "b\na\n", "y", "$-[0]", "2");
-    test(regex_410, 410, "a\\Z", "b\na", "y", "$-[0]", "2");
-    test(regex_411, 411, "a\\z", "b\na", "y", "$-[0]", "2");
-    test(regex_412, 412, "a\\$", "b\na", "y", "$-[0]", "2");
-    test(regex_413, 413, "a\\Z", "a\nb\n", "n", "-", "-");
-    test(regex_414, 414, "a\\z", "a\nb\n", "n", "-", "-");
-    test(regex_415, 415, "a\\$", "a\nb\n", "y", "$-[0]", "0");
-    test(regex_416, 416, "a\\Z", "b\na\n", "y", "$-[0]", "2");
-    test(regex_417, 417, "a\\z", "b\na\n", "n", "-", "-");
-    test(regex_418, 418, "a\\$", "b\na\n", "y", "$-[0]", "2");
-    test(regex_419, 419, "a\\Z", "b\na", "y", "$-[0]", "2");
-    test(regex_420, 420, "a\\z", "b\na", "y", "$-[0]", "2");
-    test(regex_421, 421, "a\\$", "b\na", "y", "$-[0]", "2");
-    test(regex_422, 422, "aa\\Z", "aa\nb\n", "n", "-", "-");
-    test(regex_423, 423, "aa\\z", "aa\nb\n", "n", "-", "-");
-    test(regex_424, 424, "aa\\$", "aa\nb\n", "n", "-", "-");
-    test(regex_425, 425, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_426, 426, "aa\\z", "b\naa\n", "n", "-", "-");
-    test(regex_427, 427, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_428, 428, "aa\\Z", "b\naa", "y", "$-[0]", "2");
-    test(regex_429, 429, "aa\\z", "b\naa", "y", "$-[0]", "2");
-    test(regex_430, 430, "aa\\$", "b\naa", "y", "$-[0]", "2");
-    test(regex_431, 431, "aa\\Z", "aa\nb\n", "n", "-", "-");
-    test(regex_432, 432, "aa\\z", "aa\nb\n", "n", "-", "-");
-    test(regex_433, 433, "aa\\$", "aa\nb\n", "y", "$-[0]", "0");
-    test(regex_434, 434, "aa\\Z", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_435, 435, "aa\\z", "b\naa\n", "n", "-", "-");
-    test(regex_436, 436, "aa\\$", "b\naa\n", "y", "$-[0]", "2");
-    test(regex_437, 437, "aa\\Z", "b\naa", "y", "$-[0]", "2");
-    test(regex_438, 438, "aa\\z", "b\naa", "y", "$-[0]", "2");
-    test(regex_439, 439, "aa\\$", "b\naa", "y", "$-[0]", "2");
-    test(regex_440, 440, "aa\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_441, 441, "aa\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_442, 442, "aa\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_443, 443, "aa\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_444, 444, "aa\\z", "b\nac\n", "n", "-", "-");
-    test(regex_445, 445, "aa\\$", "b\nac\n", "n", "-", "-");
-    test(regex_446, 446, "aa\\Z", "b\nac", "n", "-", "-");
-    test(regex_447, 447, "aa\\z", "b\nac", "n", "-", "-");
-    test(regex_448, 448, "aa\\$", "b\nac", "n", "-", "-");
-    test(regex_449, 449, "aa\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_450, 450, "aa\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_451, 451, "aa\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_452, 452, "aa\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_453, 453, "aa\\z", "b\nac\n", "n", "-", "-");
-    test(regex_454, 454, "aa\\$", "b\nac\n", "n", "-", "-");
-    test(regex_455, 455, "aa\\Z", "b\nac", "n", "-", "-");
-    test(regex_456, 456, "aa\\z", "b\nac", "n", "-", "-");
-    test(regex_457, 457, "aa\\$", "b\nac", "n", "-", "-");
-    test(regex_458, 458, "aa\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_459, 459, "aa\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_460, 460, "aa\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_461, 461, "aa\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_462, 462, "aa\\z", "b\nca\n", "n", "-", "-");
-    test(regex_463, 463, "aa\\$", "b\nca\n", "n", "-", "-");
-    test(regex_464, 464, "aa\\Z", "b\nca", "n", "-", "-");
-    test(regex_465, 465, "aa\\z", "b\nca", "n", "-", "-");
-    test(regex_466, 466, "aa\\$", "b\nca", "n", "-", "-");
-    test(regex_467, 467, "aa\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_468, 468, "aa\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_469, 469, "aa\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_470, 470, "aa\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_471, 471, "aa\\z", "b\nca\n", "n", "-", "-");
-    test(regex_472, 472, "aa\\$", "b\nca\n", "n", "-", "-");
-    test(regex_473, 473, "aa\\Z", "b\nca", "n", "-", "-");
-    test(regex_474, 474, "aa\\z", "b\nca", "n", "-", "-");
-    test(regex_475, 475, "aa\\$", "b\nca", "n", "-", "-");
-    test(regex_476, 476, "ab\\Z", "ab\nb\n", "n", "-", "-");
-    test(regex_477, 477, "ab\\z", "ab\nb\n", "n", "-", "-");
-    test(regex_478, 478, "ab\\$", "ab\nb\n", "n", "-", "-");
-    test(regex_479, 479, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_480, 480, "ab\\z", "b\nab\n", "n", "-", "-");
-    test(regex_481, 481, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_482, 482, "ab\\Z", "b\nab", "y", "$-[0]", "2");
-    test(regex_483, 483, "ab\\z", "b\nab", "y", "$-[0]", "2");
-    test(regex_484, 484, "ab\\$", "b\nab", "y", "$-[0]", "2");
-    test(regex_485, 485, "ab\\Z", "ab\nb\n", "n", "-", "-");
-    test(regex_486, 486, "ab\\z", "ab\nb\n", "n", "-", "-");
-    test(regex_487, 487, "ab\\$", "ab\nb\n", "y", "$-[0]", "0");
-    test(regex_488, 488, "ab\\Z", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_489, 489, "ab\\z", "b\nab\n", "n", "-", "-");
-    test(regex_490, 490, "ab\\$", "b\nab\n", "y", "$-[0]", "2");
-    test(regex_491, 491, "ab\\Z", "b\nab", "y", "$-[0]", "2");
-    test(regex_492, 492, "ab\\z", "b\nab", "y", "$-[0]", "2");
-    test(regex_493, 493, "ab\\$", "b\nab", "y", "$-[0]", "2");
-    test(regex_494, 494, "ab\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_495, 495, "ab\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_496, 496, "ab\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_497, 497, "ab\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_498, 498, "ab\\z", "b\nac\n", "n", "-", "-");
-    test(regex_499, 499, "ab\\$", "b\nac\n", "n", "-", "-");
-    test(regex_500, 500, "ab\\Z", "b\nac", "n", "-", "-");
-    test(regex_501, 501, "ab\\z", "b\nac", "n", "-", "-");
-    test(regex_502, 502, "ab\\$", "b\nac", "n", "-", "-");
-    test(regex_503, 503, "ab\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_504, 504, "ab\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_505, 505, "ab\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_506, 506, "ab\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_507, 507, "ab\\z", "b\nac\n", "n", "-", "-");
-    test(regex_508, 508, "ab\\$", "b\nac\n", "n", "-", "-");
-    test(regex_509, 509, "ab\\Z", "b\nac", "n", "-", "-");
-    test(regex_510, 510, "ab\\z", "b\nac", "n", "-", "-");
-    test(regex_511, 511, "ab\\$", "b\nac", "n", "-", "-");
-    test(regex_512, 512, "ab\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_513, 513, "ab\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_514, 514, "ab\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_515, 515, "ab\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_516, 516, "ab\\z", "b\nca\n", "n", "-", "-");
-    test(regex_517, 517, "ab\\$", "b\nca\n", "n", "-", "-");
-    test(regex_518, 518, "ab\\Z", "b\nca", "n", "-", "-");
-    test(regex_519, 519, "ab\\z", "b\nca", "n", "-", "-");
-    test(regex_520, 520, "ab\\$", "b\nca", "n", "-", "-");
-    test(regex_521, 521, "ab\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_522, 522, "ab\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_523, 523, "ab\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_524, 524, "ab\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_525, 525, "ab\\z", "b\nca\n", "n", "-", "-");
-    test(regex_526, 526, "ab\\$", "b\nca\n", "n", "-", "-");
-    test(regex_527, 527, "ab\\Z", "b\nca", "n", "-", "-");
-    test(regex_528, 528, "ab\\z", "b\nca", "n", "-", "-");
-    test(regex_529, 529, "ab\\$", "b\nca", "n", "-", "-");
-    test(regex_530, 530, "abb\\Z", "abb\nb\n", "n", "-", "-");
-    test(regex_531, 531, "abb\\z", "abb\nb\n", "n", "-", "-");
-    test(regex_532, 532, "abb\\$", "abb\nb\n", "n", "-", "-");
-    test(regex_533, 533, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_534, 534, "abb\\z", "b\nabb\n", "n", "-", "-");
-    test(regex_535, 535, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_536, 536, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_537, 537, "abb\\z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_538, 538, "abb\\$", "b\nabb", "y", "$-[0]", "2");
-    test(regex_539, 539, "abb\\Z", "abb\nb\n", "n", "-", "-");
-    test(regex_540, 540, "abb\\z", "abb\nb\n", "n", "-", "-");
-    test(regex_541, 541, "abb\\$", "abb\nb\n", "y", "$-[0]", "0");
-    test(regex_542, 542, "abb\\Z", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_543, 543, "abb\\z", "b\nabb\n", "n", "-", "-");
-    test(regex_544, 544, "abb\\$", "b\nabb\n", "y", "$-[0]", "2");
-    test(regex_545, 545, "abb\\Z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_546, 546, "abb\\z", "b\nabb", "y", "$-[0]", "2");
-    test(regex_547, 547, "abb\\$", "b\nabb", "y", "$-[0]", "2");
-    test(regex_548, 548, "abb\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_549, 549, "abb\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_550, 550, "abb\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_551, 551, "abb\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_552, 552, "abb\\z", "b\nac\n", "n", "-", "-");
-    test(regex_553, 553, "abb\\$", "b\nac\n", "n", "-", "-");
-    test(regex_554, 554, "abb\\Z", "b\nac", "n", "-", "-");
-    test(regex_555, 555, "abb\\z", "b\nac", "n", "-", "-");
-    test(regex_556, 556, "abb\\$", "b\nac", "n", "-", "-");
-    test(regex_557, 557, "abb\\Z", "ac\nb\n", "n", "-", "-");
-    test(regex_558, 558, "abb\\z", "ac\nb\n", "n", "-", "-");
-    test(regex_559, 559, "abb\\$", "ac\nb\n", "n", "-", "-");
-    test(regex_560, 560, "abb\\Z", "b\nac\n", "n", "-", "-");
-    test(regex_561, 561, "abb\\z", "b\nac\n", "n", "-", "-");
-    test(regex_562, 562, "abb\\$", "b\nac\n", "n", "-", "-");
-    test(regex_563, 563, "abb\\Z", "b\nac", "n", "-", "-");
-    test(regex_564, 564, "abb\\z", "b\nac", "n", "-", "-");
-    test(regex_565, 565, "abb\\$", "b\nac", "n", "-", "-");
-    test(regex_566, 566, "abb\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_567, 567, "abb\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_568, 568, "abb\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_569, 569, "abb\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_570, 570, "abb\\z", "b\nca\n", "n", "-", "-");
-    test(regex_571, 571, "abb\\$", "b\nca\n", "n", "-", "-");
-    test(regex_572, 572, "abb\\Z", "b\nca", "n", "-", "-");
-    test(regex_573, 573, "abb\\z", "b\nca", "n", "-", "-");
-    test(regex_574, 574, "abb\\$", "b\nca", "n", "-", "-");
-    test(regex_575, 575, "abb\\Z", "ca\nb\n", "n", "-", "-");
-    test(regex_576, 576, "abb\\z", "ca\nb\n", "n", "-", "-");
-    test(regex_577, 577, "abb\\$", "ca\nb\n", "n", "-", "-");
-    test(regex_578, 578, "abb\\Z", "b\nca\n", "n", "-", "-");
-    test(regex_579, 579, "abb\\z", "b\nca\n", "n", "-", "-");
-    test(regex_580, 580, "abb\\$", "b\nca\n", "n", "-", "-");
-    test(regex_581, 581, "abb\\Z", "b\nca", "n", "-", "-");
-    test(regex_582, 582, "abb\\z", "b\nca", "n", "-", "-");
-    test(regex_583, 583, "abb\\$", "b\nca", "n", "-", "-");
-    test(regex_584, 584, "\\Aa\\$", "a\n\n", "y", "$&", "a");
-    test(regex_585, 585, "(?i:.[b].)", "abd", "y", "$&", "abd");
-    test(regex_586, 586, "(?i:\\\\N[b]\\\\N)", "abd", "y", "$&", "abd");
-    test(regex_587, 587, "\\\\N {1}", "abbbbc", "y", "$&", "a");
-    test(regex_588, 588, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_589, 589, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_590, 590, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_591, 591, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_592, 592, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_593, 593, "a\\\\N c", "abc", "y", "$&", "abc");
-    test(regex_594, 594, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
-    test(regex_595, 595, "a\\\\N *c", "axyzd", "n", "-", "-");
-    test(regex_596, 596, "[a b]", " ", "yS", "$&", " ");
-    test(regex_597, 597, "[a b]", " ", "n", "-", "-");
-    test(regex_598, 598, "[a\\ b]", " ", "y", "$&", " ");
-    test(regex_599, 599, "[ ^ a b ]", "a", "n", "-", "-");
-    test(regex_600, 600, "[ ^ a b ]", "b", "n", "-", "-");
-    test(regex_601, 601, "[ ^ a b ]", "A", "y", "$&", "A");
-    test(regex_602, 602, "(?x:[a b])", " ", "yS", "$&", " ");
-    test(regex_603, 603, "(?xx:[a b])", " ", "n", "-", "-");
-    test(regex_604, 604, "(?x)[a b]", " ", "yS", "$&", " ");
-    test(regex_605, 605, "(?xx)[a b]", " ", "n", "-", "-");
-    test(regex_606, 606, "(?-x:[a b])", " ", "yS", "$&", " ");
-    test(regex_607, 607, "\\\\N {1}", "abbbbc", "y", "$&", "a");
-    test(regex_608, 608, "\\\\N {1}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_609, 609, "\\\\N {1}", "abbbbc", "y", "$+[0]", "1");
-    test(regex_610, 610, "\\\\N {3,4}", "abbbbc", "y", "$&", "abbb");
-    test(regex_611, 611, "\\\\N {3,4}", "abbbbc", "y", "$-[0]", "0");
-    test(regex_612, 612, "\\\\N {3,4}", "abbbbc", "y", "$+[0]", "4");
-    test(regex_613, 613, "a\\\\N c", "abc", "y", "$&", "abc");
-    test(regex_614, 614, "a\\\\N *c", "axyzc", "y", "$&", "axyzc");
-    test(regex_615, 615, "a\\\\N *c", "axyzd", "n", "-", "-");
-    test(regex_616, 616, "[#]", "a#b", "y", "$&", "#");
-    test(regex_617, 617, "[#]b", "a#b", "y", "$&", "#b");
-    test(regex_618, 618, "[#]", "a#b", "y", "$&", "#");
-    test(regex_619, 619, "[#]b", "a#b", "y", "$&", "#b");
-    test(regex_620, 620, "(?'n'foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
-    test(regex_621, 621, "(?'n'foo) \\g{ n }", "..foo foo..", "y", "$1", "foo");
-    test(regex_622, 622, "(?'n'foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_623, 623, "(?foo) \\g{n}", "..foo foo..", "y", "$1", "foo");
-    test(regex_624, 624, "(?foo) \\g{n}", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_625, 625, "(?as) (\\w+) \\g{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_626, 626, "(?'n'foo) \\k", "..foo foo..", "y", "$1", "foo");
-    test(regex_627, 627, "(?'n'foo) \\k", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_628, 628, "(?foo) \\k'n'", "..foo foo..", "y", "$1", "foo");
-    test(regex_629, 629, "(?foo) \\k'n'", "..foo foo..", "yM", "$+{n}", "foo");
-    test(regex_630, 630, "(?'a1'foo) \\k'a1'", "..foo foo..", "yM", "$+{a1}", "foo");
-    test(regex_631, 631, "(?foo) \\k", "..foo foo..", "yM", "$+{a1}", "foo");
-    test(regex_632, 632, "(?'_'foo) \\k'_'", "..foo foo..", "yM", "$+{_}", "foo");
-    test(regex_633, 633, "(?<_>foo) \\k<_>", "..foo foo..", "yM", "$+{_}", "foo");
-    test(regex_634, 634, "(?'_0_'foo) \\k'_0_'", "..foo foo..", "yM", "$+{_0_}", "foo");
-    test(regex_635, 635, "(?<_0_>foo) \\k<_0_>", "..foo foo..", "yM", "$+{_0_}", "foo");
-    test(regex_636, 636, "(?as) (\\w+) \\k (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_637, 637, "(?as) (\\w+) \\k{as} (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_638, 638, "(?as) (\\w+) \\k'as' (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_639, 639, "(?as) (\\w+) \\k{ as } (\\w+)", "as easy as pie", "y", "$1-$2-$3", "as-easy-pie");
-    test(regex_640, 640, "^a(?#xxx){3}c", "aaac", "y", "$&", "aaac");
-    test(regex_641, 641, "^a (?#xxx) (?#yyy) {3}c", "aaac", "y", "$&", "aaac");
-    test(regex_642, 642, "(?|(a))", "a", "y", "$1-$+", "a-a");
-    test(regex_643, 643, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "d!o!da", "y", "$1-$2-$3", "!o!-o-a");
-    test(regex_644, 644, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "aabc", "y", "$1-$2-$3", "a--c");
-    test(regex_645, 645, "(?|a(.)b|d(.(o).)d|i(.)(.)j)(.)", "ixyjp", "y", "$1-$2-$3", "x-y-p");
-    test(regex_646, 646, "(?|(?|(a)|(b))|(?|(c)|(d)))", "a", "y", "$1", "a");
-    test(regex_647, 647, "(?|(?|(a)|(b))|(?|(c)|(d)))", "b", "y", "$1", "b");
-    test(regex_648, 648, "(?|(?|(a)|(b))|(?|(c)|(d)))", "c", "y", "$1", "c");
-    test(regex_649, 649, "(?|(?|(a)|(b))|(?|(c)|(d)))", "d", "y", "$1", "d");
-    test(regex_650, 650, "(.)(?|(.)(.)x|(.)d)(.)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
-    test(regex_651, 651, "(\\\\N)(?|(\\\\N)(\\\\N)x|(\\\\N)d)(\\\\N)", "abcde", "y", "$1-$2-$3-$4-$5-", "b-c--e--");
-    test(regex_652, 652, "(?|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_653, 653, "(?|(?x)|(?y))", "x", "yM", "$+{foo}", "x");
-    test(regex_654, 654, "(?|(?y)|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_655, 655, "(?)(?|(?x))", "x", "yM", "$+{foo}", "x");
-    test(regex_656, 656, "foo\\Kbar", "foobar", "y", "$&", "bar");
-    test(regex_657, 657, "foo\\t\\n\\r\\f\\a\\ebar", "foo\t\n\r\f\a\ebar", "y", "$&", "foo\t\n\r\f\a\ebar");
-    test(regex_658, 658, "(foo)", "foobar", "y", "$&-$1", "foo-");
-    test(regex_659, 659, "(?-n)(foo)(?n)(bar)", "foobar", "y", "$&-$1-$2", "foobar-foo-");
-    test(regex_660, 660, "(?-n:(foo)(?n:(bar)))", "foobar", "y", "$&-$1-$2", "foobar-foo-");
-    test(regex_661, 661, "foo # Match foo", "foobar", "y", "$&", "foo");
-    test(regex_662, 662, "\\x41\\x42", "AB", "y", "$&", "AB");
-    test(regex_663, 663, "\\101\\o{102}", "AB", "y", "$&", "AB");
-    std::cout << std::endl;
-  }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#line 2526 "pure2-regex.cpp2"
-  auto test_perl_tests_lookahead::run() const& -> void{
-    std::cout << "Running perl_tests_lookahead:" << std::endl;
-    test(regex_0, 0, "a(?!b).", "abad", "y", "$&", "ad");
-    test(regex_1, 1, "(?=)a", "a", "y", "$&", "a");
-    test(regex_2, 2, "a(?=d).", "abad", "y", "$&", "ad");
-    test(regex_3, 3, "a(?=c|d).", "abad", "y", "$&", "ad");
-    test(regex_4, 4, "^(?:b|a(?=(.)))*\\1", "abc", "y", "$&", "ab");
-    test(regex_5, 5, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
-    test(regex_6, 6, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
-    test(regex_7, 7, "(?=(a+?))(\\1ab)", "aaab", "y", "$2", "aab");
-    test(regex_8, 8, "^(?=(a+?))\\1ab", "aaab", "n", "-", "-");
-    test(regex_9, 9, "(.*)(?=c)", "abcd", "y", "$1", "ab");
-    test(regex_10, 10, "(.*)(?=c)c", "abcd", "yB", "$1", "ab");
-    test(regex_11, 11, "(.*)(?=b|c)", "abcd", "y", "$1", "ab");
-    test(regex_12, 12, "(.*)(?=b|c)c", "abcd", "y", "$1", "ab");
-    test(regex_13, 13, "(.*)(?=c|b)", "abcd", "y", "$1", "ab");
-    test(regex_14, 14, "(.*)(?=c|b)c", "abcd", "y", "$1", "ab");
-    test(regex_15, 15, "(.*)(?=[bc])", "abcd", "y", "$1", "ab");
-    test(regex_16, 16, "(.*)(?=[bc])c", "abcd", "yB", "$1", "ab");
-    test(regex_17, 17, "(.*?)(?=c)", "abcd", "y", "$1", "ab");
-    test(regex_18, 18, "(.*?)(?=c)c", "abcd", "yB", "$1", "ab");
-    test(regex_19, 19, "(.*?)(?=b|c)", "abcd", "y", "$1", "a");
-    test(regex_20, 20, "(.*?)(?=b|c)c", "abcd", "y", "$1", "ab");
-    test(regex_21, 21, "(.*?)(?=c|b)", "abcd", "y", "$1", "a");
-    test(regex_22, 22, "(.*?)(?=c|b)c", "abcd", "y", "$1", "ab");
-    test(regex_23, 23, "(.*?)(?=[bc])", "abcd", "y", "$1", "a");
-    test(regex_24, 24, "(.*?)(?=[bc])c", "abcd", "yB", "$1", "ab");
-    test(regex_25, 25, "^(a*?)(?!(aa|aaaa)*\\$)(?=a\\z)", "aaaaaaaa", "y", "$1", "aaaaaaa");
-    test(regex_26, 26, "a(?!b(?!c))(..)", "abababc", "y", "$1", "bc");
-    test(regex_27, 27, "a(?!b(?=a))(..)", "abababc", "y", "$1", "bc");
-    test(regex_28, 28, "X(\\w+)(?=\\s)|X(\\w+)", "Xab", "y", "[$1-$2]", "[-ab]");
-    test(regex_29, 29, "^a*(?=b)b", "ab", "y", "$&", "ab");
-    test(regex_30, 30, "(?!\\A)x", "a\nxb\n", "y", "-", "-");
-    test(regex_31, 31, "^(o)(?!.*\\1)", "Oo", "n", "-", "-");
-    test(regex_32, 32, ".*a(?!(b|cd)*e).*f", "......abef", "n", "-", "-");
-    test(regex_33, 33, "^(a*?)(?!(aa|aaaa)*\\$)", "aaaaaaaaaaaaaaaaaaaa", "y", "$1", "a");
-    test(regex_34, 34, "(?!)+?|(.{2,4})", "abcde", "y", "$1", "abcd");
-    test(regex_35, 35, "^(a*?)(?!(a{6}|a{5})*\\$)", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", "$+[1]", "12");
-    test(regex_36, 36, "a(?!b(?!c(?!d(?!e))))...(.)", "abxabcdxabcde", "y", "$1", "e");
-    test(regex_37, 37, "X(?!b+(?!(c+)*(?!(c+)*d))).*X", "aXbbbbbbbcccccccccccccaaaX", "y", "-", "-");
-    test(regex_38, 38, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1", "\n");
-    test(regex_39, 39, "((?s).)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "\n:\nc");
-    test(regex_40, 40, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1", "b\n");
-    test(regex_41, 41, "((?s)b.)c(?!.)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_42, 42, "((?s)b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_43, 43, "(b.)c(?!\\\\N)", "a\nb\nc\n", "y", "$1:$&", "b\n:b\nc");
-    test(regex_44, 44, "a*(?!)", "aaaab", "n", "-", "-");
-    std::cout << std::endl;
-  }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#line 2576 "pure2-regex.cpp2"
-auto main() -> int{
-    CPP2_UFCS(run)(test_perl_tests_general());
-    CPP2_UFCS(run)(test_perl_tests_lookahead());
-}
-
diff --git a/regression-tests/test-results/pure2-regex.cpp2.output b/regression-tests/test-results/pure2-regex.cpp2.output
deleted file mode 100644
index ed8201eed4..0000000000
--- a/regression-tests/test-results/pure2-regex.cpp2.output
+++ /dev/null
@@ -1,2 +0,0 @@
-pure2-regex.cpp2... ok (all Cpp2, passes safety checks)
-
diff --git a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp
new file mode 100644
index 0000000000..1accd85a88
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp
@@ -0,0 +1,1141 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_01_char_matcher.cpp2"
+
+#line 153 "pure2-regex_01_char_matcher.cpp2"
+class test_tests_01_char_matcher;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_01_char_matcher.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_01_char_matcher.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_01_char_matcher.cpp2"
+class test_tests_01_char_matcher {
+
+#line 166 "pure2-regex_01_char_matcher.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; 
+  public: test_tests_01_char_matcher() = default;
+  public: test_tests_01_char_matcher(test_tests_01_char_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_01_char_matcher const&) -> void = delete;
+
+
+#line 182 "pure2-regex_01_char_matcher.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_01_char_matcher.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_01_char_matcher.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_01_char_matcher.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 166 "pure2-regex_01_char_matcher.cpp2"
+  auto test_tests_01_char_matcher::run() const& -> void{
+    std::cout << "Running tests_01_char_matcher:" << std::endl;
+    test(regex_01, "01", R"(abc)", "abc", "y", R"($&)", "abc");
+    test(regex_02, "02", R"(abc)", "abc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(abc)", "abc", "y", R"($+[0])", "3");
+    test(regex_04, "04", R"(abc)", "xbc", "n", R"(-)", "-");
+    test(regex_05, "05", R"(abc)", "axc", "n", R"(-)", "-");
+    test(regex_06, "06", R"(abc)", "abx", "n", R"(-)", "-");
+    test(regex_07, "07", R"(abc)", "xabcy", "y", R"($&)", "abc");
+    test(regex_08, "08", R"(abc)", "xabcy", "y", R"($-[0])", "1");
+    test(regex_09, "09", R"(abc)", "xabcy", "y", R"($+[0])", "4");
+    test(regex_10, "10", R"(abc)", "ababc", "y", R"($&)", "abc");
+    test(regex_11, "11", R"(abc)", "ababc", "y", R"($-[0])", "2");
+    test(regex_12, "12", R"(abc)", "ababc", "y", R"($+[0])", "5");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_01_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_02_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_03_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_04_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_05_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_06_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_07_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_08_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_09_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_10_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_11_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_01_char_matcher::regex_12_matcher::to_string() -> std::string{return R"(abc)"; }
+
+
+#line 183 "pure2-regex_01_char_matcher.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_01_char_matcher());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp2.output b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp2.output
new file mode 100644
index 0000000000..70fcbf8671
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_01_char_matcher.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_02_ranges.cpp b/regression-tests/test-results/pure2-regex_02_ranges.cpp
new file mode 100644
index 0000000000..3108a74564
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_02_ranges.cpp
@@ -0,0 +1,6285 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_02_ranges.cpp2"
+
+#line 153 "pure2-regex_02_ranges.cpp2"
+class test_tests_02_ranges;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_02_ranges.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_02_ranges.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_02_ranges.cpp2"
+class test_tests_02_ranges {
+
+#line 194 "pure2-regex_02_ranges.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_25_matcher() = default;
+        public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_25_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_26_matcher() = default;
+        public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_26_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_27_matcher() = default;
+        public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_27_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_28_matcher() = default;
+        public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_28_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_29_matcher() = default;
+        public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_29_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_30_matcher() = default;
+        public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_30_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_31_matcher() = default;
+        public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_31_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_32_matcher() = default;
+        public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_32_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_33_matcher() = default;
+        public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_33_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_34_matcher() = default;
+        public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_34_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_35_matcher() = default;
+        public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_35_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_36_matcher() = default;
+        public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_36_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_37_matcher() = default;
+        public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_37_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_38_matcher() = default;
+        public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_38_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_39_matcher() = default;
+        public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_39_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_40_matcher() = default;
+        public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_40_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_40 {}; 
+  public: test_tests_02_ranges() = default;
+  public: test_tests_02_ranges(test_tests_02_ranges const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_02_ranges const&) -> void = delete;
+
+
+#line 238 "pure2-regex_02_ranges.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_02_ranges.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_02_ranges.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_02_ranges.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 194 "pure2-regex_02_ranges.cpp2"
+  auto test_tests_02_ranges::run() const& -> void{
+    std::cout << "Running tests_02_ranges:" << std::endl;
+    test(regex_01, "01", R"(ab*c)", "abc", "y", R"($&)", "abc");
+    test(regex_02, "02", R"(ab*c)", "abc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(ab*c)", "abc", "y", R"($+[0])", "3");
+    test(regex_04, "04", R"(ab*bc)", "abc", "y", R"($&)", "abc");
+    test(regex_05, "05", R"(ab*bc)", "abc", "y", R"($-[0])", "0");
+    test(regex_06, "06", R"(ab*bc)", "abc", "y", R"($+[0])", "3");
+    test(regex_07, "07", R"(ab*bc)", "abbc", "y", R"($&)", "abbc");
+    test(regex_08, "08", R"(ab*bc)", "abbc", "y", R"($-[0])", "0");
+    test(regex_09, "09", R"(ab*bc)", "abbc", "y", R"($+[0])", "4");
+    test(regex_10, "10", R"(ab*bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_11, "11", R"(ab*bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_12, "12", R"(ab*bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_13, "13", R"(ab{0,}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_14, "14", R"(ab{0,}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_15, "15", R"(ab{0,}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_16, "16", R"(ab+bc)", "abbc", "y", R"($&)", "abbc");
+    test(regex_17, "17", R"(ab+bc)", "abbc", "y", R"($-[0])", "0");
+    test(regex_18, "18", R"(ab+bc)", "abbc", "y", R"($+[0])", "4");
+    test(regex_19, "19", R"(ab+bc)", "abc", "n", R"(-)", "-");
+    test(regex_20, "20", R"(ab+bc)", "abq", "n", R"(-)", "-");
+    test(regex_21, "21", R"(ab{1,}bc)", "abq", "n", R"(-)", "-");
+    test(regex_22, "22", R"(ab+bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_23, "23", R"(ab+bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_24, "24", R"(ab+bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_25, "25", R"(ab{1,}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_26, "26", R"(ab{1,}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_27, "27", R"(ab{1,}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_28, "28", R"(ab{1,3}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_29, "29", R"(ab{1,3}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_30, "30", R"(ab{1,3}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_31, "31", R"(ab{3,4}bc)", "abbbbc", "y", R"($&)", "abbbbc");
+    test(regex_32, "32", R"(ab{3,4}bc)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_33, "33", R"(ab{3,4}bc)", "abbbbc", "y", R"($+[0])", "6");
+    test(regex_34, "34", R"(ab{4,5}bc)", "abbbbc", "n", R"(-)", "-");
+    test(regex_35, "35", R"(ab?bc)", "abbc", "y", R"($&)", "abbc");
+    test(regex_36, "36", R"(ab?bc)", "abc", "y", R"($&)", "abc");
+    test(regex_37, "37", R"(ab{0,1}bc)", "abc", "y", R"($&)", "abc");
+    test(regex_38, "38", R"(ab?bc)", "abbbbc", "n", R"(-)", "-");
+    test(regex_39, "39", R"(ab?c)", "abc", "y", R"($&)", "abc");
+    test(regex_40, "40", R"(ab{0,1}c)", "abc", "y", R"($&)", "abc");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_01_matcher::to_string() -> std::string{return R"(ab*c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_02_matcher::to_string() -> std::string{return R"(ab*c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_03_matcher::to_string() -> std::string{return R"(ab*c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_04_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_05_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_06_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_07_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_08_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_09_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_10_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_11_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_12_matcher::to_string() -> std::string{return R"(ab*bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_13_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_14_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_15_matcher::to_string() -> std::string{return R"(ab{0,}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_16_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_17_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_18_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_19_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_20_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_21_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_22_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_23_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_24_matcher::to_string() -> std::string{return R"(ab+bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_25_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_26_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_27_matcher::to_string() -> std::string{return R"(ab{1,}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_28_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_29_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_30_matcher::to_string() -> std::string{return R"(ab{1,3}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_31_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_32_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_33_matcher::to_string() -> std::string{return R"(ab{3,4}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_34_matcher::to_string() -> std::string{return R"(ab{4,5}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_35_matcher::to_string() -> std::string{return R"(ab?bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_36_matcher::to_string() -> std::string{return R"(ab?bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_37_matcher::to_string() -> std::string{return R"(ab{0,1}bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_38_matcher::to_string() -> std::string{return R"(ab?bc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_39_matcher::to_string() -> std::string{return R"(ab?c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_02_ranges::regex_40_matcher::to_string() -> std::string{return R"(ab{0,1}c)"; }
+
+
+#line 239 "pure2-regex_02_ranges.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_02_ranges());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_02_ranges.cpp2.output b/regression-tests/test-results/pure2-regex_02_ranges.cpp2.output
new file mode 100644
index 0000000000..b69863f7e3
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_02_ranges.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_02_ranges.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_03_wildcard.cpp b/regression-tests/test-results/pure2-regex_03_wildcard.cpp
new file mode 100644
index 0000000000..05fdb90ddb
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_03_wildcard.cpp
@@ -0,0 +1,2483 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_03_wildcard.cpp2"
+
+#line 153 "pure2-regex_03_wildcard.cpp2"
+class test_tests_03_wildcard;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_03_wildcard.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_03_wildcard.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_03_wildcard.cpp2"
+class test_tests_03_wildcard {
+
+#line 174 "pure2-regex_03_wildcard.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; 
+  public: test_tests_03_wildcard() = default;
+  public: test_tests_03_wildcard(test_tests_03_wildcard const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_03_wildcard const&) -> void = delete;
+
+
+#line 198 "pure2-regex_03_wildcard.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_03_wildcard.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_03_wildcard.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_03_wildcard.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 174 "pure2-regex_03_wildcard.cpp2"
+  auto test_tests_03_wildcard::run() const& -> void{
+    std::cout << "Running tests_03_wildcard:" << std::endl;
+    test(regex_01, "01", R"(.{1})", "abbbbc", "y", R"($&)", "a");
+    test(regex_02, "02", R"(.{1})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(.{1})", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_04, "04", R"(.{3,4})", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_05, "05", R"(.{3,4})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_06, "06", R"(.{3,4})", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_07, "07", R"(\N{1})", "abbbbc", "y", R"($&)", "a");
+    test(regex_08, "08", R"(\N{1})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_09, "09", R"(\N{1})", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_10, "10", R"(\N{3,4})", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_11, "11", R"(\N{3,4})", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_12, "12", R"(\N{3,4})", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_13, "13", R"(\N{ 3 , 4 })", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_14, "14", R"(a.c)", "abc", "y", R"($&)", "abc");
+    test(regex_15, "15", R"(a.c)", "axc", "y", R"($&)", "axc");
+    test(regex_16, "16", R"(a\Nc)", "abc", "y", R"($&)", "abc");
+    test(regex_17, "17", R"(a.*c)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_18, "18", R"(a\N*c)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_19, "19", R"(a.*c)", "axyzd", "n", R"(-)", "-");
+    test(regex_20, "20", R"(a\N*c)", "axyzd", "n", R"(-)", "-");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_01_matcher::to_string() -> std::string{return R"(.{1})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_02_matcher::to_string() -> std::string{return R"(.{1})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_03_matcher::to_string() -> std::string{return R"(.{1})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_04_matcher::to_string() -> std::string{return R"(.{3,4})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_05_matcher::to_string() -> std::string{return R"(.{3,4})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_06_matcher::to_string() -> std::string{return R"(.{3,4})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_07_matcher::to_string() -> std::string{return R"(\N{1})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_08_matcher::to_string() -> std::string{return R"(\N{1})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_09_matcher::to_string() -> std::string{return R"(\N{1})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_10_matcher::to_string() -> std::string{return R"(\N{3,4})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_11_matcher::to_string() -> std::string{return R"(\N{3,4})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_12_matcher::to_string() -> std::string{return R"(\N{3,4})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_13_matcher::to_string() -> std::string{return R"(\N{3,4})"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_14_matcher::to_string() -> std::string{return R"(a.c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_15_matcher::to_string() -> std::string{return R"(a.c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_16_matcher::to_string() -> std::string{return R"(a\Nc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_17_matcher::to_string() -> std::string{return R"(a.*c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_18_matcher::to_string() -> std::string{return R"(a\N*c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_19_matcher::to_string() -> std::string{return R"(a.*c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_03_wildcard::regex_20_matcher::to_string() -> std::string{return R"(a\N*c)"; }
+
+
+#line 199 "pure2-regex_03_wildcard.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_03_wildcard());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_03_wildcard.cpp2.output b/regression-tests/test-results/pure2-regex_03_wildcard.cpp2.output
new file mode 100644
index 0000000000..198e65816c
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_03_wildcard.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_03_wildcard.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_04_start_end.cpp b/regression-tests/test-results/pure2-regex_04_start_end.cpp
new file mode 100644
index 0000000000..4ea61817a0
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_04_start_end.cpp
@@ -0,0 +1,891 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_04_start_end.cpp2"
+
+#line 153 "pure2-regex_04_start_end.cpp2"
+class test_tests_04_start_end;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_04_start_end.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_04_start_end.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_04_start_end.cpp2"
+class test_tests_04_start_end {
+
+#line 163 "pure2-regex_04_start_end.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; 
+  public: test_tests_04_start_end() = default;
+  public: test_tests_04_start_end(test_tests_04_start_end const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_04_start_end const&) -> void = delete;
+
+
+#line 176 "pure2-regex_04_start_end.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_04_start_end.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_04_start_end.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_04_start_end.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 163 "pure2-regex_04_start_end.cpp2"
+  auto test_tests_04_start_end::run() const& -> void{
+    std::cout << "Running tests_04_start_end:" << std::endl;
+    test(regex_01, "01", R"(^abc$)", "abc", "y", R"($&)", "abc");
+    test(regex_02, "02", R"(^abc$)", "abcc", "n", R"(-)", "-");
+    test(regex_03, "03", R"(^abc)", "abcc", "y", R"($&)", "abc");
+    test(regex_04, "04", R"(^abc$)", "aabc", "n", R"(-)", "-");
+    test(regex_05, "05", R"(abc$)", "aabc", "y", R"($&)", "abc");
+    test(regex_06, "06", R"(abc$)", "aabcd", "n", R"(-)", "-");
+    test(regex_07, "07", R"(^)", "abc", "y", R"($&)", "");
+    test(regex_08, "08", R"($)", "abc", "y", R"($&)", "");
+    test(regex_09, "09", R"($b)", "b", "n", R"(-)", "-");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_01_matcher::to_string() -> std::string{return R"(^abc$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_02_matcher::to_string() -> std::string{return R"(^abc$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_03_matcher::to_string() -> std::string{return R"(^abc)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_04_matcher::to_string() -> std::string{return R"(^abc$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_05_matcher::to_string() -> std::string{return R"(abc$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abc"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_06_matcher::to_string() -> std::string{return R"(abc$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_07_matcher::to_string() -> std::string{return R"(^)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_08_matcher::to_string() -> std::string{return R"($)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_04_start_end::regex_09_matcher::to_string() -> std::string{return R"($b)"; }
+
+
+#line 177 "pure2-regex_04_start_end.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_04_start_end());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_04_start_end.cpp2.output b/regression-tests/test-results/pure2-regex_04_start_end.cpp2.output
new file mode 100644
index 0000000000..56a887248a
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_04_start_end.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_04_start_end.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_05_classes.cpp b/regression-tests/test-results/pure2-regex_05_classes.cpp
new file mode 100644
index 0000000000..8d1ce48df7
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_05_classes.cpp
@@ -0,0 +1,1837 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_05_classes.cpp2"
+
+#line 153 "pure2-regex_05_classes.cpp2"
+class test_tests_05_classes;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_05_classes.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_05_classes.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_05_classes.cpp2"
+class test_tests_05_classes {
+
+#line 173 "pure2-regex_05_classes.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; 
+  public: test_tests_05_classes() = default;
+  public: test_tests_05_classes(test_tests_05_classes const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_05_classes const&) -> void = delete;
+
+
+#line 196 "pure2-regex_05_classes.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_05_classes.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_05_classes.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_05_classes.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 173 "pure2-regex_05_classes.cpp2"
+  auto test_tests_05_classes::run() const& -> void{
+    std::cout << "Running tests_05_classes:" << std::endl;
+    test(regex_01, "01", R"(a[bc]d)", "abc", "n", R"(-)", "-");
+    test(regex_02, "02", R"(a[bc]d)", "abd", "y", R"($&)", "abd");
+    test(regex_03, "03", R"(a[b]d)", "abd", "y", R"($&)", "abd");
+    test(regex_04, "04", R"([a][b][d])", "abd", "y", R"($&)", "abd");
+    test(regex_05, "05", R"(.[b].)", "abd", "y", R"($&)", "abd");
+    test(regex_06, "06", R"(.[b].)", "aBd", "n", R"(-)", "-");
+    test(regex_07, "07", R"(a[b-d]e)", "abd", "n", R"(-)", "-");
+    test(regex_08, "08", R"(a[b-d]e)", "ace", "y", R"($&)", "ace");
+    test(regex_09, "09", R"(a[b-d])", "aac", "y", R"($&)", "ac");
+    test(regex_10, "10", R"(a[-b])", "a-", "y", R"($&)", "a-");
+    test(regex_11, "11", R"(a[b-])", "a-", "y", R"($&)", "a-");
+    test(regex_12, "12", R"(a])", "a]", "y", R"($&)", "a]");
+    test(regex_13, "13", R"(a[]]b)", "a]b", "y", R"($&)", "a]b");
+    test(regex_14, "14", R"(a[^bc]d)", "aed", "y", R"($&)", "aed");
+    test(regex_15, "15", R"(a[^bc]d)", "abd", "n", R"(-)", "-");
+    test(regex_16, "16", R"(a[^-b]c)", "adc", "y", R"($&)", "adc");
+    test(regex_17, "17", R"(a[^-b]c)", "a-c", "n", R"(-)", "-");
+    test(regex_18, "18", R"(a[^]b]c)", "a]c", "n", R"(-)", "-");
+    test(regex_19, "19", R"(a[^]b]c)", "adc", "y", R"($&)", "adc");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_01_matcher::to_string() -> std::string{return R"(a[bc]d)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_02_matcher::to_string() -> std::string{return R"(a[bc]d)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_03_matcher::to_string() -> std::string{return R"(a[b]d)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_04_matcher::to_string() -> std::string{return R"([a][b][d])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_05_matcher::to_string() -> std::string{return R"(.[b].)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_06_matcher::to_string() -> std::string{return R"(.[b].)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"e"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_07_matcher::to_string() -> std::string{return R"(a[b-d]e)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"e"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_08_matcher::to_string() -> std::string{return R"(a[b-d]e)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_09_matcher::to_string() -> std::string{return R"(a[b-d])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_10_matcher::to_string() -> std::string{return R"(a[-b])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_11_matcher::to_string() -> std::string{return R"(a[b-])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a]"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_12_matcher::to_string() -> std::string{return R"(a])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_13_matcher::to_string() -> std::string{return R"(a[]]b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_14_matcher::to_string() -> std::string{return R"(a[^bc]d)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_15_matcher::to_string() -> std::string{return R"(a[^bc]d)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_16_matcher::to_string() -> std::string{return R"(a[^-b]c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_17_matcher::to_string() -> std::string{return R"(a[^-b]c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_18_matcher::to_string() -> std::string{return R"(a[^]b]c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_05_classes::regex_19_matcher::to_string() -> std::string{return R"(a[^]b]c)"; }
+
+
+#line 197 "pure2-regex_05_classes.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_05_classes());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_05_classes.cpp2.output b/regression-tests/test-results/pure2-regex_05_classes.cpp2.output
new file mode 100644
index 0000000000..acd844b5e4
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_05_classes.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_05_classes.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_06_boundaries.cpp b/regression-tests/test-results/pure2-regex_06_boundaries.cpp
new file mode 100644
index 0000000000..9d865baed7
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_06_boundaries.cpp
@@ -0,0 +1,1535 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_06_boundaries.cpp2"
+
+#line 153 "pure2-regex_06_boundaries.cpp2"
+class test_tests_06_boundaries;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_06_boundaries.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_06_boundaries.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_06_boundaries.cpp2"
+class test_tests_06_boundaries {
+
+#line 171 "pure2-regex_06_boundaries.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; 
+  public: test_tests_06_boundaries() = default;
+  public: test_tests_06_boundaries(test_tests_06_boundaries const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_06_boundaries const&) -> void = delete;
+
+
+#line 192 "pure2-regex_06_boundaries.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_06_boundaries.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_06_boundaries.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_06_boundaries.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 171 "pure2-regex_06_boundaries.cpp2"
+  auto test_tests_06_boundaries::run() const& -> void{
+    std::cout << "Running tests_06_boundaries:" << std::endl;
+    test(regex_01, "01", R"(\ba\b)", "a-", "y", R"(-)", "-");
+    test(regex_02, "02", R"(\ba\b)", "-a", "y", R"(-)", "-");
+    test(regex_03, "03", R"(\ba\b)", "-a-", "y", R"(-)", "-");
+    test(regex_04, "04", R"(\by\b)", "xy", "n", R"(-)", "-");
+    test(regex_05, "05", R"(\by\b)", "yz", "n", R"(-)", "-");
+    test(regex_06, "06", R"(\by\b)", "xyz", "n", R"(-)", "-");
+    test(regex_07, "07", R"(\Ba\B)", "a-", "n", R"(-)", "-");
+    test(regex_08, "08", R"(\Ba\B)", "-a", "n", R"(-)", "-");
+    test(regex_09, "09", R"(\Ba\B)", "-a-", "n", R"(-)", "-");
+    test(regex_10, "10", R"(\By\b)", "xy", "y", R"(-)", "-");
+    test(regex_11, "11", R"(\By\b)", "xy", "y", R"($-[0])", "1");
+    test(regex_12, "12", R"(\By\b)", "xy", "y", R"($+[0])", "2");
+    test(regex_13, "13", R"(\By\b)", "xy", "y", R"(-)", "-");
+    test(regex_14, "14", R"(\by\B)", "yz", "y", R"(-)", "-");
+    test(regex_15, "15", R"(\By\B)", "xyz", "y", R"(-)", "-");
+    test(regex_16, "16", R"(\b)", "", "n", R"(-)", "-");
+    test(regex_17, "17", R"(\B)", "", "y", R"(-)", "-");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_01_matcher::to_string() -> std::string{return R"(\ba\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_02_matcher::to_string() -> std::string{return R"(\ba\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_03_matcher::to_string() -> std::string{return R"(\ba\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_04_matcher::to_string() -> std::string{return R"(\by\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_05_matcher::to_string() -> std::string{return R"(\by\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_06_matcher::to_string() -> std::string{return R"(\by\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_07_matcher::to_string() -> std::string{return R"(\Ba\B)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_08_matcher::to_string() -> std::string{return R"(\Ba\B)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_09_matcher::to_string() -> std::string{return R"(\Ba\B)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_10_matcher::to_string() -> std::string{return R"(\By\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_11_matcher::to_string() -> std::string{return R"(\By\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_12_matcher::to_string() -> std::string{return R"(\By\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_13_matcher::to_string() -> std::string{return R"(\By\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_14_matcher::to_string() -> std::string{return R"(\by\B)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_15_matcher::to_string() -> std::string{return R"(\By\B)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_16_matcher::to_string() -> std::string{return R"(\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::word_boundary_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_06_boundaries::regex_17_matcher::to_string() -> std::string{return R"(\B)"; }
+
+
+#line 193 "pure2-regex_06_boundaries.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_06_boundaries());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_06_boundaries.cpp2.output b/regression-tests/test-results/pure2-regex_06_boundaries.cpp2.output
new file mode 100644
index 0000000000..ae9e61c9a4
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_06_boundaries.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_06_boundaries.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_07_short_classes.cpp b/regression-tests/test-results/pure2-regex_07_short_classes.cpp
new file mode 100644
index 0000000000..b16d2d53a3
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_07_short_classes.cpp
@@ -0,0 +1,1989 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_07_short_classes.cpp2"
+
+#line 153 "pure2-regex_07_short_classes.cpp2"
+class test_tests_07_short_classes;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_07_short_classes.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_07_short_classes.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_07_short_classes.cpp2"
+class test_tests_07_short_classes {
+
+#line 178 "pure2-regex_07_short_classes.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; 
+  public: test_tests_07_short_classes() = default;
+  public: test_tests_07_short_classes(test_tests_07_short_classes const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_07_short_classes const&) -> void = delete;
+
+
+#line 206 "pure2-regex_07_short_classes.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_07_short_classes.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_07_short_classes.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_07_short_classes.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 178 "pure2-regex_07_short_classes.cpp2"
+  auto test_tests_07_short_classes::run() const& -> void{
+    std::cout << "Running tests_07_short_classes:" << std::endl;
+    test(regex_01, "01", R"(\w)", "a", "y", R"(-)", "-");
+    test(regex_02, "02", R"(\w)", "-", "n", R"(-)", "-");
+    test(regex_03, "03", R"(\W)", "a", "n", R"(-)", "-");
+    test(regex_04, "04", R"(\W)", "-", "y", R"(-)", "-");
+    test(regex_05, "05", R"(a\sb)", "a b", "y", R"(-)", "-");
+    test(regex_06, "06", R"(a\sb)", "a-b", "n", R"(-)", "-");
+    test(regex_07, "07", R"(a\Sb)", "a b", "n", R"(-)", "-");
+    test(regex_08, "08", R"(a\Sb)", "a-b", "y", R"(-)", "-");
+    test(regex_09, "09", R"(\d)", "1", "y", R"(-)", "-");
+    test(regex_10, "10", R"(\d)", "-", "n", R"(-)", "-");
+    test(regex_11, "11", R"(\D)", "1", "n", R"(-)", "-");
+    test(regex_12, "12", R"(\D)", "-", "y", R"(-)", "-");
+    test(regex_13, "13", R"([\w])", "a", "y", R"(-)", "-");
+    test(regex_14, "14", R"([\w])", "-", "n", R"(-)", "-");
+    test(regex_15, "15", R"([\W])", "a", "n", R"(-)", "-");
+    test(regex_16, "16", R"([\W])", "-", "y", R"(-)", "-");
+    test(regex_17, "17", R"(a[\s]b)", "a b", "y", R"(-)", "-");
+    test(regex_18, "18", R"(a[\s]b)", "a-b", "n", R"(-)", "-");
+    test(regex_19, "19", R"(a[\S]b)", "a b", "n", R"(-)", "-");
+    test(regex_20, "20", R"(a[\S]b)", "a-b", "y", R"(-)", "-");
+    test(regex_21, "21", R"([\d])", "1", "y", R"(-)", "-");
+    test(regex_22, "22", R"([\d])", "-", "n", R"(-)", "-");
+    test(regex_23, "23", R"([\D])", "1", "n", R"(-)", "-");
+    test(regex_24, "24", R"([\D])", "-", "y", R"(-)", "-");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_01_matcher::to_string() -> std::string{return R"(\w)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_02_matcher::to_string() -> std::string{return R"(\w)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_not_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_03_matcher::to_string() -> std::string{return R"(\W)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_not_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_04_matcher::to_string() -> std::string{return R"(\W)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_space::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_05_matcher::to_string() -> std::string{return R"(a\sb)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_space::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_06_matcher::to_string() -> std::string{return R"(a\sb)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_not_space::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_07_matcher::to_string() -> std::string{return R"(a\Sb)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_not_space::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_08_matcher::to_string() -> std::string{return R"(a\Sb)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_digits::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_09_matcher::to_string() -> std::string{return R"(\d)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_digits::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_10_matcher::to_string() -> std::string{return R"(\d)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_not_digits::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_11_matcher::to_string() -> std::string{return R"(\D)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_not_digits::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_12_matcher::to_string() -> std::string{return R"(\D)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_13_matcher::to_string() -> std::string{return R"([\w])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_14_matcher::to_string() -> std::string{return R"([\w])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_15_matcher::to_string() -> std::string{return R"([\W])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_16_matcher::to_string() -> std::string{return R"([\W])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_17_matcher::to_string() -> std::string{return R"(a[\s]b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_18_matcher::to_string() -> std::string{return R"(a[\s]b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_19_matcher::to_string() -> std::string{return R"(a[\S]b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_20_matcher::to_string() -> std::string{return R"(a[\S]b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_21_matcher::to_string() -> std::string{return R"([\d])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_22_matcher::to_string() -> std::string{return R"([\d])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_23_matcher::to_string() -> std::string{return R"([\D])"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_07_short_classes::regex_24_matcher::to_string() -> std::string{return R"([\D])"; }
+
+
+#line 207 "pure2-regex_07_short_classes.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_07_short_classes());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_07_short_classes.cpp2.output b/regression-tests/test-results/pure2-regex_07_short_classes.cpp2.output
new file mode 100644
index 0000000000..c36206ae41
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_07_short_classes.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_07_short_classes.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_08_alternatives.cpp b/regression-tests/test-results/pure2-regex_08_alternatives.cpp
new file mode 100644
index 0000000000..751b45b8b8
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_08_alternatives.cpp
@@ -0,0 +1,527 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_08_alternatives.cpp2"
+
+#line 153 "pure2-regex_08_alternatives.cpp2"
+class test_tests_08_alternatives;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_08_alternatives.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_08_alternatives.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_08_alternatives.cpp2"
+class test_tests_08_alternatives {
+
+#line 156 "pure2-regex_08_alternatives.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; 
+  public: test_tests_08_alternatives() = default;
+  public: test_tests_08_alternatives(test_tests_08_alternatives const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_08_alternatives const&) -> void = delete;
+
+
+#line 162 "pure2-regex_08_alternatives.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_08_alternatives.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_08_alternatives.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_08_alternatives.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 156 "pure2-regex_08_alternatives.cpp2"
+  auto test_tests_08_alternatives::run() const& -> void{
+    std::cout << "Running tests_08_alternatives:" << std::endl;
+    test(regex_01, "01", R"(ab|cd)", "abc", "y", R"($&)", "ab");
+    test(regex_02, "02", R"(ab|cd)", "abcd", "y", R"($&)", "ab");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"cd"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_08_alternatives::regex_01_matcher::to_string() -> std::string{return R"(ab|cd)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"cd"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_08_alternatives::regex_02_matcher::to_string() -> std::string{return R"(ab|cd)"; }
+
+
+#line 163 "pure2-regex_08_alternatives.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_08_alternatives());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_08_alternatives.cpp2.output b/regression-tests/test-results/pure2-regex_08_alternatives.cpp2.output
new file mode 100644
index 0000000000..30ab664bd4
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_08_alternatives.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_08_alternatives.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_09_groups.cpp b/regression-tests/test-results/pure2-regex_09_groups.cpp
new file mode 100644
index 0000000000..6a15e9d400
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_09_groups.cpp
@@ -0,0 +1,1368 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_09_groups.cpp2"
+
+#line 153 "pure2-regex_09_groups.cpp2"
+class test_tests_09_groups;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_09_groups.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_09_groups.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_09_groups.cpp2"
+class test_tests_09_groups {
+
+#line 165 "pure2-regex_09_groups.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; 
+  public: test_tests_09_groups() = default;
+  public: test_tests_09_groups(test_tests_09_groups const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_09_groups const&) -> void = delete;
+
+
+#line 180 "pure2-regex_09_groups.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_09_groups.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_09_groups.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_09_groups.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 165 "pure2-regex_09_groups.cpp2"
+  auto test_tests_09_groups::run() const& -> void{
+    std::cout << "Running tests_09_groups:" << std::endl;
+    test(regex_01, "01", R"(()ef)", "def", "y", R"($&-$1)", "ef-");
+    test(regex_02, "02", R"(()ef)", "def", "y", R"($-[0])", "1");
+    test(regex_03, "03", R"(()ef)", "def", "y", R"($+[0])", "3");
+    test(regex_04, "04", R"(()ef)", "def", "y", R"($-[1])", "1");
+    test(regex_05, "05", R"(()ef)", "def", "y", R"($+[1])", "1");
+    test(regex_06, "06", R"(((a)))", "abc", "y", R"($&-$1-$2)", "a-a-a");
+    test(regex_07, "07", R"(((a)))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-0");
+    test(regex_08, "08", R"(((a)))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "1-1-1");
+    test(regex_09, "09", R"((a)b(c))", "abc", "y", R"($&-$1-$2)", "abc-a-c");
+    test(regex_10, "10", R"((a)b(c))", "abc", "y", R"($-[0]-$-[1]-$-[2])", "0-0-2");
+    test(regex_11, "11", R"((a)b(c))", "abc", "y", R"($+[0]-$+[1]-$+[2])", "3-1-3");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {"ef"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_01_matcher::to_string() -> std::string{return R"(()ef)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {"ef"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_02_matcher::to_string() -> std::string{return R"(()ef)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {"ef"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_03_matcher::to_string() -> std::string{return R"(()ef)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {"ef"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_04_matcher::to_string() -> std::string{return R"(()ef)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {"ef"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_05_matcher::to_string() -> std::string{return R"(()ef)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_06_matcher::to_string() -> std::string{return R"(((a)))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_07_matcher::to_string() -> std::string{return R"(((a)))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_08_matcher::to_string() -> std::string{return R"(((a)))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_3 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_09_matcher::to_string() -> std::string{return R"((a)b(c))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_3 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_10_matcher::to_string() -> std::string{return R"((a)b(c))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_3 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_09_groups::regex_11_matcher::to_string() -> std::string{return R"((a)b(c))"; }
+
+
+#line 181 "pure2-regex_09_groups.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_09_groups());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_09_groups.cpp2.output b/regression-tests/test-results/pure2-regex_09_groups.cpp2.output
new file mode 100644
index 0000000000..582d280e31
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_09_groups.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_09_groups.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp b/regression-tests/test-results/pure2-regex_10_escapes.cpp
new file mode 100644
index 0000000000..7eb93b9e67
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp
@@ -0,0 +1,2428 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_10_escapes.cpp2"
+
+#line 153 "pure2-regex_10_escapes.cpp2"
+class test_tests_10_escapes;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_10_escapes.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_10_escapes.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_10_escapes.cpp2"
+class test_tests_10_escapes {
+
+#line 174 "pure2-regex_10_escapes.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; 
+  public: test_tests_10_escapes() = default;
+  public: test_tests_10_escapes(test_tests_10_escapes const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_10_escapes const&) -> void = delete;
+
+
+#line 198 "pure2-regex_10_escapes.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_10_escapes.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_10_escapes.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_10_escapes.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 174 "pure2-regex_10_escapes.cpp2"
+  auto test_tests_10_escapes::run() const& -> void{
+    std::cout << "Running tests_10_escapes:" << std::endl;
+    test(regex_01, "01", R"(a\(b)", "a(b", "y", R"($&-$1)", "a(b-");
+    test(regex_02, "02", R"(a\(*b)", "ab", "y", R"($&)", "ab");
+    test(regex_03, "03", R"(a\(*b)", "a((b", "y", R"($&)", "a((b");
+    test(regex_04, "04", R"(a\\b)", "a\\b", "y", R"($&)", "a\\b");
+    test(regex_05, "05", R"(foo(\h+)bar)", "foo\tbar", "y", R"($1)", "\t");
+    test(regex_06, "06", R"((\H+)(\h))", "foo\tbar", "y", R"($1-$2)", "foo-\t");
+    test(regex_07, "07", R"((\h+)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b");
+    test(regex_08, "08", R"(foo(\h)bar)", "foo\tbar", "y", R"($1)", "\t");
+    test(regex_09, "09", R"((\H)(\h))", "foo\tbar", "y", R"($1-$2)", "o-\t");
+    test(regex_10, "10", R"((\h)(\H))", "foo\tbar", "y", R"($1-$2)", "\t-b");
+    test(regex_11, "11", R"(foo(\v+)bar)", "foo\r\n\r\n\nbar", "y", R"($1)", "\r\n\r\n\n");
+    test(regex_12, "12", R"((\V+)(\v))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "foo-\r");
+    test(regex_13, "13", R"((\v+)(\V))", "foo\r\n\r\n\nbar", "y", R"($1-$2)", "\r\n\r\n\n-b");
+    test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r");
+    test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r");
+    test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b");
+    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a\ebar", "y", R"($&)", "foo\t\n\r\f\a\ebar");
+    test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar");
+    test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB");
+    test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a(b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_01_matcher::to_string() -> std::string{return R"(a\(b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"("}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_02_matcher::to_string() -> std::string{return R"(a\(*b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"("}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_03_matcher::to_string() -> std::string{return R"(a\(*b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a\\b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_04_matcher::to_string() -> std::string{return R"(a\\b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"bar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_05_matcher::to_string() -> std::string{return R"(foo(\h+)bar)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_06_matcher::to_string() -> std::string{return R"((\H+)(\h))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_07_matcher::to_string() -> std::string{return R"((\h+)(\H))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"bar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_08_matcher::to_string() -> std::string{return R"(foo(\h)bar)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_09_matcher::to_string() -> std::string{return R"((\H)(\h))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::named_class_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_not_hor_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_10_matcher::to_string() -> std::string{return R"((\h)(\H))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"bar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_11_matcher::to_string() -> std::string{return R"(foo(\v+)bar)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_12_matcher::to_string() -> std::string{return R"((\V+)(\v))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_13_matcher::to_string() -> std::string{return R"((\v+)(\V))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"bar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_14_matcher::to_string() -> std::string{return R"(foo(\v)bar)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_15_matcher::to_string() -> std::string{return R"((\V)(\v))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::named_class_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_not_ver_space::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_16_matcher::to_string() -> std::string{return R"((\v)(\V))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo\t\n\r\f\a\ebar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),12)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,12); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 12;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_17_matcher::to_string() -> std::string{return R"(foo\t\n\r\f\a\ebar)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_start(0, r.pos);
+
+  std::array str_tmp_1 {"bar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_18_matcher::to_string() -> std::string{return R"(foo\Kbar)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_19_matcher::to_string() -> std::string{return R"(\x41\x42)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_10_escapes::regex_20_matcher::to_string() -> std::string{return R"(\101\o{102})"; }
+
+
+#line 199 "pure2-regex_10_escapes.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_10_escapes());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp2.output b/regression-tests/test-results/pure2-regex_10_escapes.cpp2.output
new file mode 100644
index 0000000000..936931a8c1
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_10_escapes.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_11_group_references.cpp b/regression-tests/test-results/pure2-regex_11_group_references.cpp
new file mode 100644
index 0000000000..8f239cd775
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_11_group_references.cpp
@@ -0,0 +1,3684 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_11_group_references.cpp2"
+
+#line 153 "pure2-regex_11_group_references.cpp2"
+class test_tests_11_group_references;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_11_group_references.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_11_group_references.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_11_group_references.cpp2"
+class test_tests_11_group_references {
+
+#line 178 "pure2-regex_11_group_references.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; 
+  public: test_tests_11_group_references() = default;
+  public: test_tests_11_group_references(test_tests_11_group_references const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_11_group_references const&) -> void = delete;
+
+
+#line 206 "pure2-regex_11_group_references.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_11_group_references.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_11_group_references.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_11_group_references.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 178 "pure2-regex_11_group_references.cpp2"
+  auto test_tests_11_group_references::run() const& -> void{
+    std::cout << "Running tests_11_group_references:" << std::endl;
+    test(regex_01, "01", R"((foo)(\g-2))", "foofoo", "y", R"($1-$2)", "foo-foo");
+    test(regex_02, "02", R"((foo)(\g-2)(foo)(\g-2))", "foofoofoofoo", "y", R"($1-$2-$3-$4)", "foo-foo-foo-foo");
+    test(regex_03, "03", R"((([abc]+) \g-1)(([abc]+) \g{-1}))", "abc abccba cba", "y", R"($2-$4)", "abc-cba");
+    test(regex_04, "04", R"((a)(b)(c)\g1\g2\g3)", "abcabc", "y", R"($1$2$3)", "abc");
+    test(regex_05, "05", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_06, "06", R"(/(?'n'foo) \g{ n }/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_07, "07", R"(/(?'n'foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_08, "08", R"(/(?foo) \g{n}/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_09, "09", R"(/(?foo) \g{n}/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_10, "10", R"(/(?as) (\w+) \g{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_11, "11", R"(/(?'n'foo) \k/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_12, "12", R"(/(?'n'foo) \k/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_13, "13", R"(/(?foo) \k'n'/)", "..foo foo..", "y", R"($1)", "foo");
+    test(regex_14, "14", R"(/(?foo) \k'n'/)", "..foo foo..", "yM", R"($+{n})", "foo");
+    test(regex_15, "15", R"(/(?'a1'foo) \k'a1'/)", "..foo foo..", "yM", R"($+{a1})", "foo");
+    test(regex_16, "16", R"(/(?foo) \k/)", "..foo foo..", "yM", R"($+{a1})", "foo");
+    test(regex_17, "17", R"(/(?'_'foo) \k'_'/)", "..foo foo..", "yM", R"($+{_})", "foo");
+    test(regex_18, "18", R"(/(?<_>foo) \k<_>/)", "..foo foo..", "yM", R"($+{_})", "foo");
+    test(regex_19, "19", R"(/(?'_0_'foo) \k'_0_'/)", "..foo foo..", "yM", R"($+{_0_})", "foo");
+    test(regex_20, "20", R"(/(?<_0_>foo) \k<_0_>/)", "..foo foo..", "yM", R"($+{_0_})", "foo");
+    test(regex_21, "21", R"(/(?as) (\w+) \k (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_22, "22", R"(/(?as) (\w+) \k{as} (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_23, "23", R"(/(?as) (\w+) \k'as' (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    test(regex_24, "24", R"(/(?as) (\w+) \k{ as } (\w+)/)", "as easy as pie", "y", R"($1-$2-$3)", "as-easy-pie");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_01_matcher::to_string() -> std::string{return R"((foo)(\g-2))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  ctx.set_group_start(3, r.pos);
+
+  std::array str_tmp_3 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  ctx.set_group_start(4, r.pos);
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_02_matcher::to_string() -> std::string{return R"((foo)(\g-2)(foo)(\g-2))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  ctx.set_group_start(3, r.pos);
+  ctx.set_group_start(4, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array str_tmp_4 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_03_matcher::to_string() -> std::string{return R"((([abc]+) \g-1)(([abc]+) \g{-1}))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  ctx.set_group_start(3, r.pos);
+
+  std::array str_tmp_4 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_04_matcher::to_string() -> std::string{return R"((a)(b)(c)\g1\g2\g3)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_05_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_06_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{ n }/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_07_matcher::to_string() -> std::string{return R"(/(?'n'foo) \g{n}/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_08_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_09_matcher::to_string() -> std::string{return R"(/(?foo) \g{n}/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"as"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array str_tmp_4 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_5 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(3, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "as") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_10_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \g{as} (\w+)/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_11_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_12_matcher::to_string() -> std::string{return R"(/(?'n'foo) \k/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_13_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "n") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_14_matcher::to_string() -> std::string{return R"(/(?foo) \k'n'/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "a1") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_15_matcher::to_string() -> std::string{return R"(/(?'a1'foo) \k'a1'/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "a1") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_16_matcher::to_string() -> std::string{return R"(/(?foo) \k/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "_") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_17_matcher::to_string() -> std::string{return R"(/(?'_'foo) \k'_'/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "_") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_18_matcher::to_string() -> std::string{return R"(/(?<_>foo) \k<_>/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "_0_") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_19_matcher::to_string() -> std::string{return R"(/(?'_0_'foo) \k'_0_'/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "_0_") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_20_matcher::to_string() -> std::string{return R"(/(?<_0_>foo) \k<_0_>/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"as"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array str_tmp_4 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_5 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(3, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "as") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_21_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k (\w+)/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"as"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array str_tmp_4 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_5 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(3, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "as") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_22_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{as} (\w+)/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"as"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array str_tmp_4 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_5 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(3, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "as") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_23_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k'as' (\w+)/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"as"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array str_tmp_4 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_5 {" "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(3, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "as") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_11_group_references::regex_24_matcher::to_string() -> std::string{return R"(/(?as) (\w+) \k{ as } (\w+)/)"; }
+
+
+#line 207 "pure2-regex_11_group_references.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_11_group_references());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_11_group_references.cpp2.output b/regression-tests/test-results/pure2-regex_11_group_references.cpp2.output
new file mode 100644
index 0000000000..c6220a4e25
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_11_group_references.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_11_group_references.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp
new file mode 100644
index 0000000000..93bfeceadf
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp
@@ -0,0 +1,19920 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_12_case_insensitive.cpp2"
+
+#line 153 "pure2-regex_12_case_insensitive.cpp2"
+class test_tests_12_case_insensitive;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_12_case_insensitive.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_12_case_insensitive.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_12_case_insensitive.cpp2"
+class test_tests_12_case_insensitive {
+
+#line 273 "pure2-regex_12_case_insensitive.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_100_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_100_matcher() = default;
+        public: regex_100_matcher(regex_100_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_100_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_100 {}; public: class regex_101_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_101_matcher() = default;
+        public: regex_101_matcher(regex_101_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_101_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_101 {}; public: class regex_102_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_11 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_12 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_13 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_102_matcher() = default;
+        public: regex_102_matcher(regex_102_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_102_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_102 {}; public: class regex_103_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_11 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_12 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_13 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_103_matcher() = default;
+        public: regex_103_matcher(regex_103_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_103_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_103 {}; public: class regex_104_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_11 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_12 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_13 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_104_matcher() = default;
+        public: regex_104_matcher(regex_104_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_104_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_104 {}; public: class regex_105_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_11 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_12 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_13 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_105_matcher() = default;
+        public: regex_105_matcher(regex_105_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_105_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_105 {}; public: class regex_106_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_11 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_12 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_13 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_106_matcher() = default;
+        public: regex_106_matcher(regex_106_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_106_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_106 {}; public: class regex_107_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_107_matcher() = default;
+        public: regex_107_matcher(regex_107_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_107_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_107 {}; public: class regex_108_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_108_matcher() = default;
+        public: regex_108_matcher(regex_108_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_108_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_108 {}; public: class regex_109_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_109_matcher() = default;
+        public: regex_109_matcher(regex_109_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_109_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_109 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_110_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_110_matcher() = default;
+        public: regex_110_matcher(regex_110_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_110_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_110 {}; public: class regex_111_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_111_matcher() = default;
+        public: regex_111_matcher(regex_111_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_111_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_111 {}; public: class regex_112_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_112_matcher() = default;
+        public: regex_112_matcher(regex_112_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_112_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_112 {}; public: class regex_113_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_113_matcher() = default;
+        public: regex_113_matcher(regex_113_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_113_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_113 {}; public: class regex_114_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_114_matcher() = default;
+        public: regex_114_matcher(regex_114_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_114_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_114 {}; public: class regex_115_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_115_matcher() = default;
+        public: regex_115_matcher(regex_115_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_115_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_115 {}; public: class regex_116_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_116_matcher() = default;
+        public: regex_116_matcher(regex_116_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_116_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_116 {}; public: class regex_117_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_117_matcher() = default;
+        public: regex_117_matcher(regex_117_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_117_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_117 {}; public: class regex_118_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_118_matcher() = default;
+        public: regex_118_matcher(regex_118_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_118_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_118 {}; public: class regex_119_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_119_matcher() = default;
+        public: regex_119_matcher(regex_119_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_119_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_119 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_25_matcher() = default;
+        public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_25_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_26_matcher() = default;
+        public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_26_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_27_matcher() = default;
+        public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_27_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_28_matcher() = default;
+        public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_28_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_29_matcher() = default;
+        public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_29_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_30_matcher() = default;
+        public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_30_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_31_matcher() = default;
+        public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_31_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_32_matcher() = default;
+        public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_32_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_33_matcher() = default;
+        public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_33_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_34_matcher() = default;
+        public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_34_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_35_matcher() = default;
+        public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_35_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_36_matcher() = default;
+        public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_36_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_37_matcher() = default;
+        public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_37_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_38_matcher() = default;
+        public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_38_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_39_matcher() = default;
+        public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_39_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_40_matcher() = default;
+        public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_40_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_41_matcher() = default;
+        public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_41_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_42_matcher() = default;
+        public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_42_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_43_matcher() = default;
+        public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_43_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_44_matcher() = default;
+        public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_44_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_45_matcher() = default;
+        public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_45_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_46_matcher() = default;
+        public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_46_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_47_matcher() = default;
+        public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_47_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_48_matcher() = default;
+        public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_48_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_49_matcher() = default;
+        public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_49_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_50_matcher() = default;
+        public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_50_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_51_matcher() = default;
+        public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_51_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_52_matcher() = default;
+        public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_52_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_53_matcher() = default;
+        public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_53_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_53 {}; public: class regex_54_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_54_matcher() = default;
+        public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_54_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_54 {}; public: class regex_55_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_55_matcher() = default;
+        public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_55_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_55 {}; public: class regex_56_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_56_matcher() = default;
+        public: regex_56_matcher(regex_56_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_56_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_56 {}; public: class regex_57_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_57_matcher() = default;
+        public: regex_57_matcher(regex_57_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_57_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_57 {}; public: class regex_58_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_58_matcher() = default;
+        public: regex_58_matcher(regex_58_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_58_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_58 {}; public: class regex_59_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_59_matcher() = default;
+        public: regex_59_matcher(regex_59_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_59_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_59 {}; public: class regex_60_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_60_matcher() = default;
+        public: regex_60_matcher(regex_60_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_60_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_60 {}; public: class regex_61_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_61_matcher() = default;
+        public: regex_61_matcher(regex_61_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_61_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_61 {}; public: class regex_62_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_62_matcher() = default;
+        public: regex_62_matcher(regex_62_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_62_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_62 {}; public: class regex_63_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_63_matcher() = default;
+        public: regex_63_matcher(regex_63_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_63_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_63 {}; public: class regex_64_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_64_matcher() = default;
+        public: regex_64_matcher(regex_64_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_64_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_64 {}; public: class regex_65_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_65_matcher() = default;
+        public: regex_65_matcher(regex_65_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_65_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_65 {}; public: class regex_66_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_66_matcher() = default;
+        public: regex_66_matcher(regex_66_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_66_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_66 {}; public: class regex_67_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_67_matcher() = default;
+        public: regex_67_matcher(regex_67_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_67_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_67 {}; public: class regex_68_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_68_matcher() = default;
+        public: regex_68_matcher(regex_68_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_68_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_68 {}; public: class regex_69_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_69_matcher() = default;
+        public: regex_69_matcher(regex_69_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_69_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_69 {}; public: class regex_70_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_70_matcher() = default;
+        public: regex_70_matcher(regex_70_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_70_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_70 {}; public: class regex_71_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_71_matcher() = default;
+        public: regex_71_matcher(regex_71_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_71_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_71 {}; public: class regex_72_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_72_matcher() = default;
+        public: regex_72_matcher(regex_72_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_72_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_72 {}; public: class regex_73_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_73_matcher() = default;
+        public: regex_73_matcher(regex_73_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_73_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_73 {}; public: class regex_74_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_74_matcher() = default;
+        public: regex_74_matcher(regex_74_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_74_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_74 {}; public: class regex_75_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_75_matcher() = default;
+        public: regex_75_matcher(regex_75_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_75_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_75 {}; public: class regex_76_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_76_matcher() = default;
+        public: regex_76_matcher(regex_76_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_76_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_76 {}; public: class regex_77_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_77_matcher() = default;
+        public: regex_77_matcher(regex_77_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_77_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_77 {}; public: class regex_78_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_78_matcher() = default;
+        public: regex_78_matcher(regex_78_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_78_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_78 {}; public: class regex_79_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_79_matcher() = default;
+        public: regex_79_matcher(regex_79_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_79_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_79 {}; public: class regex_80_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_80_matcher() = default;
+        public: regex_80_matcher(regex_80_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_80_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_80 {}; public: class regex_81_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_81_matcher() = default;
+        public: regex_81_matcher(regex_81_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_81_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_81 {}; public: class regex_82_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_82_matcher() = default;
+        public: regex_82_matcher(regex_82_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_82_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_82 {}; public: class regex_83_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_83_matcher() = default;
+        public: regex_83_matcher(regex_83_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_83_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_83 {}; public: class regex_84_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_84_matcher() = default;
+        public: regex_84_matcher(regex_84_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_84_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_84 {}; public: class regex_85_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_85_matcher() = default;
+        public: regex_85_matcher(regex_85_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_85_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_85 {}; public: class regex_86_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_86_matcher() = default;
+        public: regex_86_matcher(regex_86_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_86_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_86 {}; public: class regex_87_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_87_matcher() = default;
+        public: regex_87_matcher(regex_87_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_87_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_87 {}; public: class regex_88_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_88_matcher() = default;
+        public: regex_88_matcher(regex_88_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_88_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_88 {}; public: class regex_89_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_89_matcher() = default;
+        public: regex_89_matcher(regex_89_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_89_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_89 {}; public: class regex_90_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_90_matcher() = default;
+        public: regex_90_matcher(regex_90_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_90_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_90 {}; public: class regex_91_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_91_matcher() = default;
+        public: regex_91_matcher(regex_91_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_91_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_91 {}; public: class regex_92_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_92_matcher() = default;
+        public: regex_92_matcher(regex_92_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_92_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_92 {}; public: class regex_93_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_93_matcher() = default;
+        public: regex_93_matcher(regex_93_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_93_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_93 {}; public: class regex_94_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_94_matcher() = default;
+        public: regex_94_matcher(regex_94_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_94_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_94 {}; public: class regex_95_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_95_matcher() = default;
+        public: regex_95_matcher(regex_95_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_95_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_95 {}; public: class regex_96_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_96_matcher() = default;
+        public: regex_96_matcher(regex_96_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_96_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_96 {}; public: class regex_97_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_97_matcher() = default;
+        public: regex_97_matcher(regex_97_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_97_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_97 {}; public: class regex_98_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_98_matcher() = default;
+        public: regex_98_matcher(regex_98_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_98_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_98 {}; public: class regex_99_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_99_matcher() = default;
+        public: regex_99_matcher(regex_99_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_99_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_99 {}; 
+  public: test_tests_12_case_insensitive() = default;
+  public: test_tests_12_case_insensitive(test_tests_12_case_insensitive const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_12_case_insensitive const&) -> void = delete;
+
+
+#line 396 "pure2-regex_12_case_insensitive.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_12_case_insensitive.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_12_case_insensitive.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_12_case_insensitive.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 273 "pure2-regex_12_case_insensitive.cpp2"
+  auto test_tests_12_case_insensitive::run() const& -> void{
+    std::cout << "Running tests_12_case_insensitive:" << std::endl;
+    test(regex_01, "01", R"('abc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_02, "02", R"('abc'i)", "XBC", "n", R"(-)", "-");
+    test(regex_03, "03", R"('abc'i)", "AXC", "n", R"(-)", "-");
+    test(regex_04, "04", R"('abc'i)", "ABX", "n", R"(-)", "-");
+    test(regex_05, "05", R"('abc'i)", "XABCY", "y", R"($&)", "ABC");
+    test(regex_06, "06", R"('abc'i)", "ABABC", "y", R"($&)", "ABC");
+    test(regex_07, "07", R"('ab*c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_08, "08", R"('ab*bc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_09, "09", R"('ab*bc'i)", "ABBC", "y", R"($&)", "ABBC");
+    test(regex_10, "10", R"('ab*?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_11, "11", R"('ab{0,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_12, "12", R"('ab+?bc'i)", "ABBC", "y", R"($&)", "ABBC");
+    test(regex_13, "13", R"('ab+bc'i)", "ABC", "n", R"(-)", "-");
+    test(regex_14, "14", R"('ab+bc'i)", "ABQ", "n", R"(-)", "-");
+    test(regex_15, "15", R"('ab{1,}bc'i)", "ABQ", "n", R"(-)", "-");
+    test(regex_16, "16", R"('ab+bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_17, "17", R"('ab{1,}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_18, "18", R"('ab{1,3}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_19, "19", R"('ab{3,4}?bc'i)", "ABBBBC", "y", R"($&)", "ABBBBC");
+    test(regex_20, "20", R"('ab{4,5}?bc'i)", "ABBBBC", "n", R"(-)", "-");
+    test(regex_21, "21", R"('ab??bc'i)", "ABBC", "y", R"($&)", "ABBC");
+    test(regex_22, "22", R"('ab??bc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_23, "23", R"('ab{0,1}?bc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_24, "24", R"('ab??bc'i)", "ABBBBC", "n", R"(-)", "-");
+    test(regex_25, "25", R"('ab??c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_26, "26", R"('ab{0,1}?c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_27, "27", R"('^abc$'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_28, "28", R"('^abc$'i)", "ABCC", "n", R"(-)", "-");
+    test(regex_29, "29", R"('^abc'i)", "ABCC", "y", R"($&)", "ABC");
+    test(regex_30, "30", R"('^abc$'i)", "AABC", "n", R"(-)", "-");
+    test(regex_31, "31", R"('abc$'i)", "AABC", "y", R"($&)", "ABC");
+    test(regex_32, "32", R"('^'i)", "ABC", "y", R"($&)", "");
+    test(regex_33, "33", R"('$'i)", "ABC", "y", R"($&)", "");
+    test(regex_34, "34", R"('a.c'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_35, "35", R"('a.c'i)", "AXC", "y", R"($&)", "AXC");
+    test(regex_36, "36", R"('a\Nc'i)", "ABC", "y", R"($&)", "ABC");
+    test(regex_37, "37", R"('a.*?c'i)", "AXYZC", "y", R"($&)", "AXYZC");
+    test(regex_38, "38", R"('a.*c'i)", "AXYZD", "n", R"(-)", "-");
+    test(regex_39, "39", R"('a[bc]d'i)", "ABC", "n", R"(-)", "-");
+    test(regex_40, "40", R"('a[bc]d'i)", "ABD", "y", R"($&)", "ABD");
+    test(regex_41, "41", R"('a[b-d]e'i)", "ABD", "n", R"(-)", "-");
+    test(regex_42, "42", R"('a[b-d]e'i)", "ACE", "y", R"($&)", "ACE");
+    test(regex_43, "43", R"('a[b-d]'i)", "AAC", "y", R"($&)", "AC");
+    test(regex_44, "44", R"('a[-b]'i)", "A-", "y", R"($&)", "A-");
+    test(regex_45, "45", R"('a[b-]'i)", "A-", "y", R"($&)", "A-");
+    test(regex_46, "46", R"('a]'i)", "A]", "y", R"($&)", "A]");
+    test(regex_47, "47", R"('a[]]b'i)", "A]B", "y", R"($&)", "A]B");
+    test(regex_48, "48", R"('a[^bc]d'i)", "AED", "y", R"($&)", "AED");
+    test(regex_49, "49", R"('a[^bc]d'i)", "ABD", "n", R"(-)", "-");
+    test(regex_50, "50", R"('a[^-b]c'i)", "ADC", "y", R"($&)", "ADC");
+    test(regex_51, "51", R"('a[^-b]c'i)", "A-C", "n", R"(-)", "-");
+    test(regex_52, "52", R"('a[^]b]c'i)", "A]C", "n", R"(-)", "-");
+    test(regex_53, "53", R"('a[^]b]c'i)", "ADC", "y", R"($&)", "ADC");
+    test(regex_54, "54", R"('ab|cd'i)", "ABC", "y", R"($&)", "AB");
+    test(regex_55, "55", R"('ab|cd'i)", "ABCD", "y", R"($&)", "AB");
+    test(regex_56, "56", R"('()ef'i)", "DEF", "y", R"($&-$1)", "EF-");
+    test(regex_57, "57", R"('$b'i)", "B", "n", R"(-)", "-");
+    test(regex_58, "58", R"('a\(b'i)", "A(B", "y", R"($&-$1)", "A(B-");
+    test(regex_59, "59", R"('a\(*b'i)", "AB", "y", R"($&)", "AB");
+    test(regex_60, "60", R"('a\(*b'i)", "A((B", "y", R"($&)", "A((B");
+    test(regex_61, "61", R"('a\\b'i)", "A\\B", "y", R"($&)", "A\\B");
+    test(regex_62, "62", R"('((a))'i)", "ABC", "y", R"($&-$1-$2)", "A-A-A");
+    test(regex_63, "63", R"('(a)b(c)'i)", "ABC", "y", R"($&-$1-$2)", "ABC-A-C");
+    test(regex_64, "64", R"('a+b+c'i)", "AABBABC", "y", R"($&)", "ABC");
+    test(regex_65, "65", R"('a{1,}b{1,}c'i)", "AABBABC", "y", R"($&)", "ABC");
+    test(regex_66, "66", R"('a.+?c'i)", "ABCABC", "y", R"($&)", "ABC");
+    test(regex_67, "67", R"('a.*?c'i)", "ABCABC", "y", R"($&)", "ABC");
+    test(regex_68, "68", R"('a.{0,5}?c'i)", "ABCABC", "y", R"($&)", "ABC");
+    test(regex_69, "69", R"('(a+|b)*'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_70, "70", R"('(a+|b){0,}'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_71, "71", R"('(a+|b)+'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_72, "72", R"('(a+|b){1,}'i)", "AB", "y", R"($&-$1)", "AB-B");
+    test(regex_73, "73", R"('(a+|b)?'i)", "AB", "y", R"($&-$1)", "A-A");
+    test(regex_74, "74", R"('(a+|b){0,1}'i)", "AB", "y", R"($&-$1)", "A-A");
+    test(regex_75, "75", R"('(a+|b){0,1}?'i)", "AB", "y", R"($&-$1)", "-");
+    test(regex_76, "76", R"('[^ab]*'i)", "CDE", "y", R"($&)", "CDE");
+    test(regex_77, "77", R"('abc'i)", "", "n", R"(-)", "-");
+    test(regex_78, "78", R"('a*'i)", "", "y", R"($&)", "");
+    test(regex_79, "79", R"('([abc])*d'i)", "ABBBCD", "y", R"($&-$1)", "ABBBCD-C");
+    test(regex_80, "80", R"('([abc])*bcd'i)", "ABCD", "y", R"($&-$1)", "ABCD-A");
+    test(regex_81, "81", R"('a|b|c|d|e'i)", "E", "y", R"($&)", "E");
+    test(regex_82, "82", R"('(a|b|c|d|e)f'i)", "EF", "y", R"($&-$1)", "EF-E");
+    test(regex_83, "83", R"('abcd*efg'i)", "ABCDEFG", "y", R"($&)", "ABCDEFG");
+    test(regex_84, "84", R"('ab*'i)", "XABYABBBZ", "y", R"($&)", "AB");
+    test(regex_85, "85", R"('ab*'i)", "XAYABBBZ", "y", R"($&)", "A");
+    test(regex_86, "86", R"('(ab|cd)e'i)", "ABCDE", "y", R"($&-$1)", "CDE-CD");
+    test(regex_87, "87", R"('[abhgefdc]ij'i)", "HIJ", "y", R"($&)", "HIJ");
+    test(regex_88, "88", R"('^(ab|cd)e'i)", "ABCDE", "n", R"(x$1y)", "XY");
+    test(regex_89, "89", R"('(abc|)ef'i)", "ABCDEF", "y", R"($&-$1)", "EF-");
+    test(regex_90, "90", R"('(a|b)c*d'i)", "ABCD", "y", R"($&-$1)", "BCD-B");
+    test(regex_91, "91", R"('(ab|ab*)bc'i)", "ABC", "y", R"($&-$1)", "ABC-A");
+    test(regex_92, "92", R"('a([bc]*)c*'i)", "ABC", "y", R"($&-$1)", "ABC-BC");
+    test(regex_93, "93", R"('a([bc]*)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D");
+    test(regex_94, "94", R"('a([bc]+)(c*d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-BC-D");
+    test(regex_95, "95", R"('a([bc]*)(c+d)'i)", "ABCD", "y", R"($&-$1-$2)", "ABCD-B-CD");
+    test(regex_96, "96", R"('a[bcd]*dcdcde'i)", "ADCDCDE", "y", R"($&)", "ADCDCDE");
+    test(regex_97, "97", R"('a[bcd]+dcdcde'i)", "ADCDCDE", "n", R"(-)", "-");
+    test(regex_98, "98", R"('(ab|a)b*c'i)", "ABC", "y", R"($&-$1)", "ABC-AB");
+    test(regex_99, "99", R"('((a)(b)c)(d)'i)", "ABCD", "y", R"($1-$2-$3-$4)", "ABC-A-B-D");
+    test(regex_100, "100", R"('[a-zA-Z_][a-zA-Z0-9_]*'i)", "ALPHA", "y", R"($&)", "ALPHA");
+    test(regex_101, "101", R"('^a(bc+|b[eh])g|.h$'i)", "ABH", "y", R"($&-$1)", "BH-");
+    test(regex_102, "102", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-");
+    test(regex_103, "103", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "IJ", "y", R"($&-$1-$2)", "IJ-IJ-J");
+    test(regex_104, "104", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "EFFG", "n", R"(-)", "-");
+    test(regex_105, "105", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "BCDD", "n", R"(-)", "-");
+    test(regex_106, "106", R"('(bc+d$|ef*g.|h?i(j|k))'i)", "REFFGZ", "y", R"($&-$1-$2)", "EFFGZ-EFFGZ-");
+    test(regex_107, "107", R"('((((((((((a))))))))))'i)", "A", "y", R"($10)", "A");
+    test(regex_108, "108", R"('((((((((((a))))))))))\10'i)", "AA", "y", R"($&)", "AA");
+    test(regex_109, "109", R"('(((((((((a)))))))))'i)", "A", "y", R"($&)", "A");
+    test(regex_110, "110", R"('multiple words of text'i)", "UH-UH", "n", R"(-)", "-");
+    test(regex_111, "111", R"('multiple words'i)", "MULTIPLE WORDS, YEAH", "y", R"($&)", "MULTIPLE WORDS");
+    test(regex_112, "112", R"('(.*)c(.*)'i)", "ABCDE", "y", R"($&-$1-$2)", "ABCDE-AB-DE");
+    test(regex_113, "113", R"('\((.*), (.*)\)'i)", "(A, B)", "y", R"(($2, $1))", "(B, A)");
+    test(regex_114, "114", R"('[k]'i)", "AB", "n", R"(-)", "-");
+    test(regex_115, "115", R"('abcd'i)", "ABCD", "y", R"($&)", "ABCD");
+    test(regex_116, "116", R"('a(bc)d'i)", "ABCD", "y", R"($1)", "BC");
+    test(regex_117, "117", R"('a[-]?c'i)", "AC", "y", R"($&)", "AC");
+    test(regex_118, "118", R"('(abc)\1'i)", "ABCABC", "y", R"($1)", "ABC");
+    test(regex_119, "119", R"('([a-c]*)\1'i)", "ABCABC", "y", R"($1)", "ABC");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_01_matcher::to_string() -> std::string{return R"('abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_02_matcher::to_string() -> std::string{return R"('abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_03_matcher::to_string() -> std::string{return R"('abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_04_matcher::to_string() -> std::string{return R"('abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_05_matcher::to_string() -> std::string{return R"('abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_06_matcher::to_string() -> std::string{return R"('abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_07_matcher::to_string() -> std::string{return R"('ab*c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_08_matcher::to_string() -> std::string{return R"('ab*bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_09_matcher::to_string() -> std::string{return R"('ab*bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_10_matcher::to_string() -> std::string{return R"('ab*?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::range_class_entry,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::range_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_100_matcher::to_string() -> std::string{return R"('[a-zA-Z_][a-zA-Z0-9_]*'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"b"}; 
+
+  std::array upper_str_tmp_3 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+
+  std::array lower_str_tmp_5 {"g"}; 
+
+  std::array upper_str_tmp_5 {"G"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_101_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_6 {"h"}; 
+
+  std::array upper_str_tmp_6 {"H"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_1(), reset_0(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_101_matcher::to_string() -> std::string{return R"('^a(bc+|b[eh])g|.h$'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"b"}; 
+
+  std::array upper_str_tmp_0 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"d"}; 
+
+  std::array upper_str_tmp_2 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"f"}; 
+
+  std::array upper_str_tmp_4 {"F"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"e"}; 
+
+  std::array upper_str_tmp_3 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_5 {"g"}; 
+
+  std::array upper_str_tmp_5 {"G"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_6 {"h"}; 
+
+  std::array upper_str_tmp_6 {"H"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_8 {"j"}; 
+
+  std::array upper_str_tmp_8 {"J"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_9 {"k"}; 
+
+  std::array upper_str_tmp_9 {"K"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_7 {"i"}; 
+
+  std::array upper_str_tmp_7 {"I"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_102_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_11_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; 
+  static_cast(cpp2::move(tmp_11));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_102_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"b"}; 
+
+  std::array upper_str_tmp_0 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"d"}; 
+
+  std::array upper_str_tmp_2 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"f"}; 
+
+  std::array upper_str_tmp_4 {"F"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"e"}; 
+
+  std::array upper_str_tmp_3 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_5 {"g"}; 
+
+  std::array upper_str_tmp_5 {"G"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_6 {"h"}; 
+
+  std::array upper_str_tmp_6 {"H"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_8 {"j"}; 
+
+  std::array upper_str_tmp_8 {"J"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_9 {"k"}; 
+
+  std::array upper_str_tmp_9 {"K"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_7 {"i"}; 
+
+  std::array upper_str_tmp_7 {"I"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_103_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_11_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; 
+  static_cast(cpp2::move(tmp_11));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_103_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"b"}; 
+
+  std::array upper_str_tmp_0 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"d"}; 
+
+  std::array upper_str_tmp_2 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"f"}; 
+
+  std::array upper_str_tmp_4 {"F"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"e"}; 
+
+  std::array upper_str_tmp_3 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_5 {"g"}; 
+
+  std::array upper_str_tmp_5 {"G"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_6 {"h"}; 
+
+  std::array upper_str_tmp_6 {"H"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_8 {"j"}; 
+
+  std::array upper_str_tmp_8 {"J"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_9 {"k"}; 
+
+  std::array upper_str_tmp_9 {"K"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_7 {"i"}; 
+
+  std::array upper_str_tmp_7 {"I"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_104_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_11_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; 
+  static_cast(cpp2::move(tmp_11));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_104_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"b"}; 
+
+  std::array upper_str_tmp_0 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"d"}; 
+
+  std::array upper_str_tmp_2 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"f"}; 
+
+  std::array upper_str_tmp_4 {"F"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"e"}; 
+
+  std::array upper_str_tmp_3 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_5 {"g"}; 
+
+  std::array upper_str_tmp_5 {"G"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_6 {"h"}; 
+
+  std::array upper_str_tmp_6 {"H"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_8 {"j"}; 
+
+  std::array upper_str_tmp_8 {"J"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_9 {"k"}; 
+
+  std::array upper_str_tmp_9 {"K"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_7 {"i"}; 
+
+  std::array upper_str_tmp_7 {"I"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_105_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_11_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; 
+  static_cast(cpp2::move(tmp_11));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_105_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"b"}; 
+
+  std::array upper_str_tmp_0 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"d"}; 
+
+  std::array upper_str_tmp_2 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"f"}; 
+
+  std::array upper_str_tmp_4 {"F"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"e"}; 
+
+  std::array upper_str_tmp_3 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), cpp2::regex::no_reset(), other, func_6());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_5 {"g"}; 
+
+  std::array upper_str_tmp_5 {"G"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_5, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_6 {"h"}; 
+
+  std::array upper_str_tmp_6 {"H"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_8(), cpp2::regex::no_reset(), other, func_9());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_8 {"j"}; 
+
+  std::array upper_str_tmp_8 {"J"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_8, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_9 {"k"}; 
+
+  std::array upper_str_tmp_9 {"K"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_9, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_7 {"i"}; 
+
+  std::array upper_str_tmp_7 {"I"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_7, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_12(), func_10(), cpp2::regex::no_reset(), func_11(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_106_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_13(), func_1(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_7(), reset_0());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_11_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; 
+  static_cast(cpp2::move(tmp_11));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_106_matcher::to_string() -> std::string{return R"('(bc+d$|ef*g.|h?i(j|k))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+  ctx.set_group_start(3, r.pos);
+  ctx.set_group_start(4, r.pos);
+  ctx.set_group_start(5, r.pos);
+  ctx.set_group_start(6, r.pos);
+  ctx.set_group_start(7, r.pos);
+  ctx.set_group_start(8, r.pos);
+  ctx.set_group_start(9, r.pos);
+  ctx.set_group_start(10, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(10, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(10);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(9, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(9);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  ctx.set_group_end(8, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(8);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  ctx.set_group_end(7, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(7);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  ctx.set_group_end(6, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(6);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  ctx.set_group_end(5, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(5);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_8_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; 
+  static_cast(cpp2::move(tmp_8));
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_9_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; 
+  static_cast(cpp2::move(tmp_9));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_107_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+  ctx.set_group_start(3, r.pos);
+  ctx.set_group_start(4, r.pos);
+  ctx.set_group_start(5, r.pos);
+  ctx.set_group_start(6, r.pos);
+  ctx.set_group_start(7, r.pos);
+  ctx.set_group_start(8, r.pos);
+  ctx.set_group_start(9, r.pos);
+  ctx.set_group_start(10, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(10, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(10);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(9, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(9);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  ctx.set_group_end(8, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(8);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  ctx.set_group_end(7, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(7);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  ctx.set_group_end(6, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(6);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  ctx.set_group_end(5, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(5);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_8_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; 
+  static_cast(cpp2::move(tmp_8));
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_9_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; 
+  static_cast(cpp2::move(tmp_9));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_108_matcher::to_string() -> std::string{return R"('((((((((((a))))))))))\10'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+  ctx.set_group_start(3, r.pos);
+  ctx.set_group_start(4, r.pos);
+  ctx.set_group_start(5, r.pos);
+  ctx.set_group_start(6, r.pos);
+  ctx.set_group_start(7, r.pos);
+  ctx.set_group_start(8, r.pos);
+  ctx.set_group_start(9, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(9, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(9);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(8, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(8);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  ctx.set_group_end(7, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(7);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  ctx.set_group_end(6, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(6);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  ctx.set_group_end(5, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(5);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_8_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; 
+  static_cast(cpp2::move(tmp_8));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_9_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; 
+  static_cast(cpp2::move(tmp_9));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_109_matcher::to_string() -> std::string{return R"('(((((((((a)))))))))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_11_matcher::to_string() -> std::string{return R"('ab{0,}?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"multiple words of text"}; 
+
+  std::array upper_str_tmp_0 {"MULTIPLE WORDS OF TEXT"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),22)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,22); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 22;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_110_matcher::to_string() -> std::string{return R"('multiple words of text'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"multiple words"}; 
+
+  std::array upper_str_tmp_0 {"MULTIPLE WORDS"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),14)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,14); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 14;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_111_matcher::to_string() -> std::string{return R"('multiple words'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_112_matcher::to_string() -> std::string{return R"('(.*)c(.*)'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"("}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {", "}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array str_tmp_4 {")"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_113_matcher::to_string() -> std::string{return R"('\((.*), (.*)\)'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_114_matcher::to_string() -> std::string{return R"('[k]'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abcd"}; 
+
+  std::array upper_str_tmp_0 {"ABCD"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 4;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_115_matcher::to_string() -> std::string{return R"('abcd'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_1 {"bc"}; 
+
+  std::array upper_str_tmp_1 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+
+  std::array lower_str_tmp_3 {"d"}; 
+
+  std::array upper_str_tmp_3 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_116_matcher::to_string() -> std::string{return R"('a(bc)d'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_117_matcher::to_string() -> std::string{return R"('a[-]?c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_118_matcher::to_string() -> std::string{return R"('(abc)\1'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_119_matcher::to_string() -> std::string{return R"('([a-c]*)\1'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_12_matcher::to_string() -> std::string{return R"('ab+?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_13_matcher::to_string() -> std::string{return R"('ab+bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_14_matcher::to_string() -> std::string{return R"('ab+bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_15_matcher::to_string() -> std::string{return R"('ab{1,}bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_16_matcher::to_string() -> std::string{return R"('ab+bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_17_matcher::to_string() -> std::string{return R"('ab{1,}?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_18_matcher::to_string() -> std::string{return R"('ab{1,3}?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_19_matcher::to_string() -> std::string{return R"('ab{3,4}?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_20_matcher::to_string() -> std::string{return R"('ab{4,5}?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_21_matcher::to_string() -> std::string{return R"('ab??bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_22_matcher::to_string() -> std::string{return R"('ab??bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_23_matcher::to_string() -> std::string{return R"('ab{0,1}?bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"bc"}; 
+
+  std::array upper_str_tmp_2 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_24_matcher::to_string() -> std::string{return R"('ab??bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_25_matcher::to_string() -> std::string{return R"('ab??c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_26_matcher::to_string() -> std::string{return R"('ab{0,1}?c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_27_matcher::to_string() -> std::string{return R"('^abc$'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_28_matcher::to_string() -> std::string{return R"('^abc$'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_29_matcher::to_string() -> std::string{return R"('^abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_30_matcher::to_string() -> std::string{return R"('^abc$'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_31_matcher::to_string() -> std::string{return R"('abc$'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_32_matcher::to_string() -> std::string{return R"('^'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_33_matcher::to_string() -> std::string{return R"('$'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_34_matcher::to_string() -> std::string{return R"('a.c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_35_matcher::to_string() -> std::string{return R"('a.c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_36_matcher::to_string() -> std::string{return R"('a\Nc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_37_matcher::to_string() -> std::string{return R"('a.*?c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_38_matcher::to_string() -> std::string{return R"('a.*c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"d"}; 
+
+  std::array upper_str_tmp_1 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_39_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"d"}; 
+
+  std::array upper_str_tmp_1 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_40_matcher::to_string() -> std::string{return R"('a[bc]d'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"e"}; 
+
+  std::array upper_str_tmp_1 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_41_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"e"}; 
+
+  std::array upper_str_tmp_1 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_42_matcher::to_string() -> std::string{return R"('a[b-d]e'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_43_matcher::to_string() -> std::string{return R"('a[b-d]'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_44_matcher::to_string() -> std::string{return R"('a[-b]'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_45_matcher::to_string() -> std::string{return R"('a[b-]'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a]"}; 
+
+  std::array upper_str_tmp_0 {"A]"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_46_matcher::to_string() -> std::string{return R"('a]'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_47_matcher::to_string() -> std::string{return R"('a[]]b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"d"}; 
+
+  std::array upper_str_tmp_1 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_48_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"d"}; 
+
+  std::array upper_str_tmp_1 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_49_matcher::to_string() -> std::string{return R"('a[^bc]d'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_50_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_51_matcher::to_string() -> std::string{return R"('a[^-b]c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_52_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_53_matcher::to_string() -> std::string{return R"('a[^]b]c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"ab"}; 
+
+  std::array upper_str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"cd"}; 
+
+  std::array upper_str_tmp_1 {"CD"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_54_matcher::to_string() -> std::string{return R"('ab|cd'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"ab"}; 
+
+  std::array upper_str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"cd"}; 
+
+  std::array upper_str_tmp_1 {"CD"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_55_matcher::to_string() -> std::string{return R"('ab|cd'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array lower_str_tmp_1 {"ef"}; 
+
+  std::array upper_str_tmp_1 {"EF"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_56_matcher::to_string() -> std::string{return R"('()ef'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_0 {"b"}; 
+
+  std::array upper_str_tmp_0 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_57_matcher::to_string() -> std::string{return R"('$b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a(b"}; 
+
+  std::array upper_str_tmp_0 {"A(B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_58_matcher::to_string() -> std::string{return R"('a\(b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"("}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_59_matcher::to_string() -> std::string{return R"('a\(*b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"("}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_60_matcher::to_string() -> std::string{return R"('a\(*b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a\\b"}; 
+
+  std::array upper_str_tmp_0 {"A\\B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_61_matcher::to_string() -> std::string{return R"('a\\b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_62_matcher::to_string() -> std::string{return R"('((a))'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+
+  std::array lower_str_tmp_3 {"c"}; 
+
+  std::array upper_str_tmp_3 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_63_matcher::to_string() -> std::string{return R"('(a)b(c)'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_64_matcher::to_string() -> std::string{return R"('a+b+c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_65_matcher::to_string() -> std::string{return R"('a{1,}b{1,}c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_66_matcher::to_string() -> std::string{return R"('a.+?c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_67_matcher::to_string() -> std::string{return R"('a.*?c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"c"}; 
+
+  std::array upper_str_tmp_1 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_68_matcher::to_string() -> std::string{return R"('a.{0,5}?c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_69_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_69_matcher::to_string() -> std::string{return R"('(a+|b)*'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_70_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_70_matcher::to_string() -> std::string{return R"('(a+|b){0,}'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_71_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_71_matcher::to_string() -> std::string{return R"('(a+|b)+'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_72_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_72_matcher::to_string() -> std::string{return R"('(a+|b){1,}'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_73_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_73_matcher::to_string() -> std::string{return R"('(a+|b)?'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_74_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_74_matcher::to_string() -> std::string{return R"('(a+|b){0,1}'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_2(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_75_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_75_matcher::to_string() -> std::string{return R"('(a+|b){0,1}?'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_76_matcher::to_string() -> std::string{return R"('[^ab]*'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_77_matcher::to_string() -> std::string{return R"('abc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_78_matcher::to_string() -> std::string{return R"('a*'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_79_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"d"}; 
+
+  std::array upper_str_tmp_1 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_79_matcher::to_string() -> std::string{return R"('([abc])*d'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_12_case_insensitive::regex_80_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"bcd"}; 
+
+  std::array upper_str_tmp_1 {"BCD"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_80_matcher::to_string() -> std::string{return R"('([abc])*bcd'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"d"}; 
+
+  std::array upper_str_tmp_3 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"e"}; 
+
+  std::array upper_str_tmp_4 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_81_matcher::to_string() -> std::string{return R"('a|b|c|d|e'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"d"}; 
+
+  std::array upper_str_tmp_3 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"e"}; 
+
+  std::array upper_str_tmp_4 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+
+  std::array lower_str_tmp_6 {"f"}; 
+
+  std::array upper_str_tmp_6 {"F"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_82_matcher::to_string() -> std::string{return R"('(a|b|c|d|e)f'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"d"}; 
+
+  std::array upper_str_tmp_1 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"efg"}; 
+
+  std::array upper_str_tmp_2 {"EFG"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_83_matcher::to_string() -> std::string{return R"('abcd*efg'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_84_matcher::to_string() -> std::string{return R"('ab*'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_85_matcher::to_string() -> std::string{return R"('ab*'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"ab"}; 
+
+  std::array upper_str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"cd"}; 
+
+  std::array upper_str_tmp_1 {"CD"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+
+  std::array lower_str_tmp_3 {"e"}; 
+
+  std::array upper_str_tmp_3 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_86_matcher::to_string() -> std::string{return R"('(ab|cd)e'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array lower_str_tmp_0 {"ij"}; 
+
+  std::array upper_str_tmp_0 {"IJ"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_87_matcher::to_string() -> std::string{return R"('[abhgefdc]ij'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"ab"}; 
+
+  std::array upper_str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"cd"}; 
+
+  std::array upper_str_tmp_1 {"CD"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+
+  std::array lower_str_tmp_3 {"e"}; 
+
+  std::array upper_str_tmp_3 {"E"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_88_matcher::to_string() -> std::string{return R"('^(ab|cd)e'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"abc"}; 
+
+  std::array upper_str_tmp_0 {"ABC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"ef"}; 
+
+  std::array upper_str_tmp_2 {"EF"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_89_matcher::to_string() -> std::string{return R"('(abc|)ef'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"c"}; 
+
+  std::array upper_str_tmp_3 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), cpp2::regex::no_reset(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"d"}; 
+
+  std::array upper_str_tmp_4 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_90_matcher::to_string() -> std::string{return R"('(a|b)c*d'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"ab"}; 
+
+  std::array upper_str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"a"}; 
+
+  std::array upper_str_tmp_1 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_5(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array lower_str_tmp_4 {"bc"}; 
+
+  std::array upper_str_tmp_4 {"BC"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_91_matcher::to_string() -> std::string{return R"('(ab|ab*)bc'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_92_matcher::to_string() -> std::string{return R"('a([bc]*)c*'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"d"}; 
+
+  std::array upper_str_tmp_3 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_93_matcher::to_string() -> std::string{return R"('a([bc]*)(c*d)'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"d"}; 
+
+  std::array upper_str_tmp_3 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_94_matcher::to_string() -> std::string{return R"('a([bc]+)(c*d)'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_2 {"c"}; 
+
+  std::array upper_str_tmp_2 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_3(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"d"}; 
+
+  std::array upper_str_tmp_3 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_95_matcher::to_string() -> std::string{return R"('a([bc]*)(c+d)'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"dcdcde"}; 
+
+  std::array upper_str_tmp_1 {"DCDCDE"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),6)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,6); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 6;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_96_matcher::to_string() -> std::string{return R"('a[bcd]*dcdcde'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"dcdcde"}; 
+
+  std::array upper_str_tmp_1 {"DCDCDE"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),6)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,6); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 6;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_97_matcher::to_string() -> std::string{return R"('a[bcd]+dcdcde'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"ab"}; 
+
+  std::array upper_str_tmp_0 {"AB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_1 {"a"}; 
+
+  std::array upper_str_tmp_1 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), cpp2::regex::no_reset(), func_2(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_3 {"b"}; 
+
+  std::array upper_str_tmp_3 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_3, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), cpp2::regex::no_reset(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_4 {"c"}; 
+
+  std::array upper_str_tmp_4 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_98_matcher::to_string() -> std::string{return R"('(ab|a)b*c'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_start(2, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(3, r.pos);
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+
+  std::array lower_str_tmp_4 {"c"}; 
+
+  std::array upper_str_tmp_4 {"C"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_4, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  ctx.set_group_start(4, r.pos);
+
+  std::array lower_str_tmp_6 {"d"}; 
+
+  std::array upper_str_tmp_6 {"D"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_6, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_12_case_insensitive::regex_99_matcher::to_string() -> std::string{return R"('((a)(b)c)(d)'i)"; }
+
+
+#line 397 "pure2-regex_12_case_insensitive.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_12_case_insensitive());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp2.output b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp2.output
new file mode 100644
index 0000000000..583aee46c3
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_12_case_insensitive.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp b/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
new file mode 100644
index 0000000000..79de954802
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
@@ -0,0 +1,10101 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_13_posessive_modifier.cpp2"
+
+#line 153 "pure2-regex_13_posessive_modifier.cpp2"
+class test_tests_13_posessive_modifier;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_13_posessive_modifier.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_13_posessive_modifier.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_13_posessive_modifier.cpp2"
+class test_tests_13_posessive_modifier {
+
+#line 202 "pure2-regex_13_posessive_modifier.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_25_matcher() = default;
+        public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_25_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_26_matcher() = default;
+        public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_26_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_27_matcher() = default;
+        public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_27_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_28_matcher() = default;
+        public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_28_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_29_matcher() = default;
+        public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_29_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_30_matcher() = default;
+        public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_30_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_31_matcher() = default;
+        public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_31_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_32_matcher() = default;
+        public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_32_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_33_matcher() = default;
+        public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_33_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_34_matcher() = default;
+        public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_34_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_35_matcher() = default;
+        public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_35_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_36_matcher() = default;
+        public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_36_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_37_matcher() = default;
+        public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_37_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_38_matcher() = default;
+        public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_38_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_39_matcher() = default;
+        public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_39_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_40_matcher() = default;
+        public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_40_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_41_matcher() = default;
+        public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_41_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_42_matcher() = default;
+        public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_42_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_43_matcher() = default;
+        public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_43_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_44_matcher() = default;
+        public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_44_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_45_matcher() = default;
+        public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_45_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_46_matcher() = default;
+        public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_46_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_47_matcher() = default;
+        public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_47_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_48_matcher() = default;
+        public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_48_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_48 {}; 
+  public: test_tests_13_posessive_modifier() = default;
+  public: test_tests_13_posessive_modifier(test_tests_13_posessive_modifier const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_13_posessive_modifier const&) -> void = delete;
+
+
+#line 254 "pure2-regex_13_posessive_modifier.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_13_posessive_modifier.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_13_posessive_modifier.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_13_posessive_modifier.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 202 "pure2-regex_13_posessive_modifier.cpp2"
+  auto test_tests_13_posessive_modifier::run() const& -> void{
+    std::cout << "Running tests_13_posessive_modifier:" << std::endl;
+    test(regex_01, "01", R"(a++a)", "aaaaa", "n", R"(-)", "-");
+    test(regex_02, "02", R"(a*+a)", "aaaaa", "n", R"(-)", "-");
+    test(regex_03, "03", R"(a{1,5}+a)", "aaaaa", "n", R"(-)", "-");
+    test(regex_04, "04", R"(a?+a)", "ab", "n", R"(-)", "-");
+    test(regex_05, "05", R"(a++b)", "aaaaab", "y", R"($&)", "aaaaab");
+    test(regex_06, "06", R"(a*+b)", "aaaaab", "y", R"($&)", "aaaaab");
+    test(regex_07, "07", R"(a{1,5}+b)", "aaaaab", "y", R"($&)", "aaaaab");
+    test(regex_08, "08", R"(a?+b)", "ab", "y", R"($&)", "ab");
+    test(regex_09, "09", R"(fooa++a)", "fooaaaaa", "n", R"(-)", "-");
+    test(regex_10, "10", R"(fooa*+a)", "fooaaaaa", "n", R"(-)", "-");
+    test(regex_11, "11", R"(fooa{1,5}+a)", "fooaaaaa", "n", R"(-)", "-");
+    test(regex_12, "12", R"(fooa?+a)", "fooab", "n", R"(-)", "-");
+    test(regex_13, "13", R"(fooa++b)", "fooaaaaab", "y", R"($&)", "fooaaaaab");
+    test(regex_14, "14", R"(fooa*+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab");
+    test(regex_15, "15", R"(fooa{1,5}+b)", "fooaaaaab", "y", R"($&)", "fooaaaaab");
+    test(regex_16, "16", R"(fooa?+b)", "fooab", "y", R"($&)", "fooab");
+    test(regex_17, "17", R"((aA)++(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA");
+    test(regex_18, "18", R"((aA|bB)++(aA|bB))", "aAaAbBaAbB", "n", R"(-)", "aAaAbBaAbB");
+    test(regex_19, "19", R"((aA)*+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA");
+    test(regex_20, "20", R"((aA|bB)*+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA");
+    test(regex_21, "21", R"((aA){1,5}+(aA))", "aAaAaAaAaA", "n", R"(-)", "aAaAaAaAaA");
+    test(regex_22, "22", R"((aA|bB){1,5}+(aA|bB))", "aAaAbBaAaA", "n", R"(-)", "aAaAbBaAaA");
+    test(regex_23, "23", R"((aA)?+(aA))", "aAb", "n", R"(-)", "aAb");
+    test(regex_24, "24", R"((aA|bB)?+(aA|bB))", "bBb", "n", R"(-)", "bBb");
+    test(regex_25, "25", R"((aA)++b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb");
+    test(regex_26, "26", R"((aA|bB)++b)", "aAbBaAaAbBb", "y", R"($&)", "aAbBaAaAbBb");
+    test(regex_27, "27", R"((aA)*+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb");
+    test(regex_28, "28", R"((aA|bB)*+b)", "bBbBbBbBbBb", "y", R"($&)", "bBbBbBbBbBb");
+    test(regex_29, "29", R"((aA){1,5}+b)", "aAaAaAaAaAb", "y", R"($&)", "aAaAaAaAaAb");
+    test(regex_30, "30", R"((aA|bB){1,5}+b)", "bBaAbBaAbBb", "y", R"($&)", "bBaAbBaAbBb");
+    test(regex_31, "31", R"((aA)?+b)", "aAb", "y", R"($&)", "aAb");
+    test(regex_32, "32", R"((aA|bB)?+b)", "bBb", "y", R"($&)", "bBb");
+    test(regex_33, "33", R"(foo(aA)++(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA");
+    test(regex_34, "34", R"(foo(aA|bB)++(aA|bB))", "foobBbBbBaAaA", "n", R"(-)", "foobBbBbBaAaA");
+    test(regex_35, "35", R"(foo(aA)*+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA");
+    test(regex_36, "36", R"(foo(aA|bB)*+(aA|bB))", "foobBaAbBaAaA", "n", R"(-)", "foobBaAbBaAaA");
+    test(regex_37, "37", R"(foo(aA){1,5}+(aA))", "fooaAaAaAaAaA", "n", R"(-)", "fooaAaAaAaAaA");
+    test(regex_38, "38", R"(foo(aA|bB){1,5}+(aA|bB))", "fooaAbBbBaAaA", "n", R"(-)", "fooaAbBbBaAaA");
+    test(regex_39, "39", R"(foo(aA)?+(aA))", "fooaAb", "n", R"(-)", "fooaAb");
+    test(regex_40, "40", R"(foo(aA|bB)?+(aA|bB))", "foobBb", "n", R"(-)", "foobBb");
+    test(regex_41, "41", R"(foo(aA)++b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb");
+    test(regex_42, "42", R"(foo(aA|bB)++b)", "foobBaAbBaAbBb", "y", R"($&)", "foobBaAbBaAbBb");
+    test(regex_43, "43", R"(foo(aA)*+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb");
+    test(regex_44, "44", R"(foo(aA|bB)*+b)", "foobBbBaAaAaAb", "y", R"($&)", "foobBbBaAaAaAb");
+    test(regex_45, "45", R"(foo(aA){1,5}+b)", "fooaAaAaAaAaAb", "y", R"($&)", "fooaAaAaAaAaAb");
+    test(regex_46, "46", R"(foo(aA|bB){1,5}+b)", "foobBaAaAaAaAb", "y", R"($&)", "foobBaAaAaAaAb");
+    test(regex_47, "47", R"(foo(aA)?+b)", "fooaAb", "y", R"($&)", "fooaAb");
+    test(regex_48, "48", R"(foo(aA|bB)?+b)", "foobBb", "y", R"($&)", "foobBb");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::to_string() -> std::string{return R"(a++a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::to_string() -> std::string{return R"(a*+a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::to_string() -> std::string{return R"(a{1,5}+a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::to_string() -> std::string{return R"(a?+a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::to_string() -> std::string{return R"(a++b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::to_string() -> std::string{return R"(a*+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::to_string() -> std::string{return R"(a{1,5}+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::to_string() -> std::string{return R"(a?+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::to_string() -> std::string{return R"(fooa++a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::to_string() -> std::string{return R"(fooa*+a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::to_string() -> std::string{return R"(fooa{1,5}+a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::to_string() -> std::string{return R"(fooa?+a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::to_string() -> std::string{return R"(fooa++b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::to_string() -> std::string{return R"(fooa*+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::to_string() -> std::string{return R"(fooa{1,5}+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::to_string() -> std::string{return R"(fooa?+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_2 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::to_string() -> std::string{return R"((aA)++(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::to_string() -> std::string{return R"((aA|bB)++(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_2 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::to_string() -> std::string{return R"((aA)*+(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::to_string() -> std::string{return R"((aA|bB)*+(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_2 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::to_string() -> std::string{return R"((aA){1,5}+(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_2 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::to_string() -> std::string{return R"((aA)?+(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::to_string() -> std::string{return R"((aA|bB)?+(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::to_string() -> std::string{return R"((aA)++b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::to_string() -> std::string{return R"((aA|bB)++b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::to_string() -> std::string{return R"((aA)*+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::to_string() -> std::string{return R"((aA|bB)*+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::to_string() -> std::string{return R"((aA){1,5}+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::to_string() -> std::string{return R"((aA)?+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::to_string() -> std::string{return R"((aA|bB)?+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::to_string() -> std::string{return R"(foo(aA)++(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_5 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::to_string() -> std::string{return R"(foo(aA|bB)++(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::to_string() -> std::string{return R"(foo(aA)*+(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_5 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_5 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_3 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::to_string() -> std::string{return R"(foo(aA)?+(aA))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_5 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), cpp2::regex::no_reset(), func_7(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+(aA|bB))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::to_string() -> std::string{return R"(foo(aA)++b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::to_string() -> std::string{return R"(foo(aA|bB)++b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::to_string() -> std::string{return R"(foo(aA)*+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::to_string() -> std::string{return R"(foo(aA)?+b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"aA"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"bB"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_0(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+b)"; }
+
+
+#line 255 "pure2-regex_13_posessive_modifier.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_13_posessive_modifier());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output
new file mode 100644
index 0000000000..9eac6e2c0b
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_13_posessive_modifier.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp
new file mode 100644
index 0000000000..2e1eddd171
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp
@@ -0,0 +1,15675 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_14_multiline_modifier.cpp2"
+
+#line 153 "pure2-regex_14_multiline_modifier.cpp2"
+class test_tests_14_multiline_modifier;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_14_multiline_modifier.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_14_multiline_modifier.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_14_multiline_modifier.cpp2"
+class test_tests_14_multiline_modifier {
+
+#line 353 "pure2-regex_14_multiline_modifier.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_100_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_100_matcher() = default;
+        public: regex_100_matcher(regex_100_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_100_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_100 {}; public: class regex_101_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_101_matcher() = default;
+        public: regex_101_matcher(regex_101_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_101_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_101 {}; public: class regex_102_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_102_matcher() = default;
+        public: regex_102_matcher(regex_102_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_102_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_102 {}; public: class regex_103_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_103_matcher() = default;
+        public: regex_103_matcher(regex_103_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_103_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_103 {}; public: class regex_104_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_104_matcher() = default;
+        public: regex_104_matcher(regex_104_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_104_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_104 {}; public: class regex_105_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_105_matcher() = default;
+        public: regex_105_matcher(regex_105_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_105_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_105 {}; public: class regex_106_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_106_matcher() = default;
+        public: regex_106_matcher(regex_106_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_106_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_106 {}; public: class regex_107_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_107_matcher() = default;
+        public: regex_107_matcher(regex_107_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_107_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_107 {}; public: class regex_108_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_108_matcher() = default;
+        public: regex_108_matcher(regex_108_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_108_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_108 {}; public: class regex_109_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_109_matcher() = default;
+        public: regex_109_matcher(regex_109_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_109_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_109 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_110_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_110_matcher() = default;
+        public: regex_110_matcher(regex_110_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_110_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_110 {}; public: class regex_111_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_111_matcher() = default;
+        public: regex_111_matcher(regex_111_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_111_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_111 {}; public: class regex_112_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_112_matcher() = default;
+        public: regex_112_matcher(regex_112_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_112_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_112 {}; public: class regex_113_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_113_matcher() = default;
+        public: regex_113_matcher(regex_113_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_113_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_113 {}; public: class regex_114_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_114_matcher() = default;
+        public: regex_114_matcher(regex_114_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_114_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_114 {}; public: class regex_115_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_115_matcher() = default;
+        public: regex_115_matcher(regex_115_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_115_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_115 {}; public: class regex_116_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_116_matcher() = default;
+        public: regex_116_matcher(regex_116_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_116_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_116 {}; public: class regex_117_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_117_matcher() = default;
+        public: regex_117_matcher(regex_117_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_117_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_117 {}; public: class regex_118_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_118_matcher() = default;
+        public: regex_118_matcher(regex_118_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_118_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_118 {}; public: class regex_119_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_119_matcher() = default;
+        public: regex_119_matcher(regex_119_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_119_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_119 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_120_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_120_matcher() = default;
+        public: regex_120_matcher(regex_120_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_120_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_120 {}; public: class regex_121_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_121_matcher() = default;
+        public: regex_121_matcher(regex_121_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_121_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_121 {}; public: class regex_122_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_122_matcher() = default;
+        public: regex_122_matcher(regex_122_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_122_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_122 {}; public: class regex_123_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_123_matcher() = default;
+        public: regex_123_matcher(regex_123_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_123_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_123 {}; public: class regex_124_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_124_matcher() = default;
+        public: regex_124_matcher(regex_124_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_124_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_124 {}; public: class regex_125_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_125_matcher() = default;
+        public: regex_125_matcher(regex_125_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_125_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_125 {}; public: class regex_126_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_126_matcher() = default;
+        public: regex_126_matcher(regex_126_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_126_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_126 {}; public: class regex_127_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_127_matcher() = default;
+        public: regex_127_matcher(regex_127_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_127_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_127 {}; public: class regex_128_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_128_matcher() = default;
+        public: regex_128_matcher(regex_128_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_128_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_128 {}; public: class regex_129_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_129_matcher() = default;
+        public: regex_129_matcher(regex_129_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_129_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_129 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_130_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_130_matcher() = default;
+        public: regex_130_matcher(regex_130_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_130_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_130 {}; public: class regex_131_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_131_matcher() = default;
+        public: regex_131_matcher(regex_131_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_131_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_131 {}; public: class regex_132_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_132_matcher() = default;
+        public: regex_132_matcher(regex_132_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_132_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_132 {}; public: class regex_133_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_133_matcher() = default;
+        public: regex_133_matcher(regex_133_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_133_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_133 {}; public: class regex_134_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_134_matcher() = default;
+        public: regex_134_matcher(regex_134_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_134_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_134 {}; public: class regex_135_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_135_matcher() = default;
+        public: regex_135_matcher(regex_135_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_135_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_135 {}; public: class regex_136_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_136_matcher() = default;
+        public: regex_136_matcher(regex_136_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_136_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_136 {}; public: class regex_137_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_137_matcher() = default;
+        public: regex_137_matcher(regex_137_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_137_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_137 {}; public: class regex_138_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_138_matcher() = default;
+        public: regex_138_matcher(regex_138_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_138_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_138 {}; public: class regex_139_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_139_matcher() = default;
+        public: regex_139_matcher(regex_139_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_139_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_139 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_140_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_140_matcher() = default;
+        public: regex_140_matcher(regex_140_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_140_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_140 {}; public: class regex_141_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_141_matcher() = default;
+        public: regex_141_matcher(regex_141_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_141_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_141 {}; public: class regex_142_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_142_matcher() = default;
+        public: regex_142_matcher(regex_142_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_142_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_142 {}; public: class regex_143_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_143_matcher() = default;
+        public: regex_143_matcher(regex_143_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_143_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_143 {}; public: class regex_144_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_144_matcher() = default;
+        public: regex_144_matcher(regex_144_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_144_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_144 {}; public: class regex_145_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_145_matcher() = default;
+        public: regex_145_matcher(regex_145_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_145_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_145 {}; public: class regex_146_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_146_matcher() = default;
+        public: regex_146_matcher(regex_146_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_146_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_146 {}; public: class regex_147_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_147_matcher() = default;
+        public: regex_147_matcher(regex_147_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_147_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_147 {}; public: class regex_148_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_148_matcher() = default;
+        public: regex_148_matcher(regex_148_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_148_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_148 {}; public: class regex_149_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_149_matcher() = default;
+        public: regex_149_matcher(regex_149_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_149_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_149 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_150_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_150_matcher() = default;
+        public: regex_150_matcher(regex_150_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_150_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_150 {}; public: class regex_151_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_151_matcher() = default;
+        public: regex_151_matcher(regex_151_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_151_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_151 {}; public: class regex_152_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_152_matcher() = default;
+        public: regex_152_matcher(regex_152_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_152_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_152 {}; public: class regex_153_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_153_matcher() = default;
+        public: regex_153_matcher(regex_153_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_153_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_153 {}; public: class regex_154_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_154_matcher() = default;
+        public: regex_154_matcher(regex_154_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_154_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_154 {}; public: class regex_155_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_155_matcher() = default;
+        public: regex_155_matcher(regex_155_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_155_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_155 {}; public: class regex_156_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_156_matcher() = default;
+        public: regex_156_matcher(regex_156_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_156_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_156 {}; public: class regex_157_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_157_matcher() = default;
+        public: regex_157_matcher(regex_157_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_157_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_157 {}; public: class regex_158_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_158_matcher() = default;
+        public: regex_158_matcher(regex_158_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_158_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_158 {}; public: class regex_159_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_159_matcher() = default;
+        public: regex_159_matcher(regex_159_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_159_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_159 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_160_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_160_matcher() = default;
+        public: regex_160_matcher(regex_160_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_160_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_160 {}; public: class regex_161_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_161_matcher() = default;
+        public: regex_161_matcher(regex_161_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_161_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_161 {}; public: class regex_162_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_162_matcher() = default;
+        public: regex_162_matcher(regex_162_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_162_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_162 {}; public: class regex_163_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_163_matcher() = default;
+        public: regex_163_matcher(regex_163_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_163_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_163 {}; public: class regex_164_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_164_matcher() = default;
+        public: regex_164_matcher(regex_164_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_164_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_164 {}; public: class regex_165_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_165_matcher() = default;
+        public: regex_165_matcher(regex_165_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_165_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_165 {}; public: class regex_166_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_166_matcher() = default;
+        public: regex_166_matcher(regex_166_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_166_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_166 {}; public: class regex_167_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_167_matcher() = default;
+        public: regex_167_matcher(regex_167_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_167_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_167 {}; public: class regex_168_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_168_matcher() = default;
+        public: regex_168_matcher(regex_168_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_168_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_168 {}; public: class regex_169_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_169_matcher() = default;
+        public: regex_169_matcher(regex_169_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_169_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_169 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_170_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_170_matcher() = default;
+        public: regex_170_matcher(regex_170_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_170_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_170 {}; public: class regex_171_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_171_matcher() = default;
+        public: regex_171_matcher(regex_171_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_171_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_171 {}; public: class regex_172_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_172_matcher() = default;
+        public: regex_172_matcher(regex_172_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_172_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_172 {}; public: class regex_173_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_173_matcher() = default;
+        public: regex_173_matcher(regex_173_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_173_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_173 {}; public: class regex_174_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_174_matcher() = default;
+        public: regex_174_matcher(regex_174_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_174_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_174 {}; public: class regex_175_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_175_matcher() = default;
+        public: regex_175_matcher(regex_175_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_175_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_175 {}; public: class regex_176_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_176_matcher() = default;
+        public: regex_176_matcher(regex_176_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_176_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_176 {}; public: class regex_177_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_177_matcher() = default;
+        public: regex_177_matcher(regex_177_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_177_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_177 {}; public: class regex_178_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_178_matcher() = default;
+        public: regex_178_matcher(regex_178_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_178_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_178 {}; public: class regex_179_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_179_matcher() = default;
+        public: regex_179_matcher(regex_179_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_179_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_179 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_180_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_180_matcher() = default;
+        public: regex_180_matcher(regex_180_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_180_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_180 {}; public: class regex_181_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_181_matcher() = default;
+        public: regex_181_matcher(regex_181_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_181_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_181 {}; public: class regex_182_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_182_matcher() = default;
+        public: regex_182_matcher(regex_182_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_182_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_182 {}; public: class regex_183_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_183_matcher() = default;
+        public: regex_183_matcher(regex_183_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_183_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_183 {}; public: class regex_184_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_184_matcher() = default;
+        public: regex_184_matcher(regex_184_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_184_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_184 {}; public: class regex_185_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_185_matcher() = default;
+        public: regex_185_matcher(regex_185_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_185_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_185 {}; public: class regex_186_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_186_matcher() = default;
+        public: regex_186_matcher(regex_186_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_186_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_186 {}; public: class regex_187_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_187_matcher() = default;
+        public: regex_187_matcher(regex_187_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_187_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_187 {}; public: class regex_188_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_188_matcher() = default;
+        public: regex_188_matcher(regex_188_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_188_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_188 {}; public: class regex_189_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_189_matcher() = default;
+        public: regex_189_matcher(regex_189_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_189_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_189 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_190_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_190_matcher() = default;
+        public: regex_190_matcher(regex_190_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_190_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_190 {}; public: class regex_191_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_191_matcher() = default;
+        public: regex_191_matcher(regex_191_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_191_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_191 {}; public: class regex_192_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_192_matcher() = default;
+        public: regex_192_matcher(regex_192_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_192_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_192 {}; public: class regex_193_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_193_matcher() = default;
+        public: regex_193_matcher(regex_193_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_193_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_193 {}; public: class regex_194_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_194_matcher() = default;
+        public: regex_194_matcher(regex_194_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_194_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_194 {}; public: class regex_195_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_195_matcher() = default;
+        public: regex_195_matcher(regex_195_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_195_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_195 {}; public: class regex_196_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_196_matcher() = default;
+        public: regex_196_matcher(regex_196_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_196_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_196 {}; public: class regex_197_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_197_matcher() = default;
+        public: regex_197_matcher(regex_197_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_197_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_197 {}; public: class regex_198_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_198_matcher() = default;
+        public: regex_198_matcher(regex_198_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_198_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_198 {}; public: class regex_199_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_199_matcher() = default;
+        public: regex_199_matcher(regex_199_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_199_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_199 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_25_matcher() = default;
+        public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_25_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_26_matcher() = default;
+        public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_26_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_27_matcher() = default;
+        public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_27_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_28_matcher() = default;
+        public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_28_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_29_matcher() = default;
+        public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_29_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_30_matcher() = default;
+        public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_30_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_31_matcher() = default;
+        public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_31_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_32_matcher() = default;
+        public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_32_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_33_matcher() = default;
+        public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_33_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_34_matcher() = default;
+        public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_34_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_35_matcher() = default;
+        public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_35_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_36_matcher() = default;
+        public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_36_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_37_matcher() = default;
+        public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_37_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_38_matcher() = default;
+        public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_38_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_39_matcher() = default;
+        public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_39_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_40_matcher() = default;
+        public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_40_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_41_matcher() = default;
+        public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_41_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_42_matcher() = default;
+        public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_42_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_43_matcher() = default;
+        public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_43_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_44_matcher() = default;
+        public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_44_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_45_matcher() = default;
+        public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_45_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_46_matcher() = default;
+        public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_46_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_47_matcher() = default;
+        public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_47_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_48_matcher() = default;
+        public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_48_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_49_matcher() = default;
+        public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_49_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_50_matcher() = default;
+        public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_50_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_51_matcher() = default;
+        public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_51_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_52_matcher() = default;
+        public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_52_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_53_matcher() = default;
+        public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_53_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_53 {}; public: class regex_54_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_54_matcher() = default;
+        public: regex_54_matcher(regex_54_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_54_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_54 {}; public: class regex_55_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_55_matcher() = default;
+        public: regex_55_matcher(regex_55_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_55_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_55 {}; public: class regex_56_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_56_matcher() = default;
+        public: regex_56_matcher(regex_56_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_56_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_56 {}; public: class regex_57_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_57_matcher() = default;
+        public: regex_57_matcher(regex_57_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_57_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_57 {}; public: class regex_58_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_58_matcher() = default;
+        public: regex_58_matcher(regex_58_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_58_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_58 {}; public: class regex_59_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_59_matcher() = default;
+        public: regex_59_matcher(regex_59_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_59_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_59 {}; public: class regex_60_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_60_matcher() = default;
+        public: regex_60_matcher(regex_60_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_60_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_60 {}; public: class regex_61_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_61_matcher() = default;
+        public: regex_61_matcher(regex_61_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_61_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_61 {}; public: class regex_62_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_62_matcher() = default;
+        public: regex_62_matcher(regex_62_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_62_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_62 {}; public: class regex_63_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_63_matcher() = default;
+        public: regex_63_matcher(regex_63_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_63_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_63 {}; public: class regex_64_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_64_matcher() = default;
+        public: regex_64_matcher(regex_64_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_64_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_64 {}; public: class regex_65_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_65_matcher() = default;
+        public: regex_65_matcher(regex_65_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_65_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_65 {}; public: class regex_66_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_66_matcher() = default;
+        public: regex_66_matcher(regex_66_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_66_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_66 {}; public: class regex_67_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_67_matcher() = default;
+        public: regex_67_matcher(regex_67_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_67_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_67 {}; public: class regex_68_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_68_matcher() = default;
+        public: regex_68_matcher(regex_68_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_68_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_68 {}; public: class regex_69_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_69_matcher() = default;
+        public: regex_69_matcher(regex_69_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_69_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_69 {}; public: class regex_70_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_70_matcher() = default;
+        public: regex_70_matcher(regex_70_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_70_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_70 {}; public: class regex_71_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_71_matcher() = default;
+        public: regex_71_matcher(regex_71_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_71_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_71 {}; public: class regex_72_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_72_matcher() = default;
+        public: regex_72_matcher(regex_72_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_72_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_72 {}; public: class regex_73_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_73_matcher() = default;
+        public: regex_73_matcher(regex_73_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_73_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_73 {}; public: class regex_74_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_74_matcher() = default;
+        public: regex_74_matcher(regex_74_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_74_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_74 {}; public: class regex_75_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_75_matcher() = default;
+        public: regex_75_matcher(regex_75_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_75_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_75 {}; public: class regex_76_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_76_matcher() = default;
+        public: regex_76_matcher(regex_76_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_76_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_76 {}; public: class regex_77_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_77_matcher() = default;
+        public: regex_77_matcher(regex_77_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_77_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_77 {}; public: class regex_78_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_78_matcher() = default;
+        public: regex_78_matcher(regex_78_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_78_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_78 {}; public: class regex_79_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_79_matcher() = default;
+        public: regex_79_matcher(regex_79_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_79_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_79 {}; public: class regex_80_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_80_matcher() = default;
+        public: regex_80_matcher(regex_80_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_80_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_80 {}; public: class regex_81_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_81_matcher() = default;
+        public: regex_81_matcher(regex_81_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_81_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_81 {}; public: class regex_82_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_82_matcher() = default;
+        public: regex_82_matcher(regex_82_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_82_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_82 {}; public: class regex_83_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_83_matcher() = default;
+        public: regex_83_matcher(regex_83_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_83_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_83 {}; public: class regex_84_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_84_matcher() = default;
+        public: regex_84_matcher(regex_84_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_84_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_84 {}; public: class regex_85_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_85_matcher() = default;
+        public: regex_85_matcher(regex_85_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_85_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_85 {}; public: class regex_86_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_86_matcher() = default;
+        public: regex_86_matcher(regex_86_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_86_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_86 {}; public: class regex_87_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_87_matcher() = default;
+        public: regex_87_matcher(regex_87_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_87_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_87 {}; public: class regex_88_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_88_matcher() = default;
+        public: regex_88_matcher(regex_88_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_88_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_88 {}; public: class regex_89_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_89_matcher() = default;
+        public: regex_89_matcher(regex_89_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_89_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_89 {}; public: class regex_90_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_90_matcher() = default;
+        public: regex_90_matcher(regex_90_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_90_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_90 {}; public: class regex_91_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_91_matcher() = default;
+        public: regex_91_matcher(regex_91_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_91_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_91 {}; public: class regex_92_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_92_matcher() = default;
+        public: regex_92_matcher(regex_92_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_92_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_92 {}; public: class regex_93_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_93_matcher() = default;
+        public: regex_93_matcher(regex_93_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_93_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_93 {}; public: class regex_94_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_94_matcher() = default;
+        public: regex_94_matcher(regex_94_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_94_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_94 {}; public: class regex_95_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_95_matcher() = default;
+        public: regex_95_matcher(regex_95_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_95_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_95 {}; public: class regex_96_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_96_matcher() = default;
+        public: regex_96_matcher(regex_96_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_96_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_96 {}; public: class regex_97_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_97_matcher() = default;
+        public: regex_97_matcher(regex_97_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_97_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_97 {}; public: class regex_98_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_98_matcher() = default;
+        public: regex_98_matcher(regex_98_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_98_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_98 {}; public: class regex_99_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_99_matcher() = default;
+        public: regex_99_matcher(regex_99_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_99_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_99 {}; 
+  public: test_tests_14_multiline_modifier() = default;
+  public: test_tests_14_multiline_modifier(test_tests_14_multiline_modifier const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_14_multiline_modifier const&) -> void = delete;
+
+
+#line 556 "pure2-regex_14_multiline_modifier.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_14_multiline_modifier.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_14_multiline_modifier.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_14_multiline_modifier.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 353 "pure2-regex_14_multiline_modifier.cpp2"
+  auto test_tests_14_multiline_modifier::run() const& -> void{
+    std::cout << "Running tests_14_multiline_modifier:" << std::endl;
+    test(regex_01, "01", R"(\Z)", "a\nb\n", "y", R"($-[0])", "3");
+    test(regex_02, "02", R"(\z)", "a\nb\n", "y", R"($-[0])", "4");
+    test(regex_03, "03", R"($)", "a\nb\n", "y", R"($-[0])", "3");
+    test(regex_04, "04", R"(\Z)", "b\na\n", "y", R"($-[0])", "3");
+    test(regex_05, "05", R"(\z)", "b\na\n", "y", R"($-[0])", "4");
+    test(regex_06, "06", R"($)", "b\na\n", "y", R"($-[0])", "3");
+    test(regex_07, "07", R"(\Z)", "b\na", "y", R"($-[0])", "3");
+    test(regex_08, "08", R"(\z)", "b\na", "y", R"($-[0])", "3");
+    test(regex_09, "09", R"($)", "b\na", "y", R"($-[0])", "3");
+    test(regex_10, "10", R"('\Z'm)", "a\nb\n", "y", R"($-[0])", "3");
+    test(regex_11, "11", R"('\z'm)", "a\nb\n", "y", R"($-[0])", "4");
+    test(regex_12, "12", R"('$'m)", "a\nb\n", "y", R"($-[0])", "1");
+    test(regex_13, "13", R"('\Z'm)", "b\na\n", "y", R"($-[0])", "3");
+    test(regex_14, "14", R"('\z'm)", "b\na\n", "y", R"($-[0])", "4");
+    test(regex_15, "15", R"('$'m)", "b\na\n", "y", R"($-[0])", "1");
+    test(regex_16, "16", R"('\Z'm)", "b\na", "y", R"($-[0])", "3");
+    test(regex_17, "17", R"('\z'm)", "b\na", "y", R"($-[0])", "3");
+    test(regex_18, "18", R"('$'m)", "b\na", "y", R"($-[0])", "1");
+    test(regex_19, "19", R"(a\Z)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_20, "20", R"(a\z)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_21, "21", R"(a$)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_22, "22", R"(a\Z)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_23, "23", R"(a\z)", "b\na\n", "n", R"(-)", "-");
+    test(regex_24, "24", R"(a$)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_25, "25", R"(a\Z)", "b\na", "y", R"($-[0])", "2");
+    test(regex_26, "26", R"(a\z)", "b\na", "y", R"($-[0])", "2");
+    test(regex_27, "27", R"(a$)", "b\na", "y", R"($-[0])", "2");
+    test(regex_28, "28", R"('a\Z'm)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_29, "29", R"('a\z'm)", "a\nb\n", "n", R"(-)", "-");
+    test(regex_30, "30", R"('a$'m)", "a\nb\n", "y", R"($-[0])", "0");
+    test(regex_31, "31", R"('a\Z'm)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_32, "32", R"('a\z'm)", "b\na\n", "n", R"(-)", "-");
+    test(regex_33, "33", R"('a$'m)", "b\na\n", "y", R"($-[0])", "2");
+    test(regex_34, "34", R"('a\Z'm)", "b\na", "y", R"($-[0])", "2");
+    test(regex_35, "35", R"('a\z'm)", "b\na", "y", R"($-[0])", "2");
+    test(regex_36, "36", R"('a$'m)", "b\na", "y", R"($-[0])", "2");
+    test(regex_37, "37", R"(aa\Z)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_38, "38", R"(aa\z)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_39, "39", R"(aa$)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_40, "40", R"(aa\Z)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_41, "41", R"(aa\z)", "b\naa\n", "n", R"(-)", "-");
+    test(regex_42, "42", R"(aa$)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_43, "43", R"(aa\Z)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_44, "44", R"(aa\z)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_45, "45", R"(aa$)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_46, "46", R"('aa\Z'm)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_47, "47", R"('aa\z'm)", "aa\nb\n", "n", R"(-)", "-");
+    test(regex_48, "48", R"('aa$'m)", "aa\nb\n", "y", R"($-[0])", "0");
+    test(regex_49, "49", R"('aa\Z'm)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_50, "50", R"('aa\z'm)", "b\naa\n", "n", R"(-)", "-");
+    test(regex_51, "51", R"('aa$'m)", "b\naa\n", "y", R"($-[0])", "2");
+    test(regex_52, "52", R"('aa\Z'm)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_53, "53", R"('aa\z'm)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_54, "54", R"('aa$'m)", "b\naa", "y", R"($-[0])", "2");
+    test(regex_55, "55", R"(aa\Z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_56, "56", R"(aa\z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_57, "57", R"(aa$)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_58, "58", R"(aa\Z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_59, "59", R"(aa\z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_60, "60", R"(aa$)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_61, "61", R"(aa\Z)", "b\nac", "n", R"(-)", "-");
+    test(regex_62, "62", R"(aa\z)", "b\nac", "n", R"(-)", "-");
+    test(regex_63, "63", R"(aa$)", "b\nac", "n", R"(-)", "-");
+    test(regex_64, "64", R"('aa\Z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_65, "65", R"('aa\z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_66, "66", R"('aa$'m)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_67, "67", R"('aa\Z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_68, "68", R"('aa\z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_69, "69", R"('aa$'m)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_70, "70", R"('aa\Z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_71, "71", R"('aa\z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_72, "72", R"('aa$'m)", "b\nac", "n", R"(-)", "-");
+    test(regex_73, "73", R"(aa\Z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_74, "74", R"(aa\z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_75, "75", R"(aa$)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_76, "76", R"(aa\Z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_77, "77", R"(aa\z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_78, "78", R"(aa$)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_79, "79", R"(aa\Z)", "b\nca", "n", R"(-)", "-");
+    test(regex_80, "80", R"(aa\z)", "b\nca", "n", R"(-)", "-");
+    test(regex_81, "81", R"(aa$)", "b\nca", "n", R"(-)", "-");
+    test(regex_82, "82", R"('aa\Z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_83, "83", R"('aa\z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_84, "84", R"('aa$'m)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_85, "85", R"('aa\Z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_86, "86", R"('aa\z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_87, "87", R"('aa$'m)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_88, "88", R"('aa\Z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_89, "89", R"('aa\z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_90, "90", R"('aa$'m)", "b\nca", "n", R"(-)", "-");
+    test(regex_91, "91", R"(ab\Z)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_92, "92", R"(ab\z)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_93, "93", R"(ab$)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_94, "94", R"(ab\Z)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_95, "95", R"(ab\z)", "b\nab\n", "n", R"(-)", "-");
+    test(regex_96, "96", R"(ab$)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_97, "97", R"(ab\Z)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_98, "98", R"(ab\z)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_99, "99", R"(ab$)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_100, "100", R"('ab\Z'm)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_101, "101", R"('ab\z'm)", "ab\nb\n", "n", R"(-)", "-");
+    test(regex_102, "102", R"('ab$'m)", "ab\nb\n", "y", R"($-[0])", "0");
+    test(regex_103, "103", R"('ab\Z'm)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_104, "104", R"('ab\z'm)", "b\nab\n", "n", R"(-)", "-");
+    test(regex_105, "105", R"('ab$'m)", "b\nab\n", "y", R"($-[0])", "2");
+    test(regex_106, "106", R"('ab\Z'm)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_107, "107", R"('ab\z'm)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_108, "108", R"('ab$'m)", "b\nab", "y", R"($-[0])", "2");
+    test(regex_109, "109", R"(ab\Z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_110, "110", R"(ab\z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_111, "111", R"(ab$)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_112, "112", R"(ab\Z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_113, "113", R"(ab\z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_114, "114", R"(ab$)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_115, "115", R"(ab\Z)", "b\nac", "n", R"(-)", "-");
+    test(regex_116, "116", R"(ab\z)", "b\nac", "n", R"(-)", "-");
+    test(regex_117, "117", R"(ab$)", "b\nac", "n", R"(-)", "-");
+    test(regex_118, "118", R"('ab\Z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_119, "119", R"('ab\z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_120, "120", R"('ab$'m)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_121, "121", R"('ab\Z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_122, "122", R"('ab\z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_123, "123", R"('ab$'m)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_124, "124", R"('ab\Z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_125, "125", R"('ab\z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_126, "126", R"('ab$'m)", "b\nac", "n", R"(-)", "-");
+    test(regex_127, "127", R"(ab\Z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_128, "128", R"(ab\z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_129, "129", R"(ab$)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_130, "130", R"(ab\Z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_131, "131", R"(ab\z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_132, "132", R"(ab$)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_133, "133", R"(ab\Z)", "b\nca", "n", R"(-)", "-");
+    test(regex_134, "134", R"(ab\z)", "b\nca", "n", R"(-)", "-");
+    test(regex_135, "135", R"(ab$)", "b\nca", "n", R"(-)", "-");
+    test(regex_136, "136", R"('ab\Z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_137, "137", R"('ab\z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_138, "138", R"('ab$'m)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_139, "139", R"('ab\Z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_140, "140", R"('ab\z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_141, "141", R"('ab$'m)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_142, "142", R"('ab\Z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_143, "143", R"('ab\z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_144, "144", R"('ab$'m)", "b\nca", "n", R"(-)", "-");
+    test(regex_145, "145", R"(abb\Z)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_146, "146", R"(abb\z)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_147, "147", R"(abb$)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_148, "148", R"(abb\Z)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_149, "149", R"(abb\z)", "b\nabb\n", "n", R"(-)", "-");
+    test(regex_150, "150", R"(abb$)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_151, "151", R"(abb\Z)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_152, "152", R"(abb\z)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_153, "153", R"(abb$)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_154, "154", R"('abb\Z'm)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_155, "155", R"('abb\z'm)", "abb\nb\n", "n", R"(-)", "-");
+    test(regex_156, "156", R"('abb$'m)", "abb\nb\n", "y", R"($-[0])", "0");
+    test(regex_157, "157", R"('abb\Z'm)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_158, "158", R"('abb\z'm)", "b\nabb\n", "n", R"(-)", "-");
+    test(regex_159, "159", R"('abb$'m)", "b\nabb\n", "y", R"($-[0])", "2");
+    test(regex_160, "160", R"('abb\Z'm)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_161, "161", R"('abb\z'm)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_162, "162", R"('abb$'m)", "b\nabb", "y", R"($-[0])", "2");
+    test(regex_163, "163", R"(abb\Z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_164, "164", R"(abb\z)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_165, "165", R"(abb$)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_166, "166", R"(abb\Z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_167, "167", R"(abb\z)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_168, "168", R"(abb$)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_169, "169", R"(abb\Z)", "b\nac", "n", R"(-)", "-");
+    test(regex_170, "170", R"(abb\z)", "b\nac", "n", R"(-)", "-");
+    test(regex_171, "171", R"(abb$)", "b\nac", "n", R"(-)", "-");
+    test(regex_172, "172", R"('abb\Z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_173, "173", R"('abb\z'm)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_174, "174", R"('abb$'m)", "ac\nb\n", "n", R"(-)", "-");
+    test(regex_175, "175", R"('abb\Z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_176, "176", R"('abb\z'm)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_177, "177", R"('abb$'m)", "b\nac\n", "n", R"(-)", "-");
+    test(regex_178, "178", R"('abb\Z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_179, "179", R"('abb\z'm)", "b\nac", "n", R"(-)", "-");
+    test(regex_180, "180", R"('abb$'m)", "b\nac", "n", R"(-)", "-");
+    test(regex_181, "181", R"(abb\Z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_182, "182", R"(abb\z)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_183, "183", R"(abb$)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_184, "184", R"(abb\Z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_185, "185", R"(abb\z)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_186, "186", R"(abb$)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_187, "187", R"(abb\Z)", "b\nca", "n", R"(-)", "-");
+    test(regex_188, "188", R"(abb\z)", "b\nca", "n", R"(-)", "-");
+    test(regex_189, "189", R"(abb$)", "b\nca", "n", R"(-)", "-");
+    test(regex_190, "190", R"('abb\Z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_191, "191", R"('abb\z'm)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_192, "192", R"('abb$'m)", "ca\nb\n", "n", R"(-)", "-");
+    test(regex_193, "193", R"('abb\Z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_194, "194", R"('abb\z'm)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_195, "195", R"('abb$'m)", "b\nca\n", "n", R"(-)", "-");
+    test(regex_196, "196", R"('abb\Z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_197, "197", R"('abb\z'm)", "b\nca", "n", R"(-)", "-");
+    test(regex_198, "198", R"('abb$'m)", "b\nca", "n", R"(-)", "-");
+    test(regex_199, "199", R"('\Aa$'m)", "a\n\n", "y", R"($&)", "a");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_01_matcher::to_string() -> std::string{return R"(\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_02_matcher::to_string() -> std::string{return R"(\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_03_matcher::to_string() -> std::string{return R"($)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_04_matcher::to_string() -> std::string{return R"(\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_05_matcher::to_string() -> std::string{return R"(\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_06_matcher::to_string() -> std::string{return R"($)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_07_matcher::to_string() -> std::string{return R"(\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_08_matcher::to_string() -> std::string{return R"(\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_09_matcher::to_string() -> std::string{return R"($)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_10_matcher::to_string() -> std::string{return R"('\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_100_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_101_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_102_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_103_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_104_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_105_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_106_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_107_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_108_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_109_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_11_matcher::to_string() -> std::string{return R"('\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_110_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_111_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_112_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_113_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_114_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_115_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_116_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_117_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_118_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_119_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_12_matcher::to_string() -> std::string{return R"('$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_120_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_121_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_122_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_123_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_124_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_125_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_126_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_127_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_128_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_129_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_13_matcher::to_string() -> std::string{return R"('\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_130_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_131_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_132_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_133_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_134_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_135_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_136_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_137_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_138_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_139_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_14_matcher::to_string() -> std::string{return R"('\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_140_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_141_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_142_matcher::to_string() -> std::string{return R"('ab\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_143_matcher::to_string() -> std::string{return R"('ab\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_144_matcher::to_string() -> std::string{return R"('ab$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_145_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_146_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_147_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_148_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_149_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_15_matcher::to_string() -> std::string{return R"('$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_150_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_151_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_152_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_153_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_154_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_155_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_156_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_157_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_158_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_159_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_16_matcher::to_string() -> std::string{return R"('\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_160_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_161_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_162_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_163_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_164_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_165_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_166_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_167_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_168_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_169_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_17_matcher::to_string() -> std::string{return R"('\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_170_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_171_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_172_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_173_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_174_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_175_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_176_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_177_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_178_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_179_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_18_matcher::to_string() -> std::string{return R"('$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_180_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_181_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_182_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_183_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_184_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_185_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_186_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_187_matcher::to_string() -> std::string{return R"(abb\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_188_matcher::to_string() -> std::string{return R"(abb\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_189_matcher::to_string() -> std::string{return R"(abb$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_19_matcher::to_string() -> std::string{return R"(a\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_190_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_191_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_192_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_193_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_194_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_195_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_196_matcher::to_string() -> std::string{return R"('abb\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_197_matcher::to_string() -> std::string{return R"('abb\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"abb"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_198_matcher::to_string() -> std::string{return R"('abb$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_199_matcher::to_string() -> std::string{return R"('\Aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_20_matcher::to_string() -> std::string{return R"(a\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_21_matcher::to_string() -> std::string{return R"(a$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_22_matcher::to_string() -> std::string{return R"(a\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_23_matcher::to_string() -> std::string{return R"(a\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_24_matcher::to_string() -> std::string{return R"(a$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_25_matcher::to_string() -> std::string{return R"(a\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_26_matcher::to_string() -> std::string{return R"(a\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_27_matcher::to_string() -> std::string{return R"(a$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_28_matcher::to_string() -> std::string{return R"('a\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_29_matcher::to_string() -> std::string{return R"('a\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_30_matcher::to_string() -> std::string{return R"('a$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_31_matcher::to_string() -> std::string{return R"('a\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_32_matcher::to_string() -> std::string{return R"('a\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_33_matcher::to_string() -> std::string{return R"('a$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_34_matcher::to_string() -> std::string{return R"('a\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_35_matcher::to_string() -> std::string{return R"('a\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_36_matcher::to_string() -> std::string{return R"('a$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_37_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_38_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_39_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_40_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_41_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_42_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_43_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_44_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_45_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_46_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_47_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_48_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_49_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_50_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_51_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_52_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_53_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_54_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_55_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_56_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_57_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_58_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_59_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_60_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_61_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_62_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_63_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_64_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_65_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_66_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_67_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_68_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_69_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_70_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_71_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_72_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_73_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_74_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_75_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_76_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_77_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_78_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_79_matcher::to_string() -> std::string{return R"(aa\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_80_matcher::to_string() -> std::string{return R"(aa\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_81_matcher::to_string() -> std::string{return R"(aa$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_82_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_83_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_84_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_85_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_86_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_87_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_88_matcher::to_string() -> std::string{return R"('aa\Z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_89_matcher::to_string() -> std::string{return R"('aa\z'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_90_matcher::to_string() -> std::string{return R"('aa$'m)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_91_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_92_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_93_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_94_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_95_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_96_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_97_matcher::to_string() -> std::string{return R"(ab\Z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_98_matcher::to_string() -> std::string{return R"(ab\z)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_14_multiline_modifier::regex_99_matcher::to_string() -> std::string{return R"(ab$)"; }
+
+
+#line 557 "pure2-regex_14_multiline_modifier.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_14_multiline_modifier());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp2.output
new file mode 100644
index 0000000000..665dffd1e2
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_14_multiline_modifier.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp
new file mode 100644
index 0000000000..48f733811a
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp
@@ -0,0 +1,5583 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_15_group_modifiers.cpp2"
+
+#line 153 "pure2-regex_15_group_modifiers.cpp2"
+class test_tests_15_group_modifiers;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_15_group_modifiers.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_15_group_modifiers.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_15_group_modifiers.cpp2"
+class test_tests_15_group_modifiers {
+
+#line 207 "pure2-regex_15_group_modifiers.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_25_matcher() = default;
+        public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_25_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_26_matcher() = default;
+        public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_26_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_27_matcher() = default;
+        public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_27_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_28_matcher() = default;
+        public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_28_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_29_matcher() = default;
+        public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_29_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_30_matcher() = default;
+        public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_30_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_31_matcher() = default;
+        public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_31_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_32_matcher() = default;
+        public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_32_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_33_matcher() = default;
+        public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_33_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_33 {}; public: class regex_34_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_34_matcher() = default;
+        public: regex_34_matcher(regex_34_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_34_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_34 {}; public: class regex_35_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_35_matcher() = default;
+        public: regex_35_matcher(regex_35_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_35_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_35 {}; public: class regex_36_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_36_matcher() = default;
+        public: regex_36_matcher(regex_36_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_36_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_36 {}; public: class regex_37_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_37_matcher() = default;
+        public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_37_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_38_matcher() = default;
+        public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_38_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_39_matcher() = default;
+        public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_39_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_40_matcher() = default;
+        public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_40_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_41_matcher() = default;
+        public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_41_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_42_matcher() = default;
+        public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_42_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_43_matcher() = default;
+        public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_43_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_44_matcher() = default;
+        public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_44_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_45_matcher() = default;
+        public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_45_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_46_matcher() = default;
+        public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_46_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_47_matcher() = default;
+        public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_47_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_48_matcher() = default;
+        public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_48_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_49_matcher() = default;
+        public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_49_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_50_matcher() = default;
+        public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_50_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_51_matcher() = default;
+        public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_51_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_52_matcher() = default;
+        public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_52_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_53_matcher() = default;
+        public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_53_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_53 {}; 
+  public: test_tests_15_group_modifiers() = default;
+  public: test_tests_15_group_modifiers(test_tests_15_group_modifiers const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_15_group_modifiers const&) -> void = delete;
+
+
+#line 264 "pure2-regex_15_group_modifiers.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_15_group_modifiers.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_15_group_modifiers.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_15_group_modifiers.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 207 "pure2-regex_15_group_modifiers.cpp2"
+  auto test_tests_15_group_modifiers::run() const& -> void{
+    std::cout << "Running tests_15_group_modifiers:" << std::endl;
+    test(regex_01, "01", R"((?:(?i)a)b)", "ab", "y", R"($&)", "ab");
+    test(regex_02, "02", R"(((?i)a)b)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_03, "03", R"((?:(?i)a)b)", "Ab", "y", R"($&)", "Ab");
+    test(regex_04, "04", R"(((?i)a)b)", "Ab", "y", R"($&:$1)", "Ab:A");
+    test(regex_05, "05", R"((?:(?i)a)b)", "aB", "n", R"(-)", "-");
+    test(regex_06, "06", R"(((?i)a)b)", "aB", "n", R"(-)", "-");
+    test(regex_07, "07", R"((?i:a)b)", "ab", "y", R"($&)", "ab");
+    test(regex_08, "08", R"(((?i:a))b)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_09, "09", R"((?i:a)b)", "Ab", "y", R"($&)", "Ab");
+    test(regex_10, "10", R"(((?i:a))b)", "Ab", "y", R"($&:$1)", "Ab:A");
+    test(regex_11, "11", R"((?i:a)b)", "aB", "n", R"(-)", "-");
+    test(regex_12, "12", R"(((?i:a))b)", "aB", "n", R"(-)", "-");
+    test(regex_13, "13", R"('(?:(?-i)a)b'i)", "ab", "y", R"($&)", "ab");
+    test(regex_14, "14", R"('((?-i)a)b'i)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_15, "15", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_16, "16", R"('((?-i)a)b'i)", "aB", "y", R"($&:$1)", "aB:a");
+    test(regex_17, "17", R"('(?:(?-i)a)b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_18, "18", R"('((?-i)a)b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_19, "19", R"('(?:(?-i)a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_20, "20", R"('((?-i)a)b'i)", "aB", "y", R"($1)", "a");
+    test(regex_21, "21", R"('(?:(?-i)a)b'i)", "AB", "n", R"(-)", "-");
+    test(regex_22, "22", R"('((?-i)a)b'i)", "AB", "n", R"(-)", "-");
+    test(regex_23, "23", R"('(?-i:a)b'i)", "ab", "y", R"($&)", "ab");
+    test(regex_24, "24", R"('((?-i:a))b'i)", "ab", "y", R"($&:$1)", "ab:a");
+    test(regex_25, "25", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_26, "26", R"('((?-i:a))b'i)", "aB", "y", R"($&:$1)", "aB:a");
+    test(regex_27, "27", R"('(?-i:a)b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_28, "28", R"('((?-i:a))b'i)", "Ab", "n", R"(-)", "-");
+    test(regex_29, "29", R"('(?-i:a)b'i)", "aB", "y", R"($&)", "aB");
+    test(regex_30, "30", R"('((?-i:a))b'i)", "aB", "y", R"($1)", "a");
+    test(regex_31, "31", R"('(?-i:a)b'i)", "AB", "n", R"(-)", "-");
+    test(regex_32, "32", R"('((?-i:a))b'i)", "AB", "n", R"(-)", "-");
+    test(regex_33, "33", R"('((?-i:a.))b'i)", "a\nB", "n", R"(-)", "-");
+    test(regex_34, "34", R"('((?-i:a\N))b'i)", "a\nB", "n", R"(-)", "-");
+    test(regex_35, "35", R"('((?s-i:a.))b'i)", "a\nB", "y", R"($1)", "a\n");
+    test(regex_36, "36", R"('((?s-i:a\N))b'i)", "a\nB", "n", R"(-)", "-");
+    test(regex_37, "37", R"('((?s-i:a.))b'i)", "B\nB", "n", R"(-)", "-");
+    test(regex_38, "38", R"('((?s-i:a\N))b'i)", "B\nB", "n", R"(-)", "-");
+    test(regex_39, "39", R"((?i:.[b].))", "abd", "y", R"($&)", "abd");
+    test(regex_40, "40", R"((?i:\N[b]\N))", "abd", "y", R"($&)", "abd");
+    test(regex_41, "41", R"(^(?:a?b?)*$)", "a--", "n", R"(-)", "-");
+    test(regex_42, "42", R"(((?s)^a(.))((?m)^b$))", "a\nb\nc\n", "y", R"($1;$2;$3)", "a\n;\n;b");
+    test(regex_43, "43", R"(((?m)^b$))", "a\nb\nc\n", "y", R"($1)", "b");
+    test(regex_44, "44", R"((?m)^b)", "a\nb\n", "y", R"($&)", "b");
+    test(regex_45, "45", R"((?m)^(b))", "a\nb\n", "y", R"($1)", "b");
+    test(regex_46, "46", R"(((?m)^b))", "a\nb\n", "y", R"($1)", "b");
+    test(regex_47, "47", R"(\n((?m)^b))", "a\nb\n", "y", R"($1)", "b");
+    test(regex_48, "48", R"(^b)", "a\nb\nc\n", "n", R"(-)", "-");
+    test(regex_49, "49", R"(()^b)", "a\nb\nc\n", "n", R"(-)", "-");
+    test(regex_50, "50", R"(((?m)^b))", "a\nb\nc\n", "y", R"($1)", "b");
+    test(regex_51, "51", R"('(foo)'n)", "foobar", "y", R"($&-$1)", "foo-");
+    test(regex_52, "52", R"('(?-n)(foo)(?n)(bar)'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-");
+    test(regex_53, "53", R"('(?-n:(foo)(?n:(bar)))'n)", "foobar", "y", R"($&-$1-$2)", "foobar-foo-");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_01_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_02_matcher::to_string() -> std::string{return R"(((?i)a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_03_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_04_matcher::to_string() -> std::string{return R"(((?i)a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_05_matcher::to_string() -> std::string{return R"((?:(?i)a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_06_matcher::to_string() -> std::string{return R"(((?i)a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_07_matcher::to_string() -> std::string{return R"((?i:a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_08_matcher::to_string() -> std::string{return R"(((?i:a))b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_09_matcher::to_string() -> std::string{return R"((?i:a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_10_matcher::to_string() -> std::string{return R"(((?i:a))b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_11_matcher::to_string() -> std::string{return R"((?i:a)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"a"}; 
+
+  std::array upper_str_tmp_0 {"A"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_12_matcher::to_string() -> std::string{return R"(((?i:a))b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_13_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_14_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_15_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_16_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_17_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_18_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_19_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_20_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_21_matcher::to_string() -> std::string{return R"('(?:(?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_22_matcher::to_string() -> std::string{return R"('((?-i)a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_23_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_24_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_25_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_26_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_27_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_28_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_29_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_30_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+
+  std::array lower_str_tmp_1 {"b"}; 
+
+  std::array upper_str_tmp_1 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_1, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_31_matcher::to_string() -> std::string{return R"('(?-i:a)b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_32_matcher::to_string() -> std::string{return R"('((?-i:a))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_33_matcher::to_string() -> std::string{return R"('((?-i:a.))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_34_matcher::to_string() -> std::string{return R"('((?-i:a\N))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_35_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_36_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_37_matcher::to_string() -> std::string{return R"('((?s-i:a.))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array lower_str_tmp_2 {"b"}; 
+
+  std::array upper_str_tmp_2 {"B"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_2, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_38_matcher::to_string() -> std::string{return R"('((?s-i:a\N))b'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_39_matcher::to_string() -> std::string{return R"((?i:.[b].))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_40_matcher::to_string() -> std::string{return R"((?i:\N[b]\N))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), cpp2::regex::no_reset(), other, func_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_6());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_41_matcher::to_string() -> std::string{return R"(^(?:a?b?)*$)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  ctx.set_group_start(3, r.pos);
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_3 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_42_matcher::to_string() -> std::string{return R"(((?s)^a(.))((?m)^b$))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_43_matcher::to_string() -> std::string{return R"(((?m)^b$))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_44_matcher::to_string() -> std::string{return R"((?m)^b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_45_matcher::to_string() -> std::string{return R"((?m)^(b))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_46_matcher::to_string() -> std::string{return R"(((?m)^b))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"\n"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_47_matcher::to_string() -> std::string{return R"(\n((?m)^b))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_48_matcher::to_string() -> std::string{return R"(^b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_49_matcher::to_string() -> std::string{return R"(()^b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_50_matcher::to_string() -> std::string{return R"(((?m)^b))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_51_matcher::to_string() -> std::string{return R"('(?:foo)'n)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"bar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_52_matcher::to_string() -> std::string{return R"('(?-n)(foo)(?n)(?:bar)'n)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"bar"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_15_group_modifiers::regex_53_matcher::to_string() -> std::string{return R"('(?-n:(foo)(?n:(?:bar)))'n)"; }
+
+
+#line 265 "pure2-regex_15_group_modifiers.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_15_group_modifiers());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp2.output b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp2.output
new file mode 100644
index 0000000000..04c99ceee7
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_15_group_modifiers.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp
new file mode 100644
index 0000000000..7ce768eb80
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp
@@ -0,0 +1,3282 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_16_perl_syntax_modifier.cpp2"
+
+#line 153 "pure2-regex_16_perl_syntax_modifier.cpp2"
+class test_tests_16_perl_syntax_modifier;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_16_perl_syntax_modifier.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_16_perl_syntax_modifier.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_16_perl_syntax_modifier.cpp2"
+class test_tests_16_perl_syntax_modifier {
+
+#line 187 "pure2-regex_16_perl_syntax_modifier.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_25_matcher() = default;
+        public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_25_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_26_matcher() = default;
+        public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_26_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_27_matcher() = default;
+        public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_27_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_28_matcher() = default;
+        public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_28_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_28 {}; public: class regex_29_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_29_matcher() = default;
+        public: regex_29_matcher(regex_29_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_29_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_29 {}; public: class regex_30_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_30_matcher() = default;
+        public: regex_30_matcher(regex_30_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_30_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_30 {}; public: class regex_31_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_31_matcher() = default;
+        public: regex_31_matcher(regex_31_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_31_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_31 {}; public: class regex_32_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_32_matcher() = default;
+        public: regex_32_matcher(regex_32_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_32_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_32 {}; public: class regex_33_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_33_matcher() = default;
+        public: regex_33_matcher(regex_33_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_33_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_33 {}; 
+  public: test_tests_16_perl_syntax_modifier() = default;
+  public: test_tests_16_perl_syntax_modifier(test_tests_16_perl_syntax_modifier const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_16_perl_syntax_modifier const&) -> void = delete;
+
+
+#line 224 "pure2-regex_16_perl_syntax_modifier.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_16_perl_syntax_modifier.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_16_perl_syntax_modifier.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_16_perl_syntax_modifier.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 187 "pure2-regex_16_perl_syntax_modifier.cpp2"
+  auto test_tests_16_perl_syntax_modifier::run() const& -> void{
+    std::cout << "Running tests_16_perl_syntax_modifier:" << std::endl;
+    test(regex_01, "01", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a");
+    test(regex_02, "02", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_03, "03", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_04, "04", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_05, "05", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_06, "06", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_07, "07", R"(/a\N c/x)", "abc", "y", R"($&)", "abc");
+    test(regex_08, "08", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_09, "09", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-");
+    test(regex_10, "10", R"(/[a b]/x)", " ", "yS", R"($&)", " ");
+    test(regex_11, "11", R"(/[a b]/xx)", " ", "n", R"(-)", "-");
+    test(regex_12, "12", R"(/[a\ b]/xx)", " ", "y", R"($&)", " ");
+    test(regex_13, "13", R"(/[ ^ a b ]/xx)", "a", "n", R"(-)", "-");
+    test(regex_14, "14", R"(/[ ^ a b ]/xx)", "b", "n", R"(-)", "-");
+    test(regex_15, "15", R"(/[ ^ a b ]/xx)", "A", "y", R"($&)", "A");
+    test(regex_16, "16", R"(/(?x:[a b])/xx)", " ", "yS", R"($&)", " ");
+    test(regex_17, "17", R"(/(?xx:[a b])/x)", " ", "n", R"(-)", "-");
+    test(regex_18, "18", R"(/(?x)[a b]/xx)", " ", "yS", R"($&)", " ");
+    test(regex_19, "19", R"(/(?xx)[a b]/x)", " ", "n", R"(-)", "-");
+    test(regex_20, "20", R"(/(?-x:[a b])/xx)", " ", "yS", R"($&)", " ");
+    test(regex_21, "21", R"(/\N {1}/x)", "abbbbc", "y", R"($&)", "a");
+    test(regex_22, "22", R"(/\N {1}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_23, "23", R"(/\N {1}/x)", "abbbbc", "y", R"($+[0])", "1");
+    test(regex_24, "24", R"(/\N {3,4}/x)", "abbbbc", "y", R"($&)", "abbb");
+    test(regex_25, "25", R"(/\N {3,4}/x)", "abbbbc", "y", R"($-[0])", "0");
+    test(regex_26, "26", R"(/\N {3,4}/x)", "abbbbc", "y", R"($+[0])", "4");
+    test(regex_27, "27", R"(/a\N c/x)", "abc", "y", R"($&)", "abc");
+    test(regex_28, "28", R"(/a\N *c/x)", "axyzc", "y", R"($&)", "axyzc");
+    test(regex_29, "29", R"(/a\N *c/x)", "axyzd", "n", R"(-)", "-");
+    test(regex_30, "30", R"(/[#]/)", "a#b", "y", R"($&)", "#");
+    test(regex_31, "31", R"(/[#]b/)", "a#b", "y", R"($&)", "#b");
+    test(regex_32, "32", R"(/[#]/x)", "a#b", "y", R"($&)", "#");
+    test(regex_33, "33", R"(/[#]b/x)", "a#b", "y", R"($&)", "#b");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_01_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_02_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_03_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_04_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_05_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_06_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_07_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_08_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_09_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_10_matcher::to_string() -> std::string{return R"(/[a b]/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_11_matcher::to_string() -> std::string{return R"(/[a b]/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_12_matcher::to_string() -> std::string{return R"(/[a\ b]/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_13_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_14_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_15_matcher::to_string() -> std::string{return R"(/[ ^ a b ]/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_16_matcher::to_string() -> std::string{return R"(/(?x:[a b])/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_17_matcher::to_string() -> std::string{return R"(/(?xx:[a b])/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_18_matcher::to_string() -> std::string{return R"(/(?x)[a b]/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_19_matcher::to_string() -> std::string{return R"(/(?xx)[a b]/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_20_matcher::to_string() -> std::string{return R"(/(?-x:[a b])/xx)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_21_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_22_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_23_matcher::to_string() -> std::string{return R"(/\N{1}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_24_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_25_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_26_matcher::to_string() -> std::string{return R"(/\N{3,4}/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_27_matcher::to_string() -> std::string{return R"(/a\Nc/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_28_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_29_matcher::to_string() -> std::string{return R"(/a\N*c/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_30_matcher::to_string() -> std::string{return R"(/[#]/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_31_matcher::to_string() -> std::string{return R"(/[#]b/)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_32_matcher::to_string() -> std::string{return R"(/[#]/x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher>::match(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_16_perl_syntax_modifier::regex_33_matcher::to_string() -> std::string{return R"(/[#]b/x)"; }
+
+
+#line 225 "pure2-regex_16_perl_syntax_modifier.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_16_perl_syntax_modifier());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp2.output
new file mode 100644
index 0000000000..441e743cae
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_16_perl_syntax_modifier.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_17_comments.cpp b/regression-tests/test-results/pure2-regex_17_comments.cpp
new file mode 100644
index 0000000000..21cf2d0788
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_17_comments.cpp
@@ -0,0 +1,561 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_17_comments.cpp2"
+
+#line 153 "pure2-regex_17_comments.cpp2"
+class test_tests_17_comments;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_17_comments.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_17_comments.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_17_comments.cpp2"
+class test_tests_17_comments {
+
+#line 157 "pure2-regex_17_comments.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; 
+  public: test_tests_17_comments() = default;
+  public: test_tests_17_comments(test_tests_17_comments const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_17_comments const&) -> void = delete;
+
+
+#line 164 "pure2-regex_17_comments.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_17_comments.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_17_comments.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_17_comments.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 157 "pure2-regex_17_comments.cpp2"
+  auto test_tests_17_comments::run() const& -> void{
+    std::cout << "Running tests_17_comments:" << std::endl;
+    test(regex_01, "01", R"(^a(?#xxx){3}c)", "aaac", "y", R"($&)", "aaac");
+    test(regex_02, "02", R"('^a (?#xxx) (?#yyy) {3}c'x)", "aaac", "y", R"($&)", "aaac");
+    test(regex_03, "03", R"('foo # Match foo'x)", "foobar", "y", R"($&)", "foo");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_17_comments::regex_01_matcher::to_string() -> std::string{return R"(^a(?#xxx){3}c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_17_comments::regex_02_matcher::to_string() -> std::string{return R"('^a(?#xxx)(?#yyy){3}c'x)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"foo"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),3)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,3); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 3;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_17_comments::regex_03_matcher::to_string() -> std::string{return R"('foo'x)"; }
+
+
+#line 165 "pure2-regex_17_comments.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_17_comments());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_17_comments.cpp2.output b/regression-tests/test-results/pure2-regex_17_comments.cpp2.output
new file mode 100644
index 0000000000..aab828b8cd
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_17_comments.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_17_comments.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp
new file mode 100644
index 0000000000..74e76160d5
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp
@@ -0,0 +1,7000 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_18_branch_reset.cpp2"
+
+#line 153 "pure2-regex_18_branch_reset.cpp2"
+class test_tests_18_branch_reset;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_18_branch_reset.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_18_branch_reset.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_18_branch_reset.cpp2"
+class test_tests_18_branch_reset {
+
+#line 169 "pure2-regex_18_branch_reset.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_2 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_2 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_2 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_2 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_3 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_4 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_5 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_2 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_3 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_4 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_5 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_2 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_3 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_4 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_5 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_2 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_3 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_4 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_5 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; 
+  public: test_tests_18_branch_reset() = default;
+  public: test_tests_18_branch_reset(test_tests_18_branch_reset const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_18_branch_reset const&) -> void = delete;
+
+
+#line 188 "pure2-regex_18_branch_reset.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_18_branch_reset.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_18_branch_reset.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_18_branch_reset.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 169 "pure2-regex_18_branch_reset.cpp2"
+  auto test_tests_18_branch_reset::run() const& -> void{
+    std::cout << "Running tests_18_branch_reset:" << std::endl;
+    test(regex_01, "01", R"((?|(a)))", "a", "y", R"($1-$+)", "a-a");
+    test(regex_02, "02", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "d!o!da", "y", R"($1-$2-$3)", "!o!-o-a");
+    test(regex_03, "03", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "aabc", "y", R"($1-$2-$3)", "a--c");
+    test(regex_04, "04", R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))", "ixyjp", "y", R"($1-$2-$3)", "x-y-p");
+    test(regex_05, "05", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "a", "y", R"($1)", "a");
+    test(regex_06, "06", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "b", "y", R"($1)", "b");
+    test(regex_07, "07", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "c", "y", R"($1)", "c");
+    test(regex_08, "08", R"((?|(?|(a)|(b))|(?|(c)|(d))))", "d", "y", R"($1)", "d");
+    test(regex_09, "09", R"((.)(?|(.)(.)x|(.)d)(.))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--");
+    test(regex_10, "10", R"((\N)(?|(\N)(\N)x|(\N)d)(\N))", "abcde", "y", R"($1-$2-$3-$4-$5-)", "b-c--e--");
+    test(regex_11, "11", R"((?|(?x)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_12, "12", R"((?|(?x)|(?y)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_13, "13", R"((?|(?y)|(?x)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_14, "14", R"((?)(?|(?x)))", "x", "yM", R"($+{foo})", "x");
+    test(regex_15, "15", R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))", "a", "y", R"($&)", "a");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_01_matcher::to_string() -> std::string{return R"((?|(a)))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_4 {"o"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+
+  std::array str_tmp_7 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_8 {"i"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_8, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_9_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; 
+  static_cast(cpp2::move(tmp_9));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+
+  std::array str_tmp_11 {"j"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_11, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_02_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_1(), reset_0(), func_2(), reset_1(), func_3(), reset_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(3, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_12_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; 
+  static_cast(cpp2::move(tmp_12));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_02_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_4 {"o"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+
+  std::array str_tmp_7 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_8 {"i"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_8, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_9_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; 
+  static_cast(cpp2::move(tmp_9));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+
+  std::array str_tmp_11 {"j"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_11, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_03_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_1(), reset_0(), func_2(), reset_1(), func_3(), reset_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(3, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_12_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; 
+  static_cast(cpp2::move(tmp_12));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_03_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(2, r.pos);
+
+  std::array str_tmp_4 {"o"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+
+  std::array str_tmp_7 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_8 {"i"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_8, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_9_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; 
+  static_cast(cpp2::move(tmp_9));
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+  static_cast(cpp2::move(tmp_10));
+
+  std::array str_tmp_11 {"j"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_11, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_04_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_1(), reset_0(), func_2(), reset_1(), func_3(), reset_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(3, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_12_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; 
+  static_cast(cpp2::move(tmp_12));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_04_matcher::to_string() -> std::string{return R"((?|a(.)b|d(.(o).)d|i(.)(.)j)(.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_4 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_6 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_05_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_05_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_4 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_6 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_06_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_06_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_4 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_6 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_07_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_07_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), reset_0(), func_3(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_2::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_4 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_3::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_6 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+  static_cast(cpp2::move(tmp_7));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_4::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_6(), reset_3(), func_7(), reset_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_08_matcher::wrap::reset_5::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_9(), func_1(), reset_2(), func_5(), reset_5());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_08_matcher::to_string() -> std::string{return R"((?|(?|(a)|(b))|(?|(c)|(d))))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(3, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+
+  std::array str_tmp_3 {"x"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_09_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  ctx.set_group_invalid(3);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+
+  std::array str_tmp_5 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_09_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(4, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_09_matcher::to_string() -> std::string{return R"((.)(?|(.)(.)x|(.)d)(.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  ctx.set_group_start(3, r.pos);
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(3, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+
+  std::array str_tmp_3 {"x"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_10_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  ctx.set_group_invalid(3);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+
+  std::array str_tmp_5 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_10_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(4, r.pos);
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(4, r.pos);
+
+  auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+  }
+  }
+  }; 
+
+  auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+  static_cast(cpp2::move(tmp_6));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_10_matcher::to_string() -> std::string{return R"((\N)(?|(\N)(\N)x|(\N)d)(\N))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"x"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "foo") {return 1; }else {return -1; }
+  }
+
+  [[nodiscard]] auto test_tests_18_branch_reset::regex_11_matcher::to_string() -> std::string{return R"((?|(?x)))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"x"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_12_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_2 {"y"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_18_branch_reset::regex_12_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  if (name == "bar") {return 1; }else {if (name == "foo") {return 1; }else {return -1; }
+#line 1 "pure2-regex_18_branch_reset.cpp2"
+}
+}
+
+[[nodiscard]] auto test_tests_18_branch_reset::regex_12_matcher::to_string() -> std::string{return R"((?|(?x)|(?y)))"; }
+
+
+
+
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+ctx.set_group_start(1, r.pos);
+
+std::array str_tmp_0 {"y"}; 
+if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+r.matched = false;
+break;
+}
+{
+int i{0};
+for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+}
+}
+if (r.matched) {r.pos += 1;}
+else {break;}
+ctx.set_group_end(1, r.pos);
+
+auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+}
+}
+}; 
+
+auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+static_cast(cpp2::move(tmp_1));
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = other(r.pos, ctx);
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+
+template  auto test_tests_18_branch_reset::regex_13_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+ctx.set_group_invalid(1);
+}
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+ctx.set_group_start(1, r.pos);
+
+std::array str_tmp_2 {"x"}; 
+if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+r.matched = false;
+break;
+}
+{
+int i{0};
+for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+}
+}
+if (r.matched) {r.pos += 1;}
+else {break;}
+ctx.set_group_end(1, r.pos);
+
+auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+}
+}
+}; 
+
+auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+static_cast(cpp2::move(tmp_3));
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = other(r.pos, ctx);
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+
+template  auto test_tests_18_branch_reset::regex_13_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+ctx.set_group_invalid(1);
+}
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1());
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = other(r.pos, ctx);
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+ctx.set_group_start(0, cur);
+
+auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+if (r.matched) {ctx.set_group_end(0, r.pos);}
+return r; 
+}
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+if (name == "bar") {return 1; }else {if (name == "foo") {return 1; }else {return -1; }}
+}
+
+[[nodiscard]] auto test_tests_18_branch_reset::regex_13_matcher::to_string() -> std::string{return R"((?|(?y)|(?x)))"; }
+
+
+
+
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+ctx.set_group_start(1, r.pos);
+ctx.set_group_end(1, r.pos);
+
+auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+}
+}
+}; 
+
+auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+static_cast(cpp2::move(tmp_0));
+ctx.set_group_start(2, r.pos);
+
+std::array str_tmp_1 {"x"}; 
+if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+r.matched = false;
+break;
+}
+{
+int i{0};
+for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+}
+}
+if (r.matched) {r.pos += 1;}
+else {break;}
+ctx.set_group_end(2, r.pos);
+
+auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+}
+}
+}; 
+
+auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+static_cast(cpp2::move(tmp_2));
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = other(r.pos, ctx);
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+ctx.set_group_start(0, cur);
+
+auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+if (r.matched) {ctx.set_group_end(0, r.pos);}
+return r; 
+}
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+if (name == "bar") {return 1; }else {if (name == "foo") {return 2; }else {return -1; }}
+}
+
+[[nodiscard]] auto test_tests_18_branch_reset::regex_14_matcher::to_string() -> std::string{return R"((?)(?|(?x)))"; }
+
+
+
+
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+ctx.set_group_start(1, r.pos);
+
+std::array str_tmp_0 {"b"}; 
+if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+r.matched = false;
+break;
+}
+{
+int i{0};
+for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+}
+}
+if (r.matched) {r.pos += 1;}
+else {break;}
+ctx.set_group_end(1, r.pos);
+
+auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+}
+}
+}; 
+
+auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+static_cast(cpp2::move(tmp_1));
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = other(r.pos, ctx);
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+
+template  auto test_tests_18_branch_reset::regex_15_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+ctx.set_group_invalid(1);
+}
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+ctx.set_group_start(1, r.pos);
+ctx.set_group_end(1, r.pos);
+
+auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+}
+}
+}; 
+
+auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+static_cast(cpp2::move(tmp_2));
+ctx.set_group_start(2, r.pos);
+ctx.set_group_end(2, r.pos);
+
+auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+}
+}
+}; 
+
+auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+static_cast(cpp2::move(tmp_3));
+ctx.set_group_start(3, r.pos);
+ctx.set_group_end(3, r.pos);
+
+auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(3);
+}
+}
+}; 
+
+auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+static_cast(cpp2::move(tmp_4));
+ctx.set_group_start(4, r.pos);
+ctx.set_group_end(4, r.pos);
+
+auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(4);
+}
+}
+}; 
+
+auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+static_cast(cpp2::move(tmp_5));
+ctx.set_group_start(5, r.pos);
+ctx.set_group_end(5, r.pos);
+
+auto tmp_6_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(5);
+}
+}
+}; 
+
+auto tmp_6 {cpp2::regex::make_on_return(cpp2::move(tmp_6_func))}; 
+static_cast(cpp2::move(tmp_6));
+ctx.set_group_start(6, r.pos);
+ctx.set_group_end(6, r.pos);
+
+auto tmp_7_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(6);
+}
+}
+}; 
+
+auto tmp_7 {cpp2::regex::make_on_return(cpp2::move(tmp_7_func))}; 
+static_cast(cpp2::move(tmp_7));
+ctx.set_group_start(7, r.pos);
+ctx.set_group_end(7, r.pos);
+
+auto tmp_8_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(7);
+}
+}
+}; 
+
+auto tmp_8 {cpp2::regex::make_on_return(cpp2::move(tmp_8_func))}; 
+static_cast(cpp2::move(tmp_8));
+ctx.set_group_start(8, r.pos);
+ctx.set_group_end(8, r.pos);
+
+auto tmp_9_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(8);
+}
+}
+}; 
+
+auto tmp_9 {cpp2::regex::make_on_return(cpp2::move(tmp_9_func))}; 
+static_cast(cpp2::move(tmp_9));
+ctx.set_group_start(9, r.pos);
+ctx.set_group_end(9, r.pos);
+
+auto tmp_10_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(9);
+}
+}
+}; 
+
+auto tmp_10 {cpp2::regex::make_on_return(cpp2::move(tmp_10_func))}; 
+static_cast(cpp2::move(tmp_10));
+ctx.set_group_start(10, r.pos);
+ctx.set_group_end(10, r.pos);
+
+auto tmp_11_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(10);
+}
+}
+}; 
+
+auto tmp_11 {cpp2::regex::make_on_return(cpp2::move(tmp_11_func))}; 
+static_cast(cpp2::move(tmp_11));
+ctx.set_group_start(11, r.pos);
+ctx.set_group_end(11, r.pos);
+
+auto tmp_12_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(11);
+}
+}
+}; 
+
+auto tmp_12 {cpp2::regex::make_on_return(cpp2::move(tmp_12_func))}; 
+static_cast(cpp2::move(tmp_12));
+ctx.set_group_start(12, r.pos);
+ctx.set_group_end(12, r.pos);
+
+auto tmp_13_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(12);
+}
+}
+}; 
+
+auto tmp_13 {cpp2::regex::make_on_return(cpp2::move(tmp_13_func))}; 
+static_cast(cpp2::move(tmp_13));
+ctx.set_group_start(13, r.pos);
+ctx.set_group_end(13, r.pos);
+
+auto tmp_14_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(13);
+}
+}
+}; 
+
+auto tmp_14 {cpp2::regex::make_on_return(cpp2::move(tmp_14_func))}; 
+static_cast(cpp2::move(tmp_14));
+ctx.set_group_start(14, r.pos);
+ctx.set_group_end(14, r.pos);
+
+auto tmp_15_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(14);
+}
+}
+}; 
+
+auto tmp_15 {cpp2::regex::make_on_return(cpp2::move(tmp_15_func))}; 
+static_cast(cpp2::move(tmp_15));
+ctx.set_group_start(15, r.pos);
+ctx.set_group_end(15, r.pos);
+
+auto tmp_16_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(15);
+}
+}
+}; 
+
+auto tmp_16 {cpp2::regex::make_on_return(cpp2::move(tmp_16_func))}; 
+static_cast(cpp2::move(tmp_16));
+ctx.set_group_start(16, r.pos);
+ctx.set_group_end(16, r.pos);
+
+auto tmp_17_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(16);
+}
+}
+}; 
+
+auto tmp_17 {cpp2::regex::make_on_return(cpp2::move(tmp_17_func))}; 
+static_cast(cpp2::move(tmp_17));
+ctx.set_group_start(17, r.pos);
+ctx.set_group_end(17, r.pos);
+
+auto tmp_18_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(17);
+}
+}
+}; 
+
+auto tmp_18 {cpp2::regex::make_on_return(cpp2::move(tmp_18_func))}; 
+static_cast(cpp2::move(tmp_18));
+ctx.set_group_start(18, r.pos);
+ctx.set_group_end(18, r.pos);
+
+auto tmp_19_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(18);
+}
+}
+}; 
+
+auto tmp_19 {cpp2::regex::make_on_return(cpp2::move(tmp_19_func))}; 
+static_cast(cpp2::move(tmp_19));
+ctx.set_group_start(19, r.pos);
+ctx.set_group_end(19, r.pos);
+
+auto tmp_20_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(19);
+}
+}
+}; 
+
+auto tmp_20 {cpp2::regex::make_on_return(cpp2::move(tmp_20_func))}; 
+static_cast(cpp2::move(tmp_20));
+ctx.set_group_start(20, r.pos);
+ctx.set_group_end(20, r.pos);
+
+auto tmp_21_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(20);
+}
+}
+}; 
+
+auto tmp_21 {cpp2::regex::make_on_return(cpp2::move(tmp_21_func))}; 
+static_cast(cpp2::move(tmp_21));
+ctx.set_group_start(21, r.pos);
+ctx.set_group_end(21, r.pos);
+
+auto tmp_22_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(21);
+}
+}
+}; 
+
+auto tmp_22 {cpp2::regex::make_on_return(cpp2::move(tmp_22_func))}; 
+static_cast(cpp2::move(tmp_22));
+ctx.set_group_start(22, r.pos);
+ctx.set_group_end(22, r.pos);
+
+auto tmp_23_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(22);
+}
+}
+}; 
+
+auto tmp_23 {cpp2::regex::make_on_return(cpp2::move(tmp_23_func))}; 
+static_cast(cpp2::move(tmp_23));
+ctx.set_group_start(23, r.pos);
+ctx.set_group_end(23, r.pos);
+
+auto tmp_24_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(23);
+}
+}
+}; 
+
+auto tmp_24 {cpp2::regex::make_on_return(cpp2::move(tmp_24_func))}; 
+static_cast(cpp2::move(tmp_24));
+ctx.set_group_start(24, r.pos);
+ctx.set_group_end(24, r.pos);
+
+auto tmp_25_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(24);
+}
+}
+}; 
+
+auto tmp_25 {cpp2::regex::make_on_return(cpp2::move(tmp_25_func))}; 
+static_cast(cpp2::move(tmp_25));
+ctx.set_group_start(25, r.pos);
+ctx.set_group_end(25, r.pos);
+
+auto tmp_26_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(25);
+}
+}
+}; 
+
+auto tmp_26 {cpp2::regex::make_on_return(cpp2::move(tmp_26_func))}; 
+static_cast(cpp2::move(tmp_26));
+ctx.set_group_start(26, r.pos);
+ctx.set_group_end(26, r.pos);
+
+auto tmp_27_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(26);
+}
+}
+}; 
+
+auto tmp_27 {cpp2::regex::make_on_return(cpp2::move(tmp_27_func))}; 
+static_cast(cpp2::move(tmp_27));
+ctx.set_group_start(27, r.pos);
+ctx.set_group_end(27, r.pos);
+
+auto tmp_28_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(27);
+}
+}
+}; 
+
+auto tmp_28 {cpp2::regex::make_on_return(cpp2::move(tmp_28_func))}; 
+static_cast(cpp2::move(tmp_28));
+ctx.set_group_start(28, r.pos);
+ctx.set_group_end(28, r.pos);
+
+auto tmp_29_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(28);
+}
+}
+}; 
+
+auto tmp_29 {cpp2::regex::make_on_return(cpp2::move(tmp_29_func))}; 
+static_cast(cpp2::move(tmp_29));
+ctx.set_group_start(29, r.pos);
+ctx.set_group_end(29, r.pos);
+
+auto tmp_30_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(29);
+}
+}
+}; 
+
+auto tmp_30 {cpp2::regex::make_on_return(cpp2::move(tmp_30_func))}; 
+static_cast(cpp2::move(tmp_30));
+ctx.set_group_start(30, r.pos);
+ctx.set_group_end(30, r.pos);
+
+auto tmp_31_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(30);
+}
+}
+}; 
+
+auto tmp_31 {cpp2::regex::make_on_return(cpp2::move(tmp_31_func))}; 
+static_cast(cpp2::move(tmp_31));
+ctx.set_group_start(31, r.pos);
+ctx.set_group_end(31, r.pos);
+
+auto tmp_32_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(31);
+}
+}
+}; 
+
+auto tmp_32 {cpp2::regex::make_on_return(cpp2::move(tmp_32_func))}; 
+static_cast(cpp2::move(tmp_32));
+ctx.set_group_start(32, r.pos);
+ctx.set_group_end(32, r.pos);
+
+auto tmp_33_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(32);
+}
+}
+}; 
+
+auto tmp_33 {cpp2::regex::make_on_return(cpp2::move(tmp_33_func))}; 
+static_cast(cpp2::move(tmp_33));
+ctx.set_group_start(33, r.pos);
+ctx.set_group_end(33, r.pos);
+
+auto tmp_34_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(33);
+}
+}
+}; 
+
+auto tmp_34 {cpp2::regex::make_on_return(cpp2::move(tmp_34_func))}; 
+static_cast(cpp2::move(tmp_34));
+ctx.set_group_start(34, r.pos);
+ctx.set_group_end(34, r.pos);
+
+auto tmp_35_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(34);
+}
+}
+}; 
+
+auto tmp_35 {cpp2::regex::make_on_return(cpp2::move(tmp_35_func))}; 
+static_cast(cpp2::move(tmp_35));
+ctx.set_group_start(35, r.pos);
+ctx.set_group_end(35, r.pos);
+
+auto tmp_36_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(35);
+}
+}
+}; 
+
+auto tmp_36 {cpp2::regex::make_on_return(cpp2::move(tmp_36_func))}; 
+static_cast(cpp2::move(tmp_36));
+ctx.set_group_start(36, r.pos);
+ctx.set_group_end(36, r.pos);
+
+auto tmp_37_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(36);
+}
+}
+}; 
+
+auto tmp_37 {cpp2::regex::make_on_return(cpp2::move(tmp_37_func))}; 
+static_cast(cpp2::move(tmp_37));
+ctx.set_group_start(37, r.pos);
+ctx.set_group_end(37, r.pos);
+
+auto tmp_38_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(37);
+}
+}
+}; 
+
+auto tmp_38 {cpp2::regex::make_on_return(cpp2::move(tmp_38_func))}; 
+static_cast(cpp2::move(tmp_38));
+ctx.set_group_start(38, r.pos);
+ctx.set_group_end(38, r.pos);
+
+auto tmp_39_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(38);
+}
+}
+}; 
+
+auto tmp_39 {cpp2::regex::make_on_return(cpp2::move(tmp_39_func))}; 
+static_cast(cpp2::move(tmp_39));
+ctx.set_group_start(39, r.pos);
+ctx.set_group_end(39, r.pos);
+
+auto tmp_40_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(39);
+}
+}
+}; 
+
+auto tmp_40 {cpp2::regex::make_on_return(cpp2::move(tmp_40_func))}; 
+static_cast(cpp2::move(tmp_40));
+ctx.set_group_start(40, r.pos);
+ctx.set_group_end(40, r.pos);
+
+auto tmp_41_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(40);
+}
+}
+}; 
+
+auto tmp_41 {cpp2::regex::make_on_return(cpp2::move(tmp_41_func))}; 
+static_cast(cpp2::move(tmp_41));
+ctx.set_group_start(41, r.pos);
+ctx.set_group_end(41, r.pos);
+
+auto tmp_42_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(41);
+}
+}
+}; 
+
+auto tmp_42 {cpp2::regex::make_on_return(cpp2::move(tmp_42_func))}; 
+static_cast(cpp2::move(tmp_42));
+ctx.set_group_start(42, r.pos);
+ctx.set_group_end(42, r.pos);
+
+auto tmp_43_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(42);
+}
+}
+}; 
+
+auto tmp_43 {cpp2::regex::make_on_return(cpp2::move(tmp_43_func))}; 
+static_cast(cpp2::move(tmp_43));
+ctx.set_group_start(43, r.pos);
+ctx.set_group_end(43, r.pos);
+
+auto tmp_44_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(43);
+}
+}
+}; 
+
+auto tmp_44 {cpp2::regex::make_on_return(cpp2::move(tmp_44_func))}; 
+static_cast(cpp2::move(tmp_44));
+ctx.set_group_start(44, r.pos);
+ctx.set_group_end(44, r.pos);
+
+auto tmp_45_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(44);
+}
+}
+}; 
+
+auto tmp_45 {cpp2::regex::make_on_return(cpp2::move(tmp_45_func))}; 
+static_cast(cpp2::move(tmp_45));
+ctx.set_group_start(45, r.pos);
+ctx.set_group_end(45, r.pos);
+
+auto tmp_46_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(45);
+}
+}
+}; 
+
+auto tmp_46 {cpp2::regex::make_on_return(cpp2::move(tmp_46_func))}; 
+static_cast(cpp2::move(tmp_46));
+ctx.set_group_start(46, r.pos);
+ctx.set_group_end(46, r.pos);
+
+auto tmp_47_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(46);
+}
+}
+}; 
+
+auto tmp_47 {cpp2::regex::make_on_return(cpp2::move(tmp_47_func))}; 
+static_cast(cpp2::move(tmp_47));
+ctx.set_group_start(47, r.pos);
+ctx.set_group_end(47, r.pos);
+
+auto tmp_48_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(47);
+}
+}
+}; 
+
+auto tmp_48 {cpp2::regex::make_on_return(cpp2::move(tmp_48_func))}; 
+static_cast(cpp2::move(tmp_48));
+ctx.set_group_start(48, r.pos);
+ctx.set_group_end(48, r.pos);
+
+auto tmp_49_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(48);
+}
+}
+}; 
+
+auto tmp_49 {cpp2::regex::make_on_return(cpp2::move(tmp_49_func))}; 
+static_cast(cpp2::move(tmp_49));
+ctx.set_group_start(49, r.pos);
+ctx.set_group_end(49, r.pos);
+
+auto tmp_50_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(49);
+}
+}
+}; 
+
+auto tmp_50 {cpp2::regex::make_on_return(cpp2::move(tmp_50_func))}; 
+static_cast(cpp2::move(tmp_50));
+ctx.set_group_start(50, r.pos);
+ctx.set_group_end(50, r.pos);
+
+auto tmp_51_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(50);
+}
+}
+}; 
+
+auto tmp_51 {cpp2::regex::make_on_return(cpp2::move(tmp_51_func))}; 
+static_cast(cpp2::move(tmp_51));
+ctx.set_group_start(51, r.pos);
+ctx.set_group_end(51, r.pos);
+
+auto tmp_52_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(51);
+}
+}
+}; 
+
+auto tmp_52 {cpp2::regex::make_on_return(cpp2::move(tmp_52_func))}; 
+static_cast(cpp2::move(tmp_52));
+ctx.set_group_start(52, r.pos);
+ctx.set_group_end(52, r.pos);
+
+auto tmp_53_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(52);
+}
+}
+}; 
+
+auto tmp_53 {cpp2::regex::make_on_return(cpp2::move(tmp_53_func))}; 
+static_cast(cpp2::move(tmp_53));
+ctx.set_group_start(53, r.pos);
+ctx.set_group_end(53, r.pos);
+
+auto tmp_54_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(53);
+}
+}
+}; 
+
+auto tmp_54 {cpp2::regex::make_on_return(cpp2::move(tmp_54_func))}; 
+static_cast(cpp2::move(tmp_54));
+ctx.set_group_start(54, r.pos);
+ctx.set_group_end(54, r.pos);
+
+auto tmp_55_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(54);
+}
+}
+}; 
+
+auto tmp_55 {cpp2::regex::make_on_return(cpp2::move(tmp_55_func))}; 
+static_cast(cpp2::move(tmp_55));
+ctx.set_group_start(55, r.pos);
+ctx.set_group_end(55, r.pos);
+
+auto tmp_56_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(55);
+}
+}
+}; 
+
+auto tmp_56 {cpp2::regex::make_on_return(cpp2::move(tmp_56_func))}; 
+static_cast(cpp2::move(tmp_56));
+ctx.set_group_start(56, r.pos);
+ctx.set_group_end(56, r.pos);
+
+auto tmp_57_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(56);
+}
+}
+}; 
+
+auto tmp_57 {cpp2::regex::make_on_return(cpp2::move(tmp_57_func))}; 
+static_cast(cpp2::move(tmp_57));
+ctx.set_group_start(57, r.pos);
+ctx.set_group_end(57, r.pos);
+
+auto tmp_58_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(57);
+}
+}
+}; 
+
+auto tmp_58 {cpp2::regex::make_on_return(cpp2::move(tmp_58_func))}; 
+static_cast(cpp2::move(tmp_58));
+ctx.set_group_start(58, r.pos);
+ctx.set_group_end(58, r.pos);
+
+auto tmp_59_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(58);
+}
+}
+}; 
+
+auto tmp_59 {cpp2::regex::make_on_return(cpp2::move(tmp_59_func))}; 
+static_cast(cpp2::move(tmp_59));
+ctx.set_group_start(59, r.pos);
+ctx.set_group_end(59, r.pos);
+
+auto tmp_60_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(59);
+}
+}
+}; 
+
+auto tmp_60 {cpp2::regex::make_on_return(cpp2::move(tmp_60_func))}; 
+static_cast(cpp2::move(tmp_60));
+ctx.set_group_start(60, r.pos);
+ctx.set_group_end(60, r.pos);
+
+auto tmp_61_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(60);
+}
+}
+}; 
+
+auto tmp_61 {cpp2::regex::make_on_return(cpp2::move(tmp_61_func))}; 
+static_cast(cpp2::move(tmp_61));
+ctx.set_group_start(61, r.pos);
+ctx.set_group_end(61, r.pos);
+
+auto tmp_62_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(61);
+}
+}
+}; 
+
+auto tmp_62 {cpp2::regex::make_on_return(cpp2::move(tmp_62_func))}; 
+static_cast(cpp2::move(tmp_62));
+ctx.set_group_start(62, r.pos);
+ctx.set_group_end(62, r.pos);
+
+auto tmp_63_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(62);
+}
+}
+}; 
+
+auto tmp_63 {cpp2::regex::make_on_return(cpp2::move(tmp_63_func))}; 
+static_cast(cpp2::move(tmp_63));
+ctx.set_group_start(63, r.pos);
+ctx.set_group_end(63, r.pos);
+
+auto tmp_64_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(63);
+}
+}
+}; 
+
+auto tmp_64 {cpp2::regex::make_on_return(cpp2::move(tmp_64_func))}; 
+static_cast(cpp2::move(tmp_64));
+ctx.set_group_start(64, r.pos);
+ctx.set_group_end(64, r.pos);
+
+auto tmp_65_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(64);
+}
+}
+}; 
+
+auto tmp_65 {cpp2::regex::make_on_return(cpp2::move(tmp_65_func))}; 
+static_cast(cpp2::move(tmp_65));
+ctx.set_group_start(65, r.pos);
+ctx.set_group_end(65, r.pos);
+
+auto tmp_66_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(65);
+}
+}
+}; 
+
+auto tmp_66 {cpp2::regex::make_on_return(cpp2::move(tmp_66_func))}; 
+static_cast(cpp2::move(tmp_66));
+ctx.set_group_start(66, r.pos);
+ctx.set_group_end(66, r.pos);
+
+auto tmp_67_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(66);
+}
+}
+}; 
+
+auto tmp_67 {cpp2::regex::make_on_return(cpp2::move(tmp_67_func))}; 
+static_cast(cpp2::move(tmp_67));
+ctx.set_group_start(67, r.pos);
+ctx.set_group_end(67, r.pos);
+
+auto tmp_68_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(67);
+}
+}
+}; 
+
+auto tmp_68 {cpp2::regex::make_on_return(cpp2::move(tmp_68_func))}; 
+static_cast(cpp2::move(tmp_68));
+ctx.set_group_start(68, r.pos);
+ctx.set_group_end(68, r.pos);
+
+auto tmp_69_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(68);
+}
+}
+}; 
+
+auto tmp_69 {cpp2::regex::make_on_return(cpp2::move(tmp_69_func))}; 
+static_cast(cpp2::move(tmp_69));
+ctx.set_group_start(69, r.pos);
+ctx.set_group_end(69, r.pos);
+
+auto tmp_70_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(69);
+}
+}
+}; 
+
+auto tmp_70 {cpp2::regex::make_on_return(cpp2::move(tmp_70_func))}; 
+static_cast(cpp2::move(tmp_70));
+ctx.set_group_start(70, r.pos);
+ctx.set_group_end(70, r.pos);
+
+auto tmp_71_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(70);
+}
+}
+}; 
+
+auto tmp_71 {cpp2::regex::make_on_return(cpp2::move(tmp_71_func))}; 
+static_cast(cpp2::move(tmp_71));
+ctx.set_group_start(71, r.pos);
+ctx.set_group_end(71, r.pos);
+
+auto tmp_72_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(71);
+}
+}
+}; 
+
+auto tmp_72 {cpp2::regex::make_on_return(cpp2::move(tmp_72_func))}; 
+static_cast(cpp2::move(tmp_72));
+ctx.set_group_start(72, r.pos);
+ctx.set_group_end(72, r.pos);
+
+auto tmp_73_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(72);
+}
+}
+}; 
+
+auto tmp_73 {cpp2::regex::make_on_return(cpp2::move(tmp_73_func))}; 
+static_cast(cpp2::move(tmp_73));
+ctx.set_group_start(73, r.pos);
+ctx.set_group_end(73, r.pos);
+
+auto tmp_74_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(73);
+}
+}
+}; 
+
+auto tmp_74 {cpp2::regex::make_on_return(cpp2::move(tmp_74_func))}; 
+static_cast(cpp2::move(tmp_74));
+ctx.set_group_start(74, r.pos);
+ctx.set_group_end(74, r.pos);
+
+auto tmp_75_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(74);
+}
+}
+}; 
+
+auto tmp_75 {cpp2::regex::make_on_return(cpp2::move(tmp_75_func))}; 
+static_cast(cpp2::move(tmp_75));
+ctx.set_group_start(75, r.pos);
+ctx.set_group_end(75, r.pos);
+
+auto tmp_76_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(75);
+}
+}
+}; 
+
+auto tmp_76 {cpp2::regex::make_on_return(cpp2::move(tmp_76_func))}; 
+static_cast(cpp2::move(tmp_76));
+ctx.set_group_start(76, r.pos);
+ctx.set_group_end(76, r.pos);
+
+auto tmp_77_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(76);
+}
+}
+}; 
+
+auto tmp_77 {cpp2::regex::make_on_return(cpp2::move(tmp_77_func))}; 
+static_cast(cpp2::move(tmp_77));
+ctx.set_group_start(77, r.pos);
+ctx.set_group_end(77, r.pos);
+
+auto tmp_78_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(77);
+}
+}
+}; 
+
+auto tmp_78 {cpp2::regex::make_on_return(cpp2::move(tmp_78_func))}; 
+static_cast(cpp2::move(tmp_78));
+ctx.set_group_start(78, r.pos);
+ctx.set_group_end(78, r.pos);
+
+auto tmp_79_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(78);
+}
+}
+}; 
+
+auto tmp_79 {cpp2::regex::make_on_return(cpp2::move(tmp_79_func))}; 
+static_cast(cpp2::move(tmp_79));
+ctx.set_group_start(79, r.pos);
+ctx.set_group_end(79, r.pos);
+
+auto tmp_80_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(79);
+}
+}
+}; 
+
+auto tmp_80 {cpp2::regex::make_on_return(cpp2::move(tmp_80_func))}; 
+static_cast(cpp2::move(tmp_80));
+ctx.set_group_start(80, r.pos);
+ctx.set_group_end(80, r.pos);
+
+auto tmp_81_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(80);
+}
+}
+}; 
+
+auto tmp_81 {cpp2::regex::make_on_return(cpp2::move(tmp_81_func))}; 
+static_cast(cpp2::move(tmp_81));
+ctx.set_group_start(81, r.pos);
+ctx.set_group_end(81, r.pos);
+
+auto tmp_82_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(81);
+}
+}
+}; 
+
+auto tmp_82 {cpp2::regex::make_on_return(cpp2::move(tmp_82_func))}; 
+static_cast(cpp2::move(tmp_82));
+ctx.set_group_start(82, r.pos);
+ctx.set_group_end(82, r.pos);
+
+auto tmp_83_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(82);
+}
+}
+}; 
+
+auto tmp_83 {cpp2::regex::make_on_return(cpp2::move(tmp_83_func))}; 
+static_cast(cpp2::move(tmp_83));
+ctx.set_group_start(83, r.pos);
+ctx.set_group_end(83, r.pos);
+
+auto tmp_84_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(83);
+}
+}
+}; 
+
+auto tmp_84 {cpp2::regex::make_on_return(cpp2::move(tmp_84_func))}; 
+static_cast(cpp2::move(tmp_84));
+ctx.set_group_start(84, r.pos);
+ctx.set_group_end(84, r.pos);
+
+auto tmp_85_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(84);
+}
+}
+}; 
+
+auto tmp_85 {cpp2::regex::make_on_return(cpp2::move(tmp_85_func))}; 
+static_cast(cpp2::move(tmp_85));
+ctx.set_group_start(85, r.pos);
+ctx.set_group_end(85, r.pos);
+
+auto tmp_86_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(85);
+}
+}
+}; 
+
+auto tmp_86 {cpp2::regex::make_on_return(cpp2::move(tmp_86_func))}; 
+static_cast(cpp2::move(tmp_86));
+ctx.set_group_start(86, r.pos);
+ctx.set_group_end(86, r.pos);
+
+auto tmp_87_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(86);
+}
+}
+}; 
+
+auto tmp_87 {cpp2::regex::make_on_return(cpp2::move(tmp_87_func))}; 
+static_cast(cpp2::move(tmp_87));
+ctx.set_group_start(87, r.pos);
+ctx.set_group_end(87, r.pos);
+
+auto tmp_88_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(87);
+}
+}
+}; 
+
+auto tmp_88 {cpp2::regex::make_on_return(cpp2::move(tmp_88_func))}; 
+static_cast(cpp2::move(tmp_88));
+ctx.set_group_start(88, r.pos);
+ctx.set_group_end(88, r.pos);
+
+auto tmp_89_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(88);
+}
+}
+}; 
+
+auto tmp_89 {cpp2::regex::make_on_return(cpp2::move(tmp_89_func))}; 
+static_cast(cpp2::move(tmp_89));
+ctx.set_group_start(89, r.pos);
+ctx.set_group_end(89, r.pos);
+
+auto tmp_90_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(89);
+}
+}
+}; 
+
+auto tmp_90 {cpp2::regex::make_on_return(cpp2::move(tmp_90_func))}; 
+static_cast(cpp2::move(tmp_90));
+ctx.set_group_start(90, r.pos);
+ctx.set_group_end(90, r.pos);
+
+auto tmp_91_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(90);
+}
+}
+}; 
+
+auto tmp_91 {cpp2::regex::make_on_return(cpp2::move(tmp_91_func))}; 
+static_cast(cpp2::move(tmp_91));
+ctx.set_group_start(91, r.pos);
+ctx.set_group_end(91, r.pos);
+
+auto tmp_92_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(91);
+}
+}
+}; 
+
+auto tmp_92 {cpp2::regex::make_on_return(cpp2::move(tmp_92_func))}; 
+static_cast(cpp2::move(tmp_92));
+ctx.set_group_start(92, r.pos);
+ctx.set_group_end(92, r.pos);
+
+auto tmp_93_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(92);
+}
+}
+}; 
+
+auto tmp_93 {cpp2::regex::make_on_return(cpp2::move(tmp_93_func))}; 
+static_cast(cpp2::move(tmp_93));
+ctx.set_group_start(93, r.pos);
+ctx.set_group_end(93, r.pos);
+
+auto tmp_94_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(93);
+}
+}
+}; 
+
+auto tmp_94 {cpp2::regex::make_on_return(cpp2::move(tmp_94_func))}; 
+static_cast(cpp2::move(tmp_94));
+ctx.set_group_start(94, r.pos);
+ctx.set_group_end(94, r.pos);
+
+auto tmp_95_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(94);
+}
+}
+}; 
+
+auto tmp_95 {cpp2::regex::make_on_return(cpp2::move(tmp_95_func))}; 
+static_cast(cpp2::move(tmp_95));
+ctx.set_group_start(95, r.pos);
+ctx.set_group_end(95, r.pos);
+
+auto tmp_96_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(95);
+}
+}
+}; 
+
+auto tmp_96 {cpp2::regex::make_on_return(cpp2::move(tmp_96_func))}; 
+static_cast(cpp2::move(tmp_96));
+ctx.set_group_start(96, r.pos);
+ctx.set_group_end(96, r.pos);
+
+auto tmp_97_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(96);
+}
+}
+}; 
+
+auto tmp_97 {cpp2::regex::make_on_return(cpp2::move(tmp_97_func))}; 
+static_cast(cpp2::move(tmp_97));
+ctx.set_group_start(97, r.pos);
+ctx.set_group_end(97, r.pos);
+
+auto tmp_98_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(97);
+}
+}
+}; 
+
+auto tmp_98 {cpp2::regex::make_on_return(cpp2::move(tmp_98_func))}; 
+static_cast(cpp2::move(tmp_98));
+ctx.set_group_start(98, r.pos);
+ctx.set_group_end(98, r.pos);
+
+auto tmp_99_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(98);
+}
+}
+}; 
+
+auto tmp_99 {cpp2::regex::make_on_return(cpp2::move(tmp_99_func))}; 
+static_cast(cpp2::move(tmp_99));
+ctx.set_group_start(99, r.pos);
+ctx.set_group_end(99, r.pos);
+
+auto tmp_100_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(99);
+}
+}
+}; 
+
+auto tmp_100 {cpp2::regex::make_on_return(cpp2::move(tmp_100_func))}; 
+static_cast(cpp2::move(tmp_100));
+ctx.set_group_start(100, r.pos);
+ctx.set_group_end(100, r.pos);
+
+auto tmp_101_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(100);
+}
+}
+}; 
+
+auto tmp_101 {cpp2::regex::make_on_return(cpp2::move(tmp_101_func))}; 
+static_cast(cpp2::move(tmp_101));
+ctx.set_group_start(101, r.pos);
+ctx.set_group_end(101, r.pos);
+
+auto tmp_102_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(101);
+}
+}
+}; 
+
+auto tmp_102 {cpp2::regex::make_on_return(cpp2::move(tmp_102_func))}; 
+static_cast(cpp2::move(tmp_102));
+ctx.set_group_start(102, r.pos);
+ctx.set_group_end(102, r.pos);
+
+auto tmp_103_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(102);
+}
+}
+}; 
+
+auto tmp_103 {cpp2::regex::make_on_return(cpp2::move(tmp_103_func))}; 
+static_cast(cpp2::move(tmp_103));
+ctx.set_group_start(103, r.pos);
+ctx.set_group_end(103, r.pos);
+
+auto tmp_104_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(103);
+}
+}
+}; 
+
+auto tmp_104 {cpp2::regex::make_on_return(cpp2::move(tmp_104_func))}; 
+static_cast(cpp2::move(tmp_104));
+ctx.set_group_start(104, r.pos);
+ctx.set_group_end(104, r.pos);
+
+auto tmp_105_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(104);
+}
+}
+}; 
+
+auto tmp_105 {cpp2::regex::make_on_return(cpp2::move(tmp_105_func))}; 
+static_cast(cpp2::move(tmp_105));
+ctx.set_group_start(105, r.pos);
+ctx.set_group_end(105, r.pos);
+
+auto tmp_106_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(105);
+}
+}
+}; 
+
+auto tmp_106 {cpp2::regex::make_on_return(cpp2::move(tmp_106_func))}; 
+static_cast(cpp2::move(tmp_106));
+ctx.set_group_start(106, r.pos);
+ctx.set_group_end(106, r.pos);
+
+auto tmp_107_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(106);
+}
+}
+}; 
+
+auto tmp_107 {cpp2::regex::make_on_return(cpp2::move(tmp_107_func))}; 
+static_cast(cpp2::move(tmp_107));
+ctx.set_group_start(107, r.pos);
+ctx.set_group_end(107, r.pos);
+
+auto tmp_108_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(107);
+}
+}
+}; 
+
+auto tmp_108 {cpp2::regex::make_on_return(cpp2::move(tmp_108_func))}; 
+static_cast(cpp2::move(tmp_108));
+ctx.set_group_start(108, r.pos);
+ctx.set_group_end(108, r.pos);
+
+auto tmp_109_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(108);
+}
+}
+}; 
+
+auto tmp_109 {cpp2::regex::make_on_return(cpp2::move(tmp_109_func))}; 
+static_cast(cpp2::move(tmp_109));
+ctx.set_group_start(109, r.pos);
+ctx.set_group_end(109, r.pos);
+
+auto tmp_110_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(109);
+}
+}
+}; 
+
+auto tmp_110 {cpp2::regex::make_on_return(cpp2::move(tmp_110_func))}; 
+static_cast(cpp2::move(tmp_110));
+ctx.set_group_start(110, r.pos);
+ctx.set_group_end(110, r.pos);
+
+auto tmp_111_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(110);
+}
+}
+}; 
+
+auto tmp_111 {cpp2::regex::make_on_return(cpp2::move(tmp_111_func))}; 
+static_cast(cpp2::move(tmp_111));
+ctx.set_group_start(111, r.pos);
+ctx.set_group_end(111, r.pos);
+
+auto tmp_112_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(111);
+}
+}
+}; 
+
+auto tmp_112 {cpp2::regex::make_on_return(cpp2::move(tmp_112_func))}; 
+static_cast(cpp2::move(tmp_112));
+ctx.set_group_start(112, r.pos);
+ctx.set_group_end(112, r.pos);
+
+auto tmp_113_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(112);
+}
+}
+}; 
+
+auto tmp_113 {cpp2::regex::make_on_return(cpp2::move(tmp_113_func))}; 
+static_cast(cpp2::move(tmp_113));
+ctx.set_group_start(113, r.pos);
+ctx.set_group_end(113, r.pos);
+
+auto tmp_114_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(113);
+}
+}
+}; 
+
+auto tmp_114 {cpp2::regex::make_on_return(cpp2::move(tmp_114_func))}; 
+static_cast(cpp2::move(tmp_114));
+ctx.set_group_start(114, r.pos);
+ctx.set_group_end(114, r.pos);
+
+auto tmp_115_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(114);
+}
+}
+}; 
+
+auto tmp_115 {cpp2::regex::make_on_return(cpp2::move(tmp_115_func))}; 
+static_cast(cpp2::move(tmp_115));
+ctx.set_group_start(115, r.pos);
+ctx.set_group_end(115, r.pos);
+
+auto tmp_116_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(115);
+}
+}
+}; 
+
+auto tmp_116 {cpp2::regex::make_on_return(cpp2::move(tmp_116_func))}; 
+static_cast(cpp2::move(tmp_116));
+ctx.set_group_start(116, r.pos);
+ctx.set_group_end(116, r.pos);
+
+auto tmp_117_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(116);
+}
+}
+}; 
+
+auto tmp_117 {cpp2::regex::make_on_return(cpp2::move(tmp_117_func))}; 
+static_cast(cpp2::move(tmp_117));
+ctx.set_group_start(117, r.pos);
+ctx.set_group_end(117, r.pos);
+
+auto tmp_118_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(117);
+}
+}
+}; 
+
+auto tmp_118 {cpp2::regex::make_on_return(cpp2::move(tmp_118_func))}; 
+static_cast(cpp2::move(tmp_118));
+ctx.set_group_start(118, r.pos);
+ctx.set_group_end(118, r.pos);
+
+auto tmp_119_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(118);
+}
+}
+}; 
+
+auto tmp_119 {cpp2::regex::make_on_return(cpp2::move(tmp_119_func))}; 
+static_cast(cpp2::move(tmp_119));
+ctx.set_group_start(119, r.pos);
+ctx.set_group_end(119, r.pos);
+
+auto tmp_120_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(119);
+}
+}
+}; 
+
+auto tmp_120 {cpp2::regex::make_on_return(cpp2::move(tmp_120_func))}; 
+static_cast(cpp2::move(tmp_120));
+ctx.set_group_start(120, r.pos);
+ctx.set_group_end(120, r.pos);
+
+auto tmp_121_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(120);
+}
+}
+}; 
+
+auto tmp_121 {cpp2::regex::make_on_return(cpp2::move(tmp_121_func))}; 
+static_cast(cpp2::move(tmp_121));
+ctx.set_group_start(121, r.pos);
+ctx.set_group_end(121, r.pos);
+
+auto tmp_122_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(121);
+}
+}
+}; 
+
+auto tmp_122 {cpp2::regex::make_on_return(cpp2::move(tmp_122_func))}; 
+static_cast(cpp2::move(tmp_122));
+ctx.set_group_start(122, r.pos);
+ctx.set_group_end(122, r.pos);
+
+auto tmp_123_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(122);
+}
+}
+}; 
+
+auto tmp_123 {cpp2::regex::make_on_return(cpp2::move(tmp_123_func))}; 
+static_cast(cpp2::move(tmp_123));
+ctx.set_group_start(123, r.pos);
+ctx.set_group_end(123, r.pos);
+
+auto tmp_124_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(123);
+}
+}
+}; 
+
+auto tmp_124 {cpp2::regex::make_on_return(cpp2::move(tmp_124_func))}; 
+static_cast(cpp2::move(tmp_124));
+ctx.set_group_start(124, r.pos);
+ctx.set_group_end(124, r.pos);
+
+auto tmp_125_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(124);
+}
+}
+}; 
+
+auto tmp_125 {cpp2::regex::make_on_return(cpp2::move(tmp_125_func))}; 
+static_cast(cpp2::move(tmp_125));
+ctx.set_group_start(125, r.pos);
+ctx.set_group_end(125, r.pos);
+
+auto tmp_126_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(125);
+}
+}
+}; 
+
+auto tmp_126 {cpp2::regex::make_on_return(cpp2::move(tmp_126_func))}; 
+static_cast(cpp2::move(tmp_126));
+ctx.set_group_start(126, r.pos);
+ctx.set_group_end(126, r.pos);
+
+auto tmp_127_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(126);
+}
+}
+}; 
+
+auto tmp_127 {cpp2::regex::make_on_return(cpp2::move(tmp_127_func))}; 
+static_cast(cpp2::move(tmp_127));
+ctx.set_group_start(127, r.pos);
+ctx.set_group_end(127, r.pos);
+
+auto tmp_128_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(127);
+}
+}
+}; 
+
+auto tmp_128 {cpp2::regex::make_on_return(cpp2::move(tmp_128_func))}; 
+static_cast(cpp2::move(tmp_128));
+ctx.set_group_start(128, r.pos);
+ctx.set_group_end(128, r.pos);
+
+auto tmp_129_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(128);
+}
+}
+}; 
+
+auto tmp_129 {cpp2::regex::make_on_return(cpp2::move(tmp_129_func))}; 
+static_cast(cpp2::move(tmp_129));
+ctx.set_group_start(129, r.pos);
+ctx.set_group_end(129, r.pos);
+
+auto tmp_130_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(129);
+}
+}
+}; 
+
+auto tmp_130 {cpp2::regex::make_on_return(cpp2::move(tmp_130_func))}; 
+static_cast(cpp2::move(tmp_130));
+ctx.set_group_start(130, r.pos);
+ctx.set_group_end(130, r.pos);
+
+auto tmp_131_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(130);
+}
+}
+}; 
+
+auto tmp_131 {cpp2::regex::make_on_return(cpp2::move(tmp_131_func))}; 
+static_cast(cpp2::move(tmp_131));
+ctx.set_group_start(131, r.pos);
+ctx.set_group_end(131, r.pos);
+
+auto tmp_132_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(131);
+}
+}
+}; 
+
+auto tmp_132 {cpp2::regex::make_on_return(cpp2::move(tmp_132_func))}; 
+static_cast(cpp2::move(tmp_132));
+ctx.set_group_start(132, r.pos);
+ctx.set_group_end(132, r.pos);
+
+auto tmp_133_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(132);
+}
+}
+}; 
+
+auto tmp_133 {cpp2::regex::make_on_return(cpp2::move(tmp_133_func))}; 
+static_cast(cpp2::move(tmp_133));
+ctx.set_group_start(133, r.pos);
+ctx.set_group_end(133, r.pos);
+
+auto tmp_134_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(133);
+}
+}
+}; 
+
+auto tmp_134 {cpp2::regex::make_on_return(cpp2::move(tmp_134_func))}; 
+static_cast(cpp2::move(tmp_134));
+ctx.set_group_start(134, r.pos);
+ctx.set_group_end(134, r.pos);
+
+auto tmp_135_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(134);
+}
+}
+}; 
+
+auto tmp_135 {cpp2::regex::make_on_return(cpp2::move(tmp_135_func))}; 
+static_cast(cpp2::move(tmp_135));
+ctx.set_group_start(135, r.pos);
+ctx.set_group_end(135, r.pos);
+
+auto tmp_136_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(135);
+}
+}
+}; 
+
+auto tmp_136 {cpp2::regex::make_on_return(cpp2::move(tmp_136_func))}; 
+static_cast(cpp2::move(tmp_136));
+ctx.set_group_start(136, r.pos);
+ctx.set_group_end(136, r.pos);
+
+auto tmp_137_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(136);
+}
+}
+}; 
+
+auto tmp_137 {cpp2::regex::make_on_return(cpp2::move(tmp_137_func))}; 
+static_cast(cpp2::move(tmp_137));
+ctx.set_group_start(137, r.pos);
+ctx.set_group_end(137, r.pos);
+
+auto tmp_138_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(137);
+}
+}
+}; 
+
+auto tmp_138 {cpp2::regex::make_on_return(cpp2::move(tmp_138_func))}; 
+static_cast(cpp2::move(tmp_138));
+ctx.set_group_start(138, r.pos);
+ctx.set_group_end(138, r.pos);
+
+auto tmp_139_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(138);
+}
+}
+}; 
+
+auto tmp_139 {cpp2::regex::make_on_return(cpp2::move(tmp_139_func))}; 
+static_cast(cpp2::move(tmp_139));
+ctx.set_group_start(139, r.pos);
+ctx.set_group_end(139, r.pos);
+
+auto tmp_140_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(139);
+}
+}
+}; 
+
+auto tmp_140 {cpp2::regex::make_on_return(cpp2::move(tmp_140_func))}; 
+static_cast(cpp2::move(tmp_140));
+ctx.set_group_start(140, r.pos);
+ctx.set_group_end(140, r.pos);
+
+auto tmp_141_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(140);
+}
+}
+}; 
+
+auto tmp_141 {cpp2::regex::make_on_return(cpp2::move(tmp_141_func))}; 
+static_cast(cpp2::move(tmp_141));
+ctx.set_group_start(141, r.pos);
+ctx.set_group_end(141, r.pos);
+
+auto tmp_142_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(141);
+}
+}
+}; 
+
+auto tmp_142 {cpp2::regex::make_on_return(cpp2::move(tmp_142_func))}; 
+static_cast(cpp2::move(tmp_142));
+ctx.set_group_start(142, r.pos);
+ctx.set_group_end(142, r.pos);
+
+auto tmp_143_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(142);
+}
+}
+}; 
+
+auto tmp_143 {cpp2::regex::make_on_return(cpp2::move(tmp_143_func))}; 
+static_cast(cpp2::move(tmp_143));
+ctx.set_group_start(143, r.pos);
+ctx.set_group_end(143, r.pos);
+
+auto tmp_144_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(143);
+}
+}
+}; 
+
+auto tmp_144 {cpp2::regex::make_on_return(cpp2::move(tmp_144_func))}; 
+static_cast(cpp2::move(tmp_144));
+ctx.set_group_start(144, r.pos);
+ctx.set_group_end(144, r.pos);
+
+auto tmp_145_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(144);
+}
+}
+}; 
+
+auto tmp_145 {cpp2::regex::make_on_return(cpp2::move(tmp_145_func))}; 
+static_cast(cpp2::move(tmp_145));
+ctx.set_group_start(145, r.pos);
+ctx.set_group_end(145, r.pos);
+
+auto tmp_146_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(145);
+}
+}
+}; 
+
+auto tmp_146 {cpp2::regex::make_on_return(cpp2::move(tmp_146_func))}; 
+static_cast(cpp2::move(tmp_146));
+ctx.set_group_start(146, r.pos);
+ctx.set_group_end(146, r.pos);
+
+auto tmp_147_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(146);
+}
+}
+}; 
+
+auto tmp_147 {cpp2::regex::make_on_return(cpp2::move(tmp_147_func))}; 
+static_cast(cpp2::move(tmp_147));
+ctx.set_group_start(147, r.pos);
+ctx.set_group_end(147, r.pos);
+
+auto tmp_148_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(147);
+}
+}
+}; 
+
+auto tmp_148 {cpp2::regex::make_on_return(cpp2::move(tmp_148_func))}; 
+static_cast(cpp2::move(tmp_148));
+ctx.set_group_start(148, r.pos);
+ctx.set_group_end(148, r.pos);
+
+auto tmp_149_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(148);
+}
+}
+}; 
+
+auto tmp_149 {cpp2::regex::make_on_return(cpp2::move(tmp_149_func))}; 
+static_cast(cpp2::move(tmp_149));
+ctx.set_group_start(149, r.pos);
+ctx.set_group_end(149, r.pos);
+
+auto tmp_150_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(149);
+}
+}
+}; 
+
+auto tmp_150 {cpp2::regex::make_on_return(cpp2::move(tmp_150_func))}; 
+static_cast(cpp2::move(tmp_150));
+ctx.set_group_start(150, r.pos);
+ctx.set_group_end(150, r.pos);
+
+auto tmp_151_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(150);
+}
+}
+}; 
+
+auto tmp_151 {cpp2::regex::make_on_return(cpp2::move(tmp_151_func))}; 
+static_cast(cpp2::move(tmp_151));
+ctx.set_group_start(151, r.pos);
+ctx.set_group_end(151, r.pos);
+
+auto tmp_152_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(151);
+}
+}
+}; 
+
+auto tmp_152 {cpp2::regex::make_on_return(cpp2::move(tmp_152_func))}; 
+static_cast(cpp2::move(tmp_152));
+ctx.set_group_start(152, r.pos);
+ctx.set_group_end(152, r.pos);
+
+auto tmp_153_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(152);
+}
+}
+}; 
+
+auto tmp_153 {cpp2::regex::make_on_return(cpp2::move(tmp_153_func))}; 
+static_cast(cpp2::move(tmp_153));
+ctx.set_group_start(153, r.pos);
+ctx.set_group_end(153, r.pos);
+
+auto tmp_154_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(153);
+}
+}
+}; 
+
+auto tmp_154 {cpp2::regex::make_on_return(cpp2::move(tmp_154_func))}; 
+static_cast(cpp2::move(tmp_154));
+ctx.set_group_start(154, r.pos);
+ctx.set_group_end(154, r.pos);
+
+auto tmp_155_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(154);
+}
+}
+}; 
+
+auto tmp_155 {cpp2::regex::make_on_return(cpp2::move(tmp_155_func))}; 
+static_cast(cpp2::move(tmp_155));
+ctx.set_group_start(155, r.pos);
+ctx.set_group_end(155, r.pos);
+
+auto tmp_156_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(155);
+}
+}
+}; 
+
+auto tmp_156 {cpp2::regex::make_on_return(cpp2::move(tmp_156_func))}; 
+static_cast(cpp2::move(tmp_156));
+ctx.set_group_start(156, r.pos);
+ctx.set_group_end(156, r.pos);
+
+auto tmp_157_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(156);
+}
+}
+}; 
+
+auto tmp_157 {cpp2::regex::make_on_return(cpp2::move(tmp_157_func))}; 
+static_cast(cpp2::move(tmp_157));
+ctx.set_group_start(157, r.pos);
+ctx.set_group_end(157, r.pos);
+
+auto tmp_158_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(157);
+}
+}
+}; 
+
+auto tmp_158 {cpp2::regex::make_on_return(cpp2::move(tmp_158_func))}; 
+static_cast(cpp2::move(tmp_158));
+ctx.set_group_start(158, r.pos);
+ctx.set_group_end(158, r.pos);
+
+auto tmp_159_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(158);
+}
+}
+}; 
+
+auto tmp_159 {cpp2::regex::make_on_return(cpp2::move(tmp_159_func))}; 
+static_cast(cpp2::move(tmp_159));
+ctx.set_group_start(159, r.pos);
+ctx.set_group_end(159, r.pos);
+
+auto tmp_160_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(159);
+}
+}
+}; 
+
+auto tmp_160 {cpp2::regex::make_on_return(cpp2::move(tmp_160_func))}; 
+static_cast(cpp2::move(tmp_160));
+ctx.set_group_start(160, r.pos);
+ctx.set_group_end(160, r.pos);
+
+auto tmp_161_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(160);
+}
+}
+}; 
+
+auto tmp_161 {cpp2::regex::make_on_return(cpp2::move(tmp_161_func))}; 
+static_cast(cpp2::move(tmp_161));
+ctx.set_group_start(161, r.pos);
+ctx.set_group_end(161, r.pos);
+
+auto tmp_162_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(161);
+}
+}
+}; 
+
+auto tmp_162 {cpp2::regex::make_on_return(cpp2::move(tmp_162_func))}; 
+static_cast(cpp2::move(tmp_162));
+ctx.set_group_start(162, r.pos);
+ctx.set_group_end(162, r.pos);
+
+auto tmp_163_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(162);
+}
+}
+}; 
+
+auto tmp_163 {cpp2::regex::make_on_return(cpp2::move(tmp_163_func))}; 
+static_cast(cpp2::move(tmp_163));
+ctx.set_group_start(163, r.pos);
+ctx.set_group_end(163, r.pos);
+
+auto tmp_164_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(163);
+}
+}
+}; 
+
+auto tmp_164 {cpp2::regex::make_on_return(cpp2::move(tmp_164_func))}; 
+static_cast(cpp2::move(tmp_164));
+ctx.set_group_start(164, r.pos);
+ctx.set_group_end(164, r.pos);
+
+auto tmp_165_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(164);
+}
+}
+}; 
+
+auto tmp_165 {cpp2::regex::make_on_return(cpp2::move(tmp_165_func))}; 
+static_cast(cpp2::move(tmp_165));
+ctx.set_group_start(165, r.pos);
+ctx.set_group_end(165, r.pos);
+
+auto tmp_166_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(165);
+}
+}
+}; 
+
+auto tmp_166 {cpp2::regex::make_on_return(cpp2::move(tmp_166_func))}; 
+static_cast(cpp2::move(tmp_166));
+ctx.set_group_start(166, r.pos);
+ctx.set_group_end(166, r.pos);
+
+auto tmp_167_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(166);
+}
+}
+}; 
+
+auto tmp_167 {cpp2::regex::make_on_return(cpp2::move(tmp_167_func))}; 
+static_cast(cpp2::move(tmp_167));
+ctx.set_group_start(167, r.pos);
+ctx.set_group_end(167, r.pos);
+
+auto tmp_168_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(167);
+}
+}
+}; 
+
+auto tmp_168 {cpp2::regex::make_on_return(cpp2::move(tmp_168_func))}; 
+static_cast(cpp2::move(tmp_168));
+ctx.set_group_start(168, r.pos);
+ctx.set_group_end(168, r.pos);
+
+auto tmp_169_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(168);
+}
+}
+}; 
+
+auto tmp_169 {cpp2::regex::make_on_return(cpp2::move(tmp_169_func))}; 
+static_cast(cpp2::move(tmp_169));
+ctx.set_group_start(169, r.pos);
+ctx.set_group_end(169, r.pos);
+
+auto tmp_170_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(169);
+}
+}
+}; 
+
+auto tmp_170 {cpp2::regex::make_on_return(cpp2::move(tmp_170_func))}; 
+static_cast(cpp2::move(tmp_170));
+ctx.set_group_start(170, r.pos);
+ctx.set_group_end(170, r.pos);
+
+auto tmp_171_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(170);
+}
+}
+}; 
+
+auto tmp_171 {cpp2::regex::make_on_return(cpp2::move(tmp_171_func))}; 
+static_cast(cpp2::move(tmp_171));
+ctx.set_group_start(171, r.pos);
+ctx.set_group_end(171, r.pos);
+
+auto tmp_172_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(171);
+}
+}
+}; 
+
+auto tmp_172 {cpp2::regex::make_on_return(cpp2::move(tmp_172_func))}; 
+static_cast(cpp2::move(tmp_172));
+ctx.set_group_start(172, r.pos);
+ctx.set_group_end(172, r.pos);
+
+auto tmp_173_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(172);
+}
+}
+}; 
+
+auto tmp_173 {cpp2::regex::make_on_return(cpp2::move(tmp_173_func))}; 
+static_cast(cpp2::move(tmp_173));
+ctx.set_group_start(173, r.pos);
+ctx.set_group_end(173, r.pos);
+
+auto tmp_174_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(173);
+}
+}
+}; 
+
+auto tmp_174 {cpp2::regex::make_on_return(cpp2::move(tmp_174_func))}; 
+static_cast(cpp2::move(tmp_174));
+ctx.set_group_start(174, r.pos);
+ctx.set_group_end(174, r.pos);
+
+auto tmp_175_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(174);
+}
+}
+}; 
+
+auto tmp_175 {cpp2::regex::make_on_return(cpp2::move(tmp_175_func))}; 
+static_cast(cpp2::move(tmp_175));
+ctx.set_group_start(175, r.pos);
+ctx.set_group_end(175, r.pos);
+
+auto tmp_176_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(175);
+}
+}
+}; 
+
+auto tmp_176 {cpp2::regex::make_on_return(cpp2::move(tmp_176_func))}; 
+static_cast(cpp2::move(tmp_176));
+ctx.set_group_start(176, r.pos);
+ctx.set_group_end(176, r.pos);
+
+auto tmp_177_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(176);
+}
+}
+}; 
+
+auto tmp_177 {cpp2::regex::make_on_return(cpp2::move(tmp_177_func))}; 
+static_cast(cpp2::move(tmp_177));
+ctx.set_group_start(177, r.pos);
+ctx.set_group_end(177, r.pos);
+
+auto tmp_178_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(177);
+}
+}
+}; 
+
+auto tmp_178 {cpp2::regex::make_on_return(cpp2::move(tmp_178_func))}; 
+static_cast(cpp2::move(tmp_178));
+ctx.set_group_start(178, r.pos);
+ctx.set_group_end(178, r.pos);
+
+auto tmp_179_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(178);
+}
+}
+}; 
+
+auto tmp_179 {cpp2::regex::make_on_return(cpp2::move(tmp_179_func))}; 
+static_cast(cpp2::move(tmp_179));
+ctx.set_group_start(179, r.pos);
+ctx.set_group_end(179, r.pos);
+
+auto tmp_180_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(179);
+}
+}
+}; 
+
+auto tmp_180 {cpp2::regex::make_on_return(cpp2::move(tmp_180_func))}; 
+static_cast(cpp2::move(tmp_180));
+ctx.set_group_start(180, r.pos);
+ctx.set_group_end(180, r.pos);
+
+auto tmp_181_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(180);
+}
+}
+}; 
+
+auto tmp_181 {cpp2::regex::make_on_return(cpp2::move(tmp_181_func))}; 
+static_cast(cpp2::move(tmp_181));
+ctx.set_group_start(181, r.pos);
+
+std::array str_tmp_182 {"a"}; 
+if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+r.matched = false;
+break;
+}
+{
+int i{0};
+for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+if (CPP2_ASSERT_IN_BOUNDS(str_tmp_182, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+}
+}
+if (r.matched) {r.pos += 1;}
+else {break;}
+ctx.set_group_end(181, r.pos);
+
+auto tmp_183_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+(*cpp2::impl::assert_not_null(_2)).set_group_invalid(181);
+}
+}
+}; 
+
+auto tmp_183 {cpp2::regex::make_on_return(cpp2::move(tmp_183_func))}; 
+static_cast(cpp2::move(tmp_183));
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = other(r.pos, ctx);
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+
+template  auto test_tests_18_branch_reset::regex_15_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+ctx.set_group_invalid(1);
+ctx.set_group_invalid(2);
+ctx.set_group_invalid(3);
+ctx.set_group_invalid(4);
+ctx.set_group_invalid(5);
+ctx.set_group_invalid(6);
+ctx.set_group_invalid(7);
+ctx.set_group_invalid(8);
+ctx.set_group_invalid(9);
+ctx.set_group_invalid(10);
+ctx.set_group_invalid(11);
+ctx.set_group_invalid(12);
+ctx.set_group_invalid(13);
+ctx.set_group_invalid(14);
+ctx.set_group_invalid(15);
+ctx.set_group_invalid(16);
+ctx.set_group_invalid(17);
+ctx.set_group_invalid(18);
+ctx.set_group_invalid(19);
+ctx.set_group_invalid(20);
+ctx.set_group_invalid(21);
+ctx.set_group_invalid(22);
+ctx.set_group_invalid(23);
+ctx.set_group_invalid(24);
+ctx.set_group_invalid(25);
+ctx.set_group_invalid(26);
+ctx.set_group_invalid(27);
+ctx.set_group_invalid(28);
+ctx.set_group_invalid(29);
+ctx.set_group_invalid(30);
+ctx.set_group_invalid(31);
+ctx.set_group_invalid(32);
+ctx.set_group_invalid(33);
+ctx.set_group_invalid(34);
+ctx.set_group_invalid(35);
+ctx.set_group_invalid(36);
+ctx.set_group_invalid(37);
+ctx.set_group_invalid(38);
+ctx.set_group_invalid(39);
+ctx.set_group_invalid(40);
+ctx.set_group_invalid(41);
+ctx.set_group_invalid(42);
+ctx.set_group_invalid(43);
+ctx.set_group_invalid(44);
+ctx.set_group_invalid(45);
+ctx.set_group_invalid(46);
+ctx.set_group_invalid(47);
+ctx.set_group_invalid(48);
+ctx.set_group_invalid(49);
+ctx.set_group_invalid(50);
+ctx.set_group_invalid(51);
+ctx.set_group_invalid(52);
+ctx.set_group_invalid(53);
+ctx.set_group_invalid(54);
+ctx.set_group_invalid(55);
+ctx.set_group_invalid(56);
+ctx.set_group_invalid(57);
+ctx.set_group_invalid(58);
+ctx.set_group_invalid(59);
+ctx.set_group_invalid(60);
+ctx.set_group_invalid(61);
+ctx.set_group_invalid(62);
+ctx.set_group_invalid(63);
+ctx.set_group_invalid(64);
+ctx.set_group_invalid(65);
+ctx.set_group_invalid(66);
+ctx.set_group_invalid(67);
+ctx.set_group_invalid(68);
+ctx.set_group_invalid(69);
+ctx.set_group_invalid(70);
+ctx.set_group_invalid(71);
+ctx.set_group_invalid(72);
+ctx.set_group_invalid(73);
+ctx.set_group_invalid(74);
+ctx.set_group_invalid(75);
+ctx.set_group_invalid(76);
+ctx.set_group_invalid(77);
+ctx.set_group_invalid(78);
+ctx.set_group_invalid(79);
+ctx.set_group_invalid(80);
+ctx.set_group_invalid(81);
+ctx.set_group_invalid(82);
+ctx.set_group_invalid(83);
+ctx.set_group_invalid(84);
+ctx.set_group_invalid(85);
+ctx.set_group_invalid(86);
+ctx.set_group_invalid(87);
+ctx.set_group_invalid(88);
+ctx.set_group_invalid(89);
+ctx.set_group_invalid(90);
+ctx.set_group_invalid(91);
+ctx.set_group_invalid(92);
+ctx.set_group_invalid(93);
+ctx.set_group_invalid(94);
+ctx.set_group_invalid(95);
+ctx.set_group_invalid(96);
+ctx.set_group_invalid(97);
+ctx.set_group_invalid(98);
+ctx.set_group_invalid(99);
+ctx.set_group_invalid(100);
+ctx.set_group_invalid(101);
+ctx.set_group_invalid(102);
+ctx.set_group_invalid(103);
+ctx.set_group_invalid(104);
+ctx.set_group_invalid(105);
+ctx.set_group_invalid(106);
+ctx.set_group_invalid(107);
+ctx.set_group_invalid(108);
+ctx.set_group_invalid(109);
+ctx.set_group_invalid(110);
+ctx.set_group_invalid(111);
+ctx.set_group_invalid(112);
+ctx.set_group_invalid(113);
+ctx.set_group_invalid(114);
+ctx.set_group_invalid(115);
+ctx.set_group_invalid(116);
+ctx.set_group_invalid(117);
+ctx.set_group_invalid(118);
+ctx.set_group_invalid(119);
+ctx.set_group_invalid(120);
+ctx.set_group_invalid(121);
+ctx.set_group_invalid(122);
+ctx.set_group_invalid(123);
+ctx.set_group_invalid(124);
+ctx.set_group_invalid(125);
+ctx.set_group_invalid(126);
+ctx.set_group_invalid(127);
+ctx.set_group_invalid(128);
+ctx.set_group_invalid(129);
+ctx.set_group_invalid(130);
+ctx.set_group_invalid(131);
+ctx.set_group_invalid(132);
+ctx.set_group_invalid(133);
+ctx.set_group_invalid(134);
+ctx.set_group_invalid(135);
+ctx.set_group_invalid(136);
+ctx.set_group_invalid(137);
+ctx.set_group_invalid(138);
+ctx.set_group_invalid(139);
+ctx.set_group_invalid(140);
+ctx.set_group_invalid(141);
+ctx.set_group_invalid(142);
+ctx.set_group_invalid(143);
+ctx.set_group_invalid(144);
+ctx.set_group_invalid(145);
+ctx.set_group_invalid(146);
+ctx.set_group_invalid(147);
+ctx.set_group_invalid(148);
+ctx.set_group_invalid(149);
+ctx.set_group_invalid(150);
+ctx.set_group_invalid(151);
+ctx.set_group_invalid(152);
+ctx.set_group_invalid(153);
+ctx.set_group_invalid(154);
+ctx.set_group_invalid(155);
+ctx.set_group_invalid(156);
+ctx.set_group_invalid(157);
+ctx.set_group_invalid(158);
+ctx.set_group_invalid(159);
+ctx.set_group_invalid(160);
+ctx.set_group_invalid(161);
+ctx.set_group_invalid(162);
+ctx.set_group_invalid(163);
+ctx.set_group_invalid(164);
+ctx.set_group_invalid(165);
+ctx.set_group_invalid(166);
+ctx.set_group_invalid(167);
+ctx.set_group_invalid(168);
+ctx.set_group_invalid(169);
+ctx.set_group_invalid(170);
+ctx.set_group_invalid(171);
+ctx.set_group_invalid(172);
+ctx.set_group_invalid(173);
+ctx.set_group_invalid(174);
+ctx.set_group_invalid(175);
+ctx.set_group_invalid(176);
+ctx.set_group_invalid(177);
+ctx.set_group_invalid(178);
+ctx.set_group_invalid(179);
+ctx.set_group_invalid(180);
+ctx.set_group_invalid(181);
+}
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_3(), func_1(), reset_0(), func_2(), reset_1());
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+auto r {ctx.pass(cur)}; 
+do {
+}
+ while ( 
+false
+);
+if (r.matched) {
+r = other(r.pos, ctx);
+}
+else {
+r.pos = ctx.end;
+}
+return r; 
+}
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+ctx.set_group_start(0, cur);
+
+auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+if (r.matched) {ctx.set_group_end(0, r.pos);}
+return r; 
+}
+
+template  [[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+static_cast(name);
+return -1; 
+}
+
+[[nodiscard]] auto test_tests_18_branch_reset::regex_15_matcher::to_string() -> std::string{return R"((?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)))"; }
+
+
+#line 189 "pure2-regex_18_branch_reset.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_18_branch_reset());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp2.output b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp2.output
new file mode 100644
index 0000000000..b341e8984a
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_18_branch_reset.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/regression-tests/test-results/pure2-regex_19_lookahead.cpp b/regression-tests/test-results/pure2-regex_19_lookahead.cpp
new file mode 100644
index 0000000000..5ba0ea42ad
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_19_lookahead.cpp
@@ -0,0 +1,9643 @@
+
+#define CPP2_IMPORT_STD          Yes
+
+//=== Cpp2 type declarations ====================================================
+
+
+#include "cpp2util.h"
+
+#line 1 "pure2-regex_19_lookahead.cpp2"
+
+#line 153 "pure2-regex_19_lookahead.cpp2"
+class test_tests_19_lookahead;
+  
+
+//=== Cpp2 type definitions and function declarations ===========================
+
+#line 1 "pure2-regex_19_lookahead.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
+
+#line 112 "pure2-regex_19_lookahead.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void;
+
+#line 153 "pure2-regex_19_lookahead.cpp2"
+class test_tests_19_lookahead {
+
+#line 199 "pure2-regex_19_lookahead.cpp2"
+  public: auto run() const& -> void;
+  public: class regex_01_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_01_matcher() = default;
+        public: regex_01_matcher(regex_01_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_01_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_01 {}; public: class regex_02_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_02_matcher() = default;
+        public: regex_02_matcher(regex_02_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_02_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_02 {}; public: class regex_03_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_03_matcher() = default;
+        public: regex_03_matcher(regex_03_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_03_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_03 {}; public: class regex_04_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_04_matcher() = default;
+        public: regex_04_matcher(regex_04_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_04_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_04 {}; public: class regex_05_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_05_matcher() = default;
+        public: regex_05_matcher(regex_05_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_05_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_05 {}; public: class regex_06_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_06_matcher() = default;
+        public: regex_06_matcher(regex_06_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_06_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_06 {}; public: class regex_07_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_07_matcher() = default;
+        public: regex_07_matcher(regex_07_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_07_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_07 {}; public: class regex_08_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_08_matcher() = default;
+        public: regex_08_matcher(regex_08_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_08_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_08 {}; public: class regex_09_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_09_matcher() = default;
+        public: regex_09_matcher(regex_09_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_09_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_09 {}; public: class regex_10_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_10_matcher() = default;
+        public: regex_10_matcher(regex_10_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_10_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_10 {}; public: class regex_11_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_11_matcher() = default;
+        public: regex_11_matcher(regex_11_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_11_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_11 {}; public: class regex_12_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_12_matcher() = default;
+        public: regex_12_matcher(regex_12_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_12_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_12 {}; public: class regex_13_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_13_matcher() = default;
+        public: regex_13_matcher(regex_13_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_13_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_13 {}; public: class regex_14_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_14_matcher() = default;
+        public: regex_14_matcher(regex_14_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_14_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_14 {}; public: class regex_15_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_15_matcher() = default;
+        public: regex_15_matcher(regex_15_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_15_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_15 {}; public: class regex_16_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_16_matcher() = default;
+        public: regex_16_matcher(regex_16_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_16_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_16 {}; public: class regex_17_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_17_matcher() = default;
+        public: regex_17_matcher(regex_17_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_17_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_17 {}; public: class regex_18_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_18_matcher() = default;
+        public: regex_18_matcher(regex_18_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_18_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_18 {}; public: class regex_19_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_19_matcher() = default;
+        public: regex_19_matcher(regex_19_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_19_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_19 {}; public: class regex_20_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_20_matcher() = default;
+        public: regex_20_matcher(regex_20_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_20_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_20 {}; public: class regex_21_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_21_matcher() = default;
+        public: regex_21_matcher(regex_21_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_21_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_21 {}; public: class regex_22_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_22_matcher() = default;
+        public: regex_22_matcher(regex_22_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_22_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_22 {}; public: class regex_23_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_23_matcher() = default;
+        public: regex_23_matcher(regex_23_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_23_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_23 {}; public: class regex_24_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_24_matcher() = default;
+        public: regex_24_matcher(regex_24_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_24_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_24 {}; public: class regex_25_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_25_matcher() = default;
+        public: regex_25_matcher(regex_25_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_25_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_25 {}; public: class regex_26_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_26_matcher() = default;
+        public: regex_26_matcher(regex_26_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_26_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_26 {}; public: class regex_27_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_27_matcher() = default;
+        public: regex_27_matcher(regex_27_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_27_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_27 {}; public: class regex_28_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_28_matcher() = default;
+        public: regex_28_matcher(regex_28_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_28_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_28 {}; public: class regex_37_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_37_matcher() = default;
+        public: regex_37_matcher(regex_37_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_37_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_37 {}; public: class regex_38_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_38_matcher() = default;
+        public: regex_38_matcher(regex_38_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_38_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_38 {}; public: class regex_39_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_39_matcher() = default;
+        public: regex_39_matcher(regex_39_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_39_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_39 {}; public: class regex_40_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_40_matcher() = default;
+        public: regex_40_matcher(regex_40_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_40_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_40 {}; public: class regex_41_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_41_matcher() = default;
+        public: regex_41_matcher(regex_41_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_41_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_41 {}; public: class regex_42_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_42_matcher() = default;
+        public: regex_42_matcher(regex_42_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_42_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_42 {}; public: class regex_43_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_43_matcher() = default;
+        public: regex_43_matcher(regex_43_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_43_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_43 {}; public: class regex_44_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_11 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_12 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_44_matcher() = default;
+        public: regex_44_matcher(regex_44_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_44_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_44 {}; public: class regex_45_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_45_matcher() = default;
+        public: regex_45_matcher(regex_45_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_45_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_45 {}; public: class regex_46_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_6 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_5 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_7 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_0 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_4 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_11 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_10 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_12 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class reset_1 {
+  public: auto operator()(auto& ctx) const& -> void;
+
+  };
+
+  public: class func_9 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_13 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_8 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_14 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_15 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_46_matcher() = default;
+        public: regex_46_matcher(regex_46_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_46_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_46 {}; public: class regex_47_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_47_matcher() = default;
+        public: regex_47_matcher(regex_47_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_47_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_47 {}; public: class regex_48_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_48_matcher() = default;
+        public: regex_48_matcher(regex_48_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_48_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_48 {}; public: class regex_49_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_49_matcher() = default;
+        public: regex_49_matcher(regex_49_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_49_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_49 {}; public: class regex_50_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_50_matcher() = default;
+        public: regex_50_matcher(regex_50_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_50_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_50 {}; public: class regex_51_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_51_matcher() = default;
+        public: regex_51_matcher(regex_51_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_51_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_51 {}; public: class regex_52_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_52_matcher() = default;
+        public: regex_52_matcher(regex_52_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_52_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_52 {}; public: class regex_53_matcher {
+  public: template class wrap {
+  public: using context = cpp2::regex::match_context;
+public: class func_1 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_0 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_3 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: class func_2 {
+  public: [[nodiscard]] auto operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return;
+
+  };
+
+  public: [[nodiscard]] static auto entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return;
+
+  public: [[nodiscard]] static auto get_named_group_index(auto const& name) -> int;
+
+  public: wrap() = default;
+  public: wrap(wrap const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(wrap const&) -> void = delete;
+
+  };
+
+  public: [[nodiscard]] static auto to_string() -> std::string;
+
+        public: regex_53_matcher() = default;
+        public: regex_53_matcher(regex_53_matcher const&) = delete; /* No 'that' constructor, suppress copy */
+        public: auto operator=(regex_53_matcher const&) -> void = delete;
+
+  };
+
+  public: cpp2::regex::regular_expression regex_53 {}; 
+  public: test_tests_19_lookahead() = default;
+  public: test_tests_19_lookahead(test_tests_19_lookahead const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_19_lookahead const&) -> void = delete;
+
+
+#line 248 "pure2-regex_19_lookahead.cpp2"
+};
+auto main() -> int;
+
+//=== Cpp2 function definitions =================================================
+
+#line 1 "pure2-regex_19_lookahead.cpp2"
+[[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
+#line 2 "pure2-regex_19_lookahead.cpp2"
+  std::string result {""}; 
+
+  auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
+  auto start {std::distance(CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))), iter)}; 
+    auto firstDollar {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "$", start)}; 
+    auto firstAt {CPP2_UFCS(find)((*cpp2::impl::assert_not_null(_0)), "@", cpp2::move(start))}; 
+
+  auto end {std::min(cpp2::move(firstDollar), cpp2::move(firstAt))}; 
+  if (end != std::string::npos) {
+   return CPP2_UFCS(cbegin)((*cpp2::impl::assert_not_null(_0))) + cpp2::move(end); 
+  }
+  else {
+   return CPP2_UFCS(cend)((*cpp2::impl::assert_not_null(_0))); 
+  }
+  }}; 
+  auto extract_group_and_advance {[](auto& iter) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; std::isdigit(*cpp2::impl::assert_not_null(iter)); ++iter ) {}
+
+    return std::stoi(std::string(cpp2::move(start), iter)); 
+  }}; 
+  auto extract_until {[](auto& iter, cpp2::impl::in to) mutable -> auto{
+    auto start {iter}; 
+
+    for( ; (to != *cpp2::impl::assert_not_null(iter)); ++iter ) {}// TODO: Without bracket: error: postfix unary * (dereference) cannot be immediately followed by a (, identifier, or literal - add whitespace before * here if you meant binary * (multiplication)
+
+    return std::string(cpp2::move(start), iter); 
+  }}; 
+
+  auto iter {CPP2_UFCS(begin)(resultExpr)}; 
+
+  while( iter != CPP2_UFCS(end)(resultExpr) ) {
+    auto next {get_next(iter)}; 
+
+    if (next != iter) {
+      result += std::string(iter, next);
+    }
+    if (next != CPP2_UFCS(end)(resultExpr)) {
+      if (*cpp2::impl::assert_not_null(next) == '$') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '&') {
+          ++next;
+          result += CPP2_UFCS(group)(r, 0);
+        }
+        else {if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto is_start {*cpp2::impl::assert_not_null(next) == '-'}; 
+          ++next;
+          if (*cpp2::impl::assert_not_null(next) == '{') {
+            ++next; // Skip {
+            auto group {extract_until(next, '}')}; 
+            ++next; // Skip }
+            result += CPP2_UFCS(group)(r, cpp2::move(group));
+          }
+          else {if (*cpp2::impl::assert_not_null(next) == '[') {
+            ++next; // Skip [
+            auto group {extract_group_and_advance(next)}; 
+            ++next; // Skip ]
+
+            if (cpp2::move(is_start)) {
+              result += std::to_string(CPP2_UFCS(group_start)(r, cpp2::move(group)));
+            }
+            else {
+              result += std::to_string(CPP2_UFCS(group_end)(r, cpp2::move(group)));
+            }
+          }
+          else {
+            // Return max group
+            result += CPP2_UFCS(group)(r, CPP2_UFCS(group_number)(r) - 1);
+          }}
+        }
+        else {if (std::isdigit(*cpp2::impl::assert_not_null(next))) {
+          auto group {extract_group_and_advance(next)}; 
+          result += CPP2_UFCS(group)(r, cpp2::move(group));
+        }
+        else {
+          std::cerr << "Not implemented";
+        }}}
+      }
+      else {if (*cpp2::impl::assert_not_null(next) == '@') {
+        ++next;
+
+        if (*cpp2::impl::assert_not_null(next) == '-' || *cpp2::impl::assert_not_null(next) == '+') {
+          auto i {0}; 
+          for( ; cpp2::impl::cmp_less(i,cpp2::unsafe_narrow(CPP2_UFCS(group_number)(r))); ++i ) {
+            auto pos {0}; 
+            if (*cpp2::impl::assert_not_null(next) == '-') {
+              pos = CPP2_UFCS(group_start)(r, i);
+            }
+            else {
+              pos = CPP2_UFCS(group_end)(r, i);
+            }
+            result +=  std::to_string(cpp2::move(pos));
+          }
+        }
+        else {
+          std::cerr << "Not implemented";
+        }
+      }
+      else {
+        std::cerr << "Not implemented.";
+      }}
+    }
+    iter = cpp2::move(next);
+  }
+
+  return result; 
+}
+
+#line 112 "pure2-regex_19_lookahead.cpp2"
+template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
+           cpp2::impl::in resultExpected) -> void{
+
+  std::string warning {""}; 
+  if (CPP2_UFCS(to_string)(regex) != regex_str) {
+    warning = "Warning: Parsed regex does not match.";
+  }
+
+  std::string status {"OK"}; 
+
+  auto r {CPP2_UFCS(search)(regex, str)}; 
+
+  if ("y" == kind || "yM" == kind || "yS" == kind || "yB" == kind) {
+    if (!(r.matched)) {
+      status = "Failure: Regex should apply.";
+    }
+    else {
+      // Have a match check the result
+
+      auto result {create_result(resultExpr, cpp2::move(r))}; 
+
+      if (result != resultExpected) {
+        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+      }
+    }
+  }
+  else {if ("n" == kind) {
+    if (r.matched) {
+      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+    }
+  }else {
+    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+  }}
+
+  if (!(CPP2_UFCS(empty)(warning))) {
+    warning += " ";
+  }
+  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+}
+
+#line 199 "pure2-regex_19_lookahead.cpp2"
+  auto test_tests_19_lookahead::run() const& -> void{
+    std::cout << "Running tests_19_lookahead:" << std::endl;
+    test(regex_01, "01", R"(a(?!b).)", "abad", "y", R"($&)", "ad");
+    test(regex_02, "02", R"((?=)a)", "a", "y", R"($&)", "a");
+    test(regex_03, "03", R"(a(?=d).)", "abad", "y", R"($&)", "ad");
+    test(regex_04, "04", R"(a(?=c|d).)", "abad", "y", R"($&)", "ad");
+    test(regex_05, "05", R"(^(?:b|a(?=(.)))*\1)", "abc", "y", R"($&)", "ab");
+    test(regex_06, "06", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab");
+    test(regex_07, "07", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-");
+    test(regex_08, "08", R"((?=(a+?))(\1ab))", "aaab", "y", R"($2)", "aab");
+    test(regex_09, "09", R"(^(?=(a+?))\1ab)", "aaab", "n", R"(-)", "-");
+    test(regex_10, "10", R"((.*)(?=c))", "abcd", "y", R"($1)", "ab");
+    test(regex_11, "11", R"((.*)(?=c)c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_12, "12", R"((.*)(?=b|c))", "abcd", "y", R"($1)", "ab");
+    test(regex_13, "13", R"((.*)(?=b|c)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_14, "14", R"((.*)(?=c|b))", "abcd", "y", R"($1)", "ab");
+    test(regex_15, "15", R"((.*)(?=c|b)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_16, "16", R"((.*)(?=[bc]))", "abcd", "y", R"($1)", "ab");
+    test(regex_17, "17", R"((.*)(?=[bc])c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_18, "18", R"((.*?)(?=c))", "abcd", "y", R"($1)", "ab");
+    test(regex_19, "19", R"((.*?)(?=c)c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_20, "20", R"((.*?)(?=b|c))", "abcd", "y", R"($1)", "a");
+    test(regex_21, "21", R"((.*?)(?=b|c)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_22, "22", R"((.*?)(?=c|b))", "abcd", "y", R"($1)", "a");
+    test(regex_23, "23", R"((.*?)(?=c|b)c)", "abcd", "y", R"($1)", "ab");
+    test(regex_24, "24", R"((.*?)(?=[bc]))", "abcd", "y", R"($1)", "a");
+    test(regex_25, "25", R"((.*?)(?=[bc])c)", "abcd", "yB", R"($1)", "ab");
+    test(regex_26, "26", R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))", "aaaaaaaa", "y", R"($1)", "aaaaaaa");
+    test(regex_27, "27", R"(a(?!b(?!c))(..))", "abababc", "y", R"($1)", "bc");
+    test(regex_28, "28", R"(a(?!b(?=a))(..))", "abababc", "y", R"($1)", "bc");
+    test(regex_37, "37", R"(X(\w+)(?=\s)|X(\w+))", "Xab", "y", R"([$1-$2])", "[-ab]");
+    test(regex_38, "38", R"(^a*(?=b)b)", "ab", "y", R"($&)", "ab");
+    test(regex_39, "39", R"('(?!\A)x'm)", "a\nxb\n", "y", R"(-)", "-");
+    test(regex_40, "40", R"('^(o)(?!.*\1)'i)", "Oo", "n", R"(-)", "-");
+    test(regex_41, "41", R"(.*a(?!(b|cd)*e).*f)", "......abef", "n", R"(-)", "-");
+    test(regex_42, "42", R"(^(a*?)(?!(aa|aaaa)*$))", "aaaaaaaaaaaaaaaaaaaa", "y", R"($1)", "a");
+    test(regex_43, "43", R"((?!)+?|(.{2,4}))", "abcde", "y", R"($1)", "abcd");
+    test(regex_44, "44", R"(^(a*?)(?!(a{6}|a{5})*$))", "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "y", R"($+[1])", "12");
+    test(regex_45, "45", R"(a(?!b(?!c(?!d(?!e))))...(.))", "abxabcdxabcde", "y", R"($1)", "e");
+    test(regex_46, "46", R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)", "aXbbbbbbbcccccccccccccaaaX", "y", R"(-)", "-");
+    test(regex_47, "47", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1)", "\n");
+    test(regex_48, "48", R"(((?s).)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "\n:\nc");
+    test(regex_49, "49", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1)", "b\n");
+    test(regex_50, "50", R"(((?s)b.)c(?!.))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc");
+    test(regex_51, "51", R"(((?s)b.)c(?!\N))", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc");
+    test(regex_52, "52", R"('(b.)c(?!\N)'s)", "a\nb\nc\n", "y", R"($1:$&)", "b\n:b\nc");
+    test(regex_53, "53", R"(a*(?!))", "aaaab", "n", R"(-)", "-");
+    std::cout << std::endl;
+  }
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_01_matcher::to_string() -> std::string{return R"(a(?!b).)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_02_matcher::to_string() -> std::string{return R"((?=)a)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_03_matcher::to_string() -> std::string{return R"(a(?=d).)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_4(), func_2(), cpp2::regex::no_reset(), func_3(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_04_matcher::to_string() -> std::string{return R"(a(?=c|d).)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_2_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_2 {cpp2::regex::make_on_return(cpp2::move(tmp_2_func))}; 
+  static_cast(cpp2::move(tmp_2));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_05_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_5(), func_2(), cpp2::regex::no_reset(), func_3(), reset_0());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_05_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), reset_1(), other, func_6());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_05_matcher::to_string() -> std::string{return R"(^(?:b|a(?=(.)))*\1)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_2 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_06_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_2 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_07_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  ctx.set_group_start(2, r.pos);
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_2 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_08_matcher::to_string() -> std::string{return R"((?=(a+?))(\1ab))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+
+  std::array str_tmp_2 {"ab"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_09_matcher::to_string() -> std::string{return R"(^(?=(a+?))\1ab)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_10_matcher::to_string() -> std::string{return R"((.*)(?=c))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_11_matcher::to_string() -> std::string{return R"((.*)(?=c)c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_12_matcher::to_string() -> std::string{return R"((.*)(?=b|c))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_3 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_13_matcher::to_string() -> std::string{return R"((.*)(?=b|c)c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_14_matcher::to_string() -> std::string{return R"((.*)(?=c|b))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_3 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_15_matcher::to_string() -> std::string{return R"((.*)(?=c|b)c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_16_matcher::to_string() -> std::string{return R"((.*)(?=[bc]))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_17_matcher::to_string() -> std::string{return R"((.*)(?=[bc])c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_18_matcher::to_string() -> std::string{return R"((.*?)(?=c))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_19_matcher::to_string() -> std::string{return R"((.*?)(?=c)c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_20_matcher::to_string() -> std::string{return R"((.*?)(?=b|c))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_3 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_21_matcher::to_string() -> std::string{return R"((.*?)(?=b|c)c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_22_matcher::to_string() -> std::string{return R"((.*?)(?=c|b))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_6(), func_4(), cpp2::regex::no_reset(), func_5(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_3 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_23_matcher::to_string() -> std::string{return R"((.*?)(?=c|b)c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_24_matcher::to_string() -> std::string{return R"((.*?)(?=[bc]))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::class_token_matcher,::cpp2::regex::single_class_entry>::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_25_matcher::to_string() -> std::string{return R"((.*?)(?=[bc])c)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"aaaa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 4;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_7(), func_5(), cpp2::regex::no_reset(), func_6(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_8());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_5 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_9()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_26_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$)(?=a\z))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_27_matcher::to_string() -> std::string{return R"(a(?!b(?!c))(..))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_28_matcher::to_string() -> std::string{return R"(a(?!b(?=a))(..))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"X"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_space::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_word::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"X"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_37_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_1(), reset_0(), func_5(), reset_1());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_37_matcher::to_string() -> std::string{return R"(X(\w+)(?=\s)|X(\w+))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+
+  std::array str_tmp_2 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_38_matcher::to_string() -> std::string{return R"(^a*(?=b)b)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+
+  std::array str_tmp_0 {"x"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_39_matcher::to_string() -> std::string{return R"('(?!\A)x'm)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::group_ref_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+
+  std::array lower_str_tmp_0 {"o"}; 
+
+  std::array upper_str_tmp_0 {"O"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (!((CPP2_ASSERT_IN_BOUNDS(lower_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i) || CPP2_ASSERT_IN_BOUNDS(upper_str_tmp_0, i) == CPP2_ASSERT_IN_BOUNDS(r.pos, i)))) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_40_matcher::to_string() -> std::string{return R"('^(o)(?!.*\1)'i)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"cd"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_7(), func_5(), cpp2::regex::no_reset(), func_6(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_8());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"e"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_9(), cpp2::regex::no_reset(), other, func_10());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_5 {"f"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_5, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_41_matcher::to_string() -> std::string{return R"(.*a(?!(b|cd)*e).*f)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"aa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),2)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,2); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 2;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"aaaa"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),4)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,4); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 4;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_7(), func_5(), cpp2::regex::no_reset(), func_6(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_8());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_42_matcher::to_string() -> std::string{return R"(^(a*?)(?!(aa|aaaa)*$))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_4());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_8(), func_1(), cpp2::regex::no_reset(), func_5(), reset_0());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_43_matcher::to_string() -> std::string{return R"((?!)+?|(.{2,4}))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_start_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_9(), cpp2::regex::no_reset(), other, func_10());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::alternative_token_matcher::match(r.pos, ctx, other, func_11(), func_5(), cpp2::regex::no_reset(), func_8(), cpp2::regex::no_reset());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_4_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_4 {cpp2::regex::make_on_return(cpp2::move(tmp_4_func))}; 
+  static_cast(cpp2::move(tmp_4));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_4(), reset_0(), other, func_12());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::line_end_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_44_matcher::to_string() -> std::string{return R"(^(a*?)(?!(a{6}|a{5})*$))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"e"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_3 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_3, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_2()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_45_matcher::to_string() -> std::string{return R"(a(?!b(?!c(?!d(?!e))))...(.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_1 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_2(), cpp2::regex::no_reset(), other, func_3());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_6(), cpp2::regex::no_reset(), other, func_7());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_3_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_3 {cpp2::regex::make_on_return(cpp2::move(tmp_3_func))}; 
+  static_cast(cpp2::move(tmp_3));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(1);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_5(), reset_0(), other, func_8());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_11::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_4 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_4, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_10::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(2, r.pos);
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_11(), cpp2::regex::no_reset(), other, func_12());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_12::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_end(2, r.pos);
+
+  auto tmp_5_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(2);
+  }
+  }
+  }; 
+
+  auto tmp_5 {cpp2::regex::make_on_return(cpp2::move(tmp_5_func))}; 
+  static_cast(cpp2::move(tmp_5));
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  auto test_tests_19_lookahead::regex_46_matcher::wrap::reset_1::operator()(auto& ctx) const& -> void{
+  ctx.set_group_invalid(2);
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_9::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_10(), reset_1(), other, func_13());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_13::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_6 {"d"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_6, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_9()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_4()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_14::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"X"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_14(), cpp2::regex::no_reset(), other, func_15());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::func_15::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_7 {"X"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_7, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_46_matcher::to_string() -> std::string{return R"(X(?!b+(?!(c+)*(?!(c+)*d))).*X)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_47_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_0_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_0 {cpp2::regex::make_on_return(cpp2::move(tmp_0_func))}; 
+  static_cast(cpp2::move(tmp_0));
+
+  std::array str_tmp_1 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_1, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_48_matcher::to_string() -> std::string{return R"(((?s).)c(?!.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_49_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_50_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!.))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_51_matcher::to_string() -> std::string{return R"(((?s)b.)c(?!\N))"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::named_class_no_new_line::match(r.pos, ctx))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  ctx.set_group_start(1, r.pos);
+
+  std::array str_tmp_0 {"b"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::any_token_matcher(r.pos, ctx))) {r.matched = false;break;}
+  ctx.set_group_end(1, r.pos);
+
+  auto tmp_1_func {
+[&, _1 = (&r), _2 = (&ctx)]() mutable -> void{
+  if (!((*cpp2::impl::assert_not_null(_1)).matched)) {
+  (*cpp2::impl::assert_not_null(_2)).set_group_invalid(1);
+  }
+  }
+  }; 
+
+  auto tmp_1 {cpp2::regex::make_on_return(cpp2::move(tmp_1_func))}; 
+  static_cast(cpp2::move(tmp_1));
+
+  std::array str_tmp_2 {"c"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_2, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_1()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_52_matcher::to_string() -> std::string{return R"('(b.)c(?!\N)'s)"; }
+
+
+
+
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+
+  std::array str_tmp_0 {"a"}; 
+  if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),1)) {
+  r.matched = false;
+  break;
+  }
+{
+int i{0};
+  for( ; cpp2::impl::cmp_less(i,1); (i += 1) ) {
+  if (CPP2_ASSERT_IN_BOUNDS(str_tmp_0, i) != CPP2_ASSERT_IN_BOUNDS(r.pos, i)) {r.matched = false;}
+  }
+}
+  if (r.matched) {r.pos += 1;}
+  else {break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = cpp2::regex::range_token_matcher::match(r.pos, ctx, func_1(), cpp2::regex::no_reset(), other, func_2());
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+
+  auto r {ctx.pass(cur)}; 
+  do {
+  if (!(cpp2::regex::lookahead_token_matcher(r.pos, ctx, func_3()))) {r.matched = false;break;}
+  }
+   while ( 
+  false
+  );
+  if (r.matched) {
+  r = other(r.pos, ctx);
+  }
+  else {
+  r.pos = ctx.end;
+  }
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  ctx.set_group_start(0, cur);
+
+  auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
+  if (r.matched) {ctx.set_group_end(0, r.pos);}
+  return r; 
+  }
+
+  template  [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  static_cast(name);
+  return -1; 
+  }
+
+  [[nodiscard]] auto test_tests_19_lookahead::regex_53_matcher::to_string() -> std::string{return R"(a*(?!))"; }
+
+
+#line 249 "pure2-regex_19_lookahead.cpp2"
+auto main() -> int{
+    CPP2_UFCS(run)(test_tests_19_lookahead());
+}
+
diff --git a/regression-tests/test-results/pure2-regex_19_lookahead.cpp2.output b/regression-tests/test-results/pure2-regex_19_lookahead.cpp2.output
new file mode 100644
index 0000000000..bc21b51243
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_19_lookahead.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_19_lookahead.cpp2... ok (all Cpp2, passes safety checks)
+

From 617b0420f4eb621f43f6069b3f38fea9f2e4c376 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 2 Jul 2024 11:31:32 +0200
Subject: [PATCH 140/161] Changes for regression tests.

---
 include/cpp2regex.h                           | 998 +++++++++---------
 .../pure2-regex_01_char_matcher.cpp.execution |   0
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |   0
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |   0
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |   0
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |   0
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |   0
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |   0
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   0
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |   0
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |   0
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |   0
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution |   0
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |   0
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution |   0
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |   0
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |   0
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   0
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |   0
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |   0
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 +
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 +
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 +++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 +
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 ++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 ++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 source/regex.h2                               |  10 +-
 420 files changed, 12126 insertions(+), 502 deletions(-)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_01_char_matcher.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_01_char_matcher.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_02_ranges.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_02_ranges.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_03_wildcard.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_03_wildcard.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_04_start_end.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_04_start_end.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_05_classes.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_05_classes.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_06_boundaries.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_06_boundaries.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_07_short_classes.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_07_short_classes.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_08_alternatives.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_08_alternatives.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_09_groups.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_09_groups.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_10_escapes.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_10_escapes.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_11_group_references.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_11_group_references.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_12_case_insensitive.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_12_case_insensitive.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_13_posessive_modifier.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_13_posessive_modifier.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_14_multiline_modifier.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_14_multiline_modifier.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_15_group_modifiers.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_15_group_modifiers.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_16_perl_syntax_modifier.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_16_perl_syntax_modifier.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_17_comments.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_17_comments.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_18_branch_reset.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_18_branch_reset.cpp.output (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_19_lookahead.cpp.execution (100%)
 rename regression-tests/test-results/{gcc-13 => apple-clang-14-c++2b}/pure2-regex_19_lookahead.cpp.output (100%)
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index ed01c237ae..74d6c5574e 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,160 +10,160 @@
 
 #line 1 "regex.h2"
 
-#line 21 "regex.h2"
+#line 23 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 37 "regex.h2"
+#line 39 "regex.h2"
 class expression_flags;
     
 
-#line 48 "regex.h2"
+#line 50 "regex.h2"
 template class match_group;
     
 
-#line 57 "regex.h2"
+#line 59 "regex.h2"
 template class match_return;
     
 
-#line 64 "regex.h2"
+#line 66 "regex.h2"
 template class match_context;
 
-#line 126 "regex.h2"
+#line 128 "regex.h2"
 class true_end_func;
     
 
-#line 132 "regex.h2"
+#line 134 "regex.h2"
 class no_reset;
     
 
-#line 137 "regex.h2"
+#line 139 "regex.h2"
 template class on_return;
 
-#line 162 "regex.h2"
+#line 164 "regex.h2"
 template class single_class_entry;
 
-#line 170 "regex.h2"
+#line 172 "regex.h2"
 template class range_class_entry;
 
-#line 178 "regex.h2"
+#line 180 "regex.h2"
 template class combined_class_entry;
     
 
-#line 185 "regex.h2"
+#line 187 "regex.h2"
 template class list_class_entry;
     
 
-#line 192 "regex.h2"
+#line 194 "regex.h2"
 template class named_class_entry;
     
 
-#line 197 "regex.h2"
+#line 199 "regex.h2"
 template class negated_class_entry;
     
 
-#line 204 "regex.h2"
+#line 206 "regex.h2"
 template class shorthand_class_entry;
     
 
-#line 256 "regex.h2"
+#line 258 "regex.h2"
 class regex_token;
 
-#line 281 "regex.h2"
+#line 283 "regex.h2"
 class regex_token_check;
     
 
-#line 297 "regex.h2"
+#line 299 "regex.h2"
 class regex_token_code;
     
 
-#line 313 "regex.h2"
+#line 315 "regex.h2"
 class regex_token_empty;
     
 
-#line 327 "regex.h2"
+#line 329 "regex.h2"
 class regex_token_list;
     
 
-#line 367 "regex.h2"
+#line 369 "regex.h2"
 class parse_context_group_state;
 
-#line 428 "regex.h2"
+#line 430 "regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 469 "regex.h2"
+#line 471 "regex.h2"
 class parse_context;
     
 
-#line 851 "regex.h2"
+#line 853 "regex.h2"
 class generation_function_context;
     
 
-#line 868 "regex.h2"
+#line 870 "regex.h2"
 class generation_context;
 
-#line 1063 "regex.h2"
+#line 1065 "regex.h2"
 class alternative_token;
     
 
-#line 1077 "regex.h2"
+#line 1079 "regex.h2"
 class alternative_token_gen;
     
 
-#line 1122 "regex.h2"
+#line 1124 "regex.h2"
 template class alternative_token_matcher;
 
-#line 1148 "regex.h2"
+#line 1150 "regex.h2"
 class any_token;
     
 
-#line 1175 "regex.h2"
+#line 1177 "regex.h2"
 class char_token;
     
 
-#line 1303 "regex.h2"
+#line 1305 "regex.h2"
 class class_token;
     
 
-#line 1438 "regex.h2"
+#line 1440 "regex.h2"
 template class class_token_matcher;
 
-#line 1538 "regex.h2"
+#line 1540 "regex.h2"
 class group_ref_token;
     
 
-#line 1682 "regex.h2"
+#line 1684 "regex.h2"
 class group_token;
     
 
-#line 1966 "regex.h2"
+#line 1968 "regex.h2"
 class lookahead_token;
     
 
-#line 2068 "regex.h2"
+#line 2070 "regex.h2"
 class range_flags;
     
 
-#line 2076 "regex.h2"
+#line 2078 "regex.h2"
 class range_token;
     
 
-#line 2213 "regex.h2"
+#line 2215 "regex.h2"
 template class range_token_matcher;
 
-#line 2338 "regex.h2"
+#line 2340 "regex.h2"
 class special_range_token;
     
 
-#line 2425 "regex.h2"
+#line 2427 "regex.h2"
 template class regular_expression;
 
-#line 2514 "regex.h2"
+#line 2516 "regex.h2"
 template class regex_generator;
 
-#line 2586 "regex.h2"
+#line 2588 "regex.h2"
 }
 }
 
@@ -188,10 +188,12 @@ template class regex_generator;
 
 template
 using matcher_wrapper_type = typename matcher_wrapper::template wrap;
+template
+using matcher_context_type = typename matcher::context;
 
 using error_func = std::function;
 
-#line 21 "regex.h2"
+#line 23 "regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -199,7 +201,7 @@ namespace regex {
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
-#line 37 "regex.h2"
+#line 39 "regex.h2"
 class expression_flags {
 private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val);
 
@@ -229,10 +231,10 @@ public: constexpr auto operator=(expression_flags&& that) noexcept -> expression
 public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default;
 public: [[nodiscard]] auto to_string() const& -> std::string;
 
-#line 44 "regex.h2"
+#line 46 "regex.h2"
 };
 
-#line 48 "regex.h2"
+#line 50 "regex.h2"
 template class match_group {
     public: Iter start {}; 
     public: Iter end {}; 
@@ -240,13 +242,13 @@ template class match_group {
     public: bool matched {false}; 
 };
 
-#line 57 "regex.h2"
+#line 59 "regex.h2"
 template class match_return {
     public: bool matched {false}; 
     public: Iter pos {}; 
 };
 
-#line 64 "regex.h2"
+#line 66 "regex.h2"
 template class match_context
  {
     public: Iter begin; 
@@ -256,76 +258,76 @@ template class match_context
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     public: match_context(match_context const& that);
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-#line 80 "regex.h2"
+#line 82 "regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 88 "regex.h2"
+#line 90 "regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 94 "regex.h2"
+#line 96 "regex.h2"
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 101 "regex.h2"
+#line 103 "regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 106 "regex.h2"
+#line 108 "regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 110 "regex.h2"
+#line 112 "regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 114 "regex.h2"
+#line 116 "regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-#line 119 "regex.h2"
+#line 121 "regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> auto;
 
 };
 
-#line 126 "regex.h2"
+#line 128 "regex.h2"
 class true_end_func {
     public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
 };
 
-#line 132 "regex.h2"
+#line 134 "regex.h2"
 class no_reset {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
 
-#line 137 "regex.h2"
+#line 139 "regex.h2"
 template class on_return {
 
     private: Func func; 
 
     public: explicit on_return(Func const& f);
-#line 141 "regex.h2"
+#line 143 "regex.h2"
     public: auto operator=(Func const& f) -> on_return& ;
 
-#line 145 "regex.h2"
+#line 147 "regex.h2"
     public: ~on_return() noexcept;
     public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(on_return const&) -> void = delete;
 
 
-#line 148 "regex.h2"
+#line 150 "regex.h2"
 };
 
-#line 151 "regex.h2"
+#line 153 "regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
 
-#line 162 "regex.h2"
+#line 164 "regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -334,10 +336,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 166 "regex.h2"
+#line 168 "regex.h2"
 };
 
-#line 170 "regex.h2"
+#line 172 "regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -346,10 +348,10 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 174 "regex.h2"
+#line 176 "regex.h2"
 };
 
-#line 178 "regex.h2"
+#line 180 "regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -357,10 +359,10 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 181 "regex.h2"
+#line 183 "regex.h2"
 };
 
-#line 185 "regex.h2"
+#line 187 "regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -368,10 +370,10 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 188 "regex.h2"
+#line 190 "regex.h2"
 };
 
-#line 192 "regex.h2"
+#line 194 "regex.h2"
 template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -379,7 +381,7 @@ template class n
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 195 "regex.h2"
+#line 197 "regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -389,10 +391,10 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 200 "regex.h2"
+#line 202 "regex.h2"
 };
 
-#line 204 "regex.h2"
+#line 206 "regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -400,15 +402,15 @@ template class s
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 207 "regex.h2"
+#line 209 "regex.h2"
 };
 
-#line 212 "regex.h2"
+#line 214 "regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 218 "regex.h2"
+#line 220 "regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -423,31 +425,31 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 234 "regex.h2"
+#line 236 "regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 241 "regex.h2"
+#line 243 "regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 256 "regex.h2"
+#line 258 "regex.h2"
 class regex_token {
 
     public: std::string string_rep; 
 
     public: explicit regex_token(cpp2::impl::in str);
 
-#line 264 "regex.h2"
+#line 266 "regex.h2"
     public: explicit regex_token();
 
-#line 269 "regex.h2"
+#line 271 "regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void;
@@ -458,7 +460,7 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 274 "regex.h2"
+#line 276 "regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
@@ -468,12 +470,12 @@ using token_vec = std::vector;
 //
 class regex_token_check: public regex_token {
 
-#line 284 "regex.h2"
+#line 286 "regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 291 "regex.h2"
+#line 293 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -481,18 +483,18 @@ class regex_token_check: public regex_token {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 294 "regex.h2"
+#line 296 "regex.h2"
 };
 
 // Adds code in code generation.
 class regex_token_code: public regex_token {
 
-#line 300 "regex.h2"
+#line 302 "regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 307 "regex.h2"
+#line 309 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -500,16 +502,16 @@ class regex_token_code: public regex_token {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 310 "regex.h2"
+#line 312 "regex.h2"
 };
 
 // Token that does not influence the matching. E.g. comment.
 class regex_token_empty: public regex_token {
 
-#line 316 "regex.h2"
+#line 318 "regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 320 "regex.h2"
+#line 322 "regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -517,25 +519,25 @@ class regex_token_empty: public regex_token {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 323 "regex.h2"
+#line 325 "regex.h2"
 };
 
 // Represents a list of regex tokens as one token.
 //
 class regex_token_list: public regex_token {
 
-#line 330 "regex.h2"
+#line 332 "regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 337 "regex.h2"
+#line 339 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 343 "regex.h2"
+#line 345 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 349 "regex.h2"
+#line 351 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -543,7 +545,7 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 356 "regex.h2"
+#line 358 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -557,7 +559,7 @@ class regex_token_list: public regex_token {
 //
 class parse_context_group_state {
 
-#line 370 "regex.h2"
+#line 372 "regex.h2"
     public: token_vec cur_match_list {};           // Current list of matchers.
     public: token_vec alternate_match_lists {};    // List of alternate matcher lists. E.g. ab|cd|xy.
     public: expression_flags modifiers {};         // Current modifiers for the group/regular expression.
@@ -565,27 +567,27 @@ class parse_context_group_state {
     // Start a new alternative.
     public: auto next_alternative() & -> void;
 
-#line 382 "regex.h2"
+#line 384 "regex.h2"
     // Swap this state with the other one.
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 389 "regex.h2"
+#line 391 "regex.h2"
     // Convert this state into a regex token.
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 401 "regex.h2"
+#line 403 "regex.h2"
     // Add a token to the current matcher list.
     public: auto add(cpp2::impl::in token) & -> void;
 
-#line 406 "regex.h2"
+#line 408 "regex.h2"
     // True if current matcher list is empty.
     public: [[nodiscard]] auto empty() const& -> bool;
 
-#line 410 "regex.h2"
+#line 412 "regex.h2"
     // Apply optimizations to the matcher list.
     public: static auto post_process_list(token_vec& list) -> void;
 
-#line 424 "regex.h2"
+#line 426 "regex.h2"
 };
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
@@ -599,19 +601,19 @@ class parse_context_branch_reset_state {
     // Next group identifier.
     public: [[nodiscard]] auto next() & -> int;
 
-#line 443 "regex.h2"
+#line 445 "regex.h2"
     // Set next group identifier.
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 449 "regex.h2"
+#line 451 "regex.h2"
     // Start a new alternative branch.
     public: auto next_alternative() & -> void;
 
-#line 456 "regex.h2"
+#line 458 "regex.h2"
     // Initialize for a branch reset group.
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
 
-#line 463 "regex.h2"
+#line 465 "regex.h2"
 };
 
 // Context during parsing of the regular expressions.
@@ -626,7 +628,7 @@ class parse_context {
     private: parse_context_group_state cur_group_state {}; 
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
 
-#line 478 "regex.h2"
+#line 480 "regex.h2"
            public: std::map named_groups {}; 
 
     private: error_func error_out; // TODO: Declaring std::function fails for cpp2.
@@ -634,66 +636,66 @@ class parse_context {
 
     public: explicit parse_context(cpp2::impl::in r, auto const& e);
 
-#line 489 "regex.h2"
+#line 491 "regex.h2"
     // State management functions
     //
 
     // Returned group state needs to be stored and provided in `end_group`.
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 501 "regex.h2"
+#line 503 "regex.h2"
     // `old_state` argument needs to be from start group.
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 508 "regex.h2"
+#line 510 "regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 512 "regex.h2"
+#line 514 "regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 516 "regex.h2"
+#line 518 "regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 527 "regex.h2"
+#line 529 "regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 533 "regex.h2"
+#line 535 "regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 538 "regex.h2"
+#line 540 "regex.h2"
     // Regex token management
     //
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 545 "regex.h2"
+#line 547 "regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 549 "regex.h2"
+#line 551 "regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 559 "regex.h2"
+#line 561 "regex.h2"
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 563 "regex.h2"
+#line 565 "regex.h2"
     // Group management
     //
 
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 570 "regex.h2"
+#line 572 "regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 574 "regex.h2"
+#line 576 "regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 580 "regex.h2"
+#line 582 "regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 590 "regex.h2"
+#line 592 "regex.h2"
     // Position management functions
     //
 
@@ -702,36 +704,36 @@ class parse_context {
     // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 634 "regex.h2"
+#line 636 "regex.h2"
     // Return true if next token is available.
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 645 "regex.h2"
+#line 647 "regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 658 "regex.h2"
+#line 660 "regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 680 "regex.h2"
+#line 682 "regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 696 "regex.h2"
+#line 698 "regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 716 "regex.h2"
+#line 718 "regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 726 "regex.h2"
+#line 728 "regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -740,17 +742,17 @@ class parse_context {
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 784 "regex.h2"
+#line 786 "regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 821 "regex.h2"
+#line 823 "regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
 
-#line 835 "regex.h2"
+#line 837 "regex.h2"
     // Misc functions
 
     public: [[nodiscard]] auto get_pos() const& -> auto;
-    public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto;
+    public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto;
     public: [[nodiscard]] auto valid() const& -> bool;
 
     public: [[nodiscard]] auto error(cpp2::impl::in err) & -> token_ptr;
@@ -758,7 +760,7 @@ class parse_context {
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 846 "regex.h2"
+#line 848 "regex.h2"
 };
 
 // Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
@@ -770,10 +772,10 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 862 "regex.h2"
+#line 864 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
 
-#line 865 "regex.h2"
+#line 867 "regex.h2"
 };
 
 // Context for generating the state machine.
@@ -796,71 +798,71 @@ class generation_context {
     // Add code line.
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 890 "regex.h2"
+#line 892 "regex.h2"
     // Add check for token. The check needs to be a function call that returns a boolean.
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 896 "regex.h2"
+#line 898 "regex.h2"
     // Add a statefull check. The check needs to return a `match_return`.
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void;
 
-#line 904 "regex.h2"
+#line 906 "regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 914 "regex.h2"
+#line 916 "regex.h2"
     protected: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 920 "regex.h2"
+#line 922 "regex.h2"
     protected: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 938 "regex.h2"
+#line 940 "regex.h2"
     // Generate the function for a token.
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 947 "regex.h2"
+#line 949 "regex.h2"
     // Generate the reset for a list of group identifiers.
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 969 "regex.h2"
+#line 971 "regex.h2"
     // Name generation
     //
 
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 978 "regex.h2"
+#line 980 "regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 982 "regex.h2"
+#line 984 "regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 988 "regex.h2"
+#line 990 "regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 994 "regex.h2"
+#line 996 "regex.h2"
     // Context management
     //
 
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1005 "regex.h2"
+#line 1007 "regex.h2"
     public: auto finish_context() & -> void;
 
-#line 1013 "regex.h2"
+#line 1015 "regex.h2"
     // Misc functions
     //
 
     private: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 1020 "regex.h2"
+#line 1022 "regex.h2"
     private: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 1024 "regex.h2"
+#line 1026 "regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 1028 "regex.h2"
+#line 1030 "regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
 
-#line 1051 "regex.h2"
+#line 1053 "regex.h2"
     // Run the generation for the token.
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
     public: generation_context() = default;
@@ -868,7 +870,7 @@ class generation_context {
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1057 "regex.h2"
+#line 1059 "regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -887,23 +889,23 @@ class alternative_token: public regex_token_empty {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1075 "regex.h2"
+#line 1077 "regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1080 "regex.h2"
+#line 1082 "regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1087 "regex.h2"
+#line 1089 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1103 "regex.h2"
+#line 1105 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1109 "regex.h2"
+#line 1111 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -911,31 +913,31 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1120 "regex.h2"
+#line 1122 "regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1127 "regex.h2"
+#line 1129 "regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1144 "regex.h2"
+#line 1146 "regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_check {
 
-#line 1151 "regex.h2"
+#line 1153 "regex.h2"
     public: explicit any_token(cpp2::impl::in single_line);
 
-#line 1155 "regex.h2"
+#line 1157 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~any_token() noexcept;
 
@@ -943,38 +945,38 @@ class any_token: public regex_token_check {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1160 "regex.h2"
+#line 1162 "regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1173 "regex.h2"
+#line 1175 "regex.h2"
 // Regex syntax: a
 //
 class char_token: public regex_token {
 
-#line 1178 "regex.h2"
+#line 1180 "regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1187 "regex.h2"
+#line 1189 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1191 "regex.h2"
+#line 1193 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1213 "regex.h2"
+#line 1215 "regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1233 "regex.h2"
+#line 1235 "regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1250 "regex.h2"
+#line 1252 "regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1262 "regex.h2"
+#line 1264 "regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -982,7 +984,7 @@ class char_token: public regex_token {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1266 "regex.h2"
+#line 1268 "regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1022,21 +1024,21 @@ class char_token: public regex_token {
 //
 class class_token: public regex_token {
 
-#line 1306 "regex.h2"
+#line 1308 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1317 "regex.h2"
+#line 1319 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1425 "regex.h2"
+#line 1427 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1430 "regex.h2"
+#line 1432 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1044,21 +1046,21 @@ class class_token: public regex_token {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1436 "regex.h2"
+#line 1438 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1461 "regex.h2"
+#line 1463 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1473 "regex.h2"
+#line 1475 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1070,19 +1072,19 @@ template c
 
     //     return r;
     // }
-#line 1484 "regex.h2"
+#line 1486 "regex.h2"
 };
 
 // Regex syntax: \a or \n or \[
 //
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1523 "regex.h2"
+#line 1525 "regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1532 "regex.h2"
+#line 1534 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1091,16 +1093,16 @@ template c
 //
 class group_ref_token: public regex_token {
 
-#line 1541 "regex.h2"
+#line 1543 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1550 "regex.h2"
+#line 1552 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1642 "regex.h2"
+#line 1644 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1108,12 +1110,12 @@ class group_ref_token: public regex_token {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1645 "regex.h2"
+#line 1647 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1672 "regex.h2"
+#line 1674 "regex.h2"
 // Regex syntax: ()      Example: (abc)
 //               (?:)  (?i:abc)
@@ -1126,22 +1128,22 @@ template [[nodiscard]] auto gr
 //
 class group_token: public regex_token {
 
-#line 1685 "regex.h2"
+#line 1687 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1701 "regex.h2"
+#line 1703 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1828 "regex.h2"
+#line 1830 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1845 "regex.h2"
+#line 1847 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1864 "regex.h2"
+#line 1866 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1150,46 +1152,46 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1870 "regex.h2"
+#line 1872 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1913 "regex.h2"
+#line 1915 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1931 "regex.h2"
+#line 1933 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1943 "regex.h2"
+#line 1945 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1957 "regex.h2"
+#line 1959 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1962 "regex.h2"
+#line 1964 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 // Parsed in group_token.
 //
 class lookahead_token: public regex_token {
 
-#line 1969 "regex.h2"
+#line 1971 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1976 "regex.h2"
+#line 1978 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1982 "regex.h2"
+#line 1984 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1197,18 +1199,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1985 "regex.h2"
+#line 1987 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1996 "regex.h2"
+#line 1998 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2023 "regex.h2"
+#line 2025 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1222,12 +1224,12 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2037 "regex.h2"
+#line 2039 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2063 "regex.h2"
+#line 2065 "regex.h2"
 // TODO: @enum as template parameter yields two error:
 //     error: type 'range_flags' of non-type template parameter is not a structural type
 //     error: non-type template parameter has incomplete type 'range_flags'
@@ -1242,13 +1244,13 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2073 "regex.h2"
+#line 2075 "regex.h2"
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2079 "regex.h2"
+#line 2081 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1258,19 +1260,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2156 "regex.h2"
+#line 2158 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2167 "regex.h2"
+#line 2169 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2179 "regex.h2"
+#line 2181 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2197 "regex.h2"
+#line 2199 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2207 "regex.h2"
+#line 2209 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1278,46 +1280,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2211 "regex.h2"
+#line 2213 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2227 "regex.h2"
+#line 2229 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2232 "regex.h2"
+#line 2234 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2237 "regex.h2"
+#line 2239 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2243 "regex.h2"
+#line 2245 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2258 "regex.h2"
+#line 2260 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2286 "regex.h2"
+#line 2288 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2310 "regex.h2"
+#line 2312 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2334 "regex.h2"
+#line 2336 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2341 "regex.h2"
+#line 2343 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1326,7 +1328,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2370 "regex.h2"
+#line 2372 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1335,10 +1337,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2392 "regex.h2"
+#line 2394 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2417 "regex.h2"
+#line 2419 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1350,7 +1352,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 template class regular_expression {
 
     public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
-    public: template using context = matcher::context;
+    public: template using context = matcher_context_type>;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
 
     public: template class search_return {
         public: bool matched; 
@@ -1359,7 +1361,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2441 "regex.h2"
+#line 2443 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1374,7 +1376,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2457 "regex.h2"
+#line 2459 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1382,13 +1384,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2469 "regex.h2"
+#line 2471 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2491 "regex.h2"
+#line 2493 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1400,7 +1402,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2504 "regex.h2"
+#line 2506 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1423,21 +1425,21 @@ template class regex_generator {
 
     public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
-#line 2529 "regex.h2"
+#line 2531 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2564 "regex.h2"
+#line 2566 "regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2577 "regex.h2"
+#line 2579 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2586 "regex.h2"
+#line 2588 "regex.h2"
 }
 }
 
@@ -1446,7 +1448,7 @@ template [[nodiscard]] auto generate_regex(cpp2::impl::in match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 74 "regex.h2"
+#line 76 "regex.h2"
     }
 
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }{}
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    return *this; }
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }{}
-#line 76 "regex.h2"
+#line 78 "regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1571,24 +1573,24 @@ return cpp2::move(_ret) + ")";
 
     // Getter and setter for groups
     //
-#line 80 "regex.h2"
+#line 82 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 82 "regex.h2"
+#line 84 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
-#line 88 "regex.h2"
+#line 90 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
     }
-#line 94 "regex.h2"
+#line 96 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
@@ -1596,72 +1598,72 @@ return cpp2::move(_ret) + ")";
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 101 "regex.h2"
+#line 103 "regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 106 "regex.h2"
+#line 108 "regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 110 "regex.h2"
+#line 112 "regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 114 "regex.h2"
+#line 116 "regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
     // Misc functions
     //
 
-#line 119 "regex.h2"
+#line 121 "regex.h2"
     template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
-#line 120 "regex.h2"
+#line 122 "regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 124 "regex.h2"
+#line 126 "regex.h2"
 // End function that returns a valid match.
 //
 
-#line 127 "regex.h2"
+#line 129 "regex.h2"
     [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur);  }
 
-#line 130 "regex.h2"
+#line 132 "regex.h2"
 // Empty group reset function.
 //
 
-#line 133 "regex.h2"
+#line 135 "regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 136 "regex.h2"
+#line 138 "regex.h2"
 // Evaluate func on destruction of the handle.
 
-#line 141 "regex.h2"
+#line 143 "regex.h2"
     template  on_return::on_return(Func const& f)
         : func{ f }{
 
-#line 143 "regex.h2"
+#line 145 "regex.h2"
     }
-#line 141 "regex.h2"
+#line 143 "regex.h2"
     template  auto on_return::operator=(Func const& f) -> on_return& {
         func = f;
         return *this;
 
-#line 143 "regex.h2"
+#line 145 "regex.h2"
     }
 
-#line 145 "regex.h2"
+#line 147 "regex.h2"
     template  on_return::~on_return() noexcept{
         cpp2::move(*this).func();
     }
 
-#line 150 "regex.h2"
+#line 152 "regex.h2"
 // Helper for auto deduction of the Func type.
-#line 151 "regex.h2"
+#line 153 "regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
 //-----------------------------------------------------------------------
@@ -1674,72 +1676,72 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 // Class syntax:  Example: a
 //
 
-#line 164 "regex.h2"
+#line 166 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C;  }
-#line 165 "regex.h2"
+#line 167 "regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 168 "regex.h2"
+#line 170 "regex.h2"
 // Class syntax: - Example: a-c
 //
 
-#line 172 "regex.h2"
+#line 174 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }();  }
-#line 173 "regex.h2"
+#line 175 "regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return cpp2::to_string(Start) + "-" + cpp2::to_string(End); }
 
-#line 176 "regex.h2"
+#line 178 "regex.h2"
 // Helper for combining two character classes
 //
 
-#line 179 "regex.h2"
+#line 181 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 180 "regex.h2"
+#line 182 "regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 183 "regex.h2"
+#line 185 "regex.h2"
 // Class syntax:   Example: abcd
 //
 
-#line 186 "regex.h2"
+#line 188 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c));  }
-#line 187 "regex.h2"
+#line 189 "regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 190 "regex.h2"
+#line 192 "regex.h2"
 // Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 194 "regex.h2"
+#line 196 "regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
 
-#line 199 "regex.h2"
+#line 201 "regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 202 "regex.h2"
+#line 204 "regex.h2"
 // Short class syntax: \  Example: \w
 //
 
-#line 205 "regex.h2"
+#line 207 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 206 "regex.h2"
+#line 208 "regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
 
-#line 210 "regex.h2"
+#line 212 "regex.h2"
 // Named basic character classes
 //
 
-#line 216 "regex.h2"
+#line 218 "regex.h2"
 // Named other classes
 //
 
-#line 232 "regex.h2"
+#line 234 "regex.h2"
 // Shorthand class entries
 //
 
-#line 247 "regex.h2"
+#line 249 "regex.h2"
 //-----------------------------------------------------------------------
 //
 // Tokens for regular expressions.
@@ -1750,99 +1752,99 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 // Basic class for a regex token.
 //
 
-#line 260 "regex.h2"
+#line 262 "regex.h2"
     regex_token::regex_token(cpp2::impl::in str)
         : string_rep{ str }{
 
-#line 262 "regex.h2"
+#line 264 "regex.h2"
     }
 
-#line 264 "regex.h2"
+#line 266 "regex.h2"
     regex_token::regex_token()
         : string_rep{ "" }{
 
-#line 266 "regex.h2"
+#line 268 "regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
                                                                        // Generate the matching code.
 
-#line 271 "regex.h2"
+#line 273 "regex.h2"
     auto regex_token::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}// Adds all group indices to the set.
-#line 272 "regex.h2"
+#line 274 "regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }// Create a string representation.
-#line 273 "regex.h2"
+#line 275 "regex.h2"
     auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}// Set the string representation.
 
-#line 286 "regex.h2"
+#line 288 "regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token{ str }
         , check{ check_ }{
 
-#line 289 "regex.h2"
+#line 291 "regex.h2"
     }
 
-#line 291 "regex.h2"
+#line 293 "regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(check + "(" + ctx.match_parameters() + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 302 "regex.h2"
+#line 304 "regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token{ str }
         , code{ code_ }{
 
-#line 305 "regex.h2"
+#line 307 "regex.h2"
     }
 
-#line 307 "regex.h2"
+#line 309 "regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         ctx.add(code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 316 "regex.h2"
+#line 318 "regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 318 "regex.h2"
+#line 320 "regex.h2"
     }
 
-#line 320 "regex.h2"
+#line 322 "regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 332 "regex.h2"
+#line 334 "regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 335 "regex.h2"
+#line 337 "regex.h2"
     }
 
-#line 337 "regex.h2"
+#line 339 "regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
         }
     }
 
-#line 343 "regex.h2"
+#line 345 "regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).add_groups(groups);
         }
     }
 
-#line 349 "regex.h2"
+#line 351 "regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -1853,7 +1855,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 375 "regex.h2"
+#line 377 "regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
@@ -1861,14 +1863,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 383 "regex.h2"
+#line 385 "regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 390 "regex.h2"
+#line 392 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_as_token() & -> token_ptr{
         if (alternate_match_lists.empty()) {
             post_process_list(cur_match_list);
@@ -1880,15 +1882,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 402 "regex.h2"
+#line 404 "regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void{
         cur_match_list.push_back(token);
     }
 
-#line 407 "regex.h2"
+#line 409 "regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty();  }
 
-#line 411 "regex.h2"
+#line 413 "regex.h2"
     auto parse_context_group_state::post_process_list(token_vec& list) -> void{
         // Merge all characters
         auto merge_pos {CPP2_UFCS(begin)(list)}; 
@@ -1903,7 +1905,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 435 "regex.h2"
+#line 437 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1912,20 +1914,20 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return g; 
     }
 
-#line 444 "regex.h2"
+#line 446 "regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 450 "regex.h2"
+#line 452 "regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 457 "regex.h2"
+#line 459 "regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1933,16 +1935,16 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
-#line 483 "regex.h2"
+#line 485 "regex.h2"
     parse_context::parse_context(cpp2::impl::in r, auto const& e)
         : regex{ r }
         , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }
         , error_out{ e }{
 
-#line 487 "regex.h2"
+#line 489 "regex.h2"
     }
 
-#line 493 "regex.h2"
+#line 495 "regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         old_state.swap(cur_group_state);
@@ -1951,24 +1953,24 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 502 "regex.h2"
+#line 504 "regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
         auto inner {cur_group_state.get_as_token()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 508 "regex.h2"
+#line 510 "regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 512 "regex.h2"
+#line 514 "regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 519 "regex.h2"
+#line 521 "regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -1977,30 +1979,30 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return old_state; 
     }
 
-#line 527 "regex.h2"
+#line 529 "regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 533 "regex.h2"
+#line 535 "regex.h2"
     auto parse_context::next_alternative() & -> void{
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
-#line 541 "regex.h2"
+#line 543 "regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         cur_group_state.add(token);
     }
 
-#line 545 "regex.h2"
+#line 547 "regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(cur_group_state.empty()); 
     }
 
-#line 549 "regex.h2"
+#line 551 "regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2011,29 +2013,29 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 559 "regex.h2"
+#line 561 "regex.h2"
     [[nodiscard]] auto parse_context::get_as_token() & -> token_ptr{
         return root; 
     }
 
-#line 566 "regex.h2"
+#line 568 "regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 570 "regex.h2"
+#line 572 "regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return cur_branch_reset_state.next(); 
     }
 
-#line 574 "regex.h2"
+#line 576 "regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 580 "regex.h2"
+#line 582 "regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {named_groups.find(name)}; 
         if (iter == named_groups.end()) {
@@ -2044,10 +2046,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 593 "regex.h2"
+#line 595 "regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 596 "regex.h2"
+#line 598 "regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2086,7 +2088,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 635 "regex.h2"
+#line 637 "regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != regex.size()) {
@@ -2097,14 +2099,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 645 "regex.h2"
+#line 647 "regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 646 "regex.h2"
+#line 648 "regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 647 "regex.h2"
+#line 649 "regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 649 "regex.h2"
+#line 651 "regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2114,10 +2116,10 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 658 "regex.h2"
+#line 660 "regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
 
-#line 660 "regex.h2"
+#line 662 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto end {pos}; 
         if (any) {
@@ -2138,14 +2140,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 680 "regex.h2"
+#line 682 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 681 "regex.h2"
+#line 683 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 682 "regex.h2"
+#line 684 "regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 684 "regex.h2"
+#line 686 "regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
             r.construct(regex.substr(pos, n));
@@ -2158,7 +2160,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 696 "regex.h2"
+#line 698 "regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2179,7 +2181,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(r.value()); 
     }
 
-#line 716 "regex.h2"
+#line 718 "regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,regex.size())) {
@@ -2190,12 +2192,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 726 "regex.h2"
+#line 728 "regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 727 "regex.h2"
+#line 729 "regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 732 "regex.h2"
+#line 734 "regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2248,7 +2250,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 784 "regex.h2"
+#line 786 "regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2286,7 +2288,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return true; 
     }
 
-#line 821 "regex.h2"
+#line 823 "regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2301,21 +2303,21 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return r; 
     }
 
-#line 837 "regex.h2"
-    [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; }
-#line 838 "regex.h2"
-    [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
 #line 839 "regex.h2"
+    [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; }
+#line 840 "regex.h2"
+    [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
+#line 841 "regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && !(has_error); }
 
-#line 841 "regex.h2"
+#line 843 "regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         has_error = true;
         error_out(("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(err)));
         return nullptr; 
     }
 
-#line 855 "regex.h2"
+#line 857 "regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2323,27 +2325,27 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 862 "regex.h2"
+#line 864 "regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
 
-#line 880 "regex.h2"
+#line 882 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 885 "regex.h2"
+#line 887 "regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n");
     }
 
-#line 891 "regex.h2"
+#line 893 "regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += (cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n");
     }
 
-#line 897 "regex.h2"
+#line 899 "regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void{
         end_func_statefull(check);
 
@@ -2351,7 +2353,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         start_func_named(cpp2::move(name));
     }
 
-#line 904 "regex.h2"
+#line 906 "regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2362,14 +2364,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 914 "regex.h2"
+#line 916 "regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 920 "regex.h2"
+#line 922 "regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
@@ -2388,7 +2390,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         finish_context();
     }
 
-#line 939 "regex.h2"
+#line 941 "regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         (*cpp2::impl::assert_not_null(token)).generate_code((*this));
@@ -2397,7 +2399,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return name; 
     }
 
-#line 948 "regex.h2"
+#line 950 "regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
@@ -2419,33 +2421,33 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cpp2::move(name) + "()"; 
     }
 
-#line 972 "regex.h2"
+#line 974 "regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return { "func_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 978 "regex.h2"
+#line 980 "regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 982 "regex.h2"
+#line 984 "regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return { "reset_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 988 "regex.h2"
+#line 990 "regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return { "tmp_" + cpp2::to_string(cpp2::move(cur_id)) }; 
     }
 
-#line 997 "regex.h2"
+#line 999 "regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2454,7 +2456,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return cur; 
     }
 
-#line 1005 "regex.h2"
+#line 1007 "regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2463,22 +2465,22 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         gen_stack.pop_back();
     }
 
-#line 1016 "regex.h2"
+#line 1018 "regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &gen_stack.back(); 
     }
 
-#line 1020 "regex.h2"
+#line 1022 "regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 1024 "regex.h2"
+#line 1026 "regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 1028 "regex.h2"
+#line 1030 "regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2501,18 +2503,18 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         return res; 
     }
 
-#line 1052 "regex.h2"
+#line 1054 "regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 1066 "regex.h2"
+#line 1068 "regex.h2"
     alternative_token::alternative_token()
                             : regex_token_empty{ "" }{}
 
-#line 1068 "regex.h2"
+#line 1070 "regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2523,15 +2525,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1082 "regex.h2"
+#line 1084 "regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1085 "regex.h2"
+#line 1087 "regex.h2"
     }
 
-#line 1087 "regex.h2"
+#line 1089 "regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2548,14 +2550,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         ctx.add_statefull(next_name, ("cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")"));
     }
 
-#line 1103 "regex.h2"
+#line 1105 "regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1109 "regex.h2"
+#line 1111 "regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2570,11 +2572,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1124 "regex.h2"
+#line 1126 "regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1127 "regex.h2"
+#line 1129 "regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2593,14 +2595,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 1151 "regex.h2"
+#line 1153 "regex.h2"
     any_token::any_token(cpp2::impl::in single_line)
         : regex_token_check{ ".", ("any_token_matcher") }{
 
-#line 1153 "regex.h2"
+#line 1155 "regex.h2"
     }
 
-#line 1155 "regex.h2"
+#line 1157 "regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
@@ -2609,7 +2611,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     any_token::~any_token() noexcept{}
 
-#line 1162 "regex.h2"
+#line 1164 "regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2621,21 +2623,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1181 "regex.h2"
+#line 1183 "regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1185 "regex.h2"
+#line 1187 "regex.h2"
     }
 
-#line 1187 "regex.h2"
+#line 1189 "regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1191 "regex.h2"
+#line 1193 "regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             std::string upper {token}; 
@@ -2643,14 +2645,14 @@ template [[nodiscard]] auto any_token_matcher(
 {
 size_t i{0};
 
-#line 1196 "regex.h2"
+#line 1198 "regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = string_util::safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = string_util::safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1201 "regex.h2"
+#line 1203 "regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2663,7 +2665,7 @@ size_t i{0};
         }
     }
 
-#line 1213 "regex.h2"
+#line 1215 "regex.h2"
     auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         std::string lower_name {"lower_" + cpp2::to_string(name)}; 
@@ -2684,7 +2686,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1233 "regex.h2"
+#line 1235 "regex.h2"
     auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp())}; 
         auto size {token.size()}; 
@@ -2702,7 +2704,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1250 "regex.h2"
+#line 1252 "regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
@@ -2715,7 +2717,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1262 "regex.h2"
+#line 1264 "regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2723,17 +2725,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1310 "regex.h2"
+#line 1312 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1315 "regex.h2"
+#line 1317 "regex.h2"
     }
 
-#line 1318 "regex.h2"
+#line 1320 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -2841,12 +2843,12 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1425 "regex.h2"
+#line 1427 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
-#line 1430 "regex.h2"
+#line 1432 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
@@ -2856,7 +2858,7 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1440 "regex.h2"
+#line 1442 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -2878,7 +2880,7 @@ size_t i{0};
         }
     }
 
-#line 1461 "regex.h2"
+#line 1463 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2891,11 +2893,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1488 "regex.h2"
+#line 1490 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1492 "regex.h2"
+#line 1494 "regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -2927,7 +2929,7 @@ size_t i{0};
 
 }
 
-#line 1525 "regex.h2"
+#line 1527 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -2935,16 +2937,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1544 "regex.h2"
+#line 1546 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1548 "regex.h2"
+#line 1550 "regex.h2"
     }
 
-#line 1550 "regex.h2"
+#line 1552 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3037,14 +3039,14 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1642 "regex.h2"
+#line 1644 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1647 "regex.h2"
+#line 1649 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
@@ -3070,7 +3072,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1688 "regex.h2"
+#line 1690 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3084,7 +3086,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1701 "regex.h2"
+#line 1703 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3212,7 +3214,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1828 "regex.h2"
+#line 1830 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3230,7 +3232,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1845 "regex.h2"
+#line 1847 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add(("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3250,7 +3252,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1864 "regex.h2"
+#line 1866 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3260,7 +3262,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1874 "regex.h2"
+#line 1876 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3300,7 +3302,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1915 "regex.h2"
+#line 1917 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3317,7 +3319,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1931 "regex.h2"
+#line 1933 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3330,7 +3332,7 @@ template [[
     }}
 }
 
-#line 1945 "regex.h2"
+#line 1947 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3343,35 +3345,35 @@ template [[
     }
 }
 
-#line 1957 "regex.h2"
+#line 1959 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1972 "regex.h2"
+#line 1974 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1974 "regex.h2"
+#line 1976 "regex.h2"
     }
 
-#line 1976 "regex.h2"
+#line 1978 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1982 "regex.h2"
+#line 1984 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1987 "regex.h2"
+#line 1989 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3381,7 +3383,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 1999 "regex.h2"
+#line 2001 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3406,7 +3408,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2039 "regex.h2"
+#line 2041 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3431,16 +3433,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2069 "regex.h2"
+#line 2071 "regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2084 "regex.h2"
+#line 2086 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2086 "regex.h2"
+#line 2088 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3484,7 +3486,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2130 "regex.h2"
+#line 2132 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3511,7 +3513,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2156 "regex.h2"
+#line 2158 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3523,7 +3525,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2167 "regex.h2"
+#line 2169 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3536,7 +3538,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2179 "regex.h2"
+#line 2181 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3555,7 +3557,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2197 "regex.h2"
+#line 2199 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3566,14 +3568,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2207 "regex.h2"
+#line 2209 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2215 "regex.h2"
+#line 2217 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3586,26 +3588,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2227 "regex.h2"
+#line 2229 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2232 "regex.h2"
+#line 2234 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2237 "regex.h2"
+#line 2239 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2243 "regex.h2"
+#line 2245 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3621,7 +3623,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2258 "regex.h2"
+#line 2260 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3650,7 +3652,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2286 "regex.h2"
+#line 2288 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3675,7 +3677,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2310 "regex.h2"
+#line 2312 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3701,7 +3703,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2341 "regex.h2"
+#line 2343 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3724,7 +3726,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2364 "regex.h2"
+#line 2366 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3734,7 +3736,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2376 "regex.h2"
+#line 2378 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3751,7 +3753,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2392 "regex.h2"
+#line 2394 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3776,32 +3778,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2435 "regex.h2"
+#line 2437 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
             , ctx{ ctx_ }
             , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2439 "regex.h2"
+#line 2441 "regex.h2"
         }
 
-#line 2441 "regex.h2"
+#line 2443 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2442 "regex.h2"
+#line 2444 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2443 "regex.h2"
+#line 2445 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2444 "regex.h2"
+#line 2446 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2446 "regex.h2"
+#line 2448 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2447 "regex.h2"
+#line 2449 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2448 "regex.h2"
+#line 2450 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2450 "regex.h2"
+#line 2452 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3810,13 +3812,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2459 "regex.h2"
+#line 2461 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2460 "regex.h2"
+#line 2462 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2461 "regex.h2"
+#line 2463 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2462 "regex.h2"
+#line 2464 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3824,13 +3826,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2469 "regex.h2"
+#line 2471 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2470 "regex.h2"
+#line 2472 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2471 "regex.h2"
+#line 2473 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2472 "regex.h2"
+#line 2474 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
         auto r {CPP2_UFCS(fail)(ctx)}; 
@@ -3850,10 +3852,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2491 "regex.h2"
+#line 2493 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2496 "regex.h2"
+#line 2498 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3863,15 +3865,15 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2524 "regex.h2"
+#line 2526 "regex.h2"
     template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2527 "regex.h2"
+#line 2529 "regex.h2"
     }
 
-#line 2529 "regex.h2"
+#line 2531 "regex.h2"
     template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
@@ -3907,7 +3909,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2564 "regex.h2"
+#line 2566 "regex.h2"
     template  auto regex_generator::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
@@ -3922,7 +3924,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2579 "regex.h2"
+#line 2581 "regex.h2"
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
     regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_01_char_matcher.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_01_char_matcher.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_02_ranges.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_02_ranges.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_03_wildcard.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_03_wildcard.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_04_start_end.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_04_start_end.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_05_classes.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_05_classes.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_06_boundaries.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_06_boundaries.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_07_short_classes.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_07_short_classes.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_08_alternatives.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_08_alternatives.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_09_groups.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_09_groups.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_10_escapes.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_10_escapes.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_11_group_references.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_11_group_references.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_12_case_insensitive.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_12_case_insensitive.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_13_posessive_modifier.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_14_multiline_modifier.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_15_group_modifiers.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_15_group_modifiers.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_16_perl_syntax_modifier.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_17_comments.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_17_comments.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_18_branch_reset.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_18_branch_reset.cpp.output
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.execution
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.execution
diff --git a/regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-13/pure2-regex_19_lookahead.cpp.output
rename to regression-tests/test-results/apple-clang-14-c++2b/pure2-regex_19_lookahead.cpp.output
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/apple-clang-15-c++2b/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-15-c++20-libcpp/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-15-c++20/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-18-c++20/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/source/regex.h2 b/source/regex.h2
index 84e8c1a126..4251773d01 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -15,6 +15,8 @@
 
 template
 using matcher_wrapper_type = typename matcher_wrapper::template wrap;
+template
+using matcher_context_type = typename matcher::context;
 
 using error_func = std::function;
 
@@ -834,9 +836,9 @@ parse_context: type = {
 
     // Misc functions
 
-    get_pos:   (this)                       pos;
-    get_range: (this, start: int, end: int) std::string(regex..substr(start, end - start + 1));
-    valid:     (this) -> bool               = { return has_next() && !has_error; }
+    get_pos:   (this)                             pos;
+    get_range: (this, start: size_t, end: size_t) std::string(regex..substr(start, end - start + 1));
+    valid:     (this) -> bool                   = { return has_next() && !has_error; }
 
     error: (inout this, err: std::string) -> token_ptr = {
         has_error = true;
@@ -2425,7 +2427,7 @@ word_boundary_token_matcher:  (inout cur, inout ctx) -> boo
 regular_expression:  type = {
 
     matcher:  type == matcher_wrapper_type; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
-    context:  type == matcher::context;
+    context:  type == matcher_context_type>;                      // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
 
     search_return:  type = {
         public matched: bool;

From 5cefc73df87e3c027cfe3b459109ceed39efc1af Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 3 Jul 2024 08:28:19 +0200
Subject: [PATCH 141/161] Fixes for regex and non-regex tests.

---
 include/cpp2regex.h                           |  4 +-
 regression-tests/run-tests.sh                 |  2 +-
 .../pure2-bugfix-for-ufcs-noexcept.cpp.output |  4 +-
 .../pure2-bugfix-for-ufcs-sfinae.cpp.output   |  8 ++--
 .../gcc-10-c++20/pure2-print.cpp.output       |  4 +-
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 40 +++++++++----------
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 40 +++++++++----------
 source/regex.h2                               |  4 +-
 8 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 74d6c5574e..1c596be615 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -1621,9 +1621,9 @@ return cpp2::move(_ret) + ")";
     //
 
 #line 121 "regex.h2"
-    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
+    template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
 #line 122 "regex.h2"
-    template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
+    template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
 #line 126 "regex.h2"
 // End function that returns a valid match.
diff --git a/regression-tests/run-tests.sh b/regression-tests/run-tests.sh
index b0a41359a3..da991c6c74 100644
--- a/regression-tests/run-tests.sh
+++ b/regression-tests/run-tests.sh
@@ -92,7 +92,7 @@ while getopts ${optstring} arg; do
         ;;
     t)
         # Replace commas with spaces
-        chosen_tests=${OPTARG/,/ }
+        chosen_tests=${OPTARG//,/ }
         ;;
     \?)
         echo "Invalid option: -${OPTARG}."
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
index 1017d81272..758c435627 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
@@ -1,10 +1,10 @@
 pure2-bugfix-for-ufcs-noexcept.cpp2:5:26: error: lambda expression in an unevaluated operand
   static_assert(noexcept(CPP2_UFCS(swap)(t(), t())));// Fails on Clang 12 (lambda in unevaluated context) and GCC 10 (static assertion failed)
                          ^
-../../../include/cpp2util.h:1167:59: note: expanded from macro 'CPP2_UFCS'
+../../../include/cpp2util.h:1168:59: note: expanded from macro 'CPP2_UFCS'
 #define CPP2_UFCS(...)                                    CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 1 error generated.
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
index 186e249684..11853743c2 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
@@ -1,19 +1,19 @@
 pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
 template [[nodiscard]] auto f() -> std::type_identity_t;
                                                                              ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
 template [[nodiscard]] auto f() -> std::type_identity_t{}// Fails on Clang 12 (lambda in unevaluated context).
                                                                              ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 2 errors generated.
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output
index bfb12c17e9..cb226c1c31 100644
--- a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output
@@ -9,8 +9,8 @@ pure2-print.cpp2:68:1: note: in expansion of macro ‘CPP2_REQUIRES_’
 pure2-print.cpp2:97:1: note: in expansion of macro ‘CPP2_REQUIRES_’
 pure2-print.cpp2:9:41: error: ‘constexpr const T outer::object_alias’ is not a static data member of ‘class outer’
 pure2-print.cpp2:9:48: error: template definition of non-template ‘constexpr const T outer::object_alias’
-pure2-print.cpp2:67:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:92& ...) requires (is_convertible_v::type>::type, int> && ...)’
-pure2-print.cpp2:67:29: note: candidate is: ‘template static void outer::mytype::variadic(const auto:91& ...)’
+pure2-print.cpp2:67:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:230& ...) requires (is_convertible_v::type>::type, int> && ...)’
+pure2-print.cpp2:67:29: note: candidate is: ‘template static void outer::mytype::variadic(const auto:229& ...)’
 pure2-print.cpp2:10:19: note: ‘class outer::mytype’ defined here
 pure2-print.cpp2:96:37: error: no declaration matches ‘void outer::print(std::ostream&, const Args& ...) requires  cpp2::impl::cmp_greater_eq(sizeof ... (Args ...), 0)’
 pure2-print.cpp2:96:37: note: no functions named ‘void outer::print(std::ostream&, const Args& ...) requires  cpp2::impl::cmp_greater_eq(sizeof ... (Args ...), 0)’
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 0ec71cdf36..d7ea10271f 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 0ec71cdf36..d7ea10271f 100644
--- a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
- 1135 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
+ 1136 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/source/regex.h2 b/source/regex.h2
index 4251773d01..3da7e3adf7 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -118,8 +118,8 @@ match_context:  type =
     // Misc functions
     //
 
-    fail: (in this)            match_return(false, end);
-    pass: (in this, cur: Iter) match_return(true, cur);
+    fail: (in this)            match_return(false, end);
+    pass: (in this, cur: Iter) match_return(true, cur);
 
 }
 

From a65350b8c8215d8739e1a0c59bb972be5c427723 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 3 Jul 2024 09:09:31 +0200
Subject: [PATCH 142/161] Remove UFCS from regex and more non-regex test fixes.

---
 include/cpp2regex.h                                       | 4 ++--
 ...-for-requires-clause-in-forward-declaration.cpp.output | 8 ++++----
 source/regex.h2                                           | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 1c596be615..b9af7f06c2 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -1893,7 +1893,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 #line 413 "regex.h2"
     auto parse_context_group_state::post_process_list(token_vec& list) -> void{
         // Merge all characters
-        auto merge_pos {CPP2_UFCS(begin)(list)}; 
+        auto merge_pos {list.begin()}; 
         for( ; merge_pos != list.end(); (++merge_pos) ) {
             if (cpp2::impl::is(*cpp2::impl::assert_not_null(*cpp2::impl::assert_not_null(merge_pos)))) {
                 auto combine_pos {merge_pos + 1}; 
@@ -3835,7 +3835,7 @@ template [[nodiscard]] auto word_boundary_token_mat
 #line 2474 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
-        auto r {CPP2_UFCS(fail)(ctx)}; 
+        auto r {ctx.fail()}; 
 
         auto cur {start}; 
         for( ; true; (++cur) ) {
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
index 1613a380eb..91b2054e40 100644
--- a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
@@ -6,12 +6,12 @@ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:46: error: expect
 In file included from pure2-bugfix-for-requires-clause-in-forward-declaration.cpp:7:
 ../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10.
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:4:1: note: in expansion of macro ‘CPP2_REQUIRES_’
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:3: error: no declaration matches ‘element::element(auto:93&&) requires  is_same_v::type>::type>’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:3: error: no declaration matches ‘element::element(auto:231&&) requires  is_same_v::type>::type>’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:11: note: candidates are: ‘element::element(const element&)’
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:20: note:                 ‘template element::element(auto:91&&)’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:20: note:                 ‘template element::element(auto:229&&)’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:1:7: note: ‘class element’ defined here
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:78: error: expected unqualified-id before ‘{’ token
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:8: error: no declaration matches ‘element& element::operator=(auto:94&&) requires  is_same_v::type>::type>’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:8: error: no declaration matches ‘element& element::operator=(auto:232&&) requires  is_same_v::type>::type>’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:6:16: note: candidates are: ‘void element::operator=(const element&)’
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:16: note:                 ‘template element& element::operator=(auto:92&&)’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:16: note:                 ‘template element& element::operator=(auto:230&&)’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:1:7: note: ‘class element’ defined here
diff --git a/source/regex.h2 b/source/regex.h2
index 3da7e3adf7..5933e2964c 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -412,7 +412,7 @@ parse_context_group_state: @struct type = {
     // Apply optimizations to the matcher list.
     post_process_list: (inout list: token_vec) = {
         // Merge all characters
-        merge_pos := list.begin();
+        merge_pos := list..begin();
         while merge_pos != list..end() next (merge_pos++) {
             if merge_pos** is char_token {
                 combine_pos := merge_pos + 1;
@@ -2473,7 +2473,7 @@ regular_expression:  type = {
     search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
     search:  (in this, start: Iter, end: Iter) -> search_return = {
         ctx: context = (start, end);
-        r := ctx.fail();
+        r := ctx..fail();
 
         cur:= start;
         while true next (cur++) {

From 8db3c70ad4bec1d524a68eb5a6955e61d65f36ac Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 3 Jul 2024 11:14:05 +0200
Subject: [PATCH 143/161] Update for TODOs.

---
 include/cpp2regex.h | 223 ++++++++++++++++++++++----------------------
 source/regex.h2     |   9 +-
 2 files changed, 113 insertions(+), 119 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index b9af7f06c2..66694a805a 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -138,32 +138,32 @@ class group_ref_token;
 class group_token;
     
 
-#line 1968 "regex.h2"
+#line 1967 "regex.h2"
 class lookahead_token;
     
 
-#line 2070 "regex.h2"
+#line 2067 "regex.h2"
 class range_flags;
     
 
-#line 2078 "regex.h2"
+#line 2075 "regex.h2"
 class range_token;
     
 
-#line 2215 "regex.h2"
+#line 2212 "regex.h2"
 template class range_token_matcher;
 
-#line 2340 "regex.h2"
+#line 2337 "regex.h2"
 class special_range_token;
     
 
-#line 2427 "regex.h2"
+#line 2424 "regex.h2"
 template class regular_expression;
 
-#line 2516 "regex.h2"
+#line 2513 "regex.h2"
 template class regex_generator;
 
-#line 2588 "regex.h2"
+#line 2585 "regex.h2"
 }
 }
 
@@ -1159,39 +1159,39 @@ class group_token: public regex_token {
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1915 "regex.h2"
+#line 1914 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1933 "regex.h2"
+#line 1932 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1945 "regex.h2"
+#line 1944 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1959 "regex.h2"
+#line 1958 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1964 "regex.h2"
+#line 1963 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 // Parsed in group_token.
 //
 class lookahead_token: public regex_token {
 
-#line 1971 "regex.h2"
+#line 1970 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1978 "regex.h2"
+#line 1977 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1984 "regex.h2"
+#line 1983 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1199,18 +1199,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1987 "regex.h2"
+#line 1986 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1998 "regex.h2"
+#line 1997 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2025 "regex.h2"
+#line 2024 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1224,15 +1224,13 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2039 "regex.h2"
+#line 2038 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2065 "regex.h2"
-// TODO: @enum as template parameter yields two error:
-//     error: type 'range_flags' of non-type template parameter is not a structural type
-//     error: non-type template parameter has incomplete type 'range_flags'
+#line 2064 "regex.h2"
+// TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147
 
 // Options for range matching.
 class range_flags {
@@ -1244,13 +1242,13 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2075 "regex.h2"
+#line 2072 "regex.h2"
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2081 "regex.h2"
+#line 2078 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1260,19 +1258,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2158 "regex.h2"
+#line 2155 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2169 "regex.h2"
+#line 2166 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2181 "regex.h2"
+#line 2178 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2199 "regex.h2"
+#line 2196 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2209 "regex.h2"
+#line 2206 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1280,46 +1278,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2213 "regex.h2"
+#line 2210 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2229 "regex.h2"
+#line 2226 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2234 "regex.h2"
+#line 2231 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2239 "regex.h2"
+#line 2236 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2245 "regex.h2"
+#line 2242 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2260 "regex.h2"
+#line 2257 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2288 "regex.h2"
+#line 2285 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2312 "regex.h2"
+#line 2309 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2336 "regex.h2"
+#line 2333 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2343 "regex.h2"
+#line 2340 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1328,7 +1326,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2372 "regex.h2"
+#line 2369 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1337,10 +1335,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2394 "regex.h2"
+#line 2391 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2419 "regex.h2"
+#line 2416 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1361,7 +1359,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2443 "regex.h2"
+#line 2440 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1376,7 +1374,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2459 "regex.h2"
+#line 2456 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1384,13 +1382,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2471 "regex.h2"
+#line 2468 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2493 "regex.h2"
+#line 2490 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1402,7 +1400,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2506 "regex.h2"
+#line 2503 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1425,21 +1423,21 @@ template class regex_generator {
 
     public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
-#line 2531 "regex.h2"
+#line 2528 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2566 "regex.h2"
+#line 2563 "regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2579 "regex.h2"
+#line 2576 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2588 "regex.h2"
+#line 2585 "regex.h2"
 }
 }
 
@@ -2914,7 +2912,7 @@ size_t i{0};
         else {if ('r' == ctx.current()) {t = '\r'; }
         else {if ('t' == ctx.current()) {t = '\t'; }
         else {if ('\\' == ctx.current()) {t = '\\'; }
-        else {                         }}}}}}}/* TODO: throw error */
+        else {return ctx.error("Internal: missing switch case for special escape."); }}}}}}}
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(t), false)}; 
         (*cpp2::impl::assert_not_null(r)).set_string(("\\" + cpp2::to_string(ctx.current())));
 
@@ -3248,7 +3246,7 @@ template [[nodiscard]] auto gr
             ctx.add("  }");
             ctx.add("};");
             ctx.add((cpp2::to_string(tmp_name) + " :=  cpp2::regex::make_on_return(" + cpp2::to_string(tmp_name) + "_func);"));
-            ctx.add(("_ = " + cpp2::to_string(cpp2::move(tmp_name)) + ";"));// TODO: Guard object problem.
+            ctx.add(("_ = " + cpp2::to_string(cpp2::move(tmp_name)) + ";"));// Logic is done in the destructor. Same behavior as for guard objects.
         }
     }
 
@@ -3273,7 +3271,6 @@ template [[nodiscard]] auto gr
     auto has_brackets {false}; 
     std::string number_str {""}; 
     if ('{' == ctx.current()) {
-        // TODO: Currently does not work since the compiler handles \x also.
         // Bracketed
         has_brackets = true;
         static_cast(ctx.next());// Skip '{'
@@ -3302,7 +3299,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1917 "regex.h2"
+#line 1916 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3319,7 +3316,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1933 "regex.h2"
+#line 1932 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3332,7 +3329,7 @@ template [[
     }}
 }
 
-#line 1947 "regex.h2"
+#line 1946 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3345,35 +3342,35 @@ template [[
     }
 }
 
-#line 1959 "regex.h2"
+#line 1958 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1974 "regex.h2"
+#line 1973 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1976 "regex.h2"
+#line 1975 "regex.h2"
     }
 
-#line 1978 "regex.h2"
+#line 1977 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1984 "regex.h2"
+#line 1983 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1989 "regex.h2"
+#line 1988 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3383,7 +3380,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2001 "regex.h2"
+#line 2000 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3408,7 +3405,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2041 "regex.h2"
+#line 2040 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3433,16 +3430,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2071 "regex.h2"
+#line 2068 "regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2086 "regex.h2"
+#line 2083 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2088 "regex.h2"
+#line 2085 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3486,7 +3483,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2132 "regex.h2"
+#line 2129 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3513,7 +3510,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2158 "regex.h2"
+#line 2155 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3525,7 +3522,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2169 "regex.h2"
+#line 2166 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3538,7 +3535,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2181 "regex.h2"
+#line 2178 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3557,7 +3554,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2199 "regex.h2"
+#line 2196 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3568,14 +3565,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2209 "regex.h2"
+#line 2206 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2217 "regex.h2"
+#line 2214 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3588,26 +3585,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2229 "regex.h2"
+#line 2226 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2234 "regex.h2"
+#line 2231 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2239 "regex.h2"
+#line 2236 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2245 "regex.h2"
+#line 2242 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3623,7 +3620,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2260 "regex.h2"
+#line 2257 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3652,7 +3649,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2288 "regex.h2"
+#line 2285 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3677,7 +3674,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2312 "regex.h2"
+#line 2309 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3703,7 +3700,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2343 "regex.h2"
+#line 2340 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3726,7 +3723,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2366 "regex.h2"
+#line 2363 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3736,7 +3733,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2378 "regex.h2"
+#line 2375 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3753,7 +3750,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2394 "regex.h2"
+#line 2391 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3778,32 +3775,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2437 "regex.h2"
+#line 2434 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
             , ctx{ ctx_ }
             , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2441 "regex.h2"
+#line 2438 "regex.h2"
         }
 
-#line 2443 "regex.h2"
+#line 2440 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2444 "regex.h2"
+#line 2441 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2445 "regex.h2"
+#line 2442 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2446 "regex.h2"
+#line 2443 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2448 "regex.h2"
+#line 2445 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2449 "regex.h2"
+#line 2446 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2450 "regex.h2"
+#line 2447 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2452 "regex.h2"
+#line 2449 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3812,13 +3809,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2461 "regex.h2"
+#line 2458 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2462 "regex.h2"
+#line 2459 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2463 "regex.h2"
+#line 2460 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2464 "regex.h2"
+#line 2461 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3826,13 +3823,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2471 "regex.h2"
+#line 2468 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2472 "regex.h2"
+#line 2469 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2473 "regex.h2"
+#line 2470 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2474 "regex.h2"
+#line 2471 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
         auto r {ctx.fail()}; 
@@ -3852,10 +3849,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2493 "regex.h2"
+#line 2490 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2498 "regex.h2"
+#line 2495 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3865,15 +3862,15 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2526 "regex.h2"
+#line 2523 "regex.h2"
     template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2529 "regex.h2"
+#line 2526 "regex.h2"
     }
 
-#line 2531 "regex.h2"
+#line 2528 "regex.h2"
     template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
@@ -3909,7 +3906,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2566 "regex.h2"
+#line 2563 "regex.h2"
     template  auto regex_generator::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
@@ -3924,7 +3921,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2581 "regex.h2"
+#line 2578 "regex.h2"
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
     regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
diff --git a/source/regex.h2 b/source/regex.h2
index 5933e2964c..6e5061874a 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1507,7 +1507,7 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
         else if 'r' == ctx..current() { t = '\r'; }
         else if 't' == ctx..current() { t = '\t'; }
         else if '\\' == ctx..current() { t = '\\'; }
-        else { /* TODO: throw error */ }
+        else { return ctx..error("Internal: missing switch case for special escape."); }
         r: = shared.new(t, false);
         r*..set_string("\\(ctx..current())$");
 
@@ -1859,7 +1859,7 @@ group_token: @polymorphic_base type = {
             ctx..add("  }");
             ctx..add("};");
             ctx..add("(tmp_name)$ :=  cpp2::regex::make_on_return((tmp_name)$_func);");
-            ctx..add("_ = (tmp_name)$;"); // TODO: Guard object problem.
+            ctx..add("_ = (tmp_name)$;"); // Logic is done in the destructor. Same behavior as for guard objects.
         }
     }
 
@@ -1883,7 +1883,6 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     has_brackets := false;
     number_str: std::string = "";
     if '{' == ctx..current() {
-        // TODO: Currently does not work since the compiler handles \x also.
         // Bracketed
         has_brackets = true;
         _  = ctx..next(); // Skip '{'
@@ -2062,9 +2061,7 @@ octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     return r;
 }
 
-// TODO: @enum as template parameter yields two error:
-//     error: type 'range_flags' of non-type template parameter is not a structural type
-//     error: non-type template parameter has incomplete type 'range_flags'
+// TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147
 
 // Options for range matching.
 range_flags: type = {

From bcf9c61bfe1546aa611375ff5723a17a63a4009c Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 6 Jul 2024 11:31:10 +0200
Subject: [PATCH 144/161] Update for generated header files.

---
 include/cpp2regex.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
 source/reflect.h    |  8 ++++++++
 2 files changed, 53 insertions(+)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 66694a805a..8534b3570f 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -240,12 +240,20 @@ template class match_group {
     public: Iter end {}; 
 
     public: bool matched {false}; 
+    public: explicit match_group(auto const& start_, auto const& end_, auto const& matched_);
+public: explicit match_group();
+
+#line 55 "regex.h2"
 };
 
 #line 59 "regex.h2"
 template class match_return {
     public: bool matched {false}; 
     public: Iter pos {}; 
+    public: explicit match_return(auto const& matched_, auto const& pos_);
+public: explicit match_return();
+
+#line 62 "regex.h2"
 };
 
 #line 66 "regex.h2"
@@ -586,6 +594,9 @@ class parse_context_group_state {
 #line 412 "regex.h2"
     // Apply optimizations to the matcher list.
     public: static auto post_process_list(token_vec& list) -> void;
+    public: explicit parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_);
+public: explicit parse_context_group_state();
+
 
 #line 426 "regex.h2"
 };
@@ -612,6 +623,9 @@ class parse_context_branch_reset_state {
 #line 458 "regex.h2"
     // Initialize for a branch reset group.
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
+    public: explicit parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_);
+public: explicit parse_context_branch_reset_state();
+
 
 #line 465 "regex.h2"
 };
@@ -774,6 +788,9 @@ class generation_function_context {
 
 #line 864 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
+    public: explicit generation_function_context(auto const& code_, auto const& tabs_);
+public: explicit generation_function_context();
+
 
 #line 867 "regex.h2"
 };
@@ -1508,6 +1525,16 @@ if (((*this) & perl_code_syntax) == perl_code_syntax) {_ret += _comma + "perl_co
 if (((*this) & perl_code_syntax_in_classes) == perl_code_syntax_in_classes) {_ret += _comma + "perl_code_syntax_in_classes";_comma = ", ";}
 return cpp2::move(_ret) + ")"; 
 }
+
+template  match_group::match_group(auto const& start_, auto const& end_, auto const& matched_)
+                                                        : start{ start_ }
+                                                        , end{ end_ }
+                                                        , matched{ matched_ }{}
+template  match_group::match_group(){}
+template  match_return::match_return(auto const& matched_, auto const& pos_)
+                                                : matched{ matched_ }
+                                                , pos{ pos_ }{}
+template  match_return::match_return(){}
 #line 30 "regex.h2"
 //-----------------------------------------------------------------------
 //
@@ -1903,6 +1930,12 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
+    parse_context_group_state::parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_)
+                                                                                     : cur_match_list{ cur_match_list_ }
+                                                                                     , alternate_match_lists{ alternate_match_lists_ }
+                                                                                     , modifiers{ modifiers_ }{}
+parse_context_group_state::parse_context_group_state(){}
+
 #line 437 "regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
@@ -1933,6 +1966,13 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         max_group = restart;
     }
 
+    parse_context_branch_reset_state::parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_)
+                                                                           : is_active{ is_active_ }
+                                                                           , cur_group{ cur_group_ }
+                                                                           , max_group{ max_group_ }
+                                                                           , from{ from_ }{}
+parse_context_branch_reset_state::parse_context_branch_reset_state(){}
+
 #line 485 "regex.h2"
     parse_context::parse_context(cpp2::impl::in r, auto const& e)
         : regex{ r }
@@ -2328,6 +2368,11 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         tabs = tabs.substr(0, c * 2);
     }
 
+    generation_function_context::generation_function_context(auto const& code_, auto const& tabs_)
+                                              : code{ code_ }
+                                              , tabs{ tabs_ }{}
+generation_function_context::generation_function_context(){}
+
 #line 882 "regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
diff --git a/source/reflect.h b/source/reflect.h
index 60c1d80ae0..f89ef596c2 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -697,6 +697,9 @@ class value_member_info {
     public: std::string name; 
     public: std::string type; 
     public: std::string value; 
+    public: explicit value_member_info(auto const& name_, auto const& type_, auto const& value_);
+
+#line 999 "reflect.h2"
 };
 
 auto basic_enum(
@@ -1659,6 +1662,11 @@ auto cpp2_struct(meta::type_declaration& t) -> void
     }
 }
 
+value_member_info::value_member_info(auto const& name_, auto const& type_, auto const& value_)
+                                                      : name{ name_ }
+                                                      , type{ type_ }
+                                                      , value{ value_ }{}
+
 #line 1001 "reflect.h2"
 auto basic_enum(
     meta::type_declaration& t, 

From dc2a9f16343b27fe01c9d847a2e6df0150ecf028 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sat, 6 Jul 2024 23:40:03 +0200
Subject: [PATCH 145/161] Update of generated header files.

---
 include/cpp2regex.h | 48 ++++++++++++++++++++++-----------------------
 source/reflect.h    |  8 ++++----
 2 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 8534b3570f..fab070edab 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -240,8 +240,8 @@ template class match_group {
     public: Iter end {}; 
 
     public: bool matched {false}; 
-    public: explicit match_group(auto const& start_, auto const& end_, auto const& matched_);
-public: explicit match_group();
+    public: match_group(auto const& start_, auto const& end_, auto const& matched_);
+public: match_group();
 
 #line 55 "regex.h2"
 };
@@ -250,8 +250,8 @@ public: explicit match_group();
 template class match_return {
     public: bool matched {false}; 
     public: Iter pos {}; 
-    public: explicit match_return(auto const& matched_, auto const& pos_);
-public: explicit match_return();
+    public: match_return(auto const& matched_, auto const& pos_);
+public: match_return();
 
 #line 62 "regex.h2"
 };
@@ -594,8 +594,8 @@ class parse_context_group_state {
 #line 412 "regex.h2"
     // Apply optimizations to the matcher list.
     public: static auto post_process_list(token_vec& list) -> void;
-    public: explicit parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_);
-public: explicit parse_context_group_state();
+    public: parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_);
+public: parse_context_group_state();
 
 
 #line 426 "regex.h2"
@@ -623,8 +623,8 @@ class parse_context_branch_reset_state {
 #line 458 "regex.h2"
     // Initialize for a branch reset group.
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
-    public: explicit parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_);
-public: explicit parse_context_branch_reset_state();
+    public: parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_);
+public: parse_context_branch_reset_state();
 
 
 #line 465 "regex.h2"
@@ -788,8 +788,8 @@ class generation_function_context {
 
 #line 864 "regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
-    public: explicit generation_function_context(auto const& code_, auto const& tabs_);
-public: explicit generation_function_context();
+    public: generation_function_context(auto const& code_, auto const& tabs_);
+public: generation_function_context();
 
 
 #line 867 "regex.h2"
@@ -1527,13 +1527,13 @@ return cpp2::move(_ret) + ")";
 }
 
 template  match_group::match_group(auto const& start_, auto const& end_, auto const& matched_)
-                                                        : start{ start_ }
-                                                        , end{ end_ }
-                                                        , matched{ matched_ }{}
+                                                                 : start{ start_ }
+                                                                 , end{ end_ }
+                                                                 , matched{ matched_ }{}
 template  match_group::match_group(){}
 template  match_return::match_return(auto const& matched_, auto const& pos_)
-                                                : matched{ matched_ }
-                                                , pos{ pos_ }{}
+                                                         : matched{ matched_ }
+                                                         , pos{ pos_ }{}
 template  match_return::match_return(){}
 #line 30 "regex.h2"
 //-----------------------------------------------------------------------
@@ -1931,9 +1931,9 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
     }
 
     parse_context_group_state::parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_)
-                                                                                     : cur_match_list{ cur_match_list_ }
-                                                                                     , alternate_match_lists{ alternate_match_lists_ }
-                                                                                     , modifiers{ modifiers_ }{}
+                                                                                              : cur_match_list{ cur_match_list_ }
+                                                                                              , alternate_match_lists{ alternate_match_lists_ }
+                                                                                              , modifiers{ modifiers_ }{}
 parse_context_group_state::parse_context_group_state(){}
 
 #line 437 "regex.h2"
@@ -1967,10 +1967,10 @@ parse_context_group_state::parse_context_group_state(){}
     }
 
     parse_context_branch_reset_state::parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_)
-                                                                           : is_active{ is_active_ }
-                                                                           , cur_group{ cur_group_ }
-                                                                           , max_group{ max_group_ }
-                                                                           , from{ from_ }{}
+                                                                                    : is_active{ is_active_ }
+                                                                                    , cur_group{ cur_group_ }
+                                                                                    , max_group{ max_group_ }
+                                                                                    , from{ from_ }{}
 parse_context_branch_reset_state::parse_context_branch_reset_state(){}
 
 #line 485 "regex.h2"
@@ -2369,8 +2369,8 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
     }
 
     generation_function_context::generation_function_context(auto const& code_, auto const& tabs_)
-                                              : code{ code_ }
-                                              , tabs{ tabs_ }{}
+                                                       : code{ code_ }
+                                                       , tabs{ tabs_ }{}
 generation_function_context::generation_function_context(){}
 
 #line 882 "regex.h2"
diff --git a/source/reflect.h b/source/reflect.h
index 1fb66f4d22..1bca447b3b 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -697,7 +697,7 @@ class value_member_info {
     public: std::string name; 
     public: std::string type; 
     public: std::string value; 
-    public: explicit value_member_info(auto const& name_, auto const& type_, auto const& value_);
+    public: value_member_info(auto const& name_, auto const& type_, auto const& value_);
 
 #line 999 "reflect.h2"
 };
@@ -1663,9 +1663,9 @@ auto cpp2_struct(meta::type_declaration& t) -> void
 }
 
 value_member_info::value_member_info(auto const& name_, auto const& type_, auto const& value_)
-                                                      : name{ name_ }
-                                                      , type{ type_ }
-                                                      , value{ value_ }{}
+                                                               : name{ name_ }
+                                                               , type{ type_ }
+                                                               , value{ value_ }{}
 
 #line 1001 "reflect.h2"
 auto basic_enum(

From 98ce0fd39744a0814385e5fbb8008496b3f15411 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 7 Jul 2024 09:44:52 +0200
Subject: [PATCH 146/161] Updates for regression tests.

---
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 52 +++++++++----------
 ...s-clause-in-forward-declaration.cpp.output |  8 +--
 .../gcc-10-c++20/pure2-print.cpp.output       |  4 +-
 3 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
index e1b3714c29..3fb13e67ac 100644
--- a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,118 +1,118 @@
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_1> bool inline constexpr v0{ false };// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
            ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:15:3: error: a lambda expression cannot appear in this context
 t inline constexpr v1{ t() };// Fails on Clang 12 (lambda in unevaluated context).
   ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_2> auto g() -> void;
            ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
 auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void;
                                          ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
 [[nodiscard]] auto h() -> t;
                             ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_3> using a = bool;// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
            ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_4> auto inline constexpr b{ false };// Fails on GCC ([GCC109781][]).
            ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:35:13: error: a lambda expression cannot appear in this context
 using c = t;// Fails on Clang 12 (lambda in unevaluated context) and Clang 12 (a lambda expression cannot appear in this context)
             ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:37:28: error: a lambda expression cannot appear in this context
 auto inline constexpr d{ t() };// Fails on Clang 12 (lambda in unevaluated context).
                            ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_2> auto g() -> void{}// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
            ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
 auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void{}// Fails on Clang 12 (lambda in unevaluated context).
                                          ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
 [[nodiscard]] auto h() -> t { return o;  }// Fails on Clang 12 (lambda in unevaluated context).
                             ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:41:84: error: lambda expression in an unevaluated operand
   inline CPP2_CONSTEXPR bool u::c{ [](cpp2::impl::in> x) mutable -> auto { return x; }(true) };// Fails on Clang 12 (lambda in unevaluated context).
                                                                                    ^
-../../../include/cpp2util.h:1172:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1134:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 13 errors generated.
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
index 91b2054e40..605533b8b0 100644
--- a/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
@@ -6,12 +6,12 @@ pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:46: error: expect
 In file included from pure2-bugfix-for-requires-clause-in-forward-declaration.cpp:7:
 ../../../include/cpp2util.h:10005:47: error: static assertion failed: GCC 11 or higher is required to support variables and type-scope functions that have a 'requires' clause. This includes a type-scope 'forward' parameter of non-wildcard type, such as 'func: (this, forward s: std::string)', which relies on being able to add a 'requires' clause - in that case, use 'forward s: _' instead if you need the result to compile with GCC 10.
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:4:1: note: in expansion of macro ‘CPP2_REQUIRES_’
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:3: error: no declaration matches ‘element::element(auto:231&&) requires  is_same_v::type>::type>’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:3: error: no declaration matches ‘element::element(auto:259&&) requires  is_same_v::type>::type>’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:11: note: candidates are: ‘element::element(const element&)’
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:20: note:                 ‘template element::element(auto:229&&)’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:20: note:                 ‘template element::element(auto:257&&)’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:1:7: note: ‘class element’ defined here
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:5:78: error: expected unqualified-id before ‘{’ token
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:8: error: no declaration matches ‘element& element::operator=(auto:232&&) requires  is_same_v::type>::type>’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:8: error: no declaration matches ‘element& element::operator=(auto:260&&) requires  is_same_v::type>::type>’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:6:16: note: candidates are: ‘void element::operator=(const element&)’
-pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:16: note:                 ‘template element& element::operator=(auto:230&&)’
+pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:3:16: note:                 ‘template element& element::operator=(auto:258&&)’
 pure2-bugfix-for-requires-clause-in-forward-declaration.cpp2:1:7: note: ‘class element’ defined here
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output
index cb226c1c31..72475aa8be 100644
--- a/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-print.cpp.output
@@ -9,8 +9,8 @@ pure2-print.cpp2:68:1: note: in expansion of macro ‘CPP2_REQUIRES_’
 pure2-print.cpp2:97:1: note: in expansion of macro ‘CPP2_REQUIRES_’
 pure2-print.cpp2:9:41: error: ‘constexpr const T outer::object_alias’ is not a static data member of ‘class outer’
 pure2-print.cpp2:9:48: error: template definition of non-template ‘constexpr const T outer::object_alias’
-pure2-print.cpp2:67:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:230& ...) requires (is_convertible_v::type>::type, int> && ...)’
-pure2-print.cpp2:67:29: note: candidate is: ‘template static void outer::mytype::variadic(const auto:229& ...)’
+pure2-print.cpp2:67:14: error: no declaration matches ‘void outer::mytype::variadic(const auto:258& ...) requires (is_convertible_v::type>::type, int> && ...)’
+pure2-print.cpp2:67:29: note: candidate is: ‘template static void outer::mytype::variadic(const auto:257& ...)’
 pure2-print.cpp2:10:19: note: ‘class outer::mytype’ defined here
 pure2-print.cpp2:96:37: error: no declaration matches ‘void outer::print(std::ostream&, const Args& ...) requires  cpp2::impl::cmp_greater_eq(sizeof ... (Args ...), 0)’
 pure2-print.cpp2:96:37: note: no functions named ‘void outer::print(std::ostream&, const Args& ...) requires  cpp2::impl::cmp_greater_eq(sizeof ... (Args ...), 0)’

From 47b23706cd132758f3cb2e29cdbf9fe789bf4cfd Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Sun, 7 Jul 2024 12:06:21 -0700
Subject: [PATCH 147/161] Enable modules build on MSVC by removing #includes
 when using modules

Also, silence two narrowing errors MSVC reports by adding unsafe_narrow
---
 include/cpp2regex.h                           |  8 +--
 include/cpp2util.h                            |  3 ++
 include/string_util.h                         |  6 +--
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 52 +++++++++----------
 .../pure2-bugfix-for-ufcs-noexcept.cpp.output |  4 +-
 .../pure2-bugfix-for-ufcs-sfinae.cpp.output   |  8 +--
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 40 +++++++-------
 .../pure2-regex_01_char_matcher.cpp.output    |  1 +
 .../pure2-regex_02_ranges.cpp.output          |  1 +
 .../pure2-regex_03_wildcard.cpp.output        |  1 +
 .../pure2-regex_04_start_end.cpp.output       |  1 +
 .../pure2-regex_05_classes.cpp.output         |  1 +
 .../pure2-regex_06_boundaries.cpp.output      |  1 +
 .../pure2-regex_07_short_classes.cpp.output   |  1 +
 .../pure2-regex_08_alternatives.cpp.output    |  1 +
 .../pure2-regex_09_groups.cpp.output          |  1 +
 .../pure2-regex_10_escapes.cpp.execution      | 30 +++++------
 .../pure2-regex_10_escapes.cpp.output         |  4 ++
 ...pure2-regex_11_group_references.cpp.output |  1 +
 ...pure2-regex_12_case_insensitive.cpp.output |  1 +
 ...re2-regex_13_posessive_modifier.cpp.output |  1 +
 ...re2-regex_14_multiline_modifier.cpp.output |  1 +
 .../pure2-regex_15_group_modifiers.cpp.output |  1 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |  1 +
 .../pure2-regex_17_comments.cpp.output        |  1 +
 .../pure2-regex_18_branch_reset.cpp.output    |  1 +
 .../pure2-regex_19_lookahead.cpp.output       |  1 +
 source/regex.h2                               |  8 +--
 28 files changed, 103 insertions(+), 78 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index fab070edab..13ae24f587 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -183,8 +183,8 @@ template class regex_generator;
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-#include 
-#include 
+// #include 
+// #include 
 
 template
 using matcher_wrapper_type = typename matcher_wrapper::template wrap;
@@ -1606,14 +1606,14 @@ template  match_return::match_return(){}
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
-        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
+        return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end)); 
     }
 #line 90 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
-        return std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start); 
+        return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start)); 
     }
 #line 96 "regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
diff --git a/include/cpp2util.h b/include/cpp2util.h
index d04ea66bd2..50277290c3 100644
--- a/include/cpp2util.h
+++ b/include/cpp2util.h
@@ -267,6 +267,7 @@
     #include 
     #include 
     #include 
+    #include 
     #include 
     #include 
     #include 
@@ -274,7 +275,9 @@
     #if defined(CPP2_USE_SOURCE_LOCATION)
         #include 
     #endif
+    #include 
     #include 
+    #include 
     #include 
     #include 
     #include 
diff --git a/include/string_util.h b/include/string_util.h
index 678e643438..2ce64b3d19 100644
--- a/include/string_util.h
+++ b/include/string_util.h
@@ -1,8 +1,8 @@
 #pragma once
 
-#include 
-#include 
-#include 
+// #include 
+// #include 
+// #include 
 
 namespace cpp2 {
 namespace string_util {
diff --git a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
index 3fb13e67ac..fa6f4239b3 100644
--- a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,118 +1,118 @@
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_1> bool inline constexpr v0{ false };// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
            ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:15:3: error: a lambda expression cannot appear in this context
 t inline constexpr v1{ t() };// Fails on Clang 12 (lambda in unevaluated context).
   ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_2> auto g() -> void;
            ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
 auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void;
                                          ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
 [[nodiscard]] auto h() -> t;
                             ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_3> using a = bool;// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
            ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_4> auto inline constexpr b{ false };// Fails on GCC ([GCC109781][]).
            ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:35:13: error: a lambda expression cannot appear in this context
 using c = t;// Fails on Clang 12 (lambda in unevaluated context) and Clang 12 (a lambda expression cannot appear in this context)
             ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:37:28: error: a lambda expression cannot appear in this context
 auto inline constexpr d{ t() };// Fails on Clang 12 (lambda in unevaluated context).
                            ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
 template UnnamedTypeParam1_2> auto g() -> void{}// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
            ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
 auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void{}// Fails on Clang 12 (lambda in unevaluated context).
                                          ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
 [[nodiscard]] auto h() -> t { return o;  }// Fails on Clang 12 (lambda in unevaluated context).
                             ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 mixed-bugfix-for-ufcs-non-local.cpp2:41:84: error: lambda expression in an unevaluated operand
   inline CPP2_CONSTEXPR bool u::c{ [](cpp2::impl::in> x) mutable -> auto { return x; }(true) };// Fails on Clang 12 (lambda in unevaluated context).
                                                                                    ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 13 errors generated.
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
index 758c435627..7c50e0c915 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
@@ -1,10 +1,10 @@
 pure2-bugfix-for-ufcs-noexcept.cpp2:5:26: error: lambda expression in an unevaluated operand
   static_assert(noexcept(CPP2_UFCS(swap)(t(), t())));// Fails on Clang 12 (lambda in unevaluated context) and GCC 10 (static assertion failed)
                          ^
-../../../include/cpp2util.h:1168:59: note: expanded from macro 'CPP2_UFCS'
+../../../include/cpp2util.h:1171:59: note: expanded from macro 'CPP2_UFCS'
 #define CPP2_UFCS(...)                                    CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 1 error generated.
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
index 11853743c2..515e292c09 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
@@ -1,19 +1,19 @@
 pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
 template [[nodiscard]] auto f() -> std::type_identity_t;
                                                                              ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
 template [[nodiscard]] auto f() -> std::type_identity_t{}// Fails on Clang 12 (lambda in unevaluated context).
                                                                              ^
-../../../include/cpp2util.h:1173:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
 #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
                                                           ^
-../../../include/cpp2util.h:1135:66: note: expanded from macro 'CPP2_UFCS_'
+../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
 #define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
                                                                  ^
 2 errors generated.
diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index d7ea10271f..ee4d28d523 100644
--- a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output
index e69de29bb2..e74374d8c2 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_01_char_matcher.cpp.output
@@ -0,0 +1 @@
+pure2-regex_01_char_matcher.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output
index e69de29bb2..00bf2644df 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_02_ranges.cpp.output
@@ -0,0 +1 @@
+pure2-regex_02_ranges.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output
index e69de29bb2..6d0365664b 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_03_wildcard.cpp.output
@@ -0,0 +1 @@
+pure2-regex_03_wildcard.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output
index e69de29bb2..e11a6a873f 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_04_start_end.cpp.output
@@ -0,0 +1 @@
+pure2-regex_04_start_end.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output
index e69de29bb2..eb300bda69 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_05_classes.cpp.output
@@ -0,0 +1 @@
+pure2-regex_05_classes.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output
index e69de29bb2..150c67dd34 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_06_boundaries.cpp.output
@@ -0,0 +1 @@
+pure2-regex_06_boundaries.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output
index e69de29bb2..97988771cd 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_07_short_classes.cpp.output
@@ -0,0 +1 @@
+pure2-regex_07_short_classes.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output
index e69de29bb2..7a45b0c187 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_08_alternatives.cpp.output
@@ -0,0 +1 @@
+pure2-regex_08_alternatives.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output
index e69de29bb2..047bb5f087 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_09_groups.cpp.output
@@ -0,0 +1 @@
+pure2-regex_09_groups.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
index fe6e6efc96..f743e0fe5d 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
@@ -9,30 +9,30 @@ Running tests_10_escapes:
 08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
 09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
 10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
-11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
 
+bar result_expr: $1 expected_results 
+
 
-bar result_expr: $1 expected_results 
 
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
 
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
 
-12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
-
-
-bar result_expr: $1-$2 expected_results foo-
-13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
-
-
-bar result_expr: $1-$2 expected_results 
-
+bar result_expr: $1-$2 expected_results 
+
 
 -b
-14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
-15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
 16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
 17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
-
bar result_expr: $& expected_results foo	
-
bar
+
ebar result_expr: $& expected_results foo	
+
ebar
 18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
 19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
 20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
index e69de29bb2..bcb3c878cf 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
@@ -0,0 +1,4 @@
+pure2-regex_10_escapes.cpp
+pure2-regex_10_escapes.cpp2(192): warning C4129: 'e': unrecognized character escape sequence
+pure2-regex_10_escapes.cpp2(192): warning C4129: 'e': unrecognized character escape sequence
+pure2-regex_10_escapes.cpp2(1592): warning C4129: 'e': unrecognized character escape sequence
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output
index e69de29bb2..61446dad64 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_11_group_references.cpp.output
@@ -0,0 +1 @@
+pure2-regex_11_group_references.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output
index e69de29bb2..1c860cd486 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_12_case_insensitive.cpp.output
@@ -0,0 +1 @@
+pure2-regex_12_case_insensitive.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
index e69de29bb2..c2f6f5644f 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
@@ -0,0 +1 @@
+pure2-regex_13_posessive_modifier.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output
index e69de29bb2..9fe1dd849e 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_14_multiline_modifier.cpp.output
@@ -0,0 +1 @@
+pure2-regex_14_multiline_modifier.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output
index e69de29bb2..25bda92737 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_15_group_modifiers.cpp.output
@@ -0,0 +1 @@
+pure2-regex_15_group_modifiers.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output
index e69de29bb2..3df3a04bf6 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_16_perl_syntax_modifier.cpp.output
@@ -0,0 +1 @@
+pure2-regex_16_perl_syntax_modifier.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output
index e69de29bb2..7cd5b672db 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_17_comments.cpp.output
@@ -0,0 +1 @@
+pure2-regex_17_comments.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output
index e69de29bb2..dac6ef8e58 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_18_branch_reset.cpp.output
@@ -0,0 +1 @@
+pure2-regex_18_branch_reset.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output
index e69de29bb2..005c8d5dc1 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_19_lookahead.cpp.output
@@ -0,0 +1 @@
+pure2-regex_19_lookahead.cpp
diff --git a/source/regex.h2 b/source/regex.h2
index 6e5061874a..c8cd052adc 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -10,8 +10,8 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-#include 
-#include 
+// #include 
+// #include 
 
 template
 using matcher_wrapper_type = typename matcher_wrapper::template wrap;
@@ -85,13 +85,13 @@ match_context:  type =
         if group >= max_groups || !groups[group].matched {
             return 0;
         }
-        return std::distance(begin, groups[group].end);
+        return cpp2::unsafe_narrow( std::distance(begin, groups[group].end) );
     }
     get_group_start:  (in this, group) -> int = {
         if group >= max_groups || !groups[group].matched {
             return 0;
         }
-        return std::distance(begin, groups[group].start);
+        return cpp2::unsafe_narrow( std::distance(begin, groups[group].start) );
     }
     get_group_string: (in this, group) -> std::string = {
         if group >= max_groups || !groups[group].matched {

From ccaf546770f3fc1f813597cd77ceb187f1ba6f76 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 8 Jul 2024 10:23:39 +0200
Subject: [PATCH 148/161] Updates for regression tests.

---
 include/cpp2regex.h                           |  2 +-
 regression-tests/pure2-regex_10_escapes.cpp2  |  2 +-
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 40 +++++++++----------
 .../pure2-assert-expected-not-null.cpp.output |  4 +-
 .../pure2-regex_10_escapes.cpp.execution      | 26 ++++++------
 .../test-results/pure2-regex_10_escapes.cpp   |  4 +-
 source/regex.h2                               |  2 +-
 7 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 13ae24f587..854b3998ce 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -2752,7 +2752,7 @@ size_t i{0};
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
-        str = string_util::replace_all(str, "\x1b", "\\e"); // TODO: A bug in gcc prevents us from using the safe "\\x{1b}". \x{1b} is replaced despite the escape.
+        //str = string_util::replace_all(str, "\x1b", "\\x{1b}"); // TODO: Add again after https://github.com/hsutter/cppfront/issues/1152 is fixed or concat strings are allowed.
         str = string_util::replace_all(str, "\n", "\\n");
         str = string_util::replace_all(str, "\r", "\\r");
         str = string_util::replace_all(str, "\t", "\\t");
diff --git a/regression-tests/pure2-regex_10_escapes.cpp2 b/regression-tests/pure2-regex_10_escapes.cpp2
index 2d67da8fb4..11901b399e 100644
--- a/regression-tests/pure2-regex_10_escapes.cpp2
+++ b/regression-tests/pure2-regex_10_escapes.cpp2
@@ -189,7 +189,7 @@ test_tests_10_escapes: @regex type = {
     test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r");
     test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r");
     test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b");
-    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a\ebar", "y", R"($&)", "foo\t\n\r\f\a\ebar");
+    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\abar", "y", R"($&)", "foo\t\n\r\f\abar");
     test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar");
     test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB");
     test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB");
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index d7ea10271f..ee4d28d523 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
- 1136 | [LAMBDADEFCAPT]< \
+../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
+ 1139 | [LAMBDADEFCAPT]< \
       | ^
-../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
       |                                                           ^~~~~~~~~~
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
index be15804167..ccdd6c2961 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
@@ -6,7 +6,7 @@ pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' b
 pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-..\..\..\include\cpp2util.h(639): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+D:␇\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
 pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std'
 predefined C++ types (compiler internal)(347): note: see declaration of 'std'
 pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected
@@ -19,4 +19,4 @@ pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argumen
 pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-..\..\..\include\cpp2util.h(639): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+D:␇\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
index f743e0fe5d..3ccc9ae9fc 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
@@ -9,26 +9,26 @@ Running tests_10_escapes:
 08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
 09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
 10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
-11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
-
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
 
-bar result_expr: $1 expected_results 
-
 
+bar result_expr: $1 expected_results 
 
-12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
-
 
-bar result_expr: $1-$2 expected_results foo-
-13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
-
 
-bar result_expr: $1-$2 expected_results 
-
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
 
 -b
-14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
-15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
 16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
 17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
 
ebar result_expr: $& expected_results foo	
diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp b/regression-tests/test-results/pure2-regex_10_escapes.cpp
index 7eb93b9e67..9dec2534fb 100644
--- a/regression-tests/test-results/pure2-regex_10_escapes.cpp
+++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp
@@ -811,7 +811,7 @@ template auto test(M const& regex, cpp2::impl::in id, c
     test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r");
     test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r");
     test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b");
-    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a\ebar", "y", R"($&)", "foo\t\n\r\f\a\ebar");
+    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\abar", "y", R"($&)", "foo\t\n\r\f\abar");
     test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar");
     test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB");
     test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB");
@@ -2211,7 +2211,7 @@ int i{0};
   auto r {ctx.pass(cur)}; 
   do {
 
-  std::array str_tmp_0 {"foo\t\n\r\f\a\ebar"}; 
+  std::array str_tmp_0 {"foo\t\n\r\f\abar"}; 
   if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),12)) {
   r.matched = false;
   break;
diff --git a/source/regex.h2 b/source/regex.h2
index c8cd052adc..17f6091ed6 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1253,7 +1253,7 @@ char_token: @polymorphic_base type = {
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
-        str = string_util::replace_all(str, "\x1b", "\\e"); // TODO: A bug in gcc prevents us from using the safe "\\x{1b}". \x{1b} is replaced despite the escape.
+        //str = string_util::replace_all(str, "\x1b", "\\x{1b}"); // TODO: Add again after https://github.com/hsutter/cppfront/issues/1152 is fixed or concat strings are allowed.
         str = string_util::replace_all(str, "\n", "\\n");
         str = string_util::replace_all(str, "\r", "\\r");
         str = string_util::replace_all(str, "\t", "\\t");

From f62b856d0a2d9c126e7b133ed001148c6f0c1f64 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 9 Jul 2024 10:05:43 +0200
Subject: [PATCH 149/161] Changes for regression-tests.

---
 .../clang-version.output                      |   4 +
 .../mixed-allcpp1-hello.cpp.execution         |   1 +
 .../mixed-allcpp1-hello.cpp.output            |   0
 ...ixed-as-for-variant-20-types.cpp.execution |  60 ++
 .../mixed-as-for-variant-20-types.cpp.output  |   0
 .../mixed-bounds-check.cpp.execution          |   1 +
 .../mixed-bounds-check.cpp.output             |   0
 ...-bounds-safety-with-assert-2.cpp.execution |   5 +
 ...xed-bounds-safety-with-assert-2.cpp.output |   0
 ...ed-bounds-safety-with-assert.cpp.execution |   1 +
 ...mixed-bounds-safety-with-assert.cpp.output |   0
 ...r-cpp2-comment-cpp1-sequence.cpp.execution |   0
 ...-for-cpp2-comment-cpp1-sequence.cpp.output |   0
 ...d-bugfix-for-literal-as-nttp.cpp.execution |   0
 ...ixed-bugfix-for-literal-as-nttp.cpp.output |   0
 ...gfix-for-ufcs-non-local.cpp copy.execution |   0
 ...-bugfix-for-ufcs-non-local.cpp copy.output |   0
 ...ed-bugfix-for-ufcs-non-local.cpp.execution |   0
 ...mixed-bugfix-for-ufcs-non-local.cpp.output |   0
 ...-bugfix-for-ufcs-non-local.cpp.output.orig |   0
 ...d-bugfix-for-ufcs-non-local.cpp.output.rej |  64 +++
 ...pressions-and-postconditions.cpp.execution |   4 +
 ...-expressions-and-postconditions.cpp.output |   0
 .../mixed-default-arguments.cpp.execution     |   4 +
 .../mixed-default-arguments.cpp.output        |   0
 .../mixed-fixed-type-aliases.cpp.execution    |   4 +
 .../mixed-fixed-type-aliases.cpp.output       |   0
 .../mixed-float-literals.cpp.execution        |  72 +++
 .../mixed-float-literals.cpp.output           |   0
 .../mixed-forwarding.cpp.execution            |  12 +
 .../mixed-forwarding.cpp.output               |   0
 ...-expression-and-std-for-each.cpp.execution |   2 +
 ...ion-expression-and-std-for-each.cpp.output |   0
 ...ranges-for-each-with-capture.cpp.execution |   4 +
 ...td-ranges-for-each-with-capture.cpp.output |   0
 ...sion-and-std-ranges-for-each.cpp.execution |   4 +
 ...ression-and-std-ranges-for-each.cpp.output |   0
 ...ression-with-pointer-capture.cpp.execution |   6 +
 ...expression-with-pointer-capture.cpp.output |   0
 ...ession-with-repeated-capture.cpp.execution |   6 +
 ...xpression-with-repeated-capture.cpp.output |   0
 .../mixed-hello.cpp.execution                 |   1 +
 .../mixed-hello.cpp.output                    |   0
 .../mixed-increment-decrement.cpp.execution   |   2 +
 .../mixed-increment-decrement.cpp.output      |   0
 ...-safety-3-contract-violation.cpp.execution |   1 +
 ...ion-safety-3-contract-violation.cpp.output |   0
 ...ixed-initialization-safety-3.cpp.execution |   1 +
 .../mixed-initialization-safety-3.cpp.output  |   0
 .../mixed-inspect-templates.cpp.execution     |   8 +
 .../mixed-inspect-templates.cpp.output        |   0
 .../mixed-inspect-values-2.cpp.execution      |   5 +
 .../mixed-inspect-values-2.cpp.output         |   0
 .../mixed-inspect-values.cpp.execution        |  12 +
 .../mixed-inspect-values.cpp.output           |   0
 ...-typeof-of-template-arg-list.cpp.execution |   0
 ...ith-typeof-of-template-arg-list.cpp.output |   0
 ...ed-intro-example-three-loops.cpp.execution |   7 +
 ...mixed-intro-example-three-loops.cpp.output |   0
 ...or-with-counter-include-last.cpp.execution |   5 +
 ...o-for-with-counter-include-last.cpp.output |   0
 ...me-safety-and-null-contracts.cpp.execution |   1 +
 ...etime-safety-and-null-contracts.cpp.output |   0
 ...fetime-safety-pointer-init-4.cpp.execution |   1 +
 ...-lifetime-safety-pointer-init-4.cpp.output |   0
 ...mixed-multiple-return-values.cpp.execution |   2 +
 .../mixed-multiple-return-values.cpp.output   |   0
 .../mixed-out-destruction.cpp.execution       |  21 +
 .../mixed-out-destruction.cpp.output          |   0
 ...arameter-passing-generic-out.cpp.execution |   2 +
 ...d-parameter-passing-generic-out.cpp.output |   0
 ...rameter-passing-with-forward.cpp.execution |   0
 ...-parameter-passing-with-forward.cpp.output |   0
 .../mixed-parameter-passing.cpp.execution     |   0
 .../mixed-parameter-passing.cpp.output        |   0
 ...-postexpression-with-capture.cpp.execution |   2 +
 ...xed-postexpression-with-capture.cpp.output |   0
 ...expression-custom-formatting.cpp.execution |   0
 ...ix-expression-custom-formatting.cpp.output |   0
 .../mixed-string-interpolation.cpp.execution  |  17 +
 .../mixed-string-interpolation.cpp.output     |   0
 .../mixed-test-parens.cpp.execution           |   3 +
 .../mixed-test-parens.cpp.output              |   0
 .../mixed-type-safety-1.cpp.execution         |   6 +
 .../mixed-type-safety-1.cpp.output            |   0
 ...-multiple-template-arguments.cpp.execution |   2 +
 ...fcs-multiple-template-arguments.cpp.output |   0
 .../pure2-assert-expected-not-null.cpp.output |  27 +
 ...re2-assert-optional-not-null.cpp.execution |   1 +
 .../pure2-assert-optional-not-null.cpp.output |   0
 ...2-assert-shared-ptr-not-null.cpp.execution |   1 +
 ...ure2-assert-shared-ptr-not-null.cpp.output |   0
 ...2-assert-unique-ptr-not-null.cpp.execution |   1 +
 ...ure2-assert-unique-ptr-not-null.cpp.output |   0
 .../pure2-bounds-safety-span.cpp.execution    |   3 +
 .../pure2-bounds-safety-span.cpp.output       |   0
 .../pure2-break-continue.cpp.execution        |  26 +
 .../pure2-break-continue.cpp.output           |   0
 ...x-for-assign-expression-list.cpp.execution |   0
 ...gfix-for-assign-expression-list.cpp.output |   0
 ...ugfix-for-discard-precedence.cpp.execution |   0
 ...2-bugfix-for-discard-precedence.cpp.output |   0
 ...ure2-bugfix-for-indexed-call.cpp.execution |   0
 .../pure2-bugfix-for-indexed-call.cpp.output  |   0
 .../pure2-bugfix-for-max-munch.cpp.execution  |   0
 .../pure2-bugfix-for-max-munch.cpp.output     |   0
 ...r-memberwise-base-assignment.cpp.execution |   2 +
 ...-for-memberwise-base-assignment.cpp.output |   0
 ...-lookup-and-value-decoration.cpp.execution |   0
 ...ame-lookup-and-value-decoration.cpp.output |   0
 ...on-local-function-expression.cpp.execution |   0
 ...r-non-local-function-expression.cpp.output |   0
 ...for-non-local-initialization.cpp.execution |   0
 ...ix-for-non-local-initialization.cpp.output |   0
 ...ional-template-argument-list.cpp.execution |   0
 ...optional-template-argument-list.cpp.output |   0
 ...lause-in-forward-declaration.cpp.execution |   0
 ...s-clause-in-forward-declaration.cpp.output |   0
 ...nbraced-function-initializer.cpp.execution |   0
 ...e-unbraced-function-initializer.cpp.output |   0
 ...bugfix-for-template-argument.cpp.execution |   1 +
 ...e2-bugfix-for-template-argument.cpp.output |   0
 ...gfix-for-ufcs-arguments.cpp copy.execution |   4 +
 ...-bugfix-for-ufcs-arguments.cpp copy.output |   0
 ...e2-bugfix-for-ufcs-arguments.cpp.execution |   4 +
 ...pure2-bugfix-for-ufcs-arguments.cpp.output |   0
 ...ix-for-ufcs-name-lookup.cpp copy.execution |   0
 ...ugfix-for-ufcs-name-lookup.cpp copy.output |   0
 ...-bugfix-for-ufcs-name-lookup.cpp.execution |   0
 ...re2-bugfix-for-ufcs-name-lookup.cpp.output |   0
 ...ugfix-for-ufcs-noexcept.cpp copy.execution |   0
 ...2-bugfix-for-ufcs-noexcept.cpp copy.output |   0
 ...re2-bugfix-for-ufcs-noexcept.cpp.execution |   0
 .../pure2-bugfix-for-ufcs-noexcept.cpp.output |   0
 ...-bugfix-for-ufcs-sfinae.cpp copy.execution |   0
 ...re2-bugfix-for-ufcs-sfinae.cpp copy.output |   0
 ...pure2-bugfix-for-ufcs-sfinae.cpp.execution |   0
 .../pure2-bugfix-for-ufcs-sfinae.cpp.output   |   0
 ...unbraced-function-expression.cpp.execution |   0
 ...or-unbraced-function-expression.cpp.output |   0
 ...bugfix-for-variable-template.cpp.execution |   0
 ...e2-bugfix-for-variable-template.cpp.output |   0
 .../pure2-chained-comparisons.cpp.execution   |  27 +
 .../pure2-chained-comparisons.cpp.output      |   0
 .../pure2-concept-definition.cpp.execution    |   0
 .../pure2-concept-definition.cpp.output       |   0
 .../pure2-contracts.cpp.execution             |   3 +
 .../pure2-contracts.cpp.output                |   0
 ...-comparisons-and-final-types.cpp.execution |   1 +
 ...ted-comparisons-and-final-types.cpp.output |   0
 .../pure2-enum.cpp.execution                  |  29 +
 .../pure2-enum.cpp.output                     |   0
 ...2-for-loop-range-with-lambda.cpp.execution |   1 +
 ...ure2-for-loop-range-with-lambda.cpp.output |   0
 .../pure2-forward-return.cpp.execution        |   2 +
 .../pure2-forward-return.cpp.output           |   0
 ...n-multiple-forward-arguments.cpp.execution |   1 +
 ...tion-multiple-forward-arguments.cpp.output |   0
 .../pure2-hello.cpp.execution                 |   1 +
 .../pure2-hello.cpp.output                    |   0
 ...lization-safety-with-else-if.cpp.execution |   1 +
 ...tialization-safety-with-else-if.cpp.output |   0
 ...eric-function-multiple-types.cpp.execution |   8 +
 ...generic-function-multiple-types.cpp.output |   0
 ...-with-as-in-generic-function.cpp.execution |   3 +
 ...ion-with-as-in-generic-function.cpp.output |   0
 ...ck-with-variant-any-optional.cpp.execution |  11 +
 ...lback-with-variant-any-optional.cpp.output |   0
 ...ty-with-variant-any-optional.cpp.execution |  17 +
 ...empty-with-variant-any-optional.cpp.output |   0
 .../pure2-interpolation.cpp.execution         |  13 +
 .../pure2-interpolation.cpp.output            |   0
 ...re2-intro-example-hello-2022.cpp.execution |   2 +
 .../pure2-intro-example-hello-2022.cpp.output |   0
 ...e2-intro-example-three-loops.cpp.execution |   8 +
 ...pure2-intro-example-three-loops.cpp.output |   0
 ...ith-free-functions-predicate.cpp.execution |   6 +
 ...s-with-free-functions-predicate.cpp.output |   0
 ...2-is-with-unnamed-predicates.cpp.execution |   6 +
 ...ure2-is-with-unnamed-predicates.cpp.output |   0
 ...2-is-with-variable-and-value.cpp.execution |   9 +
 ...ure2-is-with-variable-and-value.cpp.output |   0
 .../pure2-last-use.cpp.execution              |   1 +
 .../pure2-last-use.cpp.output                 |   0
 ...eter-across-unnamed-function.cpp.execution |   1 +
 ...rameter-across-unnamed-function.cpp.output |   0
 .../pure2-main-args.cpp.execution             |   2 +
 .../pure2-main-args.cpp.output                |   0
 .../pure2-more-wildcards.cpp.execution        |   2 +
 .../pure2-more-wildcards.cpp.output           |   0
 .../pure2-print.cpp.execution                 |   2 +
 .../pure2-print.cpp.output                    |   0
 ...ng-literal-and-interpolation.cpp.execution |  17 +
 ...tring-literal-and-interpolation.cpp.output |   0
 .../pure2-regex_01_char_matcher.cpp.execution |  14 +
 .../pure2-regex_01_char_matcher.cpp.output    |   0
 .../pure2-regex_02_ranges.cpp.execution       |  42 ++
 .../pure2-regex_02_ranges.cpp.output          |   0
 .../pure2-regex_03_wildcard.cpp.execution     |  22 +
 .../pure2-regex_03_wildcard.cpp.output        |   0
 .../pure2-regex_04_start_end.cpp.execution    |  11 +
 .../pure2-regex_04_start_end.cpp.output       |   0
 .../pure2-regex_05_classes.cpp.execution      |  21 +
 .../pure2-regex_05_classes.cpp.output         |   0
 .../pure2-regex_06_boundaries.cpp.execution   |  19 +
 .../pure2-regex_06_boundaries.cpp.output      |   0
 ...pure2-regex_07_short_classes.cpp.execution |  26 +
 .../pure2-regex_07_short_classes.cpp.output   |   0
 .../pure2-regex_08_alternatives.cpp.execution |   4 +
 .../pure2-regex_08_alternatives.cpp.output    |   0
 .../pure2-regex_09_groups.cpp.execution       |  13 +
 .../pure2-regex_09_groups.cpp.output          |   0
 .../pure2-regex_10_escapes.cpp.execution      |  39 ++
 .../pure2-regex_10_escapes.cpp.output         |   0
 ...e2-regex_11_group_references.cpp.execution |  26 +
 ...pure2-regex_11_group_references.cpp.output |   0
 ...e2-regex_12_case_insensitive.cpp.execution | 121 ++++
 ...pure2-regex_12_case_insensitive.cpp.output |   0
 ...-regex_13_posessive_modifier.cpp.execution |  50 ++
 ...re2-regex_13_posessive_modifier.cpp.output |   0
 ...-regex_14_multiline_modifier.cpp.execution | 533 ++++++++++++++++++
 ...re2-regex_14_multiline_modifier.cpp.output |   0
 ...re2-regex_15_group_modifiers.cpp.execution |  87 +++
 .../pure2-regex_15_group_modifiers.cpp.output |   0
 ...egex_16_perl_syntax_modifier.cpp.execution |  35 ++
 ...2-regex_16_perl_syntax_modifier.cpp.output |   0
 .../pure2-regex_17_comments.cpp.execution     |   5 +
 .../pure2-regex_17_comments.cpp.output        |   0
 .../pure2-regex_18_branch_reset.cpp.execution |  17 +
 .../pure2-regex_18_branch_reset.cpp.output    |   0
 .../pure2-regex_19_lookahead.cpp.execution    |  77 +++
 .../pure2-regex_19_lookahead.cpp.output       |   0
 .../pure2-repeated-call.cpp.execution         |   1 +
 .../pure2-repeated-call.cpp.output            |   0
 .../pure2-requires-clauses.cpp.execution      |   1 +
 .../pure2-requires-clauses.cpp.output         |   0
 .../pure2-return-tuple-operator.cpp.execution |   3 +
 .../pure2-return-tuple-operator.cpp.output    |   0
 ...2-statement-scope-parameters.cpp.execution |   2 +
 ...ure2-statement-scope-parameters.cpp.output |   0
 .../pure2-stdio-with-raii.cpp.execution       |   0
 .../pure2-stdio-with-raii.cpp.output          |   0
 .../pure2-stdio.cpp.execution                 |   0
 .../pure2-stdio.cpp.output                    |   0
 ...-rightshift-and-rightshifteq.cpp.execution |   1 +
 ...ize-rightshift-and-rightshifteq.cpp.output |   0
 ...re2-template-parameter-lists.cpp.execution |   4 +
 .../pure2-template-parameter-lists.cpp.output |   0
 .../pure2-trailing-comma-assert.cpp.execution |   0
 .../pure2-trailing-comma-assert.cpp.output    |   0
 .../pure2-trailing-commas.cpp.execution       |   0
 .../pure2-trailing-commas.cpp.output          |   0
 ...2-type-and-namespace-aliases.cpp.execution |   2 +
 ...ure2-type-and-namespace-aliases.cpp.output |   0
 .../pure2-type-safety-1.cpp.execution         |   9 +
 .../pure2-type-safety-1.cpp.output            |   0
 ...ty-2-with-inspect-expression.cpp.execution |   8 +
 ...afety-2-with-inspect-expression.cpp.output |   0
 .../pure2-types-basics.cpp.execution          |  27 +
 .../pure2-types-basics.cpp.output             |   0
 .../pure2-types-down-upcast.cpp.execution     |  24 +
 .../pure2-types-down-upcast.cpp.output        |   0
 .../pure2-types-inheritance.cpp.execution     |   5 +
 .../pure2-types-inheritance.cpp.output        |   0
 ...der-independence-and-nesting.cpp.execution |   5 +
 ...-order-independence-and-nesting.cpp.output |   0
 ...-ordering-via-meta-functions.cpp.execution |   1 +
 ...pes-ordering-via-meta-functions.cpp.output |   0
 ...nd-that-1-provide-everything.cpp.execution |   8 +
 ...f-and-that-1-provide-everything.cpp.output |   0
 ...ide-mvconstruct-and-cpassign.cpp.execution |   8 +
 ...rovide-mvconstruct-and-cpassign.cpp.output |   0
 ...ide-mvconstruct-and-mvassign.cpp.execution |   8 +
 ...rovide-mvconstruct-and-mvassign.cpp.output |   0
 ...rovide-cpassign-and-mvassign.cpp.execution |   8 +
 ...4-provide-cpassign-and-mvassign.cpp.output |   0
 ...ide-nothing-but-general-case.cpp.execution |   8 +
 ...rovide-nothing-but-general-case.cpp.output |   0
 .../pure2-types-that-parameters.cpp.execution |   7 +
 .../pure2-types-that-parameters.cpp.output    |   0
 ...lue-types-via-meta-functions.cpp.execution |   1 +
 ...-value-types-via-meta-functions.cpp.output |   0
 ...s-member-access-and-chaining.cpp.execution |   0
 ...ufcs-member-access-and-chaining.cpp.output |   0
 .../pure2-union.cpp.execution                 |   4 +
 .../pure2-union.cpp.output                    |   0
 .../pure2-variadics.cpp.execution             |   7 +
 .../pure2-variadics.cpp.output                |   0
 ...ure2-various-string-literals.cpp.execution |   0
 .../pure2-various-string-literals.cpp.output  |   0
 .../test-results/clang-18-c++23-libcpp/xyzzy  |   1 +
 .../pure2-regex_01_char_matcher.cpp.output    |   1 +
 .../pure2-regex_02_ranges.cpp.output          |   1 +
 .../pure2-regex_03_wildcard.cpp.output        |   1 +
 .../pure2-regex_04_start_end.cpp.output       |   1 +
 .../pure2-regex_05_classes.cpp.output         |   1 +
 .../pure2-regex_06_boundaries.cpp.output      |   1 +
 .../pure2-regex_07_short_classes.cpp.output   |   1 +
 .../pure2-regex_08_alternatives.cpp.output    |   1 +
 .../pure2-regex_09_groups.cpp.output          |   1 +
 .../pure2-regex_10_escapes.cpp.output         |   1 +
 ...pure2-regex_11_group_references.cpp.output |   1 +
 ...pure2-regex_12_case_insensitive.cpp.output |   1 +
 ...re2-regex_13_posessive_modifier.cpp.output |   1 +
 ...re2-regex_14_multiline_modifier.cpp.output |   1 +
 .../pure2-regex_15_group_modifiers.cpp.output |   1 +
 ...2-regex_16_perl_syntax_modifier.cpp.output |   1 +
 .../pure2-regex_17_comments.cpp.output        |   1 +
 .../pure2-regex_18_branch_reset.cpp.output    |   1 +
 .../pure2-regex_19_lookahead.cpp.output       |   1 +
 .../pure2-regex_10_escapes.cpp.execution      |   4 +-
 .../pure2-regex_10_escapes.cpp.output         |   3 -
 312 files changed, 1933 insertions(+), 5 deletions(-)
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/clang-version.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.orig
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-with-typeof-of-template-arg-list.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-with-typeof-of-template-arg-list.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-postfix-expression-custom-formatting.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-postfix-expression-custom-formatting.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-name-lookup-and-value-decoration.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-name-lookup-and-value-decoration.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-function-expression.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-function-expression.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-initialization.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-initialization.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-optional-template-argument-list.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-optional-template-argument-list.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp copy.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp copy.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp copy.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp copy.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp copy.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp copy.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp copy.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp copy.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-unbraced-function-expression.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-unbraced-function-expression.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-variable-template.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-variable-template.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-concept-definition.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-concept-definition.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio-with-raii.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio-with-raii.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-comma-assert.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-comma-assert.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-commas.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-commas.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-ufcs-member-access-and-chaining.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-ufcs-member-access-and-chaining.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-various-string-literals.cpp.execution
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/pure2-various-string-literals.cpp.output
 create mode 100644 regression-tests/test-results/clang-18-c++23-libcpp/xyzzy

diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/clang-version.output b/regression-tests/test-results/clang-18-c++23-libcpp/clang-version.output
new file mode 100644
index 0000000000..3e808daf9b
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/clang-version.output
@@ -0,0 +1,4 @@
+Ubuntu clang version 18.1.3 (1)
+Target: x86_64-pc-linux-gnu
+Thread model: posix
+InstalledDir: /usr/bin
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.execution
new file mode 100644
index 0000000000..802992c422
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.execution
@@ -0,0 +1 @@
+Hello world
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-allcpp1-hello.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution
new file mode 100644
index 0000000000..5e2c9d82ef
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.execution
@@ -0,0 +1,60 @@
+v as X< 0> = 0
+v as X< 1> = 1
+v as X< 2> = 2
+v as X< 3> = 3
+v as X< 4> = 4
+v as X< 5> = 5
+v as X< 6> = 6
+v as X< 7> = 7
+v as X< 8> = 8
+v as X< 9> = 9
+v as X<10> = 10
+v as X<11> = 11
+v as X<12> = 12
+v as X<13> = 13
+v as X<14> = 14
+v as X<15> = 15
+v as X<16> = 16
+v as X<17> = 17
+v as X<18> = 18
+v as X<19> = 19
+as_const(v) as X< 0> = 0
+as_const(v) as X< 1> = 1
+as_const(v) as X< 2> = 2
+as_const(v) as X< 3> = 3
+as_const(v) as X< 4> = 4
+as_const(v) as X< 5> = 5
+as_const(v) as X< 6> = 6
+as_const(v) as X< 7> = 7
+as_const(v) as X< 8> = 8
+as_const(v) as X< 9> = 9
+as_const(v) as X<10> = 10
+as_const(v) as X<11> = 11
+as_const(v) as X<12> = 12
+as_const(v) as X<13> = 13
+as_const(v) as X<14> = 14
+as_const(v) as X<15> = 15
+as_const(v) as X<16> = 16
+as_const(v) as X<17> = 17
+as_const(v) as X<18> = 18
+as_const(v) as X<19> = 19
+move(v) as X< 0> = 0
+move(v) as X< 1> = 1
+move(v) as X< 2> = 2
+move(v) as X< 3> = 3
+move(v) as X< 4> = 4
+move(v) as X< 5> = 5
+move(v) as X< 6> = 6
+move(v) as X< 7> = 7
+move(v) as X< 8> = 8
+move(v) as X< 9> = 9
+move(v) as X<10> = 10
+move(v) as X<11> = 11
+move(v) as X<12> = 12
+move(v) as X<13> = 13
+move(v) as X<14> = 14
+move(v) as X<15> = 15
+move(v) as X<16> = 16
+move(v) as X<17> = 17
+move(v) as X<18> = 18
+move(v) as X<19> = 19
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-as-for-variant-20-types.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution
new file mode 100644
index 0000000000..8474b91594
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution
@@ -0,0 +1 @@
+Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution
new file mode 100644
index 0000000000..6330ca570f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.execution
@@ -0,0 +1,5 @@
+1
+44
+45
+46
+5
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert-2.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution
new file mode 100644
index 0000000000..776dc1460f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution
@@ -0,0 +1 @@
+Bounds safety violation
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-cpp2-comment-cpp1-sequence.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-literal-as-nttp.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp copy.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.orig b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.orig
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej
new file mode 100644
index 0000000000..1dd32b2bae
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bugfix-for-ufcs-non-local.cpp.output.rej
@@ -0,0 +1,64 @@
+--- test-results/clang-18-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
++++ test-results/clang-18-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
+@@ -1,41 +1,41 @@
+ In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
+-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
+- 1135 | [LAMBDADEFCAPT]< \
++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
++ 1136 | [LAMBDADEFCAPT]< \
+       | ^
+-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
+- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
++ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+       |                                                           ^~~~~~~~~~
+ mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+ mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
+-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
+- 1135 | [LAMBDADEFCAPT]< \
++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
++ 1136 | [LAMBDADEFCAPT]< \
+       | ^
+-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
+- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
++ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+       |                                                           ^~~~~~~~~~
+ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
+-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
+- 1135 | [LAMBDADEFCAPT]< \
++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
++ 1136 | [LAMBDADEFCAPT]< \
+       | ^
+-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
+- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
++ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+       |                                                           ^~~~~~~~~~
+ mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+ mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
+-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
+- 1135 | [LAMBDADEFCAPT]< \
++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
++ 1136 | [LAMBDADEFCAPT]< \
+       | ^
+-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
+- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
++ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+       |                                                           ^~~~~~~~~~
+ mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+ mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
+-../../../include/cpp2util.h:1135:1: error: lambda-expression in template parameter type
+- 1135 | [LAMBDADEFCAPT]< \
++../../../include/cpp2util.h:1136:1: error: lambda-expression in template parameter type
++ 1136 | [LAMBDADEFCAPT]< \
+       | ^
+-../../../include/cpp2util.h:1172:59: note: in expansion of macro ‘CPP2_UFCS_’
+- 1172 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
++../../../include/cpp2util.h:1173:59: note: in expansion of macro ‘CPP2_UFCS_’
++ 1173 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+       |                                                           ^~~~~~~~~~
+ mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+ mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution
new file mode 100644
index 0000000000..dfca5b9a34
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.execution
@@ -0,0 +1,4 @@
+hello
+2022
+hello-ish
+2022-ish
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-captures-in-expressions-and-postconditions.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.execution
new file mode 100644
index 0000000000..98b5204b6d
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.execution
@@ -0,0 +1,4 @@
+1 "test"
+0 ""
+1 "test"
+0 ""
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-default-arguments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution
new file mode 100644
index 0000000000..3122e6030c
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.execution
@@ -0,0 +1,4 @@
+true
+false
+"test.exe"
+true
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-fixed-type-aliases.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.execution
new file mode 100644
index 0000000000..6b15b12bcc
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.execution
@@ -0,0 +1,72 @@
+123
+123
+123
+123
+123
+123
+123456
+123
+123
+123
+123
+123
+123
+123456
+123456
+123456
+456
+456
+1e+10
+1e+10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
+123456
+123456
+456
+456
+1e+10
+1e+10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
+123
+123
+123
+123
+123
+123
+123456
+123
+123
+123
+123
+123
+123
+123456
+123456
+456
+1e+10
+1e+10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
+123456
+456
+1e+10
+1e+10
+1e-10
+1e-10
+1e-10
+1e-10
+1e-10
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-float-literals.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.execution
new file mode 100644
index 0000000000..952feac3bb
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.execution
@@ -0,0 +1,12 @@
++X 1
++X 2
+copy X 1
+copy X 2
+copy X 1
+move X 2
++X 3
++X 4
+copy X 3
+copy X 4
+move X 3
+move X 4
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-forwarding.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution
new file mode 100644
index 0000000000..728fbcc8fd
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.execution
@@ -0,0 +1,2 @@
+hello-ish maybe
+2022-ish maybe
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-for-each.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution
new file mode 100644
index 0000000000..dfca5b9a34
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.execution
@@ -0,0 +1,4 @@
+hello
+2022
+hello-ish
+2022-ish
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each-with-capture.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution
new file mode 100644
index 0000000000..dfca5b9a34
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.execution
@@ -0,0 +1,4 @@
+hello
+2022
+hello-ish
+2022-ish
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-and-std-ranges-for-each.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution
new file mode 100644
index 0000000000..e9d6a083f6
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.execution
@@ -0,0 +1,6 @@
+
+hello
+
+2023
+hello-ish
+2023-ish
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-pointer-capture.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution
new file mode 100644
index 0000000000..137aaec33f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.execution
@@ -0,0 +1,6 @@
+
+hello
+
+2022
+hello-ish
+2022-ish
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-function-expression-with-repeated-capture.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.execution
new file mode 100644
index 0000000000..c8848197e7
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.execution
@@ -0,0 +1 @@
+Hello [world]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-hello.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.execution
new file mode 100644
index 0000000000..6f42aeb322
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.execution
@@ -0,0 +1,2 @@
+12234
+12234
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-increment-decrement.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution
new file mode 100644
index 0000000000..e16104fe58
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -0,0 +1 @@
+Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.execution
new file mode 100644
index 0000000000..b261dd86ca
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.execution
@@ -0,0 +1 @@
+>> [xyzzy]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.execution
new file mode 100644
index 0000000000..03cdf50b75
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.execution
@@ -0,0 +1,8 @@
+inspected vec : std::vector
+inspected arr : std::array
+inspected var : std::variant
+inspected myt : my_type
+inspected vec : std::vector
+inspected arr : std::array
+inspected var : std::variant
+inspected myt : my_type
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-templates.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.execution
new file mode 100644
index 0000000000..8372eadcae
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.execution
@@ -0,0 +1,5 @@
+i is between 11 and 20
+less than 20
+i is between 10 and 30
+v is empty
+v is empty
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values-2.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.execution
new file mode 100644
index 0000000000..e7130e0f8d
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.execution
@@ -0,0 +1,12 @@
+rev dodgson
+(no match)
+the answer
+zero
+plugh
+zero
+1 or 2
+1 or 2
+3
+integer -42
+xyzzy
+(no match)
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-values.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-with-typeof-of-template-arg-list.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-with-typeof-of-template-arg-list.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-with-typeof-of-template-arg-list.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-inspect-with-typeof-of-template-arg-list.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution
new file mode 100644
index 0000000000..984a60a83a
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.execution
@@ -0,0 +1,7 @@
+>> hello
+>> big
+>> world
+  **  **  **
+>> [hello]
+>> [big]
+>> [world]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-example-three-loops.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution
new file mode 100644
index 0000000000..05961867a6
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.execution
@@ -0,0 +1,5 @@
+1 42
+2 84
+3 168
+4 336
+5 672
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-intro-for-with-counter-include-last.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution
new file mode 100644
index 0000000000..f4dd62312e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -0,0 +1 @@
+sending error to my framework... [dynamic null dereference attempt detected]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution
new file mode 100644
index 0000000000..7ee4d37b20
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.execution
@@ -0,0 +1 @@
+>> 42
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-pointer-init-4.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.execution
new file mode 100644
index 0000000000..b3fc65a7ca
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.execution
@@ -0,0 +1,2 @@
+a is 10
+b is xyzzy
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-multiple-return-values.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.execution
new file mode 100644
index 0000000000..df8e3e4ff2
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.execution
@@ -0,0 +1,21 @@
+enter main
+enter f00
+enter f01
++X 1
+exit f01
+-X 1
+exit f00
+
+enter f10
+enter f11
+enter f12
+enter f13
+enter f14
++X 2
+exit f14
+exit f13
+exit f12
+-X 2
+exit f11
+exit f10
+exit main
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-out-destruction.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution
new file mode 100644
index 0000000000..982a789cfc
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.execution
@@ -0,0 +1,2 @@
+42
+exxxx
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-generic-out.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing-with-forward.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-parameter-passing.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution
new file mode 100644
index 0000000000..a17035edae
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.execution
@@ -0,0 +1,2 @@
+xyzzy and plugh
+xyzzyplugh
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postexpression-with-capture.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postfix-expression-custom-formatting.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postfix-expression-custom-formatting.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postfix-expression-custom-formatting.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-postfix-expression-custom-formatting.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.execution
new file mode 100644
index 0000000000..eebb290a98
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.execution
@@ -0,0 +1,17 @@
+a = 2, b = (empty)
+a^2 + b = 46
+sv = my string_view
+osv = (empty)
+osv = string literal bound to optional string_view
+var = (empty)
+var = abracadabra
+var = 2.718280
+mypair = (12, 3.400000)
+tup1 = (12)
+tup2 = (12, 3.400000)
+tup3 = (12, 3.400000, 456)
+p = (first, (empty))
+t = (3.140000, (empty), (empty))
+vv = 0
+vv = (1, 2.300000)
+custom = (customize me - no cpp2::to_string overload exists for this type)
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-string-interpolation.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.execution
new file mode 100644
index 0000000000..59967f29d5
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.execution
@@ -0,0 +1,3 @@
+11
+12
+13*14 is 182
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-test-parens.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.execution
new file mode 100644
index 0000000000..f1a0d084eb
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.execution
@@ -0,0 +1,6 @@
+1.1 is int? false
+1   is int? true
+
+s* is Shape?  true
+s* is Circle? true
+s* is Square? false
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-type-safety-1.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution
new file mode 100644
index 0000000000..dec75369fb
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.execution
@@ -0,0 +1,2 @@
+rain
+rain
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-ufcs-multiple-template-arguments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output
new file mode 100644
index 0000000000..ba14d38487
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output
@@ -0,0 +1,27 @@
+pure2-assert-expected-not-null.cpp2:7:22: error: expected '(' for function-style cast or type construction
+    7 |     std::expected ex {4}; 
+      |                   ~~~^
+pure2-assert-expected-not-null.cpp2:7:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'?
+    7 |     std::expected ex {4}; 
+      |     ~~~~~^~~~~~~~
+      |          unexpected
+/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here
+  110 |   void unexpected() __attribute__ ((__noreturn__,__cold__));
+      |        ^
+pure2-assert-expected-not-null.cpp2:9:193: error: use of undeclared identifier 'ex'
+    9 |     return *cpp2::impl::assert_not_null(cpp2::move(up)) + *cpp2::impl::assert_not_null(cpp2::move(sp)) + *cpp2::impl::assert_not_null(cpp2::move(op)) + *cpp2::impl::assert_not_null(cpp2::move(ex)); 
+      |                                                                                                                                                                                                 ^
+pure2-assert-expected-not-null.cpp2:14:22: error: expected '(' for function-style cast or type construction
+   14 |     std::expected ex {std::unexpected(false)}; 
+      |                   ~~~^
+pure2-assert-expected-not-null.cpp2:14:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'?
+   14 |     std::expected ex {std::unexpected(false)}; 
+      |     ~~~~~^~~~~~~~
+      |          unexpected
+/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here
+  110 |   void unexpected() __attribute__ ((__noreturn__,__cold__));
+      |        ^
+pure2-assert-expected-not-null.cpp2:15:52: error: use of undeclared identifier 'ex'
+   15 |     return *cpp2::impl::assert_not_null(cpp2::move(ex)); 
+      |                                                    ^
+6 errors generated.
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution
new file mode 100644
index 0000000000..c6aeba0fde
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution
@@ -0,0 +1 @@
+Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution
new file mode 100644
index 0000000000..85aafbe6a1
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -0,0 +1 @@
+Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution
new file mode 100644
index 0000000000..af633d171a
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -0,0 +1 @@
+Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.execution
new file mode 100644
index 0000000000..3a0304fa2f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.execution
@@ -0,0 +1,3 @@
+>> decorated
+>> hello
+>> world
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bounds-safety-span.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.execution
new file mode 100644
index 0000000000..c8af55771f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.execution
@@ -0,0 +1,26 @@
+while_continue_inner:
+  00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer 
+while_continue_outer:
+  00 inner 01 10 inner 11 20 inner 21 
+while_break_inner:
+  00 inner 01 outer 10 inner 11 outer 20 inner 21 outer 
+while_break_outer:
+  00 inner 01 
+
+do_continue_inner:
+  00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer 
+do_continue_outer:
+  00 inner 01 10 inner 11 20 inner 21 
+do_break_inner:
+  00 inner 01 outer 10 inner 11 outer 20 inner 21 outer 
+do_break_outer:
+  00 inner 01 
+
+for_continue_inner:
+  00 inner 01 02 inner outer 10 inner 11 12 inner outer 20 inner 21 22 inner outer 
+for_continue_outer:
+  00 inner 01 10 inner 11 20 inner 21 
+for_break_inner:
+  00 inner 01 outer 10 inner 11 outer 20 inner 21 outer 
+for_break_outer:
+  00 inner 01 
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-break-continue.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-assign-expression-list.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-discard-precedence.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-indexed-call.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-max-munch.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution
new file mode 100644
index 0000000000..566837e51b
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.execution
@@ -0,0 +1,2 @@
+(out this, that)
+(out this, that)
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-memberwise-base-assignment.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-name-lookup-and-value-decoration.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-name-lookup-and-value-decoration.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-name-lookup-and-value-decoration.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-name-lookup-and-value-decoration.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-function-expression.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-function-expression.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-function-expression.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-function-expression.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-initialization.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-initialization.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-initialization.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-non-local-initialization.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-optional-template-argument-list.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-optional-template-argument-list.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-optional-template-argument-list.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-optional-template-argument-list.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-in-forward-declaration.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-requires-clause-unbraced-function-initializer.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution
new file mode 100644
index 0000000000..c508d5366f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.execution
@@ -0,0 +1 @@
+false
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-template-argument.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp copy.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp copy.execution
new file mode 100644
index 0000000000..0e41b78197
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp copy.execution	
@@ -0,0 +1,4 @@
+0123456789
+9
+0123456789
+9
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp copy.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp copy.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution
new file mode 100644
index 0000000000..0e41b78197
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.execution
@@ -0,0 +1,4 @@
+0123456789
+9
+0123456789
+9
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-arguments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp copy.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp copy.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp copy.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp copy.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-name-lookup.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp copy.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp copy.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp copy.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp copy.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-noexcept.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp copy.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp copy.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp copy.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp copy.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-ufcs-sfinae.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-unbraced-function-expression.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-unbraced-function-expression.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-unbraced-function-expression.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-unbraced-function-expression.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-variable-template.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-variable-template.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-variable-template.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-bugfix-for-variable-template.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.execution
new file mode 100644
index 0000000000..b41a1bf751
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.execution
@@ -0,0 +1,27 @@
+0 0 0: true false false
+0 0 1: false false false
+0 0 2: false false false
+0 1 0: false false false
+0 1 1: false true false
+0 1 2: false true false
+0 2 0: false false false
+0 2 1: false false false
+0 2 2: false true false
+1 0 0: false false false
+1 0 1: false false false
+1 0 2: false false false
+1 1 0: false false true
+1 1 1: true false false
+1 1 2: false false false
+1 2 0: false false false
+1 2 1: false false false
+1 2 2: false true false
+2 0 0: false false false
+2 0 1: false false false
+2 0 2: false false false
+2 1 0: false false true
+2 1 1: false false false
+2 1 2: false false false
+2 2 0: false false true
+2 2 1: false false true
+2 2 2: true false false
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-chained-comparisons.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-concept-definition.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-concept-definition.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-concept-definition.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-concept-definition.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.execution
new file mode 100644
index 0000000000..e8a01cd985
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.execution
@@ -0,0 +1,3 @@
+1
+2
+4
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-contracts.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution
new file mode 100644
index 0000000000..9ff8245473
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.execution
@@ -0,0 +1 @@
+less
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-defaulted-comparisons-and-final-types.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.execution
new file mode 100644
index 0000000000..6d9a33c28e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.execution
@@ -0,0 +1,29 @@
+x.to_string() is clubs
+x2.to_string() is clubs
+with if else: clubs
+with inspect: clubs
+
+file_attributes::cached.get_raw_value() is 1
+file_attributes::current.get_raw_value() is 2
+file_attributes::obsolete.get_raw_value() is 4
+file_attributes::cached_and_current.get_raw_value() is 3
+f. get_raw_value() is 1
+f2.get_raw_value() is 1
+f  is (cached)
+f2 is (cached)
+f2 is (none)
+f2 is (cached)
+f. get_raw_value() is 1
+f2.get_raw_value() is 1
+f  is (f2) is true
+f2 is (f ) is true
+
+f  is (cached, current, obsolete, cached_and_current)
+f2 is (cached, current, cached_and_current)
+f. get_raw_value() is 7
+f2.get_raw_value() is 3
+f  == f2   is false
+f  is (f2) is false
+f2 is (f ) is false
+(f & f2) == f2 is true
+inspecting f: includes all f2's flags ('cached' and 'current')
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-enum.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution
new file mode 100644
index 0000000000..19b3a90b27
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.execution
@@ -0,0 +1 @@
+12345123451234512345
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-for-loop-range-with-lambda.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.execution
new file mode 100644
index 0000000000..f259f23629
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.execution
@@ -0,0 +1,2 @@
+4
+42
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-forward-return.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution
new file mode 100644
index 0000000000..8baef1b4ab
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.execution
@@ -0,0 +1 @@
+abc
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-function-multiple-forward-arguments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.execution
new file mode 100644
index 0000000000..c8848197e7
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.execution
@@ -0,0 +1 @@
+Hello [world]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-hello.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.execution
@@ -0,0 +1 @@
+1
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-initialization-safety-with-else-if.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution
new file mode 100644
index 0000000000..fd5a6cdffe
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.execution
@@ -0,0 +1,8 @@
+                        double value is not an int or string
+     variant value is not an int or string
+                           any value is "xyzzy"
+                 optional value is not an int or string
+                           int value is integer 42
+     variant value is integer 1
+                           any value is integer 2
+                 optional value is integer 3
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-in-generic-function-multiple-types.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution
new file mode 100644
index 0000000000..3cd874b4e0
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.execution
@@ -0,0 +1,3 @@
+                        syzygy value is not an int
+                             1 value is 1
+                      1.100000 value is not an int
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-expression-with-as-in-generic-function.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution
new file mode 100644
index 0000000000..a5cbcefe9c
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.execution
@@ -0,0 +1,11 @@
+
+All these cases satisfy "matches std::string"
+
+variant
+    ... matches std::string
+
+string
+    ... matches std::string
+
+optional
+    ... matches std::string
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-fallback-with-variant-any-optional.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution
new file mode 100644
index 0000000000..a2df8769d5
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.execution
@@ -0,0 +1,17 @@
+
+All these cases satisfy "VOYDE AND EMPTIE"
+
+unique_ptr
+    ... VOYDE AND EMPTIE
+
+vector::iterator
+    ... VOYDE AND EMPTIE
+
+variant
+    ... VOYDE AND EMPTIE
+
+any
+    ... VOYDE AND EMPTIE
+
+optional
+    ... VOYDE AND EMPTIE
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-inspect-generic-void-empty-with-variant-any-optional.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.execution
new file mode 100644
index 0000000000..aeae302741
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.execution
@@ -0,0 +1,13 @@
+g0g0g
+0g0g
+0g0
+00
+"0"
+"0
+"
+
+pl(ug$h
+0pl(ug$h
+Dog kennel           color mauve      price 3.14       in stock = true
+Dog kennel           color mauve      price 3.14       in stock = true
+complex: (1.2,3.4)
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-interpolation.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution
new file mode 100644
index 0000000000..8e8c5ee29e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.execution
@@ -0,0 +1,2 @@
+>> [hello] - length 7
+>> [2022] - length 6
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-hello-2022.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution
new file mode 100644
index 0000000000..c218d85dfc
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.execution
@@ -0,0 +1,8 @@
+>> hello
+>> big
+>> world
+  **  **  **
+>> [hello]
+>> [big]
+>> [world]
+>> end of program
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-intro-example-three-loops.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution
new file mode 100644
index 0000000000..c8a07e4300
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.execution
@@ -0,0 +1,6 @@
+3.140000 is double bigger than 3
+3.140000 is bigger than 3
+42 is integer bigger than 3
+42 is bigger than 3
+a is integer bigger than 3
+a is bigger than 3
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-free-functions-predicate.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution
new file mode 100644
index 0000000000..c8a07e4300
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.execution
@@ -0,0 +1,6 @@
+3.140000 is double bigger than 3
+3.140000 is bigger than 3
+42 is integer bigger than 3
+42 is bigger than 3
+a is integer bigger than 3
+a is bigger than 3
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-unnamed-predicates.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution
new file mode 100644
index 0000000000..a9bc0680a0
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.execution
@@ -0,0 +1,9 @@
+3.14: unknown
+42: 42
+WithOp(): unknown
+WithGenOp(): unknown
+Cmp(): comparable
+std::string("text"): text
+"text": text
+std::string_view("text"): text
+:std::vector = ('t','e','x','t','\0'): unknown
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-is-with-variable-and-value.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.execution
new file mode 100644
index 0000000000..4632e068d5
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.execution
@@ -0,0 +1 @@
+123456
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-last-use.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution
new file mode 100644
index 0000000000..871727de1f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.execution
@@ -0,0 +1 @@
+84
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-look-up-parameter-across-unnamed-function.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.execution
new file mode 100644
index 0000000000..bd992e432c
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.execution
@@ -0,0 +1,2 @@
+args.argc            is 1
+args.argv[0]         is test.exe
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-main-args.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.execution
new file mode 100644
index 0000000000..e37d6cb216
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.execution
@@ -0,0 +1,2 @@
+yes, less
+yes, always
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-more-wildcards.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.execution
new file mode 100644
index 0000000000..4e4b4573dd
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.execution
@@ -0,0 +1,2 @@
+43
+forty-and-three
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-print.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution
new file mode 100644
index 0000000000..c48e2bd603
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.execution
@@ -0,0 +1,17 @@
+this is a string
+raw string without interpolation
+this is raw string literal
+
+that can last for multiple
+
+lines
+this is raw string literal
+that can last for multiple
+lines
+42 R"(this can be added too)"
+calculations like m["one"] + m["two"] = 3 also works
+at the beginning of the line!!!
+
+
+    4242
+1.2.0.42
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-raw-string-literal-and-interpolation.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution
new file mode 100644
index 0000000000..af124736ec
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.execution
@@ -0,0 +1,14 @@
+Running tests_01_char_matcher:
+01_y: OK regex: abc parsed_regex: abc str: abc result_expr: $& expected_results abc
+02_y: OK regex: abc parsed_regex: abc str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: abc parsed_regex: abc str: abc result_expr: $+[0] expected_results 3
+04_n: OK regex: abc parsed_regex: abc str: xbc result_expr: - expected_results -
+05_n: OK regex: abc parsed_regex: abc str: axc result_expr: - expected_results -
+06_n: OK regex: abc parsed_regex: abc str: abx result_expr: - expected_results -
+07_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $& expected_results abc
+08_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $-[0] expected_results 1
+09_y: OK regex: abc parsed_regex: abc str: xabcy result_expr: $+[0] expected_results 4
+10_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $& expected_results abc
+11_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $-[0] expected_results 2
+12_y: OK regex: abc parsed_regex: abc str: ababc result_expr: $+[0] expected_results 5
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_01_char_matcher.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution
new file mode 100644
index 0000000000..dc0b360024
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.execution
@@ -0,0 +1,42 @@
+Running tests_02_ranges:
+01_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $& expected_results abc
+02_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $-[0] expected_results 0
+03_y: OK regex: ab*c parsed_regex: ab*c str: abc result_expr: $+[0] expected_results 3
+04_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $& expected_results abc
+05_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $-[0] expected_results 0
+06_y: OK regex: ab*bc parsed_regex: ab*bc str: abc result_expr: $+[0] expected_results 3
+07_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $& expected_results abbc
+08_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $-[0] expected_results 0
+09_y: OK regex: ab*bc parsed_regex: ab*bc str: abbc result_expr: $+[0] expected_results 4
+10_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $& expected_results abbbbc
+11_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: ab*bc parsed_regex: ab*bc str: abbbbc result_expr: $+[0] expected_results 6
+13_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $& expected_results abbbbc
+14_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $-[0] expected_results 0
+15_y: OK regex: ab{0,}bc parsed_regex: ab{0,}bc str: abbbbc result_expr: $+[0] expected_results 6
+16_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $& expected_results abbc
+17_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $-[0] expected_results 0
+18_y: OK regex: ab+bc parsed_regex: ab+bc str: abbc result_expr: $+[0] expected_results 4
+19_n: OK regex: ab+bc parsed_regex: ab+bc str: abc result_expr: - expected_results -
+20_n: OK regex: ab+bc parsed_regex: ab+bc str: abq result_expr: - expected_results -
+21_n: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abq result_expr: - expected_results -
+22_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $& expected_results abbbbc
+23_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $-[0] expected_results 0
+24_y: OK regex: ab+bc parsed_regex: ab+bc str: abbbbc result_expr: $+[0] expected_results 6
+25_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $& expected_results abbbbc
+26_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $-[0] expected_results 0
+27_y: OK regex: ab{1,}bc parsed_regex: ab{1,}bc str: abbbbc result_expr: $+[0] expected_results 6
+28_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $& expected_results abbbbc
+29_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $-[0] expected_results 0
+30_y: OK regex: ab{1,3}bc parsed_regex: ab{1,3}bc str: abbbbc result_expr: $+[0] expected_results 6
+31_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $& expected_results abbbbc
+32_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $-[0] expected_results 0
+33_y: OK regex: ab{3,4}bc parsed_regex: ab{3,4}bc str: abbbbc result_expr: $+[0] expected_results 6
+34_n: OK regex: ab{4,5}bc parsed_regex: ab{4,5}bc str: abbbbc result_expr: - expected_results -
+35_y: OK regex: ab?bc parsed_regex: ab?bc str: abbc result_expr: $& expected_results abbc
+36_y: OK regex: ab?bc parsed_regex: ab?bc str: abc result_expr: $& expected_results abc
+37_y: OK regex: ab{0,1}bc parsed_regex: ab{0,1}bc str: abc result_expr: $& expected_results abc
+38_n: OK regex: ab?bc parsed_regex: ab?bc str: abbbbc result_expr: - expected_results -
+39_y: OK regex: ab?c parsed_regex: ab?c str: abc result_expr: $& expected_results abc
+40_y: OK regex: ab{0,1}c parsed_regex: ab{0,1}c str: abc result_expr: $& expected_results abc
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_02_ranges.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution
new file mode 100644
index 0000000000..f3f0ea9cce
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.execution
@@ -0,0 +1,22 @@
+Running tests_03_wildcard:
+01_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $& expected_results a
+02_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK regex: .{1} parsed_regex: .{1} str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $& expected_results abbb
+05_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK regex: .{3,4} parsed_regex: .{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $& expected_results a
+08_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $-[0] expected_results 0
+09_y: OK regex: \N{1} parsed_regex: \N{1} str: abbbbc result_expr: $+[0] expected_results 1
+10_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $& expected_results abbb
+11_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $-[0] expected_results 0
+12_y: OK regex: \N{3,4} parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+13_y: OK Warning: Parsed regex does not match. regex: \N{ 3 , 4 } parsed_regex: \N{3,4} str: abbbbc result_expr: $+[0] expected_results 4
+14_y: OK regex: a.c parsed_regex: a.c str: abc result_expr: $& expected_results abc
+15_y: OK regex: a.c parsed_regex: a.c str: axc result_expr: $& expected_results axc
+16_y: OK regex: a\Nc parsed_regex: a\Nc str: abc result_expr: $& expected_results abc
+17_y: OK regex: a.*c parsed_regex: a.*c str: axyzc result_expr: $& expected_results axyzc
+18_y: OK regex: a\N*c parsed_regex: a\N*c str: axyzc result_expr: $& expected_results axyzc
+19_n: OK regex: a.*c parsed_regex: a.*c str: axyzd result_expr: - expected_results -
+20_n: OK regex: a\N*c parsed_regex: a\N*c str: axyzd result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_03_wildcard.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution
new file mode 100644
index 0000000000..6fef36434a
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.execution
@@ -0,0 +1,11 @@
+Running tests_04_start_end:
+01_y: OK regex: ^abc$ parsed_regex: ^abc$ str: abc result_expr: $& expected_results abc
+02_n: OK regex: ^abc$ parsed_regex: ^abc$ str: abcc result_expr: - expected_results -
+03_y: OK regex: ^abc parsed_regex: ^abc str: abcc result_expr: $& expected_results abc
+04_n: OK regex: ^abc$ parsed_regex: ^abc$ str: aabc result_expr: - expected_results -
+05_y: OK regex: abc$ parsed_regex: abc$ str: aabc result_expr: $& expected_results abc
+06_n: OK regex: abc$ parsed_regex: abc$ str: aabcd result_expr: - expected_results -
+07_y: OK regex: ^ parsed_regex: ^ str: abc result_expr: $& expected_results 
+08_y: OK regex: $ parsed_regex: $ str: abc result_expr: $& expected_results 
+09_n: OK regex: $b parsed_regex: $b str: b result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_04_start_end.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution
new file mode 100644
index 0000000000..306bf33955
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.execution
@@ -0,0 +1,21 @@
+Running tests_05_classes:
+01_n: OK regex: a[bc]d parsed_regex: a[bc]d str: abc result_expr: - expected_results -
+02_y: OK regex: a[bc]d parsed_regex: a[bc]d str: abd result_expr: $& expected_results abd
+03_y: OK regex: a[b]d parsed_regex: a[b]d str: abd result_expr: $& expected_results abd
+04_y: OK regex: [a][b][d] parsed_regex: [a][b][d] str: abd result_expr: $& expected_results abd
+05_y: OK regex: .[b]. parsed_regex: .[b]. str: abd result_expr: $& expected_results abd
+06_n: OK regex: .[b]. parsed_regex: .[b]. str: aBd result_expr: - expected_results -
+07_n: OK regex: a[b-d]e parsed_regex: a[b-d]e str: abd result_expr: - expected_results -
+08_y: OK regex: a[b-d]e parsed_regex: a[b-d]e str: ace result_expr: $& expected_results ace
+09_y: OK regex: a[b-d] parsed_regex: a[b-d] str: aac result_expr: $& expected_results ac
+10_y: OK regex: a[-b] parsed_regex: a[-b] str: a- result_expr: $& expected_results a-
+11_y: OK regex: a[b-] parsed_regex: a[b-] str: a- result_expr: $& expected_results a-
+12_y: OK regex: a] parsed_regex: a] str: a] result_expr: $& expected_results a]
+13_y: OK regex: a[]]b parsed_regex: a[]]b str: a]b result_expr: $& expected_results a]b
+14_y: OK regex: a[^bc]d parsed_regex: a[^bc]d str: aed result_expr: $& expected_results aed
+15_n: OK regex: a[^bc]d parsed_regex: a[^bc]d str: abd result_expr: - expected_results -
+16_y: OK regex: a[^-b]c parsed_regex: a[^-b]c str: adc result_expr: $& expected_results adc
+17_n: OK regex: a[^-b]c parsed_regex: a[^-b]c str: a-c result_expr: - expected_results -
+18_n: OK regex: a[^]b]c parsed_regex: a[^]b]c str: a]c result_expr: - expected_results -
+19_y: OK regex: a[^]b]c parsed_regex: a[^]b]c str: adc result_expr: $& expected_results adc
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_05_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution
new file mode 100644
index 0000000000..420a4c5876
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.execution
@@ -0,0 +1,19 @@
+Running tests_06_boundaries:
+01_y: OK regex: \ba\b parsed_regex: \ba\b str: a- result_expr: - expected_results -
+02_y: OK regex: \ba\b parsed_regex: \ba\b str: -a result_expr: - expected_results -
+03_y: OK regex: \ba\b parsed_regex: \ba\b str: -a- result_expr: - expected_results -
+04_n: OK regex: \by\b parsed_regex: \by\b str: xy result_expr: - expected_results -
+05_n: OK regex: \by\b parsed_regex: \by\b str: yz result_expr: - expected_results -
+06_n: OK regex: \by\b parsed_regex: \by\b str: xyz result_expr: - expected_results -
+07_n: OK regex: \Ba\B parsed_regex: \Ba\B str: a- result_expr: - expected_results -
+08_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a result_expr: - expected_results -
+09_n: OK regex: \Ba\B parsed_regex: \Ba\B str: -a- result_expr: - expected_results -
+10_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+11_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $-[0] expected_results 1
+12_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: $+[0] expected_results 2
+13_y: OK regex: \By\b parsed_regex: \By\b str: xy result_expr: - expected_results -
+14_y: OK regex: \by\B parsed_regex: \by\B str: yz result_expr: - expected_results -
+15_y: OK regex: \By\B parsed_regex: \By\B str: xyz result_expr: - expected_results -
+16_n: OK regex: \b parsed_regex: \b str:  result_expr: - expected_results -
+17_y: OK regex: \B parsed_regex: \B str:  result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_06_boundaries.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution
new file mode 100644
index 0000000000..519c05f921
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_07_short_classes:
+01_y: OK regex: \w parsed_regex: \w str: a result_expr: - expected_results -
+02_n: OK regex: \w parsed_regex: \w str: - result_expr: - expected_results -
+03_n: OK regex: \W parsed_regex: \W str: a result_expr: - expected_results -
+04_y: OK regex: \W parsed_regex: \W str: - result_expr: - expected_results -
+05_y: OK regex: a\sb parsed_regex: a\sb str: a b result_expr: - expected_results -
+06_n: OK regex: a\sb parsed_regex: a\sb str: a-b result_expr: - expected_results -
+07_n: OK regex: a\Sb parsed_regex: a\Sb str: a b result_expr: - expected_results -
+08_y: OK regex: a\Sb parsed_regex: a\Sb str: a-b result_expr: - expected_results -
+09_y: OK regex: \d parsed_regex: \d str: 1 result_expr: - expected_results -
+10_n: OK regex: \d parsed_regex: \d str: - result_expr: - expected_results -
+11_n: OK regex: \D parsed_regex: \D str: 1 result_expr: - expected_results -
+12_y: OK regex: \D parsed_regex: \D str: - result_expr: - expected_results -
+13_y: OK regex: [\w] parsed_regex: [\w] str: a result_expr: - expected_results -
+14_n: OK regex: [\w] parsed_regex: [\w] str: - result_expr: - expected_results -
+15_n: OK regex: [\W] parsed_regex: [\W] str: a result_expr: - expected_results -
+16_y: OK regex: [\W] parsed_regex: [\W] str: - result_expr: - expected_results -
+17_y: OK regex: a[\s]b parsed_regex: a[\s]b str: a b result_expr: - expected_results -
+18_n: OK regex: a[\s]b parsed_regex: a[\s]b str: a-b result_expr: - expected_results -
+19_n: OK regex: a[\S]b parsed_regex: a[\S]b str: a b result_expr: - expected_results -
+20_y: OK regex: a[\S]b parsed_regex: a[\S]b str: a-b result_expr: - expected_results -
+21_y: OK regex: [\d] parsed_regex: [\d] str: 1 result_expr: - expected_results -
+22_n: OK regex: [\d] parsed_regex: [\d] str: - result_expr: - expected_results -
+23_n: OK regex: [\D] parsed_regex: [\D] str: 1 result_expr: - expected_results -
+24_y: OK regex: [\D] parsed_regex: [\D] str: - result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_07_short_classes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution
new file mode 100644
index 0000000000..c12fd2afe3
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.execution
@@ -0,0 +1,4 @@
+Running tests_08_alternatives:
+01_y: OK regex: ab|cd parsed_regex: ab|cd str: abc result_expr: $& expected_results ab
+02_y: OK regex: ab|cd parsed_regex: ab|cd str: abcd result_expr: $& expected_results ab
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_08_alternatives.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution
new file mode 100644
index 0000000000..05df860f9e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.execution
@@ -0,0 +1,13 @@
+Running tests_09_groups:
+01_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $&-$1 expected_results ef-
+02_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[0] expected_results 1
+03_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[0] expected_results 3
+04_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $-[1] expected_results 1
+05_y: OK regex: ()ef parsed_regex: ()ef str: def result_expr: $+[1] expected_results 1
+06_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $&-$1-$2 expected_results a-a-a
+07_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-0
+08_y: OK regex: ((a)) parsed_regex: ((a)) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 1-1-1
+09_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $&-$1-$2 expected_results abc-a-c
+10_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $-[0]-$-[1]-$-[2] expected_results 0-0-2
+11_y: OK regex: (a)b(c) parsed_regex: (a)b(c) str: abc result_expr: $+[0]-$+[1]-$+[2] expected_results 3-1-3
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_09_groups.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution
new file mode 100644
index 0000000000..fe6e6efc96
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.execution
@@ -0,0 +1,39 @@
+Running tests_10_escapes:
+01_y: OK regex: a\(b parsed_regex: a\(b str: a(b result_expr: $&-$1 expected_results a(b-
+02_y: OK regex: a\(*b parsed_regex: a\(*b str: ab result_expr: $& expected_results ab
+03_y: OK regex: a\(*b parsed_regex: a\(*b str: a((b result_expr: $& expected_results a((b
+04_y: OK regex: a\\b parsed_regex: a\\b str: a\b result_expr: $& expected_results a\b
+05_y: OK regex: foo(\h+)bar parsed_regex: foo(\h+)bar str: foo	bar result_expr: $1 expected_results 	
+06_y: OK regex: (\H+)(\h) parsed_regex: (\H+)(\h) str: foo	bar result_expr: $1-$2 expected_results foo-	
+07_y: OK regex: (\h+)(\H) parsed_regex: (\h+)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
+09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
+10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
+
+bar result_expr: $1 expected_results 
+
+
+
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
+
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
+
+bar result_expr: $1-$2 expected_results 
+
+
+-b
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
+17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
+
bar result_expr: $& expected_results foo	
+
bar
+18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
+19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
+20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_10_escapes.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution
new file mode 100644
index 0000000000..724d0085a6
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.execution
@@ -0,0 +1,26 @@
+Running tests_11_group_references:
+01_y: OK regex: (foo)(\g-2) parsed_regex: (foo)(\g-2) str: foofoo result_expr: $1-$2 expected_results foo-foo
+02_y: OK regex: (foo)(\g-2)(foo)(\g-2) parsed_regex: (foo)(\g-2)(foo)(\g-2) str: foofoofoofoo result_expr: $1-$2-$3-$4 expected_results foo-foo-foo-foo
+03_y: OK regex: (([abc]+) \g-1)(([abc]+) \g{-1}) parsed_regex: (([abc]+) \g-1)(([abc]+) \g{-1}) str: abc abccba cba result_expr: $2-$4 expected_results abc-cba
+04_y: OK regex: (a)(b)(c)\g1\g2\g3 parsed_regex: (a)(b)(c)\g1\g2\g3 str: abcabc result_expr: $1$2$3 expected_results abc
+05_y: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+06_y: OK regex: /(?'n'foo) \g{ n }/ parsed_regex: /(?'n'foo) \g{ n }/ str: ..foo foo.. result_expr: $1 expected_results foo
+07_yM: OK regex: /(?'n'foo) \g{n}/ parsed_regex: /(?'n'foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+08_y: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $1 expected_results foo
+09_yM: OK regex: /(?foo) \g{n}/ parsed_regex: /(?foo) \g{n}/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+10_y: OK regex: /(?as) (\w+) \g{as} (\w+)/ parsed_regex: /(?as) (\w+) \g{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+11_y: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $1 expected_results foo
+12_yM: OK regex: /(?'n'foo) \k/ parsed_regex: /(?'n'foo) \k/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+13_y: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $1 expected_results foo
+14_yM: OK regex: /(?foo) \k'n'/ parsed_regex: /(?foo) \k'n'/ str: ..foo foo.. result_expr: $+{n} expected_results foo
+15_yM: OK regex: /(?'a1'foo) \k'a1'/ parsed_regex: /(?'a1'foo) \k'a1'/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+16_yM: OK regex: /(?foo) \k/ parsed_regex: /(?foo) \k/ str: ..foo foo.. result_expr: $+{a1} expected_results foo
+17_yM: OK regex: /(?'_'foo) \k'_'/ parsed_regex: /(?'_'foo) \k'_'/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+18_yM: OK regex: /(?<_>foo) \k<_>/ parsed_regex: /(?<_>foo) \k<_>/ str: ..foo foo.. result_expr: $+{_} expected_results foo
+19_yM: OK regex: /(?'_0_'foo) \k'_0_'/ parsed_regex: /(?'_0_'foo) \k'_0_'/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+20_yM: OK regex: /(?<_0_>foo) \k<_0_>/ parsed_regex: /(?<_0_>foo) \k<_0_>/ str: ..foo foo.. result_expr: $+{_0_} expected_results foo
+21_y: OK regex: /(?as) (\w+) \k (\w+)/ parsed_regex: /(?as) (\w+) \k (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+22_y: OK regex: /(?as) (\w+) \k{as} (\w+)/ parsed_regex: /(?as) (\w+) \k{as} (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+23_y: OK regex: /(?as) (\w+) \k'as' (\w+)/ parsed_regex: /(?as) (\w+) \k'as' (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+24_y: OK regex: /(?as) (\w+) \k{ as } (\w+)/ parsed_regex: /(?as) (\w+) \k{ as } (\w+)/ str: as easy as pie result_expr: $1-$2-$3 expected_results as-easy-pie
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_11_group_references.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution
new file mode 100644
index 0000000000..4939deb24e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.execution
@@ -0,0 +1,121 @@
+Running tests_12_case_insensitive:
+01_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABC result_expr: $& expected_results ABC
+02_n: OK regex: 'abc'i parsed_regex: 'abc'i str: XBC result_expr: - expected_results -
+03_n: OK regex: 'abc'i parsed_regex: 'abc'i str: AXC result_expr: - expected_results -
+04_n: OK regex: 'abc'i parsed_regex: 'abc'i str: ABX result_expr: - expected_results -
+05_y: OK regex: 'abc'i parsed_regex: 'abc'i str: XABCY result_expr: $& expected_results ABC
+06_y: OK regex: 'abc'i parsed_regex: 'abc'i str: ABABC result_expr: $& expected_results ABC
+07_y: OK regex: 'ab*c'i parsed_regex: 'ab*c'i str: ABC result_expr: $& expected_results ABC
+08_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABC result_expr: $& expected_results ABC
+09_y: OK regex: 'ab*bc'i parsed_regex: 'ab*bc'i str: ABBC result_expr: $& expected_results ABBC
+10_y: OK regex: 'ab*?bc'i parsed_regex: 'ab*?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+11_y: OK regex: 'ab{0,}?bc'i parsed_regex: 'ab{0,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+12_y: OK regex: 'ab+?bc'i parsed_regex: 'ab+?bc'i str: ABBC result_expr: $& expected_results ABBC
+13_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABC result_expr: - expected_results -
+14_n: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABQ result_expr: - expected_results -
+15_n: OK regex: 'ab{1,}bc'i parsed_regex: 'ab{1,}bc'i str: ABQ result_expr: - expected_results -
+16_y: OK regex: 'ab+bc'i parsed_regex: 'ab+bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+17_y: OK regex: 'ab{1,}?bc'i parsed_regex: 'ab{1,}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+18_y: OK regex: 'ab{1,3}?bc'i parsed_regex: 'ab{1,3}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+19_y: OK regex: 'ab{3,4}?bc'i parsed_regex: 'ab{3,4}?bc'i str: ABBBBC result_expr: $& expected_results ABBBBC
+20_n: OK regex: 'ab{4,5}?bc'i parsed_regex: 'ab{4,5}?bc'i str: ABBBBC result_expr: - expected_results -
+21_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBC result_expr: $& expected_results ABBC
+22_y: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABC result_expr: $& expected_results ABC
+23_y: OK regex: 'ab{0,1}?bc'i parsed_regex: 'ab{0,1}?bc'i str: ABC result_expr: $& expected_results ABC
+24_n: OK regex: 'ab??bc'i parsed_regex: 'ab??bc'i str: ABBBBC result_expr: - expected_results -
+25_y: OK regex: 'ab??c'i parsed_regex: 'ab??c'i str: ABC result_expr: $& expected_results ABC
+26_y: OK regex: 'ab{0,1}?c'i parsed_regex: 'ab{0,1}?c'i str: ABC result_expr: $& expected_results ABC
+27_y: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABC result_expr: $& expected_results ABC
+28_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: ABCC result_expr: - expected_results -
+29_y: OK regex: '^abc'i parsed_regex: '^abc'i str: ABCC result_expr: $& expected_results ABC
+30_n: OK regex: '^abc$'i parsed_regex: '^abc$'i str: AABC result_expr: - expected_results -
+31_y: OK regex: 'abc$'i parsed_regex: 'abc$'i str: AABC result_expr: $& expected_results ABC
+32_y: OK regex: '^'i parsed_regex: '^'i str: ABC result_expr: $& expected_results 
+33_y: OK regex: '$'i parsed_regex: '$'i str: ABC result_expr: $& expected_results 
+34_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: ABC result_expr: $& expected_results ABC
+35_y: OK regex: 'a.c'i parsed_regex: 'a.c'i str: AXC result_expr: $& expected_results AXC
+36_y: OK regex: 'a\Nc'i parsed_regex: 'a\Nc'i str: ABC result_expr: $& expected_results ABC
+37_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: AXYZC result_expr: $& expected_results AXYZC
+38_n: OK regex: 'a.*c'i parsed_regex: 'a.*c'i str: AXYZD result_expr: - expected_results -
+39_n: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABC result_expr: - expected_results -
+40_y: OK regex: 'a[bc]d'i parsed_regex: 'a[bc]d'i str: ABD result_expr: $& expected_results ABD
+41_n: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ABD result_expr: - expected_results -
+42_y: OK regex: 'a[b-d]e'i parsed_regex: 'a[b-d]e'i str: ACE result_expr: $& expected_results ACE
+43_y: OK regex: 'a[b-d]'i parsed_regex: 'a[b-d]'i str: AAC result_expr: $& expected_results AC
+44_y: OK regex: 'a[-b]'i parsed_regex: 'a[-b]'i str: A- result_expr: $& expected_results A-
+45_y: OK regex: 'a[b-]'i parsed_regex: 'a[b-]'i str: A- result_expr: $& expected_results A-
+46_y: OK regex: 'a]'i parsed_regex: 'a]'i str: A] result_expr: $& expected_results A]
+47_y: OK regex: 'a[]]b'i parsed_regex: 'a[]]b'i str: A]B result_expr: $& expected_results A]B
+48_y: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: AED result_expr: $& expected_results AED
+49_n: OK regex: 'a[^bc]d'i parsed_regex: 'a[^bc]d'i str: ABD result_expr: - expected_results -
+50_y: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: ADC result_expr: $& expected_results ADC
+51_n: OK regex: 'a[^-b]c'i parsed_regex: 'a[^-b]c'i str: A-C result_expr: - expected_results -
+52_n: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: A]C result_expr: - expected_results -
+53_y: OK regex: 'a[^]b]c'i parsed_regex: 'a[^]b]c'i str: ADC result_expr: $& expected_results ADC
+54_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABC result_expr: $& expected_results AB
+55_y: OK regex: 'ab|cd'i parsed_regex: 'ab|cd'i str: ABCD result_expr: $& expected_results AB
+56_y: OK regex: '()ef'i parsed_regex: '()ef'i str: DEF result_expr: $&-$1 expected_results EF-
+57_n: OK regex: '$b'i parsed_regex: '$b'i str: B result_expr: - expected_results -
+58_y: OK regex: 'a\(b'i parsed_regex: 'a\(b'i str: A(B result_expr: $&-$1 expected_results A(B-
+59_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: AB result_expr: $& expected_results AB
+60_y: OK regex: 'a\(*b'i parsed_regex: 'a\(*b'i str: A((B result_expr: $& expected_results A((B
+61_y: OK regex: 'a\\b'i parsed_regex: 'a\\b'i str: A\B result_expr: $& expected_results A\B
+62_y: OK regex: '((a))'i parsed_regex: '((a))'i str: ABC result_expr: $&-$1-$2 expected_results A-A-A
+63_y: OK regex: '(a)b(c)'i parsed_regex: '(a)b(c)'i str: ABC result_expr: $&-$1-$2 expected_results ABC-A-C
+64_y: OK regex: 'a+b+c'i parsed_regex: 'a+b+c'i str: AABBABC result_expr: $& expected_results ABC
+65_y: OK regex: 'a{1,}b{1,}c'i parsed_regex: 'a{1,}b{1,}c'i str: AABBABC result_expr: $& expected_results ABC
+66_y: OK regex: 'a.+?c'i parsed_regex: 'a.+?c'i str: ABCABC result_expr: $& expected_results ABC
+67_y: OK regex: 'a.*?c'i parsed_regex: 'a.*?c'i str: ABCABC result_expr: $& expected_results ABC
+68_y: OK regex: 'a.{0,5}?c'i parsed_regex: 'a.{0,5}?c'i str: ABCABC result_expr: $& expected_results ABC
+69_y: OK regex: '(a+|b)*'i parsed_regex: '(a+|b)*'i str: AB result_expr: $&-$1 expected_results AB-B
+70_y: OK regex: '(a+|b){0,}'i parsed_regex: '(a+|b){0,}'i str: AB result_expr: $&-$1 expected_results AB-B
+71_y: OK regex: '(a+|b)+'i parsed_regex: '(a+|b)+'i str: AB result_expr: $&-$1 expected_results AB-B
+72_y: OK regex: '(a+|b){1,}'i parsed_regex: '(a+|b){1,}'i str: AB result_expr: $&-$1 expected_results AB-B
+73_y: OK regex: '(a+|b)?'i parsed_regex: '(a+|b)?'i str: AB result_expr: $&-$1 expected_results A-A
+74_y: OK regex: '(a+|b){0,1}'i parsed_regex: '(a+|b){0,1}'i str: AB result_expr: $&-$1 expected_results A-A
+75_y: OK regex: '(a+|b){0,1}?'i parsed_regex: '(a+|b){0,1}?'i str: AB result_expr: $&-$1 expected_results -
+76_y: OK regex: '[^ab]*'i parsed_regex: '[^ab]*'i str: CDE result_expr: $& expected_results CDE
+77_n: OK regex: 'abc'i parsed_regex: 'abc'i str:  result_expr: - expected_results -
+78_y: OK regex: 'a*'i parsed_regex: 'a*'i str:  result_expr: $& expected_results 
+79_y: OK regex: '([abc])*d'i parsed_regex: '([abc])*d'i str: ABBBCD result_expr: $&-$1 expected_results ABBBCD-C
+80_y: OK regex: '([abc])*bcd'i parsed_regex: '([abc])*bcd'i str: ABCD result_expr: $&-$1 expected_results ABCD-A
+81_y: OK regex: 'a|b|c|d|e'i parsed_regex: 'a|b|c|d|e'i str: E result_expr: $& expected_results E
+82_y: OK regex: '(a|b|c|d|e)f'i parsed_regex: '(a|b|c|d|e)f'i str: EF result_expr: $&-$1 expected_results EF-E
+83_y: OK regex: 'abcd*efg'i parsed_regex: 'abcd*efg'i str: ABCDEFG result_expr: $& expected_results ABCDEFG
+84_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XABYABBBZ result_expr: $& expected_results AB
+85_y: OK regex: 'ab*'i parsed_regex: 'ab*'i str: XAYABBBZ result_expr: $& expected_results A
+86_y: OK regex: '(ab|cd)e'i parsed_regex: '(ab|cd)e'i str: ABCDE result_expr: $&-$1 expected_results CDE-CD
+87_y: OK regex: '[abhgefdc]ij'i parsed_regex: '[abhgefdc]ij'i str: HIJ result_expr: $& expected_results HIJ
+88_n: OK regex: '^(ab|cd)e'i parsed_regex: '^(ab|cd)e'i str: ABCDE result_expr: x$1y expected_results XY
+89_y: OK regex: '(abc|)ef'i parsed_regex: '(abc|)ef'i str: ABCDEF result_expr: $&-$1 expected_results EF-
+90_y: OK regex: '(a|b)c*d'i parsed_regex: '(a|b)c*d'i str: ABCD result_expr: $&-$1 expected_results BCD-B
+91_y: OK regex: '(ab|ab*)bc'i parsed_regex: '(ab|ab*)bc'i str: ABC result_expr: $&-$1 expected_results ABC-A
+92_y: OK regex: 'a([bc]*)c*'i parsed_regex: 'a([bc]*)c*'i str: ABC result_expr: $&-$1 expected_results ABC-BC
+93_y: OK regex: 'a([bc]*)(c*d)'i parsed_regex: 'a([bc]*)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+94_y: OK regex: 'a([bc]+)(c*d)'i parsed_regex: 'a([bc]+)(c*d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-BC-D
+95_y: OK regex: 'a([bc]*)(c+d)'i parsed_regex: 'a([bc]*)(c+d)'i str: ABCD result_expr: $&-$1-$2 expected_results ABCD-B-CD
+96_y: OK regex: 'a[bcd]*dcdcde'i parsed_regex: 'a[bcd]*dcdcde'i str: ADCDCDE result_expr: $& expected_results ADCDCDE
+97_n: OK regex: 'a[bcd]+dcdcde'i parsed_regex: 'a[bcd]+dcdcde'i str: ADCDCDE result_expr: - expected_results -
+98_y: OK regex: '(ab|a)b*c'i parsed_regex: '(ab|a)b*c'i str: ABC result_expr: $&-$1 expected_results ABC-AB
+99_y: OK regex: '((a)(b)c)(d)'i parsed_regex: '((a)(b)c)(d)'i str: ABCD result_expr: $1-$2-$3-$4 expected_results ABC-A-B-D
+100_y: OK regex: '[a-zA-Z_][a-zA-Z0-9_]*'i parsed_regex: '[a-zA-Z_][a-zA-Z0-9_]*'i str: ALPHA result_expr: $& expected_results ALPHA
+101_y: OK regex: '^a(bc+|b[eh])g|.h$'i parsed_regex: '^a(bc+|b[eh])g|.h$'i str: ABH result_expr: $&-$1 expected_results BH-
+102_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+103_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: IJ result_expr: $&-$1-$2 expected_results IJ-IJ-J
+104_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: EFFG result_expr: - expected_results -
+105_n: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: BCDD result_expr: - expected_results -
+106_y: OK regex: '(bc+d$|ef*g.|h?i(j|k))'i parsed_regex: '(bc+d$|ef*g.|h?i(j|k))'i str: REFFGZ result_expr: $&-$1-$2 expected_results EFFGZ-EFFGZ-
+107_y: OK regex: '((((((((((a))))))))))'i parsed_regex: '((((((((((a))))))))))'i str: A result_expr: $10 expected_results A
+108_y: OK regex: '((((((((((a))))))))))\10'i parsed_regex: '((((((((((a))))))))))\10'i str: AA result_expr: $& expected_results AA
+109_y: OK regex: '(((((((((a)))))))))'i parsed_regex: '(((((((((a)))))))))'i str: A result_expr: $& expected_results A
+110_n: OK regex: 'multiple words of text'i parsed_regex: 'multiple words of text'i str: UH-UH result_expr: - expected_results -
+111_y: OK regex: 'multiple words'i parsed_regex: 'multiple words'i str: MULTIPLE WORDS, YEAH result_expr: $& expected_results MULTIPLE WORDS
+112_y: OK regex: '(.*)c(.*)'i parsed_regex: '(.*)c(.*)'i str: ABCDE result_expr: $&-$1-$2 expected_results ABCDE-AB-DE
+113_y: OK regex: '\((.*), (.*)\)'i parsed_regex: '\((.*), (.*)\)'i str: (A, B) result_expr: ($2, $1) expected_results (B, A)
+114_n: OK regex: '[k]'i parsed_regex: '[k]'i str: AB result_expr: - expected_results -
+115_y: OK regex: 'abcd'i parsed_regex: 'abcd'i str: ABCD result_expr: $& expected_results ABCD
+116_y: OK regex: 'a(bc)d'i parsed_regex: 'a(bc)d'i str: ABCD result_expr: $1 expected_results BC
+117_y: OK regex: 'a[-]?c'i parsed_regex: 'a[-]?c'i str: AC result_expr: $& expected_results AC
+118_y: OK regex: '(abc)\1'i parsed_regex: '(abc)\1'i str: ABCABC result_expr: $1 expected_results ABC
+119_y: OK regex: '([a-c]*)\1'i parsed_regex: '([a-c]*)\1'i str: ABCABC result_expr: $1 expected_results ABC
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_12_case_insensitive.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution
new file mode 100644
index 0000000000..916d1a084b
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.execution
@@ -0,0 +1,50 @@
+Running tests_13_posessive_modifier:
+01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
+02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
+03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
+04_n: OK regex: a?+a parsed_regex: a?+a str: ab result_expr: - expected_results -
+05_y: OK regex: a++b parsed_regex: a++b str: aaaaab result_expr: $& expected_results aaaaab
+06_y: OK regex: a*+b parsed_regex: a*+b str: aaaaab result_expr: $& expected_results aaaaab
+07_y: OK regex: a{1,5}+b parsed_regex: a{1,5}+b str: aaaaab result_expr: $& expected_results aaaaab
+08_y: OK regex: a?+b parsed_regex: a?+b str: ab result_expr: $& expected_results ab
+09_n: OK regex: fooa++a parsed_regex: fooa++a str: fooaaaaa result_expr: - expected_results -
+10_n: OK regex: fooa*+a parsed_regex: fooa*+a str: fooaaaaa result_expr: - expected_results -
+11_n: OK regex: fooa{1,5}+a parsed_regex: fooa{1,5}+a str: fooaaaaa result_expr: - expected_results -
+12_n: OK regex: fooa?+a parsed_regex: fooa?+a str: fooab result_expr: - expected_results -
+13_y: OK regex: fooa++b parsed_regex: fooa++b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+14_y: OK regex: fooa*+b parsed_regex: fooa*+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+15_y: OK regex: fooa{1,5}+b parsed_regex: fooa{1,5}+b str: fooaaaaab result_expr: $& expected_results fooaaaaab
+16_y: OK regex: fooa?+b parsed_regex: fooa?+b str: fooab result_expr: $& expected_results fooab
+17_n: OK regex: (aA)++(aA) parsed_regex: (aA)++(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+18_n: OK regex: (aA|bB)++(aA|bB) parsed_regex: (aA|bB)++(aA|bB) str: aAaAbBaAbB result_expr: - expected_results aAaAbBaAbB
+19_n: OK regex: (aA)*+(aA) parsed_regex: (aA)*+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+20_n: OK regex: (aA|bB)*+(aA|bB) parsed_regex: (aA|bB)*+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+21_n: OK regex: (aA){1,5}+(aA) parsed_regex: (aA){1,5}+(aA) str: aAaAaAaAaA result_expr: - expected_results aAaAaAaAaA
+22_n: OK regex: (aA|bB){1,5}+(aA|bB) parsed_regex: (aA|bB){1,5}+(aA|bB) str: aAaAbBaAaA result_expr: - expected_results aAaAbBaAaA
+23_n: OK regex: (aA)?+(aA) parsed_regex: (aA)?+(aA) str: aAb result_expr: - expected_results aAb
+24_n: OK regex: (aA|bB)?+(aA|bB) parsed_regex: (aA|bB)?+(aA|bB) str: bBb result_expr: - expected_results bBb
+25_y: OK regex: (aA)++b parsed_regex: (aA)++b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+26_y: OK regex: (aA|bB)++b parsed_regex: (aA|bB)++b str: aAbBaAaAbBb result_expr: $& expected_results aAbBaAaAbBb
+27_y: OK regex: (aA)*+b parsed_regex: (aA)*+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+28_y: OK regex: (aA|bB)*+b parsed_regex: (aA|bB)*+b str: bBbBbBbBbBb result_expr: $& expected_results bBbBbBbBbBb
+29_y: OK regex: (aA){1,5}+b parsed_regex: (aA){1,5}+b str: aAaAaAaAaAb result_expr: $& expected_results aAaAaAaAaAb
+30_y: OK regex: (aA|bB){1,5}+b parsed_regex: (aA|bB){1,5}+b str: bBaAbBaAbBb result_expr: $& expected_results bBaAbBaAbBb
+31_y: OK regex: (aA)?+b parsed_regex: (aA)?+b str: aAb result_expr: $& expected_results aAb
+32_y: OK regex: (aA|bB)?+b parsed_regex: (aA|bB)?+b str: bBb result_expr: $& expected_results bBb
+33_n: OK regex: foo(aA)++(aA) parsed_regex: foo(aA)++(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+34_n: OK regex: foo(aA|bB)++(aA|bB) parsed_regex: foo(aA|bB)++(aA|bB) str: foobBbBbBaAaA result_expr: - expected_results foobBbBbBaAaA
+35_n: OK regex: foo(aA)*+(aA) parsed_regex: foo(aA)*+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+36_n: OK regex: foo(aA|bB)*+(aA|bB) parsed_regex: foo(aA|bB)*+(aA|bB) str: foobBaAbBaAaA result_expr: - expected_results foobBaAbBaAaA
+37_n: OK regex: foo(aA){1,5}+(aA) parsed_regex: foo(aA){1,5}+(aA) str: fooaAaAaAaAaA result_expr: - expected_results fooaAaAaAaAaA
+38_n: OK regex: foo(aA|bB){1,5}+(aA|bB) parsed_regex: foo(aA|bB){1,5}+(aA|bB) str: fooaAbBbBaAaA result_expr: - expected_results fooaAbBbBaAaA
+39_n: OK regex: foo(aA)?+(aA) parsed_regex: foo(aA)?+(aA) str: fooaAb result_expr: - expected_results fooaAb
+40_n: OK regex: foo(aA|bB)?+(aA|bB) parsed_regex: foo(aA|bB)?+(aA|bB) str: foobBb result_expr: - expected_results foobBb
+41_y: OK regex: foo(aA)++b parsed_regex: foo(aA)++b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+42_y: OK regex: foo(aA|bB)++b parsed_regex: foo(aA|bB)++b str: foobBaAbBaAbBb result_expr: $& expected_results foobBaAbBaAbBb
+43_y: OK regex: foo(aA)*+b parsed_regex: foo(aA)*+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+44_y: OK regex: foo(aA|bB)*+b parsed_regex: foo(aA|bB)*+b str: foobBbBaAaAaAb result_expr: $& expected_results foobBbBaAaAaAb
+45_y: OK regex: foo(aA){1,5}+b parsed_regex: foo(aA){1,5}+b str: fooaAaAaAaAaAb result_expr: $& expected_results fooaAaAaAaAaAb
+46_y: OK regex: foo(aA|bB){1,5}+b parsed_regex: foo(aA|bB){1,5}+b str: foobBaAaAaAaAb result_expr: $& expected_results foobBaAaAaAaAb
+47_y: OK regex: foo(aA)?+b parsed_regex: foo(aA)?+b str: fooaAb result_expr: $& expected_results fooaAb
+48_y: OK regex: foo(aA|bB)?+b parsed_regex: foo(aA|bB)?+b str: foobBb result_expr: $& expected_results foobBb
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_13_posessive_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution
new file mode 100644
index 0000000000..9a12081acc
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.execution
@@ -0,0 +1,533 @@
+Running tests_14_multiline_modifier:
+01_y: OK regex: \Z parsed_regex: \Z str: a
+b
+ result_expr: $-[0] expected_results 3
+02_y: OK regex: \z parsed_regex: \z str: a
+b
+ result_expr: $-[0] expected_results 4
+03_y: OK regex: $ parsed_regex: $ str: a
+b
+ result_expr: $-[0] expected_results 3
+04_y: OK regex: \Z parsed_regex: \Z str: b
+a
+ result_expr: $-[0] expected_results 3
+05_y: OK regex: \z parsed_regex: \z str: b
+a
+ result_expr: $-[0] expected_results 4
+06_y: OK regex: $ parsed_regex: $ str: b
+a
+ result_expr: $-[0] expected_results 3
+07_y: OK regex: \Z parsed_regex: \Z str: b
+a result_expr: $-[0] expected_results 3
+08_y: OK regex: \z parsed_regex: \z str: b
+a result_expr: $-[0] expected_results 3
+09_y: OK regex: $ parsed_regex: $ str: b
+a result_expr: $-[0] expected_results 3
+10_y: OK regex: '\Z'm parsed_regex: '\Z'm str: a
+b
+ result_expr: $-[0] expected_results 3
+11_y: OK regex: '\z'm parsed_regex: '\z'm str: a
+b
+ result_expr: $-[0] expected_results 4
+12_y: OK regex: '$'m parsed_regex: '$'m str: a
+b
+ result_expr: $-[0] expected_results 1
+13_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a
+ result_expr: $-[0] expected_results 3
+14_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a
+ result_expr: $-[0] expected_results 4
+15_y: OK regex: '$'m parsed_regex: '$'m str: b
+a
+ result_expr: $-[0] expected_results 1
+16_y: OK regex: '\Z'm parsed_regex: '\Z'm str: b
+a result_expr: $-[0] expected_results 3
+17_y: OK regex: '\z'm parsed_regex: '\z'm str: b
+a result_expr: $-[0] expected_results 3
+18_y: OK regex: '$'m parsed_regex: '$'m str: b
+a result_expr: $-[0] expected_results 1
+19_n: OK regex: a\Z parsed_regex: a\Z str: a
+b
+ result_expr: - expected_results -
+20_n: OK regex: a\z parsed_regex: a\z str: a
+b
+ result_expr: - expected_results -
+21_n: OK regex: a$ parsed_regex: a$ str: a
+b
+ result_expr: - expected_results -
+22_y: OK regex: a\Z parsed_regex: a\Z str: b
+a
+ result_expr: $-[0] expected_results 2
+23_n: OK regex: a\z parsed_regex: a\z str: b
+a
+ result_expr: - expected_results -
+24_y: OK regex: a$ parsed_regex: a$ str: b
+a
+ result_expr: $-[0] expected_results 2
+25_y: OK regex: a\Z parsed_regex: a\Z str: b
+a result_expr: $-[0] expected_results 2
+26_y: OK regex: a\z parsed_regex: a\z str: b
+a result_expr: $-[0] expected_results 2
+27_y: OK regex: a$ parsed_regex: a$ str: b
+a result_expr: $-[0] expected_results 2
+28_n: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: a
+b
+ result_expr: - expected_results -
+29_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: a
+b
+ result_expr: - expected_results -
+30_y: OK regex: 'a$'m parsed_regex: 'a$'m str: a
+b
+ result_expr: $-[0] expected_results 0
+31_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a
+ result_expr: $-[0] expected_results 2
+32_n: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a
+ result_expr: - expected_results -
+33_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a
+ result_expr: $-[0] expected_results 2
+34_y: OK regex: 'a\Z'm parsed_regex: 'a\Z'm str: b
+a result_expr: $-[0] expected_results 2
+35_y: OK regex: 'a\z'm parsed_regex: 'a\z'm str: b
+a result_expr: $-[0] expected_results 2
+36_y: OK regex: 'a$'m parsed_regex: 'a$'m str: b
+a result_expr: $-[0] expected_results 2
+37_n: OK regex: aa\Z parsed_regex: aa\Z str: aa
+b
+ result_expr: - expected_results -
+38_n: OK regex: aa\z parsed_regex: aa\z str: aa
+b
+ result_expr: - expected_results -
+39_n: OK regex: aa$ parsed_regex: aa$ str: aa
+b
+ result_expr: - expected_results -
+40_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa
+ result_expr: $-[0] expected_results 2
+41_n: OK regex: aa\z parsed_regex: aa\z str: b
+aa
+ result_expr: - expected_results -
+42_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa
+ result_expr: $-[0] expected_results 2
+43_y: OK regex: aa\Z parsed_regex: aa\Z str: b
+aa result_expr: $-[0] expected_results 2
+44_y: OK regex: aa\z parsed_regex: aa\z str: b
+aa result_expr: $-[0] expected_results 2
+45_y: OK regex: aa$ parsed_regex: aa$ str: b
+aa result_expr: $-[0] expected_results 2
+46_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: aa
+b
+ result_expr: - expected_results -
+47_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: aa
+b
+ result_expr: - expected_results -
+48_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: aa
+b
+ result_expr: $-[0] expected_results 0
+49_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa
+ result_expr: $-[0] expected_results 2
+50_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa
+ result_expr: - expected_results -
+51_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa
+ result_expr: $-[0] expected_results 2
+52_y: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+aa result_expr: $-[0] expected_results 2
+53_y: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+aa result_expr: $-[0] expected_results 2
+54_y: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+aa result_expr: $-[0] expected_results 2
+55_n: OK regex: aa\Z parsed_regex: aa\Z str: ac
+b
+ result_expr: - expected_results -
+56_n: OK regex: aa\z parsed_regex: aa\z str: ac
+b
+ result_expr: - expected_results -
+57_n: OK regex: aa$ parsed_regex: aa$ str: ac
+b
+ result_expr: - expected_results -
+58_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac
+ result_expr: - expected_results -
+59_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac
+ result_expr: - expected_results -
+60_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac
+ result_expr: - expected_results -
+61_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ac result_expr: - expected_results -
+62_n: OK regex: aa\z parsed_regex: aa\z str: b
+ac result_expr: - expected_results -
+63_n: OK regex: aa$ parsed_regex: aa$ str: b
+ac result_expr: - expected_results -
+64_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ac
+b
+ result_expr: - expected_results -
+65_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ac
+b
+ result_expr: - expected_results -
+66_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ac
+b
+ result_expr: - expected_results -
+67_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac
+ result_expr: - expected_results -
+68_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac
+ result_expr: - expected_results -
+69_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac
+ result_expr: - expected_results -
+70_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ac result_expr: - expected_results -
+71_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ac result_expr: - expected_results -
+72_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ac result_expr: - expected_results -
+73_n: OK regex: aa\Z parsed_regex: aa\Z str: ca
+b
+ result_expr: - expected_results -
+74_n: OK regex: aa\z parsed_regex: aa\z str: ca
+b
+ result_expr: - expected_results -
+75_n: OK regex: aa$ parsed_regex: aa$ str: ca
+b
+ result_expr: - expected_results -
+76_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca
+ result_expr: - expected_results -
+77_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca
+ result_expr: - expected_results -
+78_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca
+ result_expr: - expected_results -
+79_n: OK regex: aa\Z parsed_regex: aa\Z str: b
+ca result_expr: - expected_results -
+80_n: OK regex: aa\z parsed_regex: aa\z str: b
+ca result_expr: - expected_results -
+81_n: OK regex: aa$ parsed_regex: aa$ str: b
+ca result_expr: - expected_results -
+82_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: ca
+b
+ result_expr: - expected_results -
+83_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: ca
+b
+ result_expr: - expected_results -
+84_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: ca
+b
+ result_expr: - expected_results -
+85_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca
+ result_expr: - expected_results -
+86_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca
+ result_expr: - expected_results -
+87_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca
+ result_expr: - expected_results -
+88_n: OK regex: 'aa\Z'm parsed_regex: 'aa\Z'm str: b
+ca result_expr: - expected_results -
+89_n: OK regex: 'aa\z'm parsed_regex: 'aa\z'm str: b
+ca result_expr: - expected_results -
+90_n: OK regex: 'aa$'m parsed_regex: 'aa$'m str: b
+ca result_expr: - expected_results -
+91_n: OK regex: ab\Z parsed_regex: ab\Z str: ab
+b
+ result_expr: - expected_results -
+92_n: OK regex: ab\z parsed_regex: ab\z str: ab
+b
+ result_expr: - expected_results -
+93_n: OK regex: ab$ parsed_regex: ab$ str: ab
+b
+ result_expr: - expected_results -
+94_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab
+ result_expr: $-[0] expected_results 2
+95_n: OK regex: ab\z parsed_regex: ab\z str: b
+ab
+ result_expr: - expected_results -
+96_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab
+ result_expr: $-[0] expected_results 2
+97_y: OK regex: ab\Z parsed_regex: ab\Z str: b
+ab result_expr: $-[0] expected_results 2
+98_y: OK regex: ab\z parsed_regex: ab\z str: b
+ab result_expr: $-[0] expected_results 2
+99_y: OK regex: ab$ parsed_regex: ab$ str: b
+ab result_expr: $-[0] expected_results 2
+100_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ab
+b
+ result_expr: - expected_results -
+101_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ab
+b
+ result_expr: - expected_results -
+102_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ab
+b
+ result_expr: $-[0] expected_results 0
+103_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab
+ result_expr: $-[0] expected_results 2
+104_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab
+ result_expr: - expected_results -
+105_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab
+ result_expr: $-[0] expected_results 2
+106_y: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ab result_expr: $-[0] expected_results 2
+107_y: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ab result_expr: $-[0] expected_results 2
+108_y: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ab result_expr: $-[0] expected_results 2
+109_n: OK regex: ab\Z parsed_regex: ab\Z str: ac
+b
+ result_expr: - expected_results -
+110_n: OK regex: ab\z parsed_regex: ab\z str: ac
+b
+ result_expr: - expected_results -
+111_n: OK regex: ab$ parsed_regex: ab$ str: ac
+b
+ result_expr: - expected_results -
+112_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac
+ result_expr: - expected_results -
+113_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac
+ result_expr: - expected_results -
+114_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac
+ result_expr: - expected_results -
+115_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ac result_expr: - expected_results -
+116_n: OK regex: ab\z parsed_regex: ab\z str: b
+ac result_expr: - expected_results -
+117_n: OK regex: ab$ parsed_regex: ab$ str: b
+ac result_expr: - expected_results -
+118_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ac
+b
+ result_expr: - expected_results -
+119_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ac
+b
+ result_expr: - expected_results -
+120_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ac
+b
+ result_expr: - expected_results -
+121_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac
+ result_expr: - expected_results -
+122_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac
+ result_expr: - expected_results -
+123_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac
+ result_expr: - expected_results -
+124_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ac result_expr: - expected_results -
+125_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ac result_expr: - expected_results -
+126_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ac result_expr: - expected_results -
+127_n: OK regex: ab\Z parsed_regex: ab\Z str: ca
+b
+ result_expr: - expected_results -
+128_n: OK regex: ab\z parsed_regex: ab\z str: ca
+b
+ result_expr: - expected_results -
+129_n: OK regex: ab$ parsed_regex: ab$ str: ca
+b
+ result_expr: - expected_results -
+130_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca
+ result_expr: - expected_results -
+131_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca
+ result_expr: - expected_results -
+132_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca
+ result_expr: - expected_results -
+133_n: OK regex: ab\Z parsed_regex: ab\Z str: b
+ca result_expr: - expected_results -
+134_n: OK regex: ab\z parsed_regex: ab\z str: b
+ca result_expr: - expected_results -
+135_n: OK regex: ab$ parsed_regex: ab$ str: b
+ca result_expr: - expected_results -
+136_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: ca
+b
+ result_expr: - expected_results -
+137_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: ca
+b
+ result_expr: - expected_results -
+138_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: ca
+b
+ result_expr: - expected_results -
+139_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca
+ result_expr: - expected_results -
+140_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca
+ result_expr: - expected_results -
+141_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca
+ result_expr: - expected_results -
+142_n: OK regex: 'ab\Z'm parsed_regex: 'ab\Z'm str: b
+ca result_expr: - expected_results -
+143_n: OK regex: 'ab\z'm parsed_regex: 'ab\z'm str: b
+ca result_expr: - expected_results -
+144_n: OK regex: 'ab$'m parsed_regex: 'ab$'m str: b
+ca result_expr: - expected_results -
+145_n: OK regex: abb\Z parsed_regex: abb\Z str: abb
+b
+ result_expr: - expected_results -
+146_n: OK regex: abb\z parsed_regex: abb\z str: abb
+b
+ result_expr: - expected_results -
+147_n: OK regex: abb$ parsed_regex: abb$ str: abb
+b
+ result_expr: - expected_results -
+148_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb
+ result_expr: $-[0] expected_results 2
+149_n: OK regex: abb\z parsed_regex: abb\z str: b
+abb
+ result_expr: - expected_results -
+150_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb
+ result_expr: $-[0] expected_results 2
+151_y: OK regex: abb\Z parsed_regex: abb\Z str: b
+abb result_expr: $-[0] expected_results 2
+152_y: OK regex: abb\z parsed_regex: abb\z str: b
+abb result_expr: $-[0] expected_results 2
+153_y: OK regex: abb$ parsed_regex: abb$ str: b
+abb result_expr: $-[0] expected_results 2
+154_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: abb
+b
+ result_expr: - expected_results -
+155_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: abb
+b
+ result_expr: - expected_results -
+156_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: abb
+b
+ result_expr: $-[0] expected_results 0
+157_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb
+ result_expr: $-[0] expected_results 2
+158_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb
+ result_expr: - expected_results -
+159_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb
+ result_expr: $-[0] expected_results 2
+160_y: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+abb result_expr: $-[0] expected_results 2
+161_y: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+abb result_expr: $-[0] expected_results 2
+162_y: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+abb result_expr: $-[0] expected_results 2
+163_n: OK regex: abb\Z parsed_regex: abb\Z str: ac
+b
+ result_expr: - expected_results -
+164_n: OK regex: abb\z parsed_regex: abb\z str: ac
+b
+ result_expr: - expected_results -
+165_n: OK regex: abb$ parsed_regex: abb$ str: ac
+b
+ result_expr: - expected_results -
+166_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac
+ result_expr: - expected_results -
+167_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac
+ result_expr: - expected_results -
+168_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac
+ result_expr: - expected_results -
+169_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ac result_expr: - expected_results -
+170_n: OK regex: abb\z parsed_regex: abb\z str: b
+ac result_expr: - expected_results -
+171_n: OK regex: abb$ parsed_regex: abb$ str: b
+ac result_expr: - expected_results -
+172_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ac
+b
+ result_expr: - expected_results -
+173_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ac
+b
+ result_expr: - expected_results -
+174_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ac
+b
+ result_expr: - expected_results -
+175_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac
+ result_expr: - expected_results -
+176_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac
+ result_expr: - expected_results -
+177_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac
+ result_expr: - expected_results -
+178_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ac result_expr: - expected_results -
+179_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ac result_expr: - expected_results -
+180_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ac result_expr: - expected_results -
+181_n: OK regex: abb\Z parsed_regex: abb\Z str: ca
+b
+ result_expr: - expected_results -
+182_n: OK regex: abb\z parsed_regex: abb\z str: ca
+b
+ result_expr: - expected_results -
+183_n: OK regex: abb$ parsed_regex: abb$ str: ca
+b
+ result_expr: - expected_results -
+184_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca
+ result_expr: - expected_results -
+185_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca
+ result_expr: - expected_results -
+186_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca
+ result_expr: - expected_results -
+187_n: OK regex: abb\Z parsed_regex: abb\Z str: b
+ca result_expr: - expected_results -
+188_n: OK regex: abb\z parsed_regex: abb\z str: b
+ca result_expr: - expected_results -
+189_n: OK regex: abb$ parsed_regex: abb$ str: b
+ca result_expr: - expected_results -
+190_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: ca
+b
+ result_expr: - expected_results -
+191_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: ca
+b
+ result_expr: - expected_results -
+192_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: ca
+b
+ result_expr: - expected_results -
+193_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca
+ result_expr: - expected_results -
+194_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca
+ result_expr: - expected_results -
+195_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca
+ result_expr: - expected_results -
+196_n: OK regex: 'abb\Z'm parsed_regex: 'abb\Z'm str: b
+ca result_expr: - expected_results -
+197_n: OK regex: 'abb\z'm parsed_regex: 'abb\z'm str: b
+ca result_expr: - expected_results -
+198_n: OK regex: 'abb$'m parsed_regex: 'abb$'m str: b
+ca result_expr: - expected_results -
+199_y: OK regex: '\Aa$'m parsed_regex: '\Aa$'m str: a
+
+ result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_14_multiline_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution
new file mode 100644
index 0000000000..de92abc48a
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.execution
@@ -0,0 +1,87 @@
+Running tests_15_group_modifiers:
+01_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: ab result_expr: $& expected_results ab
+02_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: ab result_expr: $&:$1 expected_results ab:a
+03_y: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: Ab result_expr: $& expected_results Ab
+04_y: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: Ab result_expr: $&:$1 expected_results Ab:A
+05_n: OK regex: (?:(?i)a)b parsed_regex: (?:(?i)a)b str: aB result_expr: - expected_results -
+06_n: OK regex: ((?i)a)b parsed_regex: ((?i)a)b str: aB result_expr: - expected_results -
+07_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: ab result_expr: $& expected_results ab
+08_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: ab result_expr: $&:$1 expected_results ab:a
+09_y: OK regex: (?i:a)b parsed_regex: (?i:a)b str: Ab result_expr: $& expected_results Ab
+10_y: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: Ab result_expr: $&:$1 expected_results Ab:A
+11_n: OK regex: (?i:a)b parsed_regex: (?i:a)b str: aB result_expr: - expected_results -
+12_n: OK regex: ((?i:a))b parsed_regex: ((?i:a))b str: aB result_expr: - expected_results -
+13_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: ab result_expr: $& expected_results ab
+14_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: ab result_expr: $&:$1 expected_results ab:a
+15_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+16_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $&:$1 expected_results aB:a
+17_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: Ab result_expr: - expected_results -
+18_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: Ab result_expr: - expected_results -
+19_y: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: aB result_expr: $& expected_results aB
+20_y: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: aB result_expr: $1 expected_results a
+21_n: OK regex: '(?:(?-i)a)b'i parsed_regex: '(?:(?-i)a)b'i str: AB result_expr: - expected_results -
+22_n: OK regex: '((?-i)a)b'i parsed_regex: '((?-i)a)b'i str: AB result_expr: - expected_results -
+23_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: ab result_expr: $& expected_results ab
+24_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: ab result_expr: $&:$1 expected_results ab:a
+25_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+26_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $&:$1 expected_results aB:a
+27_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: Ab result_expr: - expected_results -
+28_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: Ab result_expr: - expected_results -
+29_y: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: aB result_expr: $& expected_results aB
+30_y: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: aB result_expr: $1 expected_results a
+31_n: OK regex: '(?-i:a)b'i parsed_regex: '(?-i:a)b'i str: AB result_expr: - expected_results -
+32_n: OK regex: '((?-i:a))b'i parsed_regex: '((?-i:a))b'i str: AB result_expr: - expected_results -
+33_n: OK regex: '((?-i:a.))b'i parsed_regex: '((?-i:a.))b'i str: a
+B result_expr: - expected_results -
+34_n: OK regex: '((?-i:a\N))b'i parsed_regex: '((?-i:a\N))b'i str: a
+B result_expr: - expected_results -
+35_y: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: a
+B result_expr: $1 expected_results a
+
+36_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: a
+B result_expr: - expected_results -
+37_n: OK regex: '((?s-i:a.))b'i parsed_regex: '((?s-i:a.))b'i str: B
+B result_expr: - expected_results -
+38_n: OK regex: '((?s-i:a\N))b'i parsed_regex: '((?s-i:a\N))b'i str: B
+B result_expr: - expected_results -
+39_y: OK regex: (?i:.[b].) parsed_regex: (?i:.[b].) str: abd result_expr: $& expected_results abd
+40_y: OK regex: (?i:\N[b]\N) parsed_regex: (?i:\N[b]\N) str: abd result_expr: $& expected_results abd
+41_n: OK regex: ^(?:a?b?)*$ parsed_regex: ^(?:a?b?)*$ str: a-- result_expr: - expected_results -
+42_y: OK regex: ((?s)^a(.))((?m)^b$) parsed_regex: ((?s)^a(.))((?m)^b$) str: a
+b
+c
+ result_expr: $1;$2;$3 expected_results a
+;
+;b
+43_y: OK regex: ((?m)^b$) parsed_regex: ((?m)^b$) str: a
+b
+c
+ result_expr: $1 expected_results b
+44_y: OK regex: (?m)^b parsed_regex: (?m)^b str: a
+b
+ result_expr: $& expected_results b
+45_y: OK regex: (?m)^(b) parsed_regex: (?m)^(b) str: a
+b
+ result_expr: $1 expected_results b
+46_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+47_y: OK regex: \n((?m)^b) parsed_regex: \n((?m)^b) str: a
+b
+ result_expr: $1 expected_results b
+48_n: OK regex: ^b parsed_regex: ^b str: a
+b
+c
+ result_expr: - expected_results -
+49_n: OK regex: ()^b parsed_regex: ()^b str: a
+b
+c
+ result_expr: - expected_results -
+50_y: OK regex: ((?m)^b) parsed_regex: ((?m)^b) str: a
+b
+c
+ result_expr: $1 expected_results b
+51_y: OK Warning: Parsed regex does not match. regex: '(foo)'n parsed_regex: '(?:foo)'n str: foobar result_expr: $&-$1 expected_results foo-
+52_y: OK Warning: Parsed regex does not match. regex: '(?-n)(foo)(?n)(bar)'n parsed_regex: '(?-n)(foo)(?n)(?:bar)'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+53_y: OK Warning: Parsed regex does not match. regex: '(?-n:(foo)(?n:(bar)))'n parsed_regex: '(?-n:(foo)(?n:(?:bar)))'n str: foobar result_expr: $&-$1-$2 expected_results foobar-foo-
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_15_group_modifiers.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution
new file mode 100644
index 0000000000..7617200078
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.execution
@@ -0,0 +1,35 @@
+Running tests_16_perl_syntax_modifier:
+01_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+02_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+03_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+04_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+05_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+06_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+07_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+08_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+09_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+10_yS: OK regex: /[a b]/x parsed_regex: /[a b]/x str:   result_expr: $& expected_results  
+11_n: OK regex: /[a b]/xx parsed_regex: /[a b]/xx str:   result_expr: - expected_results -
+12_y: OK regex: /[a\ b]/xx parsed_regex: /[a\ b]/xx str:   result_expr: $& expected_results  
+13_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: a result_expr: - expected_results -
+14_n: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: b result_expr: - expected_results -
+15_y: OK regex: /[ ^ a b ]/xx parsed_regex: /[ ^ a b ]/xx str: A result_expr: $& expected_results A
+16_yS: OK regex: /(?x:[a b])/xx parsed_regex: /(?x:[a b])/xx str:   result_expr: $& expected_results  
+17_n: OK regex: /(?xx:[a b])/x parsed_regex: /(?xx:[a b])/x str:   result_expr: - expected_results -
+18_yS: OK regex: /(?x)[a b]/xx parsed_regex: /(?x)[a b]/xx str:   result_expr: $& expected_results  
+19_n: OK regex: /(?xx)[a b]/x parsed_regex: /(?xx)[a b]/x str:   result_expr: - expected_results -
+20_yS: OK regex: /(?-x:[a b])/xx parsed_regex: /(?-x:[a b])/xx str:   result_expr: $& expected_results  
+21_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $& expected_results a
+22_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $-[0] expected_results 0
+23_y: OK Warning: Parsed regex does not match. regex: /\N {1}/x parsed_regex: /\N{1}/x str: abbbbc result_expr: $+[0] expected_results 1
+24_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $& expected_results abbb
+25_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $-[0] expected_results 0
+26_y: OK Warning: Parsed regex does not match. regex: /\N {3,4}/x parsed_regex: /\N{3,4}/x str: abbbbc result_expr: $+[0] expected_results 4
+27_y: OK Warning: Parsed regex does not match. regex: /a\N c/x parsed_regex: /a\Nc/x str: abc result_expr: $& expected_results abc
+28_y: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzc result_expr: $& expected_results axyzc
+29_n: OK Warning: Parsed regex does not match. regex: /a\N *c/x parsed_regex: /a\N*c/x str: axyzd result_expr: - expected_results -
+30_y: OK regex: /[#]/ parsed_regex: /[#]/ str: a#b result_expr: $& expected_results #
+31_y: OK regex: /[#]b/ parsed_regex: /[#]b/ str: a#b result_expr: $& expected_results #b
+32_y: OK regex: /[#]/x parsed_regex: /[#]/x str: a#b result_expr: $& expected_results #
+33_y: OK regex: /[#]b/x parsed_regex: /[#]b/x str: a#b result_expr: $& expected_results #b
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_16_perl_syntax_modifier.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution
new file mode 100644
index 0000000000..17c9a5d55b
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.execution
@@ -0,0 +1,5 @@
+Running tests_17_comments:
+01_y: OK regex: ^a(?#xxx){3}c parsed_regex: ^a(?#xxx){3}c str: aaac result_expr: $& expected_results aaac
+02_y: OK Warning: Parsed regex does not match. regex: '^a (?#xxx) (?#yyy) {3}c'x parsed_regex: '^a(?#xxx)(?#yyy){3}c'x str: aaac result_expr: $& expected_results aaac
+03_y: OK Warning: Parsed regex does not match. regex: 'foo # Match foo'x parsed_regex: 'foo'x str: foobar result_expr: $& expected_results foo
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_17_comments.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution
new file mode 100644
index 0000000000..1d088ce311
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.execution
@@ -0,0 +1,17 @@
+Running tests_18_branch_reset:
+01_y: OK regex: (?|(a)) parsed_regex: (?|(a)) str: a result_expr: $1-$+ expected_results a-a
+02_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: d!o!da result_expr: $1-$2-$3 expected_results !o!-o-a
+03_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: aabc result_expr: $1-$2-$3 expected_results a--c
+04_y: OK regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) parsed_regex: (?|a(.)b|d(.(o).)d|i(.)(.)j)(.) str: ixyjp result_expr: $1-$2-$3 expected_results x-y-p
+05_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: a result_expr: $1 expected_results a
+06_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: b result_expr: $1 expected_results b
+07_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: c result_expr: $1 expected_results c
+08_y: OK regex: (?|(?|(a)|(b))|(?|(c)|(d))) parsed_regex: (?|(?|(a)|(b))|(?|(c)|(d))) str: d result_expr: $1 expected_results d
+09_y: OK regex: (.)(?|(.)(.)x|(.)d)(.) parsed_regex: (.)(?|(.)(.)x|(.)d)(.) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+10_y: OK regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) parsed_regex: (\N)(?|(\N)(\N)x|(\N)d)(\N) str: abcde result_expr: $1-$2-$3-$4-$5- expected_results b-c--e--
+11_yM: OK regex: (?|(?x)) parsed_regex: (?|(?x)) str: x result_expr: $+{foo} expected_results x
+12_yM: OK regex: (?|(?x)|(?y)) parsed_regex: (?|(?x)|(?y)) str: x result_expr: $+{foo} expected_results x
+13_yM: OK regex: (?|(?y)|(?x)) parsed_regex: (?|(?y)|(?x)) str: x result_expr: $+{foo} expected_results x
+14_yM: OK regex: (?)(?|(?x)) parsed_regex: (?)(?|(?x)) str: x result_expr: $+{foo} expected_results x
+15_y: OK regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) parsed_regex: (?|(b)|()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()()(a)) str: a result_expr: $& expected_results a
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_18_branch_reset.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution
new file mode 100644
index 0000000000..7b34914b12
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.execution
@@ -0,0 +1,77 @@
+Running tests_19_lookahead:
+01_y: OK regex: a(?!b). parsed_regex: a(?!b). str: abad result_expr: $& expected_results ad
+02_y: OK regex: (?=)a parsed_regex: (?=)a str: a result_expr: $& expected_results a
+03_y: OK regex: a(?=d). parsed_regex: a(?=d). str: abad result_expr: $& expected_results ad
+04_y: OK regex: a(?=c|d). parsed_regex: a(?=c|d). str: abad result_expr: $& expected_results ad
+05_y: OK regex: ^(?:b|a(?=(.)))*\1 parsed_regex: ^(?:b|a(?=(.)))*\1 str: abc result_expr: $& expected_results ab
+06_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+07_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+08_y: OK regex: (?=(a+?))(\1ab) parsed_regex: (?=(a+?))(\1ab) str: aaab result_expr: $2 expected_results aab
+09_n: OK regex: ^(?=(a+?))\1ab parsed_regex: ^(?=(a+?))\1ab str: aaab result_expr: - expected_results -
+10_y: OK regex: (.*)(?=c) parsed_regex: (.*)(?=c) str: abcd result_expr: $1 expected_results ab
+11_yB: OK regex: (.*)(?=c)c parsed_regex: (.*)(?=c)c str: abcd result_expr: $1 expected_results ab
+12_y: OK regex: (.*)(?=b|c) parsed_regex: (.*)(?=b|c) str: abcd result_expr: $1 expected_results ab
+13_y: OK regex: (.*)(?=b|c)c parsed_regex: (.*)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+14_y: OK regex: (.*)(?=c|b) parsed_regex: (.*)(?=c|b) str: abcd result_expr: $1 expected_results ab
+15_y: OK regex: (.*)(?=c|b)c parsed_regex: (.*)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+16_y: OK regex: (.*)(?=[bc]) parsed_regex: (.*)(?=[bc]) str: abcd result_expr: $1 expected_results ab
+17_yB: OK regex: (.*)(?=[bc])c parsed_regex: (.*)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+18_y: OK regex: (.*?)(?=c) parsed_regex: (.*?)(?=c) str: abcd result_expr: $1 expected_results ab
+19_yB: OK regex: (.*?)(?=c)c parsed_regex: (.*?)(?=c)c str: abcd result_expr: $1 expected_results ab
+20_y: OK regex: (.*?)(?=b|c) parsed_regex: (.*?)(?=b|c) str: abcd result_expr: $1 expected_results a
+21_y: OK regex: (.*?)(?=b|c)c parsed_regex: (.*?)(?=b|c)c str: abcd result_expr: $1 expected_results ab
+22_y: OK regex: (.*?)(?=c|b) parsed_regex: (.*?)(?=c|b) str: abcd result_expr: $1 expected_results a
+23_y: OK regex: (.*?)(?=c|b)c parsed_regex: (.*?)(?=c|b)c str: abcd result_expr: $1 expected_results ab
+24_y: OK regex: (.*?)(?=[bc]) parsed_regex: (.*?)(?=[bc]) str: abcd result_expr: $1 expected_results a
+25_yB: OK regex: (.*?)(?=[bc])c parsed_regex: (.*?)(?=[bc])c str: abcd result_expr: $1 expected_results ab
+26_y: OK regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) parsed_regex: ^(a*?)(?!(aa|aaaa)*$)(?=a\z) str: aaaaaaaa result_expr: $1 expected_results aaaaaaa
+27_y: OK regex: a(?!b(?!c))(..) parsed_regex: a(?!b(?!c))(..) str: abababc result_expr: $1 expected_results bc
+28_y: OK regex: a(?!b(?=a))(..) parsed_regex: a(?!b(?=a))(..) str: abababc result_expr: $1 expected_results bc
+37_y: OK regex: X(\w+)(?=\s)|X(\w+) parsed_regex: X(\w+)(?=\s)|X(\w+) str: Xab result_expr: [$1-$2] expected_results [-ab]
+38_y: OK regex: ^a*(?=b)b parsed_regex: ^a*(?=b)b str: ab result_expr: $& expected_results ab
+39_y: OK regex: '(?!\A)x'm parsed_regex: '(?!\A)x'm str: a
+xb
+ result_expr: - expected_results -
+40_n: OK regex: '^(o)(?!.*\1)'i parsed_regex: '^(o)(?!.*\1)'i str: Oo result_expr: - expected_results -
+41_n: OK regex: .*a(?!(b|cd)*e).*f parsed_regex: .*a(?!(b|cd)*e).*f str: ......abef result_expr: - expected_results -
+42_y: OK regex: ^(a*?)(?!(aa|aaaa)*$) parsed_regex: ^(a*?)(?!(aa|aaaa)*$) str: aaaaaaaaaaaaaaaaaaaa result_expr: $1 expected_results a
+43_y: OK regex: (?!)+?|(.{2,4}) parsed_regex: (?!)+?|(.{2,4}) str: abcde result_expr: $1 expected_results abcd
+44_y: OK regex: ^(a*?)(?!(a{6}|a{5})*$) parsed_regex: ^(a*?)(?!(a{6}|a{5})*$) str: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa result_expr: $+[1] expected_results 12
+45_y: OK regex: a(?!b(?!c(?!d(?!e))))...(.) parsed_regex: a(?!b(?!c(?!d(?!e))))...(.) str: abxabcdxabcde result_expr: $1 expected_results e
+46_y: OK regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X parsed_regex: X(?!b+(?!(c+)*(?!(c+)*d))).*X str: aXbbbbbbbcccccccccccccaaaX result_expr: - expected_results -
+47_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results 
+
+48_y: OK regex: ((?s).)c(?!.) parsed_regex: ((?s).)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results 
+:
+c
+49_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1 expected_results b
+
+50_y: OK regex: ((?s)b.)c(?!.) parsed_regex: ((?s)b.)c(?!.) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+51_y: OK regex: ((?s)b.)c(?!\N) parsed_regex: ((?s)b.)c(?!\N) str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+52_y: OK regex: '(b.)c(?!\N)'s parsed_regex: '(b.)c(?!\N)'s str: a
+b
+c
+ result_expr: $1:$& expected_results b
+:b
+c
+53_n: OK regex: a*(?!) parsed_regex: a*(?!) str: aaaab result_expr: - expected_results -
+
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-regex_19_lookahead.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.execution
new file mode 100644
index 0000000000..d81cc0710e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.execution
@@ -0,0 +1 @@
+42
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-repeated-call.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.execution
new file mode 100644
index 0000000000..105d7d9ad3
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.execution
@@ -0,0 +1 @@
+100
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-requires-clauses.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.execution
new file mode 100644
index 0000000000..a3b7f9a557
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.execution
@@ -0,0 +1,3 @@
+12 , 34
+23 , 45
+34 , 56
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-return-tuple-operator.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution
new file mode 100644
index 0000000000..6fe5c7f6a8
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.execution
@@ -0,0 +1,2 @@
+42
+43
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-statement-scope-parameters.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio-with-raii.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio-with-raii.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio-with-raii.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio-with-raii.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-stdio.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution
new file mode 100644
index 0000000000..b8626c4cff
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.execution
@@ -0,0 +1 @@
+4
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-synthesize-rightshift-and-rightshifteq.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.execution
new file mode 100644
index 0000000000..2861a7a20c
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.execution
@@ -0,0 +1,4 @@
+f1: 2
+f2: 4
+f3: 6
+f4: 8
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-template-parameter-lists.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-comma-assert.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-comma-assert.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-comma-assert.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-comma-assert.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-commas.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-commas.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-commas.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-trailing-commas.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution
new file mode 100644
index 0000000000..9f037f474f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.execution
@@ -0,0 +1,2 @@
+xyzzy
+plugh
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-and-namespace-aliases.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.execution
new file mode 100644
index 0000000000..d1aa6265a7
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.execution
@@ -0,0 +1,9 @@
+                         double is int? false
+      variant is int? false
+                            any is int? false
+                  optional is int? false
+
+                            int is int? true
+      variant is int? true
+                            any is int? true
+                  optional is int? true
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-1.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution
new file mode 100644
index 0000000000..7045a6e793
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.execution
@@ -0,0 +1,8 @@
+                        double value is not an int
+     variant value is not an int
+                           any value is not an int
+                 optional value is not an int
+                           int value is 42
+     variant value is 1
+                           any value is 2
+                 optional value is 3
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-type-safety-2-with-inspect-expression.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.execution
new file mode 100644
index 0000000000..96b31fc422
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.execution
@@ -0,0 +1,27 @@
+myclass: implicit from int
+    data: 1, more: 504
+N::myclass::f with 53
+N::myclass::nested::g
+f1: 2
+f2: 4
+f3: 6
+f4: 8
+myclass: explicit from string
+    data: 99, more: abracadabra
+myclass: default
+    data: 504, more: 3.141590
+myclass: from int and string
+    data: 77, more: hair1 plugh
+x's state before assignments:     data: 1, more: 504
+myclass: implicit from int
+    data: 84, more: 504
+myclass: explicit from string
+    data: 99, more: syzygy
+myclass: implicit from int
+    data: 84, more: 504
+myclass: explicit from string
+    data: 99, more: syzygy
+myclass: destructor
+myclass: destructor
+myclass: destructor
+myclass: destructor
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-basics.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.execution
new file mode 100644
index 0000000000..20751af062
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.execution
@@ -0,0 +1,24 @@
+const foo 
+const foo 
+const foo 
+const foo 
+foo 
+foo 
+Call B const: 0.000000
+Call B const: 0.000000
+Call A const: 0
+Call B const: 0.000000
+Call B const: 0.000000
+Call A const: 0
+Call B mut: 0.000000
+Call B mut: 0.000000
+Call A mut: 0
+Call A const: 0
+Call B const: 0.000000
+Call A const: 0
+Call A const: 0
+Call B const: 0.000000
+Call A const: 0
+Call A mut: 0
+Call B mut: 0.000000
+Call A mut: 0
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-down-upcast.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.execution
new file mode 100644
index 0000000000..809430aaa8
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.execution
@@ -0,0 +1,5 @@
+Parsnip checks in for the day's shift
+printing: Parsnip lives at 123 Main St.
+-> [vcall: make_speak] Parsnip cracks a few jokes with a coworker
+-> [vcall: do_work] Parsnip carries some half-tonne crates of Fe2O3 to cold storage
+Tired but satisfied after another successful day, Parsnip checks out and goes home to their family
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-inheritance.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution
new file mode 100644
index 0000000000..cc716cc8c3
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.execution
@@ -0,0 +1,5 @@
+made a safely initialized cycle
+leaving call to 'why(5)'
+leaving call to 'why(3)'
+leaving call to 'why(1)'
+hallo welt
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-order-independence-and-nesting.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution
new file mode 100644
index 0000000000..54b3aab09e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.execution
@@ -0,0 +1 @@
+less more less
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-ordering-via-meta-functions.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution
new file mode 100644
index 0000000000..fc5a23bde4
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.execution
@@ -0,0 +1,8 @@
+Function invoked        Call syntax   Results
+----------------------  ------------  ------------------------------------------------------
+ctor - from string      construct     [ Henry | 123 Ford Dr. ]
+ctor - from string      assign        [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   cp-construct  [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ]
+ctor - move             mv-construct  [ Clara(CM) | 123 Ford Dr. ] <- [  |  ]
+assign - copy           cp-assign     [ Clara | 123 Ford Dr.(AC) ] <- [ Clara | 123 Ford Dr. ]
+assign - move           mv-assign     [ Clara | 123 Ford Dr. ] <- [  |  ]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-1-provide-everything.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution
new file mode 100644
index 0000000000..7cbf0f8692
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.execution
@@ -0,0 +1,8 @@
+Function invoked        Call syntax   Results
+----------------------  ------------  ------------------------------------------------------
+ctor - from string      construct     [ Henry | 123 Ford Dr. ]
+ctor - from string      assign        [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   cp-construct  [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ]
+ctor - move             mv-construct  [ Clara(CM) | 123 Ford Dr. ] <- [  |  ]
+assign - copy           cp-assign     [ Clara | 123 Ford Dr.(AC) ] <- [ Clara | 123 Ford Dr. ]
+assign - copy           mv-assign     [ Clara | 123 Ford Dr.(AC) ] <- [  |  ]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-2-provide-mvconstruct-and-cpassign.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution
new file mode 100644
index 0000000000..541b2a0d93
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.execution
@@ -0,0 +1,8 @@
+Function invoked        Call syntax   Results
+----------------------  ------------  ------------------------------------------------------
+ctor - from string      construct     [ Henry | 123 Ford Dr. ]
+ctor - from string      assign        [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   cp-construct  [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ]
+ctor - move             mv-construct  [ Clara(CM) | 123 Ford Dr. ] <- [  |  ]
+ctor - copy (GENERAL)   cp-assign     [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ]
+assign - move           mv-assign     [ Clara | 123 Ford Dr. ] <- [  |  ]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-3-provide-mvconstruct-and-mvassign.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution
new file mode 100644
index 0000000000..24d4e763a6
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.execution
@@ -0,0 +1,8 @@
+Function invoked        Call syntax   Results
+----------------------  ------------  ------------------------------------------------------
+ctor - from string      construct     [ Henry | 123 Ford Dr. ]
+ctor - from string      assign        [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   cp-construct  [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   mv-construct  [ Clara | 123 Ford Dr. ] <- [  |  ]
+assign - copy           cp-assign     [ Clara | 123 Ford Dr.(AC) ] <- [ Clara | 123 Ford Dr. ]
+assign - move           mv-assign     [ Clara | 123 Ford Dr. ] <- [  |  ]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-4-provide-cpassign-and-mvassign.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution
new file mode 100644
index 0000000000..c387c0371f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.execution
@@ -0,0 +1,8 @@
+Function invoked        Call syntax   Results
+----------------------  ------------  ------------------------------------------------------
+ctor - from string      construct     [ Henry | 123 Ford Dr. ]
+ctor - from string      assign        [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   cp-construct  [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   mv-construct  [ Clara | 123 Ford Dr. ] <- [  |  ]
+ctor - copy (GENERAL)   cp-assign     [ Clara | 123 Ford Dr. ] <- [ Clara | 123 Ford Dr. ]
+ctor - copy (GENERAL)   mv-assign     [ Clara | 123 Ford Dr. ] <- [  |  ]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-smf-and-that-5-provide-nothing-but-general-case.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.execution
new file mode 100644
index 0000000000..abd49e623e
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.execution
@@ -0,0 +1,7 @@
+name 'Henry', addr '123 Ford Dr.'
+-----
+name 'Henry', addr '123 Ford Dr.'
+name 'Henry', addr '123 Ford Dr.'
+-----
+name '', addr ''
+name 'Henry', addr '123 Ford Dr.'
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-that-parameters.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution
new file mode 100644
index 0000000000..daee7bf51f
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.execution
@@ -0,0 +1 @@
+less less less 
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-types-value-types-via-meta-functions.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-ufcs-member-access-and-chaining.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-ufcs-member-access-and-chaining.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-ufcs-member-access-and-chaining.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-ufcs-member-access-and-chaining.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.execution
new file mode 100644
index 0000000000..e52daad8e8
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.execution
@@ -0,0 +1,4 @@
+sizeof(x) - alignof(x) == max(sizeof(fields)) is true
+(not a name)
+xyz
+42
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-union.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.execution
new file mode 100644
index 0000000000..53bc692f96
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.execution
@@ -0,0 +1,7 @@
+xyz
+plu
+abr
+3.14word-1500
+first all() returned false
+second all() returned true
+sum of (1, 2, 3, 100) is: 106
\ No newline at end of file
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-variadics.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-various-string-literals.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-various-string-literals.cpp.execution
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-various-string-literals.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-various-string-literals.cpp.output
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/xyzzy b/regression-tests/test-results/clang-18-c++23-libcpp/xyzzy
new file mode 100644
index 0000000000..805bcb8538
--- /dev/null
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/xyzzy
@@ -0,0 +1 @@
+Hello Fred with UFCS!
\ No newline at end of file
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output
index e69de29bb2..e74374d8c2 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_01_char_matcher.cpp.output
@@ -0,0 +1 @@
+pure2-regex_01_char_matcher.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output
index e69de29bb2..00bf2644df 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_02_ranges.cpp.output
@@ -0,0 +1 @@
+pure2-regex_02_ranges.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output
index e69de29bb2..6d0365664b 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_03_wildcard.cpp.output
@@ -0,0 +1 @@
+pure2-regex_03_wildcard.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output
index e69de29bb2..e11a6a873f 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_04_start_end.cpp.output
@@ -0,0 +1 @@
+pure2-regex_04_start_end.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output
index e69de29bb2..eb300bda69 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_05_classes.cpp.output
@@ -0,0 +1 @@
+pure2-regex_05_classes.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output
index e69de29bb2..150c67dd34 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_06_boundaries.cpp.output
@@ -0,0 +1 @@
+pure2-regex_06_boundaries.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output
index e69de29bb2..97988771cd 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_07_short_classes.cpp.output
@@ -0,0 +1 @@
+pure2-regex_07_short_classes.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output
index e69de29bb2..7a45b0c187 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_08_alternatives.cpp.output
@@ -0,0 +1 @@
+pure2-regex_08_alternatives.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output
index e69de29bb2..047bb5f087 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_09_groups.cpp.output
@@ -0,0 +1 @@
+pure2-regex_09_groups.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output
index e69de29bb2..2c8998cc5d 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_10_escapes.cpp.output
@@ -0,0 +1 @@
+pure2-regex_10_escapes.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output
index e69de29bb2..61446dad64 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_11_group_references.cpp.output
@@ -0,0 +1 @@
+pure2-regex_11_group_references.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output
index e69de29bb2..1c860cd486 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_12_case_insensitive.cpp.output
@@ -0,0 +1 @@
+pure2-regex_12_case_insensitive.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output
index e69de29bb2..c2f6f5644f 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_13_posessive_modifier.cpp.output
@@ -0,0 +1 @@
+pure2-regex_13_posessive_modifier.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output
index e69de29bb2..9fe1dd849e 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_14_multiline_modifier.cpp.output
@@ -0,0 +1 @@
+pure2-regex_14_multiline_modifier.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output
index e69de29bb2..25bda92737 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_15_group_modifiers.cpp.output
@@ -0,0 +1 @@
+pure2-regex_15_group_modifiers.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
index e69de29bb2..3df3a04bf6 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_16_perl_syntax_modifier.cpp.output
@@ -0,0 +1 @@
+pure2-regex_16_perl_syntax_modifier.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output
index e69de29bb2..7cd5b672db 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_17_comments.cpp.output
@@ -0,0 +1 @@
+pure2-regex_17_comments.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output
index e69de29bb2..dac6ef8e58 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_18_branch_reset.cpp.output
@@ -0,0 +1 @@
+pure2-regex_18_branch_reset.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output
index e69de29bb2..005c8d5dc1 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-regex_19_lookahead.cpp.output
@@ -0,0 +1 @@
+pure2-regex_19_lookahead.cpp
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
index 3ccc9ae9fc..fe6e6efc96 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
@@ -31,8 +31,8 @@ bar result_expr: $1-$2 expected_results
 15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
 16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
 17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
-
ebar result_expr: $& expected_results foo	
-
ebar
+
bar result_expr: $& expected_results foo	
+
bar
 18_y: OK regex: foo\Kbar parsed_regex: foo\Kbar str: foobar result_expr: $& expected_results bar
 19_y: OK regex: \x41\x42 parsed_regex: \x41\x42 str: AB result_expr: $& expected_results AB
 20_y: OK regex: \101\o{102} parsed_regex: \101\o{102} str: AB result_expr: $& expected_results AB
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
index bcb3c878cf..2c8998cc5d 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.output
@@ -1,4 +1 @@
 pure2-regex_10_escapes.cpp
-pure2-regex_10_escapes.cpp2(192): warning C4129: 'e': unrecognized character escape sequence
-pure2-regex_10_escapes.cpp2(192): warning C4129: 'e': unrecognized character escape sequence
-pure2-regex_10_escapes.cpp2(1592): warning C4129: 'e': unrecognized character escape sequence

From 2eaac0bd47c96550563c7d0cbdff7073d61af1db Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 9 Jul 2024 10:44:19 +0200
Subject: [PATCH 150/161] Updates for regression tests.

---
 .../pure2-assert-expected-not-null.cpp.output | 27 -------------------
 .../pure2-assert-expected-not-null.cpp.output |  4 +--
 2 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output
index ba14d38487..e69de29bb2 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.output
@@ -1,27 +0,0 @@
-pure2-assert-expected-not-null.cpp2:7:22: error: expected '(' for function-style cast or type construction
-    7 |     std::expected ex {4}; 
-      |                   ~~~^
-pure2-assert-expected-not-null.cpp2:7:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'?
-    7 |     std::expected ex {4}; 
-      |     ~~~~~^~~~~~~~
-      |          unexpected
-/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here
-  110 |   void unexpected() __attribute__ ((__noreturn__,__cold__));
-      |        ^
-pure2-assert-expected-not-null.cpp2:9:193: error: use of undeclared identifier 'ex'
-    9 |     return *cpp2::impl::assert_not_null(cpp2::move(up)) + *cpp2::impl::assert_not_null(cpp2::move(sp)) + *cpp2::impl::assert_not_null(cpp2::move(op)) + *cpp2::impl::assert_not_null(cpp2::move(ex)); 
-      |                                                                                                                                                                                                 ^
-pure2-assert-expected-not-null.cpp2:14:22: error: expected '(' for function-style cast or type construction
-   14 |     std::expected ex {std::unexpected(false)}; 
-      |                   ~~~^
-pure2-assert-expected-not-null.cpp2:14:10: error: no member named 'expected' in namespace 'std'; did you mean 'unexpected'?
-   14 |     std::expected ex {std::unexpected(false)}; 
-      |     ~~~~~^~~~~~~~
-      |          unexpected
-/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/exception:110:8: note: 'unexpected' declared here
-  110 |   void unexpected() __attribute__ ((__noreturn__,__cold__));
-      |        ^
-pure2-assert-expected-not-null.cpp2:15:52: error: use of undeclared identifier 'ex'
-   15 |     return *cpp2::impl::assert_not_null(cpp2::move(ex)); 
-      |                                                    ^
-6 errors generated.
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
index ccdd6c2961..34c1700be2 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
@@ -6,7 +6,7 @@ pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' b
 pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-D:␇\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+D:\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
 pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std'
 predefined C++ types (compiler internal)(347): note: see declaration of 'std'
 pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected
@@ -19,4 +19,4 @@ pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argumen
 pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-D:␇\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+D:\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'

From bb27c43fc09d514209c3108c62f499d877f30913 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Tue, 9 Jul 2024 11:21:02 +0200
Subject: [PATCH 151/161] Updates for regression tests.

---
 .../msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
index 34c1700be2..6a22b37714 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
@@ -6,7 +6,7 @@ pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' b
 pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-D:\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+..\..\..\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
 pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std'
 predefined C++ types (compiler internal)(347): note: see declaration of 'std'
 pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected
@@ -19,4 +19,4 @@ pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argumen
 pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-D:\cppfront\cppfront\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+..\..\..\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'

From 57f8e1556dcda31ef3ccb764f8c19a3a436539cf Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Wed, 10 Jul 2024 10:29:10 +0200
Subject: [PATCH 152/161] Update for \e escape.

---
 include/cpp2regex.h                           | 316 +++++++++---------
 regression-tests/pure2-regex_10_escapes.cpp2  |   2 +-
 .../test-results/pure2-regex_10_escapes.cpp   |   4 +-
 source/regex.h2                               |   4 +-
 4 files changed, 165 insertions(+), 161 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 854b3998ce..a9400a961a 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -123,47 +123,47 @@ class any_token;
 class char_token;
     
 
-#line 1305 "regex.h2"
+#line 1307 "regex.h2"
 class class_token;
     
 
-#line 1440 "regex.h2"
+#line 1442 "regex.h2"
 template class class_token_matcher;
 
-#line 1540 "regex.h2"
+#line 1542 "regex.h2"
 class group_ref_token;
     
 
-#line 1684 "regex.h2"
+#line 1686 "regex.h2"
 class group_token;
     
 
-#line 1967 "regex.h2"
+#line 1969 "regex.h2"
 class lookahead_token;
     
 
-#line 2067 "regex.h2"
+#line 2069 "regex.h2"
 class range_flags;
     
 
-#line 2075 "regex.h2"
+#line 2077 "regex.h2"
 class range_token;
     
 
-#line 2212 "regex.h2"
+#line 2214 "regex.h2"
 template class range_token_matcher;
 
-#line 2337 "regex.h2"
+#line 2339 "regex.h2"
 class special_range_token;
     
 
-#line 2424 "regex.h2"
+#line 2426 "regex.h2"
 template class regular_expression;
 
-#line 2513 "regex.h2"
+#line 2515 "regex.h2"
 template class regex_generator;
 
-#line 2585 "regex.h2"
+#line 2587 "regex.h2"
 }
 }
 
@@ -993,7 +993,7 @@ class char_token: public regex_token {
 #line 1252 "regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1264 "regex.h2"
+#line 1266 "regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -1001,7 +1001,7 @@ class char_token: public regex_token {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1268 "regex.h2"
+#line 1270 "regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1041,21 +1041,21 @@ class char_token: public regex_token {
 //
 class class_token: public regex_token {
 
-#line 1308 "regex.h2"
+#line 1310 "regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1319 "regex.h2"
+#line 1321 "regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1427 "regex.h2"
+#line 1429 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1432 "regex.h2"
+#line 1434 "regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1063,21 +1063,21 @@ class class_token: public regex_token {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1438 "regex.h2"
+#line 1440 "regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1463 "regex.h2"
+#line 1465 "regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1475 "regex.h2"
+#line 1477 "regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1089,19 +1089,19 @@ template c
 
     //     return r;
     // }
-#line 1486 "regex.h2"
+#line 1488 "regex.h2"
 };
 
 // Regex syntax: \a or \n or \[
 //
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1525 "regex.h2"
+#line 1527 "regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1534 "regex.h2"
+#line 1536 "regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1110,16 +1110,16 @@ template c
 //
 class group_ref_token: public regex_token {
 
-#line 1543 "regex.h2"
+#line 1545 "regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1552 "regex.h2"
+#line 1554 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1644 "regex.h2"
+#line 1646 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1127,12 +1127,12 @@ class group_ref_token: public regex_token {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1647 "regex.h2"
+#line 1649 "regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1674 "regex.h2"
+#line 1676 "regex.h2"
 // Regex syntax: ()      Example: (abc)
 //               (?:)  (?i:abc)
@@ -1145,22 +1145,22 @@ template [[nodiscard]] auto gr
 //
 class group_token: public regex_token {
 
-#line 1687 "regex.h2"
+#line 1689 "regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1703 "regex.h2"
+#line 1705 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1830 "regex.h2"
+#line 1832 "regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1847 "regex.h2"
+#line 1849 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1866 "regex.h2"
+#line 1868 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1169,46 +1169,46 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1872 "regex.h2"
+#line 1874 "regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1914 "regex.h2"
+#line 1916 "regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1932 "regex.h2"
+#line 1934 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1944 "regex.h2"
+#line 1946 "regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1958 "regex.h2"
+#line 1960 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1963 "regex.h2"
+#line 1965 "regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 // Parsed in group_token.
 //
 class lookahead_token: public regex_token {
 
-#line 1970 "regex.h2"
+#line 1972 "regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1977 "regex.h2"
+#line 1979 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1983 "regex.h2"
+#line 1985 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1216,18 +1216,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1986 "regex.h2"
+#line 1988 "regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1997 "regex.h2"
+#line 1999 "regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2024 "regex.h2"
+#line 2026 "regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1241,12 +1241,12 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2038 "regex.h2"
+#line 2040 "regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2064 "regex.h2"
+#line 2066 "regex.h2"
 // TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147
 
 // Options for range matching.
@@ -1259,13 +1259,13 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2072 "regex.h2"
+#line 2074 "regex.h2"
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2078 "regex.h2"
+#line 2080 "regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1275,19 +1275,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2155 "regex.h2"
+#line 2157 "regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2166 "regex.h2"
+#line 2168 "regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2178 "regex.h2"
+#line 2180 "regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2196 "regex.h2"
+#line 2198 "regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2206 "regex.h2"
+#line 2208 "regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1295,46 +1295,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2210 "regex.h2"
+#line 2212 "regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2226 "regex.h2"
+#line 2228 "regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2231 "regex.h2"
+#line 2233 "regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2236 "regex.h2"
+#line 2238 "regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2242 "regex.h2"
+#line 2244 "regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2257 "regex.h2"
+#line 2259 "regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2285 "regex.h2"
+#line 2287 "regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2309 "regex.h2"
+#line 2311 "regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2333 "regex.h2"
+#line 2335 "regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2340 "regex.h2"
+#line 2342 "regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1343,7 +1343,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2369 "regex.h2"
+#line 2371 "regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1352,10 +1352,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2391 "regex.h2"
+#line 2393 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2416 "regex.h2"
+#line 2418 "regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1376,7 +1376,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2440 "regex.h2"
+#line 2442 "regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1391,7 +1391,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2456 "regex.h2"
+#line 2458 "regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1399,13 +1399,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2468 "regex.h2"
+#line 2470 "regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2490 "regex.h2"
+#line 2492 "regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1417,7 +1417,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2503 "regex.h2"
+#line 2505 "regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1440,21 +1440,21 @@ template class regex_generator {
 
     public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
-#line 2528 "regex.h2"
+#line 2530 "regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2563 "regex.h2"
+#line 2565 "regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2576 "regex.h2"
+#line 2578 "regex.h2"
 };
 
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2585 "regex.h2"
+#line 2587 "regex.h2"
 }
 }
 
@@ -2752,7 +2752,9 @@ size_t i{0};
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
-        //str = string_util::replace_all(str, "\x1b", "\\x{1b}"); // TODO: Add again after https://github.com/hsutter/cppfront/issues/1152 is fixed or concat strings are allowed.
+        str = string_util::replace_all(str, "\x1b", "\" \"\\x1b\" \""); // Generate a separated string. This prevents 
+                                                                        // situations like `\x1bblub` from generating
+                                                                        // wrong hex characters.
         str = string_util::replace_all(str, "\n", "\\n");
         str = string_util::replace_all(str, "\r", "\\r");
         str = string_util::replace_all(str, "\t", "\\t");
@@ -2760,7 +2762,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1264 "regex.h2"
+#line 1266 "regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2768,17 +2770,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1312 "regex.h2"
+#line 1314 "regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1317 "regex.h2"
+#line 1319 "regex.h2"
     }
 
-#line 1320 "regex.h2"
+#line 1322 "regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -2886,12 +2888,12 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1427 "regex.h2"
+#line 1429 "regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
-#line 1432 "regex.h2"
+#line 1434 "regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
@@ -2901,7 +2903,7 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1442 "regex.h2"
+#line 1444 "regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -2923,7 +2925,7 @@ size_t i{0};
         }
     }
 
-#line 1463 "regex.h2"
+#line 1465 "regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2936,11 +2938,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1490 "regex.h2"
+#line 1492 "regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1494 "regex.h2"
+#line 1496 "regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -2972,7 +2974,7 @@ size_t i{0};
 
 }
 
-#line 1527 "regex.h2"
+#line 1529 "regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -2980,16 +2982,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1546 "regex.h2"
+#line 1548 "regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1550 "regex.h2"
+#line 1552 "regex.h2"
     }
 
-#line 1552 "regex.h2"
+#line 1554 "regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3082,14 +3084,14 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1644 "regex.h2"
+#line 1646 "regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")"));
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1649 "regex.h2"
+#line 1651 "regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
@@ -3115,7 +3117,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1690 "regex.h2"
+#line 1692 "regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3129,7 +3131,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1703 "regex.h2"
+#line 1705 "regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3257,7 +3259,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1830 "regex.h2"
+#line 1832 "regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3275,7 +3277,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1847 "regex.h2"
+#line 1849 "regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add(("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);"));
@@ -3295,7 +3297,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1866 "regex.h2"
+#line 1868 "regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3305,7 +3307,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1876 "regex.h2"
+#line 1878 "regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3344,7 +3346,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1916 "regex.h2"
+#line 1918 "regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3361,7 +3363,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1932 "regex.h2"
+#line 1934 "regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3374,7 +3376,7 @@ template [[
     }}
 }
 
-#line 1946 "regex.h2"
+#line 1948 "regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3387,35 +3389,35 @@ template [[
     }
 }
 
-#line 1958 "regex.h2"
+#line 1960 "regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1973 "regex.h2"
+#line 1975 "regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1975 "regex.h2"
+#line 1977 "regex.h2"
     }
 
-#line 1977 "regex.h2"
+#line 1979 "regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check(("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")"));
     }
 
-#line 1983 "regex.h2"
+#line 1985 "regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1988 "regex.h2"
+#line 1990 "regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3425,7 +3427,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2000 "regex.h2"
+#line 2002 "regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3450,7 +3452,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ("\\" + cpp2::to_string(ctx.current())), (cpp2::to_string(cpp2::move(name)) + "::match")); 
 }
 
-#line 2040 "regex.h2"
+#line 2042 "regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3475,16 +3477,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2068 "regex.h2"
+#line 2070 "regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2083 "regex.h2"
+#line 2085 "regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2085 "regex.h2"
+#line 2087 "regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3528,7 +3530,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2129 "regex.h2"
+#line 2131 "regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3555,7 +3557,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2155 "regex.h2"
+#line 2157 "regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3567,7 +3569,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2166 "regex.h2"
+#line 2168 "regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3580,7 +3582,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2178 "regex.h2"
+#line 2180 "regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3599,7 +3601,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2196 "regex.h2"
+#line 2198 "regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3610,14 +3612,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, ("cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")"));
     }
 
-#line 2206 "regex.h2"
+#line 2208 "regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2214 "regex.h2"
+#line 2216 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3630,26 +3632,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2226 "regex.h2"
+#line 2228 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2231 "regex.h2"
+#line 2233 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2236 "regex.h2"
+#line 2238 "regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2242 "regex.h2"
+#line 2244 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3665,7 +3667,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2257 "regex.h2"
+#line 2259 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3694,7 +3696,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2285 "regex.h2"
+#line 2287 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3719,7 +3721,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2309 "regex.h2"
+#line 2311 "regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3745,7 +3747,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2340 "regex.h2"
+#line 2342 "regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3768,7 +3770,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error(("'" + cpp2::to_string(ctx.current()) + "' without previous element.")); }
 
-#line 2363 "regex.h2"
+#line 2365 "regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3778,7 +3780,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2375 "regex.h2"
+#line 2377 "regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3795,7 +3797,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2391 "regex.h2"
+#line 2393 "regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3820,32 +3822,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2434 "regex.h2"
+#line 2436 "regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
             , ctx{ ctx_ }
             , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2438 "regex.h2"
+#line 2440 "regex.h2"
         }
 
-#line 2440 "regex.h2"
+#line 2442 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2441 "regex.h2"
+#line 2443 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2442 "regex.h2"
+#line 2444 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2443 "regex.h2"
+#line 2445 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2445 "regex.h2"
+#line 2447 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2446 "regex.h2"
+#line 2448 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2447 "regex.h2"
+#line 2449 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2449 "regex.h2"
+#line 2451 "regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3854,13 +3856,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2458 "regex.h2"
+#line 2460 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2459 "regex.h2"
+#line 2461 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2460 "regex.h2"
+#line 2462 "regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2461 "regex.h2"
+#line 2463 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3868,13 +3870,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2468 "regex.h2"
+#line 2470 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2469 "regex.h2"
+#line 2471 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2470 "regex.h2"
+#line 2472 "regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2471 "regex.h2"
+#line 2473 "regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
         auto r {ctx.fail()}; 
@@ -3894,10 +3896,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2490 "regex.h2"
+#line 2492 "regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2495 "regex.h2"
+#line 2497 "regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3907,15 +3909,15 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2523 "regex.h2"
+#line 2525 "regex.h2"
     template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2526 "regex.h2"
+#line 2528 "regex.h2"
     }
 
-#line 2528 "regex.h2"
+#line 2530 "regex.h2"
     template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
@@ -3951,7 +3953,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2563 "regex.h2"
+#line 2565 "regex.h2"
     template  auto regex_generator::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
@@ -3966,7 +3968,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2578 "regex.h2"
+#line 2580 "regex.h2"
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
     regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
diff --git a/regression-tests/pure2-regex_10_escapes.cpp2 b/regression-tests/pure2-regex_10_escapes.cpp2
index 11901b399e..17d56a0c19 100644
--- a/regression-tests/pure2-regex_10_escapes.cpp2
+++ b/regression-tests/pure2-regex_10_escapes.cpp2
@@ -189,7 +189,7 @@ test_tests_10_escapes: @regex type = {
     test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r");
     test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r");
     test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b");
-    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\abar", "y", R"($&)", "foo\t\n\r\f\abar");
+    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a" "\x1b" "bar", "y", R"($&)", "foo\t\n\r\f\a" "\x1b" "bar");
     test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar");
     test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB");
     test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB");
diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp b/regression-tests/test-results/pure2-regex_10_escapes.cpp
index 9dec2534fb..c1872b4ea2 100644
--- a/regression-tests/test-results/pure2-regex_10_escapes.cpp
+++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp
@@ -811,7 +811,7 @@ template auto test(M const& regex, cpp2::impl::in id, c
     test(regex_14, "14", R"(foo(\v)bar)", "foo\rbar", "y", R"($1)", "\r");
     test(regex_15, "15", R"((\V)(\v))", "foo\rbar", "y", R"($1-$2)", "o-\r");
     test(regex_16, "16", R"((\v)(\V))", "foo\rbar", "y", R"($1-$2)", "\r-b");
-    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\abar", "y", R"($&)", "foo\t\n\r\f\abar");
+    test(regex_17, "17", R"(foo\t\n\r\f\a\ebar)", "foo\t\n\r\f\a""\x1b""bar", "y", R"($&)", "foo\t\n\r\f\a""\x1b""bar");
     test(regex_18, "18", R"(foo\Kbar)", "foobar", "y", R"($&)", "bar");
     test(regex_19, "19", R"(\x41\x42)", "AB", "y", R"($&)", "AB");
     test(regex_20, "20", R"(\101\o{102})", "AB", "y", R"($&)", "AB");
@@ -2211,7 +2211,7 @@ int i{0};
   auto r {ctx.pass(cur)}; 
   do {
 
-  std::array str_tmp_0 {"foo\t\n\r\f\abar"}; 
+  std::array str_tmp_0 {"foo\t\n\r\f\a""\x1b""bar"}; 
   if (cpp2::impl::cmp_less(std::distance(r.pos, ctx.end),12)) {
   r.matched = false;
   break;
diff --git a/source/regex.h2 b/source/regex.h2
index 17f6091ed6..fb67bb5778 100644
--- a/source/regex.h2
+++ b/source/regex.h2
@@ -1253,7 +1253,9 @@ char_token: @polymorphic_base type = {
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
-        //str = string_util::replace_all(str, "\x1b", "\\x{1b}"); // TODO: Add again after https://github.com/hsutter/cppfront/issues/1152 is fixed or concat strings are allowed.
+        str = string_util::replace_all(str, "\x1b", "\" \"\\x1b\" \""); // Generate a separated string. This prevents
+                                                                        // situations like `\x1bblub` from generating
+                                                                        // wrong hex characters.
         str = string_util::replace_all(str, "\n", "\\n");
         str = string_util::replace_all(str, "\r", "\\r");
         str = string_util::replace_all(str, "\t", "\\t");

From f0a76a93821734c632be17a5735bf621cffbc529 Mon Sep 17 00:00:00 2001
From: jarzec 
Date: Sun, 14 Jul 2024 13:28:04 +0200
Subject: [PATCH 153/161] CI update tests

---
 .../mixed-bounds-check.cpp.execution          |  2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |  2 +-
 ...-safety-3-contract-violation.cpp.execution |  2 +-
 ...me-safety-and-null-contracts.cpp.execution |  1 +
 ...re2-assert-expected-not-null.cpp.execution |  2 +-
 ...re2-assert-optional-not-null.cpp.execution |  2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |  2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |  2 +-
 .../mixed-bounds-check.cpp.execution          |  2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |  2 +-
 ...-safety-3-contract-violation.cpp.execution |  2 +-
 ...me-safety-and-null-contracts.cpp.execution |  1 +
 ...re2-assert-optional-not-null.cpp.execution |  2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |  2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |  2 +-
 .../mixed-bounds-check.cpp.execution          |  2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |  2 +-
 ...-safety-3-contract-violation.cpp.execution |  2 +-
 ...me-safety-and-null-contracts.cpp.execution |  1 +
 ...re2-assert-optional-not-null.cpp.execution |  2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |  2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |  2 +-
 .../mixed-bounds-check.cpp.execution          |  2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |  2 +-
 ...-safety-3-contract-violation.cpp.execution |  2 +-
 ...me-safety-and-null-contracts.cpp.execution |  1 +
 ...re2-assert-expected-not-null.cpp.execution |  2 +-
 ...re2-assert-optional-not-null.cpp.execution |  2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |  2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |  2 +-
 .../mixed-bounds-check.cpp.execution          |  2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |  2 +-
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 20 +++++++++----------
 ...-safety-3-contract-violation.cpp.execution |  2 +-
 ...me-safety-and-null-contracts.cpp.execution |  1 +
 ...re2-assert-expected-not-null.cpp.execution |  2 +-
 ...re2-assert-optional-not-null.cpp.execution |  2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |  2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |  2 +-
 .../mixed-bounds-check.cpp.execution          |  2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |  2 +-
 ...-safety-3-contract-violation.cpp.execution |  2 +-
 ...me-safety-and-null-contracts.cpp.execution |  1 +
 .../pure2-assert-expected-not-null.cpp.output |  4 ++--
 ...re2-assert-optional-not-null.cpp.execution |  2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |  2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |  2 +-
 47 files changed, 57 insertions(+), 51 deletions(-)

diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution
index 8474b91594..33edef59f9 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+../../../include/cpp2util.h(729) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution
index 776dc1460f..351026bdaf 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-Bounds safety violation
+../../../include/cpp2util.h(590) : Bounds safety violation
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
index e16104fe58..7af70a4022 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-Contract violation: fill: value must contain at least count elements
+../../../include/cpp2util.h(590) : Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
index f4dd62312e..50447bed2c 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
+from source location: ../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]]
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution
index 8887aa1aa4..7ef489217b 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::expected has an unexpected value
+../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected]: Null safety violation: std::expected has an unexpected value
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution
index c6aeba0fde..a7efa13281 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::optional does not contain a value
+../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
index 85aafbe6a1..92ea0d4062 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::shared_ptr is empty
+../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
index af633d171a..6d94ee858b 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::unique_ptr is empty
+../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution
index 8474b91594..33edef59f9 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+../../../include/cpp2util.h(729) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution
index 776dc1460f..351026bdaf 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-Bounds safety violation
+../../../include/cpp2util.h(590) : Bounds safety violation
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
index e16104fe58..7af70a4022 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-Contract violation: fill: value must contain at least count elements
+../../../include/cpp2util.h(590) : Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
index f4dd62312e..50447bed2c 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
+from source location: ../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]]
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution
index c6aeba0fde..a7efa13281 100644
--- a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::optional does not contain a value
+../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
index 85aafbe6a1..92ea0d4062 100644
--- a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::shared_ptr is empty
+../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
index af633d171a..6d94ee858b 100644
--- a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::unique_ptr is empty
+../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/clang-18-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-18-c++20/mixed-bounds-check.cpp.execution
index 8474b91594..e8f4c97d0a 100644
--- a/regression-tests/test-results/clang-18-c++20/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++20/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+mixed-bounds-check.cpp2(9) int main(): Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert.cpp.execution
index 776dc1460f..9625012ba7 100644
--- a/regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++20/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-Bounds safety violation
+mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto &, cpp2::impl::in, cpp2::impl::in) [rng:auto = std::vector]: Bounds safety violation
diff --git a/regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
index e16104fe58..a27e55f1a5 100644
--- a/regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-Contract violation: fill: value must contain at least count elements
+mixed-initialization-safety-3-contract-violation.cpp2(25) void fill(cpp2::impl::out, cpp2::impl::in, cpp2::impl::in): Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
index f4dd62312e..4ec0f5de65 100644
--- a/regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
+from source location: mixed-lifetime-safety-and-null-contracts.cpp2(17) void try_pointer_stuff()]
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-assert-optional-not-null.cpp.execution
index c6aeba0fde..d474aedd2f 100644
--- a/regression-tests/test-results/clang-18-c++20/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++20/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::optional does not contain a value
+pure2-assert-optional-not-null.cpp2(14) int bad_optional_access(): Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
index 85aafbe6a1..0f68ae7f5d 100644
--- a/regression-tests/test-results/clang-18-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::shared_ptr is empty
+pure2-assert-shared-ptr-not-null.cpp2(15) int bad_shared_ptr_access(): Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/clang-18-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
index af633d171a..02f6a77417 100644
--- a/regression-tests/test-results/clang-18-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::unique_ptr is empty
+pure2-assert-unique-ptr-not-null.cpp2(15) int bad_unique_ptr_access(): Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution
index 8474b91594..e8f4c97d0a 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+mixed-bounds-check.cpp2(9) int main(): Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution
index 776dc1460f..9625012ba7 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-Bounds safety violation
+mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto &, cpp2::impl::in, cpp2::impl::in) [rng:auto = std::vector]: Bounds safety violation
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution
index e16104fe58..a27e55f1a5 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-Contract violation: fill: value must contain at least count elements
+mixed-initialization-safety-3-contract-violation.cpp2(25) void fill(cpp2::impl::out, cpp2::impl::in, cpp2::impl::in): Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution
index f4dd62312e..4ec0f5de65 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
+from source location: mixed-lifetime-safety-and-null-contracts.cpp2(17) void try_pointer_stuff()]
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution
index 8887aa1aa4..6e890f66c8 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-expected-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::expected has an unexpected value
+pure2-assert-expected-not-null.cpp2(15) int bad_expected_access(): Null safety violation: std::expected has an unexpected value
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution
index c6aeba0fde..d474aedd2f 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::optional does not contain a value
+pure2-assert-optional-not-null.cpp2(14) int bad_optional_access(): Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution
index 85aafbe6a1..0f68ae7f5d 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::shared_ptr is empty
+pure2-assert-shared-ptr-not-null.cpp2(15) int bad_shared_ptr_access(): Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution
index af633d171a..02f6a77417 100644
--- a/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-18-c++23-libcpp/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::unique_ptr is empty
+pure2-assert-unique-ptr-not-null.cpp2(15) int bad_unique_ptr_access(): Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-check.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-check.cpp.execution
index 8474b91594..e8f4c97d0a 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+mixed-bounds-check.cpp2(9) int main(): Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution
index 776dc1460f..df39b9060b 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-Bounds safety violation
+mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:95&, cpp2::impl::in, cpp2::impl::in) [with auto:95 = std::vector; cpp2::impl::in = const int]: Bounds safety violation
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 29f4cc1e2b..2ae5e2ce89 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | {
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //  Speculative: RAII wrapping for the C standard library
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | {
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //  Speculative: RAII wrapping for the C standard library
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | {
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //  Speculative: RAII wrapping for the C standard library
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | {
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //  Speculative: RAII wrapping for the C standard library
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | {
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //  Speculative: RAII wrapping for the C standard library
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
index e16104fe58..818a56397d 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-Contract violation: fill: value must contain at least count elements
+mixed-initialization-safety-3-contract-violation.cpp2(25) void fill(cpp2::impl::out >, cpp2::impl::in >, cpp2::impl::in): Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
index f4dd62312e..4ec0f5de65 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
+from source location: mixed-lifetime-safety-and-null-contracts.cpp2(17) void try_pointer_stuff()]
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-expected-not-null.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-expected-not-null.cpp.execution
index 8887aa1aa4..6e890f66c8 100644
--- a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-expected-not-null.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-expected-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::expected has an unexpected value
+pure2-assert-expected-not-null.cpp2(15) int bad_expected_access(): Null safety violation: std::expected has an unexpected value
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-optional-not-null.cpp.execution
index c6aeba0fde..d474aedd2f 100644
--- a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::optional does not contain a value
+pure2-assert-optional-not-null.cpp2(14) int bad_optional_access(): Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
index 85aafbe6a1..0f68ae7f5d 100644
--- a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::shared_ptr is empty
+pure2-assert-shared-ptr-not-null.cpp2(15) int bad_shared_ptr_access(): Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
index af633d171a..02f6a77417 100644
--- a/regression-tests/test-results/gcc-13-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::unique_ptr is empty
+pure2-assert-unique-ptr-not-null.cpp2(15) int bad_unique_ptr_access(): Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-check.cpp.execution
index 8474b91594..21fc34982f 100644
--- a/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+mixed-bounds-check.cpp2(9) int __cdecl main(void): Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-safety-with-assert.cpp.execution
index 776dc1460f..660c8ae71b 100644
--- a/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++20/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-Bounds safety violation
+mixed-bounds-safety-with-assert.cpp2(11) void __cdecl print_subrange >>(const class std::vector > &,const int,const int): Bounds safety violation
diff --git a/regression-tests/test-results/msvc-2022-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
index e16104fe58..0d9bbc59c1 100644
--- a/regression-tests/test-results/msvc-2022-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-Contract violation: fill: value must contain at least count elements
+mixed-initialization-safety-3-contract-violation.cpp2(25) void __cdecl fill(class cpp2::impl::out,class std::allocator > >,const class std::basic_string,class std::allocator > &,const int): Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/msvc-2022-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
index f4dd62312e..762c9ea2c4 100644
--- a/regression-tests/test-results/msvc-2022-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
+from source location: mixed-lifetime-safety-and-null-contracts.cpp2(17) void __cdecl try_pointer_stuff(void)]
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
index 130dae05d2..86ab24cc95 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
@@ -6,7 +6,7 @@ pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' b
 pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-..\..\..\include\cpp2util.h(665): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+..\..\..\include\cpp2util.h(669): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'
 pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std'
 predefined C++ types (compiler internal)(347): note: see declaration of 'std'
 pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected
@@ -19,4 +19,4 @@ pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argumen
 pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-..\..\..\include\cpp2util.h(665): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
+..\..\..\include\cpp2util.h(669): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-optional-not-null.cpp.execution
index c6aeba0fde..c1596fc1d3 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::optional does not contain a value
+pure2-assert-optional-not-null.cpp2(14) int __cdecl bad_optional_access(void): Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
index 85aafbe6a1..a346429451 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::shared_ptr is empty
+pure2-assert-shared-ptr-not-null.cpp2(15) int __cdecl bad_shared_ptr_access(void): Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
index af633d171a..ade26745ab 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-Null safety violation: std::unique_ptr is empty
+pure2-assert-unique-ptr-not-null.cpp2(15) int __cdecl bad_unique_ptr_access(void): Null safety violation: std::unique_ptr is empty

From 5942bdd4aaf2132d443bb6b27954c876983e40d0 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Sun, 14 Jul 2024 14:32:34 +0200
Subject: [PATCH 154/161] Update for tests.

---
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 250 +++---------------
 ...r-non-local-function-expression.cpp.output |  11 +-
 .../pure2-bugfix-for-ufcs-noexcept.cpp.output |  58 ++--
 .../pure2-bugfix-for-ufcs-sfinae.cpp.output   |  74 +++---
 ...mixed-bugfix-for-ufcs-non-local.cpp.output |  61 +----
 ...r-non-local-function-expression.cpp.output |   1 -
 ...mixed-bugfix-for-ufcs-non-local.cpp.output |  61 +----
 .../pure2-assert-expected-not-null.cpp.output |  31 +--
 .../pure2-regex_01_char_matcher.cpp           |   8 +-
 .../test-results/pure2-regex_02_ranges.cpp    |   8 +-
 .../test-results/pure2-regex_03_wildcard.cpp  |   8 +-
 .../test-results/pure2-regex_04_start_end.cpp |   8 +-
 .../test-results/pure2-regex_05_classes.cpp   |   8 +-
 .../pure2-regex_06_boundaries.cpp             |   8 +-
 .../pure2-regex_07_short_classes.cpp          |   8 +-
 .../pure2-regex_08_alternatives.cpp           |   8 +-
 .../test-results/pure2-regex_09_groups.cpp    |   8 +-
 .../test-results/pure2-regex_10_escapes.cpp   |   8 +-
 .../pure2-regex_11_group_references.cpp       |   8 +-
 .../pure2-regex_12_case_insensitive.cpp       |   8 +-
 .../pure2-regex_13_posessive_modifier.cpp     |   8 +-
 .../pure2-regex_14_multiline_modifier.cpp     |   8 +-
 .../pure2-regex_15_group_modifiers.cpp        |   8 +-
 .../pure2-regex_16_perl_syntax_modifier.cpp   |   8 +-
 .../test-results/pure2-regex_17_comments.cpp  |   8 +-
 .../pure2-regex_18_branch_reset.cpp           |   8 +-
 .../test-results/pure2-regex_19_lookahead.cpp |   8 +-
 27 files changed, 221 insertions(+), 478 deletions(-)

diff --git a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
index 556cca128d..12e4860441 100644
--- a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,209 +1,41 @@
-mixed-bugfix-for-ufcs-non-local.cpp2:13:12: error: a lambda expression cannot appear in this context
-template UnnamedTypeParam1_1> bool inline constexpr v0{ false };// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
-           ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:15:3: error: a lambda expression cannot appear in this context
-t inline constexpr v1{ t() };// Fails on Clang 12 (lambda in unevaluated context).
-  ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
-template UnnamedTypeParam1_2> auto g() -> void;
-           ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
-auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void;
-                                         ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
-[[nodiscard]] auto h() -> t;
-                            ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:31:12: error: a lambda expression cannot appear in this context
-template UnnamedTypeParam1_3> using a = bool;// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
-           ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:33:12: error: a lambda expression cannot appear in this context
-template UnnamedTypeParam1_4> auto inline constexpr b{ false };// Fails on GCC ([GCC109781][]).
-           ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:35:13: error: a lambda expression cannot appear in this context
-using c = t;// Fails on Clang 12 (lambda in unevaluated context) and Clang 12 (a lambda expression cannot appear in this context)
-            ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:37:28: error: a lambda expression cannot appear in this context
-auto inline constexpr d{ t() };// Fails on Clang 12 (lambda in unevaluated context).
-                           ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
-template UnnamedTypeParam1_2> auto g() -> void{}// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
-           ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
-auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void{}// Fails on Clang 12 (lambda in unevaluated context).
-                                         ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
-[[nodiscard]] auto h() -> t { return o;  }// Fails on Clang 12 (lambda in unevaluated context).
-                            ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-mixed-bugfix-for-ufcs-non-local.cpp2:41:84: error: lambda expression in an unevaluated operand
-  inline CPP2_CONSTEXPR bool u::c{ [](cpp2::impl::in> x) mutable -> auto { return x; }(true) };// Fails on Clang 12 (lambda in unevaluated context).
-                                                                                   ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-13 errors generated.
+In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
index b82b091296..8b13789179 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
@@ -1,10 +1 @@
-pure2-bugfix-for-non-local-function-expression.cpp2:5:34: error: lambda expression in an unevaluated operand
-template concept v = []() mutable -> bool { return true;  }(); 
-                                 ^
-pure2-bugfix-for-non-local-function-expression.cpp2:7:41: error: lambda expression in an unevaluated operand
-using u = std::type_identity_t void{})>;
-                                        ^
-pure2-bugfix-for-non-local-function-expression.cpp2:9:47: error: lambda expression in an unevaluated operand
-class t: public std::type_identity_t void{})> {
-                                              ^
-3 errors generated.
+
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
index 58325f8bd5..12e4860441 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
@@ -1,17 +1,41 @@
-pure2-bugfix-for-ufcs-noexcept.cpp2:5:26: error: lambda expression in an unevaluated operand
-  static_assert(noexcept(CPP2_UFCS(swap)(t(), t())));// Fails on Clang 12 (lambda in unevaluated context) and GCC 10 (static assertion failed)
-                         ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1171:59: note: expanded from macro 'CPP2_UFCS'
-#define CPP2_UFCS(...)                                    CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2132:59: note: expanded from macro 'CPP2_UFCS'
-#define CPP2_UFCS(...)                                    CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-1 error generated.
+In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
index e15860ea27..12e4860441 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
@@ -1,33 +1,41 @@
-pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
-template [[nodiscard]] auto f() -> std::type_identity_t;
-                                                                             ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
-template [[nodiscard]] auto f() -> std::type_identity_t{}// Fails on Clang 12 (lambda in unevaluated context).
-                                                                             ^
-<<<<<<< HEAD
-../../../include/cpp2util.h:1176:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:1138:66: note: expanded from macro 'CPP2_UFCS_'
-=======
-../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
-#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-                                                          ^
-../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
->>>>>>> origin/main
-#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
-                                                                 ^
-2 errors generated.
+In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
+../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
+ 2100 | //                compiler may not assume it knows anything at all about
+      | ^
+../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
+ 2137 | //
+      |                                                           ^         
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
+mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 3670d1c438..12e4860441 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,82 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-<<<<<<< HEAD
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-=======
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
->>>>>>> origin/main
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output
index 2e0819f639..e69de29bb2 100644
--- a/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output
@@ -1 +0,0 @@
-pure2-bugfix-for-non-local-function-expression.cpp2:9:7: warning: ‘t’ has a base ‘t::’ which has no linkage [-Wsubobject-linkage]
diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 3670d1c438..12e4860441 100644
--- a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,82 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-<<<<<<< HEAD
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:1139:1: error: lambda-expression in template parameter type
- 1139 | [LAMBDADEFCAPT]< \
-      | ^
-../../../include/cpp2util.h:1176:59: note: in expansion of macro ‘CPP2_UFCS_’
- 1176 | #define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
-      |                                                           ^~~~~~~~~~
-=======
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | template
+ 2100 | //                compiler may not assume it knows anything at all about
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | class c_raii {
+ 2137 | //
       |                                                           ^         
->>>>>>> origin/main
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
index 237f6e421e..8b13789179 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
@@ -1,30 +1 @@
-pure2-assert-expected-not-null.cpp
-pure2-assert-expected-not-null.cpp2(7): error C2039: 'expected': is not a member of 'std'
-predefined C++ types (compiler internal)(347): note: see declaration of 'std'
-pure2-assert-expected-not-null.cpp2(7): error C2062: type 'int' unexpected
-pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '{'
-pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}'
-pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier
-pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-<<<<<<< HEAD
-..\..\..\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
-=======
-..\..\..\include\cpp2util.h(665): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
->>>>>>> origin/main
-pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std'
-predefined C++ types (compiler internal)(347): note: see declaration of 'std'
-pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected
-pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '{'
-pure2-assert-expected-not-null.cpp2(14): error C2039: 'unexpected': is not a member of 'std'
-predefined C++ types (compiler internal)(347): note: see declaration of 'std'
-pure2-assert-expected-not-null.cpp2(14): error C2660: 'unexpected': function does not take 1 arguments
-C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.40.33807\include\eh.h(33): note: see declaration of 'unexpected'
-pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argument list '(bool)'
-pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
-pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier
-pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-<<<<<<< HEAD
-..\..\..\include\cpp2util.h(643): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
-=======
-..\..\..\include\cpp2util.h(665): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&)'
->>>>>>> origin/main
+
diff --git a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp
index 1accd85a88..ae3ff7ee42 100644
--- a/regression-tests/test-results/pure2-regex_01_char_matcher.cpp
+++ b/regression-tests/test-results/pure2-regex_01_char_matcher.cpp
@@ -486,22 +486,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 166 "pure2-regex_01_char_matcher.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_02_ranges.cpp b/regression-tests/test-results/pure2-regex_02_ranges.cpp
index 3108a74564..fb632c0370 100644
--- a/regression-tests/test-results/pure2-regex_02_ranges.cpp
+++ b/regression-tests/test-results/pure2-regex_02_ranges.cpp
@@ -1614,22 +1614,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 194 "pure2-regex_02_ranges.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_03_wildcard.cpp b/regression-tests/test-results/pure2-regex_03_wildcard.cpp
index 05fdb90ddb..e6924b841e 100644
--- a/regression-tests/test-results/pure2-regex_03_wildcard.cpp
+++ b/regression-tests/test-results/pure2-regex_03_wildcard.cpp
@@ -864,22 +864,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 174 "pure2-regex_03_wildcard.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_04_start_end.cpp b/regression-tests/test-results/pure2-regex_04_start_end.cpp
index 4ea61817a0..9d53200484 100644
--- a/regression-tests/test-results/pure2-regex_04_start_end.cpp
+++ b/regression-tests/test-results/pure2-regex_04_start_end.cpp
@@ -408,22 +408,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 163 "pure2-regex_04_start_end.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_05_classes.cpp b/regression-tests/test-results/pure2-regex_05_classes.cpp
index 8d1ce48df7..7ec65ccbda 100644
--- a/regression-tests/test-results/pure2-regex_05_classes.cpp
+++ b/regression-tests/test-results/pure2-regex_05_classes.cpp
@@ -668,22 +668,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 173 "pure2-regex_05_classes.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_06_boundaries.cpp b/regression-tests/test-results/pure2-regex_06_boundaries.cpp
index 9d865baed7..2f750e0815 100644
--- a/regression-tests/test-results/pure2-regex_06_boundaries.cpp
+++ b/regression-tests/test-results/pure2-regex_06_boundaries.cpp
@@ -616,22 +616,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 171 "pure2-regex_06_boundaries.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_07_short_classes.cpp b/regression-tests/test-results/pure2-regex_07_short_classes.cpp
index b16d2d53a3..5ae55bacd5 100644
--- a/regression-tests/test-results/pure2-regex_07_short_classes.cpp
+++ b/regression-tests/test-results/pure2-regex_07_short_classes.cpp
@@ -798,22 +798,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 178 "pure2-regex_07_short_classes.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_08_alternatives.cpp b/regression-tests/test-results/pure2-regex_08_alternatives.cpp
index 751b45b8b8..543190ff2d 100644
--- a/regression-tests/test-results/pure2-regex_08_alternatives.cpp
+++ b/regression-tests/test-results/pure2-regex_08_alternatives.cpp
@@ -256,22 +256,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 156 "pure2-regex_08_alternatives.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_09_groups.cpp b/regression-tests/test-results/pure2-regex_09_groups.cpp
index 6a15e9d400..a37dda119e 100644
--- a/regression-tests/test-results/pure2-regex_09_groups.cpp
+++ b/regression-tests/test-results/pure2-regex_09_groups.cpp
@@ -460,22 +460,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 165 "pure2-regex_09_groups.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_10_escapes.cpp b/regression-tests/test-results/pure2-regex_10_escapes.cpp
index c1872b4ea2..f879aebdf9 100644
--- a/regression-tests/test-results/pure2-regex_10_escapes.cpp
+++ b/regression-tests/test-results/pure2-regex_10_escapes.cpp
@@ -774,22 +774,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 174 "pure2-regex_10_escapes.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_11_group_references.cpp b/regression-tests/test-results/pure2-regex_11_group_references.cpp
index 8f239cd775..3161c25782 100644
--- a/regression-tests/test-results/pure2-regex_11_group_references.cpp
+++ b/regression-tests/test-results/pure2-regex_11_group_references.cpp
@@ -918,22 +918,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 178 "pure2-regex_11_group_references.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp
index 93bfeceadf..5fa4130efe 100644
--- a/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp
+++ b/regression-tests/test-results/pure2-regex_12_case_insensitive.cpp
@@ -4713,22 +4713,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 273 "pure2-regex_12_case_insensitive.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp b/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
index 79de954802..1df4293c04 100644
--- a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
+++ b/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
@@ -2422,22 +2422,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 202 "pure2-regex_13_posessive_modifier.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp
index 2e1eddd171..ed4eb5dfc6 100644
--- a/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp
+++ b/regression-tests/test-results/pure2-regex_14_multiline_modifier.cpp
@@ -5348,22 +5348,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 353 "pure2-regex_14_multiline_modifier.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp
index 48f733811a..d8b4cf6910 100644
--- a/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp
+++ b/regression-tests/test-results/pure2-regex_15_group_modifiers.cpp
@@ -1582,22 +1582,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 207 "pure2-regex_15_group_modifiers.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp
index 7ce768eb80..f35365f506 100644
--- a/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp
+++ b/regression-tests/test-results/pure2-regex_16_perl_syntax_modifier.cpp
@@ -1192,22 +1192,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 187 "pure2-regex_16_perl_syntax_modifier.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_17_comments.cpp b/regression-tests/test-results/pure2-regex_17_comments.cpp
index 21cf2d0788..2e772618ab 100644
--- a/regression-tests/test-results/pure2-regex_17_comments.cpp
+++ b/regression-tests/test-results/pure2-regex_17_comments.cpp
@@ -272,22 +272,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 157 "pure2-regex_17_comments.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp
index 74e76160d5..1e6e056785 100644
--- a/regression-tests/test-results/pure2-regex_18_branch_reset.cpp
+++ b/regression-tests/test-results/pure2-regex_18_branch_reset.cpp
@@ -1094,22 +1094,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 169 "pure2-regex_18_branch_reset.cpp2"
diff --git a/regression-tests/test-results/pure2-regex_19_lookahead.cpp b/regression-tests/test-results/pure2-regex_19_lookahead.cpp
index 5ba0ea42ad..78bbec6625 100644
--- a/regression-tests/test-results/pure2-regex_19_lookahead.cpp
+++ b/regression-tests/test-results/pure2-regex_19_lookahead.cpp
@@ -2354,22 +2354,22 @@ template auto test(M const& regex, cpp2::impl::in id, c
       auto result {create_result(resultExpr, cpp2::move(r))}; 
 
       if (result != resultExpected) {
-        status = { "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")" };
+        status = "Failure: Result is wrong. (is: " + cpp2::to_string(cpp2::move(result)) + ")";
       }
     }
   }
   else {if ("n" == kind) {
     if (r.matched) {
-      status = { "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'" };
+      status = "Failure: Regex should not apply. Result is '" + cpp2::to_string(CPP2_UFCS(group)(cpp2::move(r), 0)) + "'";
     }
   }else {
-    status = { "Unknown kind '" + cpp2::to_string(kind) + "'" };
+    status = "Unknown kind '" + cpp2::to_string(kind) + "'";
   }}
 
   if (!(CPP2_UFCS(empty)(warning))) {
     warning += " ";
   }
-  std::cout << (cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected)) << std::endl;
+  std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
 #line 199 "pure2-regex_19_lookahead.cpp2"

From b99d10e19f9da14265d45c9516ccdd7349d5fdd2 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 15 Jul 2024 08:26:05 +0200
Subject: [PATCH 155/161] Update for test results.

---
 .../mixed-bounds-check.cpp.execution          |   2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |   2 +-
 ...-safety-3-contract-violation.cpp.execution |   2 +-
 ...me-safety-and-null-contracts.cpp.execution |   2 +-
 ...re2-assert-expected-not-null.cpp.execution |   2 +-
 ...re2-assert-optional-not-null.cpp.execution |   2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |   2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |   2 +-
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 159 +++++++++++++-----
 ...r-non-local-function-expression.cpp.output |  11 +-
 .../pure2-bugfix-for-ufcs-noexcept.cpp.output |  51 ++----
 .../pure2-bugfix-for-ufcs-sfinae.cpp.output   |  60 +++----
 .../mixed-bounds-check.cpp.execution          |   2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |   2 +-
 ...-safety-3-contract-violation.cpp.execution |   2 +-
 ...me-safety-and-null-contracts.cpp.execution |   2 +-
 ...re2-assert-optional-not-null.cpp.execution |   2 +-
 ...2-assert-shared-ptr-not-null.cpp.execution |   2 +-
 ...2-assert-unique-ptr-not-null.cpp.execution |   2 +-
 ...ed-bounds-safety-with-assert.cpp.execution |   2 +-
 ...r-non-local-function-expression.cpp.output |   1 +
 ...ed-bounds-safety-with-assert.cpp.execution |   2 +-
 ...mixed-bugfix-for-ufcs-non-local.cpp.output |  20 +--
 .../pure2-assert-expected-not-null.cpp.output |   4 +-
 24 files changed, 187 insertions(+), 153 deletions(-)

diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution
index 33edef59f9..a1c13402c3 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(729) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+../../../include/cpp2util.h(733) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution
index 351026bdaf..8332298aed 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(590) : Bounds safety violation
+../../../include/cpp2util.h(594) : Bounds safety violation
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
index 7af70a4022..4663ae3aa1 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(590) : Contract violation: fill: value must contain at least count elements
+../../../include/cpp2util.h(594) : Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
index 50447bed2c..b0347698ed 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1,2 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
-from source location: ../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]]
+from source location: ../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]]
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution
index 7ef489217b..b854d58b61 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-expected-not-null.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected]: Null safety violation: std::expected has an unexpected value
+../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected]: Null safety violation: std::expected has an unexpected value
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution
index a7efa13281..99f33cd437 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value
+../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
index 92ea0d4062..006eaebf1b 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty
+../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
index 6d94ee858b..aafd8b647a 100644
--- a/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/apple-clang-15-c++2b/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty
+../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
index 12e4860441..f9e8cae868 100644
--- a/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,118 @@
-In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
+mixed-bugfix-for-ufcs-non-local.cpp2:13:12: error: a lambda expression cannot appear in this context
+template UnnamedTypeParam1_1> bool inline constexpr v0{ false };// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
+           ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:15:3: error: a lambda expression cannot appear in this context
+t inline constexpr v1{ t() };// Fails on Clang 12 (lambda in unevaluated context).
+  ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
+template UnnamedTypeParam1_2> auto g() -> void;
+           ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
+auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void;
+                                         ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
+[[nodiscard]] auto h() -> t;
+                            ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:31:12: error: a lambda expression cannot appear in this context
+template UnnamedTypeParam1_3> using a = bool;// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
+           ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:33:12: error: a lambda expression cannot appear in this context
+template UnnamedTypeParam1_4> auto inline constexpr b{ false };// Fails on GCC ([GCC109781][]).
+           ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:35:13: error: a lambda expression cannot appear in this context
+using c = t;// Fails on Clang 12 (lambda in unevaluated context) and Clang 12 (a lambda expression cannot appear in this context)
+            ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:37:28: error: a lambda expression cannot appear in this context
+auto inline constexpr d{ t() };// Fails on Clang 12 (lambda in unevaluated context).
+                           ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:21:12: error: a lambda expression cannot appear in this context
+template UnnamedTypeParam1_2> auto g() -> void{}// Fails on GCC ([GCC109781][]) and Clang 12 (a lambda expression cannot appear in this context)
+           ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:23:42: error: a lambda expression cannot appear in this context
+auto g([[maybe_unused]] cpp2::impl::in> unnamed_param_1) -> void{}// Fails on Clang 12 (lambda in unevaluated context).
+                                         ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:27:29: error: a lambda expression cannot appear in this context
+[[nodiscard]] auto h() -> t { return o;  }// Fails on Clang 12 (lambda in unevaluated context).
+                            ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+mixed-bugfix-for-ufcs-non-local.cpp2:41:84: error: lambda expression in an unevaluated operand
+  inline CPP2_CONSTEXPR bool u::c{ [](cpp2::impl::in> x) mutable -> auto { return x; }(true) };// Fails on Clang 12 (lambda in unevaluated context).
+                                                                                   ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+13 errors generated.
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
index 8b13789179..f7730be0d0 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
@@ -1 +1,10 @@
-
+pure2-bugfix-for-non-local-function-expression.cpp2:5:34: error: lambda expression in an unevaluated operand
+template concept v = []() mutable -> bool { return true;  }();
+                                 ^
+pure2-bugfix-for-non-local-function-expression.cpp2:7:41: error: lambda expression in an unevaluated operand
+using u = std::type_identity_t void{})>;
+                                        ^
+pure2-bugfix-for-non-local-function-expression.cpp2:9:47: error: lambda expression in an unevaluated operand
+class t: public std::type_identity_t void{})> {
+                                              ^
+3 errors generated.
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
index 12e4860441..a859e400b6 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-noexcept.cpp.output
@@ -1,41 +1,10 @@
-In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
+pure2-bugfix-for-ufcs-noexcept.cpp2:5:26: error: lambda expression in an unevaluated operand
+  static_assert(noexcept(CPP2_UFCS(swap)(t(), t())));// Fails on Clang 12 (lambda in unevaluated context) and GCC 10 (static assertion failed)
+                         ^
+../../../include/cpp2util.h:2132:59: note: expanded from macro 'CPP2_UFCS'
+#define CPP2_UFCS(...)                                    CPP2_UFCS_(&,CPP2_UFCS_EMPTY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+1 error generated.
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
index 12e4860441..71e5b2b909 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-ufcs-sfinae.cpp.output
@@ -1,41 +1,19 @@
-In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
-../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | //                compiler may not assume it knows anything at all about
-      | ^
-../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //
-      |                                                           ^         
-mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
-mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
+pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
+template [[nodiscard]] auto f() -> std::type_identity_t;
+                                                                             ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+pure2-bugfix-for-ufcs-sfinae.cpp2:1:78: error: lambda expression in an unevaluated operand
+template [[nodiscard]] auto f() -> std::type_identity_t{}// Fails on Clang 12 (lambda in unevaluated context).
+                                                                             ^
+../../../include/cpp2util.h:2137:59: note: expanded from macro 'CPP2_UFCS_NONLOCAL'
+#define CPP2_UFCS_NONLOCAL(...)                           CPP2_UFCS_(,CPP2_UFCS_IDENTITY,CPP2_UFCS_IDENTITY,(),,__VA_ARGS__)
+                                                          ^
+../../../include/cpp2util.h:2099:66: note: expanded from macro 'CPP2_UFCS_'
+#define CPP2_UFCS_(LAMBDADEFCAPT,SFINAE,MVFWD,QUALID,TEMPKW,...) \
+                                                                 ^
+2 errors generated.
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution
index 33edef59f9..a1c13402c3 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-check.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(729) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
+../../../include/cpp2util.h(733) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution
index 351026bdaf..8332298aed 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(590) : Bounds safety violation
+../../../include/cpp2util.h(594) : Bounds safety violation
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
index 7af70a4022..4663ae3aa1 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-initialization-safety-3-contract-violation.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(590) : Contract violation: fill: value must contain at least count elements
+../../../include/cpp2util.h(594) : Contract violation: fill: value must contain at least count elements
diff --git a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
index 50447bed2c..b0347698ed 100644
--- a/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/mixed-lifetime-safety-and-null-contracts.cpp.execution
@@ -1,2 +1,2 @@
 sending error to my framework... [dynamic null dereference attempt detected]
-from source location: ../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]]
+from source location: ../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]]
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution
index a7efa13281..99f33cd437 100644
--- a/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-optional-not-null.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value
+../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional]: Null safety violation: std::optional does not contain a value
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
index 92ea0d4062..006eaebf1b 100644
--- a/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-shared-ptr-not-null.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty
+../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr]: Null safety violation: std::shared_ptr is empty
diff --git a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
index 6d94ee858b..aafd8b647a 100644
--- a/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
+++ b/regression-tests/test-results/clang-15-c++20/pure2-assert-unique-ptr-not-null.cpp.execution
@@ -1 +1 @@
-../../../include/cpp2util.h(669) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty
+../../../include/cpp2util.h(673) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr &]: Null safety violation: std::unique_ptr is empty
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution
index df39b9060b..d7550af325 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:95&, cpp2::impl::in, cpp2::impl::in) [with auto:95 = std::vector; cpp2::impl::in = const int]: Bounds safety violation
+mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:261&, cpp2::impl::in, cpp2::impl::in) [with auto:261 = std::vector; cpp2::impl::in = const int]: Bounds safety violation
diff --git a/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output b/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output
index e69de29bb2..2e0819f639 100644
--- a/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output
+++ b/regression-tests/test-results/gcc-13-c++2b/pure2-bugfix-for-non-local-function-expression.cpp.output
@@ -0,0 +1 @@
+pure2-bugfix-for-non-local-function-expression.cpp2:9:7: warning: ‘t’ has a base ‘t::’ which has no linkage [-Wsubobject-linkage]
diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution
index 01a4b2e1a2..e74faf8ba2 100644
--- a/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution
+++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution
@@ -1 +1 @@
-mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:89&, cpp2::impl::in, cpp2::impl::in) [with auto:89 = std::vector; cpp2::impl::in = const int]: Bounds safety violation
+mixed-bounds-safety-with-assert.cpp2(11) void print_subrange(const auto:255&, cpp2::impl::in, cpp2::impl::in) [with auto:255 = std::vector; cpp2::impl::in = const int]: Bounds safety violation
diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 2ae5e2ce89..0a52324652 100644
--- a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
diff --git a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
index 86ab24cc95..77c19b3a1e 100644
--- a/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
+++ b/regression-tests/test-results/msvc-2022-c++20/pure2-assert-expected-not-null.cpp.output
@@ -6,7 +6,7 @@ pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' b
 pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-..\..\..\include\cpp2util.h(669): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'
+D:\a\cppfront\cppfront\include\cpp2util.h(673): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'
 pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std'
 predefined C++ types (compiler internal)(347): note: see declaration of 'std'
 pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected
@@ -19,4 +19,4 @@ pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argumen
 pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
 pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier
 pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
-..\..\..\include\cpp2util.h(669): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'
+D:\a\cppfront\cppfront\include\cpp2util.h(673): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'

From b089f0297a0cdecaa23c7d0bf86b383a6882da54 Mon Sep 17 00:00:00 2001
From: Max Sagebaum 
Date: Mon, 15 Jul 2024 08:54:44 +0200
Subject: [PATCH 156/161] Update for regression tests.

---
 ...r-non-local-function-expression.cpp.output |  2 +-
 ...mixed-bugfix-for-ufcs-non-local.cpp.output | 20 +++++++++----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
index f7730be0d0..b82b091296 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
+++ b/regression-tests/test-results/clang-12-c++20/pure2-bugfix-for-non-local-function-expression.cpp.output
@@ -1,5 +1,5 @@
 pure2-bugfix-for-non-local-function-expression.cpp2:5:34: error: lambda expression in an unevaluated operand
-template concept v = []() mutable -> bool { return true;  }();
+template concept v = []() mutable -> bool { return true;  }(); 
                                  ^
 pure2-bugfix-for-non-local-function-expression.cpp2:7:41: error: lambda expression in an unevaluated operand
 using u = std::type_identity_t void{})>;
diff --git a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 2ae5e2ce89..0a52324652 100644
--- a/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-13-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 | {
+ 2100 |     char**             argv = nullptr;
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | //  Speculative: RAII wrapping for the C standard library
+ 2137 | 
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid

From 9577a0b5b946cd3e68c92840298651d2e45719d3 Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Fri, 19 Jul 2024 12:21:31 -1000
Subject: [PATCH 157/161] Reran regressions on my box - whitespace changes only

Probably line-ends

Plus an MSVC minor version update

Committing this just-whitespace update to clear the diff list before I make any review changes/renames...
---
 .../msvc-2022-c++latest/MSVC-version.output   |  2 +-
 .../pure2-regex_10_escapes.cpp.execution      | 26 +++++++++----------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output b/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output
index ca1298b64f..6c92c9d8dc 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output
+++ b/regression-tests/test-results/msvc-2022-c++latest/MSVC-version.output
@@ -1,3 +1,3 @@
-Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33811 for x64
+Microsoft (R) C/C++ Optimizing Compiler Version 19.40.33812 for x64
 Copyright (C) Microsoft Corporation.  All rights reserved.
 
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
index fe6e6efc96..14d06c270a 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_10_escapes.cpp.execution
@@ -9,26 +9,26 @@ Running tests_10_escapes:
 08_y: OK regex: foo(\h)bar parsed_regex: foo(\h)bar str: foo	bar result_expr: $1 expected_results 	
 09_y: OK regex: (\H)(\h) parsed_regex: (\H)(\h) str: foo	bar result_expr: $1-$2 expected_results o-	
 10_y: OK regex: (\h)(\H) parsed_regex: (\h)(\H) str: foo	bar result_expr: $1-$2 expected_results 	-b
-11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+11_y: OK regex: foo(\v+)bar parsed_regex: foo(\v+)bar str: foo
+
 
+bar result_expr: $1 expected_results 
+
 
-bar result_expr: $1 expected_results 
 
+12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
+
 
+bar result_expr: $1-$2 expected_results foo-
+13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
+
 
-12_y: OK regex: (\V+)(\v) parsed_regex: (\V+)(\v) str: foo
-
-
-bar result_expr: $1-$2 expected_results foo-
-13_y: OK regex: (\v+)(\V) parsed_regex: (\v+)(\V) str: foo
-
-
-bar result_expr: $1-$2 expected_results 
-
+bar result_expr: $1-$2 expected_results 
+
 
 -b
-14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
-15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
+14_y: OK regex: foo(\v)bar parsed_regex: foo(\v)bar str: foo
bar result_expr: $1 expected_results 
+15_y: OK regex: (\V)(\v) parsed_regex: (\V)(\v) str: foo
bar result_expr: $1-$2 expected_results o-
 16_y: OK regex: (\v)(\V) parsed_regex: (\v)(\V) str: foo
bar result_expr: $1-$2 expected_results 
-b
 17_y: OK regex: foo\t\n\r\f\a\ebar parsed_regex: foo\t\n\r\f\a\ebar str: foo	
 
bar result_expr: $& expected_results foo	

From 85b84580319ed3f45d811d3e3afbbf0a697a44d3 Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Fri, 19 Jul 2024 13:16:31 -1000
Subject: [PATCH 158/161] Move & rename source/regex.h2 to include/cpp2regex.h2

In this project I'm trying to build *.h2 files in the same directory as the *.h they generate, and keep the same name

In /include, "cpp2util.h" is named that way because it really is the Cpp2 run-time library... For regex, we could name it regex.h(2) or cpp2regex.h(2)... the argument for using "cpp2" is because it really does include additional run-time support for what will now be one of the Cpp2-built-in metafunctions... anyway we can always revisit that in the future...
---
 .gitignore                              |    1 +
 include/cpp2regex.h                     | 1004 +++++++++++------------
 source/regex.h2 => include/cpp2regex.h2 |    0
 3 files changed, 503 insertions(+), 502 deletions(-)
 rename source/regex.h2 => include/cpp2regex.h2 (100%)

diff --git a/.gitignore b/.gitignore
index 753ffc66af..f5e7ccfa01 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,3 +36,4 @@ venv/*
 
 # VSCode workspace directory
 .vscode/
+buildh2.bat
diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index aa39af83f9..ec139783d6 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -1,6 +1,6 @@
 
-#ifndef ___INCLUDE_CPP2REGEX_H_CPP2
-#define ___INCLUDE_CPP2REGEX_H_CPP2
+#ifndef CPP2REGEX_H_CPP2
+#define CPP2REGEX_H_CPP2
 
 
 //=== Cpp2 type declarations ====================================================
@@ -8,169 +8,169 @@
 
 #include "cpp2util.h"
 
-#line 1 "regex.h2"
+#line 1 "cpp2regex.h2"
 
-#line 23 "regex.h2"
+#line 23 "cpp2regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 39 "regex.h2"
+#line 39 "cpp2regex.h2"
 class expression_flags;
     
 
-#line 50 "regex.h2"
+#line 50 "cpp2regex.h2"
 template class match_group;
     
 
-#line 59 "regex.h2"
+#line 59 "cpp2regex.h2"
 template class match_return;
     
 
-#line 66 "regex.h2"
+#line 66 "cpp2regex.h2"
 template class match_context;
 
-#line 128 "regex.h2"
+#line 128 "cpp2regex.h2"
 class true_end_func;
     
 
-#line 134 "regex.h2"
+#line 134 "cpp2regex.h2"
 class no_reset;
     
 
-#line 139 "regex.h2"
+#line 139 "cpp2regex.h2"
 template class on_return;
 
-#line 164 "regex.h2"
+#line 164 "cpp2regex.h2"
 template class single_class_entry;
 
-#line 172 "regex.h2"
+#line 172 "cpp2regex.h2"
 template class range_class_entry;
 
-#line 180 "regex.h2"
+#line 180 "cpp2regex.h2"
 template class combined_class_entry;
     
 
-#line 187 "regex.h2"
+#line 187 "cpp2regex.h2"
 template class list_class_entry;
     
 
-#line 194 "regex.h2"
+#line 194 "cpp2regex.h2"
 template class named_class_entry;
     
 
-#line 199 "regex.h2"
+#line 199 "cpp2regex.h2"
 template class negated_class_entry;
     
 
-#line 206 "regex.h2"
+#line 206 "cpp2regex.h2"
 template class shorthand_class_entry;
     
 
-#line 258 "regex.h2"
+#line 258 "cpp2regex.h2"
 class regex_token;
 
-#line 283 "regex.h2"
+#line 283 "cpp2regex.h2"
 class regex_token_check;
     
 
-#line 299 "regex.h2"
+#line 299 "cpp2regex.h2"
 class regex_token_code;
     
 
-#line 315 "regex.h2"
+#line 315 "cpp2regex.h2"
 class regex_token_empty;
     
 
-#line 329 "regex.h2"
+#line 329 "cpp2regex.h2"
 class regex_token_list;
     
 
-#line 369 "regex.h2"
+#line 369 "cpp2regex.h2"
 class parse_context_group_state;
 
-#line 430 "regex.h2"
+#line 430 "cpp2regex.h2"
 class parse_context_branch_reset_state;
     
 
-#line 471 "regex.h2"
+#line 471 "cpp2regex.h2"
 class parse_context;
     
 
-#line 853 "regex.h2"
+#line 853 "cpp2regex.h2"
 class generation_function_context;
     
 
-#line 870 "regex.h2"
+#line 870 "cpp2regex.h2"
 class generation_context;
 
-#line 1065 "regex.h2"
+#line 1065 "cpp2regex.h2"
 class alternative_token;
     
 
-#line 1079 "regex.h2"
+#line 1079 "cpp2regex.h2"
 class alternative_token_gen;
     
 
-#line 1124 "regex.h2"
+#line 1124 "cpp2regex.h2"
 template class alternative_token_matcher;
 
-#line 1150 "regex.h2"
+#line 1150 "cpp2regex.h2"
 class any_token;
     
 
-#line 1177 "regex.h2"
+#line 1177 "cpp2regex.h2"
 class char_token;
     
 
-#line 1307 "regex.h2"
+#line 1307 "cpp2regex.h2"
 class class_token;
     
 
-#line 1442 "regex.h2"
+#line 1442 "cpp2regex.h2"
 template class class_token_matcher;
 
-#line 1542 "regex.h2"
+#line 1542 "cpp2regex.h2"
 class group_ref_token;
     
 
-#line 1686 "regex.h2"
+#line 1686 "cpp2regex.h2"
 class group_token;
     
 
-#line 1969 "regex.h2"
+#line 1969 "cpp2regex.h2"
 class lookahead_token;
     
 
-#line 2069 "regex.h2"
+#line 2069 "cpp2regex.h2"
 class range_flags;
     
 
-#line 2077 "regex.h2"
+#line 2077 "cpp2regex.h2"
 class range_token;
     
 
-#line 2214 "regex.h2"
+#line 2214 "cpp2regex.h2"
 template class range_token_matcher;
 
-#line 2339 "regex.h2"
+#line 2339 "cpp2regex.h2"
 class special_range_token;
     
 
-#line 2426 "regex.h2"
+#line 2426 "cpp2regex.h2"
 template class regular_expression;
 
-#line 2515 "regex.h2"
+#line 2515 "cpp2regex.h2"
 template class regex_generator;
 
-#line 2587 "regex.h2"
+#line 2587 "cpp2regex.h2"
 }
 }
 
 
 //=== Cpp2 type definitions and function declarations ===========================
 
-#line 1 "regex.h2"
+#line 1 "cpp2regex.h2"
 
 //  Copyright (c) Herb Sutter
 //  SPDX-License-Identifier: CC-BY-NC-ND-4.0
@@ -193,7 +193,7 @@ using matcher_context_type = typename matcher::context;
 
 using error_func = std::function;
 
-#line 23 "regex.h2"
+#line 23 "cpp2regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -201,7 +201,7 @@ namespace regex {
 template using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
-#line 39 "regex.h2"
+#line 39 "cpp2regex.h2"
 class expression_flags {
 private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val);
 
@@ -231,10 +231,10 @@ public: constexpr auto operator=(expression_flags&& that) noexcept -> expression
 public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default;
 public: [[nodiscard]] auto to_string() const& -> std::string;
 
-#line 46 "regex.h2"
+#line 46 "cpp2regex.h2"
 };
 
-#line 50 "regex.h2"
+#line 50 "cpp2regex.h2"
 template class match_group {
     public: Iter start {}; 
     public: Iter end {}; 
@@ -243,20 +243,20 @@ template class match_group {
     public: match_group(auto const& start_, auto const& end_, auto const& matched_);
 public: match_group();
 
-#line 55 "regex.h2"
+#line 55 "cpp2regex.h2"
 };
 
-#line 59 "regex.h2"
+#line 59 "cpp2regex.h2"
 template class match_return {
     public: bool matched {false}; 
     public: Iter pos {}; 
     public: match_return(auto const& matched_, auto const& pos_);
 public: match_return();
 
-#line 62 "regex.h2"
+#line 62 "cpp2regex.h2"
 };
 
-#line 66 "regex.h2"
+#line 66 "cpp2regex.h2"
 template class match_context
  {
     public: Iter begin; 
@@ -266,76 +266,76 @@ template class match_context
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     public: match_context(match_context const& that);
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-#line 82 "regex.h2"
+#line 82 "cpp2regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 90 "regex.h2"
+#line 90 "cpp2regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 96 "regex.h2"
+#line 96 "cpp2regex.h2"
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 103 "regex.h2"
+#line 103 "cpp2regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 108 "regex.h2"
+#line 108 "cpp2regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 112 "regex.h2"
+#line 112 "cpp2regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 116 "regex.h2"
+#line 116 "cpp2regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-#line 121 "regex.h2"
+#line 121 "cpp2regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> auto;
 
 };
 
-#line 128 "regex.h2"
+#line 128 "cpp2regex.h2"
 class true_end_func {
     public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
 };
 
-#line 134 "regex.h2"
+#line 134 "cpp2regex.h2"
 class no_reset {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
 
-#line 139 "regex.h2"
+#line 139 "cpp2regex.h2"
 template class on_return {
 
     private: Func func; 
 
     public: explicit on_return(Func const& f);
-#line 143 "regex.h2"
+#line 143 "cpp2regex.h2"
     public: auto operator=(Func const& f) -> on_return& ;
 
-#line 147 "regex.h2"
+#line 147 "cpp2regex.h2"
     public: ~on_return() noexcept;
     public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(on_return const&) -> void = delete;
 
 
-#line 150 "regex.h2"
+#line 150 "cpp2regex.h2"
 };
 
-#line 153 "regex.h2"
+#line 153 "cpp2regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
 
-#line 164 "regex.h2"
+#line 164 "cpp2regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -344,10 +344,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 168 "regex.h2"
+#line 168 "cpp2regex.h2"
 };
 
-#line 172 "regex.h2"
+#line 172 "cpp2regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -356,10 +356,10 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 176 "regex.h2"
+#line 176 "cpp2regex.h2"
 };
 
-#line 180 "regex.h2"
+#line 180 "cpp2regex.h2"
 template class combined_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -367,10 +367,10 @@ template class combined_class_entry {
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 183 "regex.h2"
+#line 183 "cpp2regex.h2"
 };
 
-#line 187 "regex.h2"
+#line 187 "cpp2regex.h2"
 template class list_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -378,10 +378,10 @@ template class list_class_entry {
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 190 "regex.h2"
+#line 190 "cpp2regex.h2"
 };
 
-#line 194 "regex.h2"
+#line 194 "cpp2regex.h2"
 template class named_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -389,7 +389,7 @@ template class n
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 197 "regex.h2"
+#line 197 "cpp2regex.h2"
 };
 
 template class negated_class_entry: public Inner {
@@ -399,10 +399,10 @@ template class negated_class_entry: public Inner
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 202 "regex.h2"
+#line 202 "cpp2regex.h2"
 };
 
-#line 206 "regex.h2"
+#line 206 "cpp2regex.h2"
 template class shorthand_class_entry {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
@@ -410,15 +410,15 @@ template class s
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 209 "regex.h2"
+#line 209 "cpp2regex.h2"
 };
 
-#line 214 "regex.h2"
+#line 214 "cpp2regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 220 "regex.h2"
+#line 220 "cpp2regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -433,31 +433,31 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 236 "regex.h2"
+#line 236 "cpp2regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 243 "regex.h2"
+#line 243 "cpp2regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 258 "regex.h2"
+#line 258 "cpp2regex.h2"
 class regex_token {
 
     public: std::string string_rep; 
 
     public: explicit regex_token(cpp2::impl::in str);
 
-#line 266 "regex.h2"
+#line 266 "cpp2regex.h2"
     public: explicit regex_token();
 
-#line 271 "regex.h2"
+#line 271 "cpp2regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void;
@@ -468,7 +468,7 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 276 "regex.h2"
+#line 276 "cpp2regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
@@ -478,12 +478,12 @@ using token_vec = std::vector;
 //
 class regex_token_check: public regex_token {
 
-#line 286 "regex.h2"
+#line 286 "cpp2regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 293 "regex.h2"
+#line 293 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -491,18 +491,18 @@ class regex_token_check: public regex_token {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 296 "regex.h2"
+#line 296 "cpp2regex.h2"
 };
 
 // Adds code in code generation.
 class regex_token_code: public regex_token {
 
-#line 302 "regex.h2"
+#line 302 "cpp2regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 309 "regex.h2"
+#line 309 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -510,16 +510,16 @@ class regex_token_code: public regex_token {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 312 "regex.h2"
+#line 312 "cpp2regex.h2"
 };
 
 // Token that does not influence the matching. E.g. comment.
 class regex_token_empty: public regex_token {
 
-#line 318 "regex.h2"
+#line 318 "cpp2regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 322 "regex.h2"
+#line 322 "cpp2regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -527,25 +527,25 @@ class regex_token_empty: public regex_token {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 325 "regex.h2"
+#line 325 "cpp2regex.h2"
 };
 
 // Represents a list of regex tokens as one token.
 //
 class regex_token_list: public regex_token {
 
-#line 332 "regex.h2"
+#line 332 "cpp2regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 339 "regex.h2"
+#line 339 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 345 "regex.h2"
+#line 345 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 351 "regex.h2"
+#line 351 "cpp2regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -553,7 +553,7 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 358 "regex.h2"
+#line 358 "cpp2regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -567,7 +567,7 @@ class regex_token_list: public regex_token {
 //
 class parse_context_group_state {
 
-#line 372 "regex.h2"
+#line 372 "cpp2regex.h2"
     public: token_vec cur_match_list {};           // Current list of matchers.
     public: token_vec alternate_match_lists {};    // List of alternate matcher lists. E.g. ab|cd|xy.
     public: expression_flags modifiers {};         // Current modifiers for the group/regular expression.
@@ -575,30 +575,30 @@ class parse_context_group_state {
     // Start a new alternative.
     public: auto next_alternative() & -> void;
 
-#line 384 "regex.h2"
+#line 384 "cpp2regex.h2"
     // Swap this state with the other one.
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 391 "regex.h2"
+#line 391 "cpp2regex.h2"
     // Convert this state into a regex token.
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 403 "regex.h2"
+#line 403 "cpp2regex.h2"
     // Add a token to the current matcher list.
     public: auto add(cpp2::impl::in token) & -> void;
 
-#line 408 "regex.h2"
+#line 408 "cpp2regex.h2"
     // True if current matcher list is empty.
     public: [[nodiscard]] auto empty() const& -> bool;
 
-#line 412 "regex.h2"
+#line 412 "cpp2regex.h2"
     // Apply optimizations to the matcher list.
     public: static auto post_process_list(token_vec& list) -> void;
     public: parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_);
 public: parse_context_group_state();
 
 
-#line 426 "regex.h2"
+#line 426 "cpp2regex.h2"
 };
 
 // State for the branch reset. Takes care of the group numbering. See '(|)'.
@@ -612,22 +612,22 @@ class parse_context_branch_reset_state {
     // Next group identifier.
     public: [[nodiscard]] auto next() & -> int;
 
-#line 445 "regex.h2"
+#line 445 "cpp2regex.h2"
     // Set next group identifier.
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 451 "regex.h2"
+#line 451 "cpp2regex.h2"
     // Start a new alternative branch.
     public: auto next_alternative() & -> void;
 
-#line 458 "regex.h2"
+#line 458 "cpp2regex.h2"
     // Initialize for a branch reset group.
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
     public: parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_);
 public: parse_context_branch_reset_state();
 
 
-#line 465 "regex.h2"
+#line 465 "cpp2regex.h2"
 };
 
 // Context during parsing of the regular expressions.
@@ -642,7 +642,7 @@ class parse_context {
     private: parse_context_group_state cur_group_state {}; 
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
 
-#line 480 "regex.h2"
+#line 480 "cpp2regex.h2"
            public: std::map named_groups {}; 
 
     private: error_func error_out; // TODO: Declaring std::function fails for cpp2.
@@ -650,66 +650,66 @@ class parse_context {
 
     public: explicit parse_context(cpp2::impl::in r, auto const& e);
 
-#line 491 "regex.h2"
+#line 491 "cpp2regex.h2"
     // State management functions
     //
 
     // Returned group state needs to be stored and provided in `end_group`.
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 503 "regex.h2"
+#line 503 "cpp2regex.h2"
     // `old_state` argument needs to be from start group.
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 510 "regex.h2"
+#line 510 "cpp2regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 514 "regex.h2"
+#line 514 "cpp2regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 518 "regex.h2"
+#line 518 "cpp2regex.h2"
     // Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 529 "regex.h2"
+#line 529 "cpp2regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 535 "regex.h2"
+#line 535 "cpp2regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 540 "regex.h2"
+#line 540 "cpp2regex.h2"
     // Regex token management
     //
 
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 547 "regex.h2"
+#line 547 "cpp2regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 551 "regex.h2"
+#line 551 "cpp2regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 561 "regex.h2"
+#line 561 "cpp2regex.h2"
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 565 "regex.h2"
+#line 565 "cpp2regex.h2"
     // Group management
     //
 
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 572 "regex.h2"
+#line 572 "cpp2regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 576 "regex.h2"
+#line 576 "cpp2regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 582 "regex.h2"
+#line 582 "cpp2regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 592 "regex.h2"
+#line 592 "cpp2regex.h2"
     // Position management functions
     //
 
@@ -718,36 +718,36 @@ class parse_context {
     // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 636 "regex.h2"
+#line 636 "cpp2regex.h2"
     // Return true if next token is available.
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 647 "regex.h2"
+#line 647 "cpp2regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 660 "regex.h2"
+#line 660 "cpp2regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 682 "regex.h2"
+#line 682 "cpp2regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 698 "regex.h2"
+#line 698 "cpp2regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 718 "regex.h2"
+#line 718 "cpp2regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 728 "regex.h2"
+#line 728 "cpp2regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
@@ -756,13 +756,13 @@ class parse_context {
 
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 786 "regex.h2"
+#line 786 "cpp2regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 823 "regex.h2"
+#line 823 "cpp2regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
 
-#line 837 "regex.h2"
+#line 837 "cpp2regex.h2"
     // Misc functions
 
     public: [[nodiscard]] auto get_pos() const& -> auto;
@@ -774,7 +774,7 @@ class parse_context {
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 848 "regex.h2"
+#line 848 "cpp2regex.h2"
 };
 
 // Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
@@ -786,13 +786,13 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 864 "regex.h2"
+#line 864 "cpp2regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
     public: generation_function_context(auto const& code_, auto const& tabs_);
 public: generation_function_context();
 
 
-#line 867 "regex.h2"
+#line 867 "cpp2regex.h2"
 };
 
 // Context for generating the state machine.
@@ -815,71 +815,71 @@ class generation_context {
     // Add code line.
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 892 "regex.h2"
+#line 892 "cpp2regex.h2"
     // Add check for token. The check needs to be a function call that returns a boolean.
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 898 "regex.h2"
+#line 898 "cpp2regex.h2"
     // Add a statefull check. The check needs to return a `match_return`.
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void;
 
-#line 906 "regex.h2"
+#line 906 "cpp2regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 916 "regex.h2"
+#line 916 "cpp2regex.h2"
     protected: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 922 "regex.h2"
+#line 922 "cpp2regex.h2"
     protected: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 940 "regex.h2"
+#line 940 "cpp2regex.h2"
     // Generate the function for a token.
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 949 "regex.h2"
+#line 949 "cpp2regex.h2"
     // Generate the reset for a list of group identifiers.
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 971 "regex.h2"
+#line 971 "cpp2regex.h2"
     // Name generation
     //
 
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 980 "regex.h2"
+#line 980 "cpp2regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 984 "regex.h2"
+#line 984 "cpp2regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 990 "regex.h2"
+#line 990 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 996 "regex.h2"
+#line 996 "cpp2regex.h2"
     // Context management
     //
 
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1007 "regex.h2"
+#line 1007 "cpp2regex.h2"
     public: auto finish_context() & -> void;
 
-#line 1015 "regex.h2"
+#line 1015 "cpp2regex.h2"
     // Misc functions
     //
 
     private: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 1022 "regex.h2"
+#line 1022 "cpp2regex.h2"
     private: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 1026 "regex.h2"
+#line 1026 "cpp2regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 1030 "regex.h2"
+#line 1030 "cpp2regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
 
-#line 1053 "regex.h2"
+#line 1053 "cpp2regex.h2"
     // Run the generation for the token.
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
     public: generation_context() = default;
@@ -887,7 +887,7 @@ class generation_context {
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1059 "regex.h2"
+#line 1059 "cpp2regex.h2"
 };
 
 //  Regex syntax: |  Example: ab|ba
@@ -906,23 +906,23 @@ class alternative_token: public regex_token_empty {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1077 "regex.h2"
+#line 1077 "cpp2regex.h2"
 };
 
 class alternative_token_gen: public regex_token {
 
-#line 1082 "regex.h2"
+#line 1082 "cpp2regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1089 "regex.h2"
+#line 1089 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1105 "regex.h2"
+#line 1105 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1111 "regex.h2"
+#line 1111 "cpp2regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -930,31 +930,31 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1122 "regex.h2"
+#line 1122 "cpp2regex.h2"
 };
 
 template class alternative_token_matcher {
 
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1129 "regex.h2"
+#line 1129 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1146 "regex.h2"
+#line 1146 "cpp2regex.h2"
 };
 
 //  Regex syntax: .
 //
 class any_token: public regex_token_check {
 
-#line 1153 "regex.h2"
+#line 1153 "cpp2regex.h2"
     public: explicit any_token(cpp2::impl::in single_line);
 
-#line 1157 "regex.h2"
+#line 1157 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~any_token() noexcept;
 
@@ -962,38 +962,38 @@ class any_token: public regex_token_check {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1162 "regex.h2"
+#line 1162 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1175 "regex.h2"
+#line 1175 "cpp2regex.h2"
 // Regex syntax: a
 //
 class char_token: public regex_token {
 
-#line 1180 "regex.h2"
+#line 1180 "cpp2regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1189 "regex.h2"
+#line 1189 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1193 "regex.h2"
+#line 1193 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1215 "regex.h2"
+#line 1215 "cpp2regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1235 "regex.h2"
+#line 1235 "cpp2regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1252 "regex.h2"
+#line 1252 "cpp2regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1266 "regex.h2"
+#line 1266 "cpp2regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -1001,7 +1001,7 @@ class char_token: public regex_token {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1270 "regex.h2"
+#line 1270 "cpp2regex.h2"
 };
 
 // TODO: Check if vectorization works at some point with this implementation.
@@ -1041,21 +1041,21 @@ class char_token: public regex_token {
 //
 class class_token: public regex_token {
 
-#line 1310 "regex.h2"
+#line 1310 "cpp2regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1321 "regex.h2"
+#line 1321 "cpp2regex.h2"
     // TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1429 "regex.h2"
+#line 1429 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1434 "regex.h2"
+#line 1434 "cpp2regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1063,21 +1063,21 @@ class class_token: public regex_token {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1440 "regex.h2"
+#line 1440 "cpp2regex.h2"
 };
 
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1465 "regex.h2"
+#line 1465 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1477 "regex.h2"
+#line 1477 "cpp2regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1089,19 +1089,19 @@ template c
 
     //     return r;
     // }
-#line 1488 "regex.h2"
+#line 1488 "cpp2regex.h2"
 };
 
 // Regex syntax: \a or \n or \[
 //
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1527 "regex.h2"
+#line 1527 "cpp2regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1536 "regex.h2"
+#line 1536 "cpp2regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1110,16 +1110,16 @@ template c
 //
 class group_ref_token: public regex_token {
 
-#line 1545 "regex.h2"
+#line 1545 "cpp2regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1554 "regex.h2"
+#line 1554 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1646 "regex.h2"
+#line 1646 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1127,12 +1127,12 @@ class group_ref_token: public regex_token {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1649 "regex.h2"
+#line 1649 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1676 "regex.h2"
+#line 1676 "cpp2regex.h2"
 // Regex syntax: ()      Example: (abc)
 //               (?:)  (?i:abc)
@@ -1145,22 +1145,22 @@ template [[nodiscard]] auto gr
 //
 class group_token: public regex_token {
 
-#line 1689 "regex.h2"
+#line 1689 "cpp2regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1705 "regex.h2"
+#line 1705 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1832 "regex.h2"
+#line 1832 "cpp2regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1849 "regex.h2"
+#line 1849 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1868 "regex.h2"
+#line 1868 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1169,46 +1169,46 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1874 "regex.h2"
+#line 1874 "cpp2regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1916 "regex.h2"
+#line 1916 "cpp2regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1934 "regex.h2"
+#line 1934 "cpp2regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1946 "regex.h2"
+#line 1946 "cpp2regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1960 "regex.h2"
+#line 1960 "cpp2regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1965 "regex.h2"
+#line 1965 "cpp2regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 // Parsed in group_token.
 //
 class lookahead_token: public regex_token {
 
-#line 1972 "regex.h2"
+#line 1972 "cpp2regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1979 "regex.h2"
+#line 1979 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1985 "regex.h2"
+#line 1985 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1216,18 +1216,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1988 "regex.h2"
+#line 1988 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1999 "regex.h2"
+#line 1999 "cpp2regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2026 "regex.h2"
+#line 2026 "cpp2regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1241,12 +1241,12 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2040 "regex.h2"
+#line 2040 "cpp2regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2066 "regex.h2"
+#line 2066 "cpp2regex.h2"
 // TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147
 
 // Options for range matching.
@@ -1259,13 +1259,13 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2074 "regex.h2"
+#line 2074 "cpp2regex.h2"
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2080 "regex.h2"
+#line 2080 "cpp2regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1275,19 +1275,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2157 "regex.h2"
+#line 2157 "cpp2regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2168 "regex.h2"
+#line 2168 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2180 "regex.h2"
+#line 2180 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2198 "regex.h2"
+#line 2198 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2208 "regex.h2"
+#line 2208 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1295,46 +1295,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2212 "regex.h2"
+#line 2212 "cpp2regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2228 "regex.h2"
+#line 2228 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2233 "regex.h2"
+#line 2233 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2238 "regex.h2"
+#line 2238 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2244 "regex.h2"
+#line 2244 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2259 "regex.h2"
+#line 2259 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2287 "regex.h2"
+#line 2287 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2311 "regex.h2"
+#line 2311 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2335 "regex.h2"
+#line 2335 "cpp2regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2342 "regex.h2"
+#line 2342 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1343,7 +1343,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2371 "regex.h2"
+#line 2371 "cpp2regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1352,10 +1352,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2393 "regex.h2"
+#line 2393 "cpp2regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2418 "regex.h2"
+#line 2418 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1376,7 +1376,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2442 "regex.h2"
+#line 2442 "cpp2regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1391,7 +1391,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2458 "regex.h2"
+#line 2458 "cpp2regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1399,13 +1399,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2470 "regex.h2"
+#line 2470 "cpp2regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2492 "regex.h2"
+#line 2492 "cpp2regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1417,7 +1417,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2505 "regex.h2"
+#line 2505 "cpp2regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1440,30 +1440,30 @@ template class regex_generator {
 
     public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
-#line 2530 "regex.h2"
+#line 2530 "cpp2regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2565 "regex.h2"
+#line 2565 "cpp2regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2578 "regex.h2"
+#line 2578 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2587 "regex.h2"
+#line 2587 "cpp2regex.h2"
 }
 }
 
 
 //=== Cpp2 function definitions =================================================
 
-#line 1 "regex.h2"
+#line 1 "cpp2regex.h2"
 
-#line 23 "regex.h2"
+#line 23 "cpp2regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -1535,7 +1535,7 @@ template  match_return::match_return(auto const& matched_,
                                                          : matched{ matched_ }
                                                          , pos{ pos_ }{}
 template  match_return::match_return(){}
-#line 30 "regex.h2"
+#line 30 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Helper structures for the expression matching.
@@ -1553,43 +1553,43 @@ template  match_return::match_return(){}
                                   // mod: x
                                   // mod: xx
 
-#line 48 "regex.h2"
+#line 48 "cpp2regex.h2"
 // Structure for storing group information.
 //
 
-#line 57 "regex.h2"
+#line 57 "cpp2regex.h2"
 // Return value for every matcher.
 // 
 
-#line 64 "regex.h2"
+#line 64 "cpp2regex.h2"
 // Modifiable state during matching.
 //
 
-#line 73 "regex.h2"
+#line 73 "cpp2regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 76 "regex.h2"
+#line 76 "cpp2regex.h2"
     }
 
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }{}
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    return *this; }
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }{}
-#line 78 "regex.h2"
+#line 78 "cpp2regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
@@ -1598,24 +1598,24 @@ template  match_return::match_return(){}
 
     // Getter and setter for groups
     //
-#line 82 "regex.h2"
+#line 82 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 84 "regex.h2"
+#line 84 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end)); 
     }
-#line 90 "regex.h2"
+#line 90 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start)); 
     }
-#line 96 "regex.h2"
+#line 96 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
@@ -1623,72 +1623,72 @@ template  match_return::match_return(){}
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 103 "regex.h2"
+#line 103 "cpp2regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 108 "regex.h2"
+#line 108 "cpp2regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 112 "regex.h2"
+#line 112 "cpp2regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 116 "regex.h2"
+#line 116 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
     // Misc functions
     //
 
-#line 121 "regex.h2"
+#line 121 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
-#line 122 "regex.h2"
+#line 122 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 126 "regex.h2"
+#line 126 "cpp2regex.h2"
 // End function that returns a valid match.
 //
 
-#line 129 "regex.h2"
+#line 129 "cpp2regex.h2"
     [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur);  }
 
-#line 132 "regex.h2"
+#line 132 "cpp2regex.h2"
 // Empty group reset function.
 //
 
-#line 135 "regex.h2"
+#line 135 "cpp2regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 138 "regex.h2"
+#line 138 "cpp2regex.h2"
 // Evaluate func on destruction of the handle.
 
-#line 143 "regex.h2"
+#line 143 "cpp2regex.h2"
     template  on_return::on_return(Func const& f)
         : func{ f }{
 
-#line 145 "regex.h2"
+#line 145 "cpp2regex.h2"
     }
-#line 143 "regex.h2"
+#line 143 "cpp2regex.h2"
     template  auto on_return::operator=(Func const& f) -> on_return& {
         func = f;
         return *this;
 
-#line 145 "regex.h2"
+#line 145 "cpp2regex.h2"
     }
 
-#line 147 "regex.h2"
+#line 147 "cpp2regex.h2"
     template  on_return::~on_return() noexcept{
         cpp2::move(*this).func();
     }
 
-#line 152 "regex.h2"
+#line 152 "cpp2regex.h2"
 // Helper for auto deduction of the Func type.
-#line 153 "regex.h2"
+#line 153 "cpp2regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
 //-----------------------------------------------------------------------
@@ -1701,72 +1701,72 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 // Class syntax:  Example: a
 //
 
-#line 166 "regex.h2"
+#line 166 "cpp2regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C;  }
-#line 167 "regex.h2"
+#line 167 "cpp2regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 170 "regex.h2"
+#line 170 "cpp2regex.h2"
 // Class syntax: - Example: a-c
 //
 
-#line 174 "regex.h2"
+#line 174 "cpp2regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }();  }
-#line 175 "regex.h2"
+#line 175 "cpp2regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return "" + cpp2::to_string(Start) + "-" + cpp2::to_string(End) + ""; }
 
-#line 178 "regex.h2"
+#line 178 "cpp2regex.h2"
 // Helper for combining two character classes
 //
 
-#line 181 "regex.h2"
+#line 181 "cpp2regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 182 "regex.h2"
+#line 182 "cpp2regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 185 "regex.h2"
+#line 185 "cpp2regex.h2"
 // Class syntax:   Example: abcd
 //
 
-#line 188 "regex.h2"
+#line 188 "cpp2regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c));  }
-#line 189 "regex.h2"
+#line 189 "cpp2regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 192 "regex.h2"
+#line 192 "cpp2regex.h2"
 // Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 196 "regex.h2"
+#line 196 "cpp2regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
 
-#line 201 "regex.h2"
+#line 201 "cpp2regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 204 "regex.h2"
+#line 204 "cpp2regex.h2"
 // Short class syntax: \  Example: \w
 //
 
-#line 207 "regex.h2"
+#line 207 "cpp2regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 208 "regex.h2"
+#line 208 "cpp2regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
 
-#line 212 "regex.h2"
+#line 212 "cpp2regex.h2"
 // Named basic character classes
 //
 
-#line 218 "regex.h2"
+#line 218 "cpp2regex.h2"
 // Named other classes
 //
 
-#line 234 "regex.h2"
+#line 234 "cpp2regex.h2"
 // Shorthand class entries
 //
 
-#line 249 "regex.h2"
+#line 249 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 // Tokens for regular expressions.
@@ -1777,99 +1777,99 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 // Basic class for a regex token.
 //
 
-#line 262 "regex.h2"
+#line 262 "cpp2regex.h2"
     regex_token::regex_token(cpp2::impl::in str)
         : string_rep{ str }{
 
-#line 264 "regex.h2"
+#line 264 "cpp2regex.h2"
     }
 
-#line 266 "regex.h2"
+#line 266 "cpp2regex.h2"
     regex_token::regex_token()
         : string_rep{ "" }{
 
-#line 268 "regex.h2"
+#line 268 "cpp2regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
                                                                        // Generate the matching code.
 
-#line 273 "regex.h2"
+#line 273 "cpp2regex.h2"
     auto regex_token::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}// Adds all group indices to the set.
-#line 274 "regex.h2"
+#line 274 "cpp2regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }// Create a string representation.
-#line 275 "regex.h2"
+#line 275 "cpp2regex.h2"
     auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}// Set the string representation.
 
-#line 288 "regex.h2"
+#line 288 "cpp2regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token{ str }
         , check{ check_ }{
 
-#line 291 "regex.h2"
+#line 291 "cpp2regex.h2"
     }
 
-#line 293 "regex.h2"
+#line 293 "cpp2regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(check + "(" + ctx.match_parameters() + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 304 "regex.h2"
+#line 304 "cpp2regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token{ str }
         , code{ code_ }{
 
-#line 307 "regex.h2"
+#line 307 "cpp2regex.h2"
     }
 
-#line 309 "regex.h2"
+#line 309 "cpp2regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         ctx.add(code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 318 "regex.h2"
+#line 318 "cpp2regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 320 "regex.h2"
+#line 320 "cpp2regex.h2"
     }
 
-#line 322 "regex.h2"
+#line 322 "cpp2regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 334 "regex.h2"
+#line 334 "cpp2regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 337 "regex.h2"
+#line 337 "cpp2regex.h2"
     }
 
-#line 339 "regex.h2"
+#line 339 "cpp2regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
         }
     }
 
-#line 345 "regex.h2"
+#line 345 "cpp2regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).add_groups(groups);
         }
     }
 
-#line 351 "regex.h2"
+#line 351 "cpp2regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -1880,7 +1880,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 377 "regex.h2"
+#line 377 "cpp2regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
@@ -1888,14 +1888,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 385 "regex.h2"
+#line 385 "cpp2regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 392 "regex.h2"
+#line 392 "cpp2regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_as_token() & -> token_ptr{
         if (alternate_match_lists.empty()) {
             post_process_list(cur_match_list);
@@ -1907,15 +1907,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 404 "regex.h2"
+#line 404 "cpp2regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void{
         cur_match_list.push_back(token);
     }
 
-#line 409 "regex.h2"
+#line 409 "cpp2regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty();  }
 
-#line 413 "regex.h2"
+#line 413 "cpp2regex.h2"
     auto parse_context_group_state::post_process_list(token_vec& list) -> void{
         // Merge all characters
         auto merge_pos {list.begin()}; 
@@ -1936,7 +1936,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
                                                                                               , modifiers{ modifiers_ }{}
 parse_context_group_state::parse_context_group_state(){}
 
-#line 437 "regex.h2"
+#line 437 "cpp2regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1945,20 +1945,20 @@ parse_context_group_state::parse_context_group_state(){}
         return g; 
     }
 
-#line 446 "regex.h2"
+#line 446 "cpp2regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 452 "regex.h2"
+#line 452 "cpp2regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 459 "regex.h2"
+#line 459 "cpp2regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1973,16 +1973,16 @@ parse_context_group_state::parse_context_group_state(){}
                                                                                     , from{ from_ }{}
 parse_context_branch_reset_state::parse_context_branch_reset_state(){}
 
-#line 485 "regex.h2"
+#line 485 "cpp2regex.h2"
     parse_context::parse_context(cpp2::impl::in r, auto const& e)
         : regex{ r }
         , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }
         , error_out{ e }{
 
-#line 489 "regex.h2"
+#line 489 "cpp2regex.h2"
     }
 
-#line 495 "regex.h2"
+#line 495 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
         parse_context_group_state old_state {}; 
         old_state.swap(cur_group_state);
@@ -1991,24 +1991,24 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return old_state; 
     }
 
-#line 504 "regex.h2"
+#line 504 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
         auto inner {cur_group_state.get_as_token()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 510 "regex.h2"
+#line 510 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 514 "regex.h2"
+#line 514 "cpp2regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 521 "regex.h2"
+#line 521 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
@@ -2017,30 +2017,30 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return old_state; 
     }
 
-#line 529 "regex.h2"
+#line 529 "cpp2regex.h2"
     auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 535 "regex.h2"
+#line 535 "cpp2regex.h2"
     auto parse_context::next_alternative() & -> void{
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
-#line 543 "regex.h2"
+#line 543 "cpp2regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         cur_group_state.add(token);
     }
 
-#line 547 "regex.h2"
+#line 547 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(cur_group_state.empty()); 
     }
 
-#line 551 "regex.h2"
+#line 551 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
         token_ptr r {nullptr}; 
         if (has_token()) {
@@ -2051,29 +2051,29 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return r; 
     }
 
-#line 561 "regex.h2"
+#line 561 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_as_token() & -> token_ptr{
         return root; 
     }
 
-#line 568 "regex.h2"
+#line 568 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 572 "regex.h2"
+#line 572 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return cur_branch_reset_state.next(); 
     }
 
-#line 576 "regex.h2"
+#line 576 "cpp2regex.h2"
     auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
         if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 582 "regex.h2"
+#line 582 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
         auto iter {named_groups.find(name)}; 
         if (iter == named_groups.end()) {
@@ -2084,10 +2084,10 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 595 "regex.h2"
+#line 595 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 598 "regex.h2"
+#line 598 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
         auto perl_syntax {false}; 
         if (!(no_skip)) {
@@ -2126,7 +2126,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return cur; 
     }
 
-#line 637 "regex.h2"
+#line 637 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
         pos = get_next_position(in_class, no_skip);
         if (pos != regex.size()) {
@@ -2137,14 +2137,14 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 647 "regex.h2"
+#line 647 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 648 "regex.h2"
+#line 648 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 649 "regex.h2"
+#line 649 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 651 "regex.h2"
+#line 651 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2154,10 +2154,10 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return r; 
     }
 
-#line 660 "regex.h2"
+#line 660 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
 
-#line 662 "regex.h2"
+#line 662 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
         auto end {pos}; 
         if (any) {
@@ -2178,14 +2178,14 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 682 "regex.h2"
+#line 682 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 683 "regex.h2"
+#line 683 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 684 "regex.h2"
+#line 684 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 686 "regex.h2"
+#line 686 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
         if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
             r.construct(regex.substr(pos, n));
@@ -2198,7 +2198,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 698 "regex.h2"
+#line 698 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_number() & -> std::string{
         auto start {pos}; 
         auto start_search {pos}; 
@@ -2219,7 +2219,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return cpp2::move(r.value()); 
     }
 
-#line 718 "regex.h2"
+#line 718 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,regex.size())) {
@@ -2230,12 +2230,12 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 728 "regex.h2"
+#line 728 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 729 "regex.h2"
+#line 729 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 734 "regex.h2"
+#line 734 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
         auto is_negative {false}; 
         auto is_reset {false}; 
@@ -2288,7 +2288,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return true; 
     }
 
-#line 786 "regex.h2"
+#line 786 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
@@ -2326,7 +2326,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return true; 
     }
 
-#line 823 "regex.h2"
+#line 823 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
 
         expression_flags flags {}; 
@@ -2341,21 +2341,21 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return r; 
     }
 
-#line 839 "regex.h2"
+#line 839 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; }
-#line 840 "regex.h2"
+#line 840 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
-#line 841 "regex.h2"
+#line 841 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && !(has_error); }
 
-#line 843 "regex.h2"
+#line 843 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         has_error = true;
         error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(err) + "");
         return nullptr; 
     }
 
-#line 857 "regex.h2"
+#line 857 "cpp2regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2363,7 +2363,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 864 "regex.h2"
+#line 864 "cpp2regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
@@ -2373,22 +2373,22 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
                                                        , tabs{ tabs_ }{}
 generation_function_context::generation_function_context(){}
 
-#line 882 "regex.h2"
+#line 882 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 887 "regex.h2"
+#line 887 "cpp2regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n";
     }
 
-#line 893 "regex.h2"
+#line 893 "cpp2regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n";
     }
 
-#line 899 "regex.h2"
+#line 899 "cpp2regex.h2"
     auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void{
         end_func_statefull(check);
 
@@ -2396,7 +2396,7 @@ generation_function_context::generation_function_context(){}
         start_func_named(cpp2::move(name));
     }
 
-#line 906 "regex.h2"
+#line 906 "cpp2regex.h2"
     auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
         auto cur {new_context()}; 
 
@@ -2407,14 +2407,14 @@ generation_function_context::generation_function_context(){}
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 916 "regex.h2"
+#line 916 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::start_func() & -> std::string{
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 922 "regex.h2"
+#line 922 "cpp2regex.h2"
     auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
@@ -2433,7 +2433,7 @@ generation_function_context::generation_function_context(){}
         finish_context();
     }
 
-#line 941 "regex.h2"
+#line 941 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
         auto name {start_func()}; 
         (*cpp2::impl::assert_not_null(token)).generate_code((*this));
@@ -2442,7 +2442,7 @@ generation_function_context::generation_function_context(){}
         return name; 
     }
 
-#line 950 "regex.h2"
+#line 950 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
         if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
@@ -2464,33 +2464,33 @@ generation_function_context::generation_function_context(){}
         return cpp2::move(name) + "()"; 
     }
 
-#line 974 "regex.h2"
+#line 974 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return "func_" + cpp2::to_string(cpp2::move(cur_id)) + ""; 
     }
 
-#line 980 "regex.h2"
+#line 980 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 984 "regex.h2"
+#line 984 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return "reset_" + cpp2::to_string(cpp2::move(cur_id)) + ""; 
     }
 
-#line 990 "regex.h2"
+#line 990 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return "tmp_" + cpp2::to_string(cpp2::move(cur_id)) + ""; 
     }
 
-#line 999 "regex.h2"
+#line 999 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2499,7 +2499,7 @@ generation_function_context::generation_function_context(){}
         return cur; 
     }
 
-#line 1007 "regex.h2"
+#line 1007 "cpp2regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2508,22 +2508,22 @@ generation_function_context::generation_function_context(){}
         gen_stack.pop_back();
     }
 
-#line 1018 "regex.h2"
+#line 1018 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &gen_stack.back(); 
     }
 
-#line 1022 "regex.h2"
+#line 1022 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 1026 "regex.h2"
+#line 1026 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 1030 "regex.h2"
+#line 1030 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
@@ -2546,18 +2546,18 @@ generation_function_context::generation_function_context(){}
         return res; 
     }
 
-#line 1054 "regex.h2"
+#line 1054 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 1068 "regex.h2"
+#line 1068 "cpp2regex.h2"
     alternative_token::alternative_token()
                             : regex_token_empty{ "" }{}
 
-#line 1070 "regex.h2"
+#line 1070 "cpp2regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2568,15 +2568,15 @@ generation_function_context::generation_function_context(){}
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1084 "regex.h2"
+#line 1084 "cpp2regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1087 "regex.h2"
+#line 1087 "cpp2regex.h2"
     }
 
-#line 1089 "regex.h2"
+#line 1089 "cpp2regex.h2"
     auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
         std::string functions {""}; 
 
@@ -2593,14 +2593,14 @@ generation_function_context::generation_function_context(){}
         ctx.add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")");
     }
 
-#line 1105 "regex.h2"
+#line 1105 "cpp2regex.h2"
     auto alternative_token_gen::add_groups(std::set& groups) const -> void{
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1111 "regex.h2"
+#line 1111 "cpp2regex.h2"
     [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
         std::string r {""}; 
         std::string sep {""}; 
@@ -2615,11 +2615,11 @@ generation_function_context::generation_function_context(){}
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1126 "regex.h2"
+#line 1126 "cpp2regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1129 "regex.h2"
+#line 1129 "cpp2regex.h2"
     template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
@@ -2638,14 +2638,14 @@ generation_function_context::generation_function_context(){}
         }
     }
 
-#line 1153 "regex.h2"
+#line 1153 "cpp2regex.h2"
     any_token::any_token(cpp2::impl::in single_line)
         : regex_token_check{ ".", "any_token_matcher" }{
 
-#line 1155 "regex.h2"
+#line 1155 "cpp2regex.h2"
     }
 
-#line 1157 "regex.h2"
+#line 1157 "cpp2regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
@@ -2654,7 +2654,7 @@ generation_function_context::generation_function_context(){}
 
     any_token::~any_token() noexcept{}
 
-#line 1164 "regex.h2"
+#line 1164 "cpp2regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
     if (cur != ctx.end // Any char except the end
         && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
@@ -2666,21 +2666,21 @@ template [[nodiscard]] auto any_token_matcher(
     }
 }
 
-#line 1183 "regex.h2"
+#line 1183 "cpp2regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1187 "regex.h2"
+#line 1187 "cpp2regex.h2"
     }
 
-#line 1189 "regex.h2"
+#line 1189 "cpp2regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1193 "regex.h2"
+#line 1193 "cpp2regex.h2"
     auto char_token::generate_code(generation_context& ctx) const -> void{
         if (ignore_case) {
             std::string upper {token}; 
@@ -2688,14 +2688,14 @@ template [[nodiscard]] auto any_token_matcher(
 {
 size_t i{0};
 
-#line 1198 "regex.h2"
+#line 1198 "cpp2regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = string_util::safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = string_util::safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1203 "regex.h2"
+#line 1203 "cpp2regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2708,7 +2708,7 @@ size_t i{0};
         }
     }
 
-#line 1215 "regex.h2"
+#line 1215 "cpp2regex.h2"
     auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; 
         std::string lower_name {"lower_" + cpp2::to_string(name) + ""}; 
@@ -2729,7 +2729,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1235 "regex.h2"
+#line 1235 "cpp2regex.h2"
     auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; 
         auto size {token.size()}; 
@@ -2747,7 +2747,7 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1252 "regex.h2"
+#line 1252 "cpp2regex.h2"
     [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
@@ -2762,7 +2762,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1266 "regex.h2"
+#line 1266 "cpp2regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2770,17 +2770,17 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1314 "regex.h2"
+#line 1314 "cpp2regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
         , class_str{ class_str_ }{
 
-#line 1319 "regex.h2"
+#line 1319 "cpp2regex.h2"
     }
 
-#line 1322 "regex.h2"
+#line 1322 "cpp2regex.h2"
     [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '[') {return nullptr; }
 
@@ -2888,12 +2888,12 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
     }
 
-#line 1429 "regex.h2"
+#line 1429 "cpp2regex.h2"
     auto class_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")");
     }
 
-#line 1434 "regex.h2"
+#line 1434 "cpp2regex.h2"
     [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
@@ -2903,7 +2903,7 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1444 "regex.h2"
+#line 1444 "cpp2regex.h2"
     template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
         if constexpr (case_insensitive) {
             if (cur != ctx.end && negate != (match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
@@ -2925,7 +2925,7 @@ size_t i{0};
         }
     }
 
-#line 1465 "regex.h2"
+#line 1465 "cpp2regex.h2"
     template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
         bool r {First::includes(c)}; 
 
@@ -2938,11 +2938,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1492 "regex.h2"
+#line 1492 "cpp2regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1496 "regex.h2"
+#line 1496 "cpp2regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -2974,7 +2974,7 @@ size_t i{0};
 
 }
 
-#line 1529 "regex.h2"
+#line 1529 "cpp2regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -2982,16 +2982,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1548 "regex.h2"
+#line 1548 "cpp2regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1552 "regex.h2"
+#line 1552 "cpp2regex.h2"
     }
 
-#line 1554 "regex.h2"
+#line 1554 "cpp2regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3084,14 +3084,14 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1646 "regex.h2"
+#line 1646 "cpp2regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")");
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1651 "regex.h2"
+#line 1651 "cpp2regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
@@ -3117,7 +3117,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1692 "regex.h2"
+#line 1692 "cpp2regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3131,7 +3131,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1705 "regex.h2"
+#line 1705 "cpp2regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3259,7 +3259,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1832 "regex.h2"
+#line 1832 "cpp2regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3277,7 +3277,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1849 "regex.h2"
+#line 1849 "cpp2regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);");
@@ -3297,7 +3297,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1868 "regex.h2"
+#line 1868 "cpp2regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3307,7 +3307,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1878 "regex.h2"
+#line 1878 "cpp2regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3346,7 +3346,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1918 "regex.h2"
+#line 1918 "cpp2regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3363,7 +3363,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1934 "regex.h2"
+#line 1934 "cpp2regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3376,7 +3376,7 @@ template [[
     }}
 }
 
-#line 1948 "regex.h2"
+#line 1948 "cpp2regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3389,35 +3389,35 @@ template [[
     }
 }
 
-#line 1960 "regex.h2"
+#line 1960 "cpp2regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1975 "regex.h2"
+#line 1975 "cpp2regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1977 "regex.h2"
+#line 1977 "cpp2regex.h2"
     }
 
-#line 1979 "regex.h2"
+#line 1979 "cpp2regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")");
     }
 
-#line 1985 "regex.h2"
+#line 1985 "cpp2regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1990 "regex.h2"
+#line 1990 "cpp2regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3427,7 +3427,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2002 "regex.h2"
+#line 2002 "cpp2regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3452,7 +3452,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\" + cpp2::to_string(ctx.current()) + "", "" + cpp2::to_string(cpp2::move(name)) + "::match"); 
 }
 
-#line 2042 "regex.h2"
+#line 2042 "cpp2regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3477,16 +3477,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2070 "regex.h2"
+#line 2070 "cpp2regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2085 "regex.h2"
+#line 2085 "cpp2regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2087 "regex.h2"
+#line 2087 "cpp2regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3530,7 +3530,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2131 "regex.h2"
+#line 2131 "cpp2regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3557,7 +3557,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2157 "regex.h2"
+#line 2157 "cpp2regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3569,7 +3569,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2168 "regex.h2"
+#line 2168 "cpp2regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3582,7 +3582,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2180 "regex.h2"
+#line 2180 "cpp2regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3601,7 +3601,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2198 "regex.h2"
+#line 2198 "cpp2regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3612,14 +3612,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")");
     }
 
-#line 2208 "regex.h2"
+#line 2208 "cpp2regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2216 "regex.h2"
+#line 2216 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3632,26 +3632,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2228 "regex.h2"
+#line 2228 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2233 "regex.h2"
+#line 2233 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2238 "regex.h2"
+#line 2238 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2244 "regex.h2"
+#line 2244 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3667,7 +3667,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2259 "regex.h2"
+#line 2259 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3696,7 +3696,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2287 "regex.h2"
+#line 2287 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3721,7 +3721,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2311 "regex.h2"
+#line 2311 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3747,7 +3747,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2342 "regex.h2"
+#line 2342 "cpp2regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3770,7 +3770,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error("'" + cpp2::to_string(ctx.current()) + "' without previous element."); }
 
-#line 2365 "regex.h2"
+#line 2365 "cpp2regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3780,7 +3780,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2377 "regex.h2"
+#line 2377 "cpp2regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3797,7 +3797,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2393 "regex.h2"
+#line 2393 "cpp2regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3822,32 +3822,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2436 "regex.h2"
+#line 2436 "cpp2regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
             , ctx{ ctx_ }
             , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2440 "regex.h2"
+#line 2440 "cpp2regex.h2"
         }
 
-#line 2442 "regex.h2"
+#line 2442 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2443 "regex.h2"
+#line 2443 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2444 "regex.h2"
+#line 2444 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2445 "regex.h2"
+#line 2445 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2447 "regex.h2"
+#line 2447 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2448 "regex.h2"
+#line 2448 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2449 "regex.h2"
+#line 2449 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2451 "regex.h2"
+#line 2451 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3856,13 +3856,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2460 "regex.h2"
+#line 2460 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2461 "regex.h2"
+#line 2461 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2462 "regex.h2"
+#line 2462 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2463 "regex.h2"
+#line 2463 "cpp2regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3870,13 +3870,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2470 "regex.h2"
+#line 2470 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2471 "regex.h2"
+#line 2471 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2472 "regex.h2"
+#line 2472 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2473 "regex.h2"
+#line 2473 "cpp2regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
         auto r {ctx.fail()}; 
@@ -3896,10 +3896,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2492 "regex.h2"
+#line 2492 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2497 "regex.h2"
+#line 2497 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3909,15 +3909,15 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2525 "regex.h2"
+#line 2525 "cpp2regex.h2"
     template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2528 "regex.h2"
+#line 2528 "cpp2regex.h2"
     }
 
-#line 2530 "regex.h2"
+#line 2530 "cpp2regex.h2"
     template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
@@ -3953,7 +3953,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2565 "regex.h2"
+#line 2565 "cpp2regex.h2"
     template  auto regex_generator::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
@@ -3968,7 +3968,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2580 "regex.h2"
+#line 2580 "cpp2regex.h2"
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
     regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
diff --git a/source/regex.h2 b/include/cpp2regex.h2
similarity index 100%
rename from source/regex.h2
rename to include/cpp2regex.h2

From 2a8994f496185c39cbc70c6207598ccb926f6716 Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Fri, 19 Jul 2024 18:32:48 -1000
Subject: [PATCH 159/161] Merge string_util.h into cpp2util.h

Minus a couple of functions that aren't used

And minor touchups, mainly int_to_string using more if-constexpr
---
 include/cpp2regex.h                           |   6 +-
 include/cpp2regex.h2                          |   6 +-
 include/cpp2util.h                            | 154 +++++++++++++++++-
 include/string_util.h                         | 148 -----------------
 ...mixed-bugfix-for-ufcs-non-local.cpp.output |  20 +--
 5 files changed, 168 insertions(+), 166 deletions(-)
 delete mode 100644 include/string_util.h

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index ec139783d6..7611a4d1fb 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -3009,7 +3009,7 @@ size_t i{0};
                 char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
                 auto token {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, number_as_char, ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
-                (*cpp2::impl::assert_not_null(token)).set_string("\\" + cpp2::to_string(string_util::int_to_string(cpp2::impl::as_(cpp2::move(number_as_char)), 8)) + "");
+                (*cpp2::impl::assert_not_null(token)).set_string("\\" + cpp2::to_string(string_util::int_to_string<8>(cpp2::impl::as_(cpp2::move(number_as_char)))) + "");
 
                 return token; 
             }
@@ -3335,7 +3335,7 @@ template [[nodiscard]] auto gr
     // TODO: Change for unicode.
     char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-    std::string syntax {string_util::int_to_string(cpp2::impl::as_(number_as_char), 16)}; 
+    std::string syntax {string_util::int_to_string<16>(cpp2::impl::as_(number_as_char))}; 
     if (cpp2::move(has_brackets)) {
         syntax = "{" + cpp2::to_string(syntax) + "}";
     }
@@ -3471,7 +3471,7 @@ template [[nodiscard]] auto lookahead_token_match
     // TODO: Change for unicode.
     char number_as_char {unsafe_narrow(cpp2::move(number))}; 
 
-    std::string syntax {"\\o{" + cpp2::to_string(string_util::int_to_string(cpp2::impl::as_(number_as_char), 8)) + "}"}; 
+    std::string syntax {"\\o{" + cpp2::to_string(string_util::int_to_string<8>(cpp2::impl::as_(number_as_char))) + "}"}; 
     auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(number_as_char), ctx.get_modifiers().has(expression_flags::case_insensitive))}; 
     (*cpp2::impl::assert_not_null(r)).set_string(cpp2::move(syntax));
     return r; 
diff --git a/include/cpp2regex.h2 b/include/cpp2regex.h2
index fb67bb5778..187f626634 100644
--- a/include/cpp2regex.h2
+++ b/include/cpp2regex.h2
@@ -1568,7 +1568,7 @@ group_ref_token: @polymorphic_base type = {
                 number_as_char : char = unsafe_narrow(number);
 
                 token := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
-                token*..set_string("\\(string_util::int_to_string(number_as_char as int, 8))$");
+                token*..set_string("\\(string_util::int_to_string<8>(number_as_char as int))$");
 
                 return token;
             }
@@ -1902,7 +1902,7 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     // TODO: Change for unicode.
     number_as_char : char = unsafe_narrow(number);
 
-    syntax: std::string = string_util::int_to_string(number_as_char as int, 16);
+    syntax: std::string = string_util::int_to_string<16>(number_as_char as int);
     if has_brackets {
         syntax = "{(syntax)$}";
     }
@@ -2057,7 +2057,7 @@ octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     // TODO: Change for unicode.
     number_as_char : char = unsafe_narrow(number);
 
-    syntax: std::string = "\\o{(string_util::int_to_string(number_as_char as int, 8))$}";
+    syntax: std::string = "\\o{(string_util::int_to_string<8>(number_as_char as int))$}";
     r := shared.new(number_as_char, ctx..get_modifiers()..has(expression_flags::case_insensitive));
     r*..set_string(syntax);
     return r;
diff --git a/include/cpp2util.h b/include/cpp2util.h
index c86487f54b..82c7b79060 100644
--- a/include/cpp2util.h
+++ b/include/cpp2util.h
@@ -36,6 +36,12 @@
 //      because it can't happen; using the name impl::deferred_init directly
 //      from program code is not supported.
 // 
+//  3)  Entities in other subnamespaces, such as cpp2::string_util
+// 
+//      These are typically metafunction "runtime-library" functions,
+//      implementation details called by metafunction-generated code.
+//      For example, @regex generates code that uses string_util:: functions.
+// 
 //===========================================================================
 
 #ifndef CPP2_UTIL_H
@@ -323,8 +329,6 @@
     #define CPP2_CONSTEXPR constexpr
 #endif
 
-#include "string_util.h"
-
 namespace cpp2 {
 
 
@@ -364,6 +368,152 @@ using _schar     = signed char;      // normally use i8 instead
 using _uchar     = unsigned char;    // normally use u8 instead
 
 
+//-----------------------------------------------------------------------
+//
+//  String utilities
+//
+
+namespace string_util {
+
+//  From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring
+
+//  Trim from start (in place)
+inline void ltrim(std::string &s) {
+    s.erase(
+        s.begin(), 
+        std::find_if(s.begin(), s.end(), [](unsigned char ch) { return !std::isspace(ch); })
+    );
+}
+
+//  Trim from end (in place)
+inline void rtrim(std::string &s) {
+    s.erase(
+        std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) { return !std::isspace(ch); }).base(), 
+        s.end()
+    );
+}
+
+//  Trim from both ends (in place)
+inline void trim(std::string &s) {
+    rtrim(s);
+    ltrim(s);
+}
+
+//  Trim from both ends (copying)
+inline std::string trim_copy(std::string_view s) {
+    std::string t(s);
+    trim(t);
+    return t;
+}
+
+//  From https://oleksandrkvl.github.io/2021/04/02/cpp-20-overview.html#nttp
+
+template
+struct fixed_string {
+    constexpr fixed_string(const CharT (&s)[N+1]) {
+        std::copy_n(s, N + 1, c_str);
+    }
+    constexpr const CharT* data() const {
+        return c_str;
+    }
+    constexpr std::size_t size() const {
+        return N;
+    }
+
+    constexpr auto str() const {
+        return std::basic_string(c_str);
+    }
+
+    CharT c_str[N+1];
+};
+
+template
+fixed_string(const CharT (&)[N])->fixed_string;
+
+//  Other string utility functions.
+
+inline bool is_escaped(std::string_view s) {
+    return 
+        s.starts_with("\"") 
+        && s.ends_with("\"")
+        ;
+}
+
+inline bool string_to_int(std::string const& s, int& v, int base = 10) {
+    try {
+        v = stoi(s, nullptr, base);
+        return true;
+    }
+    catch (std::invalid_argument const&)
+    {
+        return false;
+    }
+    catch (std::out_of_range const&)
+    {
+        return false;
+    }
+}
+
+template
+inline std::string int_to_string(int i) {
+    if constexpr (8 == Base) {
+        std::ostringstream oss;
+        oss << std::oct << i;
+        return oss.str();
+    }
+    else if constexpr (10 == Base) {
+        return std::to_string(i);
+    }
+    else if constexpr (16 == Base) {
+        std::ostringstream oss;
+        oss << std::hex << i;
+        return oss.str();
+    }
+    else {
+        [] () {
+            static_assert(flag, "Unsupported int_to_string Base");
+        }();
+    }
+}
+
+inline char safe_toupper(char ch) {
+    return static_cast(std::toupper(static_cast(ch)));
+}
+
+inline char safe_tolower(char ch) {
+    return static_cast(std::tolower(static_cast(ch)));
+}
+
+inline std::string replace_all(
+    std::string        str, 
+    const std::string& from, 
+    const std::string& to
+)
+{
+    size_t start_pos = 0;
+    while((start_pos = str.find(from, start_pos)) != std::string::npos) {
+        str.replace(start_pos, from.length(), to);
+        start_pos += to.length();   // safe also when 'to' is a substring of 'from'
+    }
+    return str;
+}
+
+template
+inline std::string join(List const& list) {
+    std::string r = "";
+    std::string sep = "";
+
+    for (auto const& cur : list) {
+        r += sep + cur;
+        sep = ", ";
+    }
+
+    return r;
+}
+
+} // namespace string_util
+
+
 //-----------------------------------------------------------------------
 //
 //  Conveniences for expressing Cpp1 references (rarely useful)
diff --git a/include/string_util.h b/include/string_util.h
deleted file mode 100644
index 2ce64b3d19..0000000000
--- a/include/string_util.h
+++ /dev/null
@@ -1,148 +0,0 @@
-#pragma once
-
-// #include 
-// #include 
-// #include 
-
-namespace cpp2 {
-namespace string_util {
-
-// From https://stackoverflow.com/questions/216823/how-to-trim-a-stdstring
-
-// trim from start (in place)
-inline void ltrim(std::string &s) {
-    s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) {
-        return !std::isspace(ch);
-    }));
-}
-
-// trim from end (in place)
-inline void rtrim(std::string &s) {
-    s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) {
-        return !std::isspace(ch);
-    }).base(), s.end());
-}
-
-// trim from both ends (in place)
-inline void trim(std::string &s) {
-    rtrim(s);
-    ltrim(s);
-}
-
-// trim from start (copying)
-inline std::string ltrim_copy(std::string_view s) {
-    std::string t(s);
-    ltrim(t);
-    return t;
-}
-
-// trim from end (copying)
-inline std::string rtrim_copy(std::string_view s) {
-    std::string t(s);
-    rtrim(t);
-    return t;
-}
-
-// trim from both ends (copying)
-inline std::string trim_copy(std::string_view s) {
-    std::string t(s);
-    trim(t);
-    return t;
-}
-
-// From https://oleksandrkvl.github.io/2021/04/02/cpp-20-overview.html#nttp
-
-template
-struct fixed_string {
-    constexpr fixed_string(const CharT (&s)[N+1]) {
-        std::copy_n(s, N + 1, c_str);
-    }
-    constexpr const CharT* data() const {
-        return c_str;
-    }
-    constexpr std::size_t size() const {
-        return N;
-    }
-
-    constexpr auto str() const {
-        return std::basic_string(c_str);
-    }
-
-    CharT c_str[N+1];
-};
-
-template
-fixed_string(const CharT (&)[N])->fixed_string;
-
-// Other utility functions.
-
-inline bool is_escaped(std::string_view s) {
-    return s.starts_with("\"") && s.ends_with("\"");
-}
-
-inline bool string_to_int(std::string const& s, int& v, int base = 10) {
-    try {
-        v = stoi(s, nullptr, base);
-        return true;
-    }
-    catch (std::invalid_argument const&)
-    {
-        return false;
-    }
-    catch (std::out_of_range const&)
-    {
-        return false;
-    }
-}
-
-inline std::string int_to_string(int i, int base = 10) {
-    if (8 == base) {
-        std::ostringstream oss;
-        oss << std::oct << i;
-        return oss.str();
-    }
-    else if (10 == base) {
-        return std::to_string(i);
-    }
-    else if (16 == base) {
-        std::ostringstream oss;
-        oss << std::hex << i;
-        return oss.str();
-    }
-    else {
-        throw std::runtime_error("Base " + std::to_string(i) + " not implemented.");
-    }
-}
-
-inline char safe_toupper(char ch) {
-    return static_cast(std::toupper(static_cast(ch)));
-}
-
-inline char safe_tolower(char ch) {
-    return static_cast(std::tolower(static_cast(ch)));
-}
-
-inline std::string replace_all(std::string str, const std::string& from, const std::string& to) {
-    size_t start_pos = 0;
-    while((start_pos = str.find(from, start_pos)) != std::string::npos) {
-        str.replace(start_pos, from.length(), to);
-        start_pos += to.length(); // Handles case where 'to' is a substring of 'from'
-    }
-    return str;
-}
-
-template
-inline std::string join(List const& list) {
-    std::string r = "";
-    std::string sep = "";
-
-    for (auto const& cur : list) {
-        r += sep + cur;
-        sep = ", ";
-    }
-
-    return r;
-}
-
-} // namespace string_util
-} // namespace cpp2
\ No newline at end of file
diff --git a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
index 0a52324652..4ba9bb6e19 100644
--- a/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
+++ b/regression-tests/test-results/gcc-14-c++2b/mixed-bugfix-for-ufcs-non-local.cpp.output
@@ -1,41 +1,41 @@
 In file included from mixed-bugfix-for-ufcs-non-local.cpp:6:
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 |     char**             argv = nullptr;
+ 2100 | class finally_success
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | 
+ 2137 |     finally(finally&& that) noexcept
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:13:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:13:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 |     char**             argv = nullptr;
+ 2100 | class finally_success
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | 
+ 2137 |     finally(finally&& that) noexcept
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 |     char**             argv = nullptr;
+ 2100 | class finally_success
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | 
+ 2137 |     finally(finally&& that) noexcept
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:31:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:31:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 |     char**             argv = nullptr;
+ 2100 | class finally_success
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | 
+ 2137 |     finally(finally&& that) noexcept
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:33:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:33:36: error: template argument 1 is invalid
 ../../../include/cpp2util.h:2100:1: error: lambda-expression in template parameter type
- 2100 |     char**             argv = nullptr;
+ 2100 | class finally_success
       | ^
 ../../../include/cpp2util.h:2137:59: note: in expansion of macro ‘CPP2_UFCS_’
- 2137 | 
+ 2137 |     finally(finally&& that) noexcept
       |                                                           ^         
 mixed-bugfix-for-ufcs-non-local.cpp2:21:12: note: in expansion of macro ‘CPP2_UFCS_NONLOCAL’
 mixed-bugfix-for-ufcs-non-local.cpp2:21:36: error: template argument 1 is invalid

From 25b1a262cc3fdd529ef6aaca06a6793d38b4041c Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Sat, 20 Jul 2024 11:15:05 -1000
Subject: [PATCH 160/161] Review pass through cpp2regex.h2

Up to line ~1600

Looking good, mainly formatting tweaks to follow the repo's style
---
 include/cpp2regex.h                           | 1473 +++++++++--------
 include/cpp2regex.h2                          |  549 +++---
 include/cpp2util.h                            |    4 +-
 ...> pure2-regex_13_possessive_modifier.cpp2} |    6 +-
 ...egex_13_possessive_modifier.cpp.execution} |    2 +-
 ...2-regex_13_possessive_modifier.cpp.output} |    0
 ...egex_13_possessive_modifier.cpp.execution} |    2 +-
 ...2-regex_13_possessive_modifier.cpp.output} |    0
 ...egex_13_possessive_modifier.cpp.execution} |    2 +-
 ...2-regex_13_possessive_modifier.cpp.output} |    0
 ...re2-regex_13_posessive_modifier.cpp.output |    1 -
 ...egex_13_possessive_modifier.cpp.execution} |    2 +-
 ...e2-regex_13_possessive_modifier.cpp.output |    1 +
 ...e2-regex_13_posessive_modifier.cpp2.output |    2 -
 ...=> pure2-regex_13_possessive_modifier.cpp} |  824 ++++-----
 ...2-regex_13_possessive_modifier.cpp2.output |    2 +
 source/reflect.h                              |   11 +-
 source/reflect.h2                             |   14 +-
 18 files changed, 1549 insertions(+), 1346 deletions(-)
 rename regression-tests/{pure2-regex_13_posessive_modifier.cpp2 => pure2-regex_13_possessive_modifier.cpp2} (98%)
 rename regression-tests/test-results/{msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution => clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.execution} (99%)
 rename regression-tests/test-results/clang-12-c++20/{pure2-regex_13_posessive_modifier.cpp.output => pure2-regex_13_possessive_modifier.cpp.output} (100%)
 rename regression-tests/test-results/{clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution => gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.execution} (99%)
 rename regression-tests/test-results/gcc-10-c++20/{pure2-regex_13_posessive_modifier.cpp.output => pure2-regex_13_possessive_modifier.cpp.output} (100%)
 rename regression-tests/test-results/{gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution => gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution} (99%)
 rename regression-tests/test-results/gcc-14-c++2b/{pure2-regex_13_posessive_modifier.cpp.output => pure2-regex_13_possessive_modifier.cpp.output} (100%)
 delete mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
 rename regression-tests/test-results/{gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution => msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.execution} (99%)
 create mode 100644 regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.output
 delete mode 100644 regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output
 rename regression-tests/test-results/{pure2-regex_13_posessive_modifier.cpp => pure2-regex_13_possessive_modifier.cpp} (78%)
 create mode 100644 regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp2.output

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index 7611a4d1fb..ddd335c8ec 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -10,160 +10,139 @@
 
 #line 1 "cpp2regex.h2"
 
-#line 23 "cpp2regex.h2"
+#line 30 "cpp2regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-#line 39 "cpp2regex.h2"
+#line 47 "cpp2regex.h2"
 class expression_flags;
-    
 
-#line 50 "cpp2regex.h2"
+#line 59 "cpp2regex.h2"
 template class match_group;
-    
 
-#line 59 "cpp2regex.h2"
+#line 69 "cpp2regex.h2"
 template class match_return;
-    
 
-#line 66 "cpp2regex.h2"
+#line 77 "cpp2regex.h2"
 template class match_context;
 
-#line 128 "cpp2regex.h2"
+#line 138 "cpp2regex.h2"
 class true_end_func;
-    
 
-#line 134 "cpp2regex.h2"
+#line 146 "cpp2regex.h2"
 class no_reset;
-    
 
-#line 139 "cpp2regex.h2"
+#line 153 "cpp2regex.h2"
 template class on_return;
 
-#line 164 "cpp2regex.h2"
+#line 180 "cpp2regex.h2"
 template class single_class_entry;
 
-#line 172 "cpp2regex.h2"
+#line 189 "cpp2regex.h2"
 template class range_class_entry;
 
-#line 180 "cpp2regex.h2"
+#line 198 "cpp2regex.h2"
 template class combined_class_entry;
-    
 
-#line 187 "cpp2regex.h2"
+#line 207 "cpp2regex.h2"
 template class list_class_entry;
-    
 
-#line 194 "cpp2regex.h2"
+#line 216 "cpp2regex.h2"
 template class named_class_entry;
-    
 
-#line 199 "cpp2regex.h2"
+#line 223 "cpp2regex.h2"
 template class negated_class_entry;
-    
 
-#line 206 "cpp2regex.h2"
+#line 232 "cpp2regex.h2"
 template class shorthand_class_entry;
-    
 
-#line 258 "cpp2regex.h2"
+#line 285 "cpp2regex.h2"
 class regex_token;
 
-#line 283 "cpp2regex.h2"
+#line 311 "cpp2regex.h2"
 class regex_token_check;
-    
 
-#line 299 "cpp2regex.h2"
+#line 330 "cpp2regex.h2"
 class regex_token_code;
-    
 
-#line 315 "cpp2regex.h2"
+#line 349 "cpp2regex.h2"
 class regex_token_empty;
-    
 
-#line 329 "cpp2regex.h2"
+#line 365 "cpp2regex.h2"
 class regex_token_list;
-    
 
-#line 369 "cpp2regex.h2"
+#line 407 "cpp2regex.h2"
 class parse_context_group_state;
 
-#line 430 "cpp2regex.h2"
+#line 468 "cpp2regex.h2"
 class parse_context_branch_reset_state;
-    
 
-#line 471 "cpp2regex.h2"
+#line 511 "cpp2regex.h2"
 class parse_context;
-    
 
-#line 853 "cpp2regex.h2"
+#line 909 "cpp2regex.h2"
 class generation_function_context;
     
 
-#line 870 "cpp2regex.h2"
+#line 927 "cpp2regex.h2"
 class generation_context;
 
-#line 1065 "cpp2regex.h2"
+#line 1126 "cpp2regex.h2"
 class alternative_token;
-    
 
-#line 1079 "cpp2regex.h2"
+#line 1141 "cpp2regex.h2"
 class alternative_token_gen;
-    
 
-#line 1124 "cpp2regex.h2"
+#line 1191 "cpp2regex.h2"
 template class alternative_token_matcher;
 
-#line 1150 "cpp2regex.h2"
+#line 1220 "cpp2regex.h2"
 class any_token;
-    
 
-#line 1177 "cpp2regex.h2"
+#line 1251 "cpp2regex.h2"
 class char_token;
-    
 
-#line 1307 "cpp2regex.h2"
+#line 1388 "cpp2regex.h2"
 class class_token;
-    
 
-#line 1442 "cpp2regex.h2"
+#line 1545 "cpp2regex.h2"
 template class class_token_matcher;
 
-#line 1542 "cpp2regex.h2"
+#line 1655 "cpp2regex.h2"
 class group_ref_token;
     
 
-#line 1686 "cpp2regex.h2"
+#line 1799 "cpp2regex.h2"
 class group_token;
     
 
-#line 1969 "cpp2regex.h2"
+#line 2082 "cpp2regex.h2"
 class lookahead_token;
     
 
-#line 2069 "cpp2regex.h2"
+#line 2182 "cpp2regex.h2"
 class range_flags;
     
 
-#line 2077 "cpp2regex.h2"
+#line 2190 "cpp2regex.h2"
 class range_token;
     
 
-#line 2214 "cpp2regex.h2"
+#line 2327 "cpp2regex.h2"
 template class range_token_matcher;
 
-#line 2339 "cpp2regex.h2"
+#line 2452 "cpp2regex.h2"
 class special_range_token;
     
 
-#line 2426 "cpp2regex.h2"
+#line 2539 "cpp2regex.h2"
 template class regular_expression;
 
-#line 2515 "cpp2regex.h2"
+#line 2628 "cpp2regex.h2"
 template class regex_generator;
 
-#line 2587 "cpp2regex.h2"
+#line 2700 "cpp2regex.h2"
 }
 }
 
@@ -183,26 +162,34 @@ template class regex_generator;
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-// #include 
-// #include 
+
+//===========================================================================
+//  Regex support
+//===========================================================================
+
+#ifndef CPP2_CPP2REGEX_H
+#define CPP2_CPP2REGEX_H
+
 
 template
 using matcher_wrapper_type = typename matcher_wrapper::template wrap;
+
 template
 using matcher_context_type = typename matcher::context;
 
 using error_func = std::function;
 
-#line 23 "cpp2regex.h2"
+#line 30 "cpp2regex.h2"
 namespace cpp2 {
 
 namespace regex {
 
-template using bview = std::basic_string_view;
+template  using bview = std::basic_string_view;
 template using bstring = std::basic_string;
 
-#line 39 "cpp2regex.h2"
-class expression_flags {
+#line 47 "cpp2regex.h2"
+class expression_flags
+ {
 private: cpp2::u8 _value; private: constexpr expression_flags(cpp2::impl::in _val);
 
 private: constexpr auto operator=(cpp2::impl::in _val) -> expression_flags& ;
@@ -231,11 +218,12 @@ public: constexpr auto operator=(expression_flags&& that) noexcept -> expression
 public: [[nodiscard]] auto operator<=>(expression_flags const& that) const& -> std::strong_ordering = default;
 public: [[nodiscard]] auto to_string() const& -> std::string;
 
-#line 46 "cpp2regex.h2"
+#line 55 "cpp2regex.h2"
 };
 
-#line 50 "cpp2regex.h2"
-template class match_group {
+#line 59 "cpp2regex.h2"
+template class match_group
+ {
     public: Iter start {}; 
     public: Iter end {}; 
 
@@ -243,99 +231,101 @@ template class match_group {
     public: match_group(auto const& start_, auto const& end_, auto const& matched_);
 public: match_group();
 
-#line 55 "cpp2regex.h2"
+#line 65 "cpp2regex.h2"
 };
 
-#line 59 "cpp2regex.h2"
-template class match_return {
+#line 69 "cpp2regex.h2"
+template class match_return
+ {
     public: bool matched {false}; 
     public: Iter pos {}; 
     public: match_return(auto const& matched_, auto const& pos_);
 public: match_return();
 
-#line 62 "cpp2regex.h2"
+#line 73 "cpp2regex.h2"
 };
 
-#line 66 "cpp2regex.h2"
+#line 77 "cpp2regex.h2"
 template class match_context
  {
-    public: Iter begin; 
-    public: Iter end; 
+            public: Iter begin; 
+            public: Iter end; 
 
     private: std::array,max_groups> groups {}; 
 
     public: explicit match_context(Iter const& begin_, Iter const& end_);
 
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     public: match_context(match_context const& that);
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     public: auto operator=(match_context const& that) -> match_context& ;
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     public: match_context(match_context&& that) noexcept;
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     public: auto operator=(match_context&& that) noexcept -> match_context& ;
 
-#line 82 "cpp2regex.h2"
+#line 93 "cpp2regex.h2"
     public: [[nodiscard]] auto get_group(auto const& group) const& -> auto;
 
     public: [[nodiscard]] auto get_group_end(auto const& group) const& -> int;
 
-#line 90 "cpp2regex.h2"
+#line 101 "cpp2regex.h2"
     public: [[nodiscard]] auto get_group_start(auto const& group) const& -> int;
 
-#line 96 "cpp2regex.h2"
+#line 107 "cpp2regex.h2"
     public: [[nodiscard]] auto get_group_string(auto const& group) const& -> std::string;
 
-#line 103 "cpp2regex.h2"
+#line 114 "cpp2regex.h2"
     public: auto set_group_end(auto const& group, auto const& pos) & -> void;
 
-#line 108 "cpp2regex.h2"
+#line 119 "cpp2regex.h2"
     public: auto set_group_invalid(auto const& group) & -> void;
 
-#line 112 "cpp2regex.h2"
+#line 123 "cpp2regex.h2"
     public: auto set_group_start(auto const& group, auto const& pos) & -> void;
 
-#line 116 "cpp2regex.h2"
+#line 127 "cpp2regex.h2"
     public: [[nodiscard]] auto size() const& -> auto;
 
-#line 121 "cpp2regex.h2"
+#line 131 "cpp2regex.h2"
     public: [[nodiscard]] auto fail() const& -> auto;
     public: [[nodiscard]] auto pass(cpp2::impl::in cur) const& -> auto;
-
 };
 
-#line 128 "cpp2regex.h2"
-class true_end_func {
+#line 138 "cpp2regex.h2"
+class true_end_func
+ {
     public: [[nodiscard]] auto operator()(auto const& cur, auto& ctx) const& -> auto;
 };
 
-#line 134 "cpp2regex.h2"
-class no_reset {
+#line 146 "cpp2regex.h2"
+class no_reset
+ {
     public: auto operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void;
 };
 
-#line 139 "cpp2regex.h2"
-template class on_return {
-
+#line 153 "cpp2regex.h2"
+template class on_return
+ {
     private: Func func; 
 
     public: explicit on_return(Func const& f);
-#line 143 "cpp2regex.h2"
+#line 157 "cpp2regex.h2"
     public: auto operator=(Func const& f) -> on_return& ;
 
-#line 147 "cpp2regex.h2"
+#line 161 "cpp2regex.h2"
     public: ~on_return() noexcept;
     public: on_return(on_return const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(on_return const&) -> void = delete;
 
 
-#line 150 "cpp2regex.h2"
+#line 164 "cpp2regex.h2"
 };
 
-#line 153 "cpp2regex.h2"
+#line 168 "cpp2regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto;
 
-#line 164 "cpp2regex.h2"
+#line 180 "cpp2regex.h2"
 template class single_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -344,10 +334,10 @@ template class single_class_entry
     public: single_class_entry(single_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(single_class_entry const&) -> void = delete;
 
-#line 168 "cpp2regex.h2"
+#line 184 "cpp2regex.h2"
 };
 
-#line 172 "cpp2regex.h2"
+#line 189 "cpp2regex.h2"
 template class range_class_entry
  {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
@@ -356,69 +346,75 @@ template class range_class_entry
     public: range_class_entry(range_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_class_entry const&) -> void = delete;
 
-#line 176 "cpp2regex.h2"
+#line 193 "cpp2regex.h2"
 };
 
-#line 180 "cpp2regex.h2"
-template class combined_class_entry {
+#line 198 "cpp2regex.h2"
+template class combined_class_entry
+ {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: combined_class_entry() = default;
     public: combined_class_entry(combined_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(combined_class_entry const&) -> void = delete;
 
-#line 183 "cpp2regex.h2"
+#line 202 "cpp2regex.h2"
 };
 
-#line 187 "cpp2regex.h2"
-template class list_class_entry {
+#line 207 "cpp2regex.h2"
+template class list_class_entry
+ {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: list_class_entry() = default;
     public: list_class_entry(list_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(list_class_entry const&) -> void = delete;
 
-#line 190 "cpp2regex.h2"
+#line 211 "cpp2regex.h2"
 };
 
-#line 194 "cpp2regex.h2"
-template class named_class_entry {
+#line 216 "cpp2regex.h2"
+template class named_class_entry
+ {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: named_class_entry() = default;
     public: named_class_entry(named_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(named_class_entry const&) -> void = delete;
 
-#line 197 "cpp2regex.h2"
+#line 220 "cpp2regex.h2"
 };
 
-template class negated_class_entry: public Inner {
+#line 223 "cpp2regex.h2"
+template class negated_class_entry
+: public Inner {
 
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: negated_class_entry() = default;
     public: negated_class_entry(negated_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(negated_class_entry const&) -> void = delete;
 
-#line 202 "cpp2regex.h2"
+#line 227 "cpp2regex.h2"
 };
 
-#line 206 "cpp2regex.h2"
-template class shorthand_class_entry {
+#line 232 "cpp2regex.h2"
+template class shorthand_class_entry
+ {
     public: [[nodiscard]] static auto includes(cpp2::impl::in c) -> auto;
     public: [[nodiscard]] static auto to_string() -> auto;
     public: shorthand_class_entry() = default;
     public: shorthand_class_entry(shorthand_class_entry const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(shorthand_class_entry const&) -> void = delete;
 
-#line 209 "cpp2regex.h2"
+#line 236 "cpp2regex.h2"
 };
 
-#line 214 "cpp2regex.h2"
+#line 241 "cpp2regex.h2"
 template         using digits_class = named_class_entry>;
 template         using lower_class = named_class_entry>;
 template         using upper_class = named_class_entry>;
 
-#line 220 "cpp2regex.h2"
+#line 247 "cpp2regex.h2"
 template           using alnum_class = named_class_entry,upper_class,digits_class>>;
 template           using alpha_class = named_class_entry,upper_class>>;
 template           using ascii_class = named_class_entry>;
@@ -433,31 +429,30 @@ template using ver_space_class = named_class_entry using word_class = named_class_entry,single_class_entry>>;
 template           using xdigit_class = named_class_entry,range_class_entry,digits_class>>;
 
-#line 236 "cpp2regex.h2"
+#line 263 "cpp2regex.h2"
 template                  using short_digits_class = shorthand_class_entry>;
 template                  using short_hor_space_class = shorthand_class_entry>;
 template                  using short_space_class = shorthand_class_entry>;
 template using short_vert_space_class = shorthand_class_entry>;
 template                  using short_word_class = shorthand_class_entry>;
 
-#line 243 "cpp2regex.h2"
 template                      using short_not_digits_class = negated_class_entry>>;
 template                      using short_not_hor_space_class = negated_class_entry>>;
 template                      using short_not_space_class = negated_class_entry>>;
 template using short_not_vert_space_class = negated_class_entry>>;
 template                      using short_not_word_class = negated_class_entry>>;
 
-#line 258 "cpp2regex.h2"
-class regex_token {
-
+#line 285 "cpp2regex.h2"
+class regex_token
+ {
     public: std::string string_rep; 
 
     public: explicit regex_token(cpp2::impl::in str);
 
-#line 266 "cpp2regex.h2"
+#line 293 "cpp2regex.h2"
     public: explicit regex_token();
 
-#line 271 "cpp2regex.h2"
+#line 298 "cpp2regex.h2"
     public: virtual auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void = 0;
 
     public: virtual auto add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void;
@@ -468,22 +463,24 @@ class regex_token {
     public: regex_token(regex_token const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_token const&) -> void = delete;
 
-#line 276 "cpp2regex.h2"
+#line 303 "cpp2regex.h2"
 };
 
 using token_ptr = std::shared_ptr;
 using token_vec = std::vector;
 
-// Adds a check in code generation.
+#line 309 "cpp2regex.h2"
+//  Adds a check in code generation.
 //
-class regex_token_check: public regex_token {
+class regex_token_check
+: public regex_token {
 
-#line 286 "cpp2regex.h2"
+#line 315 "cpp2regex.h2"
     private: std::string check; 
 
     public: explicit regex_token_check(cpp2::impl::in str, cpp2::impl::in check_);
 
-#line 293 "cpp2regex.h2"
+#line 322 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_check() noexcept;
 
@@ -491,18 +488,21 @@ class regex_token_check: public regex_token {
     public: auto operator=(regex_token_check const&) -> void = delete;
 
 
-#line 296 "cpp2regex.h2"
+#line 325 "cpp2regex.h2"
 };
 
-// Adds code in code generation.
-class regex_token_code: public regex_token {
+#line 328 "cpp2regex.h2"
+//  Adds code in code generation.
+//
+class regex_token_code
+: public regex_token {
 
-#line 302 "cpp2regex.h2"
+#line 334 "cpp2regex.h2"
     private: std::string code; 
 
     public: explicit regex_token_code(cpp2::impl::in str, cpp2::impl::in code_);
 
-#line 309 "cpp2regex.h2"
+#line 341 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~regex_token_code() noexcept;
 
@@ -510,16 +510,19 @@ class regex_token_code: public regex_token {
     public: auto operator=(regex_token_code const&) -> void = delete;
 
 
-#line 312 "cpp2regex.h2"
+#line 344 "cpp2regex.h2"
 };
 
-// Token that does not influence the matching. E.g. comment.
-class regex_token_empty: public regex_token {
+#line 347 "cpp2regex.h2"
+//  Token that does not influence the matching. E.g. comment.
+//
+class regex_token_empty
+: public regex_token {
 
-#line 318 "cpp2regex.h2"
+#line 353 "cpp2regex.h2"
     public: explicit regex_token_empty(cpp2::impl::in str);
 
-#line 322 "cpp2regex.h2"
+#line 357 "cpp2regex.h2"
     public: auto generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void override;
     public: virtual ~regex_token_empty() noexcept;
 
@@ -527,25 +530,27 @@ class regex_token_empty: public regex_token {
     public: auto operator=(regex_token_empty const&) -> void = delete;
 
 
-#line 325 "cpp2regex.h2"
+#line 360 "cpp2regex.h2"
 };
 
-// Represents a list of regex tokens as one token.
+#line 363 "cpp2regex.h2"
+//  Represents a list of regex tokens as one token.
 //
-class regex_token_list: public regex_token {
+class regex_token_list
+: public regex_token {
 
-#line 332 "cpp2regex.h2"
+#line 369 "cpp2regex.h2"
     public: token_vec tokens; 
 
     public: explicit regex_token_list(cpp2::impl::in t);
 
-#line 339 "cpp2regex.h2"
+#line 376 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 345 "cpp2regex.h2"
+#line 382 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 351 "cpp2regex.h2"
+#line 388 "cpp2regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in vec) -> std::string;
     public: virtual ~regex_token_list() noexcept;
 
@@ -553,88 +558,92 @@ class regex_token_list: public regex_token {
     public: auto operator=(regex_token_list const&) -> void = delete;
 
 
-#line 358 "cpp2regex.h2"
+#line 395 "cpp2regex.h2"
 };
 
+#line 398 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
-// Parse and generation context.
+//  Parse and generation context.
 //
 //-----------------------------------------------------------------------
 //
 
-// State of the current capturing group. See '()'
+//  State of the current capturing group. See '()'
 //
-class parse_context_group_state {
-
-#line 372 "cpp2regex.h2"
+class parse_context_group_state
+ {
     public: token_vec cur_match_list {};           // Current list of matchers.
     public: token_vec alternate_match_lists {};    // List of alternate matcher lists. E.g. ab|cd|xy.
     public: expression_flags modifiers {};         // Current modifiers for the group/regular expression.
 
-    // Start a new alternative.
+    //  Start a new alternative.
     public: auto next_alternative() & -> void;
 
-#line 384 "cpp2regex.h2"
-    // Swap this state with the other one.
+#line 421 "cpp2regex.h2"
+    //  Swap this state with the other one.
     public: auto swap(parse_context_group_state& t) & -> void;
 
-#line 391 "cpp2regex.h2"
-    // Convert this state into a regex token.
+#line 428 "cpp2regex.h2"
+    //  Convert this state into a regex token.
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 403 "cpp2regex.h2"
-    // Add a token to the current matcher list.
+#line 440 "cpp2regex.h2"
+    //  Add a token to the current matcher list.
     public: auto add(cpp2::impl::in token) & -> void;
 
-#line 408 "cpp2regex.h2"
-    // True if current matcher list is empty.
+#line 445 "cpp2regex.h2"
+    //  True if current matcher list is empty.
     public: [[nodiscard]] auto empty() const& -> bool;
 
-#line 412 "cpp2regex.h2"
-    // Apply optimizations to the matcher list.
+#line 449 "cpp2regex.h2"
+    //  Apply optimizations to the matcher list.
     public: static auto post_process_list(token_vec& list) -> void;
     public: parse_context_group_state(auto const& cur_match_list_, auto const& alternate_match_lists_, auto const& modifiers_);
 public: parse_context_group_state();
 
 
-#line 426 "cpp2regex.h2"
+#line 463 "cpp2regex.h2"
 };
 
-// State for the branch reset. Takes care of the group numbering. See '(|)'.
+#line 466 "cpp2regex.h2"
+//  State for the branch reset. Takes care of the group numbering. See '(|)'.
 //
-class parse_context_branch_reset_state {
+class parse_context_branch_reset_state
+ {
     public: bool is_active {false}; // If we have a branch reset group.
     public: int cur_group {1}; // Next group identifier. 0 == global capture group.
     public: int max_group {1}; // Maximum group identifier generated.
-    public: int from {1};      // Starting identifier on new alternative branch.
+    public: int from {1};     // Starting identifier on new alternative branch.
 
-    // Next group identifier.
+    //  Next group identifier.
     public: [[nodiscard]] auto next() & -> int;
 
-#line 445 "cpp2regex.h2"
-    // Set next group identifier.
+#line 484 "cpp2regex.h2"
+    //  Set next group identifier.
     public: auto set_next(cpp2::impl::in g) & -> void;
 
-#line 451 "cpp2regex.h2"
-    // Start a new alternative branch.
+#line 490 "cpp2regex.h2"
+    //  Start a new alternative branch.
     public: auto next_alternative() & -> void;
 
-#line 458 "cpp2regex.h2"
-    // Initialize for a branch reset group.
+#line 497 "cpp2regex.h2"
+    //  Initialize for a branch reset group.
     public: auto set_active_reset(cpp2::impl::in restart) & -> void;
     public: parse_context_branch_reset_state(auto const& is_active_, auto const& cur_group_, auto const& max_group_, auto const& from_);
 public: parse_context_branch_reset_state();
 
 
-#line 465 "cpp2regex.h2"
+#line 504 "cpp2regex.h2"
 };
 
-// Context during parsing of the regular expressions.
+#line 507 "cpp2regex.h2"
+//  Context during parsing of the regular expressions.
 // 
-// Keeps track of the distributed group identifiers, current parsed group and branch resets.
+//  Keeps track of the distributed group identifiers, current parsed group and branch resets.
 //
-class parse_context {
+class parse_context
+ {
     private: std::string_view regex; // Regular expression string.
     private: size_t pos {0};   // Current parsing position.
     private: token_ptr root;   // Token representing the regular expression.
@@ -642,7 +651,7 @@ class parse_context {
     private: parse_context_group_state cur_group_state {}; 
     private: parse_context_branch_reset_state cur_branch_reset_state {}; 
 
-#line 480 "cpp2regex.h2"
+#line 521 "cpp2regex.h2"
            public: std::map named_groups {}; 
 
     private: error_func error_out; // TODO: Declaring std::function fails for cpp2.
@@ -650,120 +659,117 @@ class parse_context {
 
     public: explicit parse_context(cpp2::impl::in r, auto const& e);
 
-#line 491 "cpp2regex.h2"
-    // State management functions
+#line 532 "cpp2regex.h2"
+    //  State management functions
     //
 
-    // Returned group state needs to be stored and provided in `end_group`.
+    //  Returned group state needs to be stored and provided in `end_group`.
     public: [[nodiscard]] auto start_group() & -> parse_context_group_state;
 
-#line 503 "cpp2regex.h2"
-    // `old_state` argument needs to be from start group.
+#line 545 "cpp2regex.h2"
+    //  `old_state` argument needs to be from start group.
     public: [[nodiscard]] auto end_group(cpp2::impl::in old_state) & -> token_ptr;
 
-#line 510 "cpp2regex.h2"
+#line 553 "cpp2regex.h2"
     public: [[nodiscard]] auto get_modifiers() const& -> expression_flags;
 
-#line 514 "cpp2regex.h2"
+#line 557 "cpp2regex.h2"
     public: auto set_modifiers(cpp2::impl::in mod) & -> void;
 
-#line 518 "cpp2regex.h2"
-    // Branch reset management functions
+#line 561 "cpp2regex.h2"
+    //  Branch reset management functions
     //
 
     public: [[nodiscard]] auto branch_reset_new_state() & -> parse_context_branch_reset_state;
 
-#line 529 "cpp2regex.h2"
+#line 573 "cpp2regex.h2"
     public: auto branch_reset_restore_state(cpp2::impl::in old_state) & -> void;
 
-#line 535 "cpp2regex.h2"
+#line 580 "cpp2regex.h2"
     public: auto next_alternative() & -> void;
 
-#line 540 "cpp2regex.h2"
-    // Regex token management
+#line 586 "cpp2regex.h2"
+    //  Regex token management
     //
-
     public: auto add_token(cpp2::impl::in token) & -> void;
 
-#line 547 "cpp2regex.h2"
+#line 592 "cpp2regex.h2"
     public: [[nodiscard]] auto has_token() const& -> bool;
 
-#line 551 "cpp2regex.h2"
+#line 596 "cpp2regex.h2"
     public: [[nodiscard]] auto pop_token() & -> token_ptr;
 
-#line 561 "cpp2regex.h2"
+#line 607 "cpp2regex.h2"
     public: [[nodiscard]] auto get_as_token() & -> token_ptr;
 
-#line 565 "cpp2regex.h2"
-    // Group management
+#line 611 "cpp2regex.h2"
+    //  Group management
     //
-
     public: [[nodiscard]] auto get_cur_group() const& -> int;
 
-#line 572 "cpp2regex.h2"
+#line 617 "cpp2regex.h2"
     public: [[nodiscard]] auto next_group() & -> int;
 
-#line 576 "cpp2regex.h2"
+#line 621 "cpp2regex.h2"
     public: auto set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void;
 
-#line 582 "cpp2regex.h2"
+#line 628 "cpp2regex.h2"
     public: [[nodiscard]] auto get_named_group(cpp2::impl::in name) const& -> int;
 
-#line 592 "cpp2regex.h2"
-    // Position management functions
+#line 639 "cpp2regex.h2"
+    //  Position management functions
     //
-
     public: [[nodiscard]] auto current() const& -> char;
 
-    // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
+    //  Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
     private: [[nodiscard]] auto get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t;
 
-#line 636 "cpp2regex.h2"
-    // Return true if next token is available.
+#line 683 "cpp2regex.h2"
+    //  Return true if next token is available.
     private: [[nodiscard]] auto next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool;
 
-#line 647 "cpp2regex.h2"
+#line 695 "cpp2regex.h2"
     public: [[nodiscard]] auto next() & -> auto;
     public: [[nodiscard]] auto next_in_class() & -> auto;
     public: [[nodiscard]] auto next_no_skip() & -> auto;
 
     public: [[nodiscard]] auto next_n(cpp2::impl::in n) & -> bool;
 
-#line 660 "cpp2regex.h2"
+#line 708 "cpp2regex.h2"
     public: [[nodiscard]] auto has_next() const& -> bool;
 
     private: [[nodiscard]] auto grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool;
 
-#line 682 "cpp2regex.h2"
+#line 731 "cpp2regex.h2"
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
     public: [[nodiscard]] auto grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto;
 
     public: [[nodiscard]] auto grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool;
 
-#line 698 "cpp2regex.h2"
+#line 748 "cpp2regex.h2"
     public: [[nodiscard]] auto grab_number() & -> std::string;
 
-#line 718 "cpp2regex.h2"
+#line 769 "cpp2regex.h2"
     private: [[nodiscard]] auto peek_impl(cpp2::impl::in in_class) const& -> char;
 
-#line 728 "cpp2regex.h2"
+#line 779 "cpp2regex.h2"
     public: [[nodiscard]] auto peek() const& -> auto;
     public: [[nodiscard]] auto peek_in_class() const& -> auto;
 
-    // Parsing functions
+#line 783 "cpp2regex.h2"
+    //  Parsing functions
     //
-
     public: [[nodiscard]] auto parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool;
 
-#line 786 "cpp2regex.h2"
+#line 839 "cpp2regex.h2"
     public: [[nodiscard]] auto parse_until(cpp2::impl::in term) & -> bool;
 
-#line 823 "cpp2regex.h2"
+#line 877 "cpp2regex.h2"
     public: [[nodiscard]] auto parse(cpp2::impl::in modifiers) & -> bool;
 
-#line 837 "cpp2regex.h2"
-    // Misc functions
+#line 892 "cpp2regex.h2"
+    //  Misc functions
 
     public: [[nodiscard]] auto get_pos() const& -> auto;
     public: [[nodiscard]] auto get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto;
@@ -774,11 +780,12 @@ class parse_context {
     public: auto operator=(parse_context const&) -> void = delete;
 
 
-#line 848 "cpp2regex.h2"
+#line 903 "cpp2regex.h2"
 };
 
-// Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
-// function here.
+#line 906 "cpp2regex.h2"
+//  Context for one function generation. Generation of functions can be interleaved,
+//  therefore we buffer the code for one function here.
 //
 class generation_function_context {
     public: std::string code {""}; 
@@ -786,18 +793,19 @@ class generation_function_context {
 
     public: auto add_tabs(cpp2::impl::in c) & -> void;
 
-#line 864 "cpp2regex.h2"
+#line 920 "cpp2regex.h2"
     public: auto remove_tabs(cpp2::impl::in c) & -> void;
     public: generation_function_context(auto const& code_, auto const& tabs_);
 public: generation_function_context();
 
 
-#line 867 "cpp2regex.h2"
+#line 923 "cpp2regex.h2"
 };
 
-// Context for generating the state machine.
-class generation_context {
-
+#line 926 "cpp2regex.h2"
+//  Context for generating the state machine.
+class generation_context
+ {
     private: std::vector gen_stack {1}; // Element 0 contains all the code.
 
     private: int matcher_func {0}; 
@@ -805,96 +813,94 @@ class generation_context {
     private: int temp_name {0}; 
     private: std::string entry_func {""}; 
 
-    // Generation helpers
+    //  Generation helpers
     //
-
     public: [[nodiscard]] auto match_parameters() const& -> std::string;
 
-    // Code generation.
+    //  Code generation.
 
-    // Add code line.
+    //  Add code line.
     public: auto add(cpp2::impl::in s) & -> void;
 
-#line 892 "cpp2regex.h2"
-    // Add check for token. The check needs to be a function call that returns a boolean.
+#line 948 "cpp2regex.h2"
+    //  Add check for token. The check needs to be a function call that returns a boolean.
     public: auto add_check(cpp2::impl::in check) & -> void;
 
-#line 898 "cpp2regex.h2"
-    // Add a statefull check. The check needs to return a `match_return`.
+#line 954 "cpp2regex.h2"
+    //  Add a stateful check. The check needs to return a `match_return`.
     public: auto add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void;
 
-#line 906 "cpp2regex.h2"
+#line 963 "cpp2regex.h2"
     protected: auto start_func_named(cpp2::impl::in name) & -> void;
 
-#line 916 "cpp2regex.h2"
+#line 974 "cpp2regex.h2"
     protected: [[nodiscard]] auto start_func() & -> std::string;
 
-#line 922 "cpp2regex.h2"
+#line 981 "cpp2regex.h2"
     protected: auto end_func_statefull(cpp2::impl::in s) & -> void;
 
-#line 940 "cpp2regex.h2"
-    // Generate the function for a token.
+#line 1000 "cpp2regex.h2"
+    //  Generate the function for a token.
     public: [[nodiscard]] auto generate_func(cpp2::impl::in token) & -> std::string;
 
-#line 949 "cpp2regex.h2"
-    // Generate the reset for a list of group identifiers.
+#line 1010 "cpp2regex.h2"
+    //  Generate the reset for a list of group identifiers.
     public: [[nodiscard]] auto generate_reset(cpp2::impl::in> groups) & -> std::string;
 
-#line 971 "cpp2regex.h2"
-    // Name generation
+#line 1033 "cpp2regex.h2"
+    //  Name generation
     //
-
     protected: [[nodiscard]] auto gen_func_name() & -> std::string;
 
-#line 980 "cpp2regex.h2"
+#line 1041 "cpp2regex.h2"
     public: [[nodiscard]] auto next_func_name() & -> std::string;
 
-#line 984 "cpp2regex.h2"
+#line 1045 "cpp2regex.h2"
     protected: [[nodiscard]] auto gen_reset_func_name() & -> std::string;
 
-#line 990 "cpp2regex.h2"
+#line 1051 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_temp() & -> std::string;
 
-#line 996 "cpp2regex.h2"
-    // Context management
+#line 1057 "cpp2regex.h2"
+    //  Context management
     //
-
     public: [[nodiscard]] auto new_context() & -> generation_function_context*;
 
-#line 1007 "cpp2regex.h2"
+#line 1067 "cpp2regex.h2"
     public: auto finish_context() & -> void;
 
-#line 1015 "cpp2regex.h2"
-    // Misc functions
+#line 1075 "cpp2regex.h2"
+    //  Misc functions
     //
-
     private: [[nodiscard]] auto get_current() & -> generation_function_context*;
 
-#line 1022 "cpp2regex.h2"
+#line 1081 "cpp2regex.h2"
     private: [[nodiscard]] auto get_base() & -> generation_function_context*;
 
-#line 1026 "cpp2regex.h2"
+#line 1085 "cpp2regex.h2"
     public: [[nodiscard]] auto get_entry_func() const& -> std::string;
 
-#line 1030 "cpp2regex.h2"
+#line 1089 "cpp2regex.h2"
     public: [[nodiscard]] auto create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string;
 
-#line 1053 "cpp2regex.h2"
-    // Run the generation for the token.
+#line 1113 "cpp2regex.h2"
+    //  Run the generation for the token.
     public: [[nodiscard]] auto run(cpp2::impl::in token) & -> std::string;
     public: generation_context() = default;
     public: generation_context(generation_context const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(generation_context const&) -> void = delete;
 
 
-#line 1059 "cpp2regex.h2"
+#line 1119 "cpp2regex.h2"
 };
 
+#line 1122 "cpp2regex.h2"
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen.
 //
-class alternative_token: public regex_token_empty {
+class alternative_token
+: public regex_token_empty {
                                      // No code gen here. alternative_token_gen is created in the parse_context
 
     public: explicit alternative_token();
@@ -906,23 +912,24 @@ class alternative_token: public regex_token_empty {
     public: auto operator=(alternative_token const&) -> void = delete;
 
 
-#line 1077 "cpp2regex.h2"
+#line 1139 "cpp2regex.h2"
 };
 
-class alternative_token_gen: public regex_token {
+class alternative_token_gen
+: public regex_token {
 
-#line 1082 "cpp2regex.h2"
+#line 1145 "cpp2regex.h2"
     private: token_vec alternatives; 
 
     public: explicit alternative_token_gen(cpp2::impl::in a);
 
-#line 1089 "cpp2regex.h2"
+#line 1152 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1105 "cpp2regex.h2"
+#line 1169 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
 
-#line 1111 "cpp2regex.h2"
+#line 1176 "cpp2regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in a) -> std::string;
     public: virtual ~alternative_token_gen() noexcept;
 
@@ -930,31 +937,34 @@ class alternative_token_gen: public regex_token {
     public: auto operator=(alternative_token_gen const&) -> void = delete;
 
 
-#line 1122 "cpp2regex.h2"
+#line 1188 "cpp2regex.h2"
 };
 
-template class alternative_token_matcher {
-
+#line 1191 "cpp2regex.h2"
+template class alternative_token_matcher
+ {
     public: [[nodiscard]] static auto match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto;
 
-#line 1129 "cpp2regex.h2"
+#line 1197 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto;
     public: alternative_token_matcher() = default;
     public: alternative_token_matcher(alternative_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(alternative_token_matcher const&) -> void = delete;
 
 
-#line 1146 "cpp2regex.h2"
+#line 1215 "cpp2regex.h2"
 };
 
+#line 1218 "cpp2regex.h2"
 //  Regex syntax: .
 //
-class any_token: public regex_token_check {
+class any_token
+: public regex_token_check {
 
-#line 1153 "cpp2regex.h2"
+#line 1224 "cpp2regex.h2"
     public: explicit any_token(cpp2::impl::in single_line);
 
-#line 1157 "cpp2regex.h2"
+#line 1228 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~any_token() noexcept;
 
@@ -962,38 +972,40 @@ class any_token: public regex_token_check {
     public: auto operator=(any_token const&) -> void = delete;
 
 
-#line 1162 "cpp2regex.h2"
+#line 1233 "cpp2regex.h2"
 };
 
+#line 1236 "cpp2regex.h2"
 template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1175 "cpp2regex.h2"
-// Regex syntax: a
+#line 1249 "cpp2regex.h2"
+//  Regex syntax: a
 //
-class char_token: public regex_token {
+class char_token
+: public regex_token {
 
-#line 1180 "cpp2regex.h2"
+#line 1255 "cpp2regex.h2"
     private: std::string token; 
     private: bool ignore_case; 
 
     public: explicit char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_);
 
-#line 1189 "cpp2regex.h2"
+#line 1264 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1193 "cpp2regex.h2"
+#line 1268 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1215 "cpp2regex.h2"
+#line 1291 "cpp2regex.h2"
     public: auto gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void;
 
-#line 1235 "cpp2regex.h2"
+#line 1312 "cpp2regex.h2"
     public: auto gen_case_sensitive(generation_context& ctx) const& -> void;
 
-#line 1252 "cpp2regex.h2"
+#line 1330 "cpp2regex.h2"
     public: [[nodiscard]] auto add_escapes(std::string str) const& -> std::string;
 
-#line 1266 "cpp2regex.h2"
+#line 1345 "cpp2regex.h2"
     public: auto append(char_token const& that) & -> void;
     public: virtual ~char_token() noexcept;
 
@@ -1001,9 +1013,10 @@ class char_token: public regex_token {
     public: auto operator=(char_token const&) -> void = delete;
 
 
-#line 1270 "cpp2regex.h2"
+#line 1349 "cpp2regex.h2"
 };
 
+#line 1352 "cpp2regex.h2"
 // TODO: Check if vectorization works at some point with this implementation.
 // char_token_matcher:  (inout cur, inout ctx) -> bool = {
 //     if !(std::distance(cur, ctx.end) < tokens..size()) {
@@ -1037,25 +1050,27 @@ class char_token: public regex_token {
 //     return matched;
 // }
 
-// Regex syntax: []  Example: [abcx-y[:digits:]]
+#line 1386 "cpp2regex.h2"
+//  Regex syntax: []  Example: [abcx-y[:digits:]]
 //
-class class_token: public regex_token {
+class class_token
+: public regex_token {
 
-#line 1310 "cpp2regex.h2"
+#line 1392 "cpp2regex.h2"
     private: bool negate; 
     private: bool case_insensitive; 
     private: std::string class_str; 
 
     public: explicit class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str);
 
-#line 1321 "cpp2regex.h2"
-    // TODO: Rework class generation: Generate check functions for classes.
+#line 1404 "cpp2regex.h2"
+    //  TODO: Rework class generation: Generate check functions for classes.
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1429 "cpp2regex.h2"
+#line 1530 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1434 "cpp2regex.h2"
+#line 1535 "cpp2regex.h2"
     private: [[nodiscard]] static auto create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string;
     public: virtual ~class_token() noexcept;
 
@@ -1063,21 +1078,22 @@ class class_token: public regex_token {
     public: auto operator=(class_token const&) -> void = delete;
 
 
-#line 1440 "cpp2regex.h2"
+#line 1542 "cpp2regex.h2"
 };
 
+#line 1545 "cpp2regex.h2"
 template class class_token_matcher
  {
     public: [[nodiscard]] static auto match(auto& cur, auto& ctx) -> bool;
 
-#line 1465 "cpp2regex.h2"
+#line 1576 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_any(cpp2::impl::in c) -> bool;
     public: class_token_matcher() = default;
     public: class_token_matcher(class_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(class_token_matcher const&) -> void = delete;
 
 
-#line 1477 "cpp2regex.h2"
+#line 1589 "cpp2regex.h2"
     // TODO: Implement proper to string
     // to_string: () -> bstring = {
     //     r: bstring = "[";
@@ -1089,19 +1105,20 @@ template c
 
     //     return r;
     // }
-#line 1488 "cpp2regex.h2"
+#line 1600 "cpp2regex.h2"
 };
 
+#line 1603 "cpp2regex.h2"
 // Regex syntax: \a or \n or \[
 //
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1527 "cpp2regex.h2"
+#line 1640 "cpp2regex.h2"
 // Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1536 "cpp2regex.h2"
+#line 1649 "cpp2regex.h2"
 // Regex syntax: \  Example: \1
 //               \g{name_or_number}
 //               \k{name_or_number}
@@ -1110,16 +1127,16 @@ template c
 //
 class group_ref_token: public regex_token {
 
-#line 1545 "cpp2regex.h2"
+#line 1658 "cpp2regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1554 "cpp2regex.h2"
+#line 1667 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1646 "cpp2regex.h2"
+#line 1759 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1127,12 +1144,12 @@ class group_ref_token: public regex_token {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1649 "cpp2regex.h2"
+#line 1762 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1676 "cpp2regex.h2"
+#line 1789 "cpp2regex.h2"
 // Regex syntax: ()      Example: (abc)
 //               (?:)  (?i:abc)
@@ -1145,22 +1162,22 @@ template [[nodiscard]] auto gr
 //
 class group_token: public regex_token {
 
-#line 1689 "cpp2regex.h2"
+#line 1802 "cpp2regex.h2"
     private: int number {-1}; 
     private: token_ptr inner {nullptr}; 
 
     public: [[nodiscard]] static auto parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1705 "cpp2regex.h2"
+#line 1818 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1832 "cpp2regex.h2"
+#line 1945 "cpp2regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1849 "cpp2regex.h2"
+#line 1962 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1868 "cpp2regex.h2"
+#line 1981 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1169,46 +1186,46 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1874 "cpp2regex.h2"
+#line 1987 "cpp2regex.h2"
 };
 
 // Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1916 "cpp2regex.h2"
+#line 2029 "cpp2regex.h2"
 // Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1934 "cpp2regex.h2"
+#line 2047 "cpp2regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1946 "cpp2regex.h2"
+#line 2059 "cpp2regex.h2"
 // Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1960 "cpp2regex.h2"
+#line 2073 "cpp2regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 1965 "cpp2regex.h2"
+#line 2078 "cpp2regex.h2"
 // Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
 // Parsed in group_token.
 //
 class lookahead_token: public regex_token {
 
-#line 1972 "cpp2regex.h2"
+#line 2085 "cpp2regex.h2"
     protected: bool positive; 
     public: token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 1979 "cpp2regex.h2"
+#line 2092 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1985 "cpp2regex.h2"
+#line 2098 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1216,18 +1233,18 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 1988 "cpp2regex.h2"
+#line 2101 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 1999 "cpp2regex.h2"
+#line 2112 "cpp2regex.h2"
 // Named character classes
 //
 
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2026 "cpp2regex.h2"
+#line 2139 "cpp2regex.h2"
 template using named_class_no_new_line = class_token_matcher>;
 template                  using named_class_digits = class_token_matcher>;
 template                  using named_class_hor_space = class_token_matcher>;
@@ -1241,12 +1258,12 @@ template                     usi
 template using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2040 "cpp2regex.h2"
+#line 2153 "cpp2regex.h2"
 // Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2066 "cpp2regex.h2"
+#line 2179 "cpp2regex.h2"
 // TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147
 
 // Options for range matching.
@@ -1259,13 +1276,13 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2074 "cpp2regex.h2"
+#line 2187 "cpp2regex.h2"
 
 // Regex syntax: {min, max}  Example: a{2,4}
 //
 class range_token: public regex_token {
 
-#line 2080 "cpp2regex.h2"
+#line 2193 "cpp2regex.h2"
     protected: int min_count {-1}; 
     protected: int max_count {-1}; 
     protected: int kind {range_flags::greedy}; 
@@ -1275,19 +1292,19 @@ class range_token: public regex_token {
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2157 "cpp2regex.h2"
+#line 2270 "cpp2regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2168 "cpp2regex.h2"
+#line 2281 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2180 "cpp2regex.h2"
+#line 2293 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2198 "cpp2regex.h2"
+#line 2311 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2208 "cpp2regex.h2"
+#line 2321 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1295,46 +1312,46 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2212 "cpp2regex.h2"
+#line 2325 "cpp2regex.h2"
 };
 
 template class range_token_matcher {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2228 "cpp2regex.h2"
+#line 2341 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2233 "cpp2regex.h2"
+#line 2346 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2238 "cpp2regex.h2"
+#line 2351 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2244 "cpp2regex.h2"
+#line 2357 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2259 "cpp2regex.h2"
+#line 2372 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2287 "cpp2regex.h2"
+#line 2400 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2311 "cpp2regex.h2"
+#line 2424 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2335 "cpp2regex.h2"
+#line 2448 "cpp2regex.h2"
 };
 
 // Regex syntax: *, +, or ?  Example: aa*
 //
 class special_range_token: public range_token {
 
-#line 2342 "cpp2regex.h2"
+#line 2455 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1343,7 +1360,7 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2371 "cpp2regex.h2"
+#line 2484 "cpp2regex.h2"
 };
 
 // Regex syntax: \b or \B  Example: \bword\b
@@ -1352,10 +1369,10 @@ class special_range_token: public range_token {
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2393 "cpp2regex.h2"
+#line 2506 "cpp2regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2418 "cpp2regex.h2"
+#line 2531 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1376,7 +1393,7 @@ template class regular_expression {
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2442 "cpp2regex.h2"
+#line 2555 "cpp2regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1391,7 +1408,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2458 "cpp2regex.h2"
+#line 2571 "cpp2regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1399,13 +1416,13 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2470 "cpp2regex.h2"
+#line 2583 "cpp2regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2492 "cpp2regex.h2"
+#line 2605 "cpp2regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
     // Helper functions
@@ -1417,7 +1434,7 @@ template class regular_expression {
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2505 "cpp2regex.h2"
+#line 2618 "cpp2regex.h2"
 };
 
 //-----------------------------------------------------------------------
@@ -1440,30 +1457,34 @@ template class regex_generator {
 
     public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
-#line 2530 "cpp2regex.h2"
+#line 2643 "cpp2regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2565 "cpp2regex.h2"
+#line 2678 "cpp2regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2578 "cpp2regex.h2"
+#line 2691 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2587 "cpp2regex.h2"
+#line 2700 "cpp2regex.h2"
 }
 }
 
 
+#endif
+
+#line 1 "cpp2regex.h2"
+
 //=== Cpp2 function definitions =================================================
 
 #line 1 "cpp2regex.h2"
 
-#line 23 "cpp2regex.h2"
+#line 30 "cpp2regex.h2"
 namespace cpp2 {
 
 namespace regex {
@@ -1535,7 +1556,7 @@ template  match_return::match_return(auto const& matched_,
                                                          : matched{ matched_ }
                                                          , pos{ pos_ }{}
 template  match_return::match_return(){}
-#line 30 "cpp2regex.h2"
+#line 38 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Helper structures for the expression matching.
@@ -1543,9 +1564,10 @@ template  match_return::match_return(){}
 //-----------------------------------------------------------------------
 //
 
-// Possible modifiers for a regular expression.
+//  Possible modifiers for a regular expression.
 //
 
+#line 49 "cpp2regex.h2"
                                   // mod: i
                                   // mod: m
                                   // mod: s
@@ -1553,69 +1575,69 @@ template  match_return::match_return(){}
                                   // mod: x
                                   // mod: xx
 
-#line 48 "cpp2regex.h2"
-// Structure for storing group information.
+#line 57 "cpp2regex.h2"
+//  Structure for storing group information.
 //
 
-#line 57 "cpp2regex.h2"
-// Return value for every matcher.
+#line 67 "cpp2regex.h2"
+//  Return value for every matcher.
 // 
 
-#line 64 "cpp2regex.h2"
-// Modifiable state during matching.
+#line 75 "cpp2regex.h2"
+//  Modifiable state during matching.
 //
 
-#line 73 "cpp2regex.h2"
+#line 84 "cpp2regex.h2"
     template  match_context::match_context(Iter const& begin_, Iter const& end_)
         : begin{ begin_ }
         , end{ end_ }{
 
-#line 76 "cpp2regex.h2"
+#line 87 "cpp2regex.h2"
     }
 
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     template  match_context::match_context(match_context const& that)
                                    : begin{ that.begin }
                                    , end{ that.end }
                                    , groups{ that.groups }{}
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     template  auto match_context::operator=(match_context const& that) -> match_context& {
                                    begin = that.begin;
                                    end = that.end;
                                    groups = that.groups;
                                    return *this; }
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     template  match_context::match_context(match_context&& that) noexcept
                                    : begin{ std::move(that).begin }
                                    , end{ std::move(that).end }
                                    , groups{ std::move(that).groups }{}
-#line 78 "cpp2regex.h2"
+#line 89 "cpp2regex.h2"
     template  auto match_context::operator=(match_context&& that) noexcept -> match_context& {
                                    begin = std::move(that).begin;
                                    end = std::move(that).end;
                                    groups = std::move(that).groups;
                                    return *this; }
 
-    // Getter and setter for groups
+    //  Getter and setter for groups
     //
-#line 82 "cpp2regex.h2"
+#line 93 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group(auto const& group) const& -> auto { return CPP2_ASSERT_IN_BOUNDS(groups, group);  }
 
-#line 84 "cpp2regex.h2"
+#line 95 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group_end(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).end)); 
     }
-#line 90 "cpp2regex.h2"
+#line 101 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group_start(auto const& group) const& -> int{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return 0; 
         }
         return cpp2::unsafe_narrow(std::distance(begin, CPP2_ASSERT_IN_BOUNDS(groups, group).start)); 
     }
-#line 96 "cpp2regex.h2"
+#line 107 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::get_group_string(auto const& group) const& -> std::string{
         if (cpp2::impl::cmp_greater_eq(group,max_groups) || !(CPP2_ASSERT_IN_BOUNDS(groups, group).matched)) {
             return ""; 
@@ -1623,74 +1645,74 @@ template  match_return::match_return(){}
         return std::string(CPP2_ASSERT_IN_BOUNDS(groups, group).start, CPP2_ASSERT_IN_BOUNDS(groups, group).end); 
     }
 
-#line 103 "cpp2regex.h2"
+#line 114 "cpp2regex.h2"
     template  auto match_context::set_group_end(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).end = pos;
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = true;
     }
 
-#line 108 "cpp2regex.h2"
+#line 119 "cpp2regex.h2"
     template  auto match_context::set_group_invalid(auto const& group) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).matched = false;
     }
 
-#line 112 "cpp2regex.h2"
+#line 123 "cpp2regex.h2"
     template  auto match_context::set_group_start(auto const& group, auto const& pos) & -> void{
         CPP2_ASSERT_IN_BOUNDS(groups, group).start = pos;
     }
 
-#line 116 "cpp2regex.h2"
+#line 127 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::size() const& -> auto { return max_groups;  }
 
-    // Misc functions
+    //  Misc functions
     //
-
-#line 121 "cpp2regex.h2"
+#line 131 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::fail() const& -> auto { return match_return(false, end); }
-#line 122 "cpp2regex.h2"
+#line 132 "cpp2regex.h2"
     template  [[nodiscard]] auto match_context::pass(cpp2::impl::in cur) const& -> auto { return match_return(true, cur);  }
 
-#line 126 "cpp2regex.h2"
-// End function that returns a valid match.
+#line 136 "cpp2regex.h2"
+//  End function that returns a valid match.
 //
 
-#line 129 "cpp2regex.h2"
+#line 140 "cpp2regex.h2"
     [[nodiscard]] auto true_end_func::operator()(auto const& cur, auto& ctx) const& -> auto { return ctx.pass(cur);  }
 
-#line 132 "cpp2regex.h2"
-// Empty group reset function.
+#line 144 "cpp2regex.h2"
+//  Empty group reset function.
 //
 
-#line 135 "cpp2regex.h2"
+#line 148 "cpp2regex.h2"
     auto no_reset::operator()([[maybe_unused]] auto& unnamed_param_2) const& -> void{}
 
-#line 138 "cpp2regex.h2"
-// Evaluate func on destruction of the handle.
+#line 152 "cpp2regex.h2"
+//  Evaluate func on destruction of the handle.
 
-#line 143 "cpp2regex.h2"
+#line 157 "cpp2regex.h2"
     template  on_return::on_return(Func const& f)
         : func{ f }{
 
-#line 145 "cpp2regex.h2"
+#line 159 "cpp2regex.h2"
     }
-#line 143 "cpp2regex.h2"
+#line 157 "cpp2regex.h2"
     template  auto on_return::operator=(Func const& f) -> on_return& {
         func = f;
         return *this;
 
-#line 145 "cpp2regex.h2"
+#line 159 "cpp2regex.h2"
     }
 
-#line 147 "cpp2regex.h2"
+#line 161 "cpp2regex.h2"
     template  on_return::~on_return() noexcept{
         cpp2::move(*this).func();
     }
 
-#line 152 "cpp2regex.h2"
-// Helper for auto deduction of the Func type.
-#line 153 "cpp2regex.h2"
+#line 167 "cpp2regex.h2"
+//  Helper for auto deduction of the Func type.
+#line 168 "cpp2regex.h2"
 template [[nodiscard]] auto make_on_return(Func const& func) -> auto { return on_return(func);  }
 
+#line 171 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Character classes for regular expressions.
@@ -1698,78 +1720,78 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 //-----------------------------------------------------------------------
 //
 
-// Class syntax:  Example: a
+//  Class syntax:  Example: a
 //
 
-#line 166 "cpp2regex.h2"
+#line 182 "cpp2regex.h2"
     template  [[nodiscard]] auto single_class_entry::includes(cpp2::impl::in c) -> auto { return c == C;  }
-#line 167 "cpp2regex.h2"
+#line 183 "cpp2regex.h2"
     template  [[nodiscard]] auto single_class_entry::to_string() -> auto { return bstring(1, C); }
 
-#line 170 "cpp2regex.h2"
-// Class syntax: - Example: a-c
+#line 187 "cpp2regex.h2"
+//  Class syntax: - Example: a-c
 //
 
-#line 174 "cpp2regex.h2"
+#line 191 "cpp2regex.h2"
     template  [[nodiscard]] auto range_class_entry::includes(cpp2::impl::in c) -> auto { return [_0 = Start, _1 = c, _2 = End]{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }();  }
-#line 175 "cpp2regex.h2"
+#line 192 "cpp2regex.h2"
     template  [[nodiscard]] auto range_class_entry::to_string() -> auto { return "" + cpp2::to_string(Start) + "-" + cpp2::to_string(End) + ""; }
 
-#line 178 "cpp2regex.h2"
-// Helper for combining two character classes
+#line 196 "cpp2regex.h2"
+//  Helper for combining two character classes
 //
 
-#line 181 "cpp2regex.h2"
+#line 200 "cpp2regex.h2"
     template  [[nodiscard]] auto combined_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || List::includes(c));  }
-#line 182 "cpp2regex.h2"
+#line 201 "cpp2regex.h2"
     template  [[nodiscard]] auto combined_class_entry::to_string() -> auto { return (bstring() + ... + List::to_string()); }
 
-#line 185 "cpp2regex.h2"
-// Class syntax:   Example: abcd
+#line 205 "cpp2regex.h2"
+//  Class syntax:   Example: abcd
 //
 
-#line 188 "cpp2regex.h2"
+#line 209 "cpp2regex.h2"
     template  [[nodiscard]] auto list_class_entry::includes(cpp2::impl::in c) -> auto { return (false || ... || (List == c));  }
-#line 189 "cpp2regex.h2"
+#line 210 "cpp2regex.h2"
     template  [[nodiscard]] auto list_class_entry::to_string() -> auto { return (bstring() + ... + List); }
 
-#line 192 "cpp2regex.h2"
-// Class syntax: [: [[nodiscard]] auto named_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 196 "cpp2regex.h2"
+#line 219 "cpp2regex.h2"
     template  [[nodiscard]] auto named_class_entry::to_string() -> auto { return "[:" + cpp2::to_string(Name.data()) + ":]"; }
 
-#line 201 "cpp2regex.h2"
+#line 226 "cpp2regex.h2"
     template  [[nodiscard]] auto negated_class_entry::includes(cpp2::impl::in c) -> auto { return !(Inner::includes(c));  }
 
-#line 204 "cpp2regex.h2"
-// Short class syntax: \  Example: \w
+#line 230 "cpp2regex.h2"
+//  Short class syntax: \  Example: \w
 //
 
-#line 207 "cpp2regex.h2"
+#line 234 "cpp2regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::includes(cpp2::impl::in c) -> auto { return Inner::includes(c);  }
-#line 208 "cpp2regex.h2"
+#line 235 "cpp2regex.h2"
     template  [[nodiscard]] auto shorthand_class_entry::to_string() -> auto { return Name.str(); }
 
-#line 212 "cpp2regex.h2"
-// Named basic character classes
+#line 239 "cpp2regex.h2"
+//  Named basic character classes
 //
 
-#line 218 "cpp2regex.h2"
-// Named other classes
+#line 245 "cpp2regex.h2"
+//  Named other classes
 //
 
-#line 234 "cpp2regex.h2"
+#line 261 "cpp2regex.h2"
 // Shorthand class entries
 //
 
-#line 249 "cpp2regex.h2"
+#line 276 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
-// Tokens for regular expressions.
+//  Tokens for regular expressions.
 //
 //-----------------------------------------------------------------------
 //
@@ -1777,99 +1799,99 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 // Basic class for a regex token.
 //
 
-#line 262 "cpp2regex.h2"
+#line 289 "cpp2regex.h2"
     regex_token::regex_token(cpp2::impl::in str)
         : string_rep{ str }{
 
-#line 264 "cpp2regex.h2"
+#line 291 "cpp2regex.h2"
     }
 
-#line 266 "cpp2regex.h2"
+#line 293 "cpp2regex.h2"
     regex_token::regex_token()
         : string_rep{ "" }{
 
-#line 268 "cpp2regex.h2"
+#line 295 "cpp2regex.h2"
     }
 
     //parse: (inout ctx: parse_context) -> token_ptr;
                                                                        // Generate the matching code.
 
-#line 273 "cpp2regex.h2"
+#line 300 "cpp2regex.h2"
     auto regex_token::add_groups([[maybe_unused]] std::set& unnamed_param_2) const -> void{}// Adds all group indices to the set.
-#line 274 "cpp2regex.h2"
+#line 301 "cpp2regex.h2"
     [[nodiscard]] auto regex_token::to_string() const& -> std::string{return string_rep; }// Create a string representation.
-#line 275 "cpp2regex.h2"
+#line 302 "cpp2regex.h2"
     auto regex_token::set_string(cpp2::impl::in s) & -> void{string_rep = s; }
 
     regex_token::~regex_token() noexcept{}// Set the string representation.
 
-#line 288 "cpp2regex.h2"
+#line 317 "cpp2regex.h2"
     regex_token_check::regex_token_check(cpp2::impl::in str, cpp2::impl::in check_)
         : regex_token{ str }
         , check{ check_ }{
 
-#line 291 "cpp2regex.h2"
+#line 320 "cpp2regex.h2"
     }
 
-#line 293 "cpp2regex.h2"
+#line 322 "cpp2regex.h2"
     auto regex_token_check::generate_code(generation_context& ctx) const -> void{
         ctx.add_check(check + "(" + ctx.match_parameters() + ")");
     }
 
     regex_token_check::~regex_token_check() noexcept{}
 
-#line 304 "cpp2regex.h2"
+#line 336 "cpp2regex.h2"
     regex_token_code::regex_token_code(cpp2::impl::in str, cpp2::impl::in code_)
         : regex_token{ str }
         , code{ code_ }{
 
-#line 307 "cpp2regex.h2"
+#line 339 "cpp2regex.h2"
     }
 
-#line 309 "cpp2regex.h2"
+#line 341 "cpp2regex.h2"
     auto regex_token_code::generate_code(generation_context& ctx) const -> void{
         ctx.add(code);
     }
 
     regex_token_code::~regex_token_code() noexcept{}
 
-#line 318 "cpp2regex.h2"
+#line 353 "cpp2regex.h2"
     regex_token_empty::regex_token_empty(cpp2::impl::in str)
         : regex_token{ str }{
 
-#line 320 "cpp2regex.h2"
+#line 355 "cpp2regex.h2"
     }
 
-#line 322 "cpp2regex.h2"
+#line 357 "cpp2regex.h2"
     auto regex_token_empty::generate_code([[maybe_unused]] generation_context& unnamed_param_2) const -> void{
         // Nothing.
     }
 
     regex_token_empty::~regex_token_empty() noexcept{}
 
-#line 334 "cpp2regex.h2"
+#line 371 "cpp2regex.h2"
     regex_token_list::regex_token_list(cpp2::impl::in t)
         : regex_token{ gen_string(t) }
         , tokens{ t }{
 
-#line 337 "cpp2regex.h2"
+#line 374 "cpp2regex.h2"
     }
 
-#line 339 "cpp2regex.h2"
+#line 376 "cpp2regex.h2"
     auto regex_token_list::generate_code(generation_context& ctx) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).generate_code(ctx);
         }
     }
 
-#line 345 "cpp2regex.h2"
+#line 382 "cpp2regex.h2"
     auto regex_token_list::add_groups(std::set& groups) const -> void{
         for ( auto const& token : tokens ) {
             (*cpp2::impl::assert_not_null(token)).add_groups(groups);
         }
     }
 
-#line 351 "cpp2regex.h2"
+#line 388 "cpp2regex.h2"
     [[nodiscard]] auto regex_token_list::gen_string(cpp2::impl::in vec) -> std::string{
         std::string r {""}; 
         for ( auto const& token : vec ) {
@@ -1880,7 +1902,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
 
     regex_token_list::~regex_token_list() noexcept{}
 
-#line 377 "cpp2regex.h2"
+#line 414 "cpp2regex.h2"
     auto parse_context_group_state::next_alternative() & -> void{
         token_vec new_list {}; 
         std::swap(new_list, cur_match_list);
@@ -1888,14 +1910,14 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         static_cast(alternate_match_lists.insert(alternate_match_lists.end(), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(new_list))));
     }
 
-#line 385 "cpp2regex.h2"
+#line 422 "cpp2regex.h2"
     auto parse_context_group_state::swap(parse_context_group_state& t) & -> void{
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-#line 392 "cpp2regex.h2"
+#line 429 "cpp2regex.h2"
     [[nodiscard]] auto parse_context_group_state::get_as_token() & -> token_ptr{
         if (alternate_match_lists.empty()) {
             post_process_list(cur_match_list);
@@ -1907,15 +1929,15 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
         }
     }
 
-#line 404 "cpp2regex.h2"
+#line 441 "cpp2regex.h2"
     auto parse_context_group_state::add(cpp2::impl::in token) & -> void{
         cur_match_list.push_back(token);
     }
 
-#line 409 "cpp2regex.h2"
+#line 446 "cpp2regex.h2"
     [[nodiscard]] auto parse_context_group_state::empty() const& -> bool { return cur_match_list.empty();  }
 
-#line 413 "cpp2regex.h2"
+#line 450 "cpp2regex.h2"
     auto parse_context_group_state::post_process_list(token_vec& list) -> void{
         // Merge all characters
         auto merge_pos {list.begin()}; 
@@ -1936,7 +1958,7 @@ template [[nodiscard]] auto make_on_return(Func const& func) -> a
                                                                                               , modifiers{ modifiers_ }{}
 parse_context_group_state::parse_context_group_state(){}
 
-#line 437 "cpp2regex.h2"
+#line 476 "cpp2regex.h2"
     [[nodiscard]] auto parse_context_branch_reset_state::next() & -> int{
         auto g {cur_group}; 
         cur_group += 1;
@@ -1945,20 +1967,20 @@ parse_context_group_state::parse_context_group_state(){}
         return g; 
     }
 
-#line 446 "cpp2regex.h2"
+#line 485 "cpp2regex.h2"
     auto parse_context_branch_reset_state::set_next(cpp2::impl::in g) & -> void{
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-#line 452 "cpp2regex.h2"
+#line 491 "cpp2regex.h2"
     auto parse_context_branch_reset_state::next_alternative() & -> void{
         if (is_active) {
             cur_group = from;
         }
     }
 
-#line 459 "cpp2regex.h2"
+#line 498 "cpp2regex.h2"
     auto parse_context_branch_reset_state::set_active_reset(cpp2::impl::in restart) & -> void{
         is_active = true;
         cur_group = restart;
@@ -1973,17 +1995,18 @@ parse_context_group_state::parse_context_group_state(){}
                                                                                     , from{ from_ }{}
 parse_context_branch_reset_state::parse_context_branch_reset_state(){}
 
-#line 485 "cpp2regex.h2"
+#line 526 "cpp2regex.h2"
     parse_context::parse_context(cpp2::impl::in r, auto const& e)
         : regex{ r }
         , root{ CPP2_UFCS_TEMPLATE_NONLOCAL(cpp2_new)(cpp2::shared, "") }
         , error_out{ e }{
 
-#line 489 "cpp2regex.h2"
+#line 530 "cpp2regex.h2"
     }
 
-#line 495 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state{
+#line 536 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::start_group() & -> parse_context_group_state
+    {
         parse_context_group_state old_state {}; 
         old_state.swap(cur_group_state);
         cur_group_state.modifiers = old_state.modifiers;
@@ -1991,25 +2014,27 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return old_state; 
     }
 
-#line 504 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr{
+#line 546 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::end_group(cpp2::impl::in old_state) & -> token_ptr
+    {
         auto inner {cur_group_state.get_as_token()}; 
         cur_group_state = old_state;
         return inner; 
     }
 
-#line 510 "cpp2regex.h2"
+#line 553 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_modifiers() const& -> expression_flags{
         return cur_group_state.modifiers; 
     }
 
-#line 514 "cpp2regex.h2"
+#line 557 "cpp2regex.h2"
     auto parse_context::set_modifiers(cpp2::impl::in mod) & -> void{
         cur_group_state.modifiers = mod;
     }
 
-#line 521 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state{
+#line 564 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::branch_reset_new_state() & -> parse_context_branch_reset_state
+    {
         parse_context_branch_reset_state old_state {}; 
         std::swap(old_state, cur_branch_reset_state);
 
@@ -2017,31 +2042,34 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return old_state; 
     }
 
-#line 529 "cpp2regex.h2"
-    auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void{
+#line 573 "cpp2regex.h2"
+    auto parse_context::branch_reset_restore_state(cpp2::impl::in old_state) & -> void
+    {
         auto max_group {cur_branch_reset_state.max_group}; 
         cur_branch_reset_state = old_state;
         cur_branch_reset_state.set_next(cpp2::move(max_group));
     }
 
-#line 535 "cpp2regex.h2"
-    auto parse_context::next_alternative() & -> void{
+#line 580 "cpp2regex.h2"
+    auto parse_context::next_alternative() & -> void
+    {
         cur_group_state.next_alternative();
         cur_branch_reset_state.next_alternative();
     }
 
-#line 543 "cpp2regex.h2"
+#line 588 "cpp2regex.h2"
     auto parse_context::add_token(cpp2::impl::in token) & -> void{
         cur_group_state.add(token);
     }
 
-#line 547 "cpp2regex.h2"
+#line 592 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::has_token() const& -> bool{
         return !(cur_group_state.empty()); 
     }
 
-#line 551 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::pop_token() & -> token_ptr{
+#line 596 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::pop_token() & -> token_ptr
+    {
         token_ptr r {nullptr}; 
         if (has_token()) {
             r = cur_group_state.cur_match_list.back();
@@ -2051,30 +2079,32 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return r; 
     }
 
-#line 561 "cpp2regex.h2"
+#line 607 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_as_token() & -> token_ptr{
         return root; 
     }
 
-#line 568 "cpp2regex.h2"
+#line 613 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_cur_group() const& -> int{
         return cur_branch_reset_state.cur_group; 
     }
 
-#line 572 "cpp2regex.h2"
+#line 617 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_group() & -> int{
         return cur_branch_reset_state.next(); 
     }
 
-#line 576 "cpp2regex.h2"
-    auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void{
+#line 621 "cpp2regex.h2"
+    auto parse_context::set_named_group(cpp2::impl::in name, cpp2::impl::in id) & -> void
+    {
         if (!(named_groups.contains(name))) {// Redefinition of group name is not an error. The left most one is retained.
             CPP2_ASSERT_IN_BOUNDS(named_groups, name) = id;
         }
     }
 
-#line 582 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int{
+#line 628 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::get_named_group(cpp2::impl::in name) const& -> int
+    {
         auto iter {named_groups.find(name)}; 
         if (iter == named_groups.end()) {
              return -1; 
@@ -2084,11 +2114,12 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 595 "cpp2regex.h2"
+#line 641 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::current() const& -> char{return CPP2_ASSERT_IN_BOUNDS(regex, pos); }
 
-#line 598 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t{
+#line 644 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::get_next_position(cpp2::impl::in in_class, cpp2::impl::in no_skip) const& -> size_t
+    {
         auto perl_syntax {false}; 
         if (!(no_skip)) {
             if (in_class) {
@@ -2119,15 +2150,16 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
             }
         }
 
-        // Check for end of file.
+        //  Check for end of file.
         if (cpp2::impl::cmp_greater(cur,regex.size())) {
             cur = regex.size();
         }
         return cur; 
     }
 
-#line 637 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool{
+#line 684 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::next_impl(cpp2::impl::in in_class, cpp2::impl::in no_skip) & -> bool
+    {
         pos = get_next_position(in_class, no_skip);
         if (pos != regex.size()) {
             return true; 
@@ -2137,14 +2169,14 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 647 "cpp2regex.h2"
+#line 695 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next() & -> auto { return next_impl(false, false); }
-#line 648 "cpp2regex.h2"
+#line 696 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_in_class() & -> auto { return next_impl(true, false);  }
-#line 649 "cpp2regex.h2"
+#line 697 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_no_skip() & -> auto { return next_impl(false, true); }
 
-#line 651 "cpp2regex.h2"
+#line 699 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::next_n(cpp2::impl::in n) & -> bool{
         auto r {true}; 
         auto cur {0}; 
@@ -2154,11 +2186,12 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return r; 
     }
 
-#line 660 "cpp2regex.h2"
+#line 708 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::has_next() const& -> bool{return cpp2::impl::cmp_less(pos,regex.size()); }
 
-#line 662 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool{
+#line 710 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::grab_until_impl(cpp2::impl::in e, cpp2::impl::out r, cpp2::impl::in any) & -> bool
+    {
         auto end {pos}; 
         if (any) {
             end = regex.find_first_of(e, pos);
@@ -2178,15 +2211,16 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 682 "cpp2regex.h2"
+#line 731 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), false); }
-#line 683 "cpp2regex.h2"
+#line 732 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_until(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(std::string(1, e), cpp2::impl::out(&r), false); }
-#line 684 "cpp2regex.h2"
+#line 733 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::grab_until_one_of(cpp2::impl::in e, cpp2::impl::out r) & -> auto { return grab_until_impl(e, cpp2::impl::out(&r), true);  }
 
-#line 686 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool{
+#line 735 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::grab_n(cpp2::impl::in n, cpp2::impl::out r) & -> bool
+    {
         if (cpp2::impl::cmp_less_eq(pos + n,regex.size())) {
             r.construct(regex.substr(pos, n));
             pos += n - 1;
@@ -2198,8 +2232,9 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 698 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::grab_number() & -> std::string{
+#line 748 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::grab_number() & -> std::string
+    {
         auto start {pos}; 
         auto start_search {pos}; 
         if (CPP2_ASSERT_IN_BOUNDS(regex, start_search) == '-') {
@@ -2219,7 +2254,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return cpp2::move(r.value()); 
     }
 
-#line 718 "cpp2regex.h2"
+#line 769 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::peek_impl(cpp2::impl::in in_class) const& -> char{
         auto next_pos {get_next_position(in_class, false)}; 
         if (cpp2::impl::cmp_less(next_pos,regex.size())) {
@@ -2230,13 +2265,14 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 728 "cpp2regex.h2"
+#line 779 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::peek() const& -> auto { return peek_impl(false); }
-#line 729 "cpp2regex.h2"
+#line 780 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::peek_in_class() const& -> auto { return peek_impl(true);  }
 
-#line 734 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool{
+#line 785 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::parser_group_modifiers(cpp2::impl::in change_str, expression_flags& parser_modifiers) & -> bool
+    {
         auto is_negative {false}; 
         auto is_reset {false}; 
 
@@ -2250,7 +2286,8 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }}; 
 
         auto iter {change_str.begin()}; 
-        for( ; iter != change_str.end(); (++iter) ) {
+        for( ; iter != change_str.end(); (++iter) ) 
+        {
             auto cur {*cpp2::impl::assert_not_null(iter)}; 
             if (cur == '^') {
                 is_reset = true;
@@ -2288,11 +2325,12 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return true; 
     }
 
-#line 786 "cpp2regex.h2"
+#line 839 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::parse_until(cpp2::impl::in term) & -> bool{
         token_ptr cur_token {}; 
 
-        for( ; valid(); static_cast(next()) ) {
+        for( ; valid(); static_cast(next()) ) 
+        {
             if (term == current()) {break; }
 
             cur_token = nullptr;
@@ -2326,8 +2364,9 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return true; 
     }
 
-#line 823 "cpp2regex.h2"
-    [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool{
+#line 877 "cpp2regex.h2"
+    [[nodiscard]] auto parse_context::parse(cpp2::impl::in modifiers) & -> bool
+    {
 
         expression_flags flags {}; 
         if (!(parser_group_modifiers(modifiers, flags))) {return false; }
@@ -2341,21 +2380,21 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         return r; 
     }
 
-#line 839 "cpp2regex.h2"
+#line 894 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_pos() const& -> auto { return pos; }
-#line 840 "cpp2regex.h2"
+#line 895 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::get_range(cpp2::impl::in start, cpp2::impl::in end) const& -> auto { return std::string(regex.substr(start, end - start + 1));  }
-#line 841 "cpp2regex.h2"
+#line 896 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::valid() const& -> bool{return has_next() && !(has_error); }
 
-#line 843 "cpp2regex.h2"
+#line 898 "cpp2regex.h2"
     [[nodiscard]] auto parse_context::error(cpp2::impl::in err) & -> token_ptr{
         has_error = true;
         error_out("Error during parsing of regex '" + cpp2::to_string(regex) + "' at position '" + cpp2::to_string(pos) + "': " + cpp2::to_string(err) + "");
         return nullptr; 
     }
 
-#line 857 "cpp2regex.h2"
+#line 913 "cpp2regex.h2"
     auto generation_function_context::add_tabs(cpp2::impl::in c) & -> void{
         int i {0}; 
         for( ; cpp2::impl::cmp_less(i,c); i += 1 ) {
@@ -2363,7 +2402,7 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
         }
     }
 
-#line 864 "cpp2regex.h2"
+#line 920 "cpp2regex.h2"
     auto generation_function_context::remove_tabs(cpp2::impl::in c) & -> void{
         tabs = tabs.substr(0, c * 2);
     }
@@ -2373,31 +2412,33 @@ parse_context_branch_reset_state::parse_context_branch_reset_state(){}
                                                        , tabs{ tabs_ }{}
 generation_function_context::generation_function_context(){}
 
-#line 882 "cpp2regex.h2"
+#line 938 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::match_parameters() const& -> std::string{return "r.pos, ctx"; }
 
-#line 887 "cpp2regex.h2"
+#line 943 "cpp2regex.h2"
     auto generation_context::add(cpp2::impl::in s) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(s) + "\n";
     }
 
-#line 893 "cpp2regex.h2"
+#line 949 "cpp2regex.h2"
     auto generation_context::add_check(cpp2::impl::in check) & -> void{
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + "if !cpp2::regex::" + cpp2::to_string(check) + " { r.matched = false; break; }\n";
     }
 
-#line 899 "cpp2regex.h2"
-    auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void{
+#line 955 "cpp2regex.h2"
+    auto generation_context::add_statefull(cpp2::impl::in next_func, cpp2::impl::in check) & -> void
+    {
         end_func_statefull(check);
 
         auto name {next_func.substr(0, next_func.size() - 2)}; 
         start_func_named(cpp2::move(name));
     }
 
-#line 906 "cpp2regex.h2"
-    auto generation_context::start_func_named(cpp2::impl::in name) & -> void{
+#line 963 "cpp2regex.h2"
+    auto generation_context::start_func_named(cpp2::impl::in name) & -> void
+    {
         auto cur {new_context()}; 
 
         (*cpp2::impl::assert_not_null(cur)).code += "" + cpp2::to_string((*cpp2::impl::assert_not_null(cur)).tabs) + cpp2::to_string(name) + ": @struct type = {\n";
@@ -2407,15 +2448,17 @@ generation_function_context::generation_function_context(){}
         (*cpp2::impl::assert_not_null(cpp2::move(cur))).add_tabs(3);
     }
 
-#line 916 "cpp2regex.h2"
-    [[nodiscard]] auto generation_context::start_func() & -> std::string{
+#line 974 "cpp2regex.h2"
+    [[nodiscard]] auto generation_context::start_func() & -> std::string
+    {
         auto name {gen_func_name()}; 
         start_func_named(name);
         return cpp2::move(name) + "()"; 
     }
 
-#line 922 "cpp2regex.h2"
-    auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void{
+#line 981 "cpp2regex.h2"
+    auto generation_context::end_func_statefull(cpp2::impl::in s) & -> void
+    {
         auto cur {get_current()}; 
         (*cpp2::impl::assert_not_null(cur)).remove_tabs(3);
         (*cpp2::impl::assert_not_null(cur)).code += "\n";
@@ -2433,8 +2476,9 @@ generation_function_context::generation_function_context(){}
         finish_context();
     }
 
-#line 941 "cpp2regex.h2"
-    [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string{
+#line 1001 "cpp2regex.h2"
+    [[nodiscard]] auto generation_context::generate_func(cpp2::impl::in token) & -> std::string
+    {
         auto name {start_func()}; 
         (*cpp2::impl::assert_not_null(token)).generate_code((*this));
         end_func_statefull("other(" + cpp2::to_string(match_parameters()) + ")");
@@ -2442,8 +2486,9 @@ generation_function_context::generation_function_context(){}
         return name; 
     }
 
-#line 950 "cpp2regex.h2"
-    [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string{
+#line 1011 "cpp2regex.h2"
+    [[nodiscard]] auto generation_context::generate_reset(cpp2::impl::in> groups) & -> std::string
+    {
         if (groups.empty()) {
             return "cpp2::regex::no_reset()"; 
         }
@@ -2464,33 +2509,33 @@ generation_function_context::generation_function_context(){}
         return cpp2::move(name) + "()"; 
     }
 
-#line 974 "cpp2regex.h2"
+#line 1035 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::gen_func_name() & -> std::string{
         auto cur_id {matcher_func}; 
         matcher_func += 1;
         return "func_" + cpp2::to_string(cpp2::move(cur_id)) + ""; 
     }
 
-#line 980 "cpp2regex.h2"
+#line 1041 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::next_func_name() & -> std::string{
         return gen_func_name() + "()"; 
     }
 
-#line 984 "cpp2regex.h2"
+#line 1045 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::gen_reset_func_name() & -> std::string{
         auto cur_id {reset_func}; 
         reset_func += 1;
         return "reset_" + cpp2::to_string(cpp2::move(cur_id)) + ""; 
     }
 
-#line 990 "cpp2regex.h2"
+#line 1051 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::gen_temp() & -> std::string{
         auto cur_id {temp_name}; 
         temp_name += 1;
         return "tmp_" + cpp2::to_string(cpp2::move(cur_id)) + ""; 
     }
 
-#line 999 "cpp2regex.h2"
+#line 1059 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::new_context() & -> generation_function_context*{
         gen_stack.push_back(generation_function_context());
         auto cur {get_current()}; 
@@ -2499,7 +2544,7 @@ generation_function_context::generation_function_context(){}
         return cur; 
     }
 
-#line 1007 "cpp2regex.h2"
+#line 1067 "cpp2regex.h2"
     auto generation_context::finish_context() & -> void{
         auto cur {get_current()}; 
         auto base {get_base()}; 
@@ -2508,33 +2553,34 @@ generation_function_context::generation_function_context(){}
         gen_stack.pop_back();
     }
 
-#line 1018 "cpp2regex.h2"
+#line 1077 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::get_current() & -> generation_function_context*{
         return &gen_stack.back(); 
     }
 
-#line 1022 "cpp2regex.h2"
+#line 1081 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::get_base() & -> generation_function_context*{
         return &CPP2_ASSERT_IN_BOUNDS_LITERAL(gen_stack, 0); 
     }
 
-#line 1026 "cpp2regex.h2"
+#line 1085 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::get_entry_func() const& -> std::string{
         return entry_func; 
     }
 
-#line 1030 "cpp2regex.h2"
-    [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string{
+#line 1089 "cpp2regex.h2"
+    [[nodiscard]] auto generation_context::create_named_group_lookup(cpp2::impl::in> named_groups) const& -> std::string
+    {
         std::string res {"get_named_group_index: (name) -> int = {\n"}; 
 
-        // Generate if selection.
+        //  Generate if selection.
         std::string sep {""}; 
         for ( auto const& cur : named_groups ) {
             res += "" + cpp2::to_string(sep) + "if name == \"" + cpp2::to_string(cur.first) + "\" { return " + cpp2::to_string(cur.second) + "; }";
             sep = "else ";
         }
 
-        // Generate else branch or return if list is empty.
+        //  Generate else branch or return if list is empty.
         if (named_groups.empty()) {
             res += "  _ = name;\n";
             res += "  return -1;\n";
@@ -2546,18 +2592,18 @@ generation_function_context::generation_function_context(){}
         return res; 
     }
 
-#line 1054 "cpp2regex.h2"
+#line 1114 "cpp2regex.h2"
     [[nodiscard]] auto generation_context::run(cpp2::impl::in token) & -> std::string{
         entry_func = generate_func(token);
 
         return (*cpp2::impl::assert_not_null(get_base())).code; 
     }
 
-#line 1068 "cpp2regex.h2"
+#line 1130 "cpp2regex.h2"
     alternative_token::alternative_token()
                             : regex_token_empty{ "" }{}
 
-#line 1070 "cpp2regex.h2"
+#line 1132 "cpp2regex.h2"
     [[nodiscard]] auto alternative_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '|') {return nullptr; }
 
@@ -2568,16 +2614,17 @@ generation_function_context::generation_function_context(){}
 
     alternative_token::~alternative_token() noexcept{}
 
-#line 1084 "cpp2regex.h2"
+#line 1147 "cpp2regex.h2"
     alternative_token_gen::alternative_token_gen(cpp2::impl::in a)
         : regex_token{ gen_string(a) }
         , alternatives{ a }{
 
-#line 1087 "cpp2regex.h2"
+#line 1150 "cpp2regex.h2"
     }
 
-#line 1089 "cpp2regex.h2"
-    auto alternative_token_gen::generate_code(generation_context& ctx) const -> void{
+#line 1152 "cpp2regex.h2"
+    auto alternative_token_gen::generate_code(generation_context& ctx) const -> void
+    {
         std::string functions {""}; 
 
         for ( auto const& cur : alternatives ) {
@@ -2593,15 +2640,17 @@ generation_function_context::generation_function_context(){}
         ctx.add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", other, " + cpp2::to_string(next_name) + " " + cpp2::to_string(cpp2::move(functions)) + ")");
     }
 
-#line 1105 "cpp2regex.h2"
-    auto alternative_token_gen::add_groups(std::set& groups) const -> void{
+#line 1169 "cpp2regex.h2"
+    auto alternative_token_gen::add_groups(std::set& groups) const -> void
+    {
         for ( auto const& cur : alternatives ) {
             (*cpp2::impl::assert_not_null(cur)).add_groups(groups);
         }
     }
 
-#line 1111 "cpp2regex.h2"
-    [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string{
+#line 1176 "cpp2regex.h2"
+    [[nodiscard]] auto alternative_token_gen::gen_string(cpp2::impl::in a) -> std::string
+    {
         std::string r {""}; 
         std::string sep {""}; 
 
@@ -2615,12 +2664,14 @@ generation_function_context::generation_function_context(){}
 
     alternative_token_gen::~alternative_token_gen() noexcept{}
 
-#line 1126 "cpp2regex.h2"
+#line 1193 "cpp2regex.h2"
     template  [[nodiscard]] auto alternative_token_matcher::match(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& ...functions) -> auto{
         return match_first(cur, ctx, end_func, tail, functions...); 
     }
-#line 1129 "cpp2regex.h2"
-    template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto{
+
+#line 1197 "cpp2regex.h2"
+    template  template [[nodiscard]] auto alternative_token_matcher::match_first(auto const& cur, auto& ctx, auto const& end_func, auto const& tail, auto const& cur_func, auto const& cur_reset, Other const& ...other) -> auto
+    {
         auto inner_call {[_0 = (tail), _1 = (end_func)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return _0(tail_cur, tail_ctx, _1); 
         }}; 
@@ -2638,14 +2689,14 @@ generation_function_context::generation_function_context(){}
         }
     }
 
-#line 1153 "cpp2regex.h2"
+#line 1224 "cpp2regex.h2"
     any_token::any_token(cpp2::impl::in single_line)
         : regex_token_check{ ".", "any_token_matcher" }{
 
-#line 1155 "cpp2regex.h2"
+#line 1226 "cpp2regex.h2"
     }
 
-#line 1157 "cpp2regex.h2"
+#line 1228 "cpp2regex.h2"
     [[nodiscard]] auto any_token::parse(parse_context& ctx) -> token_ptr{
         if ('.' != ctx.current()) {return nullptr; }
 
@@ -2654,48 +2705,50 @@ generation_function_context::generation_function_context(){}
 
     any_token::~any_token() noexcept{}
 
-#line 1164 "cpp2regex.h2"
-template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool{
-    if (cur != ctx.end // Any char except the end
-        && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) {// Do not match new lines in multi line mode.
+#line 1236 "cpp2regex.h2"
+template [[nodiscard]] auto any_token_matcher(auto& cur, auto& ctx) -> bool
+{
+    if ( cur != ctx.end                     // any char except the end
+        && (single_line || *cpp2::impl::assert_not_null(cur) != '\n')) // do not match new lines in multi line mode
+    {
         cur += 1;
         return true; 
     }
-    else {
-        return false; 
-    }
+    //  Else
+    return false; 
 }
 
-#line 1183 "cpp2regex.h2"
+#line 1258 "cpp2regex.h2"
     char_token::char_token(cpp2::impl::in t, cpp2::impl::in ignore_case_)
         : regex_token{ std::string(1, t) }
         , token{ t }
         , ignore_case{ ignore_case_ }{
 
-#line 1187 "cpp2regex.h2"
+#line 1262 "cpp2regex.h2"
     }
 
-#line 1189 "cpp2regex.h2"
+#line 1264 "cpp2regex.h2"
     [[nodiscard]] auto char_token::parse(parse_context& ctx) -> token_ptr{
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), ctx.get_modifiers().has(expression_flags::case_insensitive)); 
     }
 
-#line 1193 "cpp2regex.h2"
-    auto char_token::generate_code(generation_context& ctx) const -> void{
+#line 1268 "cpp2regex.h2"
+    auto char_token::generate_code(generation_context& ctx) const -> void
+    {
         if (ignore_case) {
             std::string upper {token}; 
             std::string lower {token}; 
 {
 size_t i{0};
 
-#line 1198 "cpp2regex.h2"
+#line 1274 "cpp2regex.h2"
             for( ; cpp2::impl::cmp_less(i,token.size()); i += 1 ) {
                 CPP2_ASSERT_IN_BOUNDS(lower, i) = string_util::safe_tolower(CPP2_ASSERT_IN_BOUNDS(token, i));
                 CPP2_ASSERT_IN_BOUNDS(upper, i) = string_util::safe_toupper(CPP2_ASSERT_IN_BOUNDS(token, i));
             }
 }
 
-#line 1203 "cpp2regex.h2"
+#line 1279 "cpp2regex.h2"
             if (upper != lower) {
                 gen_case_insensitive(cpp2::move(lower), cpp2::move(upper), ctx);
             }
@@ -2708,8 +2761,9 @@ size_t i{0};
         }
     }
 
-#line 1215 "cpp2regex.h2"
-    auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void{
+#line 1291 "cpp2regex.h2"
+    auto char_token::gen_case_insensitive(cpp2::impl::in lower, cpp2::impl::in upper, generation_context& ctx) const& -> void
+    {
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; 
         std::string lower_name {"lower_" + cpp2::to_string(name) + ""}; 
         std::string upper_name {"upper_" + cpp2::to_string(cpp2::move(name)) + ""}; 
@@ -2729,8 +2783,9 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1235 "cpp2regex.h2"
-    auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void{
+#line 1312 "cpp2regex.h2"
+    auto char_token::gen_case_sensitive(generation_context& ctx) const& -> void
+    {
         std::string name {"str_" + cpp2::to_string(ctx.gen_temp()) + ""}; 
         auto size {token.size()}; 
         ctx.add("" + cpp2::to_string(name) + " : std::array = \"" + cpp2::to_string(add_escapes(token)) + "\";");  // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
@@ -2747,8 +2802,9 @@ size_t i{0};
         ctx.add("else { break; }");
     }
 
-#line 1252 "cpp2regex.h2"
-    [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string{
+#line 1330 "cpp2regex.h2"
+    [[nodiscard]] auto char_token::add_escapes(std::string str) const& -> std::string
+    {
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
@@ -2762,7 +2818,7 @@ size_t i{0};
         return cpp2::move(str); 
     }
 
-#line 1266 "cpp2regex.h2"
+#line 1345 "cpp2regex.h2"
     auto char_token::append(char_token const& that) & -> void{
         (*this).token += that.token;
         (*this).string_rep += that.string_rep;
@@ -2770,18 +2826,21 @@ size_t i{0};
 
     char_token::~char_token() noexcept{}
 
-#line 1314 "cpp2regex.h2"
+#line 1396 "cpp2regex.h2"
     class_token::class_token(cpp2::impl::in negate_, cpp2::impl::in case_insensitive_, cpp2::impl::in class_str_, cpp2::impl::in str)
         : regex_token{ str }
         , negate{ negate_ }
         , case_insensitive{ case_insensitive_ }
-        , class_str{ class_str_ }{
+        , class_str{ class_str_ }
+#line 1397 "cpp2regex.h2"
+    {
 
-#line 1319 "cpp2regex.h2"
+#line 1402 "cpp2regex.h2"
     }
 
-#line 1322 "cpp2regex.h2"
-    [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr{
+#line 1405 "cpp2regex.h2"
+    [[nodiscard]] auto class_token::parse(parse_context& ctx) -> token_ptr
+    {
         if (ctx.current() != '[') {return nullptr; }
 
         auto start_pos {ctx.get_pos()}; 
@@ -2791,17 +2850,21 @@ size_t i{0};
 
         std::vector classes {}; 
 
-        // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
+        //  First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
         auto is_negate {false}; 
         auto first {true}; 
         auto range {false}; 
-        while( ctx.next_in_class() && (ctx.current() != ']' || first) ) {
-            if (ctx.current() == '^') {
+        while( ctx.next_in_class() && (ctx.current() != ']' || first) ) 
+        {
+            if (ctx.current() == '^') 
+            {
                 is_negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if (ctx.current() == '[' && ctx.peek_in_class() == ':') {
-                // We have a character class.
+
+            if (ctx.current() == '[' && ctx.peek_in_class() == ':') 
+            {
+                //  We have a character class.
                 static_cast(ctx.next_n(2));// Skip [:
 
                 std::string name {""}; 
@@ -2814,9 +2877,14 @@ size_t i{0};
 
                 static_cast(ctx.next());// Skip ':' pointing to the ending ']'.
             }
-            else {if (ctx.current() == '\\') {
-                if (ctx. next_no_skip()  && (ctx. current() != ']')) {
-                    if ( ' ' == ctx. current() && ctx. get_modifiers(). has(expression_flags::perl_code_syntax) && ctx. get_modifiers(). has(expression_flags::perl_code_syntax_in_classes)) {
+            else {if (ctx.current() == '\\') 
+            {
+                if (ctx. next_no_skip()  && (ctx. current() != ']')) 
+                {
+                    if ( ' ' == ctx. current() 
+                        && ctx.get_modifiers().has(expression_flags::perl_code_syntax) 
+                        && ctx.get_modifiers().has(expression_flags::perl_code_syntax_in_classes)) 
+                    {
                         classes.push_back(std::string(1, ctx.current()));
                     }
                     else {
@@ -2840,14 +2908,16 @@ size_t i{0};
                     return ctx.error("Escape without a following character."); 
                 }
             }
-            else {if (ctx.current() == '-') {
+            else {if (ctx.current() == '-') 
+            {
                 if (first) {// Literal if first entry.
                     classes.push_back("" + cpp2::to_string(ctx.current()) + "");
                 }else {
                     range = true;
                 }
             }
-            else {
+            else 
+            {
                 if (range) {// Modify last element to be a range.
                     classes.back() += "-" + cpp2::to_string(ctx.current()) + "";
                     range = false;
@@ -2870,7 +2940,8 @@ size_t i{0};
         }
 
         // Second step: Wrap the item on the class stack with corresponding class implementation.
-        for ( auto& cur : classes ) {
+        for ( auto& cur : classes ) 
+        {
             if (cur.starts_with("[:")) {
                 auto name {cur.substr(2, cur.size() - 4)}; 
                 cur = create_matcher("" + cpp2::to_string(cpp2::move(name)) + "_class", "");
@@ -2885,16 +2956,23 @@ size_t i{0};
 
         auto inner {string_util::join(cpp2::move(classes))}; 
         auto string_rep {ctx.get_range(cpp2::move(start_pos), cpp2::move(end_pos))}; 
-        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(is_negate), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(inner), cpp2::move(string_rep)); 
+        return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, 
+            cpp2::move(is_negate), 
+            ctx.get_modifiers().has(expression_flags::case_insensitive), 
+            cpp2::move(inner), 
+            cpp2::move(string_rep)
+            ); 
     }
 
-#line 1429 "cpp2regex.h2"
-    auto class_token::generate_code(generation_context& ctx) const -> void{
+#line 1530 "cpp2regex.h2"
+    auto class_token::generate_code(generation_context& ctx) const -> void
+    {
         ctx.add_check("class_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ")");
     }
 
-#line 1434 "cpp2regex.h2"
-    [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string{
+#line 1535 "cpp2regex.h2"
+    [[nodiscard]] auto class_token::create_matcher(cpp2::impl::in name, cpp2::impl::in template_arguments) -> std::string
+    {
         auto sep {", "}; 
         if (template_arguments.empty()) {sep = ""; }
 
@@ -2903,10 +2981,17 @@ size_t i{0};
 
     class_token::~class_token() noexcept{}
 
-#line 1444 "cpp2regex.h2"
-    template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool{
-        if constexpr (case_insensitive) {
-            if (cur != ctx.end && negate != (match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) {
+#line 1547 "cpp2regex.h2"
+    template  [[nodiscard]] auto class_token_matcher::match(auto& cur, auto& ctx) -> bool
+    {
+        if constexpr (case_insensitive) 
+        {
+            if ( cur != ctx.end 
+                && negate != (
+                       match_any(string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) 
+                    || match_any(string_util::safe_toupper(*cpp2::impl::assert_not_null(cur))))) 
+
+            {
                 cur += 1;
                 return true; 
             }
@@ -2914,7 +2999,8 @@ size_t i{0};
                 return false; 
             }
         }
-        else {
+        else 
+        {
             if (cur != ctx.end && negate != match_any(*cpp2::impl::assert_not_null(cur))) {
                 cur += 1;
                 return true; 
@@ -2925,8 +3011,9 @@ size_t i{0};
         }
     }
 
-#line 1465 "cpp2regex.h2"
-    template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool{
+#line 1576 "cpp2regex.h2"
+    template  template [[nodiscard]] auto class_token_matcher::match_any(cpp2::impl::in c) -> bool
+    {
         bool r {First::includes(c)}; 
 
         if (!(r)) {
@@ -2938,11 +3025,11 @@ size_t i{0};
         return r; 
     }
 
-#line 1492 "cpp2regex.h2"
+#line 1605 "cpp2regex.h2"
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1496 "cpp2regex.h2"
+#line 1609 "cpp2regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
@@ -2974,7 +3061,7 @@ size_t i{0};
 
 }
 
-#line 1529 "cpp2regex.h2"
+#line 1642 "cpp2regex.h2"
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
@@ -2982,16 +3069,16 @@ size_t i{0};
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1548 "cpp2regex.h2"
+#line 1661 "cpp2regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token{ str }
         , id{ id_ }
         , case_insensitive{ case_insensitive_ }{
 
-#line 1552 "cpp2regex.h2"
+#line 1665 "cpp2regex.h2"
     }
 
-#line 1554 "cpp2regex.h2"
+#line 1667 "cpp2regex.h2"
     [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '\\') {return nullptr; }
 
@@ -3084,14 +3171,14 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1646 "cpp2regex.h2"
+#line 1759 "cpp2regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")");
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1651 "cpp2regex.h2"
+#line 1764 "cpp2regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
     auto g {ctx.get_group(group)}; 
 
@@ -3117,7 +3204,7 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1692 "cpp2regex.h2"
+#line 1805 "cpp2regex.h2"
     [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
         static_cast(ctx.next());// Skip last token defining the syntax
 
@@ -3131,7 +3218,7 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1705 "cpp2regex.h2"
+#line 1818 "cpp2regex.h2"
     [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
         if (ctx.current() != '(') {return nullptr; }
 
@@ -3259,7 +3346,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1832 "cpp2regex.h2"
+#line 1945 "cpp2regex.h2"
     [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
         std::string start {"("}; 
         if (0 != name.size()) {
@@ -3277,7 +3364,7 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1849 "cpp2regex.h2"
+#line 1962 "cpp2regex.h2"
     auto group_token::generate_code(generation_context& ctx) const -> void{
         if (-1 != number) {
             ctx.add("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);");
@@ -3297,7 +3384,7 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1868 "cpp2regex.h2"
+#line 1981 "cpp2regex.h2"
     auto group_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
@@ -3307,7 +3394,7 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1878 "cpp2regex.h2"
+#line 1991 "cpp2regex.h2"
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
@@ -3346,7 +3433,7 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 1918 "cpp2regex.h2"
+#line 2031 "cpp2regex.h2"
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
@@ -3363,7 +3450,7 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 1934 "cpp2regex.h2"
+#line 2047 "cpp2regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
@@ -3376,7 +3463,7 @@ template [[
     }}
 }
 
-#line 1948 "cpp2regex.h2"
+#line 2061 "cpp2regex.h2"
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
@@ -3389,35 +3476,35 @@ template [[
     }
 }
 
-#line 1960 "cpp2regex.h2"
+#line 2073 "cpp2regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 1975 "cpp2regex.h2"
+#line 2088 "cpp2regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 1977 "cpp2regex.h2"
+#line 2090 "cpp2regex.h2"
     }
 
-#line 1979 "cpp2regex.h2"
+#line 2092 "cpp2regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")");
     }
 
-#line 1985 "cpp2regex.h2"
+#line 2098 "cpp2regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 1990 "cpp2regex.h2"
+#line 2103 "cpp2regex.h2"
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
@@ -3427,7 +3514,7 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2002 "cpp2regex.h2"
+#line 2115 "cpp2regex.h2"
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3452,7 +3539,7 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\" + cpp2::to_string(ctx.current()) + "", "" + cpp2::to_string(cpp2::move(name)) + "::match"); 
 }
 
-#line 2042 "cpp2regex.h2"
+#line 2155 "cpp2regex.h2"
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
@@ -3477,16 +3564,16 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2070 "cpp2regex.h2"
+#line 2183 "cpp2regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2085 "cpp2regex.h2"
+#line 2198 "cpp2regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2087 "cpp2regex.h2"
+#line 2200 "cpp2regex.h2"
     [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         if (ctx.current() == '{') {
@@ -3530,7 +3617,7 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2131 "cpp2regex.h2"
+#line 2244 "cpp2regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3557,7 +3644,7 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2157 "cpp2regex.h2"
+#line 2270 "cpp2regex.h2"
     auto range_token::parse_modifier(parse_context& ctx) & -> void{
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
@@ -3569,7 +3656,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2168 "cpp2regex.h2"
+#line 2281 "cpp2regex.h2"
     [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
         if (kind == range_flags::not_greedy) {
             return "?"; 
@@ -3582,7 +3669,7 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2180 "cpp2regex.h2"
+#line 2293 "cpp2regex.h2"
     [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
         std::string r {""}; 
         if (min_count == max_count) {
@@ -3601,7 +3688,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2198 "cpp2regex.h2"
+#line 2311 "cpp2regex.h2"
     auto range_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
@@ -3612,14 +3699,14 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")");
     }
 
-#line 2208 "cpp2regex.h2"
+#line 2321 "cpp2regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2216 "cpp2regex.h2"
+#line 2329 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
@@ -3632,26 +3719,26 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2228 "cpp2regex.h2"
+#line 2341 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2233 "cpp2regex.h2"
+#line 2346 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2238 "cpp2regex.h2"
+#line 2351 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2244 "cpp2regex.h2"
+#line 2357 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
@@ -3667,7 +3754,7 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2259 "cpp2regex.h2"
+#line 2372 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
@@ -3696,7 +3783,7 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2287 "cpp2regex.h2"
+#line 2400 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3721,7 +3808,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2311 "cpp2regex.h2"
+#line 2424 "cpp2regex.h2"
     template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
@@ -3747,7 +3834,7 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2342 "cpp2regex.h2"
+#line 2455 "cpp2regex.h2"
     [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
@@ -3770,7 +3857,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error("'" + cpp2::to_string(ctx.current()) + "' without previous element."); }
 
-#line 2365 "cpp2regex.h2"
+#line 2478 "cpp2regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3780,7 +3867,7 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2377 "cpp2regex.h2"
+#line 2490 "cpp2regex.h2"
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
     if (ctx.current() != '\\') {return nullptr; }
 
@@ -3797,7 +3884,7 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2393 "cpp2regex.h2"
+#line 2506 "cpp2regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
     word_class words {}; 
     auto is_match {false}; 
@@ -3822,32 +3909,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2436 "cpp2regex.h2"
+#line 2549 "cpp2regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
             , ctx{ ctx_ }
             , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2440 "cpp2regex.h2"
+#line 2553 "cpp2regex.h2"
         }
 
-#line 2442 "cpp2regex.h2"
+#line 2555 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2443 "cpp2regex.h2"
+#line 2556 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2444 "cpp2regex.h2"
+#line 2557 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2445 "cpp2regex.h2"
+#line 2558 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2447 "cpp2regex.h2"
+#line 2560 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2448 "cpp2regex.h2"
+#line 2561 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2449 "cpp2regex.h2"
+#line 2562 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2451 "cpp2regex.h2"
+#line 2564 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3856,13 +3943,13 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2460 "cpp2regex.h2"
+#line 2573 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2461 "cpp2regex.h2"
+#line 2574 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2462 "cpp2regex.h2"
+#line 2575 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2463 "cpp2regex.h2"
+#line 2576 "cpp2regex.h2"
     template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
 
@@ -3870,13 +3957,13 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2470 "cpp2regex.h2"
+#line 2583 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2471 "cpp2regex.h2"
+#line 2584 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2472 "cpp2regex.h2"
+#line 2585 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2473 "cpp2regex.h2"
+#line 2586 "cpp2regex.h2"
     template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
         context ctx {start, end}; 
         auto r {ctx.fail()}; 
@@ -3896,10 +3983,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2492 "cpp2regex.h2"
+#line 2605 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2497 "cpp2regex.h2"
+#line 2610 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3909,15 +3996,15 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2525 "cpp2regex.h2"
+#line 2638 "cpp2regex.h2"
     template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2528 "cpp2regex.h2"
+#line 2641 "cpp2regex.h2"
     }
 
-#line 2530 "cpp2regex.h2"
+#line 2643 "cpp2regex.h2"
     template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
 
         // Extract modifiers and adapt regex.
@@ -3953,7 +4040,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2565 "cpp2regex.h2"
+#line 2678 "cpp2regex.h2"
     template  auto regex_generator::extract_modifiers() & -> void{
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
@@ -3968,7 +4055,7 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2580 "cpp2regex.h2"
+#line 2693 "cpp2regex.h2"
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
     regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
diff --git a/include/cpp2regex.h2 b/include/cpp2regex.h2
index 187f626634..69e3f9df0a 100644
--- a/include/cpp2regex.h2
+++ b/include/cpp2regex.h2
@@ -10,11 +10,18 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.
 
-// #include 
-// #include 
+
+//===========================================================================
+//  Regex support
+//===========================================================================
+
+#ifndef CPP2_CPP2REGEX_H
+#define CPP2_CPP2REGEX_H
+
 
 template
 using matcher_wrapper_type = typename matcher_wrapper::template wrap;
+
 template
 using matcher_context_type = typename matcher::context;
 
@@ -24,9 +31,10 @@ cpp2: namespace = {
 
 regex: namespace = {
 
-bview:  type == std::basic_string_view;
+bview  :  type == std::basic_string_view;
 bstring:  type == std::basic_string;
 
+
 //-----------------------------------------------------------------------
 //
 //  Helper structures for the expression matching.
@@ -34,9 +42,10 @@ bstring:  type == std::basic_string;
 //-----------------------------------------------------------------------
 //
 
-// Possible modifiers for a regular expression.
+//  Possible modifiers for a regular expression.
 //
-expression_flags: @flag_enum type = {
+expression_flags: @flag_enum type = 
+{
     case_insensitive;             // mod: i
     multiple_lines;               // mod: m
     single_line;                  // mod: s
@@ -45,28 +54,30 @@ expression_flags: @flag_enum type = {
     perl_code_syntax_in_classes;  // mod: xx
 }
 
-// Structure for storing group information.
+//  Structure for storing group information.
 //
-match_group: @struct  type = {
+match_group: @struct  type = 
+{
     start: Iter = ();
     end: Iter = ();
 
     matched: bool = false;
 }
 
-// Return value for every matcher.
+//  Return value for every matcher.
 // 
-match_return: @struct  type = {
+match_return: @struct  type = 
+{
     matched: bool = false;
     pos: Iter = ();
 }
 
-// Modifiable state during matching.
+//  Modifiable state during matching.
 //
 match_context:  type =
 {
-    public begin: Iter;
-    public end: Iter;
+    public  begin : Iter;
+    public  end   : Iter;
 
     private groups: std::array, max_groups> = ();
 
@@ -77,7 +88,7 @@ match_context:  type =
 
     operator=: (out this, that) = {}
 
-    // Getter and setter for groups
+    //  Getter and setter for groups
     //
     get_group: (in this, group) groups[group];
 
@@ -115,29 +126,32 @@ match_context:  type =
 
     size: (in this) max_groups;
 
-    // Misc functions
+    //  Misc functions
     //
-
     fail: (in this)            match_return(false, end);
     pass: (in this, cur: Iter) match_return(true, cur);
-
 }
 
-// End function that returns a valid match.
+
+//  End function that returns a valid match.
 //
-true_end_func: @struct type = {
+true_end_func: @struct type = 
+{
     operator(): (in this, cur, inout ctx) ctx..pass(cur);
 }
 
-// Empty group reset function.
+
+//  Empty group reset function.
 //
-no_reset: @struct type = {
+no_reset: @struct type = 
+{
     operator(): (this, inout _:) = {}
 }
 
-// Evaluate func on destruction of the handle.
-on_return:  type = {
 
+//  Evaluate func on destruction of the handle.
+on_return:  type = 
+{
     func: Func;
 
     operator=: (out this, f: Func) = {
@@ -149,9 +163,11 @@ on_return:  type = {
     }
 }
 
-// Helper for auto deduction of the Func type.
+
+//  Helper for auto deduction of the Func type.
 make_on_return:  (func: Func) on_return(func);
 
+
 //-----------------------------------------------------------------------
 //
 //  Character classes for regular expressions.
@@ -159,76 +175,87 @@ make_on_return:  (func: Func) on_return(func);
 //-----------------------------------------------------------------------
 //
 
-// Class syntax:  Example: a
+//  Class syntax:  Example: a
 //
 single_class_entry:  type =
 {
-    includes: (c: CharT) c == C;
-    to_string: ()        bstring(1, C);
+    includes : (c: CharT) c == C;
+    to_string: ()         bstring(1, C);
 }
 
-// Class syntax: - Example: a-c
+
+//  Class syntax: - Example: a-c
 //
 range_class_entry:  type =
 {
-    includes: (c: CharT) Start <= c <= End;
-    to_string:        () "(Start)$-(End)$";
+    includes : (c: CharT) Start <= c <= End;
+    to_string: ()         "(Start)$-(End)$";
 }
 
-// Helper for combining two character classes
+
+//  Helper for combining two character classes
 //
-combined_class_entry:  type = {
-    includes: (c: CharT) (false || ... || List::includes(c));
-    to_string: ()        (bstring() + ... + List::to_string());
+combined_class_entry:  type = 
+{
+    includes : (c: CharT) (false || ... || List::includes(c));
+    to_string: ()         (bstring() + ... + List::to_string());
 }
 
-// Class syntax:   Example: abcd
+
+//  Class syntax:   Example: abcd
 //
-list_class_entry:  type = {
-    includes: (c: CharT) (false || ... || (List == c));
-    to_string: ()        (bstring() + ... + List);
+list_class_entry:  type = 
+{
+    includes : (c: CharT) (false || ... || (List == c));
+    to_string: ()         (bstring() + ... + List);
 }
 
-// Class syntax: [: type = {
-    includes: (c: CharT) Inner::includes(c);
-    to_string: ()        "[:(Name..data())$:]";
+named_class_entry:  type = 
+{
+    includes : (c: CharT) Inner::includes(c);
+    to_string: ()         "[:(Name..data())$:]";
 }
 
-negated_class_entry:  type = {
-    this: Inner = ();
+
+negated_class_entry:  type = 
+{
+    this    : Inner      = ();
     includes: (c: CharT) !Inner::includes(c);
 }
 
-// Short class syntax: \  Example: \w
+
+//  Short class syntax: \  Example: \w
 //
-shorthand_class_entry:  type = {
-    includes: (c: CharT) Inner::includes(c);
-    to_string: ()        Name..str();
+shorthand_class_entry:  type = 
+{
+    includes : (c: CharT) Inner::includes(c);
+    to_string: ()         Name..str();
 }
 
 
-// Named basic character classes
+//  Named basic character classes
 //
 digits_class  :  type == named_class_entry>;
-lower_class   :  type == named_class_entry>;
-upper_class   :  type == named_class_entry>;
+lower_class   :  type == named_class_entry>;
+upper_class   :  type == named_class_entry>;
 
-// Named other classes
+//  Named other classes
 //
-alnum_class     :  type == named_class_entry, upper_class, digits_class>>;
-alpha_class     :  type == named_class_entry, upper_class>>;
-ascii_class     :  type == named_class_entry>;
-blank_class     :  type == named_class_entry>;
-cntrl_class     :  type == named_class_entry, single_class_entry>>;
-graph_class     :  type == named_class_entry>;
+alnum_class     :  type == named_class_entry, upper_class, digits_class>>;
+alpha_class     :  type == named_class_entry, upper_class>>;
+ascii_class     :  type == named_class_entry>;
+blank_class     :  type == named_class_entry>;
+cntrl_class     :  type == named_class_entry, single_class_entry>>;
+graph_class     :  type == named_class_entry>;
 hor_space_class :  type == named_class_entry>;
-print_class     :  type == named_class_entry>;
-punct_class     :  type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>;
-space_class     :  type == named_class_entry>;
+print_class     :  type == named_class_entry>;
+punct_class     :  type == named_class_entry','?','@','[','\\',']','^','_','`','{','|','}','~',']'>>;
+space_class     :  type == named_class_entry>;
 ver_space_class :  type == named_class_entry>;
-word_class      :  type == named_class_entry, single_class_entry>>;
+word_class      :  type == named_class_entry, single_class_entry>>;
 xdigit_class    :  type == named_class_entry, range_class_entry, digits_class>>;
 
 // Shorthand class entries
@@ -239,24 +266,24 @@ short_space_class      :  type == shorthand_class_entry type == shorthand_class_entry>;
 short_word_class       :  type == shorthand_class_entry>;
 
-
 short_not_digits_class     :  type == negated_class_entry>>;
 short_not_hor_space_class  :  type == negated_class_entry>>;
 short_not_space_class      :  type == negated_class_entry>>;
 short_not_vert_space_class :  type == negated_class_entry>>;
 short_not_word_class       :  type == negated_class_entry>>;
 
+
 //-----------------------------------------------------------------------
 //
-// Tokens for regular expressions.
+//  Tokens for regular expressions.
 //
 //-----------------------------------------------------------------------
 //
 
 // Basic class for a regex token.
 //
-regex_token: @polymorphic_base type = {
-
+regex_token: @polymorphic_base type = 
+{
     public string_rep: std::string;
 
     operator=:(out this, str: std::string) = {
@@ -278,9 +305,11 @@ regex_token: @polymorphic_base type = {
 token_ptr : type == std::shared_ptr;
 token_vec: type == std::vector;
 
-// Adds a check in code generation.
+
+//  Adds a check in code generation.
 //
-regex_token_check: @polymorphic_base type = {
+regex_token_check: @polymorphic_base type = 
+{
     this: regex_token;
 
     check: std::string;
@@ -295,8 +324,11 @@ regex_token_check: @polymorphic_base type = {
     }
 }
 
-// Adds code in code generation.
-regex_token_code: @polymorphic_base type = {
+
+//  Adds code in code generation.
+//
+regex_token_code: @polymorphic_base type = 
+{
     this: regex_token;
 
     code: std::string;
@@ -311,8 +343,11 @@ regex_token_code: @polymorphic_base type = {
     }
 }
 
-// Token that does not influence the matching. E.g. comment.
-regex_token_empty: @polymorphic_base type = {
+
+//  Token that does not influence the matching. E.g. comment.
+//
+regex_token_empty: @polymorphic_base type = 
+{
     this: regex_token;
 
     operator=:(out this, str: std::string) = {
@@ -324,9 +359,11 @@ regex_token_empty: @polymorphic_base type = {
     }
 }
 
-// Represents a list of regex tokens as one token.
+
+//  Represents a list of regex tokens as one token.
 //
-regex_token_list: @polymorphic_base type = {
+regex_token_list: @polymorphic_base type = 
+{
     this: regex_token;
 
     public tokens: token_vec;
@@ -357,23 +394,23 @@ regex_token_list: @polymorphic_base type = {
     }
 }
 
+
 //-----------------------------------------------------------------------
 //
-// Parse and generation context.
+//  Parse and generation context.
 //
 //-----------------------------------------------------------------------
 //
 
-// State of the current capturing group. See '()'
+//  State of the current capturing group. See '()'
 //
-parse_context_group_state: @struct type = {
-
-    
+parse_context_group_state: @struct type = 
+{    
     cur_match_list:        token_vec = ();         // Current list of matchers.
     alternate_match_lists: token_vec = ();         // List of alternate matcher lists. E.g. ab|cd|xy.
     modifiers :            expression_flags = ();  // Current modifiers for the group/regular expression.
 
-    // Start a new alternative.
+    //  Start a new alternative.
     next_alternative: (inout this) = {
         new_list: token_vec = ();
         std::swap(new_list, cur_match_list);
@@ -381,14 +418,14 @@ parse_context_group_state: @struct type = {
         _ = alternate_match_lists..insert(alternate_match_lists..end(), shared.new(new_list));
     }
 
-    // Swap this state with the other one.
+    //  Swap this state with the other one.
     swap: (inout this, inout t: parse_context_group_state) = {
         std::swap(cur_match_list, t.cur_match_list);
         std::swap(alternate_match_lists, t.alternate_match_lists);
         std::swap(modifiers, t.modifiers);
     }
 
-    // Convert this state into a regex token.
+    //  Convert this state into a regex token.
     get_as_token: (inout this) -> token_ptr = {
         if alternate_match_lists..empty() {
             post_process_list(cur_match_list);
@@ -400,16 +437,16 @@ parse_context_group_state: @struct type = {
         }
     }
 
-    // Add a token to the current matcher list.
+    //  Add a token to the current matcher list.
     add: (inout this, token: token_ptr) = {
         cur_match_list..push_back(token);
     }
 
-    // True if current matcher list is empty.
+    //  True if current matcher list is empty.
     empty: (this) -> bool = cur_match_list..empty();
 
     
-    // Apply optimizations to the matcher list.
+    //  Apply optimizations to the matcher list.
     post_process_list: (inout list: token_vec) = {
         // Merge all characters
         merge_pos := list..begin();
@@ -425,15 +462,17 @@ parse_context_group_state: @struct type = {
     }
 }
 
-// State for the branch reset. Takes care of the group numbering. See '(|)'.
+
+//  State for the branch reset. Takes care of the group numbering. See '(|)'.
 //
-parse_context_branch_reset_state: @struct type = {
-    is_active : bool = false;  // If we have a branch reset group.
-    cur_group : int  = 1;      // Next group identifier. 0 == global capture group.
-    max_group : int  = 1;      // Maximum group identifier generated.
-    from      : int  = 1;      // Starting identifier on new alternative branch.
+parse_context_branch_reset_state: @struct type = 
+{
+    is_active : bool = false; // If we have a branch reset group.
+    cur_group : int  = 1;     // Next group identifier. 0 == global capture group.
+    max_group : int  = 1;     // Maximum group identifier generated.
+    from      : int  = 1;     // Starting identifier on new alternative branch.
 
-    // Next group identifier.
+    //  Next group identifier.
     next: (inout this) -> int = {
         g := cur_group;
         cur_group += 1;
@@ -442,20 +481,20 @@ parse_context_branch_reset_state: @struct type = {
         return g;
     }
 
-    // Set next group identifier.
+    //  Set next group identifier.
     set_next: (inout this, g: int) = {
         cur_group = g;
         max_group = max(max_group, g);
     }
 
-    // Start a new alternative branch.
+    //  Start a new alternative branch.
     next_alternative: (inout this) = {
         if is_active {
             cur_group = from;
         }
     }
 
-    // Initialize for a branch reset group.
+    //  Initialize for a branch reset group.
     set_active_reset: (inout this, restart: int) = {
         is_active = true;
         cur_group = restart;
@@ -464,11 +503,13 @@ parse_context_branch_reset_state: @struct type = {
     }
 }
 
-// Context during parsing of the regular expressions.
+
+//  Context during parsing of the regular expressions.
 // 
-// Keeps track of the distributed group identifiers, current parsed group and branch resets.
+//  Keeps track of the distributed group identifiers, current parsed group and branch resets.
 //
-parse_context: type = {
+parse_context: type = 
+{
     regex: std::string_view;   // Regular expression string.
     pos:   size_t = 0;         // Current parsing position.
     root:  token_ptr;          // Token representing the regular expression.
@@ -488,11 +529,12 @@ parse_context: type = {
         error_out = e;
     }
 
-    // State management functions
+    //  State management functions
     //
 
-    // Returned group state needs to be stored and provided in `end_group`.
-    start_group: (inout this) -> parse_context_group_state = {
+    //  Returned group state needs to be stored and provided in `end_group`.
+    start_group: (inout this) -> parse_context_group_state = 
+    {
         old_state: parse_context_group_state = ();
         old_state..swap(cur_group_state);
         cur_group_state.modifiers = old_state.modifiers;
@@ -500,8 +542,9 @@ parse_context: type = {
         return old_state;
     }
 
-    // `old_state` argument needs to be from start group.
-    end_group: (inout this, old_state: parse_context_group_state) -> token_ptr = {
+    //  `old_state` argument needs to be from start group.
+    end_group: (inout this, old_state: parse_context_group_state) -> token_ptr =
+    {
         inner := cur_group_state..get_as_token();
         cur_group_state = old_state;
         return inner;
@@ -515,10 +558,11 @@ parse_context: type = {
         cur_group_state.modifiers = mod;
     }
 
-    // Branch reset management functions
+    //  Branch reset management functions
     //
 
-    branch_reset_new_state: (inout this) -> parse_context_branch_reset_state = {
+    branch_reset_new_state: (inout this) -> parse_context_branch_reset_state = 
+    {
         old_state: parse_context_branch_reset_state = ();
         std::swap(old_state, cur_branch_reset_state);
 
@@ -526,20 +570,21 @@ parse_context: type = {
         return old_state;
     }
 
-    branch_reset_restore_state: (inout this, old_state: parse_context_branch_reset_state) = {
+    branch_reset_restore_state: (inout this, old_state: parse_context_branch_reset_state) = 
+    {
         max_group := cur_branch_reset_state.max_group;
         cur_branch_reset_state = old_state;
         cur_branch_reset_state..set_next(max_group);
     }
 
-    next_alternative: (inout this) = {
+    next_alternative: (inout this) = 
+    {
         cur_group_state..next_alternative();
         cur_branch_reset_state..next_alternative();
     }
 
-    // Regex token management
+    //  Regex token management
     //
-
     add_token: (inout this, token: token_ptr) = {
         cur_group_state..add(token);
     }
@@ -548,7 +593,8 @@ parse_context: type = {
         return !cur_group_state..empty();
     }
 
-    pop_token: (inout this) -> token_ptr = {
+    pop_token: (inout this) -> token_ptr = 
+    {
         r : token_ptr = nullptr;
         if has_token() {
             r = cur_group_state.cur_match_list..back();
@@ -562,9 +608,8 @@ parse_context: type = {
         return root;
     }
 
-    // Group management
+    //  Group management
     //
-
     get_cur_group: (this) -> int = {
         return cur_branch_reset_state.cur_group;
     }
@@ -573,13 +618,15 @@ parse_context: type = {
         return cur_branch_reset_state..next();
     }
 
-    set_named_group: (inout this, name: std::string, id: int) = {
+    set_named_group: (inout this, name: std::string, id: int) = 
+    {
         if !named_groups..contains(name) { // Redefinition of group name is not an error. The left most one is retained.
             named_groups[name] = id;
         }
     }
 
-    get_named_group: (this, name: std::string) -> int = {
+    get_named_group: (this, name: std::string) -> int = 
+    {
         iter := named_groups..find(name);
         if iter == named_groups..end() {
              return -1;
@@ -589,13 +636,13 @@ parse_context: type = {
         }
     }
     
-    // Position management functions
+    //  Position management functions
     //
-
     current: (this) -> char = { return regex[pos]; }
 
-    // Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
-    private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = {
+    //  Get the next token in the regex, skipping spaces according to the parameters. See `x` and `xx` modifiers.
+    private get_next_position: (in this, in_class: bool, no_skip: bool) -> size_t = 
+    {
         perl_syntax := false;
         if !no_skip {
             if in_class {
@@ -626,15 +673,16 @@ parse_context: type = {
             }
         }
 
-        // Check for end of file.
+        //  Check for end of file.
         if cur > regex..size() {
             cur = regex..size();
         }
         return cur;
     }
 
-    // Return true if next token is available.
-    private next_impl: (inout this, in_class: bool, no_skip: bool) -> bool = {
+    //  Return true if next token is available.
+    private next_impl: (inout this, in_class: bool, no_skip: bool) -> bool = 
+    {
         pos = get_next_position(in_class, no_skip);
         if pos != regex..size() {
             return true;
@@ -644,9 +692,9 @@ parse_context: type = {
         }
     }
 
-    next:          (inout this) next_impl(false, false);
-    next_in_class: (inout this) next_impl(true, false);
-    next_no_skip:  (inout this) next_impl(false, true);
+    next         : (inout this) next_impl(false, false);
+    next_in_class: (inout this) next_impl( true, false);
+    next_no_skip : (inout this) next_impl(false,  true);
 
     next_n: (inout this, n: int) -> bool = {
         r := true;
@@ -659,7 +707,8 @@ parse_context: type = {
 
     has_next: (this) -> bool = { return pos < regex..size(); }
 
-    private grab_until_impl: (inout this, in e: std::string, out r: std::string, any: bool) -> bool = {
+    private grab_until_impl: (inout this, in e: std::string, out r: std::string, any: bool) -> bool = 
+    {
         end:= pos;
         if any {
             end = regex..find_first_of(e, pos);
@@ -683,7 +732,8 @@ parse_context: type = {
     grab_until: (inout this, in e: char, out r: std::string)               grab_until_impl(std::string(1, e), out r, false);
     grab_until_one_of: (inout this, in e: std::string, out r: std::string) grab_until_impl(e, out r, true);
 
-    grab_n: (inout this, in n: int, out r: std::string) -> bool = {
+    grab_n: (inout this, in n: int, out r: std::string) -> bool = 
+    {
         if pos + n <= regex..size() {
             r = regex..substr(pos, n);
             pos += n - 1;
@@ -695,7 +745,8 @@ parse_context: type = {
         }
     }
 
-    grab_number: (inout this) -> std::string = {
+    grab_number: (inout this) -> std::string = 
+    {
         start := pos;
         start_search := pos;
         if regex[start_search] == '-' {
@@ -725,13 +776,14 @@ parse_context: type = {
         }
     }
 
-    peek: (in this)          peek_impl(false);
-    peek_in_class: (in this) peek_impl(true);
+    peek         : (in this) peek_impl(false);
+    peek_in_class: (in this) peek_impl( true);
 
-    // Parsing functions
-    //
 
-    parser_group_modifiers: (inout this, change_str: std::string, inout parser_modifiers: expression_flags) -> bool = {
+    //  Parsing functions
+    //
+    parser_group_modifiers: (inout this, change_str: std::string, inout parser_modifiers: expression_flags) -> bool = 
+    {
         is_negative := false;
         is_reset    := false;
 
@@ -745,7 +797,8 @@ parse_context: type = {
         };
 
         iter := change_str..begin();
-        while iter != change_str..end() next (iter++) {
+        while iter != change_str..end() next (iter++) 
+        {
             cur := iter*;
             if cur == '^' {
                 is_reset = true;
@@ -786,7 +839,8 @@ parse_context: type = {
     parse_until:(inout this, term: char) -> bool = {
         cur_token: token_ptr = ();
 
-        while valid() next _ = next() {
+        while valid() next _ = next()
+        {
             if term == current() { break; }
 
             cur_token = nullptr;
@@ -820,7 +874,8 @@ parse_context: type = {
         return true;
     }
 
-    parse: (inout this, modifiers: std::string) -> bool = {
+    parse: (inout this, modifiers: std::string) -> bool = 
+    {
 
         flags : expression_flags = ();
         if !parser_group_modifiers(modifiers, flags) { return false; }
@@ -834,7 +889,7 @@ parse_context: type = {
         return r;
     }
 
-    // Misc functions
+    //  Misc functions
 
     get_pos:   (this)                             pos;
     get_range: (this, start: size_t, end: size_t) std::string(regex..substr(start, end - start + 1));
@@ -847,8 +902,9 @@ parse_context: type = {
     }
 }
 
-// Context for one function generation. Generation of functions can be interleaved, therefore we buffer the code for one
-// function here.
+
+//  Context for one function generation. Generation of functions can be interleaved,
+//  therefore we buffer the code for one function here.
 //
 generation_function_context: @struct type = {
     code: std::string = "";
@@ -866,9 +922,10 @@ generation_function_context: @struct type = {
     }
 }
 
-// Context for generating the state machine.
-generation_context: type = {
 
+//  Context for generating the state machine.
+generation_context: type = 
+{
     gen_stack: std::vector = (1); // Element 0 contains all the code.
 
     matcher_func: int         = 0;
@@ -876,34 +933,35 @@ generation_context: type = {
     temp_name:    int         = 0;
     entry_func:   std::string = "";
 
-    // Generation helpers
+    //  Generation helpers
     //
-
     match_parameters: (this) -> std::string = { return "r.pos, ctx"; }
 
-    // Code generation.
+    //  Code generation.
 
-    // Add code line.
+    //  Add code line.
     add: (inout this, s: std::string) = {
         cur := get_current();
         cur*.code += "(cur*.tabs)$(s)$\n";
     }
 
-    // Add check for token. The check needs to be a function call that returns a boolean.
+    //  Add check for token. The check needs to be a function call that returns a boolean.
     add_check: (inout this, check: std::string) = {
         cur := get_current();
         cur*.code += "(cur*.tabs)$if !cpp2::regex::(check)$ { r.matched = false; break; }\n";
     }
 
-    // Add a statefull check. The check needs to return a `match_return`.
-    add_statefull: (inout this, next_func: std::string, check: std::string) = {
+    //  Add a stateful check. The check needs to return a `match_return`.
+    add_statefull: (inout this, next_func: std::string, check: std::string) = 
+    {
         end_func_statefull(check);
 
         name := next_func..substr(0, next_func..size() - 2);
         start_func_named(name);
     }
 
-    protected start_func_named: (inout this, name: std::string) = {
+    protected start_func_named: (inout this, name: std::string) = 
+    {
         cur := new_context();
 
         cur*.code += "(cur*.tabs)$(name)$: @struct type = {\n";
@@ -913,13 +971,15 @@ generation_context: type = {
         cur*..add_tabs(3);
     }
 
-    protected start_func: (inout this) -> std::string = {
+    protected start_func: (inout this) -> std::string = 
+    {
         name := gen_func_name();
         start_func_named(name);
         return name + "()";
     }
 
-    protected end_func_statefull: (inout this, s: std::string) = {
+    protected end_func_statefull: (inout this, s: std::string) = 
+    {
         cur := get_current();
         cur*..remove_tabs(3);
         cur*.code += "\n";
@@ -937,8 +997,9 @@ generation_context: type = {
         finish_context();
     }
 
-    // Generate the function for a token.
-    generate_func: (inout this, token: token_ptr) -> std::string = {
+    //  Generate the function for a token.
+    generate_func: (inout this, token: token_ptr) -> std::string = 
+    {
         name := start_func();
         token*..generate_code(this);
         end_func_statefull("other((match_parameters())$)");
@@ -946,8 +1007,9 @@ generation_context: type = {
         return name;
     }
 
-    // Generate the reset for a list of group identifiers.
-    generate_reset: (inout this, groups: std::set) -> std::string = {
+    //  Generate the reset for a list of group identifiers.
+    generate_reset: (inout this, groups: std::set) -> std::string = 
+    {
         if groups..empty() {
             return "cpp2::regex::no_reset()";
         }
@@ -968,9 +1030,8 @@ generation_context: type = {
         return name + "()";
     }
 
-    // Name generation
+    //  Name generation
     //
-
     protected gen_func_name: (inout this) -> std::string = {
         cur_id : = matcher_func;
         matcher_func += 1;
@@ -993,9 +1054,8 @@ generation_context: type = {
         return "tmp_(cur_id)$";
     }
 
-    // Context management
+    //  Context management
     //
-
     new_context: (inout this) -> *generation_function_context = {
         gen_stack..push_back(generation_function_context());
         cur := get_current();
@@ -1012,9 +1072,8 @@ generation_context: type = {
         gen_stack..pop_back();
     }
 
-    // Misc functions
+    //  Misc functions
     //
-
     private get_current: (inout this) -> *generation_function_context = {
         return gen_stack..back()&;
     }
@@ -1027,17 +1086,18 @@ generation_context: type = {
         return entry_func;
     }
 
-    create_named_group_lookup: (this, named_groups: std::map) -> std::string = {
+    create_named_group_lookup: (this, named_groups: std::map) -> std::string = 
+    {
         res: std::string = "get_named_group_index: (name) -> int = {\n";
 
-        // Generate if selection.
+        //  Generate if selection.
         sep: std::string = "";
         for named_groups do (cur) {
             res += "(sep)$if name == \"(cur.first)$\" { return (cur.second)$; }";
             sep = "else ";
         }
 
-        // Generate else branch or return if list is empty.
+        //  Generate else branch or return if list is empty.
         if named_groups..empty() {
             res += "  _ = name;\n";
             res += "  return -1;\n";
@@ -1050,7 +1110,7 @@ generation_context: type = {
     }
 
 
-    // Run the generation for the token.
+    //  Run the generation for the token.
     run: (inout this, token: token_ptr) -> std::string = {
         entry_func = generate_func(token);
 
@@ -1058,11 +1118,13 @@ generation_context: type = {
     }
 }
 
+
 //  Regex syntax: |  Example: ab|ba
 //
 //  Non greedy implementation. First alternative that matches is chosen.
 //
-alternative_token: @polymorphic_base type = {
+alternative_token: @polymorphic_base type = 
+{
     this: regex_token_empty = ("");  // No code gen here. alternative_token_gen is created in the parse_context
 
     operator=:(out this) = {}
@@ -1076,7 +1138,8 @@ alternative_token: @polymorphic_base type = {
     }
 }
 
-alternative_token_gen: @polymorphic_base type = {
+alternative_token_gen: @polymorphic_base type = 
+{
     this: regex_token;
 
     alternatives: token_vec;
@@ -1086,7 +1149,8 @@ alternative_token_gen: @polymorphic_base type = {
         alternatives = a;
     }
 
-    generate_code: (override this, inout ctx: generation_context) = {
+    generate_code: (override this, inout ctx: generation_context) = 
+    {
         functions: std::string = "";
 
         for alternatives do (cur) {
@@ -1102,13 +1166,15 @@ alternative_token_gen: @polymorphic_base type = {
         ctx..add_statefull(next_name, "cpp2::regex::alternative_token_matcher::match((ctx..match_parameters())$, other, (next_name)$ (functions)$)");
     }
 
-    add_groups: (override this, inout groups: std::set) = {
+    add_groups: (override this, inout groups: std::set) = 
+    {
         for alternatives do (cur) {
             cur*..add_groups(groups);
         }
     }
 
-    gen_string: (a: token_vec) -> std::string = {
+    gen_string: (a: token_vec) -> std::string = 
+    {
         r: std::string = "";
         sep: std::string = "";
 
@@ -1121,12 +1187,15 @@ alternative_token_gen: @polymorphic_base type = {
     }
 }
 
-alternative_token_matcher:  type = {
 
+alternative_token_matcher:  type = 
+{
     match: (cur, inout ctx, end_func, tail, functions ...) -> _ = {
         return match_first(cur, ctx, end_func, tail, functions...);
     }
-    private match_first:  (cur, inout ctx, end_func, tail, cur_func, cur_reset, other ...: Other) -> _ = {
+
+    private match_first:  (cur, inout ctx, end_func, tail, cur_func, cur_reset, other ...: Other) -> _ = 
+    {
         inner_call := :(tail_cur, inout tail_ctx) -> _ == {
             return (tail)$(tail_cur, tail_ctx, (end_func)$);
         };
@@ -1145,9 +1214,11 @@ alternative_token_matcher:  type = {
     }
 }
 
+
 //  Regex syntax: .
 //
-any_token: @polymorphic_base type = {
+any_token: @polymorphic_base type = 
+{
     this: regex_token_check = (".");
 
     operator=:(out this, single_line: bool) = {
@@ -1161,23 +1232,27 @@ any_token: @polymorphic_base type = {
     }
 }
 
-any_token_matcher:  (inout cur, inout ctx) -> bool = {
-    if cur != ctx.end // Any char except the end
-        && (single_line || cur* != '\n') { // Do not match new lines in multi line mode.
+
+any_token_matcher:  (inout cur, inout ctx) -> bool = 
+{
+    if  cur != ctx.end                      // any char except the end
+        && (single_line || cur* != '\n')    // do not match new lines in multi line mode
+    {
         cur += 1;
         return true;
     }
-    else {
-        return false;
-    }
+    //  Else
+    return false;
 }
 
-// Regex syntax: a
+
+//  Regex syntax: a
 //
-char_token: @polymorphic_base type = {
+char_token: @polymorphic_base type = 
+{
     this: regex_token;
 
-    token: std::string;
+    token      : std::string;
     ignore_case: bool;
 
     operator=: (out this, t: char, ignore_case_: bool) = {
@@ -1190,7 +1265,8 @@ char_token: @polymorphic_base type = {
         return shared.new(ctx..current(), ctx..get_modifiers()..has(expression_flags::case_insensitive));
     }
 
-    generate_code: (override this, inout ctx: generation_context) = {
+    generate_code: (override this, inout ctx: generation_context) = 
+    {
         if ignore_case {
             upper: std::string = token;
             lower: std::string = token;
@@ -1212,7 +1288,8 @@ char_token: @polymorphic_base type = {
         }
     }
 
-    gen_case_insensitive: (this, lower: std::string, upper: std::string, inout ctx: generation_context) = {
+    gen_case_insensitive: (this, lower: std::string, upper: std::string, inout ctx: generation_context) = 
+    {
         name: std::string = "str_(ctx..gen_temp())$";
         lower_name: std::string = "lower_(name)$";
         upper_name: std::string = "upper_(name)$";
@@ -1232,7 +1309,8 @@ char_token: @polymorphic_base type = {
         ctx..add("else { break; }");
     }
 
-    gen_case_sensitive: (this, inout ctx: generation_context) = {
+    gen_case_sensitive: (this, inout ctx: generation_context) = 
+    {
         name: std::string = "str_(ctx..gen_temp())$";
         size := token..size();
         ctx..add("(name)$ : std::array = \"(add_escapes(token))$\";"); // TODO: Add constexpr when Issue https://github.com/hsutter/cppfront/issues/1104 is resolved.
@@ -1249,7 +1327,8 @@ char_token: @polymorphic_base type = {
         ctx..add("else { break; }");
     }
 
-    add_escapes: (this, copy str: std::string) -> std::string = {
+    add_escapes: (this, copy str: std::string) -> std::string = 
+    {
         str = string_util::replace_all(str, "\\", "\\\\");
         str = string_util::replace_all(str, "\a", "\\a");
         str = string_util::replace_all(str, "\f", "\\f");
@@ -1269,6 +1348,7 @@ char_token: @polymorphic_base type = {
     }
 }
 
+
 // TODO: Check if vectorization works at some point with this implementation.
 // char_token_matcher:  (inout cur, inout ctx) -> bool = {
 //     if !(std::distance(cur, ctx.end) < tokens..size()) {
@@ -1302,24 +1382,28 @@ char_token: @polymorphic_base type = {
 //     return matched;
 // }
 
-// Regex syntax: []  Example: [abcx-y[:digits:]]
+
+//  Regex syntax: []  Example: [abcx-y[:digits:]]
 //
-class_token: @polymorphic_base type = {
-    this: regex_token = ();
+class_token: @polymorphic_base type = 
+{
+    this            : regex_token = ();
 
-    negate: bool;
+    negate          : bool;
     case_insensitive: bool;
-    class_str: std::string;
+    class_str       : std::string;
 
-    operator=: (out this, negate_: bool, case_insensitive_: bool, class_str_: std::string, str: std::string) = {
+    operator=: (out this, negate_: bool, case_insensitive_: bool, class_str_: std::string, str: std::string) = 
+    {
         regex_token = str;
         negate = negate_;
         case_insensitive = case_insensitive_;
         class_str = class_str_;
     }
 
-    // TODO: Rework class generation: Generate check functions for classes.
-    parse: (inout ctx: parse_context) -> token_ptr = {
+    //  TODO: Rework class generation: Generate check functions for classes.
+    parse: (inout ctx: parse_context) -> token_ptr = 
+    {
         if ctx..current() != '[' { return nullptr; }
 
         start_pos := ctx..get_pos();
@@ -1329,17 +1413,21 @@ class_token: @polymorphic_base type = {
 
         classes: std::vector = ();
 
-        // First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
-        is_negate:= false;
-        first:= true;
-        range:= false;
-        while ctx..next_in_class() && (ctx..current() != ']' || first) {
-            if ctx..current() == '^' {
+        //  First step: parse until the end bracket and push single chars, ranges or groups on the class stack.
+        is_negate := false;
+        first     := true;
+        range     := false;
+        while ctx..next_in_class() && (ctx..current() != ']' || first) 
+        {
+            if ctx..current() == '^' 
+            {
                 is_negate = true;
                 continue; // Skip rest of the loop. Also the first update.
             }
-            if ctx..current() == '[' && ctx..peek_in_class() == ':' {
-                // We have a character class.
+
+            if ctx..current() == '[' && ctx..peek_in_class() == ':' 
+            {
+                //  We have a character class.
                 _ = ctx..next_n(2);  // Skip [:
 
                 name: std::string = "";
@@ -1352,9 +1440,14 @@ class_token: @polymorphic_base type = {
 
                 _ = ctx..next(); // Skip ':' pointing to the ending ']'.
             }
-            else if ctx..current() == '\\' {
-                if ctx..next_no_skip()  && (ctx..current() != ']') {
-                    if  ' ' == ctx..current() && ctx..get_modifiers()..has(expression_flags::perl_code_syntax) && ctx..get_modifiers()..has(expression_flags::perl_code_syntax_in_classes) {
+            else if ctx..current() == '\\' 
+            {
+                if ctx..next_no_skip()  && (ctx..current() != ']') 
+                {
+                    if  ' ' == ctx..current() 
+                        && ctx..get_modifiers()..has(expression_flags::perl_code_syntax) 
+                        && ctx..get_modifiers()..has(expression_flags::perl_code_syntax_in_classes) 
+                    {
                         classes..push_back(std::string(1, ctx..current()));
                     }
                     else {
@@ -1378,14 +1471,16 @@ class_token: @polymorphic_base type = {
                     return ctx..error("Escape without a following character.");
                 }
             }
-            else if ctx..current() == '-' {
+            else if ctx..current() == '-' 
+            {
                 if first { // Literal if first entry.
                     classes..push_back("(ctx..current())$");
                 } else {
                     range = true;
                 }
             }
-            else {
+            else 
+            {
                 if range { // Modify last element to be a range.
                     classes..back() += "-(ctx..current())$";
                     range = false;
@@ -1408,7 +1503,8 @@ class_token: @polymorphic_base type = {
         }
 
         // Second step: Wrap the item on the class stack with corresponding class implementation.
-        for classes do (inout cur) {
+        for classes do (inout cur) 
+        {
             if cur..starts_with("[:") {
                 name := cur..substr(2, cur..size() - 4);
                 cur = create_matcher("(name)$_class", "");
@@ -1421,17 +1517,23 @@ class_token: @polymorphic_base type = {
             }
         }
 
-        inner := string_util::join(classes);
+        inner      := string_util::join(classes);
         string_rep := ctx..get_range(start_pos, end_pos);
-        return shared.new(is_negate, ctx..get_modifiers()..has(expression_flags::case_insensitive), inner, string_rep);
+        return shared.new(
+            is_negate, 
+            ctx..get_modifiers()..has(expression_flags::case_insensitive), 
+            inner, 
+            string_rep
+            );
     }
 
-    generate_code: (override this, inout ctx: generation_context) = {
+    generate_code: (override this, inout ctx: generation_context) = 
+    {
         ctx..add_check("class_token_matcher::match((ctx..match_parameters())$)");
     }
 
-
-    private create_matcher: (name: std::string, template_arguments: std::string) -> std::string = {
+    private create_matcher: (name: std::string, template_arguments: std::string) -> std::string = 
+    {
         sep := ", ";
         if template_arguments..empty() { sep = ""; }
 
@@ -1439,11 +1541,19 @@ class_token: @polymorphic_base type = {
     }
 }
 
+
 class_token_matcher:  type =
 {
-    match: (inout cur, inout ctx) -> bool = {
-        if constexpr case_insensitive {
-            if cur != ctx.end && negate != ( match_any(string_util::safe_tolower(cur*)) || match_any(string_util::safe_toupper(cur*))) {
+    match: (inout cur, inout ctx) -> bool = 
+    {
+        if constexpr case_insensitive 
+        {
+            if  cur != ctx.end 
+                && negate != ( 
+                       match_any(string_util::safe_tolower(cur*)) 
+                    || match_any(string_util::safe_toupper(cur*))
+                    ) 
+            {
                 cur += 1;
                 return true;
             }
@@ -1451,7 +1561,8 @@ class_token_matcher:  typ
                 return false;
             }
         }
-        else {
+        else 
+        {
             if cur != ctx.end && negate != match_any(cur*) {
                 cur += 1;
                 return true;
@@ -1462,7 +1573,8 @@ class_token_matcher:  typ
         }
     }
 
-    private match_any:  (c: CharT) -> bool = {
+    private match_any:  (c: CharT) -> bool = 
+    {
         r: bool = First::includes(c);
 
         if !r {
@@ -1487,6 +1599,7 @@ class_token_matcher:  typ
     // }
 }
 
+
 // Regex syntax: \a or \n or \[
 //
 escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
@@ -2586,3 +2699,7 @@ generate_regex:  (regex: std::string_view, err: Err) -> std::string = {
 
 }
 }
+
+
+#endif
+
diff --git a/include/cpp2util.h b/include/cpp2util.h
index 82c7b79060..bed20cf762 100644
--- a/include/cpp2util.h
+++ b/include/cpp2util.h
@@ -44,8 +44,8 @@
 // 
 //===========================================================================
 
-#ifndef CPP2_UTIL_H
-#define CPP2_UTIL_H
+#ifndef CPP2_CPP2UTIL_H
+#define CPP2_CPP2UTIL_H
 
 //  If this implementation doesn't support source_location yet, disable it
 #include 
diff --git a/regression-tests/pure2-regex_13_posessive_modifier.cpp2 b/regression-tests/pure2-regex_13_possessive_modifier.cpp2
similarity index 98%
rename from regression-tests/pure2-regex_13_posessive_modifier.cpp2
rename to regression-tests/pure2-regex_13_possessive_modifier.cpp2
index 688fe8aa1b..774cd79dc3 100644
--- a/regression-tests/pure2-regex_13_posessive_modifier.cpp2
+++ b/regression-tests/pure2-regex_13_possessive_modifier.cpp2
@@ -150,7 +150,7 @@ test:  (regex: M, id: std::string, regex_str: std::string, str: std::string,
 }
 
 
-test_tests_13_posessive_modifier: @regex type = {
+test_tests_13_possessive_modifier: @regex type = {
   regex_01 := R"(a++a)";
   regex_02 := R"(a*+a)";
   regex_03 := R"(a{1,5}+a)";
@@ -200,7 +200,7 @@ test_tests_13_posessive_modifier: @regex type = {
   regex_47 := R"(foo(aA)?+b)";
   regex_48 := R"(foo(aA|bB)?+b)";
   run: (this) = {
-    std::cout << "Running tests_13_posessive_modifier:"<< std::endl;
+    std::cout << "Running tests_13_possessive_modifier:"<< std::endl;
     test(regex_01, "01", R"(a++a)", "aaaaa", "n", R"(-)", "-");
     test(regex_02, "02", R"(a*+a)", "aaaaa", "n", R"(-)", "-");
     test(regex_03, "03", R"(a{1,5}+a)", "aaaaa", "n", R"(-)", "-");
@@ -253,5 +253,5 @@ test_tests_13_posessive_modifier: @regex type = {
   }
 }
 main: () = {
-    test_tests_13_posessive_modifier().run();
+    test_tests_13_possessive_modifier().run();
 }
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.execution
similarity index 99%
rename from regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution
rename to regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.execution
index 916d1a084b..3eaf91fed1 100644
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.execution
+++ b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.execution
@@ -1,4 +1,4 @@
-Running tests_13_posessive_modifier:
+Running tests_13_possessive_modifier:
 01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
 02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
 03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.output
similarity index 100%
rename from regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.output
rename to regression-tests/test-results/clang-12-c++20/pure2-regex_13_possessive_modifier.cpp.output
diff --git a/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.execution
similarity index 99%
rename from regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution
rename to regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.execution
index 916d1a084b..3eaf91fed1 100644
--- a/regression-tests/test-results/clang-12-c++20/pure2-regex_13_posessive_modifier.cpp.execution
+++ b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.execution
@@ -1,4 +1,4 @@
-Running tests_13_posessive_modifier:
+Running tests_13_possessive_modifier:
 01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
 02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
 03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.output
rename to regression-tests/test-results/gcc-10-c++20/pure2-regex_13_possessive_modifier.cpp.output
diff --git a/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution
similarity index 99%
rename from regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution
rename to regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution
index 916d1a084b..3eaf91fed1 100644
--- a/regression-tests/test-results/gcc-10-c++20/pure2-regex_13_posessive_modifier.cpp.execution
+++ b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.execution
@@ -1,4 +1,4 @@
-Running tests_13_posessive_modifier:
+Running tests_13_possessive_modifier:
 01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
 02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
 03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.output
similarity index 100%
rename from regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.output
rename to regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_possessive_modifier.cpp.output
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
deleted file mode 100644
index c2f6f5644f..0000000000
--- a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_posessive_modifier.cpp.output
+++ /dev/null
@@ -1 +0,0 @@
-pure2-regex_13_posessive_modifier.cpp
diff --git a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.execution
similarity index 99%
rename from regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
rename to regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.execution
index 916d1a084b..3eaf91fed1 100644
--- a/regression-tests/test-results/gcc-14-c++2b/pure2-regex_13_posessive_modifier.cpp.execution
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.execution
@@ -1,4 +1,4 @@
-Running tests_13_posessive_modifier:
+Running tests_13_possessive_modifier:
 01_n: OK regex: a++a parsed_regex: a++a str: aaaaa result_expr: - expected_results -
 02_n: OK regex: a*+a parsed_regex: a*+a str: aaaaa result_expr: - expected_results -
 03_n: OK regex: a{1,5}+a parsed_regex: a{1,5}+a str: aaaaa result_expr: - expected_results -
diff --git a/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.output b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.output
new file mode 100644
index 0000000000..540ae00635
--- /dev/null
+++ b/regression-tests/test-results/msvc-2022-c++latest/pure2-regex_13_possessive_modifier.cpp.output
@@ -0,0 +1 @@
+pure2-regex_13_possessive_modifier.cpp
diff --git a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output
deleted file mode 100644
index 9eac6e2c0b..0000000000
--- a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp2.output
+++ /dev/null
@@ -1,2 +0,0 @@
-pure2-regex_13_posessive_modifier.cpp2... ok (all Cpp2, passes safety checks)
-
diff --git a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp
similarity index 78%
rename from regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
rename to regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp
index 1df4293c04..f64ec7b70f 100644
--- a/regression-tests/test-results/pure2-regex_13_posessive_modifier.cpp
+++ b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp
@@ -6,25 +6,25 @@
 
 #include "cpp2util.h"
 
-#line 1 "pure2-regex_13_posessive_modifier.cpp2"
+#line 1 "pure2-regex_13_possessive_modifier.cpp2"
 
-#line 153 "pure2-regex_13_posessive_modifier.cpp2"
-class test_tests_13_posessive_modifier;
+#line 153 "pure2-regex_13_possessive_modifier.cpp2"
+class test_tests_13_possessive_modifier;
   
 
 //=== Cpp2 type definitions and function declarations ===========================
 
-#line 1 "pure2-regex_13_posessive_modifier.cpp2"
+#line 1 "pure2-regex_13_possessive_modifier.cpp2"
 [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string;
 
-#line 112 "pure2-regex_13_posessive_modifier.cpp2"
+#line 112 "pure2-regex_13_possessive_modifier.cpp2"
 template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
            cpp2::impl::in resultExpected) -> void;
 
-#line 153 "pure2-regex_13_posessive_modifier.cpp2"
-class test_tests_13_posessive_modifier {
+#line 153 "pure2-regex_13_possessive_modifier.cpp2"
+class test_tests_13_possessive_modifier {
 
-#line 202 "pure2-regex_13_posessive_modifier.cpp2"
+#line 202 "pure2-regex_13_possessive_modifier.cpp2"
   public: auto run() const& -> void;
   public: class regex_01_matcher {
   public: template class wrap {
@@ -2275,20 +2275,20 @@ public: class func_2 {
   };
 
   public: cpp2::regex::regular_expression regex_48 {}; 
-  public: test_tests_13_posessive_modifier() = default;
-  public: test_tests_13_posessive_modifier(test_tests_13_posessive_modifier const&) = delete; /* No 'that' constructor, suppress copy */
-  public: auto operator=(test_tests_13_posessive_modifier const&) -> void = delete;
+  public: test_tests_13_possessive_modifier() = default;
+  public: test_tests_13_possessive_modifier(test_tests_13_possessive_modifier const&) = delete; /* No 'that' constructor, suppress copy */
+  public: auto operator=(test_tests_13_possessive_modifier const&) -> void = delete;
 
 
-#line 254 "pure2-regex_13_posessive_modifier.cpp2"
+#line 254 "pure2-regex_13_possessive_modifier.cpp2"
 };
 auto main() -> int;
 
 //=== Cpp2 function definitions =================================================
 
-#line 1 "pure2-regex_13_posessive_modifier.cpp2"
+#line 1 "pure2-regex_13_possessive_modifier.cpp2"
 [[nodiscard]] auto create_result(cpp2::impl::in resultExpr, auto const& r) -> std::string{
-#line 2 "pure2-regex_13_posessive_modifier.cpp2"
+#line 2 "pure2-regex_13_possessive_modifier.cpp2"
   std::string result {""}; 
 
   auto get_next {[_0 = (&resultExpr)](auto const& iter) mutable -> auto{
@@ -2399,7 +2399,7 @@ auto main() -> int;
   return result; 
 }
 
-#line 112 "pure2-regex_13_posessive_modifier.cpp2"
+#line 112 "pure2-regex_13_possessive_modifier.cpp2"
 template auto test(M const& regex, cpp2::impl::in id, cpp2::impl::in regex_str, cpp2::impl::in str, cpp2::impl::in kind, cpp2::impl::in resultExpr, 
            cpp2::impl::in resultExpected) -> void{
 
@@ -2440,9 +2440,9 @@ template auto test(M const& regex, cpp2::impl::in id, c
   std::cout << "" + cpp2::to_string(id) + "_" + cpp2::to_string(kind) + ": " + cpp2::to_string(cpp2::move(status)) + " " + cpp2::to_string(cpp2::move(warning)) + "regex: " + cpp2::to_string(regex_str) + " parsed_regex: " + cpp2::to_string(CPP2_UFCS(to_string)(regex)) + " str: " + cpp2::to_string(str) + " result_expr: " + cpp2::to_string(resultExpr) + " expected_results " + cpp2::to_string(resultExpected) + "" << std::endl;
 }
 
-#line 202 "pure2-regex_13_posessive_modifier.cpp2"
-  auto test_tests_13_posessive_modifier::run() const& -> void{
-    std::cout << "Running tests_13_posessive_modifier:" << std::endl;
+#line 202 "pure2-regex_13_possessive_modifier.cpp2"
+  auto test_tests_13_possessive_modifier::run() const& -> void{
+    std::cout << "Running tests_13_possessive_modifier:" << std::endl;
     test(regex_01, "01", R"(a++a)", "aaaaa", "n", R"(-)", "-");
     test(regex_02, "02", R"(a*+a)", "aaaaa", "n", R"(-)", "-");
     test(regex_03, "03", R"(a{1,5}+a)", "aaaaa", "n", R"(-)", "-");
@@ -2498,7 +2498,7 @@ template auto test(M const& regex, cpp2::impl::in id, c
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2530,7 +2530,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2548,7 +2548,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2579,7 +2579,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -2587,19 +2587,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_01_matcher::to_string() -> std::string{return R"(a++a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_01_matcher::to_string() -> std::string{return R"(a++a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2631,7 +2631,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2649,7 +2649,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2680,7 +2680,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -2688,19 +2688,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_02_matcher::to_string() -> std::string{return R"(a*+a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_02_matcher::to_string() -> std::string{return R"(a*+a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2732,7 +2732,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2750,7 +2750,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2781,7 +2781,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -2789,19 +2789,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_03_matcher::to_string() -> std::string{return R"(a{1,5}+a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_03_matcher::to_string() -> std::string{return R"(a{1,5}+a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2833,7 +2833,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2851,7 +2851,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2882,7 +2882,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -2890,19 +2890,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_04_matcher::to_string() -> std::string{return R"(a?+a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_04_matcher::to_string() -> std::string{return R"(a?+a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2934,7 +2934,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2952,7 +2952,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -2983,7 +2983,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -2991,19 +2991,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_05_matcher::to_string() -> std::string{return R"(a++b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_05_matcher::to_string() -> std::string{return R"(a++b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3035,7 +3035,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3053,7 +3053,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3084,7 +3084,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3092,19 +3092,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_06_matcher::to_string() -> std::string{return R"(a*+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_06_matcher::to_string() -> std::string{return R"(a*+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3136,7 +3136,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3154,7 +3154,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3185,7 +3185,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3193,19 +3193,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_07_matcher::to_string() -> std::string{return R"(a{1,5}+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_07_matcher::to_string() -> std::string{return R"(a{1,5}+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3237,7 +3237,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3255,7 +3255,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3286,7 +3286,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3294,19 +3294,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_08_matcher::to_string() -> std::string{return R"(a?+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_08_matcher::to_string() -> std::string{return R"(a?+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3338,7 +3338,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3370,7 +3370,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3401,7 +3401,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3409,19 +3409,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_09_matcher::to_string() -> std::string{return R"(fooa++a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_09_matcher::to_string() -> std::string{return R"(fooa++a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3453,7 +3453,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3485,7 +3485,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3516,7 +3516,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3524,19 +3524,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_10_matcher::to_string() -> std::string{return R"(fooa*+a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_10_matcher::to_string() -> std::string{return R"(fooa*+a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3568,7 +3568,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3600,7 +3600,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3631,7 +3631,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3639,19 +3639,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_11_matcher::to_string() -> std::string{return R"(fooa{1,5}+a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_11_matcher::to_string() -> std::string{return R"(fooa{1,5}+a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3683,7 +3683,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3715,7 +3715,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3746,7 +3746,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3754,19 +3754,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_12_matcher::to_string() -> std::string{return R"(fooa?+a)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_12_matcher::to_string() -> std::string{return R"(fooa?+a)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3798,7 +3798,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3830,7 +3830,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3861,7 +3861,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3869,19 +3869,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_13_matcher::to_string() -> std::string{return R"(fooa++b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_13_matcher::to_string() -> std::string{return R"(fooa++b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3913,7 +3913,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3945,7 +3945,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -3976,7 +3976,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -3984,19 +3984,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_14_matcher::to_string() -> std::string{return R"(fooa*+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_14_matcher::to_string() -> std::string{return R"(fooa*+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4028,7 +4028,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4060,7 +4060,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4091,7 +4091,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -4099,19 +4099,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_15_matcher::to_string() -> std::string{return R"(fooa{1,5}+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_15_matcher::to_string() -> std::string{return R"(fooa{1,5}+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4143,7 +4143,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4175,7 +4175,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4206,7 +4206,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -4214,19 +4214,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_16_matcher::to_string() -> std::string{return R"(fooa?+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_16_matcher::to_string() -> std::string{return R"(fooa?+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4271,12 +4271,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4294,7 +4294,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4338,7 +4338,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -4346,19 +4346,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_17_matcher::to_string() -> std::string{return R"((aA)++(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_17_matcher::to_string() -> std::string{return R"((aA)++(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4390,7 +4390,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4422,7 +4422,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4441,7 +4441,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4471,12 +4471,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4494,7 +4494,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4526,7 +4526,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4558,7 +4558,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4577,7 +4577,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4606,7 +4606,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -4614,19 +4614,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_18_matcher::to_string() -> std::string{return R"((aA|bB)++(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_18_matcher::to_string() -> std::string{return R"((aA|bB)++(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4671,12 +4671,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4694,7 +4694,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4738,7 +4738,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -4746,19 +4746,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_19_matcher::to_string() -> std::string{return R"((aA)*+(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_19_matcher::to_string() -> std::string{return R"((aA)*+(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4790,7 +4790,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4822,7 +4822,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4841,7 +4841,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4871,12 +4871,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4894,7 +4894,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4926,7 +4926,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4958,7 +4958,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -4977,7 +4977,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5006,7 +5006,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -5014,19 +5014,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_20_matcher::to_string() -> std::string{return R"((aA|bB)*+(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_20_matcher::to_string() -> std::string{return R"((aA|bB)*+(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5071,12 +5071,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5094,7 +5094,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5138,7 +5138,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -5146,19 +5146,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_21_matcher::to_string() -> std::string{return R"((aA){1,5}+(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_21_matcher::to_string() -> std::string{return R"((aA){1,5}+(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5190,7 +5190,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5222,7 +5222,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5241,7 +5241,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5271,12 +5271,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5294,7 +5294,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5326,7 +5326,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5358,7 +5358,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5377,7 +5377,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5406,7 +5406,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -5414,19 +5414,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_22_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_22_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5471,12 +5471,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5494,7 +5494,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5538,7 +5538,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -5546,19 +5546,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_23_matcher::to_string() -> std::string{return R"((aA)?+(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_23_matcher::to_string() -> std::string{return R"((aA)?+(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5590,7 +5590,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5622,7 +5622,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5641,7 +5641,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5671,12 +5671,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5694,7 +5694,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5726,7 +5726,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5758,7 +5758,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5777,7 +5777,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5806,7 +5806,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -5814,19 +5814,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_24_matcher::to_string() -> std::string{return R"((aA|bB)?+(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_24_matcher::to_string() -> std::string{return R"((aA|bB)?+(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5871,12 +5871,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5894,7 +5894,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5925,7 +5925,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -5933,19 +5933,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_25_matcher::to_string() -> std::string{return R"((aA)++b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_25_matcher::to_string() -> std::string{return R"((aA)++b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -5977,7 +5977,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6009,7 +6009,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6028,7 +6028,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6058,12 +6058,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6081,7 +6081,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6112,7 +6112,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -6120,19 +6120,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_26_matcher::to_string() -> std::string{return R"((aA|bB)++b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_26_matcher::to_string() -> std::string{return R"((aA|bB)++b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6177,12 +6177,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6200,7 +6200,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6231,7 +6231,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -6239,19 +6239,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_27_matcher::to_string() -> std::string{return R"((aA)*+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_27_matcher::to_string() -> std::string{return R"((aA)*+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6283,7 +6283,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6315,7 +6315,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6334,7 +6334,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6364,12 +6364,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6387,7 +6387,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6418,7 +6418,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -6426,19 +6426,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_28_matcher::to_string() -> std::string{return R"((aA|bB)*+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_28_matcher::to_string() -> std::string{return R"((aA|bB)*+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6483,12 +6483,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6506,7 +6506,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6537,7 +6537,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -6545,19 +6545,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_29_matcher::to_string() -> std::string{return R"((aA){1,5}+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_29_matcher::to_string() -> std::string{return R"((aA){1,5}+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6589,7 +6589,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6621,7 +6621,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6640,7 +6640,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6670,12 +6670,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6693,7 +6693,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6724,7 +6724,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -6732,19 +6732,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_30_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_30_matcher::to_string() -> std::string{return R"((aA|bB){1,5}+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6789,12 +6789,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6812,7 +6812,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6843,7 +6843,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -6851,19 +6851,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_31_matcher::to_string() -> std::string{return R"((aA)?+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_31_matcher::to_string() -> std::string{return R"((aA)?+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6895,7 +6895,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6927,7 +6927,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6946,7 +6946,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6976,12 +6976,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -6999,7 +6999,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7030,7 +7030,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -7038,19 +7038,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_32_matcher::to_string() -> std::string{return R"((aA|bB)?+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_32_matcher::to_string() -> std::string{return R"((aA|bB)?+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7095,12 +7095,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7132,7 +7132,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7176,7 +7176,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -7184,19 +7184,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_33_matcher::to_string() -> std::string{return R"(foo(aA)++(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_33_matcher::to_string() -> std::string{return R"(foo(aA)++(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7228,7 +7228,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7260,7 +7260,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7279,7 +7279,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7309,12 +7309,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7346,7 +7346,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7378,7 +7378,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7410,7 +7410,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7429,7 +7429,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7458,7 +7458,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -7466,19 +7466,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_34_matcher::to_string() -> std::string{return R"(foo(aA|bB)++(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_34_matcher::to_string() -> std::string{return R"(foo(aA|bB)++(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7523,12 +7523,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7560,7 +7560,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7604,7 +7604,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -7612,19 +7612,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_35_matcher::to_string() -> std::string{return R"(foo(aA)*+(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_35_matcher::to_string() -> std::string{return R"(foo(aA)*+(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7656,7 +7656,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7688,7 +7688,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7707,7 +7707,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7737,12 +7737,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7774,7 +7774,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7806,7 +7806,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7838,7 +7838,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7857,7 +7857,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7886,7 +7886,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -7894,19 +7894,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_36_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_36_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7951,12 +7951,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -7988,7 +7988,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8032,7 +8032,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -8040,19 +8040,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_37_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_37_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8084,7 +8084,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8116,7 +8116,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8135,7 +8135,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8165,12 +8165,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8202,7 +8202,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8234,7 +8234,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8266,7 +8266,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8285,7 +8285,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8314,7 +8314,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -8322,19 +8322,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_38_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_38_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8379,12 +8379,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8416,7 +8416,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8460,7 +8460,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -8468,19 +8468,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_39_matcher::to_string() -> std::string{return R"(foo(aA)?+(aA))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_39_matcher::to_string() -> std::string{return R"(foo(aA)?+(aA))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8512,7 +8512,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8544,7 +8544,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8563,7 +8563,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8593,12 +8593,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8630,7 +8630,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_6::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8662,7 +8662,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_7::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8694,7 +8694,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8713,7 +8713,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::func_8::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8742,7 +8742,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -8750,19 +8750,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_40_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+(aA|bB))"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_40_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+(aA|bB))"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8807,12 +8807,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8844,7 +8844,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8875,7 +8875,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -8883,19 +8883,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_41_matcher::to_string() -> std::string{return R"(foo(aA)++b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_41_matcher::to_string() -> std::string{return R"(foo(aA)++b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8927,7 +8927,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8959,7 +8959,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -8978,7 +8978,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9008,12 +9008,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9045,7 +9045,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9076,7 +9076,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -9084,19 +9084,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_42_matcher::to_string() -> std::string{return R"(foo(aA|bB)++b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_42_matcher::to_string() -> std::string{return R"(foo(aA|bB)++b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9141,12 +9141,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9178,7 +9178,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9209,7 +9209,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -9217,19 +9217,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_43_matcher::to_string() -> std::string{return R"(foo(aA)*+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_43_matcher::to_string() -> std::string{return R"(foo(aA)*+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9261,7 +9261,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9293,7 +9293,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9312,7 +9312,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9342,12 +9342,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9379,7 +9379,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9410,7 +9410,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -9418,19 +9418,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_44_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_44_matcher::to_string() -> std::string{return R"(foo(aA|bB)*+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9475,12 +9475,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9512,7 +9512,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9543,7 +9543,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -9551,19 +9551,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_45_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_45_matcher::to_string() -> std::string{return R"(foo(aA){1,5}+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9595,7 +9595,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9627,7 +9627,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9646,7 +9646,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9676,12 +9676,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9713,7 +9713,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9744,7 +9744,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -9752,19 +9752,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_46_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_46_matcher::to_string() -> std::string{return R"(foo(aA|bB){1,5}+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9809,12 +9809,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9846,7 +9846,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9877,7 +9877,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -9885,19 +9885,19 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_47_matcher::to_string() -> std::string{return R"(foo(aA)?+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_47_matcher::to_string() -> std::string{return R"(foo(aA)?+b)"; }
 
 
 
 
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_2::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9929,7 +9929,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_3::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9961,7 +9961,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_1::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -9980,7 +9980,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_4::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -10010,12 +10010,12 @@ int i{0};
   }
 
 
-  template  auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
+  template  auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::reset_0::operator()(auto& ctx) const& -> void{
   ctx.set_group_invalid(1);
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_0::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -10047,7 +10047,7 @@ int i{0};
   }
 
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::func_5::operator()(cpp2::impl::in cur, context& ctx, auto const& other) const& -> cpp2::regex::match_return{
 
   auto r {ctx.pass(cur)}; 
   do {
@@ -10078,7 +10078,7 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::entry(cpp2::impl::in cur, context& ctx) -> cpp2::regex::match_return{
   ctx.set_group_start(0, cur);
 
   auto r {func_0()(cur, ctx, cpp2::regex::true_end_func())}; 
@@ -10086,16 +10086,16 @@ int i{0};
   return r; 
   }
 
-  template  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{
+  template  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::wrap::get_named_group_index(auto const& name) -> int{
   static_cast(name);
   return -1; 
   }
 
-  [[nodiscard]] auto test_tests_13_posessive_modifier::regex_48_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+b)"; }
+  [[nodiscard]] auto test_tests_13_possessive_modifier::regex_48_matcher::to_string() -> std::string{return R"(foo(aA|bB)?+b)"; }
 
 
-#line 255 "pure2-regex_13_posessive_modifier.cpp2"
+#line 255 "pure2-regex_13_possessive_modifier.cpp2"
 auto main() -> int{
-    CPP2_UFCS(run)(test_tests_13_posessive_modifier());
+    CPP2_UFCS(run)(test_tests_13_possessive_modifier());
 }
 
diff --git a/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp2.output b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp2.output
new file mode 100644
index 0000000000..5d9e987288
--- /dev/null
+++ b/regression-tests/test-results/pure2-regex_13_possessive_modifier.cpp2.output
@@ -0,0 +1,2 @@
+pure2-regex_13_possessive_modifier.cpp2... ok (all Cpp2, passes safety checks)
+
diff --git a/source/reflect.h b/source/reflect.h
index c1fa92b1d4..7b89be4d5c 100644
--- a/source/reflect.h
+++ b/source/reflect.h
@@ -767,7 +767,7 @@ auto cpp2_union(meta::type_declaration& t) -> void;
 //
 auto print(cpp2::impl::in t) -> void;
 
-#line 1445 "reflect.h2"
+#line 1446 "reflect.h2"
 //-----------------------------------------------------------------------
 //
 //  regex - creates regular expressions from members
@@ -2093,21 +2093,20 @@ auto print(cpp2::impl::in t) -> void
     std::cout << CPP2_UFCS(print)(t) << "\n";
 }
 
-#line 1459 "reflect.h2"
+#line 1460 "reflect.h2"
 auto regex_gen(meta::type_declaration& t) -> void
 {
     auto has_default {false}; 
     auto prefix {"regex"}; 
-    std::string postfix {"_mod"};   // TODO: Remove mod syntax when 'm.initializer()' can be '("pat", "mod")'.
-
+    std::string postfix {"_mod"};           // TODO: remove mod syntax when 'm.initializer()' can be '("pat", "mod")'
     std::map expressions {}; 
 
     for ( auto& m : CPP2_UFCS(get_member_objects)(t) ) 
     {
         std::string name {CPP2_UFCS(name)(m)}; 
 
-        if (CPP2_UFCS(starts_with)(name, prefix)) {
-
+        if (CPP2_UFCS(starts_with)(name, prefix)) 
+        {
             if (!(CPP2_UFCS(has_initializer)(m))) {
                 CPP2_UFCS(error)(t, "Regular expression must have an initializer.");
             }
diff --git a/source/reflect.h2 b/source/reflect.h2
index cff4721504..9f82035a02 100644
--- a/source/reflect.h2
+++ b/source/reflect.h2
@@ -1442,6 +1442,7 @@ print: (t: meta::type_declaration) =
     std::cout << t.print() << "\n";
 }
 
+
 //-----------------------------------------------------------------------
 //
 //  regex - creates regular expressions from members
@@ -1458,18 +1459,17 @@ print: (t: meta::type_declaration) =
 //
 regex_gen: (inout t: meta::type_declaration) =
 {
-    has_default: = false;
-    prefix:= "regex";
-    postfix: std::string = "_mod";  // TODO: Remove mod syntax when 'm.initializer()' can be '("pat", "mod")'.
-
-    expressions: std::map = ();
+    has_default := false;
+    prefix      := "regex";
+    postfix     : std::string = "_mod";     // TODO: remove mod syntax when 'm.initializer()' can be '("pat", "mod")'
+    expressions : std::map = ();
 
     for t.get_member_objects() do (inout m)
     {
         name: std::string = m.name();
 
-        if name.starts_with(prefix) {
-
+        if name.starts_with(prefix)
+        {
             if !m.has_initializer() {
                 t.error("Regular expression must have an initializer.");
             }

From de8348f1f6ef08f51f9114a2b480394970975ddd Mon Sep 17 00:00:00 2001
From: Herb Sutter 
Date: Sat, 20 Jul 2024 11:41:20 -1000
Subject: [PATCH 161/161] Finish tweaking pass through cpp2regex.h2

From line 1600 onward
---
 include/cpp2regex.h  | 630 ++++++++++++++++++++++++-------------------
 include/cpp2regex.h2 | 392 ++++++++++++++++-----------
 2 files changed, 589 insertions(+), 433 deletions(-)

diff --git a/include/cpp2regex.h b/include/cpp2regex.h
index ddd335c8ec..12867bed29 100644
--- a/include/cpp2regex.h
+++ b/include/cpp2regex.h
@@ -109,40 +109,35 @@ class class_token;
 #line 1545 "cpp2regex.h2"
 template class class_token_matcher;
 
-#line 1655 "cpp2regex.h2"
+#line 1661 "cpp2regex.h2"
 class group_ref_token;
-    
 
-#line 1799 "cpp2regex.h2"
+#line 1823 "cpp2regex.h2"
 class group_token;
-    
 
-#line 2082 "cpp2regex.h2"
+#line 2129 "cpp2regex.h2"
 class lookahead_token;
-    
 
-#line 2182 "cpp2regex.h2"
+#line 2235 "cpp2regex.h2"
 class range_flags;
     
 
-#line 2190 "cpp2regex.h2"
+#line 2244 "cpp2regex.h2"
 class range_token;
-    
 
-#line 2327 "cpp2regex.h2"
+#line 2390 "cpp2regex.h2"
 template class range_token_matcher;
 
-#line 2452 "cpp2regex.h2"
+#line 2527 "cpp2regex.h2"
 class special_range_token;
-    
 
-#line 2539 "cpp2regex.h2"
+#line 2618 "cpp2regex.h2"
 template class regular_expression;
 
-#line 2628 "cpp2regex.h2"
+#line 2710 "cpp2regex.h2"
 template class regex_generator;
 
-#line 2700 "cpp2regex.h2"
+#line 2784 "cpp2regex.h2"
 }
 }
 
@@ -1109,34 +1104,35 @@ template c
 };
 
 #line 1603 "cpp2regex.h2"
-// Regex syntax: \a or \n or \[
+//  Regex syntax: \a or \n or \[
 //
 [[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1640 "cpp2regex.h2"
-// Regex syntax: \K Example: ab\Kcd
+#line 1644 "cpp2regex.h2"
+//  Regex syntax: \K Example: ab\Kcd
 //
 [[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 1649 "cpp2regex.h2"
-// Regex syntax: \  Example: \1
-//               \g{name_or_number}
-//               \k{name_or_number}
-//               \k
-//               \k'name_or_number'
+#line 1655 "cpp2regex.h2"
+//  Regex syntax: \  Example: \1
+//                \g{name_or_number}
+//                \k{name_or_number}
+//                \k
+//                \k'name_or_number'
 //
-class group_ref_token: public regex_token {
+class group_ref_token
+: public regex_token {
 
-#line 1658 "cpp2regex.h2"
+#line 1665 "cpp2regex.h2"
     private: int id; 
     private: bool case_insensitive; 
 
     public: explicit group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str);
 
-#line 1667 "cpp2regex.h2"
+#line 1675 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1759 "cpp2regex.h2"
+#line 1776 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
     public: virtual ~group_ref_token() noexcept;
 
@@ -1144,40 +1140,42 @@ class group_ref_token: public regex_token {
     public: auto operator=(group_ref_token const&) -> void = delete;
 
 
-#line 1762 "cpp2regex.h2"
+#line 1779 "cpp2regex.h2"
 };
 
+#line 1782 "cpp2regex.h2"
 template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 1789 "cpp2regex.h2"
-// Regex syntax: ()      Example: (abc)
-//               (?:)  (?i:abc)
-//               (?<>:)     (?:abc)
-//               (?#)            (#Step 1 finished)
-//               (?|)             (?|(abc)|(cde))
-//               (?=)             (?=abc)
-//               (?!)             (?!abc)
-//               (*:)      Example: (abc)
+//                (?:)  (?i:abc)
+//                (?<>:)     (?:abc)
+//                (?#)            (#Step 1 finished)
+//                (?|)             (?|(abc)|(cde))
+//                (?=)             (?=abc)
+//                (?!)             (?!abc)
+//                (*: syntax, cpp2::impl::in positive) -> token_ptr;
 
-#line 1818 "cpp2regex.h2"
+#line 1844 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 1945 "cpp2regex.h2"
+#line 1981 "cpp2regex.h2"
     public: [[nodiscard]] static auto gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string;
 
-#line 1962 "cpp2regex.h2"
+#line 1999 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 1981 "cpp2regex.h2"
+#line 2019 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~group_token() noexcept;
 
@@ -1186,46 +1184,48 @@ class group_token: public regex_token {
     public: auto operator=(group_token const&) -> void = delete;
 
 
-#line 1987 "cpp2regex.h2"
+#line 2026 "cpp2regex.h2"
 };
 
-// Regex syntax: \x or \x{}  Example: \x{62}
+#line 2029 "cpp2regex.h2"
+//  Regex syntax: \x or \x{}  Example: \x{62}
 //
 [[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2029 "cpp2regex.h2"
-// Regex syntax: $  Example: aa$
+#line 2070 "cpp2regex.h2"
+//  Regex syntax: $  Example: aa$
 //
 [[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2047 "cpp2regex.h2"
+#line 2089 "cpp2regex.h2"
 template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 2059 "cpp2regex.h2"
-// Regex syntax: ^  Example: ^aa
+#line 2103 "cpp2regex.h2"
+//  Regex syntax: ^  Example: ^aa
 //
 [[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2073 "cpp2regex.h2"
+#line 2118 "cpp2regex.h2"
 template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool;
 
-#line 2078 "cpp2regex.h2"
-// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
+#line 2125 "cpp2regex.h2"
+//  Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
-// Parsed in group_token.
+//  Parsed in group_token.
 //
-class lookahead_token: public regex_token {
+class lookahead_token
+: public regex_token {
 
-#line 2085 "cpp2regex.h2"
+#line 2133 "cpp2regex.h2"
     protected: bool positive; 
-    public: token_ptr inner {nullptr}; 
+    public:   token_ptr inner {nullptr}; 
 
     public: explicit lookahead_token(cpp2::impl::in positive_);
 
-#line 2092 "cpp2regex.h2"
+#line 2140 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2098 "cpp2regex.h2"
+#line 2146 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~lookahead_token() noexcept;
 
@@ -1233,40 +1233,40 @@ class lookahead_token: public regex_token {
     public: auto operator=(lookahead_token const&) -> void = delete;
 
 
-#line 2101 "cpp2regex.h2"
+#line 2149 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool;
 
-#line 2112 "cpp2regex.h2"
+#line 2162 "cpp2regex.h2"
 // Named character classes
 //
-
 [[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2139 "cpp2regex.h2"
-template using named_class_no_new_line = class_token_matcher>;
-template                  using named_class_digits = class_token_matcher>;
-template                  using named_class_hor_space = class_token_matcher>;
-template                  using named_class_space = class_token_matcher>;
-template                  using named_class_ver_space = class_token_matcher>;
-template                  using named_class_word = class_token_matcher>;
+#line 2190 "cpp2regex.h2"
+template                     using named_class_no_new_line = class_token_matcher>;
+template                     using named_class_digits = class_token_matcher>;
+template                     using named_class_hor_space = class_token_matcher>;
+template                     using named_class_space = class_token_matcher>;
+template                     using named_class_ver_space = class_token_matcher>;
+template                     using named_class_word = class_token_matcher>;
 
 template                     using named_class_not_digits = class_token_matcher>;
-template using named_class_not_hor_space = class_token_matcher>;
+template                     using named_class_not_hor_space = class_token_matcher>;
 template                     using named_class_not_space = class_token_matcher>;
-template using named_class_not_ver_space = class_token_matcher>;
+template                     using named_class_not_ver_space = class_token_matcher>;
 template                     using named_class_not_word = class_token_matcher>;
 
-#line 2153 "cpp2regex.h2"
-// Regex syntax: \o{}  Example: \o{142}
+#line 2204 "cpp2regex.h2"
+//  Regex syntax: \o{}  Example: \o{142}
 //
 [[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2179 "cpp2regex.h2"
+#line 2231 "cpp2regex.h2"
 // TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147
 
-// Options for range matching.
+#line 2234 "cpp2regex.h2"
+//  Options for range matching.
 class range_flags {
     public: static const int not_greedy;// Try to take as few as possible.
     public: static const int greedy;// Try to take as many as possible.
@@ -1276,35 +1276,37 @@ class range_flags {
     public: range_flags(range_flags const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_flags const&) -> void = delete;
 };
-#line 2187 "cpp2regex.h2"
+#line 2240 "cpp2regex.h2"
 
-// Regex syntax: {min, max}  Example: a{2,4}
+#line 2242 "cpp2regex.h2"
+//  Regex syntax: {min, max}  Example: a{2,4}
 //
-class range_token: public regex_token {
+class range_token
+: public regex_token {
 
-#line 2193 "cpp2regex.h2"
-    protected: int min_count {-1}; 
-    protected: int max_count {-1}; 
-    protected: int kind {range_flags::greedy}; 
-    protected: token_ptr inner_token {nullptr}; 
+#line 2248 "cpp2regex.h2"
+              protected: int min_count {-1}; 
+              protected: int max_count {-1}; 
+              protected: int kind {range_flags::greedy}; 
+              protected: token_ptr inner_token {nullptr}; 
 
     public: explicit range_token();
 
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
 
-#line 2270 "cpp2regex.h2"
+#line 2328 "cpp2regex.h2"
     public: auto parse_modifier(parse_context& ctx) & -> void;
 
-#line 2281 "cpp2regex.h2"
+#line 2340 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_mod_string() const& -> std::string;
 
-#line 2293 "cpp2regex.h2"
+#line 2353 "cpp2regex.h2"
     public: [[nodiscard]] auto gen_range_string() const& -> std::string;
 
-#line 2311 "cpp2regex.h2"
+#line 2372 "cpp2regex.h2"
     public: auto generate_code(generation_context& ctx) const -> void override;
 
-#line 2321 "cpp2regex.h2"
+#line 2383 "cpp2regex.h2"
     public: auto add_groups(std::set& groups) const -> void override;
     public: virtual ~range_token() noexcept;
 
@@ -1312,46 +1314,50 @@ class range_token: public regex_token {
     public: auto operator=(range_token const&) -> void = delete;
 
 
-#line 2325 "cpp2regex.h2"
+#line 2387 "cpp2regex.h2"
 };
 
-template class range_token_matcher {
+#line 2390 "cpp2regex.h2"
+template class range_token_matcher
+ {
 
     public: template [[nodiscard]] static auto match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto;
 
-#line 2341 "cpp2regex.h2"
+#line 2406 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_below_upper_bound(cpp2::impl::in count) -> bool;
 
-#line 2346 "cpp2regex.h2"
+#line 2411 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_below_lower_bound(cpp2::impl::in count) -> bool;
 
-#line 2351 "cpp2regex.h2"
+#line 2416 "cpp2regex.h2"
     private: [[nodiscard]] static auto is_in_range(cpp2::impl::in count) -> bool;
 
-#line 2357 "cpp2regex.h2"
+#line 2422 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto;
 
-#line 2372 "cpp2regex.h2"
+#line 2438 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return;
 
-#line 2400 "cpp2regex.h2"
+#line 2468 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
 
-#line 2424 "cpp2regex.h2"
+#line 2496 "cpp2regex.h2"
     private: template [[nodiscard]] static auto match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return;
     public: range_token_matcher() = default;
     public: range_token_matcher(range_token_matcher const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(range_token_matcher const&) -> void = delete;
 
 
-#line 2448 "cpp2regex.h2"
+#line 2522 "cpp2regex.h2"
 };
 
-// Regex syntax: *, +, or ?  Example: aa*
+#line 2525 "cpp2regex.h2"
+//  Regex syntax: *, +, or ?  Example: aa*
 //
-class special_range_token: public range_token {
+class special_range_token
+: public range_token {
 
-#line 2455 "cpp2regex.h2"
+#line 2531 "cpp2regex.h2"
     public: [[nodiscard]] static auto parse(parse_context& ctx) -> token_ptr;
     public: virtual ~special_range_token() noexcept;
 
@@ -1360,19 +1366,20 @@ class special_range_token: public range_token {
     public: auto operator=(special_range_token const&) -> void = delete;
 
 
-#line 2484 "cpp2regex.h2"
+#line 2561 "cpp2regex.h2"
 };
 
-// Regex syntax: \b or \B  Example: \bword\b
+#line 2564 "cpp2regex.h2"
+//  Regex syntax: \b or \B  Example: \bword\b
 //
-// Matches the start end end of word boundaries.
+//  Matches the start end end of word boundaries.
 //
 [[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr;
 
-#line 2506 "cpp2regex.h2"
+#line 2585 "cpp2regex.h2"
 template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool;
 
-#line 2531 "cpp2regex.h2"
+#line 2610 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Regular expression implementation.
@@ -1380,20 +1387,21 @@ template [[nodiscard]] auto word_boundary_token_mat
 //-----------------------------------------------------------------------
 //
 
-// Regular expression implementation
-template class regular_expression {
-
+//  Regular expression implementation
+template class regular_expression
+ {
     public: template using matcher = matcher_wrapper_type;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     public: template using context = matcher_context_type>;// TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
 
-    public: template class search_return {
+    public: template class search_return
+     {
         public: bool matched; 
         public: context ctx; 
         public: int pos; 
 
         public: explicit search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_);
 
-#line 2555 "cpp2regex.h2"
+#line 2635 "cpp2regex.h2"
         public: [[nodiscard]] auto group_number() const& -> auto;
         public: [[nodiscard]] auto group(cpp2::impl::in g) const& -> auto;
         public: [[nodiscard]] auto group_start(cpp2::impl::in g) const& -> auto;
@@ -1408,7 +1416,7 @@ template class regular_expression {
         public: auto operator=(search_return const&) -> void = delete;
 
 
-#line 2571 "cpp2regex.h2"
+#line 2651 "cpp2regex.h2"
     };
 
     public: [[nodiscard]] auto match(cpp2::impl::in> str) const& -> auto;
@@ -1416,27 +1424,27 @@ template class regular_expression {
     public: [[nodiscard]] auto match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto match(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2583 "cpp2regex.h2"
+#line 2664 "cpp2regex.h2"
     public: [[nodiscard]] auto search(cpp2::impl::in> str) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start) const& -> auto;
     public: [[nodiscard]] auto search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto;
     public: template [[nodiscard]] auto search(Iter const& start, Iter const& end) const& -> search_return;
 
-#line 2605 "cpp2regex.h2"
+#line 2687 "cpp2regex.h2"
     public: [[nodiscard]] auto to_string() const& -> auto;
 
-    // Helper functions
+    //  Helper functions
     //
-
     private: [[nodiscard]] static auto get_iter(cpp2::impl::in> str, auto const& pos) -> auto;
     public: regular_expression() = default;
     public: regular_expression(regular_expression const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regular_expression const&) -> void = delete;
 
 
-#line 2618 "cpp2regex.h2"
+#line 2699 "cpp2regex.h2"
 };
 
+#line 2702 "cpp2regex.h2"
 //-----------------------------------------------------------------------
 //
 //  Parser for regular expression.
@@ -1444,9 +1452,9 @@ template class regular_expression {
 //-----------------------------------------------------------------------
 //
 
-// Parser and generator for regular expressions.
-template class regex_generator {
-
+//  Parser and generator for regular expressions.
+template class regex_generator
+ {
     private: std::string_view regex; 
     private: std::string modifier {""}; 
     private: std::string modifier_escape {""}; 
@@ -1457,21 +1465,21 @@ template class regex_generator {
 
     public: explicit regex_generator(cpp2::impl::in r, Error_out const& e);
 
-#line 2643 "cpp2regex.h2"
+#line 2725 "cpp2regex.h2"
     public: [[nodiscard]] auto parse() & -> std::string;
 
-#line 2678 "cpp2regex.h2"
+#line 2760 "cpp2regex.h2"
     private: auto extract_modifiers() & -> void;
     public: regex_generator(regex_generator const&) = delete; /* No 'that' constructor, suppress copy */
     public: auto operator=(regex_generator const&) -> void = delete;
 
 
-#line 2691 "cpp2regex.h2"
+#line 2774 "cpp2regex.h2"
 };
 
 template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string;
 
-#line 2700 "cpp2regex.h2"
+#line 2784 "cpp2regex.h2"
 }
 }
 
@@ -3026,17 +3034,19 @@ size_t i{0};
     }
 
 #line 1605 "cpp2regex.h2"
-[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr{
+[[nodiscard]] auto escape_token_parse(parse_context& ctx) -> token_ptr
+{
     if (ctx.current() != '\\') {return nullptr; }
 
-#line 1609 "cpp2regex.h2"
+#line 1610 "cpp2regex.h2"
     if (std::string::npos == std::string("afenrt^.[]()*{}?+|\\").find(ctx.peek())) {
         return nullptr; 
     }
 
     static_cast(ctx.next());// Skip escape
 
-    if (std::string::npos != std::string("afenrt\\").find(ctx.current())) {
+    if (std::string::npos != std::string("afenrt\\").find(ctx.current())) 
+    {
         // Escape of string special char
         char t {'\0'}; 
         if (     'a' == ctx. current()) { t = '\a'; }
@@ -3047,48 +3057,56 @@ size_t i{0};
         else {if ('t' == ctx.current()) {t = '\t'; }
         else {if ('\\' == ctx.current()) {t = '\\'; }
         else {return ctx.error("Internal: missing switch case for special escape."); }}}}}}}
+
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(t), false)}; 
         (*cpp2::impl::assert_not_null(r)).set_string("\\" + cpp2::to_string(ctx.current()) + "");
-
         return r; 
-    }else {
+    }
+    else 
+    {
         // Escape of regex special char
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ctx.current(), false)}; 
         (*cpp2::impl::assert_not_null(r)).set_string("\\" + cpp2::to_string(ctx.current()) + "");
-
         return r; 
     }
 
 }
 
-#line 1642 "cpp2regex.h2"
-[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr{
+#line 1646 "cpp2regex.h2"
+[[nodiscard]] auto global_group_reset_token_parse(parse_context& ctx) -> token_ptr
+{
     if (!((ctx.current() == '\\' && ctx.peek() == 'K'))) {return nullptr; }
 
     static_cast(ctx.next());// Skip escape.
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\K", "ctx..set_group_start(0, r.pos);"); 
 }
 
-#line 1661 "cpp2regex.h2"
+#line 1668 "cpp2regex.h2"
     group_ref_token::group_ref_token(cpp2::impl::in id_, cpp2::impl::in case_insensitive_, cpp2::impl::in str)
         : regex_token{ str }
         , id{ id_ }
-        , case_insensitive{ case_insensitive_ }{
+        , case_insensitive{ case_insensitive_ }
+#line 1669 "cpp2regex.h2"
+    {
 
-#line 1665 "cpp2regex.h2"
+#line 1673 "cpp2regex.h2"
     }
 
-#line 1667 "cpp2regex.h2"
-    [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr{
+#line 1675 "cpp2regex.h2"
+    [[nodiscard]] auto group_ref_token::parse(parse_context& ctx) -> token_ptr
+    {
         if (ctx.current() != '\\') {return nullptr; }
 
         std::string str {"\\"}; 
         std::string group {""}; 
 
-        if ([_0 = '0', _1 = ctx.peek(), _2 = '9']{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) {
+        if ([_0 = '0', _1 = ctx.peek(), _2 = '9']{ return cpp2::impl::cmp_less_eq(_0,_1) && cpp2::impl::cmp_less_eq(_1,_2); }()) 
+        {
             static_cast(ctx.next());// Skip escape
             group = ctx.grab_number();
-            if (cpp2::impl::cmp_greater_eq(group.size(),cpp2::impl::as_())) {
+
+            if (cpp2::impl::cmp_greater_eq(group.size(),cpp2::impl::as_())) 
+            {
                 // Octal syntax (\000) not a group ref matcher.
                 auto number {0}; 
                 if (!(string_util::string_to_int(group, number, 8))) {return ctx.error("Could not convert octal to int."); }
@@ -3104,7 +3122,8 @@ size_t i{0};
             str += group;
             // Regular group ref
         }
-        else {if ('g' == ctx.peek()) {
+        else {if ('g' == ctx.peek()) 
+        {
             static_cast(ctx.next());// Skip escape
             if (!(ctx.next())) {return ctx.error("Group escape without a following char."); }// Skip g
 
@@ -3121,7 +3140,8 @@ size_t i{0};
                 str += group;
             }
         }
-        else {if ('k' == ctx.peek()) {
+        else {if ('k' == ctx.peek()) 
+        {
             static_cast(ctx.next());// Skip escape
             if (!(ctx.next())) {return ctx.error("Group escape without a following char."); }// Skip k
 
@@ -3141,7 +3161,8 @@ size_t i{0};
 
             str += group + cpp2::move(term_char);
         }
-        else {
+        else 
+        {
             // No group ref matcher
             return nullptr; 
         }}}
@@ -3149,7 +3170,8 @@ size_t i{0};
         // Parse the group
         group = string_util::trim_copy(group);
         int group_id {0}; 
-        if (string_util::string_to_int(group, group_id)) {
+        if (string_util::string_to_int(group, group_id)) 
+        {
             if (cpp2::impl::cmp_less(group_id,0)) {
                 group_id = ctx.get_cur_group() + group_id;
 
@@ -3162,7 +3184,8 @@ size_t i{0};
                 return ctx.error("Group reference is used before the group is declared."); 
             }
         }
-        else {
+        else 
+        {
             // Named group
             group_id = ctx.get_named_group(group);
             if (-1 == group_id) {return ctx.error("Group names does not exist. (Name is: " + cpp2::to_string(cpp2::move(group)) + ")"); }
@@ -3171,19 +3194,24 @@ size_t i{0};
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(group_id), ctx.get_modifiers().has(expression_flags::case_insensitive), cpp2::move(str)); 
     }
 
-#line 1759 "cpp2regex.h2"
+#line 1776 "cpp2regex.h2"
     auto group_ref_token::generate_code(generation_context& ctx) const -> void{
         ctx.add_check("group_ref_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ")");
     }
 
     group_ref_token::~group_ref_token() noexcept{}
 
-#line 1764 "cpp2regex.h2"
-template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool{
+#line 1782 "cpp2regex.h2"
+template [[nodiscard]] auto group_ref_token_matcher(auto& cur, auto& ctx) -> bool
+{
     auto g {ctx.get_group(group)}; 
 
     auto group_pos {cpp2::move(g).start}; 
-    for( ; group_pos != g.end && cur != ctx.end; (++group_pos, ++cur) ) {
+    for( ; 
+        group_pos != g.end 
+        && cur != ctx.end; 
+    (++group_pos, ++cur) ) 
+    {
         if constexpr (case_insensitive) {
             if (string_util::safe_tolower(*cpp2::impl::assert_not_null(group_pos)) != string_util::safe_tolower(*cpp2::impl::assert_not_null(cur))) {
                 return false; 
@@ -3204,8 +3232,9 @@ template [[nodiscard]] auto gr
     }
 }
 
-#line 1805 "cpp2regex.h2"
-    [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr{
+#line 1830 "cpp2regex.h2"
+    [[nodiscard]] auto group_token::parse_lookahead(parse_context& ctx, cpp2::impl::in syntax, cpp2::impl::in positive) -> token_ptr
+    {
         static_cast(ctx.next());// Skip last token defining the syntax
 
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, positive)}; 
@@ -3218,8 +3247,9 @@ template [[nodiscard]] auto gr
         return r; 
     }
 
-#line 1818 "cpp2regex.h2"
-    [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr{
+#line 1844 "cpp2regex.h2"
+    [[nodiscard]] auto group_token::parse(parse_context& ctx) -> token_ptr
+    {
         if (ctx.current() != '(') {return nullptr; }
 
         auto has_id {!(ctx.get_modifiers().has(expression_flags::no_group_captures))}; 
@@ -3227,17 +3257,19 @@ template [[nodiscard]] auto gr
         std::string group_name {""}; 
         auto group_name_brackets {true}; 
         std::string modifiers {""}; 
-
         auto modifiers_change_to {ctx.get_modifiers()}; 
 
-        // Skip the '('
+        //  Skip the '('
         if (!(ctx.next())) {return ctx.error("Group without closing bracket."); }
-        if (ctx.current() == '?') {
-            // Special group
+
+        if (ctx.current() == '?') 
+        {
+            //  Special group
             if (!(ctx.next_no_skip())) {return ctx.error("Missing character after group opening."); }
 
-            if (ctx.current() == '<' || ctx.current() == '\'') {
-                // named group
+            if (ctx.current() == '<' || ctx.current() == '\'') 
+            {
+                //  Named group
                 auto end_char {ctx.current()}; 
                 if (end_char == '<') {
                     end_char = '>';
@@ -3249,14 +3281,15 @@ template [[nodiscard]] auto gr
                 if (!(ctx.grab_until(cpp2::move(end_char), cpp2::impl::out(&group_name)))) {return ctx.error("Missing ending bracket for named group."); }
                 if (!(ctx.next())) {return ctx.error("Group without closing bracket."); }
             }
-            else {if (ctx.current() == '#') {
-                // Comment
+            else {if (ctx.current() == '#') 
+            {
+                //  Comment
                 std::string comment_str {""}; 
                 static_cast(ctx.next());// Skip #
                 if (!(ctx.grab_until(")", cpp2::impl::out(&comment_str)))) {return ctx.error("Group without closing bracket."); }
-                // Do not add comment. Has problems with ranges.
+                //  Do not add comment. Has problems with ranges.
 
-                // Pop token and add a list. This fixes comments between a token and a range
+                //  Pop token and add a list. This fixes comments between a token and a range
                 if (ctx.has_token()) {
                     token_vec list {}; 
                     list.push_back(ctx.pop_token());
@@ -3268,8 +3301,9 @@ template [[nodiscard]] auto gr
                     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?#" + cpp2::to_string(cpp2::move(comment_str)) + ")"); 
                 }
             }
-            else {if (ctx.current() == '|') {
-                // Branch reset group
+            else {if (ctx.current() == '|') 
+            {
+                //  Branch reset group
 
                 if (!(ctx.next()))            { return ctx. error("Missing ending bracket for named group.");  }/* skip '|' */
 
@@ -3282,11 +3316,13 @@ template [[nodiscard]] auto gr
                 token_vec list {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?|"), cpp2::move(inner_), CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, ")")}; 
                 return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, cpp2::move(list)); 
             }
-            else {if (ctx.current() == '=' || ctx.current() == '!') {
+            else {if (ctx.current() == '=' || ctx.current() == '!') 
+            {
                 return parse_lookahead(ctx, "?" + cpp2::to_string(ctx.current()) + "", ctx.current() == '='); 
             }
-            else {
-                // Simple modifier
+            else 
+            {
+                //  Simple modifier
                 has_id = false;
                 if (!(ctx.grab_until_one_of("):", cpp2::impl::out(&modifiers)))) {return ctx.error("Missing ending bracket for group."); }
                 if (!(ctx.parser_group_modifiers(modifiers, modifiers_change_to))) {
@@ -3301,8 +3337,9 @@ template [[nodiscard]] auto gr
                 }
             }}}}
         }
-        else {if (ctx.current() == '*') {
-            // named pattern
+        else {if (ctx.current() == '*') 
+        {
+            //  Named pattern
             static_cast(ctx.next());// Skip *.
             std::string name {""}; 
             if (!(ctx.grab_until(':', cpp2::impl::out(&name)))) {return ctx.error("Missing colon for named pattern."); }
@@ -3318,8 +3355,9 @@ template [[nodiscard]] auto gr
             }}
         }}
 
-        if (cpp2::move(has_pattern)) {
-            // regular group
+        if (cpp2::move(has_pattern)) 
+        {
+            //  Regular group
 
             auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
             if (has_id) {
@@ -3338,16 +3376,18 @@ template [[nodiscard]] auto gr
 
             return r; 
         }
-        else {
-            // Only a modifier
+        else 
+        {
+            //  Only a modifier
             ctx.set_modifiers(cpp2::move(modifiers_change_to));
 
             return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "(?" + cpp2::to_string(cpp2::move(modifiers)) + ")"); 
         }
     }
 
-#line 1945 "cpp2regex.h2"
-    [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string{
+#line 1981 "cpp2regex.h2"
+    [[nodiscard]] auto group_token::gen_string(cpp2::impl::in name, cpp2::impl::in name_brackets, cpp2::impl::in has_modifier, cpp2::impl::in modifiers, cpp2::impl::in inner_) -> std::string
+    {
         std::string start {"("}; 
         if (0 != name.size()) {
             if (name_brackets) {
@@ -3364,8 +3404,9 @@ template [[nodiscard]] auto gr
         return cpp2::move(start) + (*cpp2::impl::assert_not_null(inner_)).to_string() + ")"; 
     }
 
-#line 1962 "cpp2regex.h2"
-    auto group_token::generate_code(generation_context& ctx) const -> void{
+#line 1999 "cpp2regex.h2"
+    auto group_token::generate_code(generation_context& ctx) const -> void
+    {
         if (-1 != number) {
             ctx.add("ctx..set_group_start(" + cpp2::to_string(number) + ", r.pos);");
         }
@@ -3384,8 +3425,9 @@ template [[nodiscard]] auto gr
         }
     }
 
-#line 1981 "cpp2regex.h2"
-    auto group_token::add_groups(std::set& groups) const -> void{
+#line 2019 "cpp2regex.h2"
+    auto group_token::add_groups(std::set& groups) const -> void
+    {
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
         if (-1 != number) {
             static_cast(groups.insert(number));
@@ -3394,8 +3436,9 @@ template [[nodiscard]] auto gr
 
     group_token::~group_token() noexcept{}
 
-#line 1991 "cpp2regex.h2"
-[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr{
+#line 2031 "cpp2regex.h2"
+[[nodiscard]] auto hexadecimal_token_parse(parse_context& ctx) -> token_ptr
+{
     if (!((ctx.current() == '\\' && ctx.peek() == 'x'))) {return nullptr; }
 
     static_cast(ctx.next());// Skip escape.
@@ -3405,14 +3448,13 @@ template [[nodiscard]] auto gr
     auto has_brackets {false}; 
     std::string number_str {""}; 
     if ('{' == ctx.current()) {
-        // Bracketed
+        //  Bracketed
         has_brackets = true;
         static_cast(ctx.next());// Skip '{'
         if (!(ctx.grab_until('}', cpp2::impl::out(&number_str)))) {return ctx.error("No ending bracket for \\x"); }
     }
     else {
-        // grab two chars
-
+        //  Grab two chars
         if (!(ctx.grab_n(2, cpp2::impl::out(&number_str)))) {return ctx.error("Missing hexadecimal digits after \\x."); }
     }
 
@@ -3433,8 +3475,9 @@ template [[nodiscard]] auto gr
     return r; 
 }
 
-#line 2031 "cpp2regex.h2"
-[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr{
+#line 2072 "cpp2regex.h2"
+[[nodiscard]] auto line_end_token_parse(parse_context& ctx) -> token_ptr
+{
     if (ctx.current() == '$' || (ctx.current() == '\\' && ctx.peek() == '$')) {
         if ((ctx.current() == '\\')) {static_cast(ctx.next()); }// Skip escape
         return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "$", "line_end_token_matcher"); 
@@ -3450,8 +3493,9 @@ template [[nodiscard]] auto gr
     }}
 }
 
-#line 2047 "cpp2regex.h2"
-template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool{
+#line 2089 "cpp2regex.h2"
+template [[nodiscard]] auto line_end_token_matcher(auto const& cur, auto& ctx) -> bool
+{
     if (cur == ctx.end || (match_new_line && *cpp2::impl::assert_not_null(cur) == '\n')) {
         return true; 
     }
@@ -3463,8 +3507,9 @@ template [[
     }}
 }
 
-#line 2061 "cpp2regex.h2"
-[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr{
+#line 2105 "cpp2regex.h2"
+[[nodiscard]] auto line_start_token_parse(parse_context& ctx) -> token_ptr
+{
     if (ctx.current() != '^' && !((ctx.current() == '\\' && ctx.peek() == 'A'))) {return nullptr; }
 
     if (ctx.current() == '\\') {
@@ -3476,36 +3521,38 @@ template [[
     }
 }
 
-#line 2073 "cpp2regex.h2"
-template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool{
+#line 2118 "cpp2regex.h2"
+template [[nodiscard]] auto line_start_token_matcher(auto const& cur, auto& ctx) -> bool
+{
     return cur == ctx.begin || // Start of string
            (match_new_line && *cpp2::impl::assert_not_null((cur - 1)) == '\n'); // Start of new line
 }
 
-#line 2088 "cpp2regex.h2"
+#line 2136 "cpp2regex.h2"
     lookahead_token::lookahead_token(cpp2::impl::in positive_)
         : regex_token{ "" }
         , positive{ positive_ }{
 
-#line 2090 "cpp2regex.h2"
+#line 2138 "cpp2regex.h2"
     }
 
-#line 2092 "cpp2regex.h2"
+#line 2140 "cpp2regex.h2"
     auto lookahead_token::generate_code(generation_context& ctx) const -> void{
         auto inner_name {ctx.generate_func(inner)}; 
 
         ctx.add_check("lookahead_token_matcher(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ")");
     }
 
-#line 2098 "cpp2regex.h2"
+#line 2146 "cpp2regex.h2"
     auto lookahead_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner)).add_groups(groups);
     }
 
     lookahead_token::~lookahead_token() noexcept{}
 
-#line 2103 "cpp2regex.h2"
-template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool{
+#line 2151 "cpp2regex.h2"
+template [[nodiscard]] auto lookahead_token_matcher(auto const& cur, auto& ctx, auto const& func) -> bool
+{
     auto r {func(cur, ctx, true_end_func())}; 
     if (!(positive)) {
         r.matched = !(r.matched);
@@ -3514,8 +3561,9 @@ template [[nodiscard]] auto lookahead_token_match
     return cpp2::move(r).matched; 
 }
 
-#line 2115 "cpp2regex.h2"
-[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr{
+#line 2164 "cpp2regex.h2"
+[[nodiscard]] auto named_class_token_parse(parse_context& ctx) -> token_ptr
+{
     if (ctx.current() != '\\') {return nullptr; }
 
     auto name {""}; 
@@ -3539,13 +3587,14 @@ template [[nodiscard]] auto lookahead_token_match
     return CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared, "\\" + cpp2::to_string(ctx.current()) + "", "" + cpp2::to_string(cpp2::move(name)) + "::match"); 
 }
 
-#line 2155 "cpp2regex.h2"
-[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr{
+#line 2206 "cpp2regex.h2"
+[[nodiscard]] auto octal_token_parse(parse_context& ctx) -> token_ptr
+{
     if (!((ctx.current() == '\\' && ctx.peek() == 'o'))) {return nullptr; }
 
     static_cast(ctx.next());// Skip escape.
 
-    if (!(ctx.next())) {return ctx.error("o escape without number."); }
+    if (!(ctx.next()))      { return ctx. error("o escape without number."); }
     if (ctx.current() != '{') {return ctx.error("Missing opening bracket for \\o."); }
 
     std::string number_str {""}; 
@@ -3564,19 +3613,21 @@ template [[nodiscard]] auto lookahead_token_match
     return r; 
 }
 
-#line 2183 "cpp2regex.h2"
+#line 2236 "cpp2regex.h2"
     inline CPP2_CONSTEXPR int range_flags::not_greedy{ 1 };
     inline CPP2_CONSTEXPR int range_flags::greedy{ 2 };
     inline CPP2_CONSTEXPR int range_flags::possessive{ 3 };
 
-#line 2198 "cpp2regex.h2"
+#line 2253 "cpp2regex.h2"
     range_token::range_token()
                              : regex_token{ "" }{}
 
-#line 2200 "cpp2regex.h2"
-    [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr{
+#line 2255 "cpp2regex.h2"
+    [[nodiscard]] auto range_token::parse(parse_context& ctx) -> token_ptr
+    {
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
-        if (ctx.current() == '{') {
+        if (ctx.current() == '{') 
+        {
             if (!(ctx.has_token())) {return ctx.error("'{' without previous element."); }
 
             std::string inner {""}; 
@@ -3593,13 +3644,15 @@ template [[nodiscard]] auto lookahead_token_match
             std::string max_count_str {"-1"}; 
 
             size_t sep {inner.find(",")}; 
-            if (sep == std::string::npos) {
+            if (sep == std::string::npos) 
+            {
                 min_count_str = inner;
                 max_count_str = inner;
                 if (!(string_util::string_to_int(cpp2::move(inner), (*cpp2::impl::assert_not_null(r)).min_count))) {return ctx.error("Could not convert range to number."); }
                 (*cpp2::impl::assert_not_null(r)).max_count = (*cpp2::impl::assert_not_null(r)).min_count;
             }
-            else {
+            else 
+            {
                 std::string inner_first {string_util::trim_copy(inner.substr(0, sep))}; 
                 std::string inner_last {string_util::trim_copy(cpp2::move(inner).substr(cpp2::move(sep) + 1))}; 
 
@@ -3617,7 +3670,6 @@ template [[nodiscard]] auto lookahead_token_match
                 }
             }
 
-#line 2244 "cpp2regex.h2"
             // Check validity of the range.
             if (-1 != (*cpp2::impl::assert_not_null(r)).min_count) {
                 if (!((cpp2::impl::cmp_less_eq(0,(*cpp2::impl::assert_not_null(r)).min_count)))) {
@@ -3644,8 +3696,9 @@ template [[nodiscard]] auto lookahead_token_match
         return nullptr; 
     }
 
-#line 2270 "cpp2regex.h2"
-    auto range_token::parse_modifier(parse_context& ctx) & -> void{
+#line 2328 "cpp2regex.h2"
+    auto range_token::parse_modifier(parse_context& ctx) & -> void
+    {
         if (ctx.peek() == '?') {
             kind = range_flags::not_greedy;
             static_cast(ctx.next());
@@ -3656,8 +3709,9 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2281 "cpp2regex.h2"
-    [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string{
+#line 2340 "cpp2regex.h2"
+    [[nodiscard]] auto range_token::gen_mod_string() const& -> std::string
+    {
         if (kind == range_flags::not_greedy) {
             return "?"; 
         }
@@ -3669,8 +3723,9 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2293 "cpp2regex.h2"
-    [[nodiscard]] auto range_token::gen_range_string() const& -> std::string{
+#line 2353 "cpp2regex.h2"
+    [[nodiscard]] auto range_token::gen_range_string() const& -> std::string
+    {
         std::string r {""}; 
         if (min_count == max_count) {
             r += "{" + cpp2::to_string(min_count) + "}";
@@ -3688,8 +3743,9 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2311 "cpp2regex.h2"
-    auto range_token::generate_code(generation_context& ctx) const -> void{
+#line 2372 "cpp2regex.h2"
+    auto range_token::generate_code(generation_context& ctx) const -> void
+    {
         auto inner_name {ctx.generate_func(inner_token)}; 
         std::set groups {}; 
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
@@ -3699,15 +3755,16 @@ template [[nodiscard]] auto lookahead_token_match
         ctx.add_statefull(next_name, "cpp2::regex::range_token_matcher::match(" + cpp2::to_string(ctx.match_parameters()) + ", " + cpp2::to_string(cpp2::move(inner_name)) + ", " + cpp2::to_string(cpp2::move(reset_name)) + ", other, " + cpp2::to_string(next_name) + ")");
     }
 
-#line 2321 "cpp2regex.h2"
+#line 2383 "cpp2regex.h2"
     auto range_token::add_groups(std::set& groups) const -> void{
         (*cpp2::impl::assert_not_null(inner_token)).add_groups(groups);
     }
 
     range_token::~range_token() noexcept{}
 
-#line 2329 "cpp2regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto{
+#line 2393 "cpp2regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match(Iter const& cur, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& tail) -> auto
+    {
         if (range_flags::possessive == kind) {
             return match_possessive(cur, ctx, inner, end_func, tail); 
         }
@@ -3719,27 +3776,28 @@ template [[nodiscard]] auto lookahead_token_match
         }}
     }
 
-#line 2341 "cpp2regex.h2"
+#line 2406 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_upper_bound(cpp2::impl::in count) -> bool{
         if (-1 == max_count) {return true; }
         else {return cpp2::impl::cmp_less(count,max_count); }
     }
 
-#line 2346 "cpp2regex.h2"
+#line 2411 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_below_lower_bound(cpp2::impl::in count) -> bool{
         if (-1 == min_count) {return false; }
         else {return cpp2::impl::cmp_less(count,min_count); }
     }
 
-#line 2351 "cpp2regex.h2"
+#line 2416 "cpp2regex.h2"
     template  [[nodiscard]] auto range_token_matcher::is_in_range(cpp2::impl::in count) -> bool{
         if (-1 != min_count && cpp2::impl::cmp_less(count,min_count)) {return false; }
         if (-1 != max_count && cpp2::impl::cmp_greater(count,max_count)) {return false; }
         return true; 
     }
 
-#line 2357 "cpp2regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto{// TODO: count_r as out parameter introduces a performance loss.
+#line 2422 "cpp2regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_min_count(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, int& count_r) -> auto
+    {   // TODO: count_r as out parameter introduces a performance loss.
         auto res {ctx.pass(cur)}; 
         auto count {0}; 
 
@@ -3754,8 +3812,9 @@ template [[nodiscard]] auto lookahead_token_match
         return res; 
     }
 
-#line 2372 "cpp2regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return{
+#line 2438 "cpp2regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_greedy(cpp2::impl::in count, Iter const& cur, Iter const& last_valid, auto& ctx, auto const& inner, auto const& reset_func, auto const& end_func, auto const& other) -> match_return
+    {
         auto inner_call {[_0 = (count + 1), _1 = (cur), _2 = (inner), _3 = (reset_func), _4 = (end_func), _5 = (other)](auto const& tail_cur, auto& tail_ctx) -> auto{
             return match_greedy(_0, tail_cur, _1, tail_ctx, _2, _3, _4, _5); 
         }}; 
@@ -3766,12 +3825,13 @@ template [[nodiscard]] auto lookahead_token_match
             r = inner(cur, ctx, cpp2::move(inner_call));
         }
 
-        if (!(r.matched) && is_in_range(count)) {
-            // The recursion did not yield a match try now the tail
+        if (!(r.matched) && is_in_range(count)) 
+        {
+            //  The recursion did not yield a match try now the tail
             r = other(cur, ctx, end_func);
 
             if (r.matched && !(cpp2::move(is_m_valid))) {
-                // We have a match rematch M if required
+                //  We have a match rematch M if required
                 reset_func(ctx);
 
                 if (cpp2::impl::cmp_greater(count,0)) {
@@ -3783,8 +3843,9 @@ template [[nodiscard]] auto lookahead_token_match
         return r; 
     }
 
-#line 2400 "cpp2regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
+#line 2468 "cpp2regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_possessive(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return
+    {
         auto count {0}; 
         auto r {match_min_count(cur, ctx, inner, end_func, count)}; 
 
@@ -3793,7 +3854,10 @@ template [[nodiscard]] auto lookahead_token_match
         }
 
         auto pos {r.pos}; 
-        while( r.matched && is_below_upper_bound(count) ) {
+        while( 
+            r.matched 
+            && is_below_upper_bound(count) ) 
+        {
             r = inner(pos, ctx, true_end_func());
 
             if (pos == r.pos) {
@@ -3808,8 +3872,9 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); 
     }
 
-#line 2424 "cpp2regex.h2"
-    template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return{
+#line 2496 "cpp2regex.h2"
+    template  template [[nodiscard]] auto range_token_matcher::match_not_greedy(Iter const& cur, auto& ctx, auto const& inner, auto const& end_func, auto const& other) -> match_return
+    {
         auto count {0}; 
         auto start {match_min_count(cur, ctx, inner, end_func, count)}; 
         if (!(start.matched)) {
@@ -3817,7 +3882,8 @@ template [[nodiscard]] auto lookahead_token_match
         }
 
         auto pos {cpp2::move(start).pos}; 
-        while( is_below_upper_bound(count) ) {
+        while( is_below_upper_bound(count) ) 
+        {
             auto o {other(pos, ctx, end_func)}; 
             if (o.matched) {
                 return o; 
@@ -3834,8 +3900,9 @@ template [[nodiscard]] auto lookahead_token_match
         return other(cpp2::move(pos), ctx, end_func); // Upper bound reached.
     }
 
-#line 2455 "cpp2regex.h2"
-    [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr{
+#line 2531 "cpp2regex.h2"
+    [[nodiscard]] auto special_range_token::parse(parse_context& ctx) -> token_ptr
+    {
         auto r {CPP2_UFCS_TEMPLATE(cpp2_new)(cpp2::shared)}; 
         char symbol {'\0'}; 
         if (ctx.current() == '*') {
@@ -3857,7 +3924,7 @@ template [[nodiscard]] auto lookahead_token_match
 
         if (!(ctx.has_token())) {return ctx.error("'" + cpp2::to_string(ctx.current()) + "' without previous element."); }
 
-#line 2478 "cpp2regex.h2"
+#line 2555 "cpp2regex.h2"
         (*cpp2::impl::assert_not_null(r)).parse_modifier(ctx);
 
         (*cpp2::impl::assert_not_null(r)).inner_token = ctx.pop_token();
@@ -3867,8 +3934,9 @@ template [[nodiscard]] auto lookahead_token_match
 
     special_range_token::~special_range_token() noexcept{}
 
-#line 2490 "cpp2regex.h2"
-[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr{
+#line 2568 "cpp2regex.h2"
+[[nodiscard]] auto word_boundary_token_parse(parse_context& ctx) -> token_ptr
+{
     if (ctx.current() != '\\') {return nullptr; }
 
     if (ctx.peek() == 'b') {
@@ -3884,8 +3952,9 @@ template [[nodiscard]] auto lookahead_token_match
     }}
 }
 
-#line 2506 "cpp2regex.h2"
-template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool{
+#line 2585 "cpp2regex.h2"
+template [[nodiscard]] auto word_boundary_token_matcher(auto& cur, auto& ctx) -> bool
+{
     word_class words {}; 
     auto is_match {false}; 
     if (cur == ctx.begin) {// String start
@@ -3900,7 +3969,6 @@ template [[nodiscard]] auto word_boundary_token_mat
         is_match = 
                 (words.includes(*cpp2::impl::assert_not_null((cur - 1))) && !(words.includes(*cpp2::impl::assert_not_null(cur)))) // End of word: \w\W
             || (!(words.includes(*cpp2::impl::assert_not_null((cur - 1)))) && words.includes(*cpp2::impl::assert_not_null(cur)));// Start of word: \W\w
-
     }}
     if (negate) {
         is_match = !(is_match);
@@ -3909,32 +3977,32 @@ template [[nodiscard]] auto word_boundary_token_mat
     return is_match; 
 }
 
-#line 2549 "cpp2regex.h2"
+#line 2629 "cpp2regex.h2"
         template  template  regular_expression::search_return::search_return(cpp2::impl::in matched_, context const& ctx_, Iter const& pos_)
             : matched{ matched_ }
             , ctx{ ctx_ }
             , pos{ unsafe_narrow(std::distance(ctx_.begin, pos_)) }{
 
-#line 2553 "cpp2regex.h2"
+#line 2633 "cpp2regex.h2"
         }
 
-#line 2555 "cpp2regex.h2"
+#line 2635 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_number() const& -> auto { return ctx.size();  }
-#line 2556 "cpp2regex.h2"
+#line 2636 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in g) const& -> auto { return ctx.get_group_string(g); }
-#line 2557 "cpp2regex.h2"
+#line 2637 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in g) const& -> auto { return ctx.get_group_start(g); }
-#line 2558 "cpp2regex.h2"
+#line 2638 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in g) const& -> auto { return ctx.get_group_end(g); }
 
-#line 2560 "cpp2regex.h2"
+#line 2640 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group(cpp2::impl::in> g) const& -> auto { return group(get_group_id(g)); }
-#line 2561 "cpp2regex.h2"
+#line 2641 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_start(cpp2::impl::in> g) const& -> auto { return group_start(get_group_id(g)); }
-#line 2562 "cpp2regex.h2"
+#line 2642 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::group_end(cpp2::impl::in> g) const& -> auto { return group_end(get_group_id(g)); }
 
-#line 2564 "cpp2regex.h2"
+#line 2644 "cpp2regex.h2"
         template  template  [[nodiscard]] auto regular_expression::search_return::get_group_id(cpp2::impl::in> g) const& -> auto{
             auto group_id {matcher::get_named_group_index(g)}; 
             if (-1 == group_id) {
@@ -3943,28 +4011,30 @@ template [[nodiscard]] auto word_boundary_token_mat
             return group_id; 
         }
 
-#line 2573 "cpp2regex.h2"
+#line 2653 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str) const& -> auto { return match(str.begin(), str.end()); }
-#line 2574 "cpp2regex.h2"
+#line 2654 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start) const& -> auto { return match(get_iter(str, start), str.end()); }
-#line 2575 "cpp2regex.h2"
+#line 2655 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::match(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return match(get_iter(str, start), get_iter(str, start + length)); }
-#line 2576 "cpp2regex.h2"
-    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return{
+#line 2656 "cpp2regex.h2"
+    template  template [[nodiscard]] auto regular_expression::match(Iter const& start, Iter const& end) const& -> search_return
+    {
         context ctx {start, end}; 
 
         auto r {matcher::entry(start, ctx)}; 
         return search_return(r.matched && r.pos == end, cpp2::move(ctx), r.pos); 
     }
 
-#line 2583 "cpp2regex.h2"
+#line 2664 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str) const& -> auto { return search(str.begin(), str.end()); }
-#line 2584 "cpp2regex.h2"
+#line 2665 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start) const& -> auto { return search(get_iter(str, start), str.end()); }
-#line 2585 "cpp2regex.h2"
+#line 2666 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::search(cpp2::impl::in> str, auto const& start, auto const& length) const& -> auto { return search(get_iter(str, start), get_iter(str, start + length)); }
-#line 2586 "cpp2regex.h2"
-    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return{
+#line 2667 "cpp2regex.h2"
+    template  template [[nodiscard]] auto regular_expression::search(Iter const& start, Iter const& end) const& -> search_return
+    {
         context ctx {start, end}; 
         auto r {ctx.fail()}; 
 
@@ -3983,10 +4053,10 @@ template [[nodiscard]] auto word_boundary_token_mat
         return search_return(r.matched, cpp2::move(ctx), cpp2::move(r).pos); 
     }
 
-#line 2605 "cpp2regex.h2"
+#line 2687 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::to_string() const& -> auto { return matcher_wrapper::to_string();  }
 
-#line 2610 "cpp2regex.h2"
+#line 2691 "cpp2regex.h2"
     template  [[nodiscard]] auto regular_expression::get_iter(cpp2::impl::in> str, auto const& pos) -> auto{
         if (cpp2::impl::cmp_less(pos,str.size())) {
             return str.begin() + pos; 
@@ -3996,17 +4066,17 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2638 "cpp2regex.h2"
+#line 2720 "cpp2regex.h2"
     template  regex_generator::regex_generator(cpp2::impl::in r, Error_out const& e)
         : regex{ r }
         , error_out{ e }{
 
-#line 2641 "cpp2regex.h2"
+#line 2723 "cpp2regex.h2"
     }
 
-#line 2643 "cpp2regex.h2"
-    template  [[nodiscard]] auto regex_generator::parse() & -> std::string{
-
+#line 2725 "cpp2regex.h2"
+    template  [[nodiscard]] auto regex_generator::parse() & -> std::string
+    {
         // Extract modifiers and adapt regex.
         extract_modifiers();
 
@@ -4040,8 +4110,9 @@ template [[nodiscard]] auto word_boundary_token_mat
         return source; 
     }
 
-#line 2678 "cpp2regex.h2"
-    template  auto regex_generator::extract_modifiers() & -> void{
+#line 2760 "cpp2regex.h2"
+    template  auto regex_generator::extract_modifiers() & -> void
+    {
         if (regex.find_first_of("'/") == 0) {
             char mod_token {CPP2_ASSERT_IN_BOUNDS_LITERAL(regex, 0)}; 
 
@@ -4055,8 +4126,9 @@ template [[nodiscard]] auto word_boundary_token_mat
         }
     }
 
-#line 2693 "cpp2regex.h2"
-template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string{
+#line 2776 "cpp2regex.h2"
+template [[nodiscard]] auto generate_regex(cpp2::impl::in regex, Err const& err) -> std::string
+{
     regex_generator parser {regex, err}; 
     auto r {parser.parse()}; 
     static_cast(cpp2::move(parser));
diff --git a/include/cpp2regex.h2 b/include/cpp2regex.h2
index 69e3f9df0a..4605a77f86 100644
--- a/include/cpp2regex.h2
+++ b/include/cpp2regex.h2
@@ -1600,9 +1600,10 @@ class_token_matcher:  typ
 }
 
 
-// Regex syntax: \a or \n or \[
+//  Regex syntax: \a or \n or \[
 //
-escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
+escape_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if ctx..current() != '\\' { return nullptr; }
 
 
@@ -1612,7 +1613,8 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
     _ = ctx..next(); // Skip escape
 
-    if std::string::npos != std::string("afenrt\\")..find(ctx..current()) {
+    if std::string::npos != std::string("afenrt\\")..find(ctx..current()) 
+    {
         // Escape of string special char
         t : char = '\0';
         if      'a' == ctx..current() { t = '\a'; }
@@ -1623,57 +1625,67 @@ escape_token_parse: (inout ctx: parse_context) -> token_ptr = {
         else if 't' == ctx..current() { t = '\t'; }
         else if '\\' == ctx..current() { t = '\\'; }
         else { return ctx..error("Internal: missing switch case for special escape."); }
+
         r: = shared.new(t, false);
         r*..set_string("\\(ctx..current())$");
-
         return r;
-    } else {
+    } 
+    else 
+    {
         // Escape of regex special char
         r := shared.new(ctx..current(), false);
         r*..set_string("\\(ctx..current())$");
-
         return r;
     }
 
 }
 
-// Regex syntax: \K Example: ab\Kcd
+
+//  Regex syntax: \K Example: ab\Kcd
 //
-global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = {
+global_group_reset_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if !(ctx..current() == '\\' && ctx..peek() == 'K') { return nullptr; }
 
     _ = ctx..next(); // Skip escape.
     return shared.new("\\K", "ctx..set_group_start(0, r.pos);");
 }
 
-// Regex syntax: \  Example: \1
-//               \g{name_or_number}
-//               \k{name_or_number}
-//               \k
-//               \k'name_or_number'
+
+//  Regex syntax: \  Example: \1
+//                \g{name_or_number}
+//                \k{name_or_number}
+//                \k
+//                \k'name_or_number'
 //
-group_ref_token: @polymorphic_base type = {
-    this: regex_token = ();
+group_ref_token: @polymorphic_base type = 
+{
+    this            : regex_token = ();
 
-    id: int;
+    id              : int;
     case_insensitive: bool;
 
-    operator=:(out this, id_: int, case_insensitive_: bool, str: std::string) = {
-        regex_token = str;
-        id = id_;
+    operator=:(out this, id_: int, case_insensitive_: bool, str: std::string) = 
+    {
+        regex_token      = str;
+        id               = id_;
         case_insensitive = case_insensitive_;
     }
 
-    parse: (inout ctx: parse_context) -> token_ptr = {
+    parse: (inout ctx: parse_context) -> token_ptr = 
+    {
         if ctx..current() != '\\' { return nullptr; }
 
         str : std::string = "\\";
         group : std::string = "";
 
-        if '0' <= ctx..peek() <= '9' {
+        if '0' <= ctx..peek() <= '9' 
+        {
             _ = ctx..next(); // Skip escape
             group = ctx..grab_number();
-            if group..size() >= 3 as size_t {
+
+            if group..size() >= 3 as size_t 
+            {
                 // Octal syntax (\000) not a group ref matcher.
                 number := 0;
                 if !string_util::string_to_int(group, number, 8) { return ctx..error("Could not convert octal to int."); }
@@ -1689,7 +1701,8 @@ group_ref_token: @polymorphic_base type = {
             str += group;
             // Regular group ref
         }
-        else if 'g' == ctx..peek() {
+        else if 'g' == ctx..peek() 
+        {
             _ = ctx..next(); // Skip escape
             if !ctx..next() { return ctx..error("Group escape without a following char."); } // Skip g
 
@@ -1706,7 +1719,8 @@ group_ref_token: @polymorphic_base type = {
                 str += group;
             }
         }
-        else if 'k' == ctx..peek() {
+        else if 'k' == ctx..peek() 
+        {
             _ = ctx..next(); // Skip escape
             if !ctx..next() { return ctx..error("Group escape without a following char."); } // Skip k
 
@@ -1726,7 +1740,8 @@ group_ref_token: @polymorphic_base type = {
 
             str += group + term_char;
         }
-        else {
+        else 
+        {
             // No group ref matcher
             return nullptr;
         }
@@ -1734,7 +1749,8 @@ group_ref_token: @polymorphic_base type = {
         // Parse the group
         group = string_util::trim_copy(group);
         group_id : int = 0;
-        if string_util::string_to_int(group, group_id) {
+        if string_util::string_to_int(group, group_id) 
+        {
             if group_id < 0 {
                 group_id = ctx..get_cur_group() + group_id;
 
@@ -1747,7 +1763,8 @@ group_ref_token: @polymorphic_base type = {
                 return ctx..error("Group reference is used before the group is declared.");
             }
         }
-        else {
+        else 
+        {
             // Named group
             group_id = ctx..get_named_group(group);
             if -1 == group_id { return ctx..error("Group names does not exist. (Name is: (group)$)");}
@@ -1761,11 +1778,17 @@ group_ref_token: @polymorphic_base type = {
     }
 }
 
-group_ref_token_matcher:  (inout cur, inout ctx) -> bool = {
+
+group_ref_token_matcher:  (inout cur, inout ctx) -> bool = 
+{
     g := ctx..get_group(group);
 
     group_pos := g.start;
-    while group_pos != g.end && cur != ctx.end next (group_pos++, cur++) {
+    while 
+        group_pos != g.end 
+        && cur != ctx.end 
+    next (group_pos++, cur++) 
+    {
         if constexpr case_insensitive {
             if string_util::safe_tolower(group_pos*) != string_util::safe_tolower(cur*) {
                 return false;
@@ -1786,23 +1809,26 @@ group_ref_token_matcher:  (inout cur,
     }
 }
 
-// Regex syntax: ()      Example: (abc)
-//               (?:)  (?i:abc)
-//               (?<>:)     (?:abc)
-//               (?#)            (#Step 1 finished)
-//               (?|)             (?|(abc)|(cde))
-//               (?=)             (?=abc)
-//               (?!)             (?!abc)
-//               (*:)      Example: (abc)
+//                (?:)  (?i:abc)
+//                (?<>:)     (?:abc)
+//                (?#)            (#Step 1 finished)
+//                (?|)             (?|(abc)|(cde))
+//                (?=)             (?=abc)
+//                (?!)             (?!abc)
+//                (*: token_ptr = {
+    parse_lookahead: (inout ctx: parse_context, syntax: std::string, positive: bool) -> token_ptr = 
+    {
         _ = ctx..next(); // Skip last token defining the syntax
 
         r := shared.new(positive);
@@ -1815,25 +1841,28 @@ group_token: @polymorphic_base type = {
         return r;
     }
 
-    parse: (inout ctx: parse_context) -> token_ptr = {
+    parse: (inout ctx: parse_context) -> token_ptr = 
+    {
         if ctx..current() != '(' { return nullptr; }
 
-        has_id :=  !ctx..get_modifiers()..has(expression_flags::no_group_captures);
-        has_pattern := true;
-        group_name : std::string = "";
+        has_id              :=  !ctx..get_modifiers()..has(expression_flags::no_group_captures);
+        has_pattern         := true;
+        group_name          : std::string = "";
         group_name_brackets := true;
-        modifiers : std::string = "";
-
+        modifiers           : std::string = "";
         modifiers_change_to : =  ctx..get_modifiers();
 
-        // Skip the '('
+        //  Skip the '('
         if !ctx..next() { return ctx..error("Group without closing bracket."); }
-        if ctx..current() == '?' {
-            // Special group
+
+        if ctx..current() == '?' 
+        {
+            //  Special group
             if !ctx..next_no_skip() { return ctx..error("Missing character after group opening.");  }
 
-            if ctx..current() == '<' || ctx..current() == '\'' {
-                // named group
+            if ctx..current() == '<' || ctx..current() == '\'' 
+            {
+                //  Named group
                 end_char := ctx..current();
                 if end_char == '<' {
                     end_char = '>';
@@ -1845,14 +1874,15 @@ group_token: @polymorphic_base type = {
                 if !ctx..grab_until(end_char, out group_name) { return ctx..error("Missing ending bracket for named group.");  }
                 if !ctx..next() { return ctx..error("Group without closing bracket."); }
             }
-            else if ctx..current() == '#' {
-                // Comment
+            else if ctx..current() == '#' 
+            {
+                //  Comment
                 comment_str : std::string = "";
                 _ = ctx..next(); // Skip #
                 if !ctx..grab_until(")", out comment_str) { return ctx..error("Group without closing bracket."); }
-                // Do not add comment. Has problems with ranges.
+                //  Do not add comment. Has problems with ranges.
 
-                // Pop token and add a list. This fixes comments between a token and a range
+                //  Pop token and add a list. This fixes comments between a token and a range
                 if ctx..has_token() {
                     list : token_vec = ();
                     list..push_back(ctx..pop_token());
@@ -1864,8 +1894,9 @@ group_token: @polymorphic_base type = {
                     return shared.new("(?#(comment_str)$)");
                 }
             }
-            else if ctx..current() == '|' {
-                // Branch reset group
+            else if ctx..current() == '|' 
+            {
+                //  Branch reset group
 
                 if !ctx..next() /* skip '|' */ { return ctx..error("Missing ending bracket for named group.");  }
 
@@ -1878,11 +1909,13 @@ group_token: @polymorphic_base type = {
                 list: token_vec = (shared.new("(?|"), inner_, shared.new(")"));
                 return shared.new(list);
             }
-            else if ctx..current() == '=' || ctx..current() == '!' {
+            else if ctx..current() == '=' || ctx..current() == '!' 
+            {
                 return parse_lookahead(ctx, "?(ctx..current())$", ctx..current() == '=');
             }
-            else {
-                // Simple modifier
+            else 
+            {
+                //  Simple modifier
                 has_id = false;
                 if !ctx..grab_until_one_of("):", out modifiers) { return ctx..error("Missing ending bracket for group."); }
                 if !ctx..parser_group_modifiers(modifiers, modifiers_change_to) {
@@ -1897,8 +1930,9 @@ group_token: @polymorphic_base type = {
                 }
             }
         }
-        else if ctx..current() == '*' {
-            // named pattern
+        else if ctx..current() == '*' 
+        {
+            //  Named pattern
             _ = ctx..next(); // Skip *.
             name: std::string = "";
             if !ctx..grab_until(':', out name) { return ctx..error("Missing colon for named pattern.");  }
@@ -1914,8 +1948,9 @@ group_token: @polymorphic_base type = {
             }
         }
 
-        if has_pattern {
-            // regular group
+        if has_pattern 
+        {
+            //  Regular group
 
             r := shared.new();
             if has_id {
@@ -1934,15 +1969,17 @@ group_token: @polymorphic_base type = {
 
             return r;
         }
-        else {
-            // Only a modifier
+        else 
+        {
+            //  Only a modifier
             ctx..set_modifiers(modifiers_change_to);
 
             return shared.new("(?(modifiers)$)");
         }
     }
 
-    gen_string: (name: std::string, name_brackets: bool, has_modifier: bool, modifiers: std::string, inner_: token_ptr) -> std::string = {
+    gen_string: (name: std::string, name_brackets: bool, has_modifier: bool, modifiers: std::string, inner_: token_ptr) -> std::string = 
+    {
         start : std::string = "(";
         if 0 != name..size() {
             if name_brackets {
@@ -1959,7 +1996,8 @@ group_token: @polymorphic_base type = {
         return start + inner_*..to_string() + ")";
     }
 
-    generate_code: (override this, inout ctx: generation_context) = {
+    generate_code: (override this, inout ctx: generation_context) = 
+    {
         if -1 != number {
             ctx..add("ctx..set_group_start((number)$, r.pos);");
         }
@@ -1978,7 +2016,8 @@ group_token: @polymorphic_base type = {
         }
     }
 
-    add_groups: (override this, inout groups: std::set) = {
+    add_groups: (override this, inout groups: std::set) = 
+    {
         inner*..add_groups(groups);
         if -1 != number {
             _ = groups..insert(number);
@@ -1986,9 +2025,11 @@ group_token: @polymorphic_base type = {
     }
 }
 
-// Regex syntax: \x or \x{}  Example: \x{62}
+
+//  Regex syntax: \x or \x{}  Example: \x{62}
 //
-hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
+hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if !(ctx..current() == '\\' && ctx..peek() == 'x') { return nullptr; }
 
     _ = ctx..next(); // Skip escape.
@@ -1998,14 +2039,13 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     has_brackets := false;
     number_str: std::string = "";
     if '{' == ctx..current() {
-        // Bracketed
+        //  Bracketed
         has_brackets = true;
         _  = ctx..next(); // Skip '{'
         if !ctx..grab_until('}', out number_str) { return ctx..error("No ending bracket for \\x"); }
     }
     else {
-        // grab two chars
-
+        //  Grab two chars
         if !ctx..grab_n(2, out number_str) { return ctx..error("Missing hexadecimal digits after \\x."); }
     }
 
@@ -2026,9 +2066,11 @@ hexadecimal_token_parse: (inout ctx: parse_context) -> token_ptr = {
     return r;
 }
 
-// Regex syntax: $  Example: aa$
+
+//  Regex syntax: $  Example: aa$
 //
-line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
+line_end_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if ctx..current() == '$' || (ctx..current() == '\\' && ctx..peek() == '$') {
         if (ctx..current() == '\\') { _ = ctx..next(); } // Skip escape
         return shared.new("$", "line_end_token_matcher");
@@ -2044,7 +2086,8 @@ line_end_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
 }
 
-line_end_token_matcher:  (cur, inout ctx) -> bool = {
+line_end_token_matcher:  (cur, inout ctx) -> bool = 
+{
     if cur == ctx.end || (match_new_line && cur* == '\n') {
         return true;
     }
@@ -2056,9 +2099,11 @@ line_end_token_matcher:  token_ptr = {
+line_start_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if ctx..current() != '^' && !(ctx..current() == '\\' && ctx..peek() == 'A') { return nullptr; }
 
     if ctx..current() == '\\' {
@@ -2070,20 +2115,23 @@ line_start_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
 }
 
-line_start_token_matcher:  (cur, inout ctx) -> bool = {
+line_start_token_matcher:  (cur, inout ctx) -> bool = 
+{
     return cur == ctx.begin || // Start of string
            (match_new_line && (cur - 1)* == '\n'); // Start of new line
 }
 
-// Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
+
+//  Regex syntax: (?=) or (?!) or (*pla), etc.  Example: (?=AA)
 //
-// Parsed in group_token.
+//  Parsed in group_token.
 //
-lookahead_token: @polymorphic_base type = {
+lookahead_token: @polymorphic_base type = 
+{
     this: regex_token = ("");
 
     protected positive: bool;
-    public inner: token_ptr = nullptr;
+    public    inner   : token_ptr = nullptr;
 
     operator=: (out this, positive_: bool) = {
         positive = positive_;
@@ -2100,7 +2148,8 @@ lookahead_token: @polymorphic_base type = {
     }
 }
 
-lookahead_token_matcher:  (cur, inout ctx, func) -> bool = {
+lookahead_token_matcher:  (cur, inout ctx, func) -> bool = 
+{
     r := func(cur, ctx, true_end_func());
     if !positive {
         r.matched = !r.matched;
@@ -2109,10 +2158,11 @@ lookahead_token_matcher:  (cur, inout ctx, func) -> bool
     return r.matched;
 }
 
+
 // Named character classes
 //
-
-named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
+named_class_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if ctx..current() != '\\' { return nullptr; }
 
     name := "";
@@ -2136,28 +2186,30 @@ named_class_token_parse: (inout ctx: parse_context) -> token_ptr = {
     return shared.new("\\(ctx..current())$", "(name)$::match");
 }
 
-named_class_no_new_line:  type == class_token_matcher>;
-named_class_digits     :  type == class_token_matcher>;
-named_class_hor_space  :  type == class_token_matcher>;
-named_class_space      :  type == class_token_matcher>;
-named_class_ver_space  :  type == class_token_matcher>;
-named_class_word       :  type == class_token_matcher>;
 
-named_class_not_digits    :  type == class_token_matcher>;
-named_class_not_hor_space :  type == class_token_matcher>;
-named_class_not_space     :  type == class_token_matcher>;
-named_class_not_ver_space :  type == class_token_matcher>;
-named_class_not_word      :  type == class_token_matcher>;
+named_class_no_new_line   :  type == class_token_matcher>;
+named_class_digits        :  type == class_token_matcher>;
+named_class_hor_space     :  type == class_token_matcher>;
+named_class_space         :  type == class_token_matcher>;
+named_class_ver_space     :  type == class_token_matcher>;
+named_class_word          :  type == class_token_matcher>;
+
+named_class_not_digits    :  type == class_token_matcher>;
+named_class_not_hor_space :  type == class_token_matcher>;
+named_class_not_space     :  type == class_token_matcher>;
+named_class_not_ver_space :  type == class_token_matcher>;
+named_class_not_word      :  type == class_token_matcher>;
 
 
-// Regex syntax: \o{}  Example: \o{142}
+//  Regex syntax: \o{}  Example: \o{142}
 //
-octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
+octal_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if !(ctx..current() == '\\' && ctx..peek() == 'o') { return nullptr; }
 
     _ = ctx..next(); // Skip escape.
 
-    if !ctx..next() { return ctx..error("o escape without number.");}
+    if !ctx..next()          { return ctx..error("o escape without number.");}
     if ctx..current() != '{' { return ctx..error("Missing opening bracket for \\o."); }
 
     number_str: std::string = "";
@@ -2178,28 +2230,33 @@ octal_token_parse: (inout ctx: parse_context) -> token_ptr = {
 
 // TODO: @enum as template parameter currently not working. See issue https://github.com/hsutter/cppfront/issues/1147
 
-// Options for range matching.
+
+//  Options for range matching.
 range_flags: type = {
     not_greedy: int == 1;  // Try to take as few as possible.
     greedy:     int == 2;  // Try to take as many as possible.
     possessive: int == 3;  // Do not give back after a greedy match. No backtracking.
 }
 
-// Regex syntax: {min, max}  Example: a{2,4}
+
+//  Regex syntax: {min, max}  Example: a{2,4}
 //
-range_token: @polymorphic_base type = {
-    this: regex_token = ("");
+range_token: @polymorphic_base type = 
+{
+    this                 : regex_token = ("");
 
-    protected min_count: int = -1;
-    protected max_count: int = -1;
-    protected kind:      int = range_flags::greedy;
-    protected inner_token: token_ptr = nullptr;
+    protected min_count  : int         = -1;
+    protected max_count  : int         = -1;
+    protected kind       : int         = range_flags::greedy;
+    protected inner_token: token_ptr   = nullptr;
 
     operator=: (out this) = {}
 
-    parse: (inout ctx: parse_context) -> token_ptr = {
+    parse: (inout ctx: parse_context) -> token_ptr = 
+    {
         r := shared.new();
-        if ctx..current() == '{' {
+        if ctx..current() == '{' 
+        {
             if !ctx..has_token() { return ctx..error("'{' without previous element."); }
 
             inner: std::string = "";
@@ -2216,13 +2273,15 @@ range_token: @polymorphic_base type = {
             max_count_str: std::string = "-1";
 
             sep: size_t = inner..find(",");
-            if sep == std::string::npos {
+            if sep == std::string::npos 
+            {
                 min_count_str = inner;
                 max_count_str = inner;
                 if !string_util::string_to_int(inner, r*.min_count) { return ctx..error("Could not convert range to number."); }
                 r*.max_count = r*.min_count;
             }
-            else {
+            else 
+            {
                 inner_first: std::string = string_util::trim_copy(inner..substr(0, sep));
                 inner_last: std::string = string_util::trim_copy(inner..substr(sep + 1));
 
@@ -2240,7 +2299,6 @@ range_token: @polymorphic_base type = {
                 }
             }
 
-
             // Check validity of the range.
             if -1 != r*.min_count {
                 if !(0 <= r*.min_count) {
@@ -2267,7 +2325,8 @@ range_token: @polymorphic_base type = {
         return nullptr;
     }
 
-    parse_modifier: (inout this, inout ctx: parse_context) = {
+    parse_modifier: (inout this, inout ctx: parse_context) = 
+    {
         if ctx..peek() == '?' {
             kind = range_flags::not_greedy;
             _ = ctx..next();
@@ -2278,7 +2337,8 @@ range_token: @polymorphic_base type = {
         }
     }
 
-    gen_mod_string: (this) -> std::string = {
+    gen_mod_string: (this) -> std::string = 
+    {
         if kind == range_flags::not_greedy {
             return "?";
         }
@@ -2290,7 +2350,8 @@ range_token: @polymorphic_base type = {
         }
     }
 
-    gen_range_string: (this) -> std::string = {
+    gen_range_string: (this) -> std::string = 
+    {
         r : std::string = "";
         if min_count == max_count {
             r += "{(min_count)$}";
@@ -2308,7 +2369,8 @@ range_token: @polymorphic_base type = {
         return r;
     }
 
-    generate_code: (override this, inout ctx: generation_context) = {
+    generate_code: (override this, inout ctx: generation_context) = 
+    {
         inner_name := ctx..generate_func(inner_token);
         groups: std::set = ();
         inner_token*..add_groups(groups);
@@ -2324,9 +2386,12 @@ range_token: @polymorphic_base type = {
 
 }
 
-range_token_matcher:  type = {
 
-    match:  (cur: Iter, inout ctx, inner, reset_func, end_func, tail) -> _ = {
+range_token_matcher:  type = 
+{
+
+    match:  (cur: Iter, inout ctx, inner, reset_func, end_func, tail) -> _ = 
+    {
         if range_flags::possessive == kind {
             return match_possessive(cur, ctx, inner, end_func, tail);
         }
@@ -2354,7 +2419,8 @@ range_token_matcher:  type = {
         return true;
     }
 
-    private match_min_count:  (cur: Iter, inout ctx, inner, end_func, inout count_r: int) -> _ = { // TODO: count_r as out parameter introduces a performance loss.
+    private match_min_count:  (cur: Iter, inout ctx, inner, end_func, inout count_r: int) -> _ = 
+    {   // TODO: count_r as out parameter introduces a performance loss.
         res := ctx..pass(cur);
         count := 0;
 
@@ -2369,7 +2435,8 @@ range_token_matcher:  type = {
         return res;
     }
 
-    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, inner, reset_func, end_func, other) -> match_return = {
+    private match_greedy:  (count: int, cur: Iter, last_valid: Iter, inout ctx, inner, reset_func, end_func, other) -> match_return = 
+    {
         inner_call := :(tail_cur, inout tail_ctx) -> _ == {
             return match_greedy((count + 1)$, tail_cur, (cur)$, tail_ctx, (inner)$, (reset_func)$, (end_func)$, (other)$);
         };
@@ -2380,12 +2447,13 @@ range_token_matcher:  type = {
             r = inner(cur, ctx, inner_call);
         }
 
-        if !r.matched && is_in_range(count) {
-            // The recursion did not yield a match try now the tail
+        if !r.matched && is_in_range(count) 
+        {
+            //  The recursion did not yield a match try now the tail
             r = other(cur, ctx, end_func);
 
             if r.matched && !is_m_valid{
-                // We have a match rematch M if required
+                //  We have a match rematch M if required
                 reset_func(ctx);
 
                 if count > 0 {
@@ -2397,7 +2465,8 @@ range_token_matcher:  type = {
         return r;
     }
 
-    private match_possessive: (cur: Iter, inout ctx, inner, end_func, other) -> match_return = {
+    private match_possessive: (cur: Iter, inout ctx, inner, end_func, other) -> match_return = 
+    {
         count :=0;
         r := match_min_count(cur, ctx, inner, end_func, count);
 
@@ -2406,7 +2475,10 @@ range_token_matcher:  type = {
         }
 
         pos := r.pos;
-        while r.matched && is_below_upper_bound(count) {
+        while 
+            r.matched 
+            && is_below_upper_bound(count) 
+        {
             r = inner(pos, ctx, true_end_func());
 
             if pos == r.pos {
@@ -2421,7 +2493,8 @@ range_token_matcher:  type = {
         return other(pos, ctx, end_func);
     }
 
-    private match_not_greedy:  (cur: Iter, inout ctx, inner, end_func, other) -> match_return = {
+    private match_not_greedy:  (cur: Iter, inout ctx, inner, end_func, other) -> match_return = 
+    {
         count := 0;
         start := match_min_count(cur, ctx, inner, end_func, count);
         if !start.matched {
@@ -2429,7 +2502,8 @@ range_token_matcher:  type = {
         }
 
         pos := start.pos;
-        while is_below_upper_bound(count) {
+        while is_below_upper_bound(count) 
+        {
             o:= other(pos, ctx, end_func);
             if o.matched {
                 return o;
@@ -2447,12 +2521,15 @@ range_token_matcher:  type = {
     }
 }
 
-// Regex syntax: *, +, or ?  Example: aa*
+
+//  Regex syntax: *, +, or ?  Example: aa*
 //
-special_range_token: @polymorphic_base type = {
+special_range_token: @polymorphic_base type = 
+{
     this : range_token = ();
 
-    parse: (inout ctx: parse_context) -> token_ptr = {
+    parse: (inout ctx: parse_context) -> token_ptr = 
+    {
         r := shared.new();
         symbol: char = '\0';
         if ctx..current() == '*' {
@@ -2483,11 +2560,13 @@ special_range_token: @polymorphic_base type = {
     }
 }
 
-// Regex syntax: \b or \B  Example: \bword\b
+
+//  Regex syntax: \b or \B  Example: \bword\b
 //
-// Matches the start end end of word boundaries.
+//  Matches the start end end of word boundaries.
 //
-word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = {
+word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = 
+{
     if ctx..current() != '\\' { return nullptr; }
 
     if ctx..peek() == 'b' {
@@ -2503,7 +2582,8 @@ word_boundary_token_parse: (inout ctx: parse_context) -> token_ptr = {
     }
 }
 
-word_boundary_token_matcher:  (inout cur, inout ctx) -> bool = {
+word_boundary_token_matcher:  (inout cur, inout ctx) -> bool = 
+{
     words : word_class = ();
     is_match := false;
     if cur == ctx.begin { // String start
@@ -2518,7 +2598,6 @@ word_boundary_token_matcher:  (inout cur, inout ctx) -> boo
         is_match =
                 (words..includes((cur - 1)*) && !words..includes(cur*))  // End of word: \w\W
             || (!words..includes((cur - 1)*) && words..includes(cur*)); // Start of word: \W\w
-
     }
     if negate {
         is_match = !is_match;
@@ -2535,13 +2614,14 @@ word_boundary_token_matcher:  (inout cur, inout ctx) -> boo
 //-----------------------------------------------------------------------
 //
 
-// Regular expression implementation
-regular_expression:  type = {
-
+//  Regular expression implementation
+regular_expression:  type = 
+{
     matcher:  type == matcher_wrapper_type; // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
     context:  type == matcher_context_type>;                      // TODO: Remove when nested types are allowed: https://github.com/hsutter/cppfront/issues/727
 
-    search_return:  type = {
+    search_return:  type = 
+    {
         public matched: bool;
         public ctx:     context;
         public pos:     int;
@@ -2573,7 +2653,8 @@ regular_expression:  type = {
     match: (in this, str: bview)                 match(str..begin(), str..end());
     match: (in this, str: bview, start)          match(get_iter(str, start), str..end());
     match: (in this, str: bview, start, length)  match(get_iter(str, start), get_iter(str, start + length));
-    match:  (in this, start: Iter, end: Iter) -> search_return = {
+    match:  (in this, start: Iter, end: Iter) -> search_return = 
+    {
         ctx: context = (start, end);
 
         r := matcher::entry(start, ctx);
@@ -2583,7 +2664,8 @@ regular_expression:  type = {
     search: (in this, str: bview)                 search(str..begin(), str..end());
     search: (in this, str: bview, start)          search(get_iter(str, start), str..end());
     search: (in this, str: bview, start, length)  search(get_iter(str, start), get_iter(str, start + length));
-    search:  (in this, start: Iter, end: Iter) -> search_return = {
+    search:  (in this, start: Iter, end: Iter) -> search_return = 
+    {
         ctx: context = (start, end);
         r := ctx..fail();
 
@@ -2604,9 +2686,8 @@ regular_expression:  type = {
 
     to_string: (in this) matcher_wrapper::to_string();
 
-    // Helper functions
+    //  Helper functions
     //
-
     private get_iter: (str: bview, pos) -> _ = {
         if pos < str..size() {
             return str..begin() + pos;
@@ -2617,6 +2698,7 @@ regular_expression:  type = {
     }
 }
 
+
 //-----------------------------------------------------------------------
 //
 //  Parser for regular expression.
@@ -2624,24 +2706,24 @@ regular_expression:  type = {
 //-----------------------------------------------------------------------
 //
 
-// Parser and generator for regular expressions.
-regex_generator:  type = {
-
+//  Parser and generator for regular expressions.
+regex_generator:  type = 
+{
     regex:           std::string_view;
     modifier:        std::string = "";
     modifier_escape: std::string = "";
 
-    error_out: Error_out;
+    error_out:       Error_out;
 
-    source: std::string = "";
+    source:          std::string = "";
 
     operator=: (out this, r: std::string_view, e: Error_out) = {
         regex = r;
         error_out = e;
     }
 
-    parse:(inout this) -> std::string = {
-
+    parse:(inout this) -> std::string = 
+    {
         // Extract modifiers and adapt regex.
         extract_modifiers();
 
@@ -2675,7 +2757,8 @@ regex_generator:  type = {
         return source;
     }
 
-    private extract_modifiers: (inout this) = {
+    private extract_modifiers: (inout this) = 
+    {
         if regex..find_first_of("'/") == 0 {
             mod_token: char = regex[0];
 
@@ -2690,7 +2773,8 @@ regex_generator:  type = {
     }
 }
 
-generate_regex:  (regex: std::string_view, err: Err) -> std::string = {
+generate_regex:  (regex: std::string_view, err: Err) -> std::string = 
+{
     parser: regex_generator = (regex, err);
     r := parser..parse();
     _ = parser;